ff-step-table 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/StepsLandingTableV2/StepLandingTable.js +81 -36
- package/lib/components/StepsLandingTableV2/StepLandingTable.js.map +1 -1
- package/lib/components/StepsLandingTableV2/store/store.js +2 -1
- package/lib/components/StepsLandingTableV2/store/store.js.map +1 -1
- package/lib/components/StepsLandingTableV2/virtual/BlockPrefixIndex.js +16 -14
- package/lib/components/StepsLandingTableV2/virtual/BlockPrefixIndex.js.map +1 -1
- package/lib/components/StepsLandingTableV2/visible/ChunkedSequence.js +23 -1
- package/lib/components/StepsLandingTableV2/visible/ChunkedSequence.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -40,10 +40,10 @@ object-assign
|
|
|
40
40
|
http://jedwatson.github.io/classnames
|
|
41
41
|
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,c=l||s||Function("return this")(),d=Object.prototype.toString,u=c.Symbol,f=u?u.prototype:void 0,h=f?f.toString:void 0;function p(e){if("string"==typeof e)return e;if(m(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function C(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}function g(e){return e?(e=function(e){if("number"==typeof e)return e;if(m(e))return NaN;if(C(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=C(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=i.test(e);return l||o.test(e)?a(e.slice(2),l?2:8):r.test(e)?NaN:+e}(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}e.exports=function(e,t,n){var r,i,o;return e=null==(r=e)?"":p(r),i=function(e){var t=g(e),n=t%1;return t==t?n?t-n:t:0}(n),o=e.length,i==i&&(void 0!==o&&(i=i<=o?i:o),i=i>=0?i:0),n=i,t=p(t),e.slice(n,n+t.length)==t}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){var n,r=/^\[object .+?Constructor\]$/,i="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")(),l=Array.prototype,s=Function.prototype,c=Object.prototype,d=a["__core-js_shared__"],u=(n=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",f=s.toString,h=c.hasOwnProperty,p=c.toString,C=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=l.splice,g=x(a,"Map"),v=x(Object,"create");function y(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function M(e){return!(!k(e)||(t=e,u&&u in t))&&(function(e){var t=k(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:r).test(function(e){if(null!=e){try{return f.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function A(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function x(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return M(n)?n:void 0}function L(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(L.Cache||b),n}function k(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}y.prototype.clear=function(){this.__data__=v?v(null):{}},y.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},y.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return h.call(t,e)?t[e]:void 0},y.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:h.call(t,e)},y.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=E(t,e);return!(n<0||(n==t.length-1?t.pop():m.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return E(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=E(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},b.prototype.clear=function(){this.__data__={hash:new y,map:new(g||w),string:new y}},b.prototype.delete=function(e){return A(this,e).delete(e)},b.prototype.get=function(e){return A(this,e).get(e)},b.prototype.has=function(e){return A(this,e).has(e)},b.prototype.set=function(e,t){return A(this,e).set(e,t),this},L.Cache=b,e.exports=L}).call(this,n(3))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,c=l||s||Function("return this")(),d=Object.prototype.toString,u=Math.max,f=Math.min,h=function(){return c.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function C(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=i.test(e);return l||o.test(e)?a(e.slice(2),l?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,l,s,c=0,d=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||m&&e-c>=o}function w(){var e=h();if(y(e))return b(e);l=setTimeout(w,function(e){var n=t-(e-s);return m?f(n,o-(e-c)):n}(e))}function b(e){return l=void 0,g&&r?v(e):(r=i=void 0,a)}function E(){var e=h(),n=y(e);if(r=arguments,i=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(w,t),d?v(e):a}(s);if(m)return l=setTimeout(w,t),v(s)}return void 0===l&&(l=setTimeout(w,t)),a}return t=C(t)||0,p(n)&&(d=!!n.leading,o=(m="maxWait"in n)?u(C(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=i=l=void 0},E.flush=function(){return void 0===l?a:b(h())},E}}).call(this,n(3))},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",o="[object Object]",a="[object Set]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[r]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[o]=p["[object RegExp]"]=p[a]=p["[object String]"]=p["[object WeakMap]"]=!1;var C="object"==typeof e&&e&&e.Object===Object&&e,m="object"==typeof self&&self&&self.Object===Object&&self,g=C||m||Function("return this")(),v=t&&!t.nodeType&&t,y=v&&"object"==typeof n&&n&&!n.nodeType&&n,w=y&&y.exports===v&&C.process,b=function(){try{return w&&w.binding("util")}catch(e){}}(),E=b&&b.isTypedArray;function M(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function A(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function x(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function L(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function H(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var S,_,V,O=Array.prototype,z=Function.prototype,I=Object.prototype,N=g["__core-js_shared__"],T=(S=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",D=z.toString,Z=I.hasOwnProperty,j=I.toString,R=RegExp("^"+D.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=g.Symbol,P=g.Uint8Array,F=I.propertyIsEnumerable,U=O.splice,q=(_=Object.keys,V=Object,function(e){return _(V(e))}),W=be(g,"DataView"),Q=be(g,"Map"),G=be(g,"Promise"),K=be(g,"Set"),Y=be(g,"WeakMap"),X=be(Object,"create"),J=Se(W),$=Se(Q),ee=Se(G),te=Se(K),ne=Se(Y),re=B?B.prototype:void 0,ie=re?re.valueOf:void 0,oe=re?re.toString:void 0;function ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function le(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ce(e){var t=-1,n=e?e.length:0;for(this.__data__=new se;++t<n;)this.add(e[t])}function de(e){this.__data__=new le(e)}function ue(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}ae.prototype.clear=function(){this.__data__=X?X(null):{}},ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ae.prototype.get=function(e){var t=this.__data__;if(X){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Z.call(t,e)?t[e]:void 0},ae.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:Z.call(t,e)},ae.prototype.set=function(e,t){return this.__data__[e]=X&&void 0===t?"__lodash_hash_undefined__":t,this},le.prototype.clear=function(){this.__data__=[]},le.prototype.delete=function(e){var t=this.__data__,n=ue(t,e);return!(n<0||(n==t.length-1?t.pop():U.call(t,n,1),0))},le.prototype.get=function(e){var t=this.__data__,n=ue(t,e);return n<0?void 0:t[n][1]},le.prototype.has=function(e){return ue(this.__data__,e)>-1},le.prototype.set=function(e,t){var n=this.__data__,r=ue(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},se.prototype.clear=function(){this.__data__={hash:new ae,map:new(Q||le),string:new ae}},se.prototype.delete=function(e){return we(this,e).delete(e)},se.prototype.get=function(e){return we(this,e).get(e)},se.prototype.has=function(e){return we(this,e).has(e)},se.prototype.set=function(e,t){return we(this,e).set(e,t),this},ce.prototype.add=ce.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ce.prototype.has=function(e){return this.__data__.has(e)},de.prototype.clear=function(){this.__data__=new le},de.prototype.delete=function(e){return this.__data__.delete(e)},de.prototype.get=function(e){return this.__data__.get(e)},de.prototype.has=function(e){return this.__data__.has(e)},de.prototype.set=function(e,t){var n=this.__data__;if(n instanceof le){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this;n=this.__data__=new se(r)}return n.set(e,t),this};var fe,he=(fe=function(e,t){return e&&pe(e,t,Be)},function(e,t){if(null==e)return e;if(!Ie(e))return fe(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e}),pe=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var l=o[++r];if(!1===t(i[l],l,i))break}return e};function Ce(e,t){for(var n=0,r=(t=Ae(t,e)?[t]:ve(t)).length;null!=e&&n<r;)e=e[He(t[n++])];return n&&n==r?e:void 0}function me(e,t){return null!=e&&t in Object(e)}function ge(e,t,n,l,s){return e===t||(null==e||null==t||!De(e)&&!Ze(t)?e!=e&&t!=t:function(e,t,n,l,s,c){var d=ze(e),u=ze(t),f="[object Array]",h="[object Array]";d||(f=(f=Ee(e))==r?o:f),u||(h=(h=Ee(t))==r?o:h);var p=f==o&&!L(e),C=h==o&&!L(t),m=f==h;if(m&&!p)return c||(c=new de),d||Re(e)?ye(e,t,n,l,s,c):function(e,t,n,r,o,l,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new P(e),new P(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ve(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var c=k;case a:var d=2&l;if(c||(c=H),e.size!=t.size&&!d)return!1;var u=s.get(e);if(u)return u==t;l|=1,s.set(e,t);var f=ye(c(e),c(t),r,o,l,s);return s.delete(e),f;case"[object Symbol]":if(ie)return ie.call(e)==ie.call(t)}return!1}(e,t,f,n,l,s,c);if(!(2&s)){var g=p&&Z.call(e,"__wrapped__"),v=C&&Z.call(t,"__wrapped__");if(g||v){var y=g?e.value():e,w=v?t.value():t;return c||(c=new de),n(y,w,l,s,c)}}return!!m&&(c||(c=new de),function(e,t,n,r,i,o){var a=2&i,l=Be(e),s=l.length;if(s!=Be(t).length&&!a)return!1;for(var c=s;c--;){var d=l[c];if(!(a?d in t:Z.call(t,d)))return!1}var u=o.get(e);if(u&&o.get(t))return u==t;var f=!0;o.set(e,t),o.set(t,e);for(var h=a;++c<s;){var p=e[d=l[c]],C=t[d];if(r)var m=a?r(C,p,d,t,e,o):r(p,C,d,e,t,o);if(!(void 0===m?p===C||n(p,C,r,i,o):m)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var g=e.constructor,v=t.constructor;g==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,l,s,c))}(e,t,ge,n,l,s))}function ve(e){return ze(e)?e:ke(e)}function ye(e,t,n,r,i,o){var a=2&i,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,u=!0,f=1&i?new ce:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var h=e[d],p=t[d];if(r)var C=a?r(p,h,d,t,e,o):r(h,p,d,e,t,o);if(void 0!==C){if(C)continue;u=!1;break}if(f){if(!A(t,function(e,t){if(!f.has(t)&&(h===e||n(h,e,r,i,o)))return f.add(t)})){u=!1;break}}else if(h!==p&&!n(h,p,r,i,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function we(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!De(e)||function(e){return!!T&&T in e}(e))&&(Ne(e)||L(e)?R:f).test(Se(e))}(n)?n:void 0}var Ee=function(e){return j.call(e)};function Me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function Ae(e,t){if(ze(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!je(e))||s.test(e)||!l.test(e)||null!=t&&e in Object(t)}function xe(e){return e==e&&!De(e)}function Le(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(W&&"[object DataView]"!=Ee(new W(new ArrayBuffer(1)))||Q&&Ee(new Q)!=i||G&&"[object Promise]"!=Ee(G.resolve())||K&&Ee(new K)!=a||Y&&"[object WeakMap]"!=Ee(new Y))&&(Ee=function(e){var t=j.call(e),n=t==o?e.constructor:void 0,r=n?Se(n):void 0;if(r)switch(r){case J:return"[object DataView]";case $:return i;case ee:return"[object Promise]";case te:return a;case ne:return"[object WeakMap]"}return t});var ke=_e(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(je(e))return oe?oe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,function(e,t,r,i){n.push(r?i.replace(u,"$1"):t||e)}),n});function He(e){if("string"==typeof e||je(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Se(e){if(null!=e){try{return D.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _e(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(_e.Cache||se),n}function Ve(e,t){return e===t||e!=e&&t!=t}function Oe(e){return function(e){return Ze(e)&&Ie(e)}(e)&&Z.call(e,"callee")&&(!F.call(e,"callee")||j.call(e)==r)}_e.Cache=se;var ze=Array.isArray;function Ie(e){return null!=e&&Te(e.length)&&!Ne(e)}function Ne(e){var t=De(e)?j.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function De(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ze(e){return!!e&&"object"==typeof e}function je(e){return"symbol"==typeof e||Ze(e)&&"[object Symbol]"==j.call(e)}var Re=E?function(e){return function(t){return e(t)}}(E):function(e){return Ze(e)&&Te(e.length)&&!!p[j.call(e)]};function Be(e){return Ie(e)?function(e){var t=ze(e)||Oe(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],n=t.length,r=!!n;for(var i in e)!Z.call(e,i)||r&&("length"==i||Me(i,n))||t.push(i);return t}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||I))return q(e);var t,n,r=[];for(var i in Object(e))Z.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e)}function Pe(e){return e}n.exports=function(e,t,n){var r=ze(e)?M:x,i=arguments.length<3;return r(e,function(e){return"function"==typeof e?e:null==e?Pe:"object"==typeof e?ze(e)?function(e,t){return Ae(e)&&xe(t)?Le(He(e),t):function(n){var r=function(e,t){var n=null==e?void 0:Ce(e,t);return void 0===n?void 0:n}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r,i=-1,o=(t=Ae(t,e)?[t]:ve(t)).length;++i<o;){var a=He(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}return r||!!(o=e?e.length:0)&&Te(o)&&Me(a,o)&&(ze(e)||Oe(e))}(e,t,me)}(n,e):ge(t,r,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Be(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xe(i)]}return t}(e);return 1==t.length&&t[0][2]?Le(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n){var r=n.length,i=r;if(null==e)return!i;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<i;){var a=(o=n[r])[0],l=e[a],s=o[1];if(o[2]){if(void 0===l&&!(a in e))return!1}else if(!ge(s,l,void 0,3,new de))return!1}return!0}(n,0,t)}}(e):Ae(t=e)?(n=He(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return Ce(t,e)}}(t);var t,n}(t),n,i,he)}}).call(this,n(3),n(7)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){if(Array.isArray(e))return e}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return(d="function"==typeof Symbol&&"symbol"===c(Symbol.iterator)?function(e){return c(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":c(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t);var p=n(0),C=n.n(p),m=n(5),g=n.n(m),v=n(4),y=n.n(v),w=n(6),b=n.n(w),E=n(2),M=n.n(E),A=n(1),x=n.n(A);function L(e,t){return a(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(e,t)||l()}n(8);var k=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],H=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function S(e,t,n,r,i){return!n||i?e+"".padEnd(t.length,".")+" "+r:e+"".padEnd(t.length,".")+" "+n}function _(e,t,n,i,a){var l,s,c=[];return s=!0===t,[(l=[]).concat.apply(l,o(e.map(function(e){var o={name:e[0],regions:e[1],iso2:e[2],countryCode:e[3],dialCode:e[3],format:S(n,e[3],e[4],i,a),priority:e[5]||0},l=[];return e[6]&&e[6].map(function(t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}({},o);n.dialCode=e[3]+t,n.isAreaCode=!0,n.areaCodeLength=t.length,l.push(n)}),l.length>0?(o.mainCode=!0,s||"Array"===t.constructor.name&&t.includes(e[2])?(o.hasAreaCodes=!0,[o].concat(l)):(c=c.concat(l),[o])):[o]}))),c]}function V(e,t,n,r){if(null!==n){var i=Object.keys(n),o=Object.values(n);i.forEach(function(n,i){if(r)return e.push([n,o[i]]);var a=e.findIndex(function(e){return e[0]===n});if(-1===a){var l=[n];l[t]=o[i],e.push(l)}else e[a][t]=o[i]})}}function O(e,t){return 0===t.length?e:e.map(function(e){var n=t.findIndex(function(t){return t[0]===e[2]});if(-1===n)return e;var r=t[n];return r[1]&&(e[4]=r[1]),r[3]&&(e[5]=r[3]),r[2]&&(e[6]=r[2]),e})}var z=function e(t,n,r,i,a,l,c,d,u,f,h,p,C,m){s(this,e),this.filterRegions=function(e,t){if("string"==typeof e){var n=e;return t.filter(function(e){return e.regions.some(function(e){return e===n})})}return t.filter(function(t){return e.map(function(e){return t.regions.some(function(t){return t===e})}).some(function(e){return e})})},this.sortTerritories=function(e,t){var n=[].concat(o(e),o(t));return n.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),n},this.getFilteredCountryList=function(e,t,n){return 0===e.length?t:n?e.map(function(e){var n=t.find(function(t){return t.iso2===e});if(n)return n}).filter(function(e){return e}):t.filter(function(t){return e.some(function(e){return e===t.iso2})})},this.localizeCountries=function(e,t,n){for(var r=0;r<e.length;r++)void 0!==t[e[r].iso2]?e[r].localName=t[e[r].iso2]:void 0!==t[e[r].name]&&(e[r].localName=t[e[r].name]);return n||e.sort(function(e,t){return e.localName<t.localName?-1:e.localName>t.localName?1:0}),e},this.getCustomAreas=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=JSON.parse(JSON.stringify(e));i.dialCode+=t[r],n.push(i)}return n},this.excludeCountries=function(e,t){return 0===t.length?e:e.filter(function(e){return!t.includes(e.iso2)})};var g=function(e,t,n){var r=[];return V(r,1,e,!0),V(r,3,t),V(r,2,n),r}(d,u,f),v=O(JSON.parse(JSON.stringify(k)),g),y=O(JSON.parse(JSON.stringify(H)),g),w=L(_(v,t,p,C,m),2),b=w[0],E=w[1];if(n){var M=L(_(y,t,p,C,m),2),A=M[0];M[1],b=this.sortTerritories(A,b)}r&&(b=this.filterRegions(r,b)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(i,b,c.includes("onlyCountries")),l),h,c.includes("onlyCountries")),this.preferredCountries=0===a.length?[]:this.localizeCountries(this.getFilteredCountryList(a,b,c.includes("preferredCountries")),h,c.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(i,E),l)},I=function(e){function t(e){var n;s(this,t),(n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?u(e):t}(this,f(t).call(this,e))).getProbableCandidate=y()(function(e){return e&&0!==e.length?n.state.onlyCountries.filter(function(t){return M()(t.name.toLowerCase(),e.toLowerCase())},u(u(n)))[0]:null}),n.guessSelectedCountry=y()(function(e,t,r,i){var o;if(!1===n.props.enableAreaCodes&&(i.some(function(t){if(M()(e,t.dialCode))return r.some(function(e){if(t.iso2===e.iso2&&e.mainCode)return o=e,!0}),!0}),o))return o;var a=r.find(function(e){return e.iso2==t});if(""===e.trim())return a;var l=r.reduce(function(t,n){if(M()(e,n.dialCode)){if(n.dialCode.length>t.dialCode.length)return n;if(n.dialCode.length===t.dialCode.length&&n.priority<t.priority)return n}return t},{dialCode:"",priority:10001},u(u(n)));return l.name?l:a}),n.updateCountry=function(e){var t,r=n.state.onlyCountries;(t=e.indexOf(0)>="0"&&e.indexOf(0)<="9"?r.find(function(t){return t.dialCode==+e}):r.find(function(t){return t.iso2==e}))&&t.dialCode&&n.setState({selectedCountry:t,formattedNumber:n.props.disableCountryCode?"":n.formatNumber(t.dialCode,t)})},n.scrollTo=function(e,t){if(e){var r=n.dropdownRef;if(r&&document.body){var i=r.offsetHeight,o=r.getBoundingClientRect().top+document.body.scrollTop,a=o+i,l=e,s=l.getBoundingClientRect(),c=l.offsetHeight,d=s.top+document.body.scrollTop,u=d+c,f=d-o+r.scrollTop,h=i/2-c/2;if(n.props.enableSearch?d<o+32:d<o)t&&(f-=h),r.scrollTop=f;else if(u>a){t&&(f+=h);var p=i-c;r.scrollTop=f-p}}}},n.scrollToTop=function(){var e=n.dropdownRef;e&&document.body&&(e.scrollTop=0)},n.formatNumber=function(e,t){if(!t)return e;var r,o=t.format,s=n.props,c=s.disableCountryCode,d=s.enableAreaCodeStretch,u=s.enableLongNumbers,f=s.autoFormat;if(c?((r=o.split(" ")).shift(),r=r.join(" ")):d&&t.isAreaCode?((r=o.split(" "))[1]=r[1].replace(/\.+/,"".padEnd(t.areaCodeLength,".")),r=r.join(" ")):r=o,!e||0===e.length)return c?"":n.props.prefix;if(e&&e.length<2||!r||!f)return c?e:n.props.prefix+e;var h,p=b()(r,function(e,t){if(0===e.remainingText.length)return e;if("."!==t)return{formattedText:e.formattedText+t,remainingText:e.remainingText};var n,r=a(n=e.remainingText)||i(n)||l(),o=r[0],s=r.slice(1);return{formattedText:e.formattedText+o,remainingText:s}},{formattedText:"",remainingText:e.split("")});return(h=u?p.formattedText+p.remainingText.join(""):p.formattedText).includes("(")&&!h.includes(")")&&(h+=")"),h},n.cursorToEnd=function(){var e=n.numberInputRef;if(document.activeElement===e){e.focus();var t=e.value.length;")"===e.value.charAt(t-1)&&(t-=1),e.setSelectionRange(t,t)}},n.getElement=function(e){return n["flag_no_".concat(e)]},n.getCountryData=function(){return n.state.selectedCountry?{name:n.state.selectedCountry.name||"",dialCode:n.state.selectedCountry.dialCode||"",countryCode:n.state.selectedCountry.iso2||"",format:n.state.selectedCountry.format||""}:{}},n.handleFlagDropdownClick=function(e){if(e.preventDefault(),n.state.showDropdown||!n.props.disabled){var t=n.state,r=t.preferredCountries,i=t.onlyCountries,o=t.selectedCountry,a=n.concatPreferredCountries(r,i).findIndex(function(e){return e.dialCode===o.dialCode&&e.iso2===o.iso2});n.setState({showDropdown:!n.state.showDropdown,highlightCountryIndex:a},function(){n.state.showDropdown&&n.scrollTo(n.getElement(n.state.highlightCountryIndex))})}},n.handleInput=function(e){var t=e.target.value,r=n.props,i=r.prefix,o=r.onChange,a=n.props.disableCountryCode?"":i,l=n.state.selectedCountry,s=n.state.freezeSelection;if(!n.props.countryCodeEditable){var c=i+(l.hasAreaCodes?n.state.onlyCountries.find(function(e){return e.iso2===l.iso2&&e.mainCode}).dialCode:l.dialCode);if(t.slice(0,c.length)!==c)return}if(t===i)return o&&o("",n.getCountryData(),e,""),n.setState({formattedNumber:""});if(t.replace(/\D/g,"").length>15){if(!1===n.props.enableLongNumbers)return;if("number"==typeof n.props.enableLongNumbers&&t.replace(/\D/g,"").length>n.props.enableLongNumbers)return}if(t!==n.state.formattedNumber){e.preventDefault?e.preventDefault():e.returnValue=!1;var d=n.props.country,u=n.state,f=u.onlyCountries,h=u.selectedCountry,p=u.hiddenAreaCodes;if(o&&e.persist(),t.length>0){var C=t.replace(/\D/g,"");(!n.state.freezeSelection||h&&h.dialCode.length>C.length)&&(l=n.props.disableCountryGuess?h:n.guessSelectedCountry(C.substring(0,6),d,f,p)||h,s=!1),a=n.formatNumber(C,l),l=l.dialCode?l:h}var m=e.target.selectionStart,g=e.target.selectionStart,v=n.state.formattedNumber,y=a.length-v.length;n.setState({formattedNumber:a,freezeSelection:s,selectedCountry:l},function(){y>0&&(g-=y),")"==a.charAt(a.length-1)?n.numberInputRef.setSelectionRange(a.length-1,a.length-1):g>0&&v.length>=a.length?n.numberInputRef.setSelectionRange(g,g):m<v.length&&n.numberInputRef.setSelectionRange(m,m),o&&o(a.replace(/[^0-9]+/g,""),n.getCountryData(),e,a)})}},n.handleInputClick=function(e){n.setState({showDropdown:!1}),n.props.onClick&&n.props.onClick(e,n.getCountryData())},n.handleDoubleClick=function(e){var t=e.target.value.length;e.target.setSelectionRange(0,t)},n.handleFlagItemClick=function(e,t){var r=n.state.selectedCountry,i=n.state.onlyCountries.find(function(t){return t==e});if(i){var o=n.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),a=o.length>1?o.replace(r.dialCode,i.dialCode):i.dialCode,l=n.formatNumber(a.replace(/\D/g,""),i);n.setState({showDropdown:!1,selectedCountry:i,freezeSelection:!0,formattedNumber:l,searchValue:""},function(){n.cursorToEnd(),n.props.onChange&&n.props.onChange(l.replace(/[^0-9]+/g,""),n.getCountryData(),t,l)})}},n.handleInputFocus=function(e){n.numberInputRef&&n.numberInputRef.value===n.props.prefix&&n.state.selectedCountry&&!n.props.disableCountryCode&&n.setState({formattedNumber:n.props.prefix+n.state.selectedCountry.dialCode},function(){n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)}),n.setState({placeholder:""}),n.props.onFocus&&n.props.onFocus(e,n.getCountryData()),n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)},n.handleInputBlur=function(e){e.target.value||n.setState({placeholder:n.props.placeholder}),n.props.onBlur&&n.props.onBlur(e,n.getCountryData())},n.handleInputCopy=function(e){if(n.props.copyNumbersOnly){var t=window.getSelection().toString().replace(/[^0-9]+/g,"");e.clipboardData.setData("text/plain",t),e.preventDefault()}},n.getHighlightCountryIndex=function(e){var t=n.state.highlightCountryIndex+e;return t<0||t>=n.state.onlyCountries.length+n.state.preferredCountries.length?t-e:n.props.enableSearch&&t>n.getSearchFilteredCountries().length?0:t},n.searchCountry=function(){var e=n.getProbableCandidate(n.state.queryString)||n.state.onlyCountries[0],t=n.state.onlyCountries.findIndex(function(t){return t==e})+n.state.preferredCountries.length;n.scrollTo(n.getElement(t),!0),n.setState({queryString:"",highlightCountryIndex:t})},n.handleKeydown=function(e){var t=n.props.keys,r=e.target.className;if(r.includes("selected-flag")&&e.which===t.ENTER&&!n.state.showDropdown)return n.handleFlagDropdownClick(e);if(r.includes("form-control")&&(e.which===t.ENTER||e.which===t.ESC))return e.target.blur();if(n.state.showDropdown&&!n.props.disabled&&(!r.includes("search-box")||e.which===t.UP||e.which===t.DOWN||e.which===t.ENTER||e.which===t.ESC&&""===e.target.value)){e.preventDefault?e.preventDefault():e.returnValue=!1;var i=function(e){n.setState({highlightCountryIndex:n.getHighlightCountryIndex(e)},function(){n.scrollTo(n.getElement(n.state.highlightCountryIndex),!0)})};switch(e.which){case t.DOWN:i(1);break;case t.UP:i(-1);break;case t.ENTER:n.props.enableSearch?n.handleFlagItemClick(n.getSearchFilteredCountries()[n.state.highlightCountryIndex]||n.getSearchFilteredCountries()[0],e):n.handleFlagItemClick([].concat(o(n.state.preferredCountries),o(n.state.onlyCountries))[n.state.highlightCountryIndex],e);break;case t.ESC:case t.TAB:n.setState({showDropdown:!1},n.cursorToEnd);break;default:(e.which>=t.A&&e.which<=t.Z||e.which===t.SPACE)&&n.setState({queryString:n.state.queryString+String.fromCharCode(e.which)},n.state.debouncedQueryStingSearcher)}}},n.handleInputKeyDown=function(e){var t=n.props,r=t.keys,i=t.onEnterKeyPress,o=t.onKeyDown;e.which===r.ENTER&&i&&i(e),o&&o(e)},n.handleClickOutside=function(e){n.dropdownRef&&!n.dropdownContainerRef.contains(e.target)&&n.state.showDropdown&&n.setState({showDropdown:!1})},n.handleSearchChange=function(e){var t=e.currentTarget.value,r=n.state,i=r.preferredCountries,o=r.selectedCountry,a=0;if(""===t&&o){var l=n.state.onlyCountries;a=n.concatPreferredCountries(i,l).findIndex(function(e){return e==o}),setTimeout(function(){return n.scrollTo(n.getElement(a))},100)}n.setState({searchValue:t,highlightCountryIndex:a})},n.concatPreferredCountries=function(e,t){return e.length>0?o(new Set(e.concat(t))):t},n.getDropdownCountryName=function(e){return e.localName||e.name},n.getSearchFilteredCountries=function(){var e=n.state,t=e.preferredCountries,r=e.onlyCountries,i=e.searchValue,a=n.props.enableSearch,l=n.concatPreferredCountries(t,r),s=i.trim().toLowerCase().replace("+","");if(a&&s){if(/^\d+$/.test(s))return l.filter(function(e){var t=e.dialCode;return["".concat(t)].some(function(e){return e.toLowerCase().includes(s)})});var c=l.filter(function(e){var t=e.iso2;return["".concat(t)].some(function(e){return e.toLowerCase().includes(s)})}),d=l.filter(function(e){var t=e.name,n=e.localName;return e.iso2,["".concat(t),"".concat(n||"")].some(function(e){return e.toLowerCase().includes(s)})});return n.scrollToTop(),o(new Set([].concat(c,d)))}return l},n.getCountryDropdownList=function(){var e=n.state,t=e.preferredCountries,i=e.highlightCountryIndex,o=e.showDropdown,a=e.searchValue,l=n.props,s=l.disableDropdown,c=l.prefix,d=n.props,u=d.enableSearch,f=d.searchNotFound,h=d.disableSearchIcon,p=d.searchClass,m=d.searchStyle,g=d.searchPlaceholder,v=d.autocompleteSearch,y=n.getSearchFilteredCountries().map(function(e,t){var r=i===t,o=x()({country:!0,preferred:"us"===e.iso2||"gb"===e.iso2,active:"us"===e.iso2,highlight:r}),a="flag ".concat(e.iso2);return C.a.createElement("li",Object.assign({ref:function(e){return n["flag_no_".concat(t)]=e},key:"flag_no_".concat(t),"data-flag-key":"flag_no_".concat(t),className:o,"data-dial-code":"1",tabIndex:s?"-1":"0","data-country-code":e.iso2,onClick:function(t){return n.handleFlagItemClick(e,t)},role:"option"},r?{"aria-selected":!0}:{}),C.a.createElement("div",{className:a}),C.a.createElement("span",{className:"country-name"},n.getDropdownCountryName(e)),C.a.createElement("span",{className:"dial-code"},e.format?n.formatNumber(e.dialCode,e):c+e.dialCode))}),w=C.a.createElement("li",{key:"dashes",className:"divider"});t.length>0&&(!u||u&&!a.trim())&&y.splice(t.length,0,w);var b=x()(r({"country-list":!0,hide:!o},n.props.dropdownClass,!0));return C.a.createElement("ul",{ref:function(e){return!u&&e&&e.focus(),n.dropdownRef=e},className:b,style:n.props.dropdownStyle,role:"listbox",tabIndex:"0"},u&&C.a.createElement("li",{className:x()(r({search:!0},p,p))},!h&&C.a.createElement("span",{className:x()(r({"search-emoji":!0},"".concat(p,"-emoji"),p)),role:"img","aria-label":"Magnifying glass"},"🔎"),C.a.createElement("input",{className:x()(r({"search-box":!0},"".concat(p,"-box"),p)),style:m,type:"search",placeholder:g,autoFocus:!0,autoComplete:v?"on":"off",value:a,onChange:n.handleSearchChange})),y.length>0?y:C.a.createElement("li",{className:"no-entries-message"},C.a.createElement("span",null,f)))};var c,h=new z(e.enableAreaCodes,e.enableTerritories,e.regions,e.onlyCountries,e.preferredCountries,e.excludeCountries,e.preserveOrder,e.masks,e.priority,e.areaCodes,e.localization,e.prefix,e.defaultMask,e.alwaysDefaultMask),p=h.onlyCountries,m=h.preferredCountries,v=h.hiddenAreaCodes,w=e.value?e.value.replace(/\D/g,""):"";c=e.disableInitialCountryGuess?0:w.length>1?n.guessSelectedCountry(w.substring(0,6),e.country,p,v)||0:e.country&&p.find(function(t){return t.iso2==e.country})||0;var E,A=w.length<2&&c&&!M()(w,c.dialCode)?c.dialCode:"";E=""===w&&0===c?"":n.formatNumber((e.disableCountryCode?"":A)+w,c.name?c:void 0);var L=p.findIndex(function(e){return e==c});return n.state={showDropdown:e.showDropdown,formattedNumber:E,onlyCountries:p,preferredCountries:m,hiddenAreaCodes:v,selectedCountry:c,highlightCountryIndex:L,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:g()(n.searchCountry,250),searchValue:""},n}var n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),(n=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(e,t,n){e.country!==this.props.country?this.updateCountry(this.props.country):e.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(e){if(null===e)return this.setState({selectedCountry:0,formattedNumber:""});var t=this.state,n=t.onlyCountries,r=t.selectedCountry,i=t.hiddenAreaCodes,o=this.props,a=o.country,l=o.prefix;if(""===e)return this.setState({selectedCountry:r,formattedNumber:""});var s,c,d=e.replace(/\D/g,"");if(r&&M()(e,l+r.dialCode))c=this.formatNumber(d,r),this.setState({formattedNumber:c});else{var u=(s=this.props.disableCountryGuess?r:this.guessSelectedCountry(d.substring(0,6),a,n,i)||r)&&M()(d,l+s.dialCode)?s.dialCode:"";c=this.formatNumber((this.props.disableCountryCode?"":u)+d,s||void 0),this.setState({selectedCountry:s,formattedNumber:c})}}},{key:"render",value:function(){var e,t,n,i=this,o=this.state,a=o.onlyCountries,l=o.selectedCountry,s=o.showDropdown,c=o.formattedNumber,d=o.hiddenAreaCodes,u=this.props,f=u.disableDropdown,h=u.renderStringAsFlag,p=u.isValid,m=u.defaultErrorMessage,g=u.specialLabel;if("boolean"==typeof p)t=p;else{var v=p(c.replace(/\D/g,""),l,a,d);"boolean"==typeof v?!1===(t=v)&&(n=m):(t=!1,n=v)}var y=x()((r(e={},this.props.containerClass,!0),r(e,"react-tel-input",!0),e)),w=x()({arrow:!0,up:s}),b=x()(r({"form-control":!0,"invalid-number":!t,open:s},this.props.inputClass,!0)),E=x()({"selected-flag":!0,open:s}),M=x()(r({"flag-dropdown":!0,"invalid-number":!t,open:s},this.props.buttonClass,!0)),A="flag ".concat(l&&l.iso2);return C.a.createElement("div",{className:"".concat(y," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},g&&C.a.createElement("div",{className:"special-label"},g),n&&C.a.createElement("div",{className:"invalid-number-message"},n),C.a.createElement("input",Object.assign({className:b,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:c,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(e){i.numberInputRef=e,"function"==typeof i.props.inputProps.ref?i.props.inputProps.ref(e):"object"==typeof i.props.inputProps.ref&&(i.props.inputProps.ref.current=e)}})),C.a.createElement("div",{className:M,style:this.props.buttonStyle,ref:function(e){return i.dropdownContainerRef=e}},h?C.a.createElement("div",{className:E},h):C.a.createElement("div",{onClick:f?void 0:this.handleFlagDropdownClick,className:E,title:l?"".concat(l.localName||l.name,": + ").concat(l.dialCode):"",tabIndex:f?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!s||void 0},C.a.createElement("div",{className:A},!f&&C.a.createElement("div",{className:w}))),s&&this.getCountryDropdownList()))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),t}(C.a.Component);I.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=I}])),uk),pk=S(hk),Ck={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function mk(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gk(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function gk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vk(e,t){for(var n,r=0,i=mk(t.split(""));!(n=i()).done;){n.value===e&&r++}return r}function yk(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function wk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=arguments.length>2?arguments[2]:void 0;if(!e)return function(e){return{text:e}};var r=vk(t,e);return function(i){if(!i)return{text:"",template:e};for(var o,a=0,l="",s=yk(e.split(""));!(o=s()).done;){var c=o.value;if(c===t){if(l+=i[a],++a===i.length&&i.length<r)break}else l+=c}return n&&(l=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:" ",i=e.length,o=vk("(",e)-vk(")",e);o>0&&i<t.length;)e+=t[i].replace(n,r),")"===t[i]&&o--,i++;return e}(l,e)),{text:l,template:e}}}var Ek=8,Mk=46;function Ak(e,t){void 0!==t&&(!function(){if("undefined"!=typeof navigator)return xk.test(navigator.userAgent)}()?e.setSelectionRange(t,t):setTimeout(function(){return e.setSelectionRange(t,t)},0))}var xk=/Android/i;function Lk(e,t,n,r,i){if(!t.hasAttribute("readonly")){var o=function(e){switch(e.keyCode){case Ek:return"Backspace";case Mk:return"Delete"}}(e);switch(o){case"Delete":case"Backspace":e.preventDefault();var a=function(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}(t);return a?(function(e,t){var n=e.value;n=n.slice(0,t.start)+n.slice(t.end),e.value=n,Ak(e,t.start)}(t,a),kk(t,n,r,void 0,i)):kk(t,n,r,o,i)}}}function kk(e,t,n,r,i){var o=function(e,t,n){for(var r={},i="",o=0,a=0;a<e.length;){var l=n(e[a],i,r);void 0!==l&&(i+=l,void 0!==t&&(t===a?o=i.length-1:t>a&&(o=i.length))),a++}return void 0===t&&(o=i.length),{value:i,caret:o}}(e.value,e.selectionStart,t),a=o.value,l=o.caret;if(r){var s=function(e,t,n){switch(n){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1)}return{value:e,caret:t}}(a,l,r);a=s.value,l=s.caret}var c=function(e,t,n){"string"==typeof n&&(n=bk(n));var r=n(e)||{},i=r.text,o=r.template;if(void 0===i&&(i=e),o)if(void 0===t)t=i.length;else{for(var a=0,l=!1,s=-1;a<i.length&&a<o.length;){if(i[a]!==o[a]){if(0===t){l=!0,t=a;break}s=a,t--}a++}l||(t=s+1)}return{text:i,caret:t}}(a,l,n),d=c.text;l=c.caret,e.value=d,Ak(e,l),i&&i(a)}var Hk=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Sk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sk(Object(n),!0).forEach(function(t){Vk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ok(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zk(e){var t=e.ref,n=e.parse,r=e.format,i=e.value,o=e.defaultValue,l=e.controlled,s=void 0===l||l,c=e.onChange,d=e.onKeyDown,u=Ok(e,Hk),f=a(),h=p(function(e){f.current=e,t&&("function"==typeof t?t(e):t.current=e)},[t]),C=p(function(e){kk(f.current,n,r,void 0,c)},[f,n,r,c]),m=p(function(e){if(d&&d(e),!e.defaultPrevented)return Lk(e,f.current,n,r,c)},[f,n,r,c,d]),g=_k(_k({},u),{},{ref:h,onChange:C,onKeyDown:m});return _k(_k({},g),{},s?{value:r(Ik(i)?"":i).text}:{defaultValue:r(Ik(o)?"":o).text})}function Ik(e){return null==e}var Nk=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zk(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jk(e,t){var n=e.inputComponent,r=void 0===n?"input":n,o=e.parse,a=e.format,l=e.value,s=e.defaultValue,c=e.onChange,d=e.controlled,u=e.onKeyDown,f=e.type,h=zk(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach(function(t){Dk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({ref:t,parse:o,format:a,value:l,defaultValue:s,onChange:c,controlled:d,onKeyDown:u,type:void 0===f?"text":f},Zk(e,Nk)));return i.createElement(r,h)}function Rk(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}(jk=i.forwardRef(jk)).propTypes={parse:Yh.func.isRequired,format:Yh.func.isRequired,inputComponent:Yh.elementType,type:Yh.string,value:Yh.string,defaultValue:Yh.string,onChange:Yh.func,controlled:Yh.bool,onKeyDown:Yh.func,onCut:Yh.func,onPaste:Yh.func};var Bk={}.constructor;function Pk(e){return null!=e&&e.constructor===Bk}function Fk(e){return Fk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fk(e)}function Uk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qk(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wk(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wk(e){var t=function(e,t){if("object"!=Fk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Fk(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Fk(t)?t:t+""}var Qk=" ext. ",Gk=/^\d+$/,Kk=function(){return qk(function e(t){Uk(this,e),tH(t),this.metadata=t,oH.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Gk.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Yk(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Yk(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),Yk=function(){return qk(function e(t,n){Uk(this,e),this.globalMetadataObject=n,this.metadata=t,oH.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new Xk(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&eH(this.types(),e))return new $k(eH(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Qk:this.metadata[13]||Qk}}])}(),Xk=function(){return qk(function e(t,n){Uk(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Jk.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Jk=/^\(?\$1\)?$/,$k=function(){return qk(function e(t,n){Uk(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function eH(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function tH(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Pk(e)||!Pk(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Pk(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+nH(e)+": "+e,"."))}var nH=function(e){return Fk(e)};function rH(e,t){if((t=new Kk(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function iH(e,t){return t.countries.hasOwnProperty(e)}function oH(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===Rk(t,"1.2.0")?this.v2=!0:-1===Rk(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function aH(e,t,n){return function(e,t,n,r){t&&(r=new Kk(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,l=o[0];if(l===a)return"IS_POSSIBLE";if(l>a)return"TOO_SHORT";if(o[o.length-1]<a)return"TOO_LONG";return o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function lH(e,t,n){return"IS_POSSIBLE"===aH(e,t,n)}function sH(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function cH(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return dH(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dH(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function dH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var uH=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function fH(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Kk(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(sH(r,n.nationalNumberPattern())){if(hH(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?hH(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=cH(uH);!(i=o()).done;){var a=i.value;if(hH(r,a,n))return a}}}}function hH(e,t,n){var r=n.type(t);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&sH(e,r.pattern()))}function pH(e,t,n){var r=new Kk(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new Kk(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var CH="0-90-9٠-٩۰-۹",mH="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),gH=new RegExp("(["+CH+"])");function vH(e,t,n,r){if(t){var i=new Kk(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(gH);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}function yH(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,l=r.length-1,s=l>0&&r[l];if(t.nationalPrefixTransformRule()&&s)i=e.replace(n,t.nationalPrefixTransformRule()),l>1&&(o=r[1]);else{var c=r[0];i=e.slice(c.length),s&&(o=r[1])}if(s){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}function wH(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bH(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bH(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function bH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EH(e,t){var n=t.countries,r=t.metadata;r=new Kk(r);for(var i,o=wH(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(fH({phone:e,country:a},void 0,r.metadata))return a}}function MH(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:EH(n,{countries:i,metadata:r.metadata})}function AH(e,t,n){var r=yH(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(sH(e,n.nationalNumberPattern())&&!sH(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=MH(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(aH(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function xH(e,t,n,r,i){var o=t||n?rH(t||n,i):r;if(0===e.indexOf(o)){(i=new Kk(i)).selectNumberingPlan(t||n,o);var a=e.slice(o.length),l=AH(a,t,i).nationalNumber,s=AH(e,t,i).nationalNumber;if(!sH(s,i.nationalNumberPattern())&&sH(l,i.nationalNumberPattern())||"TOO_LONG"===aH(s,t,i))return{countryCallingCode:o,number:a}}return{number:e}}function LH(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=vH(e,t||n,r,i);if(!a||a===e){if(t||n||r){var l=xH(e,t,n,r,i),s=l.countryCallingCode,c=l.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:c}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new Kk(i);for(var d=2;d-1<=3&&d<=e.length;){var u=e.slice(1,d);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}function kH(e){return e.replace(new RegExp("[".concat(mH,"]+"),"g")," ").trim()}var HH=/(\$\d)/;function SH(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(HH,t.nationalPrefixFormattingRule()):t.format());return r?kH(o):o}var _H=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var VH=function(e){return"([".concat(CH,"]{1,").concat(e,"})")};function OH(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",i="[ \\t]*";return";ext="+VH("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+VH("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+VH("9")+r)+"|"+("[- ]+"+VH("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+VH("15")+r)+"|"+(i+"(?:,)+"+n+VH("9")+r)}var zH="["+CH+"]{2}",IH="[++]{0,1}(?:["+mH+"]*["+CH+"]){3,}["+mH+CH+"]*",NH=new RegExp("^[++]{0,1}(?:["+mH+"]*["+CH+"]){1,2}$","i"),TH=IH+"(?:"+OH()+")?",DH=new RegExp("^"+zH+"$|^"+TH+"$","i");var ZH={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function jH(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},ZH,n):ZH,r=new Kk(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?BH(i=RH(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=RH(a,null,"INTERNATIONAL",r,n),BH(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var l=function(e,t,n,r,i){var o=rH(r,i.metadata);if(o===n){var a=RH(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var l=function(e,t,n){var r=new Kk(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():_H.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(l)return"".concat(l," ").concat(n," ").concat(RH(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);if(!l)return;return BH(l,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function RH(e,t,n,r,i){var o,a,l=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return sH(a,e.pattern())}));return l?SH(e,l,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!l.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix,carrierCode:t,metadata:r}):e}function BH(e,t,n,r){return t?r(e,t,n):e}function PH(e){return PH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PH(e)}function FH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FH(Object(n),!0).forEach(function(t){qH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qH(e,t,n){return(t=QH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QH(e){var t=function(e,t){if("object"!=PH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=PH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==PH(t)?t:t+""}var GH=function(){return WH(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(Pk(n)&&Pk(n.countries)){r=n;var i=t;if(!YH.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=LH(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");tH(r);var a=function(e,t){var n,r,i=new Kk(t);KH(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),l=a.country,s=a.countryCallingCode;this.country=l,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:pH(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Kk(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return lH(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new Kk(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==fH(e,t,n.metadata):sH(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Kk(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return fH(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return jH(this,e,t?UH(UH({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),KH=function(e){return/^[A-Z]{2}$/.test(e)};var YH=/^\+\d+$/;function XH(e){return XH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XH(e)}function JH(e,t,n){return t=nS(t),function(e,t){if(t&&("object"==XH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,eS()?Reflect.construct(t,n||[],nS(e).constructor):t.apply(e,n))}function $H(e){var t="function"==typeof Map?new Map:void 0;return $H=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(eS())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&tS(i,n.prototype),i}(e,arguments,nS(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tS(n,e)},$H(e)}function eS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eS=function(){return!!e})()}function tS(e,t){return tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tS(e,t)}function nS(e){return nS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nS(e)}var rS=function(){function e(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=JH(this,e,[t]),Object.setPrototypeOf(n,e.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}(e,$H(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}(),iS=new RegExp("(?:"+OH()+")$","i");function oS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return aS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aS(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function aS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lS={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function sS(e){return lS[e]}function cS(e){for(var t,n="",r=oS(e.split(""));!(t=r()).done;){var i=sS(t.value);i&&(n+=i)}return n}function dS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return uS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uS(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function uS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fS(e){for(var t,n="",r=dS(e.split(""));!(t=r()).done;){n+=hS(t.value,n)||""}return n}function hS(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":sS(e)}var pS="(["+CH+"]|[\\-\\.\\(\\)]?)",CS=new RegExp("^\\+"+pS+"*["+CH+"]"+pS+"*$","g"),mS=new RegExp("^("+("["+CH+"]+((\\-)*["+CH+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+CH+"])*")+"\\.?$","g"),gS="tel:",vS=";phone-context=";function yS(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(vS);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(CS.test(e)||mS.test(e))}(i))throw new rS("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(gS);o=a>=0?a+4:0;var l=e.indexOf(vS);n+=e.substring(o,l)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var wS=new RegExp("[++"+CH+"]"),bS=new RegExp("[^"+CH+"#]+$");function ES(e,t,n){if(t=t||{},n=new Kk(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new rS("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=yS(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new rS("TOO_LONG");return}if(!1===t)return e;var r=e.search(wS);if(r<0)return;return e.slice(r).replace(bS,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&DH.test(e)}(r))return function(e){return NH.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(iS);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(iS),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new rS("TOO_SHORT");throw new rS("NOT_A_NUMBER")}return{}}var l=function(e,t,n,r){var i,o=LH(fS(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,l=o.countryCallingCode,s=o.number;if(l)r.selectNumberingPlan(l);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),l=n||rH(t,r.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:l};var c=AH(fS(s),i,r),d=c.nationalNumber,u=c.carrierCode,f=MH(l,{nationalNumber:d,metadata:r});f&&(i=f,"001"===f||r.selectNumberingPlan(i));return{country:i,countryCallingCode:l,countryCallingCodeSource:a,nationalNumber:d,carrierCode:u}}(i,t.defaultCountry,t.defaultCallingCode,n),s=l.country,c=l.nationalNumber,d=l.countryCallingCode,u=l.countryCallingCodeSource,f=l.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new rS("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new rS("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new rS("TOO_LONG");return{}}if(t.v2){var h=new GH(d,c,n.metadata);return s&&(h.country=s),f&&(h.carrierCode=f),o&&(h.ext=o),h.__countryCallingCodeSource=u,h}var p=!!(t.extended?n.hasSelectedNumberingPlan():s)&&sH(c,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:d,carrierCode:f,valid:p,possible:!!p||!(!0!==t.extended||!n.possibleLengths()||!lH(c,s,n)),phone:c,ext:o}:p?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,c,o):{}}function MS(e){return MS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MS(e)}function AS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AS(Object(n),!0).forEach(function(t){LS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=MS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=MS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==MS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kS(e){return kS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kS(e)}function HS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=kS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=kS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return VS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VS(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OS(e){var t,n,r,i=_S(Array.prototype.slice.call(e),4),o=i[0],a=i[1],l=i[2],s=i[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!Pk(a))throw new Error("Invalid second argument: ".concat(a));l?(n=a,r=l):r=a}else s?(n=l,r=s):(n=void 0,r=l),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HS(Object(n),!0).forEach(function(t){SS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function zS(e){return zS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zS(e)}function IS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IS(Object(n),!0).forEach(function(t){TS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=zS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=zS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DS(e,t,n){t&&t.defaultCountry&&!iH(t.defaultCountry,n)&&(t=NS(NS({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return ES(e,xS(xS({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof rS))throw e}}function ZS(e){return ZS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZS(e)}function jS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jS(Object(n),!0).forEach(function(t){BS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ZS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ZS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ZS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PS(){var e=OS(arguments),t=e.text,n=e.options,r=e.metadata,i=DS(t,n=RS(RS({},n),{},{extract:!1}),r);return i&&i.isValid()||!1}function FS(e){return FS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FS(e)}function US(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qS(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qS(e){var t=function(e,t){if("object"!=FS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=FS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==FS(t)?t:t+""}var WS=function(){return US(function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onCountryChange=n,this.onCallingCodeChange=r},[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])}();function QS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return GS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GS(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var KS="x",YS=new RegExp(KS);function XS(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function JS(e,t){return")"===e[t]&&t++,function(e){var t=[],n=0;for(;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,i="";t.push(e.length);for(var o=0,a=t;o<a.length;o++){var l=a[o];i+=e.slice(r,l),r=l+1}return i}(e.slice(0,t))}function $S(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var a=e_(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:r});if(a)return a}return e_(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:o})}function e_(e,t,n){var r=n.metadata,i=n.useNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix,a=SH(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:r});if(i||(e.nationalPrefix?a=e.nationalPrefix+o(t)+a:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(a=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+a)),function(e,t){return cS(e)===t.getNationalDigits()}(a,e))return a}function t_(e){return t_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t_(e)}function n_(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r_(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r_(e){var t=function(e,t){if("object"!=t_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=t_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==t_(t)?t:t+""}var i_=function(){return n_(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([s_(r)])};if(0===r.length)throw new Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(l_);if(t){var n=t[1],r=e.slice(0,t.index),i=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext().branches;o.push(s_(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(s_(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:o_(r)});break;default:throw new Error("Unknown operator: ".concat(n))}i&&this.parsePattern(i)}else{if(a_.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}])}();function o_(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,i=e[n+1].charCodeAt(0)-1,o=r;o<=i;)t.push(String.fromCharCode(o)),o++}else t.push(e[n]);n++}return t}var a_=/[\(\)\[\]\?\:\|]/,l_=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function s_(e){return 1===e.length?e[0]:e}function c_(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d_(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function d_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u_(e){return u_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u_(e)}function f_(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h_(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h_(e){var t=function(e,t){if("object"!=u_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=u_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==u_(t)?t:t+""}var p_=function(){return f_(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchTree=(new i_).parse(t)},[{key:"match",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");var n=C_(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||t)return n}}])}();function C_(e,t,n){if("string"==typeof t){var r=e.join("");return 0===t.indexOf(r)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===r.indexOf(t)?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),o=0;o<t.length;){var a=C_(i,t[o],n&&o===t.length-1);if(!a)return;if(a.overflow)return a;if(!a.match){if(a.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(a,null,2)))}if(0===(i=i.slice(a.matchedChars.length)).length)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};o++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var l,s,c=c_(t.args);!(s=c()).done;){var d=C_(e,s.value,n);if(d){if(d.overflow)return d;if(d.match)return{match:!0,matchedChars:d.matchedChars};if(!d.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(d,null,2)));l=!0}}return l?{partialMatch:!0}:void 0;case"[]":for(var u,f=c_(t.args);!(u=f()).done;){var h=u.value;if(e[0]===h)return 1===e.length?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[h]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function m_(e){return m_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m_(e)}function g_(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v_(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function v_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y_(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w_(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function w_(e){var t=function(e,t){if("object"!=m_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=m_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==m_(t)?t:t+""}var b_=XS("9",15),E_=/[- ]/,M_=new RegExp("["+mH+"]*\\$1["+mH+"]*(\\$\\d["+mH+"]*)*$"),A_=function(){return y_(function e(t){t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=n,this.resetFormat()},[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n=this;if(function(e,t,n){return"IS_POSSIBLE"===aH(e,t,n)}(t.nationalSignificantNumber,t.country,this.metadata))for(var r,i=g_(this.matchingFormats);!(r=i()).done;){var o=r.value,a=$S(t,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(a)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(a.replace(/\d/g,KS),t),this.populatedNationalNumberTemplate=a,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(KS),a}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,i=e.international,o=n,a=o.length-3;a<0&&(a=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,i,r)&&t.formatMatches(e,o,a)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat())&&!(!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var i=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new p_(i).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(i,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n=this,r=function(){var r=t.value;return n.chosenFormat===r?0:M_.test(n.getFormatFormat(r,e.international))?n.createTemplateForFormat(r,e)?(n.chosenFormat=r,0):(n.matchingFormats=n.matchingFormats.filter(function(e){return e!==r}),1):1},i=g_(this.matchingFormats.slice());!(t=i()).done&&0!==r(););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);return n?(this.setNationalNumberTemplate(n,t),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&E_.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(KS,t+1),n++;return JS(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,KS)+XS(KS,t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,i=t.nationalPrefix,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,a=e.pattern();a=a.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var l=b_.match(a)[0];if(!(n.length>l.length)){var s=new RegExp("^"+a+"$"),c=n.replace(/\d/g,"9");s.test(c)&&(l=c);var d,u=this.getFormatFormat(e,r);if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:i})){var f=u.replace(HH,e.nationalPrefixFormattingRule());if(cS(e.nationalPrefixFormattingRule())===(i||"")+cS("$1")&&(u=f,d=!0,i))for(var h=i.length;h>0;)u=u.replace(/\d/,KS),h--}var p=l.replace(new RegExp(a),u).replace(new RegExp("9","g"),KS);return d||(o?p=XS(KS,o.length)+" "+p:i&&(p=XS(KS,i.length)+this.getSeparatorAfterNationalPrefix(e)+p)),r&&(p=kH(p)),p}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,i=QS(n.split(""));!(r=i()).done;){var o=r.value;if(e.slice(t+1).search(YS)<0)return;t=e.search(YS),e=e.replace(YS,o)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],JS(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var i=e.usesNationalPrefix();if(i&&r||!i&&!n)return!0}}}])}();function x_(e){return x_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x_(e)}function L_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H_(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S_(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function S_(e){var t=function(e,t){if("object"!=x_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=x_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==x_(t)?t:t+""}var __=new RegExp("^"+("["+mH+CH+"]+")+"$","i"),V_="(?:[++]["+mH+CH+"]*|["+mH+CH+"]+)",O_=new RegExp("[^"+mH+CH+"]+.*$"),z_=/[^\d\[\]]/,I_=function(){return H_(function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,o=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=o},[{key:"input",value:function(e,t){var n,r=function(e){var t=function(e){var t=function(e){var t,n=e.search(V_);if(n<0)return;e=e.slice(n),"+"===e[0]&&(t=!0,e=e.slice(1));e=e.replace(O_,""),t&&(e="+"+e);return e}(e)||"";if("+"===t[0])return[t.slice(1),!0];return[t]}(e),n=L_(t,2),r=n[0],i=n[1];__.test(r)||(r="");return[r,i]}(e),i=L_(r,2),o=i[0],a=i[1],l=cS(o);return a&&(t.digits||(t.startInternationalNumber(void 0,void 0),l||(n=!0))),l&&this.inputDigits(l,t),{digits:l,justLeadingPlus:n}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=LH("+"+e.getDigitsWithoutInternationalPrefix(),e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&z_.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=yH(e,this.metadata),r=n.nationalPrefix,i=n.nationalNumber,o=n.carrierCode;if(i!==e)return this.onExtractedNationalNumber(r,o,i,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=yH(e,this.metadata),i=r.nationalPrefix,o=r.nationalNumber,a=r.carrierCode;if(o!==t)return this.onExtractedNationalNumber(i,a,o,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,i){var o,a=!1,l=r.lastIndexOf(n);if(l<0||l!==r.length-n.length)a=!0;else{var s=r.slice(0,l);s&&s!==e&&(o=s)}i({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberIsModified:a,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,function(t){return e.update(t)})||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var i=vH(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==i&&i!==r?(e.update({IDDPrefix:r.slice(0,r.length-i.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=xH(e.digits,e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(t)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:t}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}}])}();function N_(e){return N_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N_(e)}function T_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z_(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j_(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j_(e){var t=function(e,t){if("object"!=N_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=N_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==N_(t)?t:t+""}var R_=function(){return Z_(function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new Kk(n);var r=T_(this.getCountryAndCallingCode(t),2),i=r[0],o=r[1];this.defaultCountry=i,this.defaultCallingCode=o,this.reset()},[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(Pk(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){var r;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var i=this.state.getNationalDigits();i&&(r=this.formatter.format(i,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new WS({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new A_({state:this.state,metadata:this.metadata}),this.parser=new I_({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,r=e.nationalPrefix,i=t,o=n||r;return o&&(i=o+i),i}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(e?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,KS)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(MH(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,i=e.nationalSignificantNumber;if(t)return this.isInternational()?n?"+"+n+i:"+"+t:r||n?"+"+(r?this.metadata.countryCallingCode():n)+i:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,i=this._getCountry();if(t&&(i||r)){if(i&&i===this.defaultCountry){var o=new Kk(this.metadata.metadata);o.selectNumberingPlan(i);var a=o.numberingPlan.callingCode(),l=this.metadata.getCountryCodesForCallingCode(a);if(l.length>1){var s=EH(t,{countries:l,metadata:this.metadata.metadata});s&&(i=s)}}var c=new GH(i||r,t,this.metadata.metadata);return n&&(c.carrierCode=n),c}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])}();function B_(e){return new Kk(e).getCountries()}function P_(e){var t=e.inputFormat,n=e.country,r=e.metadata;return"NATIONAL_PART_OF_INTERNATIONAL"===t?"+".concat(rH(n,r)):""}function F_(e,t){return t&&" "===(e=e.slice(t.length))[0]&&(e=e.slice(1)),e}function U_(e,t,n){if(!n||!n.ignoreRest){return hS(e,t,function(e){if(n&&"end"===e)n.ignoreRest=!0})}}function q_(e){var t=e.onKeyDown,n=e.inputFormat;return p(function(e){e.keyCode===W_&&"INTERNATIONAL"===n&&e.target instanceof HTMLInputElement&&e.target.selectionStart===Q_.length?e.preventDefault():t&&t(e)},[t,n])}var W_=8,Q_="+",G_=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function K_(){return K_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K_.apply(this,arguments)}function Y_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var X_=function(e){function t(t,n){var r=t.onKeyDown,o=t.country,a=t.inputFormat,l=t.metadata,s=void 0===l?e:l;t.international,t.withCountryCallingCode;var c=Y_(t,G_),d=p(function(e){var t=new R_(o,s),n=P_({inputFormat:a,country:o,metadata:s}),r=t.input(n+e),i=t.getTemplate();return n&&(r=F_(r,n),i&&(i=F_(i,n))),{text:r,template:i}},[o,s]),u=q_({onKeyDown:r,inputFormat:a});return i.createElement(jk,K_({},c,{ref:n,parse:U_,format:d,onKeyDown:u}))}return(t=i.forwardRef(t)).propTypes={value:Yh.string.isRequired,onChange:Yh.func.isRequired,onKeyDown:Yh.func,country:Yh.string,inputFormat:Yh.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Yh.object},t}(),J_=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function $_(){return $_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$_.apply(this,arguments)}function eV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tV=function(e){function t(t,n){var r=t.value,o=t.onChange,a=t.onKeyDown,l=t.country,s=t.inputFormat,c=t.metadata,d=void 0===c?e:c,u=t.inputComponent,f=void 0===u?"input":u;t.international,t.withCountryCallingCode;var h=eV(t,J_),C=P_({inputFormat:s,country:l,metadata:d}),m=p(function(e){var t=fS(e.target.value);t===r&&(0===nV(C,t,l,d).indexOf(e.target.value)&&(t=t.slice(0,-1)));o(t)},[C,r,o,l,d]),g=q_({onKeyDown:a,inputFormat:s});return i.createElement(f,$_({},h,{ref:n,value:nV(C,r,l,d),onChange:m,onKeyDown:g}))}return(t=i.forwardRef(t)).propTypes={value:Yh.string.isRequired,onChange:Yh.func.isRequired,onKeyDown:Yh.func,country:Yh.string,inputFormat:Yh.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Yh.object,inputComponent:Yh.elementType},t}();function nV(e,t,n,r){return F_(function(e,t,n){return n||(n=t,t=void 0),new R_(t,n).input(e)}(e+t,n,r),e)}function rV(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var iV=["value","onChange","options","disabled","readOnly"],oV=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function aV(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return lV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lV(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function lV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sV(){return sV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sV.apply(this,arguments)}function cV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dV(e){var t=e.value,n=e.onChange,r=e.options,o=e.disabled,a=e.readOnly,l=cV(e,iV),s=p(function(e){var t=e.target.value;n("ZZ"===t?void 0:t)},[n]);return h(function(){return pV(r,t)},[r,t]),i.createElement("select",sV({},l,{disabled:o||a,readOnly:a,value:t||"ZZ",onChange:s}),r.map(function(e){var t=e.value,n=e.label,r=e.divider;return i.createElement("option",{key:r?"|":t||"ZZ",value:r?"|":t||"ZZ",disabled:!!r,style:r?uV:void 0},n)}))}dV.propTypes={value:Yh.string,onChange:Yh.func.isRequired,options:Yh.arrayOf(Yh.shape({value:Yh.string,label:Yh.string,divider:Yh.bool})).isRequired,disabled:Yh.bool,readOnly:Yh.bool};var uV={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function fV(e){var t=e.value,n=e.options,r=e.className,o=e.iconComponent;e.getIconAspectRatio;var a,l=e.arrowComponent,s=void 0===l?hV:l,c=e.unicodeFlags,d=cV(e,oV),u=h(function(){return pV(n,t)},[n,t]);return i.createElement("div",{className:"PhoneInputCountry"},i.createElement(dV,sV({},d,{value:t,options:n,className:I("PhoneInputCountrySelect",r)})),u&&(c&&t?i.createElement("div",{className:"PhoneInputCountryIconUnicode"},rV((a=t)[0])+rV(a[1])):i.createElement(o,{"aria-hidden":!0,country:t,label:u.label,aspectRatio:c?1:void 0})),i.createElement(s,null))}function hV(){return i.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function pV(e,t){for(var n,r=aV(e);!(n=r()).done;){var i=n.value;if(!i.divider&&CV(i.value,t))return i}}function CV(e,t){return null==e?null==t:e===t}fV.propTypes={iconComponent:Yh.elementType,arrowComponent:Yh.elementType,unicodeFlags:Yh.bool};var mV=["country","countryName","flags","flagUrl"];function gV(){return gV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gV.apply(this,arguments)}function vV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yV(e){var t=e.country,n=e.countryName,r=e.flags,o=e.flagUrl,a=vV(e,mV);return r&&r[t]?r[t]({title:n}):i.createElement("img",gV({},a,{alt:n,role:n?void 0:"presentation",src:o.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}yV.propTypes={country:Yh.string.isRequired,countryName:Yh.string.isRequired,flags:Yh.objectOf(Yh.elementType),flagUrl:Yh.string.isRequired};var wV=["aspectRatio"],bV=["title"],EV=["title"];function MV(){return MV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MV.apply(this,arguments)}function AV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xV(e){var t=e.aspectRatio,n=AV(e,wV);return 1===t?i.createElement(kV,n):i.createElement(LV,n)}function LV(e){var t=e.title,n=AV(e,bV);return i.createElement("svg",MV({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),i.createElement("title",null,t),i.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},i.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),i.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),i.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),i.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),i.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),i.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),i.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}function kV(e){var t=e.title,n=AV(e,EV);return i.createElement("svg",MV({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),i.createElement("title",null,t),i.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},i.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),i.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),i.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),i.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),i.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),i.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),i.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}function HV(e){(function(e){if(e.length<2)return!1;if("+"!==e[0])return!1;for(var t=1;t<e.length;){var n=e.charCodeAt(t);if(!(n>=48&&n<=57))return!1;t++}return!0})(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function SV(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _V(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function _V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VV(e,t){return!!iH(e,t)||(console.error("Country not found: ".concat(e)),!1)}function OV(e,t){return e&&0===(e=e.filter(function(e){return VV(e,t)})).length&&(e=void 0),e}xV.propTypes={title:Yh.string.isRequired,aspectRatio:Yh.number},LV.propTypes={title:Yh.string.isRequired},kV.propTypes={title:Yh.string.isRequired};var zV=["country","label","aspectRatio"];function IV(){return IV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IV.apply(this,arguments)}function NV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TV(e){var t=e.flags,n=e.flagUrl,r=e.flagComponent,o=e.internationalIcon;function a(e){var a=e.country,l=e.label,s=e.aspectRatio,c=NV(e,zV),d=o===xV?s:void 0;return i.createElement("div",IV({},c,{className:I("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":1===d,"PhoneInputCountryIcon--border":a})}),a?i.createElement(r,{country:a,countryName:l,flags:t,flagUrl:n,className:"PhoneInputCountryIconImg"}):i.createElement(o,{title:l,aspectRatio:d,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:Yh.string,label:Yh.string.isRequired,aspectRatio:Yh.number},a}function DV(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ZV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZV(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[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.")}function ZV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jV(e,t){"function"==typeof e?e(t):e.current=t}TV({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:yV,internationalIcon:xV});var RV=Yh.shape({country_calling_codes:Yh.object.isRequired,countries:Yh.object.isRequired}),BV=Yh.objectOf(Yh.string);function PV(e,t){return"+"+rH(e,t)}function FV(e,t){return function(){var e=OS(arguments);return DS(e.text,e.options,e.metadata)}(e||"",t)}function UV(e,t){var n=t.prevCountry,r=t.newCountry,i=t.metadata,o=t.useNationalFormat;if(n===r)return e;if(!e)return o?"":r?PV(r,i):"";if(r){if("+"===e[0]){if(o)return 0===e.indexOf("+"+rH(r,i))?function(e,t,n){if(t){var r="+"+rH(t,n);if(e.length<r.length){if(0===r.indexOf(e))return""}else if(0===e.indexOf(r))return e.slice(r.length)}for(var i=0,o=Object.keys(n.country_calling_codes);i<o.length;i++){var a=o[i];if(1===e.indexOf(a))return e.slice(1+a.length)}return""}(e,r,i):"";if(n){var a=PV(r,i);return 0===e.indexOf(a)?e:a}var l=PV(r,i);return 0===e.indexOf(l)?e:l}}else if("+"!==e[0])return qV(e,n,i)||"";return e}function qV(e,t,n){if(e){if("+"===e[0]){if("+"===e)return;var r=new R_(t,n);return r.input(e),r.getNumberValue()}if(t){var i=YV(e,t,n);return"+".concat(rH(t,n)).concat(i||"")}}}function WV(e,t,n){var r=YV(e,t,n);if(r){var i=r.length-function(e,t){return t=new Kk(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}(t,n);if(i>0)return e.slice(0,e.length-i)}return e}function QV(e,t){var n=t.country,r=t.countries,i=t.defaultCountry,o=t.latestCountrySelectedByUser,a=t.required,l=t.metadata;if("+"===e)return n;var s=function(e,t){var n=new R_(null,t);return n.input(e),n.getCountry()}(e,l);if(s)return!r||r.indexOf(s)>=0?s:void 0;if(n)if(XV(e,n,l)){if(o&&XV(e,o,l))return o;if(i&&XV(e,i,l))return i;if(!a)return}else if(!a)return;return n}function GV(e,t,n){if(0===e.indexOf(PV(t,n))){var r=new R_(t,n);r.input(e);var i=r.getNumber();return i?i.formatNational().replace(/\D/g,""):""}return e.replace(/\D/g,"")}function KV(e,t,n){return String.prototype.localeCompare?e.localeCompare(t,n):e<t?-1:e>t?1:0}function YV(e,t,n){var r=new R_(t,n);r.input(e);var i=r.getNumber();return i&&i.nationalNumber}function XV(e,t,n){for(var r=PV(t,n),i=0;i<e.length&&i<r.length;){if(e[i]!==r[i])return!1;i++}return!0}function JV(e){var t=e.value,n=e.phoneNumber,r=e.defaultCountry,i=e.international,o=e.useNationalFormat,a=e.metadata;return(!1===i||o)&&n&&n.country?function(e){return e.formatNational().replace(/\D/g,"")}(n):!t&&i&&r?PV(r,a):t}function $V(e){return $V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$V(e)}function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(t){nO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nO(e,t,n){return t=function(e){var t=function(e,t){if("object"!=$V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$V(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rO(e,t){return null===e&&(e=void 0),null===t&&(t=void 0),e===t}var iO=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function oO(e){return oO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oO(e)}function aO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aO(Object(n),!0).forEach(function(t){CO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sO(){return sO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sO.apply(this,arguments)}function cO(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mO(r.key),r)}}function uO(e,t,n){return t=hO(t),function(e,t){if(t&&("object"===oO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fO()?Reflect.construct(t,n||[],hO(e).constructor):t.apply(e,n))}function fO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fO=function(){return!!e})()}function hO(e){return hO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hO(e)}function pO(e,t){return pO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pO(e,t)}function CO(e,t,n){return(t=mO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mO(e){var t=function(e,t){if("object"!=oO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=oO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oO(t)?t:t+""}var gO=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),CO(n=uO(this,e,[t]),"setInputRef",function(e){!function(e,t){for(var n,r=DV(e);!(n=r()).done;){var i=n.value;i&&jV(i,t)}}([n.props.inputRef,n.inputRef],e)}),CO(n,"isCountrySupportedWithError",function(e){return VV(e,n.props.metadata)}),CO(n,"onCountryChange",function(e){var t=n.props,r=t.international,i=t.metadata,o=t.onChange,a=t.focusInputOnCountrySelection,l=n.state,s=UV(l.phoneDigits,{prevCountry:l.country,newCountry:e,metadata:i,useNationalFormat:!r}),c=qV(s,e,i);a&&n.inputRef.current.focus(),n.setState({country:e,latestCountrySelectedByUser:e,hasUserSelectedACountry:!0,phoneDigits:s,value:c},function(){o(c)})}),CO(n,"onChange",function(e){var t=n.props,r=t.defaultCountry,i=t.onChange,o=t.addInternationalOption,a=t.international,l=t.limitMaxLength,s=t.countryCallingCodeEditable,c=t.metadata,d=n.state,u=d.countries,f=d.phoneDigits,h=d.country,p=d.latestCountrySelectedByUser,C=function(e,t){var n,r=t.prevPhoneDigits,i=t.country,o=t.defaultCountry,a=t.latestCountrySelectedByUser,l=t.countryRequired,s=t.getAnyCountry,c=t.countries,d=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,h=t.metadata;if(d&&!1===f&&i){var p,C=PV(i,h);if(0!==e.indexOf(C))return e&&"+"!==e[0]?p=qV(e=C+e,i,h):e=C,{phoneDigits:e,value:p,country:i}}return!1===d&&i&&e&&"+"===e[0]&&(e=GV(e,i,h)),e&&i&&u&&(e=WV(e,i,h)),!e||"+"===e[0]||i&&!d||(e="+"+e),!e&&r&&"+"===r[0]&&(i=d?void 0:o),"+"===e&&r&&"+"===r[0]&&r.length>1&&(i=void 0),e&&(n="+"===e[0]&&("+"===e||i&&0===PV(i,h).indexOf(e))?void 0:qV(e,i,h)),n&&(i=QV(n,{country:i,countries:c,defaultCountry:o,latestCountrySelectedByUser:a,required:!1,metadata:h}),!1===d&&i&&e&&"+"===e[0]&&(n=qV(e=GV(e,i,h),i,h))),!i&&l&&(i=o||s()),{phoneDigits:e,country:i,value:n}}(e,{prevPhoneDigits:f,country:h,countryRequired:!o,defaultCountry:r,latestCountrySelectedByUser:p,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:u})},countries:u,international:a,limitMaxLength:l,countryCallingCodeEditable:s,metadata:c}),m=C.phoneDigits,g=C.country,v=C.value,y={phoneDigits:m,value:v,country:g};p&&v&&!XV(v,p,c)&&(y.latestCountrySelectedByUser=void 0),!1===s&&(v||m!==n.state.phoneDigits||(y.forceRerender={})),n.setState(y,function(){return i(v)})}),CO(n,"_onFocus",function(){return n.setState({isFocused:!0})}),CO(n,"_onBlur",function(){return n.setState({isFocused:!1})}),CO(n,"onFocus",function(e){n._onFocus();var t=n.props.onFocus;t&&t(e)}),CO(n,"onBlur",function(e){var t=n.props.onBlur;n._onBlur(),t&&t(e)}),CO(n,"onCountryFocus",function(e){n._onFocus();var t=n.props.countrySelectProps;if(t){var r=t.onFocus;r&&r(e)}}),CO(n,"onCountryBlur",function(e){n._onBlur();var t=n.props.countrySelectProps;if(t){var r=t.onBlur;r&&r(e)}}),n.inputRef=i.createRef();var r=n.props,o=r.value;r.labels;var a=r.international,l=r.addInternationalOption,s=r.displayInitialValueAsLocalNumber,c=r.initialValueFormat,d=r.metadata,u=n.props,f=u.defaultCountry,h=u.countries;f&&(n.isCountrySupportedWithError(f)||(f=void 0)),o&&HV(o),h=OV(h,d);var p=FV(o,d);n.CountryIcon=TV(n.props);var C=function(e){var t,n=e.value,r=e.phoneNumber,i=e.defaultCountry,o=e.getAnyCountry,a=e.countries,l=e.required,s=e.metadata;return r&&r.country?t=r.country:i&&(n&&!XV(n,i,s)||(t=i)),a&&a.indexOf(t)<0&&(t=void 0),!t&&l&&a&&a.length>0&&(t=o()),t}({value:o,phoneNumber:p,defaultCountry:f,required:!l,countries:h||B_(d),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:h})},metadata:d});return n.state={props:n.props,country:C,countries:h,phoneDigits:JV({value:o,phoneNumber:p,defaultCountry:f,international:a,useNationalFormat:s||"national"===c,metadata:d}),value:o},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pO(e,t)}(e,i.PureComponent),t=e,n=[{key:"componentDidMount",value:function(){var e=this.props.onCountryChange,t=this.props.defaultCountry,n=this.state.country;e&&(t&&(this.isCountrySupportedWithError(t)||(t=void 0)),n!==t&&e(n))}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.onCountryChange,r=this.state.country;n&&r!==t.country&&n(r)}},{key:"getCountrySelectOptions",value:function(e){var t=e.countries,n=this.props,r=n.international,i=n.countryCallingCodeEditable,o=n.countryOptionsOrder,a=n.addInternationalOption,l=n.labels,s=n.locales,c=n.metadata;return this.useMemoCountrySelectOptions(function(){return function(e,t){if(!t)return e;for(var n,r=[],i=[],o=r,a=function(){var t=n.value;if("|"===t)o.push({divider:!0});else if("..."===t||"…"===t)o=i;else{var r;r="🌐"===t?void 0:t;var a=e.indexOf(e.filter(function(e){return e.value===r})[0]),l=e[a];e.splice(a,1),o.push(l)}},l=SV(t);!(n=l()).done;)a();return r.concat(e).concat(i)}(function(e){var t=e.countries,n=e.countryNames,r=e.addInternationalOption,i=e.compareStringsLocales,o=e.compareStrings;o||(o=KV);var a=t.map(function(e){return{value:e,label:n[e]||e}});return a.sort(function(e,t){return o(e.label,t.label,i)}),r&&a.unshift({label:n.ZZ}),a}({countries:t||B_(c),countryNames:l,addInternationalOption:(!r||!1!==i)&&a,compareStringsLocales:s}),function(e,t){if(e&&(e=e.filter(function(e){switch(e){case"🌐":case"|":case"...":case"…":return!0;default:return VV(e,t)}})).length>0)return e}(o,c))},[t,o,a,l,c])}},{key:"useMemoCountrySelectOptions",value:function(e,t){return this.countrySelectOptionsMemoDependencies&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;){if(e[n]!==t[n])return!1;n++}return!0}(t,this.countrySelectOptionsMemoDependencies)||(this.countrySelectOptionsMemo=e(),this.countrySelectOptionsMemoDependencies=t),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(e){var t=e.countries;return this.getCountrySelectOptions({countries:t})[0].value}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.disabled,r=e.readOnly,o=e.autoComplete,a=e.style,l=e.className;e.inputRef;var s=e.inputComponent,c=e.numberInputProps,d=e.smartCaret,u=e.countrySelectComponent,f=e.countrySelectProps,h=e.containerComponent,p=e.containerComponentProps;e.defaultCountry,e.countries,e.countryOptionsOrder;var C=e.labels;e.flags,e.flagComponent,e.flagUrl,e.addInternationalOption,e.internationalIcon,e.displayInitialValueAsLocalNumber,e.initialValueFormat,e.onCountryChange,e.limitMaxLength,e.countryCallingCodeEditable,e.focusInputOnCountrySelection,e.reset;var m=e.metadata,g=e.international;e.locales;var v=cO(e,iO),y=this.state,w=y.country,b=y.countries,E=y.phoneDigits,M=y.isFocused,A=d?X_:tV,x=this.getCountrySelectOptions({countries:b});return i.createElement(h,sO({style:a,className:I(l,"PhoneInput",{"PhoneInput--focus":M,"PhoneInput--disabled":n,"PhoneInput--readOnly":r})},p),i.createElement(u,sO({name:t?"".concat(t,"Country"):void 0,"aria-label":C.country},f,{value:w,options:x,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:n||f&&f.disabled,readOnly:r||f&&f.readOnly,iconComponent:this.CountryIcon})),i.createElement(A,sO({ref:this.setInputRef,type:"tel",autoComplete:o},c,v,{inputFormat:!0===g?"INTERNATIONAL":!1===g?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:!!g||void 0,withCountryCallingCode:!!g||void 0,name:t,metadata:m,country:w,value:E||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:n,readOnly:r,inputComponent:s,className:I("PhoneInputInput",c&&c.className,v.className)})))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return lO({props:e},function(e,t,n){var r=e.metadata,i=e.countries,o=e.defaultCountry,a=e.value,l=e.reset,s=e.international,c=e.displayInitialValueAsLocalNumber,d=e.initialValueFormat,u=t.defaultCountry,f=t.value,h=t.reset;n.country;var p=n.value,C=n.hasUserSelectedACountry,m=n.latestCountrySelectedByUser,g=function(e){return JV(tO(tO({},e),{},{international:s,useNationalFormat:c||"national"===d,metadata:r}))};if(l!==h)return{phoneDigits:g({value:void 0,defaultCountry:o}),value:void 0,country:o,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(o!==u){var v=!o||VV(o,r),y=!p||s&&p===g({value:void 0,defaultCountry:u});if(!C&&v&&!a&&y)return{country:o,phoneDigits:g({value:void 0,defaultCountry:o}),value:void 0}}if(!rO(a,f)&&!rO(a,p)){var w,b,E;if(a){a&&HV(a),w=FV(a,r);var M=OV(i,r);w&&w.country?(!M||M.indexOf(w.country)>=0)&&(b=w.country):(b=QV(a,{country:void 0,countries:M,metadata:r}))||o&&0===a.indexOf(PV(o,r))&&(b=o)}return a?m&&((b?m===b:XV(a,m,r))?b||(b=m):E={latestCountrySelectedByUser:void 0}):E={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},tO(tO({},E),{},{phoneDigits:g({phoneNumber:w,value:a,defaultCountry:o}),value:a,country:a?b:o})}}(e,t.props,t))}}],n&&dO(t.prototype,n),r&&dO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),vO=i.forwardRef(function(e,t){return i.createElement(gO,sO({},function(e){for(var t in e=lO({},e),yO)void 0===e[t]&&(e[t]=yO[t]);return e}(e),{inputRef:t}))});vO.propTypes={value:Yh.string,onChange:Yh.func.isRequired,onFocus:Yh.func,onBlur:Yh.func,disabled:Yh.bool,readOnly:Yh.bool,autoComplete:Yh.string,initialValueFormat:Yh.oneOf(["national"]),displayInitialValueAsLocalNumber:Yh.bool,defaultCountry:Yh.string,countries:Yh.arrayOf(Yh.string),labels:BV,locales:Yh.oneOfType([Yh.string,Yh.arrayOf(Yh.string)]),flagUrl:Yh.string,flags:Yh.objectOf(Yh.elementType),flagComponent:Yh.elementType,addInternationalOption:Yh.bool,internationalIcon:Yh.elementType,countryOptionsOrder:Yh.arrayOf(Yh.string),style:Yh.object,className:Yh.string,countrySelectComponent:Yh.elementType,countrySelectProps:Yh.object,inputComponent:Yh.elementType,numberInputProps:Yh.object,containerComponent:Yh.elementType,containerComponentProps:Yh.object,smartCaret:Yh.bool,international:Yh.bool,limitMaxLength:Yh.bool,countryCallingCodeEditable:Yh.bool,metadata:RV,onCountryChange:Yh.func,focusInputOnCountrySelection:Yh.bool};var yO={autoComplete:"tel",countrySelectComponent:fV,flagComponent:yV,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:xV,inputComponent:"input",containerComponent:"div",reset:Yh.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};var wO={ext:"ext.",country:"Phone number country",phone:"Phone",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XA:"Abkhazia",XK:"Kosovo",XO:"South Ossetia",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"},bO=["metadata","labels"];function EO(){return EO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EO.apply(this,arguments)}function MO(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AO(e){var t=i.forwardRef(function(t,n){var r=t.metadata,o=void 0===r?e:r,a=t.labels,l=void 0===a?wO:a,s=MO(t,bO);return i.createElement(vO,EO({},s,{ref:n,metadata:o,labels:l}))});return t.propTypes={metadata:RV,labels:BV},t}function xO(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(Ck),e.apply(this,n)}(PS,arguments)}AO(),AO(Ck);const LO=({country:t,value:r,onChange:i,width:o="100%",placeholder:a="Enter phone number",onFocus:s,onBlur:d,id:u,dropdownStyle:f={},enableAreaCodeStretch:h=!1,disabled:p=!1,isValid:C=!0,isVerified:m=!1,isVerifyDisplay:g=!1,onVerifyClick:v=()=>{},onValidationChange:y=()=>{}})=>{const[w,b]=c(r),[E,M]=c(!1),[A,x]=c(C),[L,k]=c(t);l(()=>{if(r){let e=r;e.startsWith("+")||(e=`+${e}`),b(e)}},[r]);const H=e=>{const t=xO(e),n=!!e&&e.replace(/[^\d]/g,"").length<=3,r=t||n;x(r),y(r)};return n("div",{id:u,children:[e(pk,{specialLabel:"",countryCodeEditable:!1,country:t,value:w,onChange:(e,t)=>{const n=t?.countryCode?.toLowerCase(),r=e.replace(/[^0-9+]/g,"");if(L?.toLowerCase()!==n)return b(t?.dialCode),i(t?.dialCode),k(n),void x(!0);let o=r;o.startsWith("+")||(o=`+${o}`),b(o),i(o),H(o)},inputStyle:{width:o,height:"32px",border:E?"1px solid var(--brand-color)":A?"1px solid var(--default-color)":"1px solid var(--error_light)",borderRadius:"4px",fontSize:"14px",transition:"border-color 0.3s ease"},enableSearch:!0,placeholder:a,onFocus:e=>{M(!0),s&&s(e)},onBlur:e=>{M(!1),d&&d(e),H(w)},dropdownStyle:f,enableAreaCodeStretch:h,disabled:p}),!A&&!E&&e(U,{color:"var(--error_light)",className:"error",fontSize:10,children:"Invalid phone number format"}),m?e(U,{color:"var(--phone-number-verified-color)",children:"Verified"}):xO(w)&&g&&!m&&e(U,{color:"var(--brand-color)",className:"cursor_pointer",onClick:v,children:"Verify"})]})},kO=(e,t,n)=>{const r=[...e],i=r[t];let o;o=r[n+1]?r[n-1]?n>t?(r[n].executionOrder+r[n+1].executionOrder)/2:(r[n].executionOrder+r[n-1].executionOrder)/2:r[n].executionOrder/2:r[n].executionOrder+1;const a={...i,executionOrder:o,...i._id?{id:i._id}:{}};return r.splice(t,1),r.splice(n,0,a),r},HO=(e,t)=>{if(!e)return"";const n=new Date(e),r=n.getDate().toString().padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n.getMonth()],o=n.getFullYear(),a=(n.getMonth()+1).toString().padStart(2,"0");switch(t){case"dd MMM yyyy":default:return`${r} ${i} ${o}`;case"MMM dd yyyy":return`${i} ${r} ${o}`;case"yyyy dd MM":return`${o} ${r} ${a}`}},SO=e=>{const t={};return e.forEach((e,n)=>{t[n]?t[n]=Array.isArray(t[n])?[...t[n],e]:[t[n],e]:t[n]=e}),t},_O=(e,t,n,r)=>{let i,o=[];const a=()=>{if(r){const e=((e,t)=>e.findIndex(e=>e.key===t))(t,r);if(-1===e)throw new Error(`Key "${r}" not found in oldData.`);return e}return 0},l=[...n];switch(e){case"above":o=[...l,...t];break;case"below":o=[...t,...l];break;case"expand":case"expandAll":case"collapseAll":case"collapse":{const n=a();if(void 0===n)throw new Error("Both sourceId and index are required for 'expand' or 'collapse' actions.");0!==n||["above","below"].includes(e)||K(l)||!l[0]||(l[0]={...l[0],lastResource:!0}),o=[...t.slice(0,n),...l];break}case"addAbove":{const e=a();if(void 0===e)throw new Error("Both sourceId and index are required for 'addAbove' action.");o=[...t.slice(0,e),...l,...t.slice(e)];break}case"addBelow":{const e=a();if(void 0===e)throw new Error("Both sourceId and index are required for 'addBelow' action.");o=[...t.slice(0,e+1),...l,...t.slice(e+1)];break}case"start":case"show":case"hide":case"clone":case"create":case"refresh":case"delete":if(K(l))throw new Error("Tree data list is empty, cannot determine root.");{i=l[0];const n=l.slice(1),a=new Map(t.map(e=>[e.key,e])),s=new Map(n.map(e=>[e.key,e]));let c=[];const d=new Set,u=new Set;for(const e of n){if(a.has(e.key))break;c.push(e),d.add(e.key)}for(const e of t)if(!d.has(e.key))if(s.has(e.key)){for(let t=l.findIndex(t=>t.key===e.key);t<l.length;t++){const e=l[t];if(!e)break;if(d.has(e.key))break;c.push({...e}),d.add(e.key)}}else{const t=e.parentId&&s.has(e.parentId),n=e.parentId&&u.has(e.parentId);t||n?u.add(e.key):(c.push(e),d.add(e.key))}r&&"delete"===e&&(c=c.filter(e=>e.key!==r)),o=c}break;default:throw new Error(`Invalid action: ${e}`)}if(K(o)&&!["start","delete","hide","refresh"].includes(e))throw new Error("Tree data list is empty.");const s=o[0]||i,c=o[o.length-1]||{lastResource:!0,key:""};return{treeDataList:o,next:!c?.lastResource,previous:!s?.lastResource,startId:s?.key,endId:c?.key,root:i}},VO=(e,t)=>{const n=t.searchKey?.split("/")||[];return K(n)?e:e.map(e=>n.includes(e.key)?{...e,state:t.state}:e)},OO=e=>{l(()=>{const t=t=>{e&&t.preventDefault()};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e])},zO=(e,t,n,r)=>{if(!t)throw new Error("Key is required");const i=new Map,o=new Map,a=new Set;let l=[...e];n&&!K(n)&&(l=[n,...e]),l.forEach(e=>{i.set(e.key,e),e.parentId&&(o.has(e.parentId)||o.set(e.parentId,[]),o.get(e.parentId).push(e))});const s=i.get(t);return s&&(s.selectedStatus=r?"completely":"none",function e(t,n){if(a.has(t))throw new Error(`Cycle detected at node: ${t}`);a.add(t),(o.get(t)||[]).forEach(t=>{t.selectedStatus=n,e(t.key,n)}),a.delete(t)}(t,s.selectedStatus),function e(t){if(a.has(t))throw new Error(`Cycle detected at node: ${t}`);a.add(t);const n=i.get(t);if(n&&n.parentId){const t=i.get(n.parentId);t&&(t.selectedStatus=function(e){const t=i.get(e);if(!t)return"none";const n=(t.resourceCount??0)+(t.subContainerCount??0)+(t.conditionCount??0);if(0===n)return t.selectedStatus??"none";const r=o.get(e)||[];let a=0,l=!1;for(const e of r)"completely"===e.selectedStatus?a++:"partially"===e.selectedStatus&&(l=!0);return a===n?"completely":l||a>0?"partially":"none"}(t.key),e(t.key))}a.delete(t)}(t)),K(n)?{data:l}:{rootNode:l[0],data:l.slice(1)}};function IO(e,t){const n=t?new Map(t.map(e=>[e.key,e])):null;return e.map(e=>{const t=n?.get(e.key);return{...e,...t||{},selectedStatus:"none"}})}const NO=(e,t,n,r,i=!1)=>{if(!t)throw new Error("Key is required");const o=new Map,a=new Map,l=new Set;let s=[...e];n&&!K(n)&&(s=[n,...e]),s.forEach(e=>{o.set(e.key,e),e.parentId&&(a.has(e.parentId)||a.set(e.parentId,[]),a.get(e.parentId).push(e))});const c=o.get(t);if(c)if(c.expanded=r,r){(a.get(t)||[]).forEach(e=>e.hide=!!i)}else c.expandedAll=!1,function e(t,n){if(l.has(t))throw new Error(`Cycle detected at node: ${t}`);l.add(t),(a.get(t)||[]).forEach(t=>{t.hide=n,t.expanded=!1,e(t.key,!0)}),l.delete(t)}(t,!0);return K(n)?{data:s}:{rootNode:s[0],data:s.slice(1)}},TO=e=>`${e.getDate().toString().padStart(2,"0")}/${(e.getMonth()+1).toString().padStart(2,"0")}/${e.getFullYear()}`,DO=(e,t,n)=>{
|
|
42
42
|
//!Note : This function is used to override the stepId because in some step Groups we are using the same stepId for multiple steps. So we need to override the stepId for the new steps.
|
|
43
|
-
let r=n?.map(e=>({...e,stepId:Qt()}));const i=new Set(["group","pre","post","script"]);return e.map(e=>{const n=i.has(e?.entityType?.toLowerCase())||i.has(e?.type?.toLowerCase());return e.stepId===t&&n?{...e,data:[...r||[]]}:e.data?{...e,data:DO(e.data,t,r)}:e})},ZO=(e,t,n,r)=>e.map(e=>e.title===t?{...e,data:DO(e.data,n,r)}:e),jO=e=>{let t;if(e.includes("T"))t=new Date(e);else{const[n,r]=e.split(" ");if(!n||!r)throw new Error("Invalid input format. Expected 'DD-MM-YYYY HH:mm'");const[i,o,a]=n.split("-"),[l,s]=r.split(":");t=new Date(parseInt(a||"",10),parseInt(o||"",10)-1,parseInt(i||"",10),parseInt(l||"",10),parseInt(s||"",10))}const n=`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}`,r=`${("0"+t.getHours()).slice(-2)}:${("0"+t.getMinutes()).slice(-2)}:00`;return new Date(`${n}T${r}`)},RO=e=>{const t=new Date;return new Intl.DateTimeFormat("en-US",{timeZone:e,weekday:"long",year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).format(t)},BO=({data:r,level:i=0,columnCount:o=1,viewModeId:a,ViewComponent:l,handleClick:s,handleStepGroupExpand:c,isStepGroupExpanded:d})=>{const u=0===i?26:i+8,h=new Set(["group","pre","post","script"]),C=p((e,t)=>h.has(e?.toLowerCase())||h.has(t?.toLowerCase())?"6px 8px":"7px 8px",[]);return e(t,{children:r?.map(t=>{const r=a===t.stepId,i=d?.(t.stepId),p=C(t.type,t?.entityType),m=h.has(t?.entityType?.toLowerCase())||h.has(t?.type?.toLowerCase());return n(f,{children:[e("tr",r?{className:"pre-edit-row",id:"getInFocus",children:e("td",{colSpan:o,children:e("div",{style:{marginLeft:u},children:l&&e(l,{})})})}:{children:e("td",{colSpan:o,style:{padding:p},children:n("div",{style:{marginLeft:u,display:"flex",alignItems:"center"},children:[e(Y,{title:t?.name,children:n(U,{as:"div",color:"var(--brand-color)",lineHeight:"18px",onClick:()=>s?.(t),children:[t.displayOrder,".",oe(t.name,40)]})}),m&&e("div",{className:"pre-accordion-arrow "+(i?"expanded":""),children:e(F,{name:"arrow_right",className:"pre-arrow-svg",color:i?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>c?.(t)})})]})})}),i&&e(BO,{data:t.data,level:u,columnCount:o,viewModeId:a,handleClick:s,ViewComponent:l,handleStepGroupExpand:c,isStepGroupExpanded:d})]},t.stepId)})})};var PO=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:a,tableDataTextColor:l,withCheckbox:s,onSelectClick:c,draggable:d,indexNumber:u=0,dataLength:f=0,viewModeId:p,ViewComponent:C,handleClick:m,handleStepGroupExpand:g,isStepGroupExpanded:v,scriptType:y})=>{const w=new Set(["group","pre","post","script"]),b=w.has(r?.entityType?.toLowerCase())||w.has(r?.type?.toLowerCase()),E=r?.isDisabled,M=r?._id||r?.stepId,A=!!y&&"cascaded"===r.cascaded,x=E||f<=1||A;let L=(u+1).toString();const{attributes:k,listeners:H,setNodeRef:S,transform:_,transition:V}=wa({id:M,disabled:x}),O=h(()=>({transform:Qr.Transform.toString(_),transition:V}),[_,V]),z=v?.(r.stepId);return n(t,{children:[e("tr",{ref:S,style:O,className:I(o,{"disabled-row":E}),children:i.map((t,i)=>{const o=0===i;return e("td",{style:{paddingLeft:o&&d?"0px":"8px"},onClick:()=>a(t,r,i),className:I(t.className,{"clickable-cell":t.onClick}),children:n(U,{as:"div",color:l,className:"ff-data-checkbox-container",children:[o&&s&&e("span",{className:"ff-table-pre-post-checkbox",children:e(ne,{onChange:e=>c(e,r),checked:r.checked,disabled:!!E})}),o&&d&&e("div",{className:E?"ff-table-drag":"ff-table-drag-icon",...H,...k,children:e(F,{name:"drag",className:x?"drag-icon-disabled":"drag-icon"})}),br(r,t,u),o&&b&&e("div",{className:"pre-accordion-arrow "+(z?"expanded":""),children:e(F,{name:"arrow_right",color:z?"var(--brand-color)":"var(--default-color)",width:12,height:12,className:"pre-arrow-svg",onClick:()=>{g?.({...r,serialNumber:L})}})}),t.extraInfo&&t.extraInfo({row:r,indexNumber:u})]})},`${t.accessor}${i}`)})},M),z&&e(BO,{data:r.data,columnCount:i.length,viewModeId:p,ViewComponent:C,handleClick:m,handleStepGroupExpand:g,isStepGroupExpanded:v})]})});const FO=(e,t)=>{const{action:n,sourceIndex:r,nlpName:i,id:o}=t;if(!n)return e;const a=[...e];let l={stepId:"stepId-9745-9745",isNew:!0,disabled:!1,...i&&{name:i},...o&&{id:o}};switch(n){case"addBelow":void 0!==r&&a.splice(r+1,0,l);break;case"replaceNlp":void 0!==r&&a.splice(r,0,l);break;case"EditNlp":void 0!==r&&(a.splice(r,1),a.splice(r,0,l));break;case"addLast":a.push(l)}return a},UO=(e,t="nearest",n=5)=>{if(!e)return;const r=document.getElementById(e);r?r.scrollIntoView({behavior:"smooth",block:t}):n>0?setTimeout(()=>{UO(e,t,n-1)},300):console.warn(`Element with id - "${e}" not found after multiple retries.`)},qO=o(({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:s,allSelected:d,partialSelected:u=!1,withFixedHeader:f=!0,borderWithRadius:h=!1,headerCheckboxDisabled:p=!1,noDataContent:C,height:m="100%",className:g="",tableHeadClass:v="",tableBodyRowClass:E="",headerTextColor:M,tableDataTextColor:A,draggable:x=!1,onDragEnd:L,loadMore:k=()=>{},editMode:H="",editComponent:S,NlpComponent:_,AddNlp:V,handleDragStart:O,handleViewComponent:z,handleAccordion:N,loading:T,scriptType:D=!1},Z)=>{const j=a(null),[R,B]=c(null),[P,F]=c(null),q=e=>{F(t=>t===e?.stepId?null:e?.stepId)},W=e=>{q(e);const t=z?.(e,q);t?B(()=>t):q(null)},[Q,G]=c(new Map),Y=e=>Q.has(e),X=e=>{Y(e?.stepId)||(P&&q(null),N?.(e)),T||G(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})};l(()=>{const e=document.getElementById("ff-table-scroll-container"),n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return j.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";k(t)}})},{root:e,rootMargin:"8px",threshold:.1}),j.current.observe(n),j.current.observe(r),()=>{j.current?.disconnect()}},[t,k]);const J=(e,t,n)=>{let{onClick:r,accessor:i}=e;r&&Cr(r)&&r(i,t,n)},$=(e,t)=>{s&&s(e,t)};return l(()=>{UO("getInFocus")},[V,P]),Z&&b(Z,()=>({resetStepGroupAccordion:()=>{G(new Map)}})),e(Zo,{collisionDetection:Ci,onDragStart:()=>{O?.(),Q.clear()},onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&L&&L(i,o)},modifiers:[ih],children:e(ha,{disabled:!x,items:t?.map(e=>e.stepId||e._id),strategy:da,children:n("div",{style:{height:m},id:"ff-table-scroll-container",className:I(g,{"pre-fixed-header-table":f,"pre-border-borderRadius":h}),children:[n("table",{className:I("ff-table-pre-post"),cellSpacing:0,children:[e("thead",{className:I({"pre-table-thead":f},v),children:e("tr",{children:r.map((t,r)=>e("th",{className:I(`${i&&`${i}-bg`}`,`${M&&`${M}-color`}`),style:{width:t?.width},children:n(U,{as:"div",fontWeight:"semi-bold",className:"ff-label-checkbox-container",lineHeight:"18px",color:"var(--drawer-title-color)",children:[0===r&&o&&e("span",{className:"ff-table-pre-post-checkbox",children:e(ne,{onChange:e=>{$(e,{allSelected:e.target.checked})},checked:void 0!==d&&d,partial:!!u,disabled:p})}),t.header]})},t.header))})}),n("tbody",{className:"pre-table-tbody",children:[e("tr",{id:"ff-table-first-node"}),FO(t,V??{})?.map((i,a)=>{const l=H===i.stepId;return l||i.isNew?n("tr",{id:"getInFocus",className:"pre-edit-row",children:[l&&w(S)&&e("td",{colSpan:r.length,children:y(S,{rowData:i,rowIndex:a+1})}),i.isNew&&!l&&w(_)&&e("td",{colSpan:r.length,children:y(_,{rowIndex:a,rowData:i})})]},i.stepId||a):e(PO,{row:i,indexNumber:a,columns:r,tableBodyRowClass:E,handleOnclick:J,tableDataTextColor:A,withCheckbox:o,onSelectClick:$,draggable:x,dataLength:t?.length,viewModeId:P,ViewComponent:R,handleClick:W,handleStepGroupExpand:X,isStepGroupExpanded:Y,scriptType:D})}),e("tr",{id:"ff-table-last-node"})]})]}),K(t)&&K(V)&&e("div",{className:"ff-no-data-content",style:{height:`calc(${m} - 50px)`},children:C})]})})})}),WO=g(({data:r=[],level:o=0,columnCount:s=1,viewModeId:c,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:C,columns:m=[],parentIndex:g,updateRowHeight:v})=>{const y=a([]),w=new Set(["group","pre","post","script"]),b=o+8,E=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const o=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...o&&{refId:o}})}return t.accessor||i&&"object"!=typeof i?i:"--"};return l(()=>{if(!v)return;const e=new ResizeObserver(()=>{let e=0;y.current.forEach(t=>{t&&(e+=t.getBoundingClientRect().height)}),e>0&&v(g??0,e)});return y.current.forEach(t=>{t&&e.observe(t)}),()=>e.disconnect()},[r,v,g,p]),e(t,{children:r?.map((t,r)=>{const o=g??0+r+1,a=w.has(t?.entityType?.toLowerCase())||w.has(t?.type?.toLowerCase());return n(i.Fragment,{children:[e("tr",c===t?.stepId?{ref:e=>y.current[r]=e,className:"steps-edit-row",id:"getInFocus",children:e("td",{colSpan:s,children:e("div",{style:{marginLeft:`${b}px`},children:d&&e(d,{})})})}:{ref:e=>y.current[r]=e,children:m.map((r,i)=>{return e("td",{style:{maxWidth:r.width,padding:(o=t?.type,l=t?.entityType,w.has(o?.toLowerCase())||w.has(l?.toLowerCase())?"6px 8px":"7px 8px")},children:n(U,{as:"div",className:"ff-data-checkbox-container",children:[n("div",{className:"ff-data-checkbox-container-content",style:{marginLeft:0===i?`${b}px`:0},onClick:()=>{0===i&&!t?.displayName?.includes("End")&&!t?.isDisabled&&u?.({...t,tableType:f})},children:[!C&&0===i&&e("div",{style:{padding:"4px 18px"}}),E({...t,marginLeft:b},r)]}),0===i&&a&&e("div",{className:"ff-accordion-arrow "+(p?.(t.stepId)?"expanded":""),children:e(F,{name:"arrow_right",color:p?.(t.stepId)?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12,onClick:()=>h?.({...t,tableType:f})})})]})},`${t.stepId}-${i}`);var o,l})}),p?.(t.stepId)&&e(WO,{data:t.data,level:b,columnCount:s,viewModeId:c,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:C,columns:m,parentIndex:o,updateRowHeight:v})]},t.stepId)})})});WO.displayName="StepGroupAccordions";const QO=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:s,tableDataTextColor:c,withCheckbox:d,onSelectClick:u,draggable:f,indexNumber:p=0,tableType:C="",viewModeId:m,ViewComponent:g,handleClick:v,selectedRows:y,handleStepGroupExpand:w,isStepGroupExpanded:b,dataLength:E,stepPartialSelect:M,isViewPrivilegeMode:A,isClientSide:x,updateRowHeight:L,rowId:k,onRowHover:H,onRowHoverOut:S})=>{const _=new Set(["group","pre","post","script"]),V=_.has(r?.entityType?.toLowerCase())||_.has(r?.type?.toLowerCase()),O=a(null),z=h(()=>r?.isDisabled||(E??0)<=1||r.isSpecialNlp,[r,E]),N=(p+1).toString(),{attributes:T,listeners:D,setNodeRef:Z,transform:j,transition:R}=wa({id:r?._id||r?.stepId,disabled:z}),B=h(()=>({transform:Qr.Transform.toString(j),transition:R}),[j,R]),P=r?._id||r?.stepId;l(()=>{if(O.current&&L){const e=O.current.getBoundingClientRect().height;L(p,e)}},[r,L,p,b?.(r?.stepId)]);const q=e=>A||x?V&&0===e?"4px 8px":"7px 8px":0!==e?"Steps"===C?"4px 8px":"7px 8px":"Steps"===C&&f?"4px 8px 4px 0px":"4px 8px 4px 24px";return n(t,{children:[e("tr",{"data-rowid":k,ref:e=>{O.current=e,Z(e)},style:B,className:I(o,"sortable-item",{"disabled-inner-row":z}),id:P,onMouseEnter:()=>{H?.(k||"")},onMouseLeave:()=>{S?.(k||"")},children:i?.map((i,o)=>e(t,{children:e("td",{style:{padding:q(o),maxWidth:i.width},onClick:()=>s(i,r,p),children:n(U,{as:"div",color:c,className:"ff-data-checkbox-container",children:[0===o&&!x&&f&&e("div",{className:z?"ff-table-drag":"ff-table-drag-icon",...D,...T,children:e(F,{name:"drag",className:z?"drag-icon-disabled":"drag-icon"})}),0===o&&!x&&d&&e("span",{className:C&&y[C]?.has(r.stepId)||M?.has(r.stepId)?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(ne,{onChange:e=>u(C,r,e.target.checked),checked:!!y[C]?.has(r.stepId),partial:M?.has(r.stepId),disabled:r?.isSpecialNlp&&r?.name?.includes("End")})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===o?r.marginLeft:0},children:[br(r,i,p,C),V&&0===o&&!x&&e("div",{className:"ff-accordion-arrow "+(b?.(r?.stepId)?"expanded":""),children:e(F,{name:"arrow_right",className:"steps-arrow-svg",color:b?.(r?.stepId)?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>w?.({...r,tableType:C,serialNumber:N})})}),i.extraInfo?.({row:r,indexNumber:p,tableType:C})]})]})},`${i.accessor}-${Qt()}`)}))},P),b?.(r?.stepId)&&e(WO,{data:r.data||r?.stepResults,columnCount:i.length,viewModeId:m,ViewComponent:g,handleClick:v,tableType:C,handleStepGroupExpand:w,isStepGroupExpanded:b,level:r?.marginLeft,isViewPrivilegeMode:A,columns:i,parentIndex:p,updateRowHeight:L})]})});QO.displayName="StepTableMainRow";const GO=({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:s,withFixedHeader:d=!0,borderWithRadius:u=!1,noDataContent:f,height:C="100%",className:m="",tableBodyRowClass:g="",headerTextColor:v,tableDataTextColor:b,draggable:E=!1,onDragEnd:M,loadMore:A=()=>{},editMode:x="",editComponent:L,NlpComponent:k,AddNlp:H,handleDragStart:S,tableType:_,viewModeId:V,ViewComponent:O,handleClick:z,selectedRows:N,handleStepGroupExpand:T,isStepGroupExpanded:D,stepPartialSelect:Z,isViewPrivilegeMode:j,isClientSide:R,highlightKey:B,onHighlightComplete:P,handleRowHover:F,handleRowHoverOut:U})=>{const q=a(null),W=a(null),[Q,G]=c(0),[Y,X]=c(0),[J,$]=c([]),[ee,te]=c(null),ne=50,re=a(0);l(()=>{W.current&&X(W.current.clientHeight);const e=FO(t,H??{});$(t=>{const n=[...t];for(;n.length<e.length;)n.push(ne);return n.length>e.length&&(n.length=e.length),n})},[t,H]),l(()=>{re.current>0&&W.current&&(W.current.scrollTop=re.current,re.current=0)},[J]),l(()=>{if(K(B))if(x)te(x);else if(H&&Object.keys(H).length>0){const e=FO(t,H).find(e=>e.isNew);e&&te(e.stepId||"new-row")}else te(null);else te(B)},[x,H,t,B]),l(()=>{if(ee&&W.current){const e=setTimeout(()=>{const e=W.current?.querySelector(`[data-rowid="${ee}"]`);e&&(e.scrollIntoView({behavior:"smooth",block:"nearest"}),setTimeout(()=>{K(B)||P?.()},300))},100);return()=>clearTimeout(e)}},[ee,J,B,P]);const ie=p(e=>{const t=e.currentTarget.scrollTop;G(t)},[]),oe=p((e,t)=>{$(n=>{const r=[...n];return e<r.length&&r[e]!==t?(r[e]=t,r):n})},[]),ae=h(()=>FO(t,H??{}),[t,H]),le=ae.length,{startIndex:se,paddingTop:ce,paddingBottom:de,visibleRows:ue}=h(()=>{let e=0,t=le-1,n=0,r=0;if(J.length===le&&Y>0){let i=0;for(let t=0;t<le;t++)i<=Q&&(e=t),i+=J[t]??0;i=0;for(let e=0;e<le;e++)if(i+=J[e]??0,i>=Q+Y&&t===le-1){t=e;break}if(e=Math.max(0,e-5),t=Math.min(le-1,t+5),ee){const n=ae.findIndex(e=>e.stepId===ee||e.isNew&&"new-row"===ee);n>=0&&(n<e?e=n:n>t&&(t=n))}n=J.slice(0,e).reduce((e,t)=>e+t,0),r=J.slice(t+1).reduce((e,t)=>e+t,0)}else{if(e=Math.max(0,Math.floor(Q/ne)-5),t=Math.min(le-1,e+Math.ceil(Y/ne)+5),ee){const n=ae.findIndex(e=>e.stepId===ee||e.isNew&&"new-row"===ee);n>=0&&(n<e?e=n:n>t&&(t=n))}n=e*ne,r=(le-t-1)*ne}return{startIndex:e,endIndex:t,paddingTop:n,paddingBottom:r,visibleRows:ae.slice(e,t+1)}},[ae,le,J,Y,Q,5,ee,ne]);l(()=>{const e=W.current,n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return q.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";A(t)}})},{root:e,rootMargin:"8px",threshold:.1}),q.current.observe(n),q.current.observe(r),()=>{q.current?.disconnect()}},[t?.length,A]);const fe=(e,t,n)=>{const{onClick:r,accessor:i}=e;r&&Cr(r)&&r(i,t,n)},he=(e,t,n)=>{s&&s(e,t,n)};return e(Zo,{collisionDetection:Ci,onDragStart:S,onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&M&&M(i,o)},modifiers:[ih],children:e(ha,{disabled:!E,items:t?.map(e=>e._id||e.stepId),strategy:da,children:n("div",{ref:W,style:{height:C,position:"relative",overflowY:C?.includes("vh")?"auto":void 0},id:"ff-table-scroll-container",className:I(m,{"ff-fixed-header-steps-table":d,"steps-border-borderRadius":u}),onScroll:ie,children:[n("table",{className:I("ff-table-steps"),cellSpacing:0,children:[e("thead",{className:"steps-inner-thead",children:e("tr",{children:r?.map(t=>e("th",{className:I(`${i&&`${i}-bg`}`,`${v&&`${v}-color`}`),style:{width:t?.width}},`${t.header}-${Qt()}`))})}),n("tbody",{className:"ff-steps-tbody",children:[e("tr",{id:"ff-table-first-node",style:{display:"none"}}),ce>0&&e("tr",{children:e("td",{style:{height:ce,padding:0},colSpan:r.length})}),ue.map((i,a)=>{const l=se+a,s=x===i.stepId,c=s||i.isNew,d=s&&i.stepId===ee||i.isNew&&"new-row"===ee;return c?n("tr",{className:"steps-edit-row",id:d?"getInFocus":void 0,"data-rowid":i.stepId||"new-row",children:[s&&w(L)&&e("td",{colSpan:r.length,children:y(L,{rowData:i,rowIndex:l+1})}),i.isNew&&!s&&w(k)&&e("td",{colSpan:r.length,children:y(k,{rowIndex:l,rowData:i})})]},i.stepId||l):e(QO,{rowId:i.stepId,row:i,onRowHover:F,onRowHoverOut:U,indexNumber:l,columns:r,tableBodyRowClass:g,handleOnclick:fe,tableDataTextColor:b,withCheckbox:o,onSelectClick:he,draggable:E,tableType:_,viewModeId:V,ViewComponent:O,handleClick:z,selectedRows:N,handleStepGroupExpand:T,isStepGroupExpanded:D,dataLength:t?.length,stepPartialSelect:Z,isViewPrivilegeMode:j,isClientSide:R,updateRowHeight:oe})}),de>0&&e("tr",{children:e("td",{style:{height:de,padding:0},colSpan:r.length})}),e("tr",{id:"ff-table-last-node",style:{display:"none"}})]})]}),t?.length<=0&&e("div",{className:"steps-no-data-content",style:{height:`calc(${C} - 50px)`},children:f})]})})})},KO=e=>["ElseIfCondition","ElseCondition"].includes(e?.nlpName);let YO=null,XO=null;const JO=e=>{if(XO===e&&YO)return YO;const t=((e,t="Steps")=>{const n=e.find(e=>e?.title===t);return n?.data??[]})(e),n=new Map,r=(e,n,r)=>{const i=t,o=i.findIndex(t=>t.stepId===e?.stepId),a=i.findIndex(e=>e.stepId===n?.stepId);return r?i.slice(o+1,a).map(e=>e.stepId):i.slice(o,a+1).map(e=>e.stepId)};return t?.forEach(e=>{const i=(e=>e.specialNlpId??e.conditionSearchKey??null)(e);if(!i)return;const o=n.get(i)||{start:null,end:null,childIds:[],allIds:[]};if(e?.isSpecialNlp&&e.name?.startsWith("Start")){o.start=e;const n=(e=>{const n=(e=>({IfCondition:"EndIfCondition",StartForLoop:"EndForLoop",StartIteration:"EndIteration",ElseIfCondition:"EndElseIfCondition",ElseCondition:"EndElseCondition"}[e.nlpName]||e.nlpName))(e),r=t;if(void 0!==e?.conditionId&&void 0!==e?.conditionSearchKey&&!e.specialNlpId){const t=e.conditionId===e.conditionSearchKey?e.conditionId:e.conditionSearchKey;return r.find(e=>e.conditionSearchKey===t&&e.nlpName===n)||null}return e.specialNlpId&&r.find(t=>t.specialNlpId===e.specialNlpId&&t.nlpName===n)||null})(e);n&&(o.end=n,o.childIds=r(e,n,!0),o.allIds=r(e,n,!1))}n.set(i,o)}),YO=n,XO=e,n},$O=e=>e.includes("/")?e.split("/").slice(0,-1).join("/"):e;const ez=e=>{if(!e)return!1;for(const t of Object.values(e))if(t&&t.size>0)return!0;return!1},tz=e=>{switch(e){case"PASS":return"var(--status-button-text-passed)";case"FAIL":return"var(--status-button-text-failed)";case"SKIP":return"var(--status-button-text-skipped)";case"WARNING":return"var(--status-warning-text-color)";default:return"var(--status-button-text-notExecuted)"}},nz=e=>{switch(e){case"PASS":return"Passed";case"FAIL":return"Failed";case"SKIP":return"Skipped";case"WARNING":return"Warning";default:return e}},rz=e=>{switch(e){case"PASS":return"passed";case"FAIL":return"failed";case"SKIP":return"skipped";case"WARNING":return"warning";case"Running":return"running";case"Partially Executed":return"partially-executed";case"Aborted":return"aborted";case"Terminated":return"terminated";default:return"default"}},iz=({metaData:t,width:r=0,displayIcon:i=!1})=>{const o=t?.total||0,a=[{name:"Passed",count:t?.totalPassed,color:"var(--status-approved-text-color)"},{name:"Failed",count:t?.totalFailed,color:"var(--status-rejected-text-color)"},{name:"Warning",count:t?.totalWarning,color:"var(--status-warning-text-color)"},{name:"Skipped",count:t?.totalSkipped,color:"var(--status-skipped-text-color)"},{name:"Terminated",count:t?.totalTerminated,color:"var(--status-skipped-text-color)"},{name:"Aborted",count:t?.totalAborted,color:"var(--status-skipped-text-color)"}],l=a.filter(e=>e.count>0),s=l.map(({count:e,name:t})=>`${e}/${o} ${t}`).join(" "),c=r?oe(s,r,"pixel"):s,d=a.map(e=>({...e,count:e.count??0})),u=d.reduce((e,{count:t})=>e+t,0),f=d.some(({count:e})=>e>0),p=i?d:a,C=[["Passed","Failed"],["Warning","Skipped"]].map(e=>p.filter(({name:t})=>e.includes(t))),m=(e,t)=>"Skipped"===e?"var(--status-skipped-bg-color)":t,g=h(()=>n("div",{className:"ff-status-tooltip",children:[C.map((t,r)=>e("div",{className:"ff-status-tooltip-row",children:t.map(({name:t,count:r,color:i})=>n("div",{className:"ff-status-item",children:[e("span",{className:"ff-status-dot",style:{backgroundColor:m(t,i)}}),n(U,{as:"span",fontWeight:"medium",fontSize:10,className:"ff-status-result-tooltip-text",color:"var(--tooltip-text-color)",children:[t,": ",r]})]},t))},r)),e("div",{className:"ff-status-tooltip-divider"}),n(U,{as:"span",fontWeight:"medium",fontSize:10,className:"ff-status-tooltip-total",children:["Total Steps - ",u]})]}),[C,u]);if(i)return f?e(Y,{title:g,children:e("span",{className:"ff-status-icon-wrapper",children:e(F,{name:"status_icon"})})}):null;const v=[];let y=0;for(const{count:e,name:t,color:n}of l){const r=`${e}/${o} ${t}`;if(!(y+r.length<=c.length)){const e=c.slice(y).trim();e&&v.push({text:e,color:n});break}v.push({text:r,color:n}),y+=r.length+1}return e("div",{className:"ff-stepResultStats",children:e(Y,{title:s,children:e(U,{as:"div",className:"status-inline-text",fontWeight:"semi-bold",children:v.map(({text:t,color:n},r)=>e(U,{as:"span",fontWeight:"semi-bold",style:{color:n,whiteSpace:"nowrap"},children:t+" "},r))})})})},oz=({isHeaderRequired:r,isViewPrivilegeMode:i,onAccordionClick:o,isBulkEnable:a,showActionCell:l,handleMainCheckbox:s,isAllSelected:c,isPartialSelected:d,tableMeta:u=[],title:f,totalRows:h,expanded:p,actionCell:C,row:m,metaData:g,isClientSide:v,isMaximize:y})=>{const w=u?.map(e=>e.width),b=e=>{const t=w[e]??0;switch(e){case 0:return t+110;case 1:return t+(t>300?60:70);case 2:return t+20;default:return 0}};return n("article",{className:"step-title-article",style:{...!r&&!v&&{backgroundColor:"var(--hover-color)"}},children:[e("div",{style:{width:`${b(0)}px`},children:n("div",{className:"accordion-header",style:{paddingLeft:i||v?"8px":"24px"},children:[!i&&!v&&e(ne,{onChange:e=>s(f,e.target.checked),checked:c(f,h),partial:d(f,h),disabled:0===h}),e("div",{className:"header-title",children:e(U,{as:"div",fontWeight:"semi-bold",color:v?"var(--brand-color)":"var(--nlp-option-color)",cursor:"default",lineHeight:"18px",children:f})}),e("div",v?{style:{padding:"12px"}}:{className:"accordion-arrow "+(p?"expanded":""),onClick:()=>o(f),children:e(F,{name:"arrow_right",color:p?"var(--brand-color)":"var(--default-color)",width:16,height:16,className:"steps-arrow-svg"})}),n("div",{className:"ff_action_container",children:[g&&e(iz,{metaData:g,width:(()=>{const e=m?.marginLeft??0;if((c?.(f,h)||d?.(f,h))&&"Steps"===f)return 200-e;return(y?350:{"Depends on Scripts":240,"Post Conditions":230,"Pre Conditions":260,Steps:310}[f]??250)-e})()}),l&&!a&&e(t,{children:C(m)})]})]})}),g?.message&&e("div",{className:"step-result",style:{width:`${b(1)}px`},children:e(Y,{title:g?.message,placement:"bottom-start",children:e(U,{lineHeight:"18px",as:"div",className:"step-result-text",color:tz(g?.status),children:g?.message})})}),g?.status&&e("div",{className:"step-result",style:{width:`${b(2)}px`},children:e(ur,{label:nz(g?.status),status:rz(g?.status),children:g?.status})})]})},az=new Set(["group","pre","post","script"]),lz=new Set(["EndIfCondition","EndForLoop","EndIteration","EndElseIfCondition","EndElseCondition"]),sz=(e,t)=>{if("All"===t)return!0;switch(t){case"Steps":return"Steps"===e;case"Depends":return"Depends on Scripts"===e;case"PRE":return"Pre Conditions"===e;case"POST":return"Post Conditions"===e}},cz=e=>{if(!e)return null;switch(e){case"IfCondition":return"EndIfCondition";case"StartForLoop":return"EndForLoop";case"StartIteration":return"EndIteration";case"ElseIfCondition":return"EndElseIfCondition";case"ElseCondition":return"EndElseCondition";default:return null}},dz=e=>{switch(e){case"IfCondition":return"if";case"ElseIfCondition":return"elseif";case"ElseCondition":return"else";case"StartForLoop":return"for";case"StartIteration":return"iteration";default:return null}},uz=e=>Boolean(e?.isSpecialNlp&&lz.has(String(e?.nlpName??""))),fz=e=>{if((e=>Boolean(e?.isSpecialNlp&&dz(e?.nlpName)))(e))return"special-start";if(uz(e))return"special-end";if((e=>{const t=String(e?.type??"").toLowerCase(),n=String(e?.entityType??"").toLowerCase();return az.has(t)||az.has(n)})(e)){const t=String(e?.type??e?.entityType??"").toLowerCase();return"script"===t?"script":"pre"===t?"pre":"post"===t?"post":"group"}return"leaf"},hz=(e,t,n)=>Boolean(n&&"steps"===t&&!e?.isDisabled&&!e?.isSpecialNlp),pz=e=>{const t=e?.conditionSearchKey;return"string"==typeof t&&t.length>0?t.split("/")[0]??t:e?.conditionId??e?.specialNlpId??null},Cz=e=>`block:${e}`;function mz(e,t,n,r,i){const o=r?.specialNlpId??r?.conditionSearchKey??null;if(!o)return null;for(let r=n+1;r<e.length;r+=1){const n=e[r];if(!n)continue;const a=t.get(n);if(!a)continue;if((a.raw?.specialNlpId??a.raw?.conditionSearchKey??null)===o&&a.raw?.nlpName===i)return{rowId:n,index:r}}return null}function gz(e,t){const n=function(e){return e.map(e=>({id:`${e.accessor}:${e.header}`,header:e.header,accessor:e.accessor,width:Number(e.width??240),className:e.className,renderCell:e.cell,renderExtraInfo:e.extraInfo}))}(e.tableMeta),r=[],i=new Map,o=[],a=new Map,l=new Map,s=new Map,c=new Map;let d=0;e.tableData.forEach((t,n)=>{const u=String(t?.title??`Section ${n+1}`),f=(e=>`section:${e.toLowerCase().replace(/\s+/g,"-")}`)(u),h=(e=>{switch(e){case"Steps":return"steps";case"Depends on Scripts":return"depends";case"Pre Conditions":return"pre";case"Post Conditions":return"post";default:return"custom"}})(u),p=[],C=[];r.push(f),s.set(f,n);const m=(t,n,r)=>{const i=String(t?.stepId??t?._id??`${u}:${o.length}`),s=(p=t,Array.isArray(p?.data)?p.data:Array.isArray(p?.stepResults)?p.stepResults:[]);var p;const g=fz(t),v=null==n&&((e,t)=>!t&&!uz(e))(t,e.isViewPrivilegeMode),y=v?d:null;null!=y&&(c.set(y,i),C.push(y),d+=1),o.push(i),l.set(i,o.length-1);const w={id:i,sectionId:f,parentId:n,childIds:[],depth:r,kind:g,name:String(t?.name??t?.displayName??"--"),displayName:t?.displayName,message:t?.message,status:t?.status,marginLeft:Number(t?.marginLeft??8*r),raw:t,isDisabled:Boolean(t?.isDisabled),isDraggable:null==n&&hz(t,h,e.isDraggable),isSelectable:v,isExpandable:s.length>0||"group"===g||"script"===g,hasAsyncChildren:0===s.length&&("group"===g||"script"===g),childrenLoaded:s.length>0,detailCapable:Boolean(t?.stepId),selectableOrdinal:y,subtreeSelectableStart:y,subtreeSelectableEnd:y,blockId:null,ancestorBlockIds:[],contentVersion:vz(t,s.length)};a.set(i,w);const b=s.map(e=>m(e,i,r+1)),E=a.get(i);if(!E)return i;const M=[E.selectableOrdinal,...b.flatMap(e=>{const t=a.get(e);return t?[t.subtreeSelectableStart,t.subtreeSelectableEnd]:[]})].filter(e=>null!=e);return a.set(i,{...E,childIds:b,isExpandable:E.isExpandable||b.length>0,hasAsyncChildren:E.hasAsyncChildren&&0===b.length,childrenLoaded:b.length>0,subtreeSelectableStart:M.length>0?Math.min(...M):null,subtreeSelectableEnd:M.length>0?Math.max(...M):null}),i};(Array.isArray(t?.data)?t.data:[]).forEach(e=>{const t=m(e,null,0);p.push(t)}),i.set(f,{id:f,title:u,kind:h,rowIds:p,selectableOrdinalStart:C.length>0?C[0]??0:0,selectableOrdinalEnd:C.length>0?C[C.length-1]??-1:-1,selectableCount:C.length,metaData:t?.metaData,actionCell:t?.actionCell??null,isDefaultExpanded:sz(u,e.defaultExpanded)})});const u=function(e,t){const n=new Map,r=new Map,i=new Map,o=new Map,a=new Map,l=[];e.forEach((e,t)=>{a.set(e,t),o.set(e,{blockId:null,ancestorBlockIds:[]})});for(let o=0;o<e.length;o+=1){const a=e[o];if(!a)continue;const s=t.get(a);if(!s||"special-start"!==s.kind)continue;const c=dz(s.raw?.nlpName),d=cz(s.raw?.nlpName);if(!c||!d)continue;const u=mz(e,t,o,s.raw,d);if(!u)continue;const f=t.get(u.rowId);if(!f)continue;const h=[];for(let n=o+1;n<u.index;n+=1){const r=e[n];if(!r)continue;const i=t.get(r);null!=i?.selectableOrdinal&&h.push(i.selectableOrdinal)}const p=Cz(s.id),C=s.sectionId;n.set(p,{id:p,kind:c,startRowId:s.id,endRowId:f.id,sectionId:C,parentBlockId:null,familyId:pz(s.raw),childRowIds:e.slice(o+1,u.index),allRowIds:e.slice(o,u.index+1),selectableStartOrdinal:h.length>0?h[0]??0:0,selectableEndOrdinal:h.length>0?h[h.length-1]??-1:-1,selectableLeafCount:h.length,startDepth:s.depth}),r.set(s.id,p),i.set(f.id,p),l.push({id:p,startIndex:o,endIndex:u.index})}const s=[...l].sort((e,t)=>{const n=e.endIndex-e.startIndex;return t.endIndex-t.startIndex-n});for(const t of s)for(let n=t.startIndex;n<=t.endIndex;n+=1){const r=e[n];if(!r)continue;const i=o.get(r);i&&(i.ancestorBlockIds=[...i.ancestorBlockIds,t.id],o.set(r,i))}for(const e of l){let t=null,r=Number.POSITIVE_INFINITY;for(const n of l)if(n.id!==e.id&&n.startIndex<=e.startIndex&&n.endIndex>=e.endIndex){const e=n.endIndex-n.startIndex;e<r&&(r=e,t=n.id)}const i=n.get(e.id);i&&n.set(e.id,{...i,parentBlockId:t})}for(const t of e){const e=o.get(t),n=e?.ancestorBlockIds??[],a=r.get(t)??i.get(t)??n[n.length-1]??null;o.set(t,{blockId:a,ancestorBlockIds:n})}return{blocksById:n,blockIdByStartRowId:r,blockIdByEndRowId:i,rowBlockMeta:o}}(o,a);return u.rowBlockMeta.forEach((e,t)=>{const n=a.get(t);n&&a.set(t,{...n,blockId:e.blockId,ancestorBlockIds:e.ancestorBlockIds})}),{version:(t?.version??0)+1,columns:n,sectionIds:r,sectionsById:i,rowIds:o,rowsById:a,blocksById:u.blocksById,rowIndexById:l,sectionIndexById:s,rowIdBySelectableOrdinal:c,blockIdByStartRowId:u.blockIdByStartRowId,blockIdByEndRowId:u.blockIdByEndRowId}}function vz(e,t){const n=[e?.stepId??e?._id??"",e?.name??"",e?.displayName??"",e?.message??"",e?.status??"",e?.marginLeft??0,e?.isDisabled?"1":"0",t].join("|");let r=0;for(let e=0;e<n.length;e+=1)r=31*r+n.charCodeAt(e)|0;return Math.abs(r)}class yz{intervals;selectedTotal;constructor(){this.intervals=[],this.selectedTotal=0}clone(){const e=new yz;return e.intervals=this.intervals.map(e=>({...e})),e.selectedTotal=this.selectedTotal,e}has(e){const t=this.findInsertIndex(e),n=this.intervals[t-1];return Boolean(n&&n.start<=e&&n.end>=e)}addPoint(e){this.addRange(e,e)}removePoint(e){this.removeRange(e,e)}addRange(e,t){if(t<e)return;let n=e,r=t;const i=[];let o=!1;for(const e of this.intervals)e.end+1<n?i.push(e):r+1<e.start?(o||(i.push({start:n,end:r}),o=!0),i.push(e)):(n=Math.min(n,e.start),r=Math.max(r,e.end));o||i.push({start:n,end:r}),this.replaceIntervals(i)}removeRange(e,t){if(t<e)return;const n=[];for(const r of this.intervals)r.end<e||r.start>t?n.push(r):(r.start<e&&n.push({start:r.start,end:e-1}),r.end>t&&n.push({start:t+1,end:r.end}));this.replaceIntervals(n)}clear(){this.intervals=[],this.selectedTotal=0}fill(e,t){this.intervals=e<=t?[{start:e,end:t}]:[],this.selectedTotal=e<=t?t-e+1:0}countInRange(e,t){if(t<e)return 0;let n=0;for(const r of this.intervals){if(r.end<e)continue;if(r.start>t)break;const i=Math.max(r.start,e),o=Math.min(r.end,t);n+=Math.max(0,o-i+1)}return n}selectedCount(){return this.selectedTotal}iterateRanges(e){for(const t of this.intervals)e(t.start,t.end)}findInsertIndex(e){let t=0,n=this.intervals.length;for(;t<n;){const r=Math.floor((t+n)/2),i=this.intervals[r];!i||i.start>e?n=r:t=r+1}return t}replaceIntervals(e){this.intervals=e,this.selectedTotal=e.reduce((e,t)=>e+(t.end-t.start+1),0)}}function wz(e){const t=new Map;return e.sectionIds.forEach(e=>{t.set(e,new yz)}),t}function bz(e){const t=new Map;return e.forEach((e,n)=>{t.set(n,e.clone())}),t}function Ez(e,t,n,r){const i=bz(t),o=e.sectionsById.get(n),a=i.get(n);return o&&a?(r&&o.selectableCount>0?a.fill(o.selectableOrdinalStart,o.selectableOrdinalEnd):a.clear(),i):i}function Mz(e,t,n,r){const i=e.rowsById.get(n);if(!i)return t;const o=bz(t),a=o.get(i.sectionId);if(!a)return o;const l=Lz(e,t,n),s=r??!l.selected,c=Hz(e,i);if(c){const t=Sz(e,c);if(0===t.length)return o;const n=t[0]??0,r=t[t.length-1]??-1;return s?a.addRange(n,r):(a.removeRange(n,r),"if"===c.kind&&c.familyId&&e.blocksById.forEach(t=>{if(t.id===c.id||t.sectionId!==c.sectionId||t.familyId!==c.familyId)return;const n=Sz(e,t);0!==n.length&&a.removeRange(n[0]??0,n[n.length-1]??-1)})),o}return null==i.selectableOrdinal||(s?a.addPoint(i.selectableOrdinal):a.removePoint(i.selectableOrdinal)),o}function Az(e,t,n){return Mz(e,t,n,!1)}function xz(e,t,n){return Lz(e,t,n).selected}function Lz(e,t,n,r=kz()){const i=r.rowStates.get(n);if(i)return i;const o=e.rowsById.get(n);if(!o){const e={selected:!1,partial:!1};return r.rowStates.set(n,e),e}const a=Hz(e,o);if(a){const i=function(e,t,n,r){const i=r.blockStates.get(n.id);if(i)return i;const o={selected:!1,partial:!1};if(0===n.childRowIds.length)return r.blockStates.set(n.id,o),o;let a=0,l=0;return n.childRowIds.forEach(n=>{const i=Lz(e,t,n,r);i.selected?a+=1:i.partial&&(l+=1)}),o.selected=a===n.childRowIds.length,o.partial=!o.selected&&(a>0||l>0),r.blockStates.set(n.id,o),o}(e,t,a,r);return r.rowStates.set(n,i),i}const l=t.get(o.sectionId),s={selected:null!=o.selectableOrdinal&&(l?.has(o.selectableOrdinal)??!1),partial:!1};return r.rowStates.set(n,s),s}function kz(){return{blockStates:new Map,rowStates:new Map}}function Hz(e,t){if("special-start"!==t.kind&&"special-end"!==t.kind)return null;const n=e.blockIdByStartRowId.get(t.id)??e.blockIdByEndRowId.get(t.id)??t.blockId;return n?e.blocksById.get(n)??null:null}function Sz(e,t){const n=[];return t.allRowIds.forEach(t=>{const r=e.rowsById.get(t);null!=r?.selectableOrdinal&&n.push(r.selectableOrdinal)}),n}function _z(e,t){return{snapshot:gz({tableMeta:e.tableMeta,tableData:e.tableData,defaultExpanded:e.defaultExpanded??"Steps",isDraggable:e.isDraggable??!0,isViewPrivilegeMode:e.isViewPrivilegeMode??!1},t)}}function Vz(e){const t={};e.snapshot.sectionIds.forEach(n=>{const r=e.snapshot.sectionsById.get(n);if(!r)return;const i=new Set;r.rowIds.forEach(t=>{xz(e.snapshot,e.selection.bySectionId,t)&&i.add(t)}),t[r.title]=i});const n=function(e,t){const n=new Set,r=kz();return e.rowIds.forEach(i=>{e.rowsById.get(i)&&Lz(e,t,i,r).partial&&n.add(i)}),n}(e.snapshot,e.selection.bySectionId);return n.size>0&&(t.partialSelected=n),t}class Oz{chunks;chunkSize;idToIndex;constructor(e=[],t=128){this.chunkSize=t,this.chunks=[],this.idToIndex=new Map,this.reset(e)}static fromArray(e){return new Oz(e)}get length(){let e=0;for(const t of this.chunks)e+=t.length;return e}toArray(){return this.chunks.flat()}get(e){const{chunkIndex:t,offset:n}=this.findChunk(e),r=this.chunks[t];if(!r)throw new RangeError(`Chunk not found for index ${e}`);const i=r[n];if(!i)throw new RangeError(`Item not found for index ${e}`);return i}range(e,t){if(e<0||t<e)throw new RangeError(`Invalid range ${e}..${t}`);return this.toArray().slice(e,t)}indexOfId(e){return this.idToIndex.get(e)??-1}insertMany(e,t){if(0===t.length)return;if(e<0||e>this.length)throw new RangeError(`Invalid insert index ${e}`);if(0===this.chunks.length)return void this.reset(t);const{chunkIndex:n,offset:r}=this.findChunk(e,!0),i=this.cloneChunks(),o=i[n]??[];o.splice(r,0,...t),i[n]=o,this.chunks=this.rebalance(i),this.rebuildIndex()}removeMany(e,t){if(t<=0)return[];if(e<0||e+t>this.length)throw new RangeError(`Invalid remove range ${e}..${e+t}`);const n=this.toArray().slice(e,e+t),r=this.toArray();return r.splice(e,t),this.reset(r),n}replaceRange(e,t,n){this.removeMany(e,t),this.insertMany(e,n)}forEachRange(e,t,n){this.range(e,t).forEach((t,r)=>n(t,e+r))}reset(e){this.chunks=[];for(let t=0;t<e.length;t+=this.chunkSize)this.chunks.push(e.slice(t,t+this.chunkSize));this.rebuildIndex()}cloneChunks(){return this.chunks.map(e=>[...e])}rebalance(e){const t=[];for(const n of e)if(0!==n.length)if(n.length>192)for(let e=0;e<n.length;e+=this.chunkSize)t.push(n.slice(e,e+this.chunkSize));else t.push(n);if(t.length<=1)return t;const n=[];for(const e of t){const t=n[n.length-1];t&&t.length+e.length<=this.chunkSize?t.push(...e):t&&t.length<48?t.push(...e):n.push([...e])}return n}rebuildIndex(){this.idToIndex.clear();let e=0;for(const t of this.chunks)for(const n of t)this.idToIndex.set(n.id,e),e+=1}findChunk(e,t=!1){if(e===this.length&&t){const e=Math.max(0,this.chunks.length-1),t=this.chunks[e];return{chunkIndex:e,offset:t?.length??0}}let n=0;for(let t=0;t<this.chunks.length;t+=1){const r=this.chunks[t];if(!r)continue;const i=n+r.length;if(e<i)return{chunkIndex:t,offset:e-n};n=i}throw new RangeError(`Index ${e} is out of bounds`)}}function zz(e,t,n,r){const i=t.rowsById.get(r);if(!i)return;const o=n.editor.active&&n.editor.anchorRowId===i.id&&("edit"===n.editor.mode||"replace"===n.editor.mode);if(o){const t="edit"===n.editor.mode?"edit":"replace";e.push({kind:"editor",id:`visible:editor:${t}:${i.id}`,anchorRowId:i.id,sectionId:i.sectionId,mode:t,estimateHeight:72,contentVersion:i.contentVersion})}else e.push({kind:"row",id:`visible:row:${i.id}`,rowId:i.id,sectionId:i.sectionId,depth:i.depth,estimateHeight:32,contentVersion:i.contentVersion});if(o||n.activeDetailRowId!==i.id||e.push({kind:"detail",id:`visible:detail:${i.id}`,rowId:i.id,sectionId:i.sectionId,estimateHeight:96,contentVersion:i.contentVersion}),n.editor.active&&n.editor.anchorRowId===i.id&&"add-below"===n.editor.mode&&e.push({kind:"editor",id:`visible:editor:${n.editor.mode}:${i.id}`,anchorRowId:i.id,sectionId:i.sectionId,mode:n.editor.mode,estimateHeight:72,contentVersion:i.contentVersion}),n.expandedGroupIds.has(i.id)){n.loadingRowIds.has(i.id)&&e.push({kind:"loading",id:`visible:loading:${i.id}`,parentRowId:i.id,sectionId:i.sectionId,estimateHeight:48,contentVersion:i.contentVersion});for(const r of i.childIds)zz(e,t,n,r)}}class Iz{heights;tree;nodeIds;constructor(e=[],t=[]){this.heights=[...e],this.tree=[],this.nodeIds=[...t],this.rebuildTree()}static fromHeights(e,t){return new Iz(e,t)}get length(){return this.heights.length}totalHeight(){return this.prefixSum(this.heights.length)}getHeight(e){return this.heights[e]??0}prefixSum(e){let t=0,n=Math.min(e,this.tree.length-1);for(;n>0;)t+=this.tree[n]??0,n-=n&-n;return t}lowerBound(e){if(e<=0)return 0;const t=Math.min(e,this.totalHeight());let n=0,r=1;for(;r<this.tree.length;)r<<=1;for(let i=r;0!==i;i>>=1){const r=n+i;r<this.tree.length&&(this.tree[r]??0)<t&&(n=r,e-=this.tree[r]??0)}return Math.min(n,this.heights.length-1)}upperBound(e){if(0===this.heights.length)return-1;if(e<=0)return 0;const t=this.lowerBound(e);return this.prefixSum(t+1)<e?Math.min(t+1,this.heights.length-1):t}insertMany(e,t,n){this.heights.splice(e,0,...t),this.nodeIds.splice(e,0,...n),this.rebuildTree()}removeMany(e,t){this.heights.splice(e,t),this.nodeIds.splice(e,t),this.rebuildTree()}update(e,t){const n=this.heights[e]??0;if(n===t)return 0;this.heights[e]=t;const r=t-n;let i=e+1;for(;i<this.tree.length;)this.tree[i]=(this.tree[i]??0)+r,i+=i&-i;return r}batchUpdate(e){let t=0;for(const n of e)t+=this.update(n.index,n.nextHeight);return t}getNodeId(e){return this.nodeIds[e]??null}rebuildTree(){this.tree=new Array(this.heights.length+1).fill(0);for(let e=0;e<this.heights.length;e+=1){let t=e+1;const n=this.heights[e]??0;for(;t<this.tree.length;)this.tree[t]=(this.tree[t]??0)+n,t+=t&-t}}}function Nz(e,t){if(e<=0)return 600;return function(e,t,n){return Math.min(n,Math.max(t,e))}(.75*e+120*Math.abs(t),600,3200)}function Tz(e){let t=function(e){const t=new Set;e.sectionIds.forEach(n=>{const r=e.sectionsById.get(n);r?.isDefaultExpanded&&t.add(n)});const n={snapshot:e,expansion:{expandedSectionIds:t,expandedGroupIds:new Set},selection:{bySectionId:wz(e),version:0},detail:{activeRowId:null,version:0},editor:jz({active:!1,mode:"none",anchorRowId:null,sectionId:null,sourceIndex:null,version:0}),hover:{rowId:null},drag:{activeRowId:null,overRowId:null},async:{loadingRowIds:new Set,requestVersionByRowId:new Map,lastAppliedSnapshotVersion:e.version},visible:{seq:Oz.fromArray([]),version:0},viewport:{scrollTop:0,viewportHeight:0,viewportWidth:0,velocityPxPerMs:0,overscanPx:800,isScrolling:!1,range:{startIndex:0,endIndex:-1,overscanStartIndex:0,overscanEndIndex:-1,topOffsetPx:0,bottomOffsetPx:0},anchorNodeId:null,anchorOffsetPx:0,lastScrollTs:0},heights:{index:new Iz,widthBucket:0,measuredByNodeId:new Map,version:0}};return Dz(n)}(e);const n=new Set,r=(e,r={})=>{const i=e(t);i!==t&&(t=i,r.rebuildVisible?t=Dz(t):r.recomputeRange&&(t=Zz(t)),n.forEach(e=>e()))};return{getState:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),actions:{setSnapshot(e){r(t=>{const n=new Set([...t.expansion.expandedSectionIds].filter(t=>e.sectionsById.has(t)));0===n.size&&e.sectionIds.forEach(t=>{const r=e.sectionsById.get(t);r?.isDefaultExpanded&&n.add(t)});const r=new Set([...t.expansion.expandedGroupIds].filter(t=>{const n=e.rowsById.get(t);return Boolean(n?.isExpandable)})),i=function(e,t,n){const r=wz(t);return n.forEach(n=>{n.iterateRanges((n,i)=>{for(let o=n;o<=i;o+=1){const n=e.rowIdBySelectableOrdinal.get(o);if(!n)continue;const i=t.rowsById.get(n);null!=i?.selectableOrdinal&&r.get(i.sectionId)?.addPoint(i.selectableOrdinal)}})}),r}(t.snapshot,e,t.selection.bySectionId),o=new Set([...t.async.loadingRowIds].filter(t=>{const n=e.rowsById.get(t);return Boolean(n?.hasAsyncChildren&&!n.childrenLoaded)}));return{...t,snapshot:e,expansion:{expandedSectionIds:n,expandedGroupIds:r},selection:{bySectionId:i,version:t.selection.version+1},detail:{activeRowId:t.detail.activeRowId&&e.rowsById.has(t.detail.activeRowId)?t.detail.activeRowId:null,version:t.detail.version+1},editor:jz({...t.editor,anchorRowId:t.editor.anchorRowId&&e.rowsById.has(t.editor.anchorRowId)?t.editor.anchorRowId:null,sectionId:t.editor.sectionId&&e.sectionsById.has(t.editor.sectionId)?t.editor.sectionId:null,version:t.editor.version+1}),async:{...t.async,loadingRowIds:o,lastAppliedSnapshotVersion:e.version}}},{rebuildVisible:!0})},toggleSectionExpansion(e,t="toggle"){r(n=>{const r=new Set(n.expansion.expandedSectionIds);return"open"===t||!r.has(e)?r.add(e):r.delete(e),{...n,expansion:{...n.expansion,expandedSectionIds:r}}},{rebuildVisible:!0})},toggleGroupExpansion(e){r(t=>{const n=new Set(t.expansion.expandedGroupIds);return n.has(e)?n.delete(e):n.add(e),{...t,expansion:{...t.expansion,expandedGroupIds:n}}},{rebuildVisible:!0})},resetSelection(){r(e=>({...e,selection:{bySectionId:wz(e.snapshot),version:e.selection.version+1}}))},resetStepGroupAccordion(){r(e=>({...e,expansion:{...e.expansion,expandedGroupIds:new Set}}),{rebuildVisible:!0})},setHoveredRow(e){r(t=>t.hover.rowId===e?t:{...t,hover:{rowId:e}})},setViewportSize(e,t){r(n=>n.viewport.viewportWidth===e&&n.viewport.viewportHeight===t?n:{...n,viewport:{...n.viewport,viewportWidth:e,viewportHeight:t}},{recomputeRange:!0})},flushScrollFrame(e,t){r(n=>{const r=e-n.viewport.scrollTop,i=t-n.viewport.lastScrollTs,o=i>0?r/i:n.viewport.velocityPxPerMs;return{...n,viewport:{...n.viewport,scrollTop:e,velocityPxPerMs:o,isScrolling:!0,lastScrollTs:t}}},{recomputeRange:!0})},settleScroll(){r(e=>({...e,viewport:{...e.viewport,velocityPxPerMs:0,isScrolling:!1}}),{recomputeRange:!0})},setMeasuredHeights(e){r(t=>{if(0===e.length)return t;const n=new Map(t.heights.measuredByNodeId),r=[];return e.forEach(e=>{const i=t.visible.seq.indexOfId(e.nodeId);if(-1===i)return;if(t.visible.seq.get(i).contentVersion!==e.contentVersion)return;const o=Math.max(1,Math.ceil(e.nextHeight));t.heights.index.getHeight(i)!==o&&(n.set(e.nodeId,{height:o,contentVersion:e.contentVersion}),r.push({...e,index:i,nextHeight:o}))}),0===r.length?t:(t.heights.index.batchUpdate(r),{...t,heights:{...t.heights,measuredByNodeId:n,version:t.heights.version+1}})},{recomputeRange:!0})},toggleRowSelection(e,t){r(n=>({...n,selection:{bySectionId:Mz(n.snapshot,n.selection.bySectionId,e,t),version:n.selection.version+1}}))},toggleSectionSelection(e,t){r(n=>({...n,selection:{bySectionId:Ez(n.snapshot,n.selection.bySectionId,e,t),version:n.selection.version+1}}))},removeRowSelection(e){r(t=>({...t,selection:{bySectionId:Az(t.snapshot,t.selection.bySectionId,e),version:t.selection.version+1}}))},setDetailRow(e){r(t=>t.detail.activeRowId===e?t:{...t,detail:{activeRowId:e,version:t.detail.version+1}},{rebuildVisible:!0})},setEditorState(e){r(t=>{const n=jz({...t.editor,...e,version:t.editor.version+1});return r=t.editor,i=n,r.active===i.active&&r.mode===i.mode&&r.anchorRowId===i.anchorRowId&&r.sectionId===i.sectionId&&r.sourceIndex===i.sourceIndex&&r.nlpName===i.nlpName?t:{...t,editor:n};var r,i},{rebuildVisible:!0})},setLoadingRow(e,t){r(n=>{const r=new Set(n.async.loadingRowIds);return t?r.add(e):r.delete(e),{...n,async:{...n.async,loadingRowIds:r}}},{rebuildVisible:!0})},setDragState(e,t=null){r(n=>({...n,drag:{activeRowId:e,overRowId:t}}))},clearDrag(){r(e=>({...e,drag:{activeRowId:null,overRowId:null}}))}}}}function Dz(e){const t={expandedSectionIds:e.expansion.expandedSectionIds,expandedGroupIds:e.expansion.expandedGroupIds,activeDetailRowId:e.detail.activeRowId,editor:e.editor,loadingRowIds:e.async.loadingRowIds},n=function(e,t){const n=[];for(const r of e.sectionIds){const i=e.sectionsById.get(r);if(i&&(n.push({kind:"section",id:`visible:section:${r}`,sectionId:r,estimateHeight:40,contentVersion:e.version}),t.expandedSectionIds.has(r))){0===i.rowIds.length&&n.push({kind:"empty",id:`visible:empty:${r}`,sectionId:r,estimateHeight:88,contentVersion:e.version});for(const r of i.rowIds)zz(n,e,t,r);t.editor.active&&"add-last"===t.editor.mode&&t.editor.sectionId===r&&n.push({kind:"editor",id:`visible:editor:add-last:${r}`,anchorRowId:null,sectionId:r,mode:"add-last",estimateHeight:72,contentVersion:e.version})}}return Oz.fromArray(n)}(e.snapshot,t),r=n.toArray(),i=new Set(r.map(e=>e.id)),o=new Map,a=r.map(t=>{const n=e.heights.measuredByNodeId.get(t.id);return n&&n.contentVersion===t.contentVersion?(o.set(t.id,n),n.height):t.estimateHeight}),l=Iz.fromHeights(a,r.map(e=>e.id)),s=new Map;return o.forEach((e,t)=>{i.has(t)&&s.set(t,e)}),Zz({...e,visible:{seq:n,version:e.visible.version+1},heights:{...e.heights,index:l,measuredByNodeId:s}})}function Zz(e){const t=Nz(e.viewport.viewportHeight,e.viewport.velocityPxPerMs),n=function(e,t,n,r){if(0===e.length)return{startIndex:0,endIndex:-1,overscanStartIndex:0,overscanEndIndex:-1,topOffsetPx:0,bottomOffsetPx:0};if(n<=0){const t=Math.min(e.length-1,23);return{startIndex:0,endIndex:t,overscanStartIndex:0,overscanEndIndex:t,topOffsetPx:0,bottomOffsetPx:e.totalHeight()-e.prefixSum(t+1)}}const i=Math.max(0,t),o=i+n,a=Math.max(0,i-r),l=o+r,s=e.lowerBound(i),c=e.upperBound(o),d=e.lowerBound(a),u=e.upperBound(l);return{startIndex:s,endIndex:c,overscanStartIndex:d,overscanEndIndex:u,topOffsetPx:e.prefixSum(d),bottomOffsetPx:e.totalHeight()-e.prefixSum(u+1)}}(e.heights.index,e.viewport.scrollTop,e.viewport.viewportHeight,t),r=n.startIndex<=n.endIndex?e.heights.index.getNodeId(n.startIndex):null,i=n.startIndex<=n.endIndex?e.viewport.scrollTop-e.heights.index.prefixSum(n.startIndex):0;return{...e,viewport:{...e.viewport,overscanPx:t,range:n,anchorNodeId:r,anchorOffsetPx:i}}}function jz(e){return e.active&&"none"!==e.mode?{active:!0,mode:e.mode,anchorRowId:e.anchorRowId??null,sectionId:e.sectionId??null,sourceIndex:e.sourceIndex??null,nlpName:e.nlpName,version:e.version}:{active:!1,mode:"none",anchorRowId:null,sectionId:null,sourceIndex:null,nlpName:void 0,version:e.version}}const Rz=i.memo(i.forwardRef((t,r)=>{const i=h(()=>_z(t),[]),o=a(Tz(i.snapshot)),s=a(i.snapshot),c=a(t.onSelectClick),d=a(null),f=a(null),C=a(null),m=a(0),g=h(()=>_z(t,s.current),[t.defaultExpanded,t.isDraggable,t.isViewPrivilegeMode,t.tableData,t.tableMeta]);l(()=>{(function(e,t){if(e===t)return!0;if(e.columns.length!==t.columns.length)return!1;for(let n=0;n<e.columns.length;n+=1){const r=e.columns[n],i=t.columns[n];if(!r||!i)return!1;if(r.id!==i.id||r.header!==i.header||r.accessor!==i.accessor||r.width!==i.width||r.className!==i.className||Boolean(r.renderCell)!==Boolean(i.renderCell)||Boolean(r.renderExtraInfo)!==Boolean(i.renderExtraInfo))return!1}if(!qz(e.sectionIds,t.sectionIds))return!1;if(e.sectionsById.size!==t.sectionsById.size)return!1;for(let n=0;n<e.sectionIds.length;n+=1){const r=e.sectionIds[n];if(!r)return!1;const i=e.sectionsById.get(r),o=t.sectionsById.get(r);if(!i||!o)return!1;if(i.title!==o.title||i.kind!==o.kind||i.selectableOrdinalStart!==o.selectableOrdinalStart||i.selectableOrdinalEnd!==o.selectableOrdinalEnd||i.selectableCount!==o.selectableCount||i.metaData!==o.metaData||i.actionCell!==o.actionCell||i.isDefaultExpanded!==o.isDefaultExpanded||!qz(i.rowIds,o.rowIds))return!1}if(!qz(e.rowIds,t.rowIds))return!1;if(e.rowsById.size!==t.rowsById.size||e.blocksById.size!==t.blocksById.size)return!1;for(let n=0;n<e.rowIds.length;n+=1){const r=e.rowIds[n];if(!r)return!1;const i=e.rowsById.get(r),o=t.rowsById.get(r);if(!i||!o)return!1;if(i.sectionId!==o.sectionId||i.parentId!==o.parentId||i.depth!==o.depth||i.kind!==o.kind||i.name!==o.name||i.displayName!==o.displayName||i.message!==o.message||i.status!==o.status||i.marginLeft!==o.marginLeft||i.raw!==o.raw||i.isDisabled!==o.isDisabled||i.isDraggable!==o.isDraggable||i.isSelectable!==o.isSelectable||i.isExpandable!==o.isExpandable||i.hasAsyncChildren!==o.hasAsyncChildren||i.childrenLoaded!==o.childrenLoaded||i.detailCapable!==o.detailCapable||i.selectableOrdinal!==o.selectableOrdinal||i.subtreeSelectableStart!==o.subtreeSelectableStart||i.subtreeSelectableEnd!==o.subtreeSelectableEnd||i.blockId!==o.blockId||i.contentVersion!==o.contentVersion||!qz(i.childIds,o.childIds)||!qz(i.ancestorBlockIds,o.ancestorBlockIds))return!1}for(const[n,r]of e.blocksById.entries()){const e=t.blocksById.get(n);if(!e)return!1;if(r.kind!==e.kind||r.startRowId!==e.startRowId||r.endRowId!==e.endRowId||r.sectionId!==e.sectionId||r.parentBlockId!==e.parentBlockId||r.familyId!==e.familyId||r.selectableStartOrdinal!==e.selectableStartOrdinal||r.selectableEndOrdinal!==e.selectableEndOrdinal||r.selectableLeafCount!==e.selectableLeafCount||r.startDepth!==e.startDepth||!qz(r.childRowIds,e.childRowIds)||!qz(r.allRowIds,e.allRowIds))return!1}return!0})(s.current,g.snapshot)||(s.current=g.snapshot,o.current.actions.setSnapshot(g.snapshot))},[g.snapshot]);const v=M(o.current.subscribe,o.current.getState,o.current.getState),y=h(()=>Vz(v),[v.selection.version,v.snapshot.version]);l(()=>{c.current=t.onSelectClick},[t.onSelectClick]),l(()=>{c.current?.(y)},[y]),l(()=>{const e=function(e,t){const n=Uz(t),r=n?t.sectionsById.get(n):null;if(e.editMode){const n=String(e.editMode),i=t.rowsById.get(n);return{active:Boolean(i),mode:i?"edit":"none",anchorRowId:i?.id??null,sectionId:i?.sectionId??null,sourceIndex:i&&r?r.rowIds.indexOf(i.id):null}}if(!e.AddNlp?.action||!n||!r)return{active:!1,mode:"none"};const i=null!=e.AddNlp.sourceIndex?e.AddNlp.sourceIndex:null,o=null!=i?r.rowIds[i]??null:null;return{active:!0,mode:{addBelow:"add-below",addLast:"add-last",replaceNlp:"replace",EditNlp:"replace"}[e.AddNlp.action]??"none",anchorRowId:o,sectionId:n,sourceIndex:i,nlpName:e.AddNlp.nlpName}}(t,o.current.getState().snapshot);o.current.actions.setEditorState(e),e.active&&o.current.actions.setDetailRow(null),e.active&&"add-last"===e.mode&&e.sectionId&&o.current.actions.toggleSectionExpansion(e.sectionId,"open")},[t.AddNlp,t.editMode,v.snapshot.version]),u(()=>{const e=d.current;if(!e)return;const t=()=>{o.current.actions.setViewportSize(e.clientWidth,e.clientHeight)};t();const n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]),l(()=>{const e=d.current;if(!e)return;const t=e=>{f.current=null,o.current.actions.flushScrollFrame(m.current,e)},n=()=>{m.current=e.scrollTop,null==f.current&&(f.current=requestAnimationFrame(t)),null!=C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{o.current.actions.settleScroll()},120)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n),null!=f.current&&cancelAnimationFrame(f.current),null!=C.current&&window.clearTimeout(C.current)}},[]),b(r,()=>({resetSelection:()=>{o.current.actions.resetSelection()},handleUpdateCheckbox:e=>{const t=e?.stepId;t&&o.current.actions.removeRowSelection(t)},deleteRow:e=>{const t=e?.stepId;t&&o.current.actions.removeRowSelection(t)},resetStepGroupAccordion:()=>{o.current.actions.resetStepGroupAccordion()}}),[]);const w=h(()=>v.snapshot.columns.map(e=>`${e.width}px`).join(" "),[v.snapshot.columns]),E=h(()=>{const e=new Map;return t.tableData.forEach(t=>{const n=v.snapshot.sectionIds.find(e=>{const n=v.snapshot.sectionsById.get(e);return n?.title===t?.title});n&&e.set(n,t)}),e},[t.tableData,v.snapshot.sectionIds,v.snapshot.version]),A=h(()=>{const e=new Map;return v.snapshot.sectionIds.forEach(t=>{const n=v.snapshot.sectionsById.get(t);n?.rowIds.forEach((t,n)=>{e.set(t,n)})}),e},[v.snapshot.version]),x=h(()=>{const e=Uz(v.snapshot);if(!e)return[];const t=v.snapshot.sectionsById.get(e);return t?.rowIds.filter(e=>{const t=v.snapshot.rowsById.get(e);return Boolean(t?.isDraggable)})??[]},[v.snapshot.version,t.isDraggable]),L=h(()=>{const{overscanStartIndex:e,overscanEndIndex:t}=v.viewport.range;if(t<e)return[];return v.visible.seq.range(e,t+1).map((t,n)=>{const r=e+n;return{node:t,index:r,top:v.heights.index.prefixSum(r)}})},[v.visible.version,v.viewport.range.overscanStartIndex,v.viewport.range.overscanEndIndex,v.heights.version]),k=p(e=>{o.current.actions.setMeasuredHeights([{index:0,nodeId:e.node.id,nextHeight:e.height,contentVersion:e.node.contentVersion}])},[]),H=p(e=>{o.current.actions.toggleSectionExpansion(e)},[]),S=p((e,t)=>{o.current.actions.toggleSectionSelection(e,t)},[]),_=p(e=>{const t=o.current.getState().detail.activeRowId;o.current.actions.setDetailRow(t===e?null:e)},[]),V=p(e=>{const n=o.current.getState(),r=n.snapshot.rowsById.get(e);if(!r)return;if(!n.expansion.expandedGroupIds.has(e)&&r.hasAsyncChildren&&!r.childrenLoaded){const i=n.snapshot.sectionsById.get(r.sectionId),a=A.get(e);o.current.actions.setLoadingRow(e,!0),t.handleAccordion?.({...r.raw,tableType:i?.title,serialNumber:null!=a?String(a+1):void 0})}o.current.actions.toggleGroupExpansion(e)},[t.handleAccordion,A]),O=p(e=>{const n=e.active.id;o.current.actions.setDragState(n),t.handleDragStart?.()},[t.handleDragStart]),z=p(e=>{const n=e.active.id,r=e.over?.id;if(o.current.actions.clearDrag(),!r||n===r)return;const i=Uz(o.current.getState().snapshot);if(!i)return;const a=o.current.getState().snapshot.sectionsById.get(i);if(!a)return;const l=a.rowIds.indexOf(n),s=a.rowIds.indexOf(r);-1!==l&&-1!==s&&t.onDragEnd?.(l,s)},[t.onDragEnd]),N=v.heights.index.totalHeight(),T=v.snapshot.sectionIds.length>0;return n("div",{className:I("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":t.withFixedHeader}),children:[!1!==t.isHeaderRequired&&!t.isClientSide&&e("table",{cellSpacing:0,className:I("ff-accordion-table",{"ff-accordion-fixed-header":t.withFixedHeader}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:v.snapshot.columns.map((n,r)=>e("th",{style:{width:n.width},className:I("ff-table-header",t.headerType&&`ff-accordion-table--${t.headerType}-bg`),children:e(U,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:n.header})},`${n.id}:${r}`))})})}),e(Zo,{collisionDetection:Ci,modifiers:[ih],onDragStart:O,onDragEnd:z,children:e(ha,{items:x,strategy:da,children:e("div",{ref:d,className:"ff-accordion-table-body",style:{height:t.height??"100%",overflowY:"auto",position:"relative"},children:T?e("div",{style:{height:`${Math.max(N,1)}px`,position:"relative"},children:L.map(({node:n,index:r,top:i})=>e(Pz,{node:n,top:i,onMeasure:k,children:Bz({node:n,index:r,props:t,state:v,store:o.current,gridTemplateColumns:w,selectionPayload:y,sectionSourceById:E,topLevelIndexByRowId:A,onToggleSectionExpansion:H,onToggleSectionSelection:S,onToggleDetailRow:_,onToggleGroup:V})},n.id))}):t.noDataContent??null})})})]})}));function Bz({node:t,index:n,props:r,state:o,store:a,gridTemplateColumns:l,selectionPayload:s,sectionSourceById:c,topLevelIndexByRowId:d,onToggleSectionExpansion:u,onToggleSectionSelection:f,onToggleDetailRow:h,onToggleGroup:p}){switch(t.kind){case"section":{const n=o.snapshot.sectionsById.get(t.sectionId);if(!n)return e(i.Fragment,{});const a=c.get(t.sectionId),l=s[n.title]??new Set,d=n.rowIds.length,h=d>0&&l.size===d,p=l.size>0&&l.size<d,C=l.size>0&&d>0&&Boolean(n.actionCell),m=n.title.includes("Script")&&h;return e("div",{className:"column-table-accordion",children:e(oz,{isViewPrivilegeMode:r.isViewPrivilegeMode,onAccordionClick:()=>u(t.sectionId),showActionCell:C,handleMainCheckbox:(e,r)=>{e===n.title&&f(t.sectionId,r)},isAllSelected:()=>h,isPartialSelected:()=>p,title:n.title,totalRows:d,expanded:o.expansion.expandedSectionIds.has(t.sectionId),metaData:n.metaData,actionCell:n.actionCell,row:a??{title:n.title,data:n.rowIds.map(e=>o.snapshot.rowsById.get(e)?.raw)},tableMeta:r.tableMeta,isHeaderRequired:r.isHeaderRequired,isBulkEnable:m,isClientSide:r.isClientSide,isMaximize:r.isMaximize})})}case"row":{const s=o.snapshot.rowsById.get(t.rowId);return s?e(Fz,{row:s,node:t,props:r,state:o,store:a,gridTemplateColumns:l,rowIndex:d.get(s.id)??n,onToggleDetailRow:h,onToggleGroup:p}):e(i.Fragment,{})}case"detail":{const n=o.snapshot.rowsById.get(t.rowId),i=n?r.handleViewComponent?.(n.raw,()=>a.actions.setDetailRow(null)):null;return e("div",{className:"steps-edit-row",style:{padding:"8px 16px"},children:i?e(i,{}):e(U,{as:"div",lineHeight:"18px",children:"Detail unavailable"})})}case"editor":{const i=t.anchorRowId?o.snapshot.rowsById.get(t.anchorRowId):null,a=function(e,t,n){return{...n?.raw??{},stepId:n?.id??"new-row",isNew:!0,name:e.editor.nlpName??n?.name??""}}(o,0,i??null),l=o.editor.sourceIndex??(t.anchorRowId?d.get(t.anchorRowId)??n:n);return e("div",{className:"steps-edit-row",children:"edit"===t.mode&&w(r.editComponent)?y(r.editComponent,{rowData:i?.raw??a,rowIndex:l+1}):w(r.NlpComponent)?y(r.NlpComponent,{rowData:a,rowIndex:l}):e(U,{as:"div",lineHeight:"18px",children:"Editor unavailable"})})}case"loading":return e("div",{className:"steps-edit-row",style:{padding:"8px 16px"},children:e(U,{as:"div",lineHeight:"18px",children:"Loading..."})});case"empty":return e("div",{className:"steps-no-data-content",children:r.noDataContent??e(U,{as:"div",lineHeight:"18px",children:"No data available"})})}}function Pz({node:t,top:n,onMeasure:r,children:i}){const o=a(null);return u(()=>{const e=o.current;if(!e)return;const n=()=>{r({node:t,height:e.getBoundingClientRect().height})};n();const i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[t,r]),e("div",{ref:o,"data-nodeid":t.id,style:{position:"absolute",top:n,left:0,right:0},children:i})}function Fz({row:t,props:r,state:i,store:o,gridTemplateColumns:a,rowIndex:l,onToggleDetailRow:s,onToggleGroup:c}){const d=i.snapshot.sectionsById.get(t.sectionId),u=xz(i.snapshot,i.selection.bySectionId,t.id),f=(h=i.snapshot,p=i.selection.bySectionId,C=t.id,Lz(h,p,C).partial);var h,p,C;const m=null==t.parentId&&!r.isViewPrivilegeMode&&!r.isClientSide,g=Boolean(!1!==r.isDraggable&&!r.isClientSide&&null==t.parentId&&t.isDraggable),v=null!=t.parentId&&!t.isDisabled&&!String(t.displayName??t.name??"").includes("End")&&Boolean(r.handleViewComponent),y=i.expansion.expandedGroupIds.has(t.id),w=!g,{attributes:b,listeners:E,setNodeRef:M,transform:A,transition:x}=wa({id:t.id,disabled:w}),L={transform:Qr.Transform.toString(A),transition:x};return e("div",{ref:M,"data-rowid":t.id,className:I("sortable-item",{"disabled-inner-row":t.isDisabled||w}),onMouseEnter:()=>{o.actions.setHoveredRow(t.id),null==t.parentId&&r.handleParentRowHover?.(t.id)},onMouseLeave:()=>{o.actions.setHoveredRow(null),null==t.parentId&&r.handleParentRowHoverOut?.(t.id)},style:{...L,display:"grid",gridTemplateColumns:a,alignItems:"center"},children:i.snapshot.columns.map((i,a)=>{const h=t.raw?.[i.accessor],p=d?.title,C=t.raw?._id||t.raw?.id,M=i.renderCell?i.renderCell({value:h,row:t.raw,column:i.accessor,index:l,tableType:p,refId:C}):h??"--";return e("div",{className:i.className,style:{padding:0===a?null==t.parentId?g?"4px 8px 4px 0":"4px 8px 4px 24px":"7px 8px":null==t.parentId&&"Steps"===p?"4px 8px":"7px 8px",maxWidth:i.width},children:n(U,{as:"div",lineHeight:"18px",className:"ff-data-checkbox-container",children:[0===a&&g&&e("div",{className:w?"ff-table-drag":"ff-table-drag-icon",...E,...b,children:e(F,{name:"drag",className:w?"drag-icon-disabled":"drag-icon"})}),0===a&&m&&e("span",{className:u||f?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(ne,{onChange:e=>o.actions.toggleRowSelection(t.id,e.target.checked),checked:u,partial:f,disabled:"special-end"===t.kind})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===a?t.marginLeft:0,display:"flex",alignItems:"center",gap:"8px"},onDoubleClick:()=>{0===a&&v&&s(t.id)},children:[e("div",{style:{minWidth:0,flex:1},children:M}),0===a&&t.isExpandable&&!r.isClientSide&&e("button",{type:"button",className:"ff-accordion-arrow "+(y?"expanded":""),style:{border:0,background:"transparent",padding:0},onClick:()=>c(t.id),children:e(F,{name:"arrow_right",color:y?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12})}),i.renderExtraInfo?.({value:h,row:t.raw,column:i.accessor,index:l,tableType:p,refId:C})]})]})},`${t.id}:${i.id}`)})})}function Uz(e){return e.sectionIds.find(t=>{const n=e.sectionsById.get(t);return"steps"===n?.kind||"Steps"===n?.title})??null}function qz(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}Rz.displayName="StepLandingTableV2";const Wz=i.memo(i.forwardRef(({tableMeta:t=[],tableData:r=[],noDataContent:i,height:o="100%",withFixedHeader:a=!1,headerType:s,handleDragStart:d,onDragEnd:u,editMode:f,editComponent:C,NlpComponent:m,AddNlp:g,handleAccordion:v,handleViewComponent:y,onSelectClick:w,loading:E=!1,isViewPrivilegeMode:M=!1,defaultExpanded:A="Steps",isHeaderRequired:x=!0,isClientSide:L=!1,highlightKey:k,onHighlightComplete:H,isDraggable:S=!0,isMaximize:_=!1,handleParentRowHover:V,handleParentRowHoverOut:O},z)=>{const[N,T]=c(null),[D,Z]=c(null),[j,R]=c({}),[B,P]=c(new Map),[F,q]=c(!1),W=p((e,t)=>{const n=r.find(t=>t.title===e);n&&n.data&&0!==n.data.length&&R(n=>({...n,[e]:"open"===t||!n[e]}))},[r]),Q=h(()=>e=>j[e]??!1,[j]),G=p(e=>{Z(t=>t===e?.stepId?null:e?.stepId)},[]),Y=p(e=>{G(e);const t=y?.(e,G);t?T(()=>t):G(null)},[y,G]),[X,J]=c(Object.fromEntries(r.map(e=>[e.title,new Set]))),[$,ee]=c(new Set);l(()=>{if(J(e=>function(e,t){const n={};return e.forEach(e=>{const r=e.data.map(e=>e.stepId),i=t[e.title]||new Set,o=new Set([...i].filter(e=>r.includes(e)));n[e.title]=o}),n}(r,e)),ee(e=>function(e,t){const n=e.reduce((e,t)=>(t.data.forEach(t=>e.add(t.stepId)),e),new Set);return new Set([...t].filter(e=>n.has(e)))}(r,e)),R(e=>function(e,t,n){const r={Steps:"Steps",Depends:"Depends on Scripts",PRE:"Pre Conditions",POST:"Post Conditions"},i={};return e.forEach(e=>{const o=e.title,a=o in t,l="All"===n?Object.values(r).includes(o):o===r[n];i[o]=a?t[o]??!1:l}),i}(r,e,A)),X&&!ez(X))return;const{updateSelectRow:e,updateStepPartialSelect:t}=((e,t,n)=>{const r=JO(e),i=new Set(t.Steps),o=new Set(n);return r?.forEach(e=>{const t=e?.childIds;if(0===t?.length)return;const n=t.every(e=>i.has(e)),a=t.some(e=>i.has(e));if(n?(i.add(e.start.stepId),i.add(e.end.stepId)):(i.delete(e.start.stepId),i.delete(e.end.stepId)),KO(e?.start)&&(a||n)){const t=e?.start?.conditionSearchKey,n=$O(t),a=r?.get(n)?.allIds;if(0===a?.length)return;a?.forEach(e=>{i.add(e),o.delete(e)})}a&&!n?(o.add(e.start.stepId),o.add(e.end.stepId)):(o.delete(e.start.stepId),o.delete(e.end.stepId))}),{updateSelectRow:{...t,Steps:i},updateStepPartialSelect:o}})(r,X,$);t&&ee(t),e&&J(e)},[r]),l(()=>{if(ez(X)){const e={...X,partialSelected:$};w?.(e)}else w?.(X)},[X]);const te=p((e,t)=>{const n=r.find(t=>t.title===e)?.data.map(e=>e.stepId);n&&(J(r=>({...r,[e]:t?new Set(n):new Set})),t||ee(new Set))},[r]),ne=p((e,t,n,r)=>{const{updateSelectRow:i,updateStepPartialSelect:o}=((e,t,n,r,i,o="Steps")=>{const a=new Set(r[o]);if("Steps"===o&&(t?.isSpecialNlp||t?.conditionId||t?.parentSpecialNlpId)){const{updateStepPartialSelect:l}=function(r){const o=new Set(i),l=JO(e),s=e=>{const t=e?.conditionSearchKey,n=$O(t),r=l.get(n);r&&"IfCondition"===r.start.nlpName&&0===r?.start?.marginLeft&&c(r.start),!r?.start?.conditionSearchKey?.includes("/")||"IfCondition"===r?.start.nlpName&&0===r?.start?.marginLeft||s(r.start)},c=e=>{if(e?.isSpecialNlp){const t=e?.specialNlpId||e?.conditionSearchKey,r=t&&l.get(t);r&&Array.isArray(r.allIds)&&r.allIds.forEach(e=>{o.delete(e),n?a.add(e):a.delete(e)})}else n?a.add(e?.stepId):a.delete(e?.stepId)},d=e=>{let c=!0;const d=e=>{const t=e?.childIds;if(KO(e?.start)){const t=(e=>e.includes("/")&&e.split("/")[0]||e)(e?.start?.conditionSearchKey),o=l.get(t),a=o?.start?.stepId,c=i.has(a);n&&!c&&s(r)}if(0===t?.length)return;const u=t.every(e=>a.has(e)),f=t.some(e=>a.has(e));if(u?(a.add(e.start?.stepId),a.add(e.end?.stepId)):(a.delete(e.start?.stepId),a.delete(e.end?.stepId)),f&&!u?(o.add(e.start?.stepId),o.add(e.end?.stepId)):(o.delete(e.start?.stepId),o.delete(e.end?.stepId)),e?.start?.parentSpecialNlpId){const t=l.get(e.start.parentSpecialNlpId);t&&d(t)}if(e?.start?.conditionSearchKey){const t=$O(e?.start?.conditionSearchKey),n=e?.start?.conditionSearchKey,r=e?.start?.conditionId;if(n===r&&c){c=!1;const e=l.get(t);return void(e&&d(e))}if(n===r)return;const i=l.get(t);return void(i&&d(i))}};if(e?.conditionSearchKey===e?.conditionId&&!e?.parentSpecialNlpId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);return void(t&&d(t))}if(e?.conditionSearchKey||e?.conditionId||!e?.specialNlpId||e?.parentSpecialNlpId){if(e?.conditionSearchKey&&e?.conditionSearchKey===e?.conditionId&&e?.conditionId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);t&&d(t)}if(e?.parentSpecialNlpId){const t=l.get(e?.parentSpecialNlpId);t&&d(t)}if(e?.conditionSearchKey){const r=l.get(e?.conditionSearchKey).childIds;let i=0;r.forEach(e=>{a.has(e)&&i++});const s=i>0&&i<r.length,u=0===i,f=e?.conditionSearchKey;if(!f.includes("/")&&f&&!n&&!s&&u){const t=e?.conditionId;let n=[];if(l&&t)for(const[e,r]of l.entries())e.includes(t)&&e.includes("/")&&n.push(r);n.forEach(e=>{["ElseIfCondition","ElseCondition"].includes(e.start?.nlpName)&&(e.childIds?.forEach(e=>{a.delete(e),o.delete(e)}),a.delete(e.start.stepId),a.delete(e.end.stepId),o.delete(e.start.stepId),o.delete(e.end.stepId))})}const h=!t?.isSpecialNlp||KO(e)||t?.specialNlpId?e.conditionSearchKey:$O(e.conditionSearchKey);c=!0;const p=l.get(h);p&&d(p)}}};return c(r),d(r),{updateStepPartialSelect:o}}(t);return{updateSelectRow:{...r,[o]:a},updateStepPartialSelect:l}}return n?a.add(t.stepId):a.delete(t.stepId),{updateSelectRow:{...r,[o]:a}}})(e,t,n,X,$,r);o&&ee(o),i&&J(i)},[X,$]),re=p((e,t,n)=>{ne(r,t,n,e)},[r,ne]),ie=p((e,t)=>{const n=t>0&&X[e]?.size===t;return e.includes("Script")&&q(n),n},[X]),oe=p((e,t)=>{const n=X[e]?.size||0;return n>0&&n<t},[X]),ae=p(e=>B.has(e),[B]),le=p(e=>{ae(e?.stepId)||(D&&G(null),v?.(e)),E||P(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})},[ae,D,G,v,E]),se=p(n=>"Steps"!==n.title||M?e(GO,{onHighlightComplete:H,highlightKey:k,draggable:!1,editMode:f,withCheckbox:!M,editComponent:C,columns:t,data:n.data,headerType:s,noDataContent:i,tableType:n.title,onSelect:re,selectedRows:X,viewModeId:D,ViewComponent:N,handleClick:Y,handleStepGroupExpand:le,isStepGroupExpanded:ae,isViewPrivilegeMode:M,height:n?.data?.length<=15?"auto":o,isClientSide:L}):e(GO,{onHighlightComplete:H,highlightKey:k,draggable:S,columns:t,onDragEnd:u,data:n.data,headerType:s,withCheckbox:!0,editMode:f,editComponent:C,noDataContent:i,NlpComponent:m,AddNlp:g,tableType:n.title,handleDragStart:()=>{B.clear(),d?.()},onSelect:re,selectedRows:X,viewModeId:D,ViewComponent:N,handleClick:Y,handleStepGroupExpand:le,isStepGroupExpanded:ae,stepPartialSelect:$,height:0===n?.data?.length?"300px":n?.data?.length<=12?"auto":o,isClientSide:L,handleRowHover:V,handleRowHoverOut:O}),[M,H,k,S,t,u,s,f,C,i,m,g,B,d,re,X,D,N,Y,le,ae,$,r.length,o,L]);return b(z,()=>({resetSelection:()=>{J(Object.fromEntries(r.map(e=>[e.title,new Set]))),ee(new Set)},handleUpdateCheckbox:(e,t)=>{const n=e?.parentSpecialNlpId,i=e?.conditionSearchKey;(n||i)&&ne(t||r,e,!1)},deleteRow:e=>{J(t=>Object.fromEntries(Object.entries(t)?.map(([t,n])=>[t,new Set([...n].filter(t=>t!==e?.stepId))])))},resetStepGroupAccordion:()=>{P(new Map)}}),[r,ne]),l(()=>{K(g)||(T(()=>null),Z(null),"addLast"===g?.action&&W("Steps","open"))},[g]),n("div",{className:I("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":a}),children:[x&&!L&&e("table",{cellSpacing:0,className:I("ff-accordion-table",{"ff-accordion-fixed-header":a}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:t.map((t,n)=>e("th",{style:{width:t?.width},className:I("ff-table-header",s&&`ff-accordion-table--${s}-bg`),children:e(U,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:t.header})},`${t.header}-${n}`))})})}),e("div",{className:"ff-accordion-table-body",style:{height:o,overflowY:"auto"},children:r?.map(r=>{const{title:i,data:o,actionCell:a,metaData:l}=r,s=o.length,c=Q(i),d=X[i]?.size??0;return n("div",{className:"column-table-accordion",children:[e(oz,{isViewPrivilegeMode:M,onAccordionClick:W,showActionCell:d>0&&s>0&&a,handleMainCheckbox:te,isAllSelected:ie,isPartialSelected:oe,title:i,totalRows:s,expanded:c,metaData:l,actionCell:a,row:r,tableMeta:t,isHeaderRequired:x,isBulkEnable:F,isClientSide:L,isMaximize:_}),c&&se(r)]},i)})})]})}));Wz.displayName="LegacyStepLandingTable";const Qz=i.memo(i.forwardRef((t,n)=>t.useV2Engine?e(Rz,{...t,ref:n}):e(Wz,{...t,ref:n})));Qz.displayName="StepLandingTable";var Gz,Kz,Yz,Xz,Jz,$z,eI,tI,nI,rI,iI,oI,aI,lI,sI,cI,dI,uI,fI,hI,pI,CI,mI,gI,vI,yI,wI,bI,EI,MI,AI,xI,LI,kI,HI,SI,_I,VI,OI,zI,II,NI,TI,DI,ZI,jI,RI,BI,PI,FI,UI,qI,WI,QI,GI,KI,YI,XI,JI,$I,eN,tN,nN,rN,iN,oN,aN,lN,sN,cN,dN,uN,fN,hN,pN,CN,mN,gN,vN,yN,wN,bN,EN,MN,AN,xN,LN,kN,HN,SN,_N,VN={exports:{}};function ON(){return Gz||(Gz=1,VN.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:Q(e)}function r(e){return l(e)?e:G(e)}function i(e){return s(e)?e:K(e)}function o(e){return a(e)&&!c(e)?e:Y(e)}function a(e){return!(!e||!e[u])}function l(e){return!(!e||!e[f])}function s(e){return!(!e||!e[h])}function c(e){return l(e)||s(e)}function d(e){return!(!e||!e[p])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=l,n.isIndexed=s,n.isAssociative=c,n.isOrdered=d,n.Keyed=r,n.Indexed=i,n.Set=o;var u="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",p="@@__IMMUTABLE_ORDERED__@@",C="delete",m=5,g=1<<m,v=g-1,y={},w={value:!1},b={value:!1};function E(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function A(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function L(e){return void 0===e.size&&(e.size=e.__iterate(H)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?L(e)+t:t}function H(){return!0}function S(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function _(e,t){return O(e,t,0)}function V(e,t){return O(e,t,t)}function O(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var z=0,I=1,N=2,T="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",Z=T||D;function j(e){this.next=e}function R(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function P(e){return!!q(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=q(e);return t&&t.call(e)}function q(e){var t=e&&(T&&e[T]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function Q(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?l(e)?e.toSeq():e.fromEntrySeq():le(e)}function K(e){return null==e?ae():a(e)?l(e)?e.entrySeq():e.toIndexedSeq():se(e)}function Y(e){return(null==e?ae():a(e)?l(e)?e.entrySeq():e:se(e)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=z,j.VALUES=I,j.ENTRIES=N,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[Z]=function(){return this},t(Q,n),Q.of=function(){return Q(arguments)},Q.prototype.toSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq {","}")},Q.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Q.prototype.__iterate=function(e,t){return ue(this,e,t,!0)},Q.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(G,Q),G.prototype.toKeyedSeq=function(){return this},t(K,Q),K.of=function(){return K(arguments)},K.prototype.toIndexedSeq=function(){return this},K.prototype.toString=function(){return this.__toString("Seq [","]")},K.prototype.__iterate=function(e,t){return ue(this,e,t,!1)},K.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(Y,Q),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},Q.isSeq=oe,Q.Keyed=G,Q.Set=Y,Q.Indexed=K;var X,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function le(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new ie(e).fromEntrySeq():P(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=de(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=de(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function de(e){return W(e)?new te(e):F(e)?new ie(e):P(e)?new re(e):void 0}function ue(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var l=i[n?o-a:a];if(!1===t(l[1],r?l[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new j(function(){var e=i[n?o-a:a];return a++>o?B():R(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function he(e,t){return t?pe(t,e,"",{"":e}):Ce(e)}function pe(e,t,n,r){return Array.isArray(t)?e.call(r,n,K(t).map(function(n,r){return pe(e,n,r,t)})):me(t)?e.call(r,n,G(t).map(function(n,r){return pe(e,n,r,t)})):t}function Ce(e){return Array.isArray(e)?K(e).map(Ce).toList():me(e)?G(e).map(Ce).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||l(e)!==l(t)||s(e)!==s(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(d(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ge(i[1],e)&&(n||ge(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var u=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!ge(t,e.get(r,y)):!ge(e.get(r,y),t))return u=!1,!1});return u&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function we(e,t){if(!e)throw new Error(t)}function be(e,t,n){if(!(this instanceof be))return new be(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function Ee(){throw TypeError("Abstract")}function Me(){}function Ae(){}function xe(){}Q.prototype[ee]=!0,t(te,K),te.prototype.get=function(e,t){return this.has(e)?this._array[k(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new j(function(){return i>r?B():R(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new j(function(){var a=r[t?i-o:o];return o++>i?B():R(e,a,n[a])})},ne.prototype[p]=!0,t(re,K),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!F(n))return new j(B);var r=0;return new j(function(){var t=n.next();return t.done?t:R(e,r++,t.value)})},t(ie,K),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new j(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return R(e,i,r[i++])})},t(ye,K),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ge(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:new ye(this._value,V(t,n)-_(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new j(function(){return r<n.size?R(e,r++,n._value):B()})},ye.prototype.equals=function(e){return e instanceof ye?ge(this._value,e._value):ve(e)},t(be,K),be.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},be.prototype.get=function(e,t){return this.has(e)?this._start+k(this,e)*this._step:t},be.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},be.prototype.slice=function(e,t){return S(e,t,this.size)?this:(e=_(e,this.size),(t=V(t,this.size))<=e?new be(0,0):new be(this.get(e,this._end),this.get(t,this._end),this._step))},be.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},be.prototype.lastIndexOf=function(e){return this.indexOf(e)},be.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},be.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new j(function(){var a=i;return i+=t?-r:r,o>n?B():R(e,o++,a)})},be.prototype.equals=function(e){return e instanceof be?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(Ee,n),t(Me,Ee),t(Ae,Ee),t(xe,Ee),Ee.Keyed=Me,Ee.Indexed=Ae,Ee.Set=xe;var Le="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function He(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>je?Se(e):_e(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ve(e);if("function"==typeof e.toString)return _e(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Se(e){var t=Pe[e];return void 0===t&&(t=_e(e),Be===Re&&(Be=0,Pe={}),Be++,Pe[e]=t),t}function _e(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ke(t)}function Ve(e){var t;if(Te&&void 0!==(t=Ne.get(e)))return t;if(void 0!==(t=e[Ze]))return t;if(!ze){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ze]))return t;if(void 0!==(t=Ie(e)))return t}if(t=++De,1073741824&De&&(De=0),Te)Ne.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ze)Object.defineProperty(e,Ze,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ze]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ze]=t}}return t}var Oe=Object.isExtensible,ze=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ie(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Ne,Te="function"==typeof WeakMap;Te&&(Ne=new WeakMap);var De=0,Ze="__immutablehash__";"function"==typeof Symbol&&(Ze=Symbol(Ze));var je=16,Re=255,Be=0,Pe={};function Fe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():qe(e)&&!d(e)?e:it().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function qe(e){return!(!e||!e[Qe])}t(Ue,Me),Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=mt(this,En(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ft(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ft(this,ht,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,pt(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Pt(un(this,e))},Ue.prototype.sortBy=function(e,t){return Pt(un(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new A)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var We,Qe="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ke(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return We||(We=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=E(w),a=E(b);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===y?-1:1:0)}else{if(n===y)return e;i=1,r=new Ke(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===y?e:(M(l),M(a),new $e(t,r,[i,o]))}function lt(e){return e.constructor===$e||e.constructor===Je}function st(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,l=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<l,a===l?[st(e,t,n+m,r,i)]:(o=new $e(t,r,i),a<l?[e,o]:[o,e]))}function ct(e,t,n,r){e||(e=new A);for(var i=new $e(e,He(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function dt(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,s=1,c=t.length;l<c;l++,s<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=s,a[o++]=d)}return new Ye(e,i,a)}function ut(e,t,n,r,i){for(var o=0,a=new Array(g),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new Xe(e,o+1,a)}function ft(e,t,n){for(var i=[],o=0;o<n.length;o++){var l=n[o],s=r(l);a(l)||(s=s.map(function(e){return he(e)})),i.push(s)}return Ct(e,t,i)}function ht(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ge(e,t)?e:t}function pt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ge(t,i)?t:i}}function Ct(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function mt(e,t,n,r){var i=e===y,o=t.next();if(o.done){var a=i?n:e,l=r(a);return l===a?e:l}we(i||e&&e.set,"invalid keyPath");var s=o.value,c=i?y:e.get(s,y),d=mt(c,t,n,r);return d===c?e:d===y?e.remove(s):(i?it():e).set(s,d)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:x(e);return i[t]=n,i}function yt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[Qe]=!0,Ge[C]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Ke.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===y,s=this.entries,c=0,d=s.length;c<d&&!ge(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(M(a),(l||!u)&&M(o),!l||1!==s.length){if(!u&&!l&&s.length>=bt)return ct(e,s,r,i);var f=e&&e===this.ownerID,h=f?s:x(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Ke(e,h)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[gt(o&i-1)].get(e+m,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,s=1<<l,c=this.bitmap,d=0!==(c&s);if(!d&&i===y)return this;var u=gt(c&s-1),f=this.nodes,h=d?f[u]:void 0,p=at(h,e,t+m,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=Et)return ut(e,f,c,l,p);if(d&&!p&&2===f.length&<(f[1^u]))return f[1^u];if(d&&p&&1===f.length&<(p))return p;var C=e&&e===this.ownerID,g=d?p?c:c^s:c|s,w=d?p?vt(f,u,p,C):wt(f,u,C):yt(f,u,p,C);return C?(this.bitmap=g,this.nodes=w,this):new Ye(e,g,w)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+m,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,s=i===y,c=this.nodes,d=c[l];if(s&&!d)return this;var u=at(d,e,t+m,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<Mt)return dt(e,c,f,l)}else f++;var h=e&&e===this.ownerID,p=vt(c,l,u,h);return h?(this.count=f,this.nodes=p,this):new Xe(e,f,p)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=i===y;if(n!==this.keyHash)return l?this:(M(a),M(o),st(this,e,t,n,[r,i]));for(var s=this.entries,c=0,d=s.length;c<d&&!ge(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(M(a),(l||!u)&&M(o),l&&2===d)return new $e(e,this.keyHash,s[1^c]);var f=e&&e===this.ownerID,h=f?s:x(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Je(e,this.keyHash,h)},$e.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,o,a){var l=i===y,s=ge(r,this.entry[0]);return(s?i===this.entry[1]:l)?this:(M(a),l?void M(o):s?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(M(o),st(this,e,t,He(r),[r,i])))},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,j),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return B()};var bt=g/4,Et=g/2,Mt=g/4;function At(e){var t=It();if(null==e)return t;if(xt(e))return e;var n=i(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<g?zt(0,r,m,null,new Ht(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function xt(e){return!(!e||!e[Lt])}t(At,Ae),At.of=function(){return this(arguments)},At.prototype.toString=function(){return this.__toString("List [","]")},At.prototype.get=function(e,t){if((e=k(this,e))>=0&&e<this.size){var n=Zt(this,e+=this._origin);return n&&n.array[e&v]}return t},At.prototype.set=function(e,t){return Nt(this,e,t)},At.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},At.prototype.insert=function(e,t){return this.splice(e,0,t)},At.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):It()},At.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){jt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},At.prototype.pop=function(){return jt(this,0,-1)},At.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){jt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},At.prototype.shift=function(){return jt(this,1)},At.prototype.merge=function(){return Rt(this,void 0,arguments)},At.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},At.prototype.mergeDeep=function(){return Rt(this,ht,arguments)},At.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,pt(t),n)},At.prototype.setSize=function(e){return jt(this,0,e)},At.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:jt(this,_(e,n),V(t,n))},At.prototype.__iterator=function(e,t){var n=0,r=Ot(this,t);return new j(function(){var t=r();return t===Vt?B():R(e,n++,t)})},At.prototype.__iterate=function(e,t){for(var n,r=0,i=Ot(this,t);(n=i())!==Vt&&!1!==e(n,r++,this););return r},At.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},At.isList=xt;var Lt="@@__IMMUTABLE_LIST__@@",kt=At.prototype;function Ht(e,t){this.array=e,this.ownerID=t}kt[Lt]=!0,kt[C]=kt.remove,kt.setIn=Ge.setIn,kt.deleteIn=kt.removeIn=Ge.removeIn,kt.update=Ge.update,kt.updateIn=Ge.updateIn,kt.mergeIn=Ge.mergeIn,kt.mergeDeepIn=Ge.mergeDeepIn,kt.withMutations=Ge.withMutations,kt.asMutable=Ge.asMutable,kt.asImmutable=Ge.asImmutable,kt.wasAltered=Ge.wasAltered,Ht.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new Ht([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-m,n))===a&&o)return this}if(o&&!i)return this;var l=Dt(this,e);if(!o)for(var s=0;s<r;s++)l.array[s]=void 0;return i&&(l.array[r]=i),l},Ht.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-m,n))===o&&i===this.array.length-1)return this}var a=Dt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var St,_t,Vt={};function Ot(e,t){var n=e._origin,r=e._capacity,i=Bt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?l(e,n):s(e,t,n)}function l(e,a){var l=a===i?o&&o.array:e&&e.array,s=a>n?0:n-a,c=r-a;return c>g&&(c=g),function(){if(s===c)return Vt;var e=t?--c:s++;return l&&l[e]}}function s(e,i,o){var l,s=e&&e.array,c=o>n?0:n-o>>i,d=1+(r-o>>i);return d>g&&(d=g),function(){for(;;){if(l){var e=l();if(e!==Vt)return e;l=null}if(c===d)return Vt;var n=t?--d:c++;l=a(s&&s[n],i-m,o+(n<<i))}}}}function zt(e,t,n,r,i,o,a){var l=Object.create(kt);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function It(){return St||(St=zt(0,0,m))}function Nt(e,t,n){if((t=k(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?jt(e,t).set(0,n):jt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=E(b);return t>=Bt(e._capacity)?r=Tt(r,e.__ownerID,0,t,n,o):i=Tt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):zt(e._origin,e._capacity,e._level,i,r):e}function Tt(e,t,n,r,i,o){var a,l=r>>>n&v,s=e&&l<e.array.length;if(!s&&void 0===i)return e;if(n>0){var c=e&&e.array[l],d=Tt(c,t,n-m,r,i,o);return d===c?e:((a=Dt(e,t)).array[l]=d,a)}return s&&e.array[l]===i?e:(M(o),a=Dt(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Dt(e,t){return t&&e&&t===e.ownerID?e:new Ht(e?e.array.slice():[],t)}function Zt(e,t){if(t>=Bt(e._capacity))return e._tail;if(t<1<<e._level+m){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=m;return n}}function jt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new A,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var s=e._level,c=e._root,d=0;a+d<0;)c=new Ht(c&&c.array.length?[void 0,c]:[],r),d+=1<<(s+=m);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Bt(o),f=Bt(l);f>=1<<s+m;)c=new Ht(c&&c.array.length?[c]:[],r),s+=m;var h=e._tail,p=f<u?Zt(e,l-1):f>u?new Ht([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var C=c=Dt(c,r),g=s;g>m;g-=m){var y=u>>>g&v;C=C.array[y]=Dt(C.array[y],r)}C.array[u>>>m&v]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,s=m,c=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;c;){var w=a>>>s&v;if(w!==f>>>s&v)break;w&&(d+=(1<<s)*w),s-=m,c=c.array[w]}c&&a>i&&(c=c.removeBefore(r,s,a-d)),c&&f<u&&(c=c.removeAfter(r,s,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):zt(a,l,s,c,p)}function Rt(e,t,n){for(var r=[],o=0,l=0;l<n.length;l++){var s=n[l],c=i(s);c.size>o&&(o=c.size),a(s)||(c=c.map(function(e){return he(e)})),r.push(c)}return o>e.size&&(e=e.setSize(o)),Ct(e,t,r)}function Bt(e){return e<g?0:e-1>>>m<<m}function Pt(e){return null==e?qt():Ft(e)?e:qt().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ft(e){return qe(e)&&d(e)}function Ut(e,t,n,r){var i=Object.create(Pt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function qt(){return _t||(_t=Ut(it(),It()))}function Wt(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),s=void 0!==l;if(n===y){if(!s)return e;a.size>=g&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(s){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Qt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new j(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===I?z:I,n)},t}function Jt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,y);return o===y?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(N,i);return new j(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return R(r,l,t.call(n,a[1],l,e),i)})},r}function $t(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=yn(e);return r&&(i.has=function(r){var i=e.get(r,y);return i!==y&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,y);return o!==y&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,s){if(t.call(n,e,o,s))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(N,o),l=0;return new j(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],d=s[1];if(t.call(n,d,c,e))return R(i,r?c:l++,d,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=l(e),i=(d(e)?Pt():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return Cn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),S(t,n,i))return e;var o=_(t,i),a=V(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var l,s=a-o;s==s&&(l=s<0?0:s);var c=yn(e);return c.size=0===l?l:e.size&&l||void 0,!r&&oe(e)&&l>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&t<l?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,s=!0,c=0;return e.__iterate(function(e,n){if(!s||!(s=a++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==l}),c},c.__iteratorUncached=function(t,n){if(0!==l&&n)return this.cacheResult().__iterator(t,n);var i=0!==l&&e.__iterator(t,n),a=0,s=0;return new j(function(){for(;a++<o;)i.next();if(++s>l)return B();var e=i.next();return r||t===I?e:R(t,s-1,t===z?void 0:e.value[1],e)})},c}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(N,i),l=!0;return new j(function(){if(!l)return B();var e=a.next();if(e.done)return e;var i=e.value,s=i[0],c=i[1];return t.call(n,c,s,o)?r===N?e:R(r,s,c,e):(l=!1,B())})},r}function an(e,t,n,r){var i=yn(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,s=0;return e.__iterate(function(e,o,c){if(!l||!(l=t.call(n,e,o,c)))return s++,i(e,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(N,o),s=!0,c=0;return new j(function(){var e,o,d;do{if((e=l.next()).done)return r||i===I?e:R(i,c++,i===z?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],s&&(s=t.call(n,d,o,a))}while(s);return i===N?e:R(i,o,d,e)})},i}function ln(e,t){var n=l(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?le(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&l(o)||s(e)&&s(o))return o}var c=new te(i);return n?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function sn(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=0,l=!1;function s(e,c){var d=this;e.__iterate(function(e,i){return(!t||c<t)&&a(e)?s(e,c+1):!1===r(e,n?i:o++,d)&&(l=!0),!l},i)}return s(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),l=[],s=0;return new j(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(r===N&&(c=c[1]),t&&!(l.length<t)||!a(c))return n?e:R(r,s++,c,e);l.push(o),o=c.__iterator(r,i)}else o=l.pop()}return B()})},r}function cn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function dn(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(I,r),a=0;return new j(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?R(n,a++,t):R(n,a++,i.value,i)})},n}function un(e,t,n){t||(t=bn);var r=l(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):s(e)?K(o):Y(o)}function fn(e,t,n){if(t||(t=bn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return hn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return hn(t,e,n)?n:e})}function hn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function pn(e,t,r){var i=yn(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(I,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,l=!1;return new j(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=n.some(function(e){return e.done})),l?B():R(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function Cn(e,t){return oe(e)?t:e.constructor(t)}function mn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Fe(e.size),L(e)}function vn(e){return l(e)?r:s(e)?i:o}function yn(e){return Object.create((l(e)?G:s(e)?K:Y).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Q.prototype.cacheResult.call(this)}function bn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=U(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function Mn(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);kn(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(An);return i.constructor=r,r}t(Pt,Ue),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Pt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):qt()},Pt.prototype.set=function(e,t){return Wt(this,e,t)},Pt.prototype.remove=function(e){return Wt(this,e,y)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Pt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Pt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Pt.isOrderedMap=Ft,Pt.prototype[p]=!0,Pt.prototype[C]=Pt.prototype.remove,t(Qt,G),Qt.prototype.get=function(e,t){return this._iter.get(e,t)},Qt.prototype.has=function(e){return this._iter.has(e)},Qt.prototype.valueSeq=function(){return this._iter.valueSeq()},Qt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Qt.prototype.map=function(e,t){var n=this,r=Jt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Qt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Qt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(I,t),r=t?gn(this):0;return new j(function(){var i=n.next();return i.done?i:R(e,t?--r:r++,i.value,i)})},Qt.prototype[p]=!0,t(Gt,K),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t),r=0;return new j(function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)})},t(Kt,Y),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new j(function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){mn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new j(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){mn(r);var i=a(r);return R(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Qt.prototype.cacheResult=Kt.prototype.cacheResult=Yt.prototype.cacheResult=wn,t(Mn,Me),Mn.prototype.toString=function(){return this.__toString(Ln(this)+" {","}")},Mn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Mn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Mn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=xn(this,it()))},Mn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Ln(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:xn(this,n)},Mn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:xn(this,t)},Mn.prototype.wasAltered=function(){return this._map.wasAltered()},Mn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Mn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Mn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?xn(this,t,e):(this.__ownerID=e,this._map=t,this)};var An=Mn.prototype;function xn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Ln(e){return e._name||e.constructor.name||"Record"}function kn(e,t){try{t.forEach(Hn.bind(void 0,e))}catch(e){}}function Hn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Sn(e){return null==e?Tn():_n(e)&&!d(e)?e:Tn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function _n(e){return!(!e||!e[On])}An[C]=An.remove,An.deleteIn=An.removeIn=Ge.removeIn,An.merge=Ge.merge,An.mergeWith=Ge.mergeWith,An.mergeIn=Ge.mergeIn,An.mergeDeep=Ge.mergeDeep,An.mergeDeepWith=Ge.mergeDeepWith,An.mergeDeepIn=Ge.mergeDeepIn,An.setIn=Ge.setIn,An.update=Ge.update,An.updateIn=Ge.updateIn,An.withMutations=Ge.withMutations,An.asMutable=Ge.asMutable,An.asImmutable=Ge.asImmutable,t(Sn,xe),Sn.of=function(){return this(arguments)},Sn.fromKeys=function(e){return this(r(e).keySeq())},Sn.prototype.toString=function(){return this.__toString("Set {","}")},Sn.prototype.has=function(e){return this._map.has(e)},Sn.prototype.add=function(e){return In(this,this._map.set(e,!0))},Sn.prototype.remove=function(e){return In(this,this._map.remove(e))},Sn.prototype.clear=function(){return In(this,this._map.clear())},Sn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Sn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},Sn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},Sn.prototype.merge=function(){return this.union.apply(this,arguments)},Sn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Sn.prototype.sort=function(e){return Dn(un(this,e))},Sn.prototype.sortBy=function(e,t){return Dn(un(this,t,e))},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},Sn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Sn.isSet=_n;var Vn,On="@@__IMMUTABLE_SET__@@",zn=Sn.prototype;function In(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Nn(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Tn(){return Vn||(Vn=Nn(it()))}function Dn(e){return null==e?Pn():Zn(e)?e:Pn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function Zn(e){return _n(e)&&d(e)}zn[On]=!0,zn[C]=zn.remove,zn.mergeDeep=zn.merge,zn.mergeDeepWith=zn.mergeWith,zn.withMutations=Ge.withMutations,zn.asMutable=Ge.asMutable,zn.asImmutable=Ge.asImmutable,zn.__empty=Tn,zn.__make=Nn,t(Dn,Sn),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Dn.isOrderedSet=Zn;var jn,Rn=Dn.prototype;function Bn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Pn(){return jn||(jn=Bn(qt()))}function Fn(e){return null==e?Kn():Un(e)?e:Kn().unshiftAll(e)}function Un(e){return!(!e||!e[Wn])}Rn[p]=!0,Rn.__empty=Pn,Rn.__make=Bn,t(Fn,Ae),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=k(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.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):Kn()},Fn.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var n=_(e,this.size);if(V(t,this.size)!==this.size)return Ae.prototype.slice.call(this,e,t);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):Gn(r,i)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new j(function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return B()})},Fn.isStack=Un;var qn,Wn="@@__IMMUTABLE_STACK__@@",Qn=Fn.prototype;function Gn(e,t,n,r){var i=Object.create(Qn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kn(){return qn||(qn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Qn[Wn]=!0,Qn.withMutations=Ge.withMutations,Qn.asMutable=Ge.asMutable,Qn.asImmutable=Ge.asImmutable,Qn.wasAltered=Ge.wasAltered,n.Iterator=j,Yn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Qt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Pt(this.toKeyedSeq())},toOrderedSet:function(){return Dn(l(this)?this.valueSeq():this)},toSet:function(){return Sn(l(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(l(this)?this.valueSeq():this)},toList:function(){return At(l(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return Cn(this,ln(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ge(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return Cn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(z)},map:function(e,t){return Cn(this,Jt(this,e,t))},reduce:function(e,t,n){var r,i;return Fe(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Cn(this,$t(this,!0))},slice:function(e,t){return Cn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return Cn(this,un(this,e))},values:function(){return this.__iterator(I)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return L(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(H)},flatMap:function(e,t){return Cn(this,cn(this,e,t))},flatten:function(e){return Cn(this,sn(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ge(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=En(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):or)},minBy:function(e,t){return fn(this,t?nr(t):or,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Cn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Cn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return Cn(this,un(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Cn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Cn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[u]=!0,Xn[Z]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.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. "+e),this.size}}})}catch(e){}}(),Yn(r,{flip:function(){return Cn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey(function(t){return ge(t,e)})},lastKeyOf:function(e){return this.findLastKey(function(t){return ge(t,e)})},mapEntries:function(e,t){var n=this,r=0;return Cn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Cn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Jn=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function ir(){return x(arguments)}function or(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=d(e),n=l(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sr(He(e),He(t))|0}:function(e,t){r=r+sr(He(e),He(t))|0}:t?function(e){r=31*r+He(e)|0}:function(e){r=r+He(e)|0});return lr(i,r)}function lr(e,t){return t=Le(t,3432918353),t=Le(t<<15|t>>>-15,461845907),t=Le(t<<13|t>>>-13,5),t=Le((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Le(t^t>>>13,3266489909))^t>>>16)}function sr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Jn[f]=!0,Jn[Z]=Xn.entries,Jn.__toJS=Xn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Yn(i,{toKeyedSeq:function(){return new Qt(this,!1)},filter:function(e,t){return Cn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Cn(this,$t(this,!1))},slice:function(e,t){return Cn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,e<0?this.count():this.size);var r=this.slice(0,e);return Cn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return Cn(this,sn(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Cn(this,dn(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=pn(this.toSeq(),K.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Cn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Cn(this,an(this,e,t,!1))},zip:function(){return Cn(this,pn(this,ir,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,Cn(this,pn(this,e,t))}}),i.prototype[h]=!0,i.prototype[p]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Xn.includes,Yn(G,r.prototype),Yn(K,i.prototype),Yn(Y,o.prototype),Yn(Me,r.prototype),Yn(Ae,i.prototype),Yn(xe,o.prototype);var cr={Iterable:n,Seq:Q,Collection:Ee,Map:Ue,OrderedMap:Pt,List:At,Stack:Fn,Set:Sn,OrderedSet:Dn,Record:Mn,Range:be,Repeat:ye,is:ge,fromJS:he};return cr}()),VN.exports}function zN(){if(Yz)return Kz;Yz=1;var e=ON().OrderedMap;return Kz={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function IN(){if(Jz)return Xz;Jz=1;var e=ON(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var c=a.prototype;return c.getStyle=function(){return this.get("style")},c.getEntity=function(){return this.get("entity")},c.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return l;var n=t({style:i,entity:null}).merge(e),r=s.get(n);if(r)return r;var o=new a(n);return s=s.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),l=new a,s=t([[t(o),l]]);return a.EMPTY=l,Xz=a}function NN(){if(eI)return $z;return eI=1,$z=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function TN(){if(nI)return tI;nI=1;var e=IN(),t=NN(),n=ON(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,s=o(),c=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),d=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var c=a.prototype;return c.getKey=function(){return this.get("key")},c.getType=function(){return this.get("type")},c.getText=function(){return this.get("text")},c.getCharacterList=function(){return this.get("characterList")},c.getLength=function(){return this.getText().length},c.getDepth=function(){return this.get("depth")},c.getData=function(){return this.get("data")},c.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():s},c.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},c.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},c.findEntityRanges=function(e,n){t(this.getCharacterList(),f,e,n)},a}(c);function u(e,t){return e.getStyle()===t.getStyle()}function f(e,t){return e.getEntity()===t.getEntity()}return tI=d}function DN(){if(iI)return rI;iI=1;var e=IN(),t=NN(),n=ON(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,s=o(),c={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},d=function(e,t){return e.getStyle()===t.getStyle()},u=function(e,t){return e.getEntity()===t.getEntity()},f=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var f=a.prototype;return f.getKey=function(){return this.get("key")},f.getType=function(){return this.get("type")},f.getText=function(){return this.get("text")},f.getCharacterList=function(){return this.get("characterList")},f.getLength=function(){return this.getText().length},f.getDepth=function(){return this.get("depth")},f.getData=function(){return this.get("data")},f.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():s},f.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},f.getChildKeys=function(){return this.get("children")},f.getParentKey=function(){return this.get("parent")},f.getPrevSiblingKey=function(){return this.get("prevSibling")},f.getNextSiblingKey=function(){return this.get("nextSibling")},f.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},f.findEntityRanges=function(e,n){t(this.getCharacterList(),u,e,n)},a}(a(c));return rI=f}function ZN(){if(dI)return cI;dI=1;var e=function(){if(sI)return lI;sI=1;var e=IN();return lI=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=ON();return cI=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),l=r.getStartOffset(),s=r.getEndKey(),c=r.getEndOffset(),d=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===s}).toOrderedMap().merge(t.OrderedMap([[s,o.get(s)]])).map(function(t,n){var r=n===a?l:0,o=n===s?c:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(d),selectionBefore:r,selectionAfter:r})},cI}function jN(){if(pI)return hI;pI=1;var e="production"!==process.env.NODE_ENV?function(e){if(void 0===e)throw new Error("invariant(...): Second argument must be a string.")}:function(e){};return hI=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(e(n),!t){var a;if(void 0===n)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;(a=new Error(n.replace(/%s/g,function(){return String(i[l++])}))).name="Invariant Violation"}throw a.framesToPop=1,a}},hI}function RN(){if(vI)return gI;vI=1;var e=fI?uI:(fI=1,uI={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,l=r,s=null,c=null,d=0;d<o.length;d++){if(e<(a=l+o[d].length)&&l<t)null!==s||(s=l),c=a;else if(null!==s)break;l=a}var u=r+n.length,f=s===r,h=c===u;return(!f&&h||f&&!h)&&("forward"===i?c!==u&&c++:s!==r&&s--),{start:s,end:c}}}),t=function(){if(mI)return CI;mI=1;var e=jN();return CI=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||("production"!==process.env.NODE_ENV?e(!1,"Entity key not found in this range."):e(!1)),r},CI}(),n=jN();function r(r,i,o,a,l,s,c){var d=o.getStartOffset(),u=o.getEndOffset(),f=r.__get(l).getMutability(),h=c?d:u;if("MUTABLE"===f)return o;var p=t(i,l).filter(function(e){return h<=e.end&&h>=e.start});1!=p.length&&("production"!==process.env.NODE_ENV?n(!1,"There should only be one entity range within this removal range."):n(!1));var C=p[0];if("IMMUTABLE"===f)return o.merge({anchorOffset:C.start,focusOffset:C.end,isBackward:!1});s||(c?u=C.end:d=C.start);var m=e.getRemovalRange(d,u,i.getText().slice(C.start,C.end),C.start,a);return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1})}return gI=function(e,t,n,i,o){var a=i.getStartOffset(),l=i.getEndOffset(),s=t.getEntityAt(a),c=n.getEntityAt(l-1);if(!s&&!c)return i;var d=i;if(s&&s===c)d=r(e,t,d,o,s,!0,!0);else if(s&&c){var u=r(e,t,d,o,s,!1,!0),f=r(e,n,d,o,c,!1,!1);d=d.merge({anchorOffset:u.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(s){var h=r(e,t,d,o,s,!1,!0);d=d.merge({anchorOffset:h.getStartOffset(),isBackward:!1})}else if(c){var p=r(e,n,d,o,c,!1,!1);d=d.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return d}}function BN(){if(wI)return yI;wI=1;var e={},t=Math.pow(2,24);return yI=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n},yI}function PN(){if(EI)return bI;EI=1;var e=DN(),t=BN(),n=ON().OrderedMap;return bI=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),l=n.getNextSiblingKey(),s=n.getPrevSiblingKey(),c=n.getChildKeys(),d=n.getParentKey(),u=t();if(i[a]=u,l&&(e.get(l)?e.setIn([l,"prevSibling"],u):e.setIn([a,"nextSibling"],null)),s&&(e.get(s)?e.setIn([s,"nextSibling"],u):e.setIn([a,"prevSibling"],null)),d&&e.get(d)){var f=e.get(d).getChildKeys();e.setIn([d,"children"],f.set(f.indexOf(n.getKey()),u))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],u),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);c.forEach(function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)},bI}function FN(){if(AI)return MI;AI=1;var e=IN(),t=NN(),n=jN();function r(r,i,o){var a=i.getCharacterList(),l=o>0?a.get(o-1):void 0,s=o<a.count()?a.get(o):void 0,c=l?l.getEntity():void 0,d=s?s.getEntity():void 0;if(d&&d===c&&"MUTABLE"!==r.__get(d).getMutability()){for(var u,f=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&("production"!==process.env.NODE_ENV?n(!1,"Removal range must exist within character list."):n(!1)),o}(a,d,o),h=f.start,p=f.end;h<p;)u=a.get(h),a=a.set(h,e.applyEntity(u,null)),h++;return i.set("characterList",a)}return i}return MI=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),l=t.getStartOffset(),s=n.get(a),c=r(i,s,l);c!==s&&(o[a]=c);var d=t.getEndKey(),u=t.getEndOffset(),f=n.get(d);a===d&&(f=c);var h=r(i,f,u);return h!==f&&(o[d]=h),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function UN(){if(LI)return xI;LI=1;var e=PN(),t=FN();return xI=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),l=r.getEndOffset(),s=t(n,r).getBlockMap(),c=s.keySeq(),d=c.indexOf(i),u=c.indexOf(a)+1;return e(s.slice(d,u).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,l),characterList:r.slice(o,l)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,l),characterList:r.slice(0,l)}):e}))}}function qN(){if(HI)return kI;return HI=1,kI=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function WN(){if(_I)return SI;_I=1;var e=zN(),t=DN(),n=ON(),r=qN(),i=jN(),o=PN(),a=n.List,l=function(n,r,i,o,l,s){var c=i.first()instanceof t,d=[],u=o.size,f=i.get(l),h=o.first(),p=o.last(),C=p.getLength(),m=p.getKey(),g=c&&(!f.getChildKeys().isEmpty()||!h.getChildKeys().isEmpty());i.forEach(function(e,t){t===l?(g?d.push(e):d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),l=n.first();return e.merge({text:o+l.getText(),characterList:a.concat(l.getCharacterList()),type:o?e.getType():l.getType(),data:l.getData()})}(e,s,o)),o.slice(g?0:1,u-1).forEach(function(e){return d.push(e)}),d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),l=i.slice(t,o),s=n.last();return s.merge({text:s.getText()+a,characterList:s.getCharacterList().concat(l),data:s.getData()})}(e,s,o))):d.push(e)});var v=e.createFromArray(d);return c&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),l=n.getNextSiblingKey(),s=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),d=c[c.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([d,"nextSibling"],l),l&&t.setIn([l,"prevSibling"],d),c.forEach(function(e){return t.setIn([e,"parent"],s)}),s){var u=e.get(s).getChildKeys(),f=u.indexOf(i)+1,h=u.toArray();h.splice.apply(h,[f,0].concat(c)),t.setIn([s,"children"],a(h))}})}(v,0,f,h)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:m,anchorOffset:C,focusKey:m,focusOffset:C,isBackward:!1})})};return SI=function(e,n,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should only be called with a collapsed selection state."):i(!1));var c=e.getBlockMap(),d=o(a),u=n.getStartKey(),f=n.getStartOffset(),h=c.get(u);return h instanceof t&&(h.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should not be called when a container node is selected."):i(!1))),1===d.size?function(e,t,n,i,o,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),c=s.getText(),d=s.getCharacterList(),u=o,f=a+i.getText().length,h=null;switch(l){case"MERGE_OLD_DATA_TO_NEW_DATA":h=i.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":h=i.getData()}var p=s.getType();c&&"unstyled"===p&&(p=i.getType());var C=s.merge({text:c.slice(0,a)+i.getText()+c.slice(a),characterList:r(d,i.getCharacterList(),a),type:p,data:h});return e.merge({blockMap:n.set(o,C),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:f,focusKey:u,focusOffset:f,isBackward:!1})})}(e,n,c,d.first(),u,f,s):l(e,n,c,d,u,f)},SI}function QN(){if(II)return zI;II=1;var e=ON().Map;return zI=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(l),selectionBefore:n,selectionAfter:n})},zI}function GN(){if(TI)return NI;TI=1;var e=DN();return NI=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function KN(){if(ZI)return DI;ZI=1;var e=DN(),t=GN(),n=ON();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},s=function(e,n,r,s){return e.withMutations(function(c){if(i(n.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})}),i(r.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})}),o(n.getKey(),s).forEach(function(e){return i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),i(n.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:a(e,c,s)})}),i(r.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:l(e,c,s)})}),i(r.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),s).forEach(function(e){i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,s).forEach(function(e){return i(e,c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var d=n.getPrevSiblingKey();i(r.getKey(),c,function(e){return e.merge({prevSibling:d})}),i(d,c,function(e){return e.merge({nextSibling:r.getKey()})});var u=d?e.get(d):null,f=u?u.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,c,function(e){return e.merge({parent:f})})}),null!=f){var h=e.get(f);i(f,c,function(e){return e.merge({children:h.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),c,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},c=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return DI=function(n,i){if(i.isCollapsed())return n;var a,l=n.getBlockMap(),d=i.getStartKey(),u=i.getStartOffset(),f=i.getEndKey(),h=i.getEndOffset(),p=l.get(d),C=l.get(f),m=p instanceof e,g=[];if(m){var v=C.getChildKeys(),y=o(f,l);C.getNextSiblingKey()&&(g=g.concat(y)),v.isEmpty()||(g=g.concat(y.concat([f]))),g=g.concat(o(t(C,l),l))}a=p===C?c(p.getCharacterList(),u,h):p.getCharacterList().slice(0,u).concat(C.getCharacterList().slice(h));var w=p.merge({text:p.getText().slice(0,u)+C.getText().slice(h),characterList:a}),b=m&&0===u&&0===h&&C.getParentKey()===d&&null==C.getPrevSiblingKey()?r([[d,null]]):l.toSeq().skipUntil(function(e,t){return t===d}).takeUntil(function(e,t){return t===f}).filter(function(e,t){return-1===g.indexOf(t)}).concat(r([[f,null]])).map(function(e,t){return t===d?w:null}),E=l.merge(b).filter(function(e){return!!e});return m&&p!==C&&(E=s(E,p,C,l)),n.merge({blockMap:E,selectionBefore:i,selectionAfter:i.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})},DI}function YN(){if(RI)return jI;RI=1;var e=DN(),t=BN(),n=ON(),r=jN(),i=QN(),o=n.List,a=n.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return jI=function(n,s){s.isCollapsed()||("production"!==process.env.NODE_ENV?r(!1,"Selection range must be collapsed."):r(!1));var c=s.getAnchorKey(),d=n.getBlockMap(),u=d.get(c),f=u.getText();if(!f){var h=u.getType();if("unordered-list-item"===h||"ordered-list-item"===h)return i(n,s,function(e){return e.merge({type:"unstyled",depth:0})})}var p=s.getAnchorOffset(),C=u.getCharacterList(),m=t(),g=u instanceof e,v=u.merge({text:f.slice(0,p),characterList:C.slice(0,p)}),y=v.merge({key:m,text:f.slice(p),characterList:C.slice(p),data:a()}),w=d.toSeq().takeUntil(function(e){return e===u}),b=d.toSeq().skipUntil(function(e){return e===u}).rest(),E=w.concat([[c,v],[m,y]],b).toOrderedMap();return g&&(u.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?r(!1,"ContentBlockNode must not have children"):r(!1)),E=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();l(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),l(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),l(r,e,function(e){return e.merge({nextSibling:i})}),l(i,e,function(e){return e.merge({prevSibling:r})})})}(E,v,y)),n.merge({blockMap:E,selectionBefore:s,selectionAfter:s.merge({anchorKey:m,anchorOffset:0,focusKey:m,focusOffset:0,isBackward:!1})})},jI}function XN(){if(PI)return BI;PI=1;var e=IN(),t=function(){if(aI)return oI;aI=1;var e=IN(),t=ON().Map;function n(n,r,i,o){var a=n.getBlockMap(),l=r.getStartKey(),s=r.getStartOffset(),c=r.getEndKey(),d=r.getEndOffset(),u=a.skipUntil(function(e,t){return t===l}).takeUntil(function(e,t){return t===c}).concat(t([[c,a.get(c)]])).map(function(t,n){var r,a;l===c?(r=s,a=d):(r=n===l?s:0,a=n===c?d:t.getLength());for(var u,f=t.getCharacterList();r<a;)u=f.get(r),f=f.set(r,o?e.applyStyle(u,i):e.removeStyle(u,i)),r++;return t.set("characterList",f)});return n.merge({blockMap:a.merge(u),selectionBefore:r,selectionAfter:r})}return oI={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=ZN(),r=RN(),i=UN(),o=ON(),a=WN(),l=function(){if(OI)return VI;OI=1;var e=ON(),t=qN(),n=jN(),r=e.Repeat;return VI=function(e,i,o,a){i.isCollapsed()||("production"!==process.env.NODE_ENV?n(!1,"`insertText` should only be called with a collapsed range."):n(!1));var l=null;if(null!=o&&(l=o.length),null==l||0===l)return e;var s=e.getBlockMap(),c=i.getStartKey(),d=i.getStartOffset(),u=s.get(c),f=u.getText(),h=u.merge({text:f.slice(0,d)+o+f.slice(d,u.getLength()),characterList:t(u.getCharacterList(),r(a,l).toList(),d)}),p=d+l;return e.merge({blockMap:s.set(c,h),selectionAfter:i.merge({anchorOffset:p,focusOffset:p})})},VI}(),s=jN(),c=QN(),d=FN(),u=KN(),f=YN(),h=o.OrderedSet,p={replaceText:function(t,n,r,i,o){var a=d(t,n),s=u(a,n),c=e.create({style:i||h(),entity:o||null});return l(s,s.getSelectionAfter(),r,c)},insertText:function(e,t,n,r,i){return t.isCollapsed()||("production"!==process.env.NODE_ENV?s(!1,"Target range must be collapsed for `insertText`."):s(!1)),p.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=p.removeRange(e,t,"backward");return p.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(e,t),o=u(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,l;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),l=e.getBlockForKey(o);var s=t.getStartOffset(),c=t.getEndOffset(),f=a.getEntityAt(s),h=l.getEntityAt(c-1);if(i===o&&f&&f===h){var p=r(e.getEntityMap(),a,l,t,n);return u(e,p)}var C=d(e,t);return u(C,t)},splitBlock:function(e,t){var n=d(e,t),r=u(n,t);return f(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return c(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=d(e,t);return n(i,t,r)}};return BI=p}function JN(){if(UI)return FI;return UI=1,FI=function(e){return Object.keys(e).map(function(t){return e[t]})},FI}function $N(){if(WI)return qI;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}WI=1;var t=NN(),n=JN(),r=ON(),i=r.List,o=r.Repeat,a=r.Record,l=function(){return!0},s=a({start:null,end:null}),c=a({start:null,end:null,decoratorKey:null,leaves:null}),d={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new c({start:0,end:0,decoratorKey:null,leaves:i.of(new s({start:0,end:0}))}));var d=[],h=r?r.getDecorations(n,e):i(o(null,a)),p=n.getCharacterList();return t(h,f,l,function(e,t){d.push(new c({start:e,end:t,decoratorKey:h.get(e),leaves:u(p.slice(e,t).toList(),e)}))}),i(d)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new c(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return s(e)}):null}))}};function u(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,f,l,function(e,t){r.push(new s({start:e+n,end:t+n}))}),i(r)}function f(e,t){return e===t}return qI=d}function eT(){if(GI)return QI;GI=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,ON().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return QI=e}function tT(){if(JI)return XI;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}JI=1;var t=eT(),n=ON(),r=jN(),i=(YI||(YI=1,KI=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),KI),o=(0,n.Map)(),a=i();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var s={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),s.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),s.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),s.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),s.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),s.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),s.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return s.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||("production"!==process.env.NODE_ENV?r(!1,"Unknown DraftEntity key: %s.",e):r(!1)),t},__mergeData:function(t,n){var r=s.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=s.__get(e).set("data",t);return o=o.set(e,n),n}};return XI=s}function nT(){if(eN)return $I;eN=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var l=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=l&&n>=l},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,ON().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return $I=e}function rT(){return nN?tN:(nN=1,tN=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function iT(){if(iN)return rN;iN=1;var e=new RegExp("\r","g");return rN=function(t){return t.replace(e,"")}}function oT(){if(aN)return oN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}aN=1;var n=zN(),r=IN(),i=TN(),o=DN(),a=tT(),l=nT(),s=BN(),c=JN(),d=rT(),u=ON(),f=iT(),h=u.List,p=u.Record,C=u.Repeat,m=u.Map,g=u.OrderedMap,v=p({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),y=d("draft_tree_data_support")?o:i,w=function(t){var i,o;function d(){return t.apply(this,arguments)||this}o=t,(i=d).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var u=d.prototype;return u.getEntityMap=function(){return a},u.getBlockMap=function(){return this.get("blockMap")},u.getSelectionBefore=function(){return this.get("selectionBefore")},u.getSelectionAfter=function(){return this.get("selectionAfter")},u.getBlockForKey=function(e){return this.getBlockMap().get(e)},u.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlocksAsArray=function(){return this.getBlockMap().toArray()},u.getFirstBlock=function(){return this.getBlockMap().first()},u.getLastBlock=function(){return this.getBlockMap().last()},u.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},u.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},u.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},u.createEntity=function(e,t,n){return a.__create(e,t,n),this},u.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},u.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},u.addEntity=function(e){return a.__add(e),this},u.getEntity=function(e){return a.__get(e)},u.getAllEntities=function(){return a.__getAll()},u.loadWithEntities=function(e){return a.__loadWithEntities(e)},d.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new l:l.createEmpty(i.first().getKey());return new d({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},d.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=f(e),new y({key:s(),text:e,type:"unstyled",characterList:h(C(r.EMPTY,e.length))})});return d.createFromBlockArray(n)},d.fromJS=function(t){return new d(e({},t,{blockMap:g(t.blockMap).map(d.createContentBlockFromJS),selectionBefore:new l(t.selectionBefore),selectionAfter:new l(t.selectionAfter)}))},d.createContentBlockFromJS=function(t){var n=t.characterList;return new y(e({},t,{data:m(t.data),characterList:null!=n?h((Array.isArray(n)?n:c(n)).map(function(e){return r.fromJS(e)})):void 0}))},d}(v);return oN=w}function aT(){if(sN)return lN;sN=1;var e=jN(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),n===t?"ltr":"rtl"}function o(e){n=e}return lN={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),r(n)||("production"!==process.env.NODE_ENV?e(!1,"`otherDir` must be a strong direction to be converted to HTML Direction"):e(!1)),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||("production"!==process.env.NODE_ENV?e(!1,"Global direction not set."):e(!1)),n}}}function lT(){if(dN)return cN;dN=1;var e=aT(),t=jN(),n="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",r="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function l(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function s(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=l(t);return r===e.NEUTRAL?n:r}function c(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||("production"!==process.env.NODE_ENV?t(!1,"Fallback direction must be a strong direction"):t(!1)),s(n,r)}return cN={firstStrongChar:a,firstStrongCharDir:l,resolveBlockDir:s,getDirection:c,isDirectionLTR:function(t,n){return c(t,n)===e.LTR},isDirectionRTL:function(t,n){return c(t,n)===e.RTL}}}function sT(){if(pN)return hN;pN=1;return hN=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}}function cT(){if(mN)return CN;mN=1;var e,t=function(){if(fN)return uN;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fN=1;var t=lT(),n=aT(),r=jN();return uN=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||("production"!==process.env.NODE_ENV?r(!1,"Default direction must be a strong direction (LTR or RTL)"):r(!1)):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=ON(),r=sT(),i=n.OrderedMap;return CN={getDirectionMap:function(o,a){e?e.reset():e=new t;var l=o.getBlockMap(),s=l.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),c=i(l.keySeq().zip(s));return null!=a&&n.is(a,c)?a:c}}}function dT(){if(vN)return gN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}vN=1;var n=$N(),r=oT(),i=cT(),o=nT(),a=ON(),l=a.OrderedSet,s=a.Record,c=a.Stack,d=a.OrderedMap,u=a.List,f=s({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:c(),selection:null,treeMap:null,undoStack:c()}),h=function(){s.createEmpty=function(e){return this.createWithText("",e)},s.createWithText=function(e,t){return s.createWithContent(r.createFromText(e),t)},s.createWithContent=function(e,t){if(0===e.getBlockMap().count())return s.createEmpty(t);var n=e.getBlockMap().first().getKey();return s.create({currentContent:e,undoStack:c(),redoStack:c(),decorator:t||null,selection:o.createEmpty(n)})},s.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:C(n,t.decorator),directionMap:i.getDirectionMap(n)});return new s(new f(r))},s.fromJS=function(t){return new s(new f(e({},t,{directionMap:null!=t.directionMap?d(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?l(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?c(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?d(t.treeMap).map(function(e){return u(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?c(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},s.set=function(e,t){var r=e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var l,s=r.get("treeMap");return l=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),s,o,i):C(a,o),void r.merge({decorator:o,treeMap:l,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),l=e.getImmutable().get("treeMap");return l.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)});return new s(r)};var a=s.prototype;function s(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},s.setInlineStyleOverride=function(e,t){return s.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return m(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return m(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},s.acceptSelection=function(e,t){return p(e,t,!1)},s.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),p(e,t,!0)},s.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return s.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},s.moveFocusToEnd=function(e){var t=s.moveSelectionToEnd(e);return s.forceSelection(t,t.getSelection())},s.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return s.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),l=e.getCurrentContent(),d=e.getUndoStack(),u=t;a!==l.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(d=d.push(l),u=u.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(u=u.set("selectionBefore",l.getSelectionBefore()));var f=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(f=null);var h={currentContent:u,directionMap:o,undoStack:d,redoStack:c(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:f};return s.set(e,h)},s.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return s.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},s.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return s.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},s}();function p(e,t,n){return h.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function C(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function m(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}return gN=h}function uT(){if(EN)return bN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}EN=1;var n=zN(),r=IN(),i=TN(),o=DN(),a=XN(),l=dT(),s=BN(),c=rT(),d=ON(),u=function(){if(wN)return yN;wN=1;var e=DN(),t=GN(),n=ON(),r=jN(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},l=function(e,t,n,r,i){if(!i)return e;var l="after"===r,s=t.getKey(),c=n.getKey(),d=t.getParentKey(),u=t.getNextSiblingKey(),f=t.getPrevSiblingKey(),h=n.getParentKey(),p=l?n.getNextSiblingKey():c,C=l?c:n.getPrevSiblingKey();return e.withMutations(function(e){a(d,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(s))})}),a(f,e,function(e){return e.merge({nextSibling:u})}),a(u,e,function(e){return e.merge({prevSibling:f})}),a(p,e,function(e){return e.merge({prevSibling:s})}),a(C,e,function(e){return e.merge({nextSibling:s})}),a(h,e,function(e){var t=e.getChildKeys(),n=t.indexOf(c),r=l?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,s),e.merge({children:o(i)})}),a(s,e,function(e){return e.merge({nextSibling:p,prevSibling:C,parent:h})})})};return yN=function(n,o,a,s){"replace"===s&&("production"!==process.env.NODE_ENV?r(!1,"Replacing blocks is not supported."):r(!1));var c=a.getKey(),d=o.getKey();d===c&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1));var u=n.getBlockMap(),f=o instanceof e,h=[o],p=u.delete(d);f&&(h=[],p=u.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===d}).takeWhile(function(e){var t=e.getKey(),i=t===d,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){h.push(t),e.delete(t.getKey())})}));var C=p.toSeq().takeUntil(function(e){return e===a}),m=p.toSeq().skipUntil(function(e){return e===a}).skip(1),g=h.map(function(e){return[e.getKey(),e]}),v=i();if("before"===s){var y=n.getBlockBefore(c);y&&y.getKey()===o.getKey()&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=C.concat([].concat(g,[[c,a]]),m).toOrderedMap()}else if("after"===s){var w=n.getBlockAfter(c);w&&w.getKey()===d&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=C.concat([[c,a]].concat(g),m).toOrderedMap()}return n.merge({blockMap:l(v,o,a,s,f),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:d,focusKey:d})})},yN}(),f=c("draft_tree_data_support"),h=f?o:i,p=d.List,C=d.Repeat;return bN={insertAtomicBlock:function(t,i,o){var c=t.getCurrentContent(),d=t.getSelection(),u=a.removeRange(c,d,"backward"),m=u.getSelectionAfter(),g=a.splitBlock(u,m),v=g.getSelectionAfter(),y=a.setBlockType(g,v,"atomic"),w=r.create({entity:i}),b={key:s(),type:"atomic",text:o,characterList:p(C(w,o.length))},E={key:s(),type:"unstyled"};f&&(b=e({},b,{nextSibling:E.key}),E=e({},E,{prevSibling:b.key}));var M=[new h(b),new h(E)],A=n.createFromArray(M),x=a.replaceWithFragment(y,v,A),L=x.merge({selectionBefore:d,selectionAfter:x.getSelectionAfter().set("hasFocus",!0)});return l.push(t,L,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),s=e.getSelection();if("before"===r||"after"===r){var c=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=u(o,t,c,r)}else{var d=a.removeRange(o,n,"backward"),f=d.getSelectionAfter(),h=d.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=u(d,t,h,"before");else if(f.getEndOffset()===h.getLength())i=u(d,t,h,"after");else{var p=a.splitBlock(d,f),C=p.getSelectionAfter(),m=p.getBlockForKey(C.getFocusKey());i=u(p,t,m,"before")}}var g=i.merge({selectionBefore:s,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(e,g,"move-block")}}}function fT(){if(AN)return MN;AN=1;var e=ON().List,t=function(){function t(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_decorators",void 0),this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return MN=t}function hT(){if(LN)return xN;function e(e){return e.replace(/\//g,"-")}return LN=1,xN=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},xN}function pT(){if(HN)return kN;HN=1;var e=i,t=hT(),n=(0,ON().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:e.createElement("ul",{className:t("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:e.createElement("ol",{className:t("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:e.createElement("pre",{className:t("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return kN=n}function CT(){return _N?SN:(_N=1,SN={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}var mT,gT,vT,yT,wT,bT,ET,MT,AT,xT,LT,kT,HT,ST,_T,VT,OT,zT,IT,NT,TT,DT,ZT,jT,RT,BT,PT,FT,UT,qT,WT,QT,GT,KT,YT,XT,JT,$T,eD,tD,nD,rD,iD,oD,aD,lD,sD,cD,dD,uD,fD,hD,pD,CD,mD,gD,vD,yD,wD,bD,ED,MD,AD,xD,LD,kD,HD,SD,_D,VD,OD,zD,ID,ND,TD,DD,ZD,jD,RD,BD,PD,FD,UD,qD,WD,QD,GD,KD,YD,XD,JD,$D,eZ,tZ,nZ,rZ,iZ,oZ,aZ,lZ,sZ,cZ,dZ,uZ,fZ,hZ,pZ,CZ,mZ,gZ,vZ,yZ,wZ,bZ,EZ,MZ,AZ,xZ,LZ,kZ={exports:{}},HZ=kZ.exports;function SZ(){return mT||(mT=1,function(e,t){!function(n,r){var i="function",o="undefined",a="object",l="string",s="major",c="model",d="name",u="type",f="vendor",h="version",p="architecture",C="console",m="mobile",g="tablet",v="smarttv",y="wearable",w="embedded",b="Amazon",E="Apple",M="ASUS",A="BlackBerry",x="Browser",L="Chrome",k="Firefox",H="Google",S="Honor",_="Huawei",V="LG",O="Microsoft",z="Motorola",I="Nvidia",N="OnePlus",T="Opera",D="OPPO",Z="Samsung",j="Sharp",R="Sony",B="Xiaomi",P="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",W=" Browser",Q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===l&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},X=function(e,t){for(var n,o,l,s,c,d,u=0;u<t.length&&!c;){var f=t[u],h=t[u+1];for(n=o=0;n<f.length&&!c&&f[n];)if(c=f[n++].exec(e))for(l=0;l<h.length;l++)d=c[++o],typeof(s=h[l])===a&&s.length>0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,d):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=d?d.replace(s[1],s[2]):r:this[s[0]]=d?s[1].call(this,d,s[2]):r:4===s.length&&(this[s[0]]=d?s[3].call(this,d.replace(s[1],s[2])):r):this[s]=d||r;u+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,h],[/opios[\/ ]+([\w\.]+)/i],[h,[d,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[d,T+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[d,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[d,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[d,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[d,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[d,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[d,"MIUI"+W]],[/fxios\/([\w\.-]+)/i],[h,[d,k]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+W],h],[/samsungbrowser\/([\w\.]+)/i],[h,[d,Z+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[d,L+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,L+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[h,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[d,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[f,Z],[u,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[f,Z],[u,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[f,E],[u,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,E],[u,g]],[/(macintosh);/i],[c,[f,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[f,j],[u,m]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[c,[f,S],[u,g]],[/honor([-\w ]+)[;\)]/i],[c,[f,S],[u,m]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[c,[f,_],[u,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[f,_],[u,m]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[c,/_/g," "],[f,B],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[c,/_/g," "],[f,B],[u,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[f,D],[u,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[c,[f,J,{OnePlus:["304","403","203"],"*":D}],[u,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[f,"Vivo"],[u,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[f,"Realme"],[u,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[f,z],[u,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[f,z],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[f,V],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[f,V],[u,m]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[c,[f,"Lenovo"],[u,g]],[/(nokia) (t[12][01])/i],[f,c,[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[c,/_/g," "],[u,m],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[c,[f,H],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[f,H],[u,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[f,R],[u,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[f,R],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[f,N],[u,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[f,b],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[f,b],[u,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,f,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[f,A],[u,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[f,M],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[f,M],[u,m]],[/(nexus 9)/i],[c,[f,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[c,/_/g," "],[u,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[f,"TCL"],[u,g]],[/(itel) ((\w+))/i],[[f,K],c,[u,J,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[f,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[f,"Meizu"],[u,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[f,"Ulefone"],[u,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[f,"Energizer"],[u,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[f,"Cat"],[u,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[f,"Smartfren"],[u,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[f,"Nothing"],[u,m]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[c,[f,"Archos"],[u,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[c,[f,"Archos"],[u,m]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,c,[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[f,c,[u,m]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,c,[u,g]],[/(surface duo)/i],[c,[f,O],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[f,"Fairphone"],[u,m]],[/(u304aa)/i],[c,[f,"AT&T"],[u,m]],[/\bsie-(\w*)/i],[c,[f,"Siemens"],[u,m]],[/\b(rct\w+) b/i],[c,[f,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[c,[f,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[c,[f,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[f,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[c,[f,"NuVision"],[u,g]],[/\b(k88) b/i],[c,[f,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[c,[f,"ZTE"],[u,m]],[/\b(gen\d{3}) b.+49h/i],[c,[f,"Swiss"],[u,m]],[/\b(zur\d{3}) b/i],[c,[f,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[c,[f,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],c,[u,g]],[/\b(ns-?\w{0,9}) b/i],[c,[f,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[f,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],c,[u,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],c,[u,m]],[/\b(ph-1) /i],[c,[f,"Essential"],[u,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[f,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[c,[f,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[c,[f,"Rotor"],[u,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[c,[f,I],[u,g]],[/(sprint) (\w+)/i],[f,c,[u,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,O],[u,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,P],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,P],[u,m]],[/smart-tv.+(samsung)/i],[f,[u,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,Z],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,V],[u,v]],[/(apple) ?tv/i],[f,[c,E+" TV"],[u,v]],[/crkey/i],[[c,L+"cast"],[f,H],[u,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[f,b],[u,v]],[/(shield \w+ tv)/i],[c,[f,I],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[f,j],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[f,R],[u,v]],[/(mi(tv|box)-?\w+) bui/i],[c,[f,B],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[f,c,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[c,Y],[u,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[c,[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,c,[u,C]],[/droid.+; (shield)( bui|\))/i],[c,[f,I],[u,C]],[/(playstation \w+)/i],[c,[f,R],[u,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[f,O],[u,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[c,[f,Z],[u,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,c,[u,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[c,[f,D],[u,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[f,E],[u,y]],[/(opwwe\d{3})/i],[c,[f,N],[u,y]],[/(moto 360)/i],[c,[f,z],[u,y]],[/(smartwatch 3)/i],[c,[f,R],[u,y]],[/(g watch r)/i],[c,[f,V],[u,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[f,P],[u,y]],[/droid.+; (glass) \d/i],[c,[f,H],[u,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,c,[u,y]],[/; (quest( \d| pro)?)/i],[c,[f,F],[u,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[u,w]],[/(aeobc)\b/i],[c,[f,b],[u,w]],[/(homepod).+mac os/i],[c,[f,E],[u,w]],[/windows iot/i],[[u,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,m]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[c,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,h],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[h,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,J,$],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,h],[/\(bb(10);/i],[h,[d,A]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[d,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[d,L+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,h],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var C=typeof n!==o&&n.navigator?n.navigator:r,v=e||(C&&C.userAgent?C.userAgent:""),y=C&&C.userAgentData?C.userAgentData:r,w=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,b=C&&C.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.browser),e[s]=function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[h]),b&&C&&C.brave&&typeof C.brave.isBrave==i&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[p]=r,X.call(e,v,w.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[c]=r,e[u]=r,X.call(e,v,w.device),b&&!e[u]&&y&&y.mobile&&(e[u]=m),b&&"Macintosh"==e[c]&&C&&typeof C.standalone!==o&&C.maxTouchPoints&&C.maxTouchPoints>2&&(e[c]="iPad",e[u]=g),e},this.getEngine=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.engine),e},this.getOS=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.os),b&&!e[d]&&y&&y.platform&&"Unknown"!=y.platform&&(e[d]=y.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===l&&e.length>500?Y(e,500):e,this},this.setUA(v),this};te.VERSION="0.7.41",te.BROWSER=Q([d,h,s]),te.CPU=Q([p]),te.DEVICE=Q([c,f,u,C,m,v,g,y,w]),te.ENGINE=te.OS=Q([d,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==o&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:HZ)}(kZ,kZ.exports)),kZ.exports}function _Z(){if(vT)return gT;vT=1;var e=SZ(),t="Unknown",n={"Mac OS":"Mac OS X"};var r,i=(new e).getResult(),o=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(i.browser.version),a={browserArchitecture:i.cpu.architecture||t,browserFullVersion:i.browser.version||t,browserMinorVersion:o.minor||t,browserName:i.browser.name||t,browserVersion:i.browser.major||t,deviceName:i.device.model||t,engineName:i.engine.name||t,engineVersion:i.engine.version||t,platformArchitecture:i.cpu.architecture||t,platformName:(r=i.os.name,n[r]||r||t),platformVersion:i.os.version||t,platformFullVersion:i.os.version||t};return gT=a}function VZ(){if(wT)return yT;wT=1;var e=jN(),t=/\./,n=/\|\|/,r=/\s+\-\s+/,i=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,o=/^(\d*)(.*)/;function a(t,i){var o=t.split(n);return o.length>1?o.some(function(e){return g.contains(e,i)}):function(t,n){var i=t.split(r);if(i.length>0&&i.length<=2||("production"!==process.env.NODE_ENV?e(!1,'the "-" operator expects exactly 2 operands'):e(!1)),1===i.length)return l(i[0],n);var o=i[0],a=i[1];return f(o)&&f(a)||("production"!==process.env.NODE_ENV?e(!1,'operands to the "-" operator must be simple (no modifiers)'):e(!1)),l(">="+o,n)&&l("<="+a,n)}(t=o[0].trim(),i)}function l(e,n){if(""===(e=e.trim()))return!0;var r=n.split(t),i=d(e),o=i.modifier,a=i.rangeComponents;switch(o){case"<":return s(r,a);case"<=":return function(e,t){var n=m(e,t);return-1===n||0===n}(r,a);case">=":return c(r,a);case">":return 1===m(r,a);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var i=r.length-1,o=parseInt(r[i],10);u(o)&&(r[i]=o+1+"");return c(e,n)&&s(e,r)}(r,a);default:return function(e,t){return 0===m(e,t)}(r,a)}}function s(e,t){return-1===m(e,t)}function c(e,t){var n=m(e,t);return 1===n||0===n}function d(n){var r=n.split(t),o=r[0].match(i);return o||("production"!==process.env.NODE_ENV?e(!1,"expected regex to match but it did not"):e(!1)),{modifier:o[1],rangeComponents:[o[2]].concat(r.slice(1))}}function u(e){return!isNaN(e)&&isFinite(e)}function f(e){return!d(e).modifier}function h(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function p(e,t){var n=e.match(o)[1],r=t.match(o)[1],i=parseInt(n,10),a=parseInt(r,10);return u(i)&&u(a)&&i!==a?C(i,a):C(e,t)}function C(t,n){return typeof t!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,'"a" and "b" must be of the same type'):e(!1)),t>n?1:t<n?-1:0}function m(e,t){for(var n=function(e,t){h(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var i=n;i<e.length;i++)e[i]="0"}return h(t,e.length),[e,t]}(e,t),r=n[0],i=n[1],o=0;o<i.length;o++){var a=p(r[o],i[o]);if(a)return a}return 0}var g={contains:function(e,t){return a(e.trim(),t.trim())}};return yT=g}function OZ(){if(LT)return xT;LT=1;var e=_Z(),t=VZ(),n=function(){if(ET)return bT;ET=1;var e=Object.prototype.hasOwnProperty;return bT=function(t,n,r){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=n.call(r,t[o],o,t));return i},bT}(),r=AT?MT:(AT=1,MT=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}});function i(e,n,r,i){if(e===r)return!0;if(!r.startsWith(e))return!1;var o=r.slice(e.length);return!!n&&(o=i?i(o):o,t.contains(o,n))}function o(t){return"Windows"===e.platformName?t.replace(/^\s*NT/,""):t}return xT=n({isBrowser:function(t){return i(e.browserName,e.browserFullVersion,t)},isBrowserArchitecture:function(t){return i(e.browserArchitecture,null,t)},isDevice:function(t){return i(e.deviceName,null,t)},isEngine:function(t){return i(e.engineName,e.engineVersion,t)},isPlatform:function(t){return i(e.platformName,e.platformFullVersion,t,o)},isPlatformArchitecture:function(t){return i(e.platformArchitecture,null,t)}},r)}function zZ(){if(HT)return kT;return HT=1,kT=function(e){return e&&e.ownerDocument?e.ownerDocument:document}}function IZ(){if(_T)return ST;return _T=1,ST=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}}function NZ(){if(OT)return VT;OT=1;var e=IZ();return VT=function t(n){if(e(n)){var r=n,i=r.getAttribute("data-offset-key");if(i)return i;for(var o=0;o<r.childNodes.length;o++){var a=t(r.childNodes[o]);if(a)return a}}return null},VT}function TZ(){if(IT)return zT;IT=1;var e=zZ(),t=NZ();return zT=function(n){for(var r=n;r&&r!==e(n).documentElement;){var i=t(r);if(null!=i)return i;r=r.parentNode}return null},zT}function DZ(){if(TT)return NT;return TT=1,NT=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}}function ZZ(){if(RT)return jT;RT=1;var e="-";return jT={encode:function(t,n,r){return t+e+n+e+r},decode:function(t){var n=t.split(e).reverse(),r=n[0],i=n[1];return{blockKey:n.slice(2).reverse().join(e),decoratorKey:parseInt(i,10),leafKey:parseInt(r,10)}}}}function jZ(){return PT?BT:(PT=1,BT={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105})}function RZ(){return UT?FT:(UT=1,FT={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}})}function BZ(){if(WT)return qT;return WT=1,qT=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}}function PZ(){if(GT)return QT;GT=1;var e=jN(),t=BZ();return QT=function(n){var r=n.editorContainer;return r||("production"!==process.env.NODE_ENV?e(!1,"Missing editorNode"):e(!1)),t(r.firstChild)||("production"!==process.env.NODE_ENV?e(!1,"editorNode.firstChild is not an HTMLElement"):e(!1)),r.firstChild}}function FZ(){if(YT)return KT;YT=1;var e=ZZ(),t=sT();return KT=function(n,r,i,o,a){var l=t(n.getSelection());if(!r||!o)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var s=e.decode(r),c=s.blockKey,d=n.getBlockTree(c),u=d&&d.getIn([s.decoratorKey,"leaves",s.leafKey]),f=e.decode(o),h=f.blockKey,p=n.getBlockTree(h),C=p&&p.getIn([f.decoratorKey,"leaves",f.leafKey]);if(!u||!C)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var m=u.get("start"),g=C.get("start"),v=u?m+i:null,y=C?g+a:null;if(l.getAnchorKey()===c&&l.getAnchorOffset()===v&&l.getFocusKey()===h&&l.getFocusOffset()===y)return l;var w=!1;if(c===h){var b=u.get("end"),E=C.get("end");w=g===m&&E===b?a<i:g<m}else{var M=n.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===c||e===h}).first();w=M===h}return l.merge({anchorKey:c,anchorOffset:v,focusKey:h,focusOffset:y,isBackward:w})},KT}function UZ(){if(JT)return XT;JT=1;var e=TZ(),t=NZ(),n=FZ(),r=jN(),i=IZ(),o=sT();function a(n,a,s){var c=a,d=e(c);(null!=d||n&&(n===c||n.firstChild===c)||("production"!==process.env.NODE_ENV?r(!1,"Unknown node in selection range."):r(!1)),n===c)&&(c=c.firstChild,i(c)||("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents node."):r(!1)),"true"!==(c=c).getAttribute("data-contents")&&("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents structure."):r(!1)),s>0&&(s=c.childNodes.length));if(0===s){var u=null;if(null!=d)u=d;else{var f=function(e){for(;e.firstChild&&(i(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||t(e.firstChild));)e=e.firstChild;return e}(c);u=o(t(f))}return{key:u,offset:0}}var h=c.childNodes[s-1],p=null,C=null;if(t(h)){var m=function(e){for(;e.lastChild&&(i(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||t(e.lastChild));)e=e.lastChild;return e}(h);p=o(t(m)),C=l(m)}else p=o(d),C=l(h);return{key:p,offset:C}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}return XT=function(t,r,i,l,s,c){var d=i.nodeType===Node.TEXT_NODE,u=s.nodeType===Node.TEXT_NODE;if(d&&u)return{selectionState:n(t,o(e(i)),l,o(e(s)),c),needsRecovery:!1};var f=null,h=null,p=!0;return d?(f={key:o(e(i)),offset:l},h=a(r,s,c)):u?(h={key:o(e(s)),offset:c},f=a(r,i,l)):(f=a(r,i,l),h=a(r,s,c),i===s&&l===c&&(p=!!i.firstChild&&"BR"!==i.firstChild.nodeName)),{selectionState:n(t,f.key,f.offset,h.key,h.offset),needsRecovery:p}}}function qZ(){if(eD)return $T;eD=1;var e=UZ();return $T=function(t,n){var r=n.ownerDocument.defaultView.getSelection(),i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,l=r.focusOffset;return 0===r.rangeCount||null==i||null==a?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:e(t,n,i,o,a,l)}}function WZ(){if(nD)return tD;nD=1;var e=RZ(),t=dT(),n=PZ(),r=qZ();return tD=function(i){if(i._blockSelectEvents||i._latestEditorState!==i.props.editorState){if(i._blockSelectEvents){var o=i.props.editorState.getSelection();e.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(o.toJS())})}}else{var a=i.props.editorState,l=r(a,n(i)),s=l.selectionState;s!==a.getSelection()&&(a=l.needsRecovery?t.forceSelection(a,s):t.acceptSelection(a,s),i.update(a))}}}function QZ(){if(iD)return rD;return iD=1,rD={notEmptyKey:function(e){return null!=e&&""!=e}},rD}function GZ(){if(aD)return oD;aD=1;var e=QZ().notEmptyKey;function t(t,n){return e(n)&&"MUTABLE"===t.__get(n).getMutability()?n:null}return oD=function(e,n){var r;if(n.isCollapsed()){var i=n.getAnchorKey(),o=n.getAnchorOffset();return o>0?(r=e.getBlockForKey(i).getEntityAt(o-1))!==e.getBlockForKey(i).getEntityAt(o)?null:t(e.getEntityMap(),r):null}var a=n.getStartKey(),l=n.getStartOffset(),s=e.getBlockForKey(a);return r=l===s.getLength()?null:s.getEntityAt(l),t(e.getEntityMap(),r)},oD}function KZ(){if(sD)return lD;sD=1;var e=function(){if(ZT)return DT;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ZT=1;var t=OZ(),n=TZ(),r=DZ(),i=ON(),o=jN(),a=sT(),l=i.Map,s={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},c=t.isBrowser("IE <= 11"),d=function(){function t(t){var n=this;e(this,"observer",void 0),e(this,"container",void 0),e(this,"mutations",void 0),e(this,"onCharData",void 0),this.container=t,this.mutations=l();var i=r(t);i.MutationObserver&&!c?this.observer=new i.MutationObserver(function(e){return n.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||("production"!==process.env.NODE_ENV?o(!1,"Expected target to be an instance of Node"):o(!1)),n.registerMutation({type:"characterData",target:e.target})}}var i=t.prototype;return i.start=function(){this.observer?this.observer.observe(this.container,s):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},i.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=l(),t},i.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},i.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return c?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},i.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var r=a(n(e.target));this.mutations=this.mutations.set(r,t)}},t}();return DT=d}(),t=XN(),n=ZZ(),r=dT(),i=jZ(),o=OZ(),a=WZ(),l=PZ(),s=qZ(),c=GZ(),d=sT(),u=o.isBrowser("IE"),f=!1,h=!1,p=null;var C={onCompositionStart:function(t){h=!0,function(t){p||(p=new e(l(t))).start()}(t)},onCompositionEnd:function(e){f=!1,h=!1,setTimeout(function(){f||C.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){if(!h)return C.resolveComposition(e),void e._onKeyDown(t);t.which!==i.RIGHT&&t.which!==i.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===i.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!h){var i=d(p).stopAndFlushMutations();p=null,f=!0;var o=r.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),i.size){var a=o.getCurrentContent();i.forEach(function(e,i){var l=n.decode(i),s=l.blockKey,d=l.decoratorKey,u=l.leafKey,f=o.getBlockTree(s).getIn([d,"leaves",u]),h=f.start,p=f.end,C=o.getSelection().merge({anchorKey:s,focusKey:s,anchorOffset:h,focusOffset:p,isBackward:!1}),m=c(a,C),g=a.getBlockForKey(s).getInlineStyleAt(h);a=t.replaceText(a,C,e,g,m),o=r.set(o,{currentContent:a})});var C=s(o,l(e)).selectionState;e.restoreEditorDOM();var m=u?r.forceSelection(o,C):r.acceptSelection(o,C);e.update(r.push(m,a,"insert-characters"))}else e.update(o)}}};return lD=C}function YZ(){if(dD)return cD;dD=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=ZZ(),r=i,o=lT(),a=aT(),l=function(e){var i,l;function s(){return e.apply(this,arguments)||this}return l=e,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,s.prototype.render=function(){var e=this.props,i=e.block,l=e.children,s=e.contentState,c=e.decorator,d=e.decoratorKey,u=e.direction,f=e.leafSet,h=e.text,p=i.getKey(),C=f.get("leaves"),m=c.getComponentForKey(d),g=c.getPropsForKey(d),v=n.encode(p,parseInt(d,10),0),y=h.slice(C.first().get("start"),C.last().get("end")),w=a.getHTMLDirIfDifferent(o.getDirection(y),u);return r.createElement(m,t({},g,{contentState:s,decoratedText:y,dir:w,key:v,entityKey:i.getEntityAt(f.get("start")),offsetKey:v}),l)},s}(r.Component);return cD=l}function XZ(){if(fD)return uD;function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fD=1;var n=i,r=OZ(),o=jN(),a=IZ(),l=r.isBrowser("IE <= 11");var s=function(r){var i,s;function c(n){var i;return t(e(i=r.call(this,n)||this),"_forceFlag",void 0),t(e(i),"_node",void 0),i._forceFlag=!1,i}s=r,(i=c).prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s;var d=c.prototype;return d.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;a(t)||("production"!==process.env.NODE_ENV?o(!1,"node is not an Element"):o(!1));var r=t;return n?!function(e){return l?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},d.componentDidMount=function(){this._forceFlag=!this._forceFlag},d.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},d.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},l?n.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"A","data-text":"true",ref:e})):function(e){return l?n.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"B","data-text":"true",ref:e})}(function(e){return t._node=e}):n.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},c}(n.Component);return uD=s}function JZ(){if(pD)return hD;pD=1;var e=IZ();return hD=function(t){return!(!t||!t.ownerDocument)&&(e(t)&&"BR"===t.nodeName)}}function $Z(){return mD?CD:(mD=1,CD={initODS:function(){},handleExtensionCausedError:function(){}})}function ej(){if(wD)return yD;wD=1;var e=vD?gD:(vD=1,gD=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))});return yD=function(t){return e(t)&&3==t.nodeType}}function tj(){if(ED)return bD;ED=1;var e=ej();return bD=function t(n,r){return!(!n||!r)&&(n===r||!e(n)&&(e(r)?t(n,r.parentNode):"contains"in n?n.contains(r):!!n.compareDocumentPosition&&!!(16&n.compareDocumentPosition(r))))},bD}function nj(){if(AD)return MD;return AD=1,MD=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}}function rj(){if(LD)return xD;LD=1;var e=$Z(),t=RZ(),n=OZ(),r=tj(),i=nj(),o=zZ(),a=jN(),l=IZ(),s=n.isBrowser("IE");function c(e,t){if(!e)return"[empty]";var n=d(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(l(n)||("production"!==process.env.NODE_ENV?a(!1,"Node must be an Element if it is not a text node."):a(!1)),n.outerHTML)}function d(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return o(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var i=e.cloneNode();1===i.nodeType&&n.length&&i.setAttribute("data-labels",n.join(", "));for(var a=e.childNodes,l=0;l<a.length;l++)i.appendChild(d(a[l],t));return i}function u(e,t){for(var n=e,r=n;n;){if(l(n)&&r.hasAttribute("contenteditable"))return c(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function f(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function h(e,n,o,a){var l=i();if(e.extend&&null!=n&&r(l,n)){o>f(n)&&t.logSelectionStateFailure({anonymizedDom:u(n),extraParams:JSON.stringify({offset:o}),selectionState:JSON.stringify(a.toJS())});var s=n===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(n,o)}catch(r){throw t.logSelectionStateFailure({anonymizedDom:u(n,function(t){var n=[];return t===l&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n}),extraParams:JSON.stringify({activeElementName:l?l.nodeName:null,nodeIsFocus:n===e.focusNode,nodeWasFocus:s,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:r?""+r:null,offset:o},null,2),selectionState:JSON.stringify(a.toJS(),null,2)}),r}}else if(n&&e.rangeCount>0){var c=e.getRangeAt(0);c.setEnd(n,o),e.addRange(c.cloneRange())}}function p(n,r,i,a){var l=o(r).createRange();if(i>f(r)&&(t.logSelectionStateFailure({anonymizedDom:u(r),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(a.toJS())}),e.handleExtensionCausedError()),l.setStart(r,i),s)try{n.addRange(l)}catch(e){"production"!==process.env.NODE_ENV&&console.warn("Call to selection.addRange() threw exception: ",e)}else n.addRange(l)}return xD={setDraftEditorSelection:function(e,t,n,i,a){var l=o(t);if(r(l.documentElement,t)){var s=l.defaultView.getSelection(),c=e.getAnchorKey(),d=e.getAnchorOffset(),u=e.getFocusKey(),f=e.getFocusOffset(),C=e.getIsBackward();if(!s.extend&&C){var m=c,g=d;c=u,d=f,u=m,f=g,C=!1}var v=c===n&&i<=d&&a>=d,y=u===n&&i<=f&&a>=f;if(v&&y)return s.removeAllRanges(),p(s,t,d-i,e),void h(s,t,f-i,e);if(C){if(y&&(s.removeAllRanges(),p(s,t,f-i,e)),v){var w=s.focusNode,b=s.focusOffset;s.removeAllRanges(),p(s,t,d-i,e),h(s,w,b,e)}}else v&&(s.removeAllRanges(),p(s,t,d-i,e)),y&&h(s,t,f-i,e)}},addFocusToSelection:h}}function ij(){if(HD)return kD;HD=1;var e=Fh();var t=XZ(),n=i,r=jN(),o=JZ(),a=rj().setDraftEditorSelection,l=function(i){var l,s;function c(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=i.call.apply(i,[this].concat(n))||this),"leaf",void 0),e}s=i,(l=c).prototype=Object.create(s.prototype),l.prototype.constructor=l,l.__proto__=s;var d=c.prototype;return d._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,i=t.start,l=t.text,s=n.getKey(),c=i+l.length;if(e.hasEdgeWithin(s,i,c)){var d=this.leaf;d||("production"!==process.env.NODE_ENV?r(!1,"Missing node"):r(!1));var u,f=d.firstChild;f||("production"!==process.env.NODE_ENV?r(!1,"Missing child"):r(!1)),f.nodeType===Node.TEXT_NODE?u=f:o(f)?u=d:(u=f.firstChild)||("production"!==process.env.NODE_ENV?r(!1,"Missing targetNode"):r(!1)),a(e,u,s,i,c)}}},d.shouldComponentUpdate=function(e){var t=this.leaf;return t||("production"!==process.env.NODE_ENV?r(!1,"Missing leafNode"):r(!1)),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},d.componentDidUpdate=function(){this._setSelection()},d.componentDidMount=function(){this._setSelection()},d.render=function(){var r=this,i=this.props.block,o=this.props.text;o.endsWith("\n")&&this.props.isLast&&(o+="\n");var a=this.props,l=a.customStyleMap,s=a.customStyleFn,c=a.offsetKey,d=a.styleSet,u=d.reduce(function(t,n){var r={},i=l[n];return void 0!==i&&t.textDecoration!==i.textDecoration&&(r.textDecoration=[t.textDecoration,i.textDecoration].join(" ").trim()),e(t,i,r)},{});if(s){var f=s(d,i);u=e(u,f)}return n.createElement("span",{"data-offset-key":c,ref:function(e){return r.leaf=e},style:u},n.createElement(t,null,o))},c}(n.Component);return kD=l}function oj(){if(_D)return SD;_D=1;var e=YZ(),t=ij(),n=ZZ(),r=ON(),o=i,a=hT();r.List;var l=function(r){var i,l;function s(){return r.apply(this,arguments)||this}return l=r,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,s.prototype.render=function(){var r=this.props,i=r.block,l=r.contentState,s=r.customStyleFn,c=r.customStyleMap,d=r.decorator,u=r.direction,f=r.forceSelection,h=r.hasSelection,p=r.selection,C=r.tree,m=i.getKey(),g=i.getText(),v=C.size-1,y=this.props.children||C.map(function(r,a){var C=r.get("decoratorKey"),y=r.get("leaves"),w=y.size-1,b=y.map(function(e,r){var l=n.encode(m,a,r),d=e.get("start"),u=e.get("end");return o.createElement(t,{key:l,offsetKey:l,block:i,start:d,selection:h?p:null,forceSelection:f,text:g.slice(d,u),styleSet:i.getInlineStyleAt(d),customStyleMap:c,customStyleFn:s,isLast:C===v&&r===w})}).toArray();return C&&d?o.createElement(e,{block:i,children:b,contentState:l,decorator:d,decoratorKey:C,direction:u,leafSet:r,text:g,key:a}):b}).toArray();return o.createElement("div",{"data-offset-key":n.encode(m,0,0),className:a({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===u,"public/DraftStyleDefault/rtl":"RTL"===u})},y)},s}(o.Component);return SD=l}function aj(){if(OD)return VD;function e(e,t){return!!t&&(e===t.documentElement||e===t.body)}return OD=1,VD={getTop:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollTop||n.documentElement.scrollTop:t.scrollTop},setTop:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollTop=r.documentElement.scrollTop=n:t.scrollTop=n},getLeft:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollLeft||n.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollLeft=r.documentElement.scrollLeft=n:t.scrollLeft=n}}}function lj(){if(ZD)return DD;ZD=1;var e=function(){if(ID)return zD;ID=1;var e=/-(.)/g;return zD=function(t){return t.replace(e,function(e,t){return t.toUpperCase()})}}(),t=function(){if(TD)return ND;TD=1;var e=/([A-Z])/g;return ND=function(t){return t.replace(e,"-$1").toLowerCase()}}();function n(e){return null==e?e:String(e)}return DD=function(r,i){var o;if(window.getComputedStyle&&(o=window.getComputedStyle(r,null)))return n(o.getPropertyValue(t(i)));if(document.defaultView&&document.defaultView.getComputedStyle){if(o=document.defaultView.getComputedStyle(r,null))return n(o.getPropertyValue(t(i)));if("display"===i)return"none"}return r.currentStyle?n("float"===i?r.currentStyle.cssFloat||r.currentStyle.styleFloat:r.currentStyle[e(i)]):n(r.style&&r.style[e(i)])}}function sj(){if(RD)return jD;function e(e,n){var r=t.get(e,n);return"auto"===r||"scroll"===r}RD=1;var t={get:lj(),getScrollParent:function(t){if(!t)return null;for(var n=t.ownerDocument;t&&t!==n.body;){if(e(t,"overflow")||e(t,"overflowY")||e(t,"overflowX"))return t;t=t.parentNode}return n.defaultView||n.parentWindow}};return jD=t}function cj(){if(UD)return FD;UD=1;var e=function(){if(PD)return BD;PD=1;var e=tj();return BD=function(t){var n=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!e(n,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-n.clientLeft,right:Math.round(r.right)-n.clientLeft,top:Math.round(r.top)-n.clientTop,bottom:Math.round(r.bottom)-n.clientTop}}}();return FD=function(t){var n=e(t);return{x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top}}}function dj(){if(YD)return KD;YD=1;var e=function(){if(WD)return qD;WD=1;var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;return qD=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}}(),t=GD?QD:(GD=1,QD=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}});return KD=function(n){var r=e(n.ownerDocument||n.document);n.Window&&n instanceof n.Window&&(n=r);var i=t(n),o=n===r?n.ownerDocument.documentElement:n,a=n.scrollWidth-o.clientWidth,l=n.scrollHeight-o.clientHeight;return i.x=Math.max(0,Math.min(i.x,a)),i.y=Math.max(0,Math.min(i.y,l)),i}}function uj(){if(JD)return XD;function e(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function t(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||t()}}return JD=1,n.withoutScrollbars=function(){return{width:e(),height:t()}},XD=n}function fj(){if(eZ)return $D;eZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=oj(),a=ZZ(),l=i,s=aj(),c=sj(),d=cj(),u=dj(),f=uj(),h=ON(),p=jN(),C=BZ();h.List;var m=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},g=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},y=function(e,t,r,i,o,a){var l={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},s=i(e);return s&&(l.className=s),void 0!==o.customEditable&&(l=n({},l,{contentEditable:o.customEditable,suppressContentEditableWarning:!0})),l},w=function(e){var i,h;function w(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(i))||this),"wrapperRef",l.createRef()),t}h=e,(i=w).prototype=Object.create(h.prototype),i.prototype.constructor=i,i.__proto__=h;var b=w.prototype;return b.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,i=t.tree,o=!n.getChildKeys().isEmpty(),a=n!==e.block||i!==e.tree||r!==e.direction||m(e.selection,e.block.getKey())&&e.forceSelection;return o||a},b.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,i=c.getScrollParent(n),o=u(i);if(i===window){var a=d(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{C(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1));var l=n;(r=l.offsetHeight+l.offsetTop-(i.offsetHeight+o.y))>0&&s.setTop(i,s.getTop(i)+r+10)}}}},b.render=function(){var e=this,r=this.props,i=r.block,s=r.blockRenderMap,c=r.blockRendererFn,d=r.blockStyleFn,u=r.contentState,f=r.decorator,h=r.editorKey,p=r.editorState,C=r.customStyleFn,b=r.customStyleMap,E=r.direction,M=r.forceSelection,A=r.selection,x=r.tree,L=null;i.children.size&&(L=i.children.reduce(function(t,r){var i=a.encode(r,0,0),o=u.getBlockForKey(r),f=v(o,c),C=f.CustomComponent||w,m=g(o,s),b=m.Element,E=m.wrapperTemplate,M=y(o,h,i,d,f,null),A=n({},e.props,{tree:p.getBlockTree(r),blockProps:f.customProps,offsetKey:i,block:o});return t.push(l.createElement(b,M,l.createElement(C,A))),!E||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(o,u)||function(e,t,n){var r=[],i=!0,o=!1,s=void 0;try{for(var c,d=n.reverse()[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var u=c.value;if(u.type!==t)break;r.push(u)}}catch(e){o=!0,s=e}finally{try{i||null==d.return||d.return()}finally{if(o)throw s}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),h=f[0].key;n.push(l.cloneElement(e,{key:"".concat(h,"-wrap"),"data-offset-key":a.encode(h,0,0)},f))}(E,b,t),t},[]));var k=i.getKey(),H=a.encode(k,0,0),S=v(i,c),_=S.CustomComponent,V=null!=_?l.createElement(_,t({},this.props,{tree:p.getBlockTree(k),blockProps:S.customProps,offsetKey:H,block:i})):l.createElement(o,{block:i,children:L,contentState:u,customStyleFn:C,customStyleMap:b,decorator:f,direction:E,forceSelection:M,hasSelection:m(A,k),selection:A,tree:x});if(i.getParentKey())return V;var O=g(i,s).Element,z=y(i,h,H,d,S,this.wrapperRef);return l.createElement(O,z,V)},w}(l.Component);return $D=w}function hj(){if(nZ)return tZ;nZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=fj(),r=ZZ(),o=i,a=sT(),l=function(e){var i,l;function s(){return e.apply(this,arguments)||this}l=e,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var c=s.prototype;return c.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),s=t.getDecorator(),c=n.getDecorator();return i!==o||a!==l||s!==c||n.mustForceSelection()},c.render=function(){for(var e=this.props,i=e.blockRenderMap,l=e.blockRendererFn,s=e.blockStyleFn,c=e.customStyleMap,d=e.customStyleFn,u=e.editorState,f=e.editorKey,h=e.textDirectionality,p=u.getCurrentContent(),C=u.getSelection(),m=u.mustForceSelection(),g=u.getDecorator(),v=a(u.getDirectionMap()),y=[],w=p.getBlocksAsArray()[0];w;){var b=w.getKey(),E={blockRenderMap:i,blockRendererFn:l,blockStyleFn:s,contentState:p,customStyleFn:d,customStyleMap:c,decorator:g,editorKey:f,editorState:u,forceSelection:m,selection:C,block:w,direction:h||v.get(b),tree:u.getBlockTree(b)},M=(i.get(w.getType())||i.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:b},E)),wrapperTemplate:M,key:b,offsetKey:r.encode(b,0,0)});var A=w.getNextSiblingKey();w=A?p.getBlockForKey(A):null}for(var x=[],L=0;L<y.length;){var k=y[L];if(k.wrapperTemplate){var H=[];do{H.push(y[L].block),L++}while(L<y.length&&y[L].wrapperTemplate===k.wrapperTemplate);var S=o.cloneElement(k.wrapperTemplate,{key:k.key+"-wrap","data-offset-key":k.offsetKey},H);x.push(S)}else x.push(k.block),L++}return o.createElement("div",{"data-contents":"true"},x)},s}(o.Component);return tZ=l}function pj(){if(iZ)return rZ;iZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=ij(),r=ZZ(),o=i,a=aj(),l=sj(),s=lT(),c=aT(),d=hT(),u=cj(),f=dj(),h=uj(),p=jN(),C=BZ(),m=sT(),g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},v=function(e){var i,v;function y(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}v=e,(i=y).prototype=Object.create(v.prototype),i.prototype.constructor=i,i.__proto__=v;var w=y.prototype;return w.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection},w.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,i=l.getScrollParent(n),o=f(i);if(i===window){var s=u(n);(r=s.y+s.height-h().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{C(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1)),(r=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&a.setTop(i,a.getTop(i)+r+10)}}}}},w._renderChildren=function(){var e=this,i=this.props.block,a=i.getKey(),l=i.getText(),d=this.props.tree.size-1,u=g(this.props.selection,a);return this.props.tree.map(function(f,h){var p=f.get("leaves");if(0===p.size)return null;var C=p.size-1,g=p.map(function(t,s){var c=r.encode(a,h,s),f=t.get("start"),p=t.get("end");return o.createElement(n,{key:c,offsetKey:c,block:i,start:f,selection:u?e.props.selection:null,forceSelection:e.props.forceSelection,text:l.slice(f,p),styleSet:i.getInlineStyleAt(f),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:h===d&&s===C})}).toArray(),v=f.get("decoratorKey");if(null==v)return g;if(!e.props.decorator)return g;var y=m(e.props.decorator),w=y.getComponentForKey(v);if(!w)return g;var b=y.getPropsForKey(v),E=r.encode(a,h,0),M=p.first().get("start"),A=p.last().get("end"),x=l.slice(M,A),L=i.getEntityAt(f.get("start")),k=c.getHTMLDirIfDifferent(s.getDirection(x),e.props.direction),H={contentState:e.props.contentState,decoratedText:x,dir:k,start:M,end:A,blockKey:a,entityKey:L,offsetKey:E};return o.createElement(w,t({},b,H,{key:E}),g)}).toArray()},w.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,i=d({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return o.createElement("div",{"data-offset-key":r,className:i,ref:function(t){return e._node=t}},this._renderChildren())},y}(o.Component);return rZ=v}function Cj(){if(sZ)return lZ;sZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=pj(),a=ZZ(),l=i,s=hT(),c=(aZ||(aZ=1,oZ=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var i=arguments[r];i&&(t=(t?t+" ":"")+i)}return t}),oZ),d=sT(),u=function(e,t,n,r){return s({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){var r,i;function s(){return e.apply(this,arguments)||this}i=e,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var f=s.prototype;return f.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),s=t.getDecorator(),c=n.getDecorator();return i!==o||a!==l||s!==c||n.mustForceSelection()},f.render=function(){for(var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,s=e.blockStyleFn,f=e.customStyleMap,h=e.customStyleFn,p=e.editorState,C=e.editorKey,m=e.preventScroll,g=e.textDirectionality,v=p.getCurrentContent(),y=p.getSelection(),w=p.mustForceSelection(),b=p.getDecorator(),E=d(p.getDirectionMap()),M=v.getBlocksAsArray(),A=[],x=null,L=null,k=0;k<M.length;k++){var H=M[k],S=H.getKey(),_=H.getType(),V=i(H),O=void 0,z=void 0,I=void 0;V&&(O=V.component,z=V.props,I=V.editable);var N=g||E.get(S),T=a.encode(S,0,0),D={contentState:v,block:H,blockProps:z,blockStyleFn:s,customStyleMap:f,customStyleFn:h,decorator:b,direction:N,forceSelection:w,offsetKey:T,preventScroll:m,selection:y,tree:p.getBlockTree(S)},Z=r.get(_)||r.get("unstyled"),j=Z.wrapper,R=Z.element||r.get("unstyled").element,B=H.getDepth(),P="";if(s&&(P=s(H)),"li"===R)P=c(P,u(_,B,L!==j||null===x||B>x,N));var F=O||o,U={className:P,"data-block":!0,"data-editor":C,"data-offset-key":T,key:S};void 0!==I&&(U=n({},U,{contentEditable:I,suppressContentEditableWarning:!0}));var q=l.createElement(R,U,l.createElement(F,t({},D,{key:S})));A.push({block:q,wrapperTemplate:j,key:S,offsetKey:T}),x=j?H.getDepth():null,L=j}for(var W=[],Q=0;Q<A.length;){var G=A[Q];if(G.wrapperTemplate){var K=[];do{K.push(A[Q].block),Q++}while(Q<A.length&&A[Q].wrapperTemplate===G.wrapperTemplate);var Y=l.cloneElement(G.wrapperTemplate,{key:G.key+"-wrap","data-offset-key":G.offsetKey},K);W.push(Y)}else W.push(G.block),Q++}return l.createElement("div",{"data-contents":"true"},W)},s}(l.Component);return lZ=f}function mj(){if(pZ)return hZ;pZ=1;var e=jN();return hZ=function(t){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(t)?Array.isArray(t)?t.slice():function(t){var n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Array-like object expected"):e(!1)),"number"!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object needs a length property"):e(!1)),0===n||n-1 in t||("production"!==process.env.NODE_ENV?e(!1,"toArray: Object should have keys for indices"):e(!1)),"function"==typeof t.callee&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object can't be `arguments`. Use rest params (function(...args) {}) or Array.from() instead."):e(!1)),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r=Array(n),i=0;i<n;i++)r[i]=t[i];return r}(t):[t]}}function gj(){if(mZ)return CZ;function e(e){return function(){return e}}mZ=1;var t=function(){};return t.thatReturns=e,t.thatReturnsFalse=e(!1),t.thatReturnsTrue=e(!0),t.thatReturnsNull=e(null),t.thatReturnsThis=function(){return this},t.thatReturnsArgument=function(e){return e},CZ=t}function vj(){if(vZ)return gZ;vZ=1;var e=function(){if(fZ)return uZ;fZ=1;var e={isImage:function(e){return"image"===t(e)[0]},isJpeg:function(n){var r=t(n);return e.isImage(n)&&("jpeg"===r[1]||"pjpeg"===r[1])}};function t(e){return e.split("/")}return uZ=e}(),t=mj(),n=gj(),r=new RegExp("\r\n","g"),i={"text/rtf":1,"text/html":1};function o(e){if("file"==e.kind)return e.getAsFile()}return gZ=function(){function a(e){this.data=e,this.types=e.types?t(e.types):[]}var l=a.prototype;return l.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return i[e]})},l.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(r,"\n"):null},l.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},l.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},l.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},l.isImage=function(){var t=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(t)return!0;for(var n=this.getFiles(),r=0;r<n.length;r++){var i=n[r].type;if(!e.isImage(i))return!1}return!0},l.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},l.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(o).filter(n.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},l.hasFiles=function(){return this.getFiles().length>0},a}()}function yj(){if(wZ)return yZ;wZ=1;var e=jN(),t=/\.textClipping$/,n={"text/plain":!0,"text/html":!0,"text/rtf":!0};return yZ=function(r,i){var o=0,a=[];r.forEach(function(l){!function(r,i){if(!H.FileReader||r.type&&!(r.type in n))return void i("");if(""===r.type){var o="";return t.test(r.name)&&(o=r.name.replace(t,"")),void i(o)}var a=new FileReader;a.onload=function(){var t=a.result;"string"!=typeof t&&("production"!==process.env.NODE_ENV?e(!1,'We should be calling "FileReader.readAsText" which returns a string'):e(!1)),i(t)},a.onerror=function(){i("")},a.readAsText(r)}(l,function(e){o++,e&&a.push(e.slice(0,5e3)),o==r.length&&i(a.join("\r"))})})},yZ}function wj(){if(EZ)return bZ;return EZ=1,bZ=function(e){return"handled"===e||!0===e}}function bj(){if(AZ)return MZ;AZ=1;var e=vj(),t=XN(),n=dT(),r=TZ(),i=zZ(),o=yj(),a=FZ(),l=DZ(),s=wj(),c=sT();var d={onDragEnd:function(e){e.exitCurrentMode(),u(e)},onDrop:function(l,d){var h=new e(d.nativeEvent.dataTransfer),p=l._latestEditorState,C=function(e,t){var n=null,o=null,l=i(e.currentTarget);if("function"==typeof l.caretRangeFromPoint){var s=l.caretRangeFromPoint(e.x,e.y);n=s.startContainer,o=s.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,o=e.rangeOffset}n=c(n),o=c(o);var d=c(r(n));return a(t,d,o,d,o)}(d.nativeEvent,p);if(d.preventDefault(),l._dragCount=0,l.exitCurrentMode(),null!=C){var m=h.getFiles();if(m.length>0){if(l.props.handleDroppedFiles&&s(l.props.handleDroppedFiles(C,m)))return;o(m,function(e){e&&l.update(f(p,C,e))})}else{var g=l._internalDrag?"internal":"external";l.props.handleDrop&&s(l.props.handleDrop(C,h,g))||(l._internalDrag?l.update(function(e,r){var i=t.moveText(e.getCurrentContent(),e.getSelection(),r);return n.push(e,i,"insert-fragment")}(p,C)):l.update(f(p,C,h.getText()))),u(l)}}}};function u(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function f(e,r,i){var o=t.insertText(e.getCurrentContent(),r,i,e.getCurrentInlineStyle());return n.push(e,o,"insert-fragment")}return MZ=d}var Ej,Mj,Aj,xj,Lj,kj,Hj,Sj,_j,Vj,Oj,zj,Ij,Nj,Tj,Dj,Zj,jj,Rj,Bj,Pj,Fj,Uj,qj,Wj,Qj,Gj,Kj,Yj,Xj,Jj,$j,eR,tR,nR,rR,iR,oR,aR,lR,sR,cR,dR,uR,fR,hR,pR,CR,mR,gR,vR,yR,wR,bR,ER,MR,AR,xR,LR,kR,HR,SR,_R,VR,OR,zR,IR,NR,TR,DR,ZR,jR,RR,BR,PR,FR,UR,qR,WR,QR,GR,KR,YR,XR,JR,$R,eB,tB,nB,rB,iB,oB,aB,lB,sB,cB,dB,uB,fB,hB,pB,CB={};function mB(){return Aj?Mj:(Aj=1,Ej||(Ej=1,function(e){if(!e.setImmediate){var t,n,r,i,o=1,a={},l=!1,s=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(r="setImmediate$"+Math.random()+"$",i=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&u(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),t=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},t=function(e){n.port2.postMessage(e)}):s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;t=function(t){var n=s.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];var i={callback:e,args:n};return a[o]=i,t(o),o++},c.clearImmediate=d}function d(e){delete a[e]}function u(e){if(l)setTimeout(u,0,e);else{var t=a[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===H?CB:H:self)),Mj=H.setImmediate)}function gB(){if(Lj)return xj;Lj=1;var e=XN(),t=dT(),n=OZ(),r=GZ(),i=wj(),o=LZ?xZ:(LZ=1,xZ=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),i=t.getStartOffset(),o=!1;return r.some(function(e){return i===e.get("start")?(o=!0,!0):i<e.get("end")&&e.get("leaves").some(function(e){var t=e.get("start");return i===t&&(o=!0,!0)})}),o}),a=sT(),l=mB(),s=n.isBrowser("Firefox");function c(n,r,i,o,a){var l=e.replaceText(n.getCurrentContent(),n.getSelection(),r,i,o);return t.push(n,l,"insert-characters",a)}return xj=function(e,n){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var d=e._latestEditorState,u=n.data;if(u)if(e.props.handleBeforeInput&&i(e.props.handleBeforeInput(u,d,n.timeStamp)))n.preventDefault();else{var f=d.getSelection(),h=f.getStartOffset(),p=f.getAnchorKey();if(!f.isCollapsed())return n.preventDefault(),void e.update(c(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!0));var C,m=c(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!1),g=!1;if(g||(g=o(e._latestCommittedEditorState)),!g){var v=d.getBlockTree(p),y=m.getBlockTree(p);g=v.size!==y.size||v.zip(y).some(function(e){var t=e[0],n=e[1],r=t.get("start"),i=r+(r>=h?u.length:0),o=t.get("end"),a=o+(o>=h?u.length:0),l=n.get("start"),s=n.get("end"),c=n.get("decoratorKey");return t.get("decoratorKey")!==c||t.get("leaves").size!==n.get("leaves").size||i!==l||a!==s||null!=c&&s-l!==o-r})}if(g||(C=u,g=s&&("'"==C||"/"==C)),g||(g=a(m.getDirectionMap()).get(p)!==a(d.getDirectionMap()).get(p)),g)return n.preventDefault(),m=t.set(m,{forceSelection:!0}),void e.update(m);m=t.set(m,{nativelyRenderedContent:m.getCurrentContent()}),e._pendingStateFromBeforeInput=m,l(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)})}},xj}function vB(){if(Oj)return Vj;Oj=1;var e=UN();return Vj=function(t){var n=t.getSelection();return n.isCollapsed()?null:e(t.getCurrentContent(),n)}}function yB(){if(Zj)return Dj;Zj=1;var e=XN(),t=dT(),n=sj(),r=vB(),i=dj(),o=Tj?Nj:(Tj=1,Nj=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1});return Dj=function(a,l){var s,c=a._latestEditorState,d=c.getSelection(),u=l.target;if(d.isCollapsed())l.preventDefault();else{if(o(u)){var f=u;s=i(n.getScrollParent(f))}var h=r(c);a.setClipboard(h),a.setMode("cut"),setTimeout(function(){a.restoreEditorDOM(s),a.exitCurrentMode(),a.update(function(n){var r=e.removeRange(n.getCurrentContent(),n.getSelection(),"forward");return t.push(n,r,"remove-range")}(c))},0)}},Dj}function wB(){if(Wj)return qj;Wj=1;var e=jN(),t=/[\uD800-\uDFFF]/;function n(e){return 55296<=e&&e<=57343}function r(e){return t.test(e)}function i(e,t){return 1+n(e.charCodeAt(t))}function o(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!r(e))return e.substr(t,n);var o=e.length;if(o<=0||t>o||n<=0)return"";var a=0;if(t>0){for(;t>0&&a<o;t--)a+=i(e,a);if(a>=o)return""}else if(t<0){for(a=o;t<0&&0<a;t++)a-=i(e,a-1);a<0&&(a=0)}var l=o;if(n<o)for(l=a;n>0&&l<o;n--)l+=i(e,l);return e.substring(a,l)}var a={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=i(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:i,hasSurrogateUnit:r,isCodeUnitInSurrogateRange:n,isSurrogatePair:function(t,n){if(0<=n&&n<t.length||("production"!==process.env.NODE_ENV?e(!1,"isSurrogatePair: Invalid index %s for string length %s.",n,t.length):e(!1)),n+1===t.length)return!1;var r=t.charCodeAt(n),i=t.charCodeAt(n+1);return 55296<=r&&r<=56319&&56320<=i&&i<=57343},strlen:function(e){if(!r(e))return e.length;for(var t=0,n=0;n<e.length;n+=i(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return o(e,t=t<n?t:n,r)},substr:o};return qj=a}function bB(){if(Gj)return Qj;Gj=1;var e=gj();function t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}}var n="production"!==process.env.NODE_ENV?function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.apply(void 0,[n].concat(i))}}:e;return Qj=n}function EB(){if(Yj)return Kj;Yj=1;var e=bB();return Kj=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionBackward should only be called with a collapsed SelectionState");var i=t.getCurrentContent(),o=r.getStartKey(),a=r.getStartOffset(),l=o,s=0;if(n>a){var c=i.getKeyBefore(o);if(null==c)l=o;else l=c,s=i.getBlockForKey(c).getText().length}else s=a-n;return r.merge({focusKey:l,focusOffset:s,isBackward:!0})},Kj}function MB(){if(Jj)return Xj;Jj=1;var e=XN(),t=rT()("draft_tree_data_support");return Xj=function(n,r,i){var o=n.getSelection(),a=n.getCurrentContent(),l=o,s=o.getAnchorKey(),c=o.getFocusKey(),d=a.getBlockForKey(s);if(t&&"forward"===i&&s!==c)return a;if(o.isCollapsed()){if("forward"===i){if(n.isSelectionAtEndOfContent())return a;if(t)if(o.getAnchorOffset()===a.getBlockForKey(s).getLength()){var u=a.getBlockForKey(d.nextSibling);if(!u||0===u.getLength())return a}}else if(n.isSelectionAtStartOfContent())return a;if((l=r(n))===o)return a}return e.removeRange(a,l,i)}}function AB(){if(eR)return $j;eR=1;var e=dT(),t=wB(),n=EB(),r=MB();return $j=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a-1];return n(e,l?t.getUTF16Length(l,0):1)},"backward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"backspace-character":"remove-range")},$j}function xB(){if(nR)return tR;nR=1;var e=XN(),t=ZZ(),n=dT(),r=OZ(),i=QZ().notEmptyKey,o=TZ(),a=AB(),l=sT(),s=r.isEngine("Gecko");return tR=function(r,c){void 0!==r._pendingStateFromBeforeInput&&(r.update(r._pendingStateFromBeforeInput),r._pendingStateFromBeforeInput=void 0);var d=r.editor.ownerDocument.defaultView.getSelection(),u=d.anchorNode,f=d.isCollapsed,h=(null==u?void 0:u.nodeType)!==Node.TEXT_NODE&&(null==u?void 0:u.nodeType)!==Node.ELEMENT_NODE;if(null!=u&&!h){if(u.nodeType===Node.TEXT_NODE&&(null!==u.previousSibling||null!==u.nextSibling)){var p=u.parentNode;if(null==p)return;u.nodeValue=p.textContent;for(var C=p.firstChild;null!=C;C=C.nextSibling)C!==u&&p.removeChild(C)}var m=u.textContent,g=r._latestEditorState,v=l(o(u)),y=t.decode(v),w=y.blockKey,b=y.decoratorKey,E=y.leafKey,M=g.getBlockTree(w).getIn([b,"leaves",E]),A=M.start,x=M.end,L=g.getCurrentContent(),k=L.getBlockForKey(w),H=k.getText().slice(A,x);if(m.endsWith("\n\n")&&(m=m.slice(0,-1)),m!==H){var S,_,V,O,z=g.getSelection(),I=z.merge({anchorOffset:A,focusOffset:x,isBackward:!1}),N=k.getEntityAt(A),T=i(N)?L.getEntity(N):null,D="MUTABLE"===(null!=T?T.getMutability():null),Z=D?"spellcheck-change":"apply-entity",j=e.replaceText(L,I,m,k.getInlineStyleAt(A),D?k.getEntityAt(A):null);if(s)S=d.anchorOffset,_=d.focusOffset,O=(V=A+Math.min(S,_))+Math.abs(S-_),S=V,_=O;else{var R=m.length-H.length;V=z.getStartOffset(),O=z.getEndOffset(),S=f?O+R:V,_=O+R}var B=j.merge({selectionBefore:L.getSelectionAfter(),selectionAfter:z.merge({anchorOffset:S,focusOffset:_})});r.update(n.push(g,B,Z))}else{var P=c.nativeEvent.inputType;if(P){var F=function(e,t){return"deleteContentBackward"===e?a(t):t}(P,g);if(F!==g)return r.restoreEditorDOM(),void r.update(F)}}}},tR}function LB(){if(aR)return oR;aR=1;var e=OZ(),t=function(){if(iR)return rR;iR=1;var e=jZ();return rR=function(t){return t.which===e.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))},rR}(),n=e.isPlatform("Mac OS X"),r={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return n&&e.altKey},usesMacOSHeuristics:function(){return n},hasCommandModifier:function(e){return n?!!e.metaKey&&!e.altKey:r.isCtrlKeyCommand(e)},isSoftNewlineEvent:t};return oR=r}function kB(){if(dR)return cR;dR=1;var e=OZ(),t=jN();var n=e.isBrowser("Chrome")?function(e){for(var n=e.cloneRange(),r=[],i=e.endContainer;null!=i;i=i.parentNode){var o=i===e.commonAncestorContainer;o?n.setStart(e.startContainer,e.startOffset):n.setStart(n.endContainer,0);var a,l=Array.from(n.getClientRects());if(r.push(l),o)return r.reverse(),(a=[]).concat.apply(a,r);n.setEndBefore(i)}"production"!==process.env.NODE_ENV?t(!1,"Found an unexpected detached subtree when getting range client rects."):t(!1)}:function(e){return Array.from(e.getClientRects())};return cR=n}function HB(){if(fR)return uR;fR=1;var e=wB(),t=zZ(),n=kB(),r=jN();function i(e,t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<e.length;a++){var l=e[a];0!==l.width&&1!==l.width&&(n=Math.min(n,l.top),r=Math.min(r,l.bottom),i=Math.max(i,l.top),o=Math.max(o,l.bottom))}return i<=r&&i-n<t&&o-r<t}function o(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}return uR=function(a){a.collapsed||("production"!==process.env.NODE_ENV?r(!1,"expandRangeToStartOfLine: Provided range is not collapsed."):r(!1));var l=(a=a.cloneRange()).startContainer;1!==l.nodeType&&(l=l.parentNode);var s=function(e){var n=getComputedStyle(e),i=t(e),o=i.createElement("div");o.style.fontFamily=n.fontFamily,o.style.fontSize=n.fontSize,o.style.fontStyle=n.fontStyle,o.style.fontWeight=n.fontWeight,o.style.lineHeight=n.lineHeight,o.style.position="absolute",o.textContent="M";var a=i.body;a||("production"!==process.env.NODE_ENV?r(!1,"Missing document.body"):r(!1)),a.appendChild(o);var l=o.getBoundingClientRect();return a.removeChild(o),l.height}(l),c=a.endContainer,d=a.endOffset;for(a.setStart(a.startContainer,0);i(n(a),s)&&(c=a.startContainer,d=a.startOffset,c.parentNode||("production"!==process.env.NODE_ENV?r(!1,"Found unexpected detached subtree when traversing."):r(!1)),a.setStartBefore(c),1!==c.nodeType||"inline"===getComputedStyle(c).display););for(var u=c,f=d-1;;){for(var h=u.nodeValue,p=f;p>=0;p--)if(!(null!=h&&p>0&&e.isSurrogatePair(h,p-1))){if(a.setStart(u,p),!i(n(a),s))break;c=u,d=p}if(-1===p||0===u.childNodes.length)break;f=o(u=u.childNodes[p])}return a.setStart(c,d),a},uR}function SB(){if(mR)return CR;mR=1;return CR={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}}function _B(){if(vR)return gR;vR=1;var e="['‘’]",t="\\s|(?![_])"+SB().getPunctuation(),n=new RegExp("^(?:"+t+")*(?:"+e+"|(?!"+t+").)*(?:(?!"+t+").)"),r=new RegExp("(?:(?!"+t+").)(?:"+e+"|(?!"+t+").)*(?:"+t+")*$");function i(e,t){var i=t?r.exec(e):n.exec(e);return i?i[0]:e}return gR={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}}function VB(){if(ER)return bR;ER=1;var e=bB();return bR=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionForward should only be called with a collapsed SelectionState");var i,o=r.getStartKey(),a=r.getStartOffset(),l=t.getCurrentContent(),s=o;return n>l.getBlockForKey(o).getText().length-a?(s=l.getKeyAfter(o),i=0):i=a+n,r.merge({focusKey:s,focusOffset:i})},bR}function OB(){if(ZR)return DR;ZR=1;var e=XN(),t=dT(),n=LB(),r=jZ(),i=function(){if(sR)return lR;sR=1;var e=XN(),t=dT(),n=UN(),r=sT(),i=null;return lR={cut:function(o){var a=o.getCurrentContent(),l=o.getSelection(),s=null;if(l.isCollapsed()){var c=l.getAnchorKey(),d=a.getBlockForKey(c).getLength();if(d===l.getAnchorOffset()){var u=a.getKeyAfter(c);if(null==u)return o;s=l.set("focusKey",u).set("focusOffset",0)}else s=l.set("focusOffset",d)}else s=l;s=r(s),i=n(a,s);var f=e.removeRange(a,s,"forward");return f===a?o:t.push(o,f,"remove-range")},paste:function(n){if(!i)return n;var r=e.replaceWithFragment(n.getCurrentContent(),n.getSelection(),i);return t.push(n,r,"insert-fragment")}}}(),o=OZ(),a=wj(),l=function(){if(pR)return hR;pR=1;var e=dT(),t=HB(),n=UZ(),r=EB(),i=MB();return hR=function(o,a){var l=i(o,function(e){var i=e.getSelection();if(i.isCollapsed()&&0===i.getAnchorOffset())return r(e,1);var o=a.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return o=t(o),n(e,null,o.endContainer,o.endOffset,o.startContainer,o.startOffset).selectionState},"backward");return l===o.getCurrentContent()?o:e.push(o,l,"remove-range")},hR}(),s=function(){if(wR)return yR;wR=1;var e=_B(),t=dT(),n=EB(),r=MB();return yR=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset();if(0===i)return n(t,1);var o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(0,i),l=e.getBackward(a);return n(t,l.length||1)},"backward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},yR}(),c=function(){if(AR)return MR;AR=1;var e=_B(),t=dT(),n=VB(),r=MB();return MR=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset(),o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(i),l=e.getForward(a);return n(t,l.length||1)},"forward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},MR}(),d=function(){if(LR)return xR;LR=1;var e=XN(),t=dT();return xR=function(n){var r=e.splitBlock(n.getCurrentContent(),n.getSelection());return t.push(n,r,"split-block")}}(),u=function(){if(HR)return kR;HR=1;var e=dT();return kR=function(t){var n=t.getSelection(),r=n.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}}(),f=function(){if(_R)return SR;_R=1;var e=dT();return SR=function(t){var n=t.getSelection(),r=n.getStartKey();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}}(),h=AB(),p=function(){if(OR)return VR;OR=1;var e=dT(),t=wB(),n=VB(),r=MB();return VR=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a];return n(e,l?t.getUTF16Length(l,0):1)},"forward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"delete-character":"remove-range")},VR}(),C=function(){if(IR)return zR;IR=1;var e=XN(),t=dT(),n=UN();return zR=function(r){var i=r.getSelection();if(!i.isCollapsed())return r;var o=i.getAnchorOffset();if(0===o)return r;var a,l,s=i.getAnchorKey(),c=r.getCurrentContent(),d=c.getBlockForKey(s).getLength();if(d<=1)return r;o===d?(a=i.set("anchorOffset",o-1),l=i):l=(a=i.set("focusOffset",o+1)).set("anchorOffset",o+1);var u=n(c,a),f=e.removeRange(c,a,"backward"),h=f.getSelectionAfter(),p=h.getAnchorOffset()-1,C=h.merge({anchorOffset:p,focusOffset:p}),m=e.replaceWithFragment(f,C,u),g=t.push(r,m,"insert-fragment");return t.acceptSelection(g,l)}}(),m=function(){if(TR)return NR;TR=1;var e=dT();return NR=function(t,n,r){var i=e.undo(n);if("spellcheck-change"!==n.getLastChangeType())t.preventDefault(),n.getNativelyRenderedContent()?(r(e.set(n,{nativelyRenderedContent:null})),setTimeout(function(){r(i)},0)):r(i);else{var o=i.getCurrentContent();r(e.set(i,{nativelyRenderedContent:o}))}},NR}(),g=n.isOptionKeyCommand,v=o.isBrowser("Chrome");return DR=function(n,o){var y=o.which,w=n._latestEditorState;function b(e){var t=n.props[e];return!!t&&(t(o),!0)}switch(y){case r.RETURN:if(o.preventDefault(),n.props.handleReturn&&a(n.props.handleReturn(o,w)))return;break;case r.ESC:if(o.preventDefault(),b("onEscape"))return;break;case r.TAB:if(b("onTab"))return;break;case r.UP:if(b("onUpArrow"))return;break;case r.RIGHT:if(b("onRightArrow"))return;break;case r.DOWN:if(b("onDownArrow"))return;break;case r.LEFT:if(b("onLeftArrow"))return;break;case r.SPACE:v&&g(o)&&o.preventDefault()}var E=n.props.keyBindingFn(o);if(null!=E&&""!==E)if("undo"!==E){if(o.preventDefault(),!n.props.handleKeyCommand||!a(n.props.handleKeyCommand(E,w,o.timeStamp))){var M=function(e,n,r){switch(e){case"redo":return t.redo(n);case"delete":return p(n);case"delete-word":return c(n);case"backspace":return h(n);case"backspace-word":return s(n);case"backspace-to-start-of-line":return l(n,r);case"split-block":return d(n);case"transpose-characters":return C(n);case"move-selection-to-start-of-block":return f(n);case"move-selection-to-end-of-block":return u(n);case"secondary-cut":return i.cut(n);case"secondary-paste":return i.paste(n);default:return n}}(E,w,o);M!==w&&n.update(M)}}else m(o,w,n.update);else if(y===r.SPACE&&v&&g(o)){var A=e.replaceText(w.getCurrentContent(),w.getSelection()," ");n.update(t.push(w,A,"insert-characters"))}},DR}function zB(){if(RR)return jR;RR=1;var e=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}();return jR=e}function IB(){if(PR)return BR;PR=1;var e=OZ(),t=jN(),n=e.isBrowser("IE <= 9");return BR=function(e){var r,i=null;return!n&&document.implementation&&document.implementation.createHTMLDocument&&((r=document.implementation.createHTMLDocument("foo")).documentElement||("production"!==process.env.NODE_ENV?t(!1,"Missing doc.documentElement"):t(!1)),r.documentElement.innerHTML=e,i=r.getElementsByTagName("body")[0]),i},BR}function NB(){if(GR)return QR;var e;function t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}GR=1;var r=IN(),i=TN(),o=DN(),a=pT(),l=tT(),s=zB(),c=hT(),d=BN(),u=IB(),f=rT(),h=ON(),p=h.List,C=h.Map,m=h.OrderedSet,g=function(){if(UR)return FR;UR=1;var e=IZ();return FR=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"A"===t.nodeName}}(),v=JZ(),y=BZ(),w=function(){if(WR)return qR;WR=1;var e=IZ();return qR=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"IMG"===t.nodeName}}(),b=f("draft_tree_data_support"),E=new RegExp("\r","g"),M=new RegExp("\n","g"),A=new RegExp("^\n","g"),x=new RegExp(" ","g"),L=new RegExp(" ?","g"),k=new RegExp("​?","g"),H=["bold","bolder","500","600","700","800","900"],S=["light","lighter","normal","100","200","300","400"],_=["className","href","rel","target","title"],V=["alt","className","height","src","width"],O=(n(e={},c("public/DraftStyleDefault/depth0"),0),n(e,c("public/DraftStyleDefault/depth1"),1),n(e,c("public/DraftStyleDefault/depth2"),2),n(e,c("public/DraftStyleDefault/depth3"),3),n(e,c("public/DraftStyleDefault/depth4"),4),e),z=C({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),I=function(e){if(y(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(O).some(function(n){e.classList.contains(n)&&(t=O[n])}),t},T=function(e){if(!g(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new s(t.href);return!0}catch(e){return!1}},D=function(e){if(!w(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},Z=function(e,t){if(!y(e))return t;var n=e,r=n.style.fontWeight,i=n.style.fontStyle,o=n.style.textDecoration;return t.withMutations(function(e){H.indexOf(r)>=0?e.add("BOLD"):S.indexOf(r)>=0&&e.remove("BOLD"),"italic"===i?e.add("ITALIC"):"normal"===i&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})},j=function(e){return"ul"===e||"ol"===e},R=function(){function e(e,t){n(this,"characterList",p()),n(this,"currentBlockType","unstyled"),n(this,"currentDepth",0),n(this,"currentEntity",null),n(this,"currentText",""),n(this,"wrapper",null),n(this,"blockConfigs",[]),n(this,"contentBlocks",[]),n(this,"entityMap",l),n(this,"blockTypeMap",void 0),n(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var a=e.prototype;return a.clear=function(){this.characterList=p(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},a.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],m())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},a.getContentBlocks=function(){return 0===this.contentBlocks.length&&(b?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},a._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:p(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=p(),this.currentBlockType="unstyled",this.currentText="",n},a._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i.nodeName.toLowerCase();if("body"===o||j(o)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,l=this.wrapper;j(o)&&(this.wrapper=o,j(l)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),t)),this.currentDepth=a,this.wrapper=l}else{var s=this.blockTypeMap.get(o);if(void 0===s)if("#text"!==o)if("br"!==o)if(D(i))this._addImgNode(i,t);else if(T(i))this._addAnchorNode(i,n,t);else{var c=t;z.has(o)&&(c=c.add(z.get(o))),c=Z(i,c);var u=I(i);null!=u&&(c=c.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),c))}else this._addBreakNode(i,t);else this._addTextNode(i,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var f=this.currentDepth,h=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof s&&(s=this.disambiguate(o,this.wrapper)||s[0]||"unstyled"),!b&&y(i)&&("unordered-list-item"===s||"ordered-list-item"===s)){var p=i;this.currentDepth=N(p,this.currentDepth)}var C=d(),m=this._toBlockConfigs(Array.from(i.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:C,childConfigs:m,type:s})),this.currentDepth=f,this.wrapper=h}}}return n},a._appendText=function(e,t){var n;this.currentText+=e;var i=r.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(i))},a._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()});(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=p()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},a._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(A,"")).replace(M," ")),this._appendText(n,t)},a._addBreakNode=function(e,t){v(e)&&this._appendText("\n",t)},a._addImgNode=function(e,t){if(w(e)){var n=e,r={};V.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),f("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},a._addAnchorNode=function(e,t,n){if(g(e)){var r=e,i={};_.forEach(function(e){var t=r.getAttribute(e);t&&(i[e]=t)}),i.url=new s(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},a._toContentBlocks=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.length-1,i=0;i<=r;i++){var a=e[i];a.parent=n,a.prevSibling=i>0?e[i-1].key:null,a.nextSibling=i<r?e[i+1].key:null,a.children=p(a.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new o(t({},a))),this._toContentBlocks(a.childConfigs,a.key)}},a._hoistContainersInBlockConfigs=function(e){var t=this;return p(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},a._toFlatContentBlocks=function(e){var n=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var r=n._extractTextFromBlockConfigs(e.childConfigs),o=r.text,a=r.characterList;n.contentBlocks.push(new i(t({},e,{text:e.text+o,characterList:e.characterList.concat(a)})))})},a._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=p(),i=0;i<=t;i++){var o=e[i];n+=o.text,r=r.concat(o.characterList),""!==n&&"unstyled"!==o.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}();return QR=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:u)(e=e.trim().replace(E,"").replace(x," ").replace(L,"").replace(k,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys(function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach(function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)})}),C(t)}(t);return new R(r,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(n).getContentBlocks()},QR}function TB(){if(YR)return KR;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}YR=1;var t=TN(),n=DN(),r=NB(),i=BN(),o=IB(),a=rT(),l=ON(),s=iT(),c=l.List,d=l.Repeat,u=a("draft_tree_data_support"),f=u?n:t,h={processHTML:function(e,t){return r(e,o,t)},processText:function(t,n,r){return t.reduce(function(t,o,a){o=s(o);var l=i(),h={key:l,type:r,text:o,characterList:c(d(n,o.length))};if(u&&0!==a){var p=a-1;h=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},h,{prevSibling:(t[p]=t[p].merge({nextSibling:l})).getKey()})}return t.push(new f(h)),t},[])}};return KR=h}function DB(){if(eB)return $R;eB=1;var e=XN(),t=dT(),n=(JR||(JR=1,XR=function(e,t,n,r){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat([[o,a.get(o)]]).map(function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)});return a=a.merge(l),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}),XR),r=sT(),i={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return i.toggleInlineStyle(e,"BOLD");case"italic":return i.toggleInlineStyle(e,"ITALIC");case"underline":return i.toggleInlineStyle(e,"UNDERLINE");case"code":return i.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return i.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return i.onDelete(e);default:return null}},insertSoftNewline:function(n){var r=e.insertText(n.getCurrentContent(),n.getSelection(),"\n",n.getCurrentInlineStyle(),null),i=t.push(n,r,"insert-characters");return t.forceSelection(i,r.getSelectionAfter())},onBackspace:function(e){var n=e.getSelection();if(!n.isCollapsed()||n.getAnchorOffset()||n.getFocusOffset())return null;var r=e.getCurrentContent(),o=n.getStartKey(),a=r.getBlockBefore(o);if(a&&"atomic"===a.getType()){var l=r.getBlockMap().delete(a.getKey()),s=r.merge({blockMap:l,selectionAfter:n});if(s!==r)return t.push(e,s,"remove-range")}var c=i.tryToRemoveBlockStyle(e);return c?t.push(e,c,"change-block-type"):null},onDelete:function(n){var r=n.getSelection();if(!r.isCollapsed())return null;var i=n.getCurrentContent(),o=r.getStartKey(),a=i.getBlockForKey(o).getLength();if(r.getStartOffset()<a)return null;var l=i.getBlockAfter(o);if(!l||"atomic"!==l.getType())return null;var s=r.merge({focusKey:l.getKey(),focusOffset:l.getLength()}),c=e.removeRange(i,s,"forward");return c!==i?t.push(n,c,"remove-range"):null},onTab:function(e,r,i){var o=r.getSelection(),a=o.getAnchorKey();if(a!==o.getFocusKey())return r;var l=r.getCurrentContent(),s=l.getBlockForKey(a),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return r;e.preventDefault();var d=s.getDepth();if(!e.shiftKey&&d===i)return r;var u=n(l,o,e.shiftKey?-1:1,i);return t.push(r,u,"adjust-depth")},toggleBlockType:function(n,i){var o=n.getSelection(),a=o.getStartKey(),l=o.getEndKey(),s=n.getCurrentContent(),c=o;if(a!==l&&0===o.getEndOffset()){var d=r(s.getBlockBefore(l));l=d.getKey(),c=c.merge({anchorKey:a,anchorOffset:o.getStartOffset(),focusKey:l,focusOffset:d.getLength(),isBackward:!1})}var u=s.getBlockMap().skipWhile(function(e,t){return t!==a}).reverse().skipWhile(function(e,t){return t!==l}).some(function(e){return"atomic"===e.getType()});if(u)return n;var f=s.getBlockForKey(a).getType()===i?"unstyled":i;return t.push(n,e.setBlockType(s,c,f),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?i.toggleBlockType(e,"code-block"):i.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(n,r){var i=n.getSelection(),o=n.getCurrentInlineStyle();if(i.isCollapsed())return t.setInlineStyleOverride(n,o.has(r)?o.remove(r):o.add(r));var a,l=n.getCurrentContent();return a=o.has(r)?e.removeInlineStyle(l,i,r):e.applyInlineStyle(l,i,r),t.push(n,a,"change-inline-style")},toggleLink:function(n,r,i){var o=e.applyEntity(n.getCurrentContent(),r,i);return t.push(n,o,"apply-entity")},tryToRemoveBlockStyle:function(t){var n=t.getSelection(),r=n.getAnchorOffset();if(n.isCollapsed()&&0===r){var i=n.getAnchorKey(),o=t.getCurrentContent(),a=o.getBlockForKey(i).getType(),l=o.getBlockBefore(i);if("code-block"===a&&l&&"code-block"===l.getType()&&0!==l.getLength())return null;if("unstyled"!==a)return e.setBlockType(o,n,"unstyled")}return null}};return $R=i}function ZB(){if(iB)return rB;iB=1;var e=zN(),t=IN(),n=vj(),r=XN(),i=TB(),o=dT(),a=DB(),l=GZ(),s=yj(),c=wj(),d=function(){if(nB)return tB;nB=1;var e=/\r\n?|\n/g;return tB=function(t){return t.split(e)}}();function u(e,t,n){var i=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return o.push(e,i.set("entityMap",n),"insert-fragment")}return rB=function(f,h){h.preventDefault();var p=new n(h.clipboardData);if(!p.isRichText()){var C=p.getFiles(),m=p.getText();if(C.length>0){if(f.props.handlePastedFiles&&c(f.props.handlePastedFiles(C)))return;return void s(C,function(n){if(n=n||m){var s=f._latestEditorState,c=d(n),u=t.create({style:s.getCurrentInlineStyle(),entity:l(s.getCurrentContent(),s.getSelection())}),h=a.getCurrentBlockType(s),p=i.processText(c,u,h),C=e.createFromArray(p),g=r.replaceWithFragment(s.getCurrentContent(),s.getSelection(),C);f.update(o.push(s,g,"insert-fragment"))}})}}var g=[],v=p.getText(),y=p.getHTML(),w=f._latestEditorState;if(f.props.formatPastedText){var b=f.props.formatPastedText(v,y);v=b.text,y=b.html}if(!f.props.handlePastedText||!c(f.props.handlePastedText(v,y,w))){if(v&&(g=d(v)),!f.props.stripPastedStyles){var E,M=f.getClipboard();if(!f.props.formatPastedText&&p.isRichText()&&M){if(-1!==(null===(E=y)||void 0===E?void 0:E.indexOf(f.getEditorKey()))||1===g.length&&1===M.size&&M.first().getText()===v)return void f.update(u(f._latestEditorState,M))}else if(M&&p.types.includes("com.apple.webarchive")&&!p.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every(function(t,n){return t.getText()===e[n]})}(g,M))return void f.update(u(f._latestEditorState,M));if(y){var A=i.processHTML(y,f.props.blockRenderMap);if(A){var x=A.contentBlocks,L=A.entityMap;if(x){var k=e.createFromArray(x);return void f.update(u(f._latestEditorState,k,L))}}}f.setClipboard(null)}if(g.length){var H=t.create({style:w.getCurrentInlineStyle(),entity:l(w.getCurrentContent(),w.getSelection())}),S=a.getCurrentBlockType(w),_=i.processText(g,H,S),V=e.createFromArray(_);f.update(u(f._latestEditorState,V))}}},rB}function jB(){if(aB)return oB;aB=1;var e=OZ(),t=gB(),n=function(){if(Hj)return kj;Hj=1;var e=dT(),t=tj(),n=nj();return kj=function(r,i){var o=i.currentTarget.ownerDocument;if(!Boolean(r.props.preserveSelectionOnBlur)&&n(o)===o.body){var a=o.defaultView.getSelection(),l=r.editor;1===a.rangeCount&&t(l,a.anchorNode)&&t(l,a.focusNode)&&a.removeAllRanges()}var s=r._latestEditorState,c=s.getSelection();if(c.getHasFocus()){var d=c.set("hasFocus",!1);r.props.onBlur&&r.props.onBlur(i),r.update(e.acceptSelection(s,d))}},kj}(),r=function(){if(_j)return Sj;_j=1;var e=dT();return Sj=function(t,n){t.setMode("composite"),t.update(e.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(n)},Sj}(),i=function(){if(Ij)return zj;Ij=1;var e=vB();return zj=function(t,n){t._latestEditorState.getSelection().isCollapsed()?n.preventDefault():t.setClipboard(e(t._latestEditorState))},zj}(),o=yB(),a=(Rj||(Rj=1,jj=function(e,t){e.setMode("drag"),t.preventDefault()}),jj),l=Pj?Bj:(Pj=1,Bj=function(e){e._internalDrag=!0,e.setMode("drag")}),s=function(){if(Uj)return Fj;Uj=1;var e=dT(),t=OZ();return Fj=function(n,r){var i=n._latestEditorState,o=i.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);n.props.onFocus&&n.props.onFocus(r),t.isBrowser("Chrome < 60.0.3081.0")?n.update(e.forceSelection(i,a)):n.update(e.acceptSelection(i,a))}},Fj}(),c=xB(),d=OB(),u=ZB(),f=WZ(),h=e.isBrowser("Chrome"),p=e.isBrowser("Firefox"),C=h||p?f:function(e){};return oB={onBeforeInput:t,onBlur:n,onCompositionStart:r,onCopy:i,onCut:o,onDragOver:a,onDragStart:l,onFocus:s,onInput:c,onKeyDown:d,onPaste:u,onSelect:f,onMouseUp:C,onKeyUp:C}}function RB(){if(dB)return cB;dB=1;var e=i,t=hT(),n=function(n){var r,i;function o(){return n.apply(this,arguments)||this}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var a=o.prototype;return a.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},a.render=function(){var n=this.props.editorState.getSelection().getHasFocus(),r=t({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":n});return e.createElement("div",{className:r},e.createElement("div",{className:t("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},o}(e.Component);return cB=n}function BB(){if(fB)return uB;fB=1;var e=LB(),t=jZ(),n=OZ(),r=n.isPlatform("Mac OS X"),i=r&&n.isBrowser("Firefox < 29"),o=e.hasCommandModifier,a=e.isCtrlKeyCommand;function l(e){return r&&e.altKey||a(e)}return uB=function(e){switch(e.keyCode){case 66:return o(e)?"bold":null;case 68:return a(e)?"delete":null;case 72:return a(e)?"backspace":null;case 73:return o(e)?"italic":null;case 74:return o(e)?"code":null;case 75:return r&&a(e)?"secondary-cut":null;case 77:case 79:return a(e)?"split-block":null;case 84:return r&&a(e)?"transpose-characters":null;case 85:return o(e)?"underline":null;case 87:return r&&a(e)?"backspace-word":null;case 89:return a(e)?r?"secondary-paste":"redo":null;case 90:return function(e){return o(e)?e.shiftKey?"redo":"undo":null}(e)||null;case t.RETURN:return"split-block";case t.DELETE:return function(e){return!r&&e.shiftKey?null:l(e)?"delete-word":"delete"}(e);case t.BACKSPACE:return function(e){return o(e)&&r?"backspace-to-start-of-line":l(e)?"backspace-word":"backspace"}(e);case t.LEFT:return i&&o(e)?"move-selection-to-start-of-block":null;case t.RIGHT:return i&&o(e)?"move-selection-to-end-of-block":null;default:return null}},uB}function PB(){if(pB)return hB;pB=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l=pT(),s=CT(),c=KZ(),d=function(){if(dZ)return cZ;dZ=1;var e=rT()("draft_tree_data_support");return cZ=e?hj():Cj()}(),u=bj(),f=jB(),h=function(){if(sB)return lB;sB=1;var e=A.unstable_flushControlled;return lB=e}(),p=RB(),C=$Z(),m=dT(),g=i,v=aj(),y=sj(),w=OZ(),b=hT(),E=BN(),M=BB(),x=dj(),L=rT(),k=jN(),S=BZ(),_=sT(),V=w.isBrowser("IE"),O=!V,z={edit:f,composite:c,drag:u,cut:null,render:null},I=!1,N=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(g.Component),T=function(e){function i(t){var i;return o(r(i=e.call(this,t)||this),"_blockSelectEvents",void 0),o(r(i),"_clipboard",void 0),o(r(i),"_handler",void 0),o(r(i),"_dragCount",void 0),o(r(i),"_internalDrag",void 0),o(r(i),"_editorKey",void 0),o(r(i),"_placeholderAccessibilityID",void 0),o(r(i),"_latestEditorState",void 0),o(r(i),"_latestCommittedEditorState",void 0),o(r(i),"_pendingStateFromBeforeInput",void 0),o(r(i),"_onBeforeInput",void 0),o(r(i),"_onBlur",void 0),o(r(i),"_onCharacterData",void 0),o(r(i),"_onCompositionEnd",void 0),o(r(i),"_onCompositionStart",void 0),o(r(i),"_onCopy",void 0),o(r(i),"_onCut",void 0),o(r(i),"_onDragEnd",void 0),o(r(i),"_onDragOver",void 0),o(r(i),"_onDragStart",void 0),o(r(i),"_onDrop",void 0),o(r(i),"_onInput",void 0),o(r(i),"_onFocus",void 0),o(r(i),"_onKeyDown",void 0),o(r(i),"_onKeyPress",void 0),o(r(i),"_onKeyUp",void 0),o(r(i),"_onMouseDown",void 0),o(r(i),"_onMouseUp",void 0),o(r(i),"_onPaste",void 0),o(r(i),"_onSelect",void 0),o(r(i),"editor",void 0),o(r(i),"editorContainer",void 0),o(r(i),"focus",void 0),o(r(i),"blur",void 0),o(r(i),"setMode",void 0),o(r(i),"exitCurrentMode",void 0),o(r(i),"restoreEditorDOM",void 0),o(r(i),"setClipboard",void 0),o(r(i),"getClipboard",void 0),o(r(i),"getEditorKey",void 0),o(r(i),"update",void 0),o(r(i),"onDragEnter",void 0),o(r(i),"onDragLeave",void 0),o(r(i),"_handleEditorContainerRef",function(e){i.editorContainer=e,i.editor=null!==e?e.firstChild:null}),o(r(i),"focus",function(e){var t=i.props.editorState,n=t.getSelection().getHasFocus(),r=i.editor;if(r){var o=y.getScrollParent(r),a=e||x(o),l=a.x,s=a.y;S(r)||("production"!==process.env.NODE_ENV?k(!1,"editorNode is not an HTMLElement"):k(!1)),r.focus(),o===window?window.scrollTo(l,s):v.setTop(o,s),n||i.update(m.forceSelection(t,t.getSelection()))}}),o(r(i),"blur",function(){var e=i.editor;e&&(S(e)||("production"!==process.env.NODE_ENV?k(!1,"editorNode is not an HTMLElement"):k(!1)),e.blur())}),o(r(i),"setMode",function(e){var t=i.props,r=t.onPaste,o=t.onCut,a=t.onCopy,l=n({},z.edit);r&&(l.onPaste=r),o&&(l.onCut=o),a&&(l.onCopy=a);var s=n({},z,{edit:l});i._handler=s[e]}),o(r(i),"exitCurrentMode",function(){i.setMode("edit")}),o(r(i),"restoreEditorDOM",function(e){i.setState({contentsKey:i.state.contentsKey+1},function(){i.focus(e)})}),o(r(i),"setClipboard",function(e){i._clipboard=e}),o(r(i),"getClipboard",function(){return i._clipboard}),o(r(i),"update",function(e){i._latestEditorState=e,i.props.onChange(e)}),o(r(i),"onDragEnter",function(){i._dragCount++}),o(r(i),"onDragLeave",function(){i._dragCount--,0===i._dragCount&&i.exitCurrentMode()}),i._blockSelectEvents=!1,i._clipboard=null,i._handler=null,i._dragCount=0,i._editorKey=t.editorKey||E(),i._placeholderAccessibilityID="placeholder-"+i._editorKey,i._latestEditorState=t.editorState,i._latestCommittedEditorState=t.editorState,i._onBeforeInput=i._buildHandler("onBeforeInput"),i._onBlur=i._buildHandler("onBlur"),i._onCharacterData=i._buildHandler("onCharacterData"),i._onCompositionEnd=i._buildHandler("onCompositionEnd"),i._onCompositionStart=i._buildHandler("onCompositionStart"),i._onCopy=i._buildHandler("onCopy"),i._onCut=i._buildHandler("onCut"),i._onDragEnd=i._buildHandler("onDragEnd"),i._onDragOver=i._buildHandler("onDragOver"),i._onDragStart=i._buildHandler("onDragStart"),i._onDrop=i._buildHandler("onDrop"),i._onInput=i._buildHandler("onInput"),i._onFocus=i._buildHandler("onFocus"),i._onKeyDown=i._buildHandler("onKeyDown"),i._onKeyPress=i._buildHandler("onKeyPress"),i._onKeyUp=i._buildHandler("onKeyUp"),i._onMouseDown=i._buildHandler("onMouseDown"),i._onMouseUp=i._buildHandler("onMouseUp"),i._onPaste=i._buildHandler("onPaste"),i._onSelect=i._buildHandler("onSelect"),i.getEditorKey=function(){return i._editorKey},"production"!==process.env.NODE_ENV&&["onDownArrow","onEscape","onLeftArrow","onRightArrow","onTab","onUpArrow"].forEach(function(e){t.hasOwnProperty(e)&&console.warn("Supplying an `".concat(e,"` prop to `DraftEditor` has ")+"been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/wHKQ3W).")}),i.state={contentsKey:0},i}a(i,e);var l=i.prototype;return l._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(h?h(function(){return r(t,n)}):r(t,n))}}},l._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},l._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:_(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return g.createElement(p,e)}return null},l._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},l.render=function(){var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,o=e.blockStyleFn,a=e.customStyleFn,l=e.customStyleMap,c=e.editorState,u=e.preventScroll,f=e.readOnly,h=e.textAlignment,p=e.textDirectionality,C=b({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===h,"DraftEditor/alignRight":"right"===h,"DraftEditor/alignCenter":"center"===h}),m=this.props.role||"textbox",v="combobox"===m?!!this.props.ariaExpanded:null,y={blockRenderMap:r,blockRendererFn:i,blockStyleFn:o,customStyleMap:n({},s,l),customStyleFn:a,editorKey:this._editorKey,editorState:c,preventScroll:u,textDirectionality:p};return g.createElement("div",{className:C},this._renderPlaceholder(),g.createElement("div",{className:b("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:b({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:m,spellCheck:O&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(N,{editor:this,editorState:c}),g.createElement(d,t({},y,{key:"contents"+this.state.contentsKey})))))},l.componentDidMount=function(){this._blockSelectEvents=!1,!I&&L("draft_ods_enabled")&&(I=!0,C.initODS()),this.setMode("edit"),V&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):H.execCommand("AutoUrlDetect",!1,!1))},l.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},i}(g.Component);return o(T,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:l,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:M,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),hB=T}var FB,UB,qB,WB,QB,GB,KB,YB,XB,JB,$B,eP,tP,nP,rP,iP,oP,aP,lP,sP,cP,dP,uP,fP,hP,pP,CP,mP={};function gP(){return FB||(FB=1),mP}function vP(){if(qB)return UB;qB=1;var e={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};return UB=e}function yP(){if(KB)return GB;KB=1;var e=wB(),t=NN(),n=function(e,t){return e===t},r=function(e){return!!e},i=[];return GB=function(o){var a=o.getCharacterList().map(function(e){return e.getStyle()}).toList(),l=a.flatten().toSet().map(function(i){return function(i,o,a){var l=[],s=o.map(function(e){return e.has(a)}).toList();return t(s,n,r,function(t,n){var r=i.getText();l.push({offset:e.strlen(r.slice(0,t)),length:e.strlen(r.slice(t,n)),style:a})}),l}(o,a,i)});return Array.prototype.concat.apply(i,l.toJS())}}function wP(){if(XB)return YB;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}XB=1;var t=TN(),n=DN(),r=vP(),i=function(){if(QB)return WB;QB=1;var e=vP(),t=wB().strlen;return WB=function(n,r){var i=[];return n.findEntityRanges(function(e){return!!e.getEntity()},function(o,a){var l=n.getText(),s=n.getEntityAt(o);i.push({offset:t(l.slice(0,o)),length:t(l.slice(o,a)),key:Number(r[e.stringify(s)])})}),i},WB}(),o=yP(),a=jN(),l=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:o(e),entityRanges:i(e,t),data:e.getData().toObject()}},s=function(r,i,o,s){if(r instanceof t)o.push(l(r,i));else{r instanceof n||("production"!==process.env.NODE_ENV?a(!1,"block is not a BlockNode"):a(!1));var c=r.getParentKey(),d=s[r.getKey()]=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},l(r,i),{children:[]});c?s[c].children.push(d):o.push(d)}};return YB=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.entityMap,i=[],o={},a={},l=0;return e.getBlockMap().forEach(function(e){e.findEntityRanges(function(e){return null!==e.getEntity()},function(t){var i=e.getEntityAt(t),o=r.stringify(i);a[o]||(a[o]=i,n[o]="".concat(l),l++)}),s(e,n,i,o)}),{blocks:i,entityMap:n}}(e,t),t=function(e,t){var n=t.blocks,i=t.entityMap,o={};return Object.keys(i).forEach(function(t,n){var i=e.getEntity(r.unstringify(t));o[n]={type:i.getType(),mutability:i.getMutability(),data:i.getData()}}),{blocks:n,entityMap:o}}(e,t),t},YB}function bP(){if($B)return JB;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}$B=1;var n=BN(),r=jN(),i=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},o={fromRawTreeStateToRawState:function(t){var n=t.blocks,o=[];return Array.isArray(n)||("production"!==process.env.NODE_ENV?r(!1,"Invalid raw state"):r(!1)),Array.isArray(n)&&n.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var i=n.pop();t(i);var o=i.children;Array.isArray(o)||("production"!==process.env.NODE_ENV?r(!1,"Invalid tree raw block"):r(!1)),n=n.concat([].concat(o.reverse()))}}(n,function(t){var n=e({},t);i(t)&&(n.depth=n.depth||0,function(t){Array.isArray(t.children)&&(t.children=t.children.map(function(n){return n.type===t.type?e({},n,{depth:(t.depth||0)+1}):n}))}(t),null!=t.children&&t.children.length>0)||(delete n.children,o.push(n))}),t.blocks=o,e({},t,{blocks:o})):t},fromRawStateToRawTreeState:function(t){var r=[],o=[];return t.blocks.forEach(function(t){var a=i(t),l=t.depth||0,s=e({},t,{children:[]});if(a){var c=o[0];if(null==c&&0===l)r.push(s);else if(null==c||c.depth<l-1){var d={key:n(),text:"",depth:l-1,type:t.type,children:[],entityRanges:[],inlineStyleRanges:[]};o.unshift(d),1===l?r.push(d):null!=c&&c.children.push(d),d.children.push(s)}else if(c.depth===l-1)c.children.push(s);else{for(;null!=c&&c.depth>=l;)o.shift(),c=o[0];l>0?c.children.push(s):r.push(s)}}else r.push(s)}),e({},t,{blocks:r})}};return JB=o}function EP(){if(cP)return sP;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cP=1;var n=TN(),r=DN(),i=oT(),o=tT(),a=bP(),l=function(){if(tP)return eP;tP=1;var e=bB(),t={isValidBlock:function(t,n){var r=t.getKey(),i=t.getParentKey();if(null!=i&&!n.get(i).getChildKeys().includes(r))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing parent -> child pointer on %s",r),!1;var o=t.getChildKeys().map(function(e){return n.get(e)});if(!o.every(function(e){return e.getParentKey()===r}))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing child -> parent pointer on %s",r),!1;var a=t.getPrevSiblingKey();if(null!=a&&n.get(a).getNextSiblingKey()!==r)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing nextSibling pointer on %s's prevSibling",r),!1;var l=t.getNextSiblingKey();return null!=l&&n.get(l).getPrevSiblingKey()!==r?("production"!==process.env.NODE_ENV&&e(!0,"Tree is missing prevSibling pointer on %s's nextSibling",r),!1):null!==l&&null!==a&&a===l?("production"!==process.env.NODE_ENV&&e(!0,"Tree has a two-node cycle at %s",r),!1):!(""!=t.text&&t.getChildKeys().size>0&&("production"!==process.env.NODE_ENV&&e(!0,"Leaf node %s has children",r),1))},isConnectedTree:function(t){var n=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==n.length)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. More or less than one first node"),!1;for(var r=0,i=n.shift().getKey(),o=[];null!=i;){var a=t.get(i),l=a.getChildKeys(),s=a.getNextSiblingKey();if(l.size>0){null!=s&&o.unshift(s);var c=l.map(function(e){return t.get(e)}),d=c.find(function(e){return null==e.getPrevSiblingKey()});if(null==d)return"production"!==process.env.NODE_ENV&&e(!0,"%s has no first child",i),!1;i=d.getKey()}else i=null!=a.getNextSiblingKey()?a.getNextSiblingKey():o.shift();r++}return r===t.size||("production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. %s nodes were seen instead of %s",r,t.size),!1)},isValidTree:function(e){var t=this;return!!e.toArray().every(function(n){return t.isValidBlock(n,e)})&&this.isConnectedTree(e)}};return eP=t}(),s=nT(),c=function(){if(rP)return nP;rP=1;var e=IN(),t=ON().List;return nP=function(n,r){var i=n.map(function(t,n){var i=r[n];return e.create({style:t,entity:i})});return t(i)}}(),d=function(){if(oP)return iP;oP=1;var e=wB().substr;return iP=function(t,n){var r=Array(t.length).fill(null);return n&&n.forEach(function(n){for(var i=e(t,0,n.offset).length,o=i+e(t,n.offset,n.length).length,a=i;a<o;a++)r[a]=n.key}),r},iP}(),u=function(){if(lP)return aP;lP=1;var e=wB(),t=ON().OrderedSet,n=e.substr,r=t();return aP=function(e,t){var i=Array(e.length).fill(r);return t&&t.forEach(function(t){for(var r=n(e,0,t.offset).length,o=r+n(e,t.offset,t.length).length;r<o;)i[r]=i[r].add(t.style),r++}),i},aP}(),f=BN(),h=rT(),p=ON(),C=jN(),m=h("draft_tree_data_support"),g=p.List,v=p.Map,y=p.OrderedMap,w=function(e,t){var n=e.key,r=e.type,i=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||f(),data:v(i),characterList:b(e,t)}},b=function(t,n){var r=t.text,i=t.entityRanges,o=t.inlineStyleRanges,a=i||[];return c(u(r,o||[]),d(r,a.filter(function(e){return n.hasOwnProperty(e.key)}).map(function(t){return e({},t,{key:n[t.key]})})))},E=function(t){return e({},t,{key:t.key||f()})},M=function(t,n,r){var i=n.map(function(t){return e({},t,{parentRef:r})});return t.concat(i.reverse())},A=function(t,i){var o=t.blocks.find(function(e){return Array.isArray(e.children)&&e.children.length>0}),s=m&&!o?a.fromRawStateToRawTreeState(t).blocks:t.blocks;if(!m)return function(e,t){return y(e.map(function(e){var r=new n(w(e,t));return[r.getKey(),r]}))}(o?a.fromRawTreeStateToRawState(t).blocks:s,i);var c=function(t,n){return t.map(E).reduce(function(i,o,a){Array.isArray(o.children)||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):C(!1));var l=o.children.map(E),s=new r(e({},w(o,n),{prevSibling:0===a?null:t[a-1].key,nextSibling:a===t.length-1?null:t[a+1].key,children:g(l.map(function(e){return e.key}))}));i=i.set(s.getKey(),s);for(var c=M([],l,s);c.length>0;){var d=c.pop(),u=d.parentRef,f=u.getChildKeys(),h=f.indexOf(d.key),p=Array.isArray(d.children);if(!p){p||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):C(!1));break}var m=d.children.map(E),v=new r(e({},w(d,n),{parent:u.getKey(),children:g(m.map(function(e){return e.key})),prevSibling:0===h?null:f.get(h-1),nextSibling:h===f.size-1?null:f.get(h+1)}));i=i.set(v.getKey(),v),c=M(c,m,v)}return i},y())}(s,i);return"production"!==process.env.NODE_ENV&&(l.isValidTree(c)||("production"!==process.env.NODE_ENV?C(!1,"Should be a valid tree"):C(!1))),c};return sP=function(e){Array.isArray(e.blocks)||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentState"):C(!1));var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach(function(e){var r=t[e],i=r.type,a=r.mutability,l=r.data;n[e]=o.__create(i,a,l||{})}),n}(e),n=A(e,t),r=n.isEmpty()?new s:s.createEmpty(n.first().getKey());return new i({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}}function MP(){if(hP)return fP;hP=1;var e=function(){if(uP)return dP;uP=1;var e=kB();return dP=function(t){var n=e(t),r=0,i=0,o=0,a=0;if(n.length){if(n.length>1&&0===n[0].width){var l=n[1];r=l.top,i=l.right,o=l.bottom,a=l.left}else{var s=n[0];r=s.top,i=s.right,o=s.bottom,a=s.left}for(var c=1;c<n.length;c++){var d=n[c];0!==d.height&&0!==d.width&&(r=Math.min(r,d.top),i=Math.max(i,d.right),o=Math.max(o,d.bottom),a=Math.min(a,d.left))}}return{top:r,right:i,bottom:o,left:a,width:i-a,height:o-r}},dP}();return fP=function(t){var n=t.getSelection();if(!n.rangeCount)return null;var r=n.getRangeAt(0),i=e(r),o=i.top,a=i.right,l=i.bottom,s=i.left;return 0===o&&0===a&&0===l&&0===s?null:i},fP}function AP(){if(CP)return pP;CP=1;var e=uT(),t=zN(),n=IN(),r=fT(),i=TN(),o=oT(),a=pT(),l=CT(),s=PB(),c=pj(),d=tT(),u=XN(),f=eT(),h=dT(),p=LB(),C=gP(),m=DB(),g=nT(),v=wP(),y=EP(),w=BN(),b=BB(),E=MP(),M=NB();return pP={Editor:s,EditorBlock:c,EditorState:h,CompositeDecorator:r,Entity:d,EntityInstance:f,BlockMapBuilder:t,CharacterMetadata:n,ContentBlock:i,ContentState:o,RawDraftContentState:C,SelectionState:g,AtomicBlockUtils:e,KeyBindingUtil:p,Modifier:u,RichUtils:m,DefaultDraftBlockRenderMap:a,DefaultDraftInlineStyle:l,convertFromHTML:M,convertFromRaw:y,convertToRaw:v,genKey:w,getDefaultKeyBinding:b,getVisibleSelectionRect:E}}var xP=AP(),LP={exports:{}},kP="@@__IMMUTABLE_INDEXED__@@";function HP(e){return Boolean(e&&e[kP])}var SP="@@__IMMUTABLE_KEYED__@@";function _P(e){return Boolean(e&&e[SP])}function VP(e){return _P(e)||HP(e)}var OP="@@__IMMUTABLE_ITERABLE__@@";function zP(e){return Boolean(e&&e[OP])}var IP=function(e){return zP(e)?e:gF(e)},NP=function(e){function t(e){return _P(e)?e:vF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(IP),TP=function(e){function t(e){return HP(e)?e:yF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(IP),DP=function(e){function t(e){return zP(e)&&!VP(e)?e:wF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(IP);IP.Keyed=NP,IP.Indexed=TP,IP.Set=DP;var ZP="function"==typeof Symbol&&Symbol.iterator,jP="@@iterator",RP=ZP||jP,BP=function(e){this.next=e};function PP(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function FP(){return{value:void 0,done:!0}}function UP(e){return!!Array.isArray(e)||!!QP(e)}function qP(e){return!(!e||"function"!=typeof e.next)}function WP(e){var t=QP(e);return t&&t.call(e)}function QP(e){var t=e&&(ZP&&e[ZP]||e[jP]);if("function"==typeof t)return t}BP.prototype.toString=function(){return"[Iterator]"},BP.KEYS=0,BP.VALUES=1,BP.ENTRIES=2,BP.prototype.inspect=BP.prototype.toSource=function(){return this.toString()},BP.prototype[RP]=function(){return this};var GP="delete",KP=32,YP=31,XP={};function JP(e){e&&(e.value=!0)}function $P(){}function eF(e){return void 0===e.size&&(e.size=e.__iterate(nF)),e.size}function tF(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?eF(e)+t:t}function nF(){return!0}function rF(e,t,n){return(0===e&&!lF(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function iF(e,t){return aF(e,t,0)}function oF(e,t){return aF(e,t,t)}function aF(e,t,n){return void 0===e?n:lF(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function lF(e){return e<0||0===e&&1/e==-1/0}var sF="@@__IMMUTABLE_RECORD__@@";function cF(e){return Boolean(e&&e[sF])}function dF(e){return zP(e)||cF(e)}var uF="@@__IMMUTABLE_ORDERED__@@";function fF(e){return Boolean(e&&e[uF])}var hF="@@__IMMUTABLE_SEQ__@@";function pF(e){return Boolean(e&&e[hF])}var CF=Object.prototype.hasOwnProperty;function mF(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var gF=function(e){function t(e){return null==e?xF():dF(e)?e.toSeq():function(e){var t=HF(e);if(t)return(r=QP(n=e))&&r===n.entries?t.fromEntrySeq():function(e){var t=QP(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var n,r;if("object"==typeof e)return new EF(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new BP(function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return PP(e,o[0],o[1])})}return this.__iteratorUncached(e,t)},t}(IP),vF=function(e){function t(e){return null==e?xF().toKeyedSeq():zP(e)?_P(e)?e.toSeq():e.fromEntrySeq():cF(e)?e.toSeq():LF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(gF),yF=function(e){function t(e){return null==e?xF():zP(e)?_P(e)?e.entrySeq():e.toIndexedSeq():cF(e)?e.toSeq().entrySeq():kF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(gF),wF=function(e){function t(e){return(zP(e)&&!VP(e)?e:yF(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(gF);gF.isSeq=pF,gF.Keyed=vF,gF.Set=wF,gF.Indexed=yF,gF.prototype[hF]=!0;var bF=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[tF(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new BP(function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return PP(e,o,n[o])})},t}(yF),EF=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return CF.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new BP(function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return PP(e,a,n[a])})},t}(vF);EF.prototype[uF]=!0;var MF,AF=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=WP(this._collection),r=0;if(qP(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=WP(this._collection);if(!qP(n))return new BP(FP);var r=0;return new BP(function(){var t=n.next();return t.done?t:PP(e,r++,t.value)})},t}(yF);function xF(){return MF||(MF=new bF([]))}function LF(e){var t=HF(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new EF(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function kF(e){var t=HF(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function HF(e){return mF(e)?new bF(e):UP(e)?new AF(e):void 0}function SF(){return this.__ensureOwner()}function _F(){return this.__ownerID?this:this.__ensureOwner(new $P)}var VF="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function OF(e){return e>>>1&1073741824|3221225471&e}var zF=Object.prototype.valueOf;function IF(e){if(null==e)return NF(e);if("function"==typeof e.hashCode)return OF(e.hashCode(e));var t,n=(t=e).valueOf!==zF&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==n)return NF(n);switch(typeof n){case"boolean":return n?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return OF(t)}(n);case"string":return n.length>qF?function(e){var t=GF[e];void 0===t&&(t=TF(e),QF===WF&&(QF=0,GF={}),QF++,GF[e]=t);return t}(n):TF(n);case"object":case"function":return function(e){var t;if(BF&&void 0!==(t=RF.get(e)))return t;if(t=e[UF],void 0!==t)return t;if(!ZF){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[UF]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=jF(),BF)RF.set(e,t);else{if(void 0!==DF&&!1===DF(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ZF)Object.defineProperty(e,UF,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[UF]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[UF]=t}}return t}(n);case"symbol":return function(e){var t=PF[e];if(void 0!==t)return t;return t=jF(),PF[e]=t,t}(n);default:if("function"==typeof n.toString)return TF(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function NF(e){return null===e?1108378658:1108378659}function TF(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return OF(t)}var DF=Object.isExtensible,ZF=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function jF(){var e=++FF;return 1073741824&FF&&(FF=0),e}var RF,BF="function"==typeof WeakMap;BF&&(RF=new WeakMap);var PF=Object.create(null),FF=0,UF="__immutablehash__";"function"==typeof Symbol&&(UF=Symbol(UF));var qF=16,WF=255,QF=0,GF={},KF=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=tU(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=eU(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(vF);KF.prototype[uF]=!0;var YF=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&eF(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&eF(this),new BP(function(){var o=r.next();return o.done?o:PP(e,t?n.size-++i:i++,o.value,o)})},t}(yF),XF=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new BP(function(){var t=n.next();return t.done?t:PP(e,t.value,t.value,t)})},t}(wF),JF=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){fU(t);var r=zP(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new BP(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){fU(r);var i=zP(r);return PP(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(vF);function $F(e){var t=pU(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=CU,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new BP(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(1===t?0:1,n)},t}function eU(e,t,n){var r=pU(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,XP);return o===XP?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new BP(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return PP(r,l,t.call(n,a[1],l,e),i)})},r}function tU(e,t){var n=this,r=pU(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=$F(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=CU,r.__iterate=function(n,r){var i=this,o=0;return r&&eF(e),e.__iterate(function(e,a){return n(e,t?a:r?i.size-++o:o++,i)},!r)},r.__iterator=function(r,i){var o=0;i&&eF(e);var a=e.__iterator(2,!i);return new BP(function(){var e=a.next();if(e.done)return e;var l=e.value;return PP(r,t?l[0]:i?n.size-++o:o++,l[1],e)})},r}function nU(e,t,n,r){var i=pU(e);return r&&(i.has=function(r){var i=e.get(r,XP);return i!==XP&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,XP);return o!==XP&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,s){if(t.call(n,e,o,s))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),l=0;return new BP(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],d=s[1];if(t.call(n,d,c,e))return PP(i,r?c:l++,d,o)}})},i}function rU(e,t,n,r){var i=e.size;if(rF(t,n,i))return e;if(void 0===i&&(t<0||n<0))return rU(e.toSeq().cacheResult(),t,n,r);var o,a=iF(t,i),l=oF(n,i)-a;l==l&&(o=l<0?0:l);var s=pU(e);return s.size=0===o?o:e.size&&o||void 0,!r&&pF(e)&&o>=0&&(s.get=function(t,n){return(t=tF(this,t))>=0&&t<o?e.get(t+a,n):n}),s.__iterateUncached=function(t,n){var i=this;if(0===o)return 0;if(n)return this.cacheResult().__iterate(t,n);var l=0,s=!0,c=0;return e.__iterate(function(e,n){if(!s||!(s=l++<a))return c++,!1!==t(e,r?n:c-1,i)&&c!==o}),c},s.__iteratorUncached=function(t,n){if(0!==o&&n)return this.cacheResult().__iterator(t,n);if(0===o)return new BP(FP);var i=e.__iterator(t,n),l=0,s=0;return new BP(function(){for(;l++<a;)i.next();if(++s>o)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:PP(t,s-1,0===t?void 0:e.value[1],e)})},s}function iU(e,t,n,r){var i=pU(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,s=0;return e.__iterate(function(e,o,c){if(!l||!(l=t.call(n,e,o,c)))return s++,i(e,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(2,o),s=!0,c=0;return new BP(function(){var e,o,d;do{if((e=l.next()).done)return r||1===i?e:PP(i,c++,0===i?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],s&&(s=t.call(n,d,o,a))}while(s);return 2===i?e:PP(i,o,d,e)})},i}YF.prototype.cacheResult=KF.prototype.cacheResult=XF.prototype.cacheResult=JF.prototype.cacheResult=CU;var oU=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),this[SP]=this._wrappedIterables[0][SP],this[kP]=this._wrappedIterables[0][kP],this[uF]=this._wrappedIterables[0][uF]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(0!==this._wrappedIterables.length){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=_P(this),i=r?2:1,o=this._wrappedIterables[n].__iterator(i,t),a=!0,l=0;a;){for(var s=o.next();s.done;){if(++n===this._wrappedIterables.length)return l;s=(o=this._wrappedIterables[n].__iterator(i,t)).next()}a=!1!==(r?e(s.value[1],s.value[0],this):e(s.value,l,this)),l++}return l}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(0===this._wrappedIterables.length)return new BP(FP);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new BP(function(){for(var o=i.next();o.done;){if(++r===n._wrappedIterables.length)return o;o=(i=n._wrappedIterables[r].__iterator(e,t)).next()}return o})},t}(gF);function aU(e,t,n){var r=pU(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,l=!1;return function e(s,c){s.__iterate(function(o,s){return(!t||c<t)&&zP(o)?e(o,c+1):(a++,!1===i(o,n?s:a-1,r)&&(l=!0)),!l},o)}(e,0),a},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),a=[],l=0;return new BP(function(){for(;o;){var e=o.next();if(!1===e.done){var s=e.value;if(2===r&&(s=s[1]),t&&!(a.length<t)||!zP(s))return n?e:PP(r,l++,s,e);a.push(o),o=s.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}})},r}function lU(e,t,n){t||(t=mU);var r=_P(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?vF(o):HP(e)?yF(o):wF(o)}function sU(e,t,n){if(t||(t=mU),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return cU(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return cU(t,e,n)?n:e})}function cU(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function dU(e,t,n,r){var i=pU(e),o=new bF(n).map(function(e){return e.size});return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map(function(e){return e=IP(e),WP(i?e.reverse():e)}),a=0,l=!1;return new BP(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),l?{value:void 0,done:!0}:PP(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function uU(e,t){return e===t?e:pF(e)?t:e.constructor(t)}function fU(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function hU(e){return _P(e)?NP:HP(e)?TP:DP}function pU(e){return Object.create((_P(e)?vF:HP(e)?yF:wF).prototype)}function CU(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):gF.prototype.cacheResult.call(this)}function mU(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function gU(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function vU(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(gU(e)&&gU(t)&&e.equals(t))}function yU(e,t,n,r){return vq(e,[t],n,r)}function wU(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return EU(this,e)}function bU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return EU(this,t,e)}function EU(e,t,n){for(var r=[],i=0;i<t.length;i++){var o=NP(t[i]);0!==o.size&&r.push(o)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){yU(e,r,XP,function(e){return e===XP?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):cF(e)?e:e.constructor(r[0])}var MU=Object.prototype.toString;function AU(e){if(!e||"object"!=typeof e||"[object Object]"!==MU.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function xU(e){return"object"==typeof e&&(dF(e)||Array.isArray(e)||AU(e))}function LU(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function kU(e){if(Array.isArray(e))return LU(e);var t={};for(var n in e)CF.call(e,n)&&(t[n]=e[n]);return t}function HU(e,t,n){return SU(e,t,function(e){function t(n,r,i){return xU(n)&&xU(r)&&(o=r,a=gF(n),l=gF(o),HP(a)===HP(l)&&_P(a)===_P(l))?SU(n,[r],t):e?e(n,r,i):r;var o,a,l}return t}(n))}function SU(e,t,n){if(!xU(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(dF(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?TP:NP,a=r?function(t){i===e&&(i=kU(i)),i.push(t)}:function(t,r){var o=CF.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=kU(i)),i[r]=a)},l=0;l<t.length;l++)o(t[l]).forEach(a);return i}function _U(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return HU(this,e)}function VU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return HU(this,t,e)}function OU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return vq(this,e,nq(),function(e){return HU(e,t)})}function zU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return vq(this,e,nq(),function(e){return SU(e,t)})}function IU(e,t,n){return vq(e,t,XP,function(){return n})}function NU(e,t){return IU(this,e,t)}function TU(e,t,n){return 1===arguments.length?e(this):yU(this,e,t,n)}function DU(e,t,n){return vq(this,e,t,n)}function ZU(){return this.__altered}function jU(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var RU="@@__IMMUTABLE_MAP__@@";function BU(e){return Boolean(e&&e[RU])}function PU(e,t){if(!e)throw new Error(t)}function FU(e){PU(e!==1/0,"Cannot perform this action with an infinite size.")}var UU=function(e){function t(t){return null==t?nq():BU(t)&&!fF(t)?t:nq().withMutations(function(n){var r=e(t);FU(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return rq(this,e,t)},t.prototype.remove=function(e){return rq(this,e,XP)},t.prototype.deleteAll=function(e){var t=IP(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):nq()},t.prototype.sort=function(e){return Zq(lU(this,e))},t.prototype.sortBy=function(e,t){return Zq(lU(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,o){r.set(o,e.call(t,i,o,n))})})},t.prototype.__iterator=function(e,t){return new JU(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?tq(this.size,this._root,e,this.__hash):0===this.size?nq():(this.__ownerID=e,this.__altered=!1,this)},t}(NP);UU.isMap=BU;var qU=UU.prototype;qU[RU]=!0,qU[GP]=qU.remove,qU.removeAll=qU.deleteAll,qU.setIn=NU,qU.removeIn=qU.deleteIn=bq,qU.update=TU,qU.updateIn=DU,qU.merge=qU.concat=wU,qU.mergeWith=bU,qU.mergeDeep=_U,qU.mergeDeepWith=VU,qU.mergeIn=zU,qU.mergeDeepIn=OU,qU.withMutations=jU,qU.wasAltered=ZU,qU.asImmutable=SF,qU["@@transducer/init"]=qU.asMutable=_F,qU["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},qU["@@transducer/result"]=function(e){return e.asImmutable()};var WU=function(e,t){this.ownerID=e,this.entries=t};WU.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(vU(n,i[o][0]))return i[o][1];return r},WU.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===XP,s=this.entries,c=0,d=s.length;c<d&&!vU(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(JP(a),(l||!u)&&JP(o),!l||1!==s.length){if(!u&&!l&&s.length>=cq)return function(e,t,n,r){e||(e=new $P);for(var i=new YU(e,IF(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,s,r,i);var f=e&&e===this.ownerID,h=f?s:LU(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new WU(e,h)}};var QU=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};QU.prototype.get=function(e,t,n,r){void 0===t&&(t=IF(n));var i=1<<((0===e?t:t>>>e)&YP),o=this.bitmap;return 0===(o&i)?r:this.nodes[lq(o&i-1)].get(e+5,t,n,r)},QU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=IF(r));var l=(0===t?n:n>>>t)&YP,s=1<<l,c=this.bitmap,d=0!==(c&s);if(!d&&i===XP)return this;var u=lq(c&s-1),f=this.nodes,h=d?f[u]:void 0,p=iq(h,e,t+5,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=dq)return function(e,t,n,r,i){for(var o=0,a=new Array(KP),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new GU(e,o+1,a)}(e,f,c,l,p);if(d&&!p&&2===f.length&&oq(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&oq(p))return p;var C=e&&e===this.ownerID,m=d?p?c:c^s:c|s,g=d?p?sq(f,u,p,C):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(f,u,C):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}(f,u,p,C);return C?(this.bitmap=m,this.nodes=g,this):new QU(e,m,g)};var GU=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};GU.prototype.get=function(e,t,n,r){void 0===t&&(t=IF(n));var i=(0===e?t:t>>>e)&YP,o=this.nodes[i];return o?o.get(e+5,t,n,r):r},GU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=IF(r));var l=(0===t?n:n>>>t)&YP,s=i===XP,c=this.nodes,d=c[l];if(s&&!d)return this;var u=iq(d,e,t+5,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<uq)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,s=1,c=t.length;l<c;l++,s<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=s,a[o++]=d)}return new QU(e,i,a)}(e,c,f,l)}else f++;var h=e&&e===this.ownerID,p=sq(c,l,u,h);return h?(this.count=f,this.nodes=p,this):new GU(e,f,p)};var KU=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};KU.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(vU(n,i[o][0]))return i[o][1];return r},KU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=IF(r));var l=i===XP;if(n!==this.keyHash)return l?this:(JP(a),JP(o),aq(this,e,t,n,[r,i]));for(var s=this.entries,c=0,d=s.length;c<d&&!vU(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(JP(a),(l||!u)&&JP(o),l&&2===d)return new YU(e,this.keyHash,s[1^c]);var f=e&&e===this.ownerID,h=f?s:LU(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new KU(e,this.keyHash,h)};var YU=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};YU.prototype.get=function(e,t,n,r){return vU(n,this.entry[0])?this.entry[1]:r},YU.prototype.update=function(e,t,n,r,i,o,a){var l=i===XP,s=vU(r,this.entry[0]);return(s?i===this.entry[1]:l)?this:(JP(a),l?void JP(o):s?e&&e===this.ownerID?(this.entry[1]=i,this):new YU(e,this.keyHash,[r,i]):(JP(o),aq(this,e,t,IF(r),[r,i])))},WU.prototype.iterate=KU.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},QU.prototype.iterate=GU.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},YU.prototype.iterate=function(e,t){return e(this.entry)};var XU,JU=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&eq(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return $U(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return $U(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return $U(e,o.entry);t=this._stack=eq(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(BP);function $U(e,t){return PP(e,t[0],t[1])}function eq(e,t){return{node:e,index:0,__prev:t}}function tq(e,t,n,r){var i=Object.create(qU);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function nq(){return XU||(XU=tq(0))}function rq(e,t,n){var r,i;if(e._root){var o={value:!1},a={value:!1};if(r=iq(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===XP?-1:1:0)}else{if(n===XP)return e;i=1,r=new WU(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?tq(i,r):nq()}function iq(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===XP?e:(JP(l),JP(a),new YU(t,r,[i,o]))}function oq(e){return e.constructor===YU||e.constructor===KU}function aq(e,t,n,r,i){if(e.keyHash===r)return new KU(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&YP,l=(0===n?r:r>>>n)&YP,s=a===l?[aq(e,t,n+5,r,i)]:(o=new YU(t,r,i),a<l?[e,o]:[o,e]);return new QU(t,1<<a|1<<l,s)}function lq(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function sq(e,t,n,r){var i=r?e:LU(e);return i[t]=n,i}var cq=8,dq=16,uq=8;function fq(e){if(mF(e)&&"string"!=typeof e)return e;if(fF(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function hq(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function pq(e,t){return dF(e)?e.has(t):xU(e)&&CF.call(e,t)}function Cq(e,t,n){return dF(e)?e.get(t,n):pq(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function mq(e,t){if(!xU(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(dF(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!CF.call(e,t))return e;var n=kU(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function gq(e,t,n){if(!xU(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(dF(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(CF.call(e,t)&&n===e[t])return e;var r=kU(e);return r[t]=n,r}function vq(e,t,n,r){r||(r=n,n=void 0);var i=yq(dF(e),e,fq(t),0,n,r);return i===XP?n:i}function yq(e,t,n,r,i,o){var a=t===XP;if(r===n.length){var l=a?i:t,s=o(l);return s===l?t:s}if(!a&&!xU(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(n).slice(0,r).map(hq)+"]: "+t);var c=n[r],d=a?XP:Cq(t,c,XP),u=yq(d===XP?e:dF(d),d,n,r+1,i,o);return u===d?t:u===XP?mq(t,c):gq(a?e?nq():{}:t,c,u)}function wq(e,t){return vq(e,t,function(){return XP})}function bq(e){return wq(this,e)}var Eq="@@__IMMUTABLE_LIST__@@";function Mq(e){return Boolean(e&&e[Eq])}var Aq=function(e){function t(t){var n=_q();if(null==t)return n;if(Mq(t))return t;var r=e(t),i=r.size;return 0===i?n:(FU(i),i>0&&i<KP?Sq(0,i,5,null,new Lq(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=tF(this,e))>=0&&e<this.size){var n=zq(this,e+=this._origin);return n&&n.array[e&YP]}return t},t.prototype.set=function(e,t){return function(e,t,n){if(t=tF(e,t),t!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Iq(e,t).set(0,n):Iq(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=Nq(e._capacity)?r=Vq(r,e.__ownerID,0,t,n,o):i=Vq(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Sq(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):_q()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Iq(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return Iq(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Iq(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return Iq(this,1)},t.prototype.shuffle=function(e){return void 0===e&&(e=Math.random),this.withMutations(function(t){for(var n,r,i=t.size;i;)n=Math.floor(e()*i--),r=t.get(n),t.set(n,t.get(i)),t.set(i,r)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&UP(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return Iq(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return rF(e,t,n)?this:Iq(this,iF(e,n),oF(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=Hq(this,t);return new BP(function(){var i=r();return i===kq?{value:void 0,done:!0}:PP(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=Hq(this,t);(n=i())!==kq&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Sq(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?_q():(this.__ownerID=e,this.__altered=!1,this)},t}(TP);Aq.isList=Mq;var xq=Aq.prototype;xq[Eq]=!0,xq[GP]=xq.remove,xq.merge=xq.concat,xq.setIn=NU,xq.deleteIn=xq.removeIn=bq,xq.update=TU,xq.updateIn=DU,xq.mergeIn=zU,xq.mergeDeepIn=OU,xq.withMutations=jU,xq.wasAltered=ZU,xq.asImmutable=SF,xq["@@transducer/init"]=xq.asMutable=_F,xq["@@transducer/step"]=function(e,t){return e.push(t)},xq["@@transducer/result"]=function(e){return e.asImmutable()};var Lq=function(e,t){this.array=e,this.ownerID=t};Lq.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+5)-1)||0===this.array.length)return this;var r=n>>>t&YP;if(r>=this.array.length)return new Lq([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var l=Oq(this,e);if(!o)for(var s=0;s<r;s++)l.array[s]=void 0;return i&&(l.array[r]=i),l},Lq.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+5:KP)||0===this.array.length)return this;var r,i=n-1>>>t&YP;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=Oq(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var kq={};function Hq(e,t){var n=e._origin,r=e._capacity,i=Nq(r),o=e._tail;return a(e._root,e._level,0);function a(e,l,s){return 0===l?function(e,a){var l=a===i?o&&o.array:e&&e.array,s=a>n?0:n-a,c=r-a;c>KP&&(c=KP);return function(){if(s===c)return kq;var e=t?--c:s++;return l&&l[e]}}(e,s):function(e,i,o){var l,s=e&&e.array,c=o>n?0:n-o>>i,d=1+(r-o>>i);d>KP&&(d=KP);return function(){for(;;){if(l){var e=l();if(e!==kq)return e;l=null}if(c===d)return kq;var n=t?--d:c++;l=a(s&&s[n],i-5,o+(n<<i))}}}(e,l,s)}}function Sq(e,t,n,r,i,o,a){var l=Object.create(xq);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function _q(){return Sq(0,0,5)}function Vq(e,t,n,r,i,o){var a,l=r>>>n&YP,s=e&&l<e.array.length;if(!s&&void 0===i)return e;if(n>0){var c=e&&e.array[l],d=Vq(c,t,n-5,r,i,o);return d===c?e:((a=Oq(e,t)).array[l]=d,a)}return s&&e.array[l]===i?e:(o&&JP(o),a=Oq(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Oq(e,t){return t&&e&&t===e.ownerID?e:new Lq(e?e.array.slice():[],t)}function zq(e,t){if(t>=Nq(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&YP],r-=5;return n}}function Iq(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new $P,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var s=e._level,c=e._root,d=0;a+d<0;)c=new Lq(c&&c.array.length?[void 0,c]:[],r),d+=1<<(s+=5);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Nq(o),f=Nq(l);f>=1<<s+5;)c=new Lq(c&&c.array.length?[c]:[],r),s+=5;var h=e._tail,p=f<u?zq(e,l-1):f>u?new Lq([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var C=c=Oq(c,r),m=s;m>5;m-=5){var g=u>>>m&YP;C=C.array[g]=Oq(C.array[g],r)}C.array[u>>>5&YP]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,s=5,c=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;c;){var v=a>>>s&YP;if(v!==f>>>s&YP)break;v&&(d+=(1<<s)*v),s-=5,c=c.array[v]}c&&a>i&&(c=c.removeBefore(r,s,a-d)),c&&f<u&&(c=c.removeAfter(r,s,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):Sq(a,l,s,c,p)}function Nq(e){return e<KP?0:e-1>>>5<<5}function Tq(e){return BU(e)&&fF(e)}var Dq,Zq=function(e){function t(e){return null==e?Rq():Tq(e)?e:Rq().withMutations(function(t){var n=NP(e);FU(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Rq()},t.prototype.set=function(e,t){return Bq(this,e,t)},t.prototype.remove=function(e){return Bq(this,e,XP)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?jq(t,n,e,this.__hash):0===this.size?Rq():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(UU);function jq(e,t,n,r){var i=Object.create(Zq.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Rq(){return Dq||(Dq=jq(nq(),_q()))}function Bq(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),s=void 0!==l;if(n===XP){if(!s)return e;a.size>=KP&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(s){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e.__altered=!0,e):jq(r,i)}Zq.isOrderedMap=Tq,Zq.prototype[uF]=!0,Zq.prototype[GP]=Zq.prototype.remove;var Pq="@@__IMMUTABLE_STACK__@@";function Fq(e){return Boolean(e&&e[Pq])}var Uq=function(e){function t(e){return null==e?Gq():Fq(e)?e:Gq().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=tF(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Qq(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Fq(t))return t;FU(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Qq(n,r)},t.prototype.pop=function(){return this.slice(1)},t.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):Gq()},t.prototype.slice=function(t,n){if(rF(t,n,this.size))return this;var r=iF(t,this.size);if(oF(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Qq(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Qq(this.size,this._head,e,this.__hash):0===this.size?Gq():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new bF(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new bF(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new BP(function(){if(r){var t=r.value;return r=r.next,PP(e,n++,t)}return{value:void 0,done:!0}})},t}(TP);Uq.isStack=Fq;var qq,Wq=Uq.prototype;function Qq(e,t,n,r){var i=Object.create(Wq);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Gq(){return qq||(qq=Qq(0))}function Kq(e,t,n,r,i,o){return FU(e.size),e.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)},o),n}function Yq(e,t){return t}function Xq(e,t){return[t,e]}function Jq(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function $q(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function eW(e,t){return e<t?1:e>t?-1:0}function tW(e,t){if(e===t)return!0;if(!zP(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||_P(e)!==_P(t)||HP(e)!==HP(t)||fF(e)!==fF(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!VP(e);if(fF(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&vU(i[1],e)&&(n||vU(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,l=t.__iterate(function(t,r){if(n?!e.has(t):i?!vU(t,e.get(r,XP)):!vU(e.get(r,XP),t))return a=!1,!1});return a&&e.size===l}Wq[Pq]=!0,Wq.shift=Wq.pop,Wq.unshift=Wq.push,Wq.unshiftAll=Wq.pushAll,Wq.withMutations=jU,Wq.wasAltered=ZU,Wq.asImmutable=SF,Wq["@@transducer/init"]=Wq.asMutable=_F,Wq["@@transducer/step"]=function(e,t){return e.unshift(t)},Wq["@@transducer/result"]=function(e){return e.asImmutable()};var nW,rW=function(e){function t(e,n,r){if(void 0===r&&(r=1),!(this instanceof t))return new t(e,n,r);if(PU(0!==r,"Cannot step a Range by 0"),PU(void 0!==e,"You must define a start value when using Range"),PU(void 0!==n,"You must define an end value when using Range"),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(nW)return nW;nW=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+tF(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return rF(e,n,this.size)?this:(e=iF(e,this.size),(n=oF(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new BP(function(){if(o===n)return{value:void 0,done:!0};var a=i;return i+=t?-r:r,PP(e,t?n-++o:o++,a)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:tW(this,e)},t}(yF),iW="@@__IMMUTABLE_SET__@@";function oW(e){return Boolean(e&&e[iW])}var aW=function(e){function t(t){return null==t?uW():oW(t)&&!fF(t)?t:uW().withMutations(function(n){var r=e(t);FU(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(NP(e).keySeq())},t.intersect=function(e){return(e=IP(e).toArray()).length?sW.intersect.apply(t(e.pop()),e):uW()},t.union=function(e){return(e=IP(e).toArray()).length?sW.union.apply(t(e.pop()),e):uW()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return cW(this,this._map.set(e,e))},t.prototype.remove=function(e){return cW(this,this._map.remove(e))},t.prototype.clear=function(){return cW(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=cW(this,this._map.mapEntries(function(i){var o=i[1],a=e.call(t,o,o,n);return a!==o&&(r=!0),[a,a]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)"string"==typeof t[r]?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return LW(lU(this,e))},t.prototype.sortBy=function(e,t){return LW(lU(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(DP);aW.isSet=oW;var lW,sW=aW.prototype;function cW(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function dW(e,t){var n=Object.create(sW);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function uW(){return lW||(lW=dW(nq()))}function fW(e,t,n){for(var r=fq(t),i=0;i!==r.length;)if((e=Cq(e,r[i++],XP))===XP)return n;return e}function hW(e,t){return fW(this,e,t)}function pW(e,t){return fW(e,t,XP)!==XP}function CW(){FU(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}function mW(e){if(!e||"object"!=typeof e)return e;if(!zP(e)){if(!xU(e))return e;e=gF(e)}if(_P(e)){var t={};return e.__iterate(function(e,n){t[n]=mW(e)}),t}var n=[];return e.__iterate(function(e){n.push(mW(e))}),n}function gW(e){if(e.size===1/0)return 0;var t=fF(e),n=_P(e),r=t?1:0;return e.__iterate(n?t?function(e,t){r=31*r+vW(IF(e),IF(t))|0}:function(e,t){r=r+vW(IF(e),IF(t))|0}:t?function(e){r=31*r+IF(e)|0}:function(e){r=r+IF(e)|0}),function(e,t){return t=VF(t,3432918353),t=VF(t<<15|t>>>-15,461845907),t=VF(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=VF(t^t>>>16,2246822507),t=VF(t^t>>>13,3266489909),t=OF(t^t>>>16),t}(e.size,r)}function vW(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function yW(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}sW[iW]=!0,sW[GP]=sW.remove,sW.merge=sW.concat=sW.union,sW.withMutations=jU,sW.asImmutable=SF,sW["@@transducer/init"]=sW.asMutable=_F,sW["@@transducer/step"]=function(e,t){return e.add(t)},sW["@@transducer/result"]=function(e){return e.asImmutable()},sW.__empty=uW,sW.__make=dW,IP.Iterator=BP,yW(IP,{toArray:function(){FU(this.size);var e=new Array(this.size||0),t=_P(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new YF(this)},toJS:function(){return mW(this)},toKeyedSeq:function(){return new KF(this,!0)},toMap:function(){return UU(this.toKeyedSeq())},toObject:CW,toOrderedMap:function(){return Zq(this.toKeyedSeq())},toOrderedSet:function(){return LW(_P(this)?this.valueSeq():this)},toSet:function(){return aW(_P(this)?this.valueSeq():this)},toSetSeq:function(){return new XF(this)},toSeq:function(){return HP(this)?this.toIndexedSeq():_P(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Uq(_P(this)?this.valueSeq():this)},toList:function(){return Aq(_P(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return uU(this,function(e,t){var n=_P(e),r=[e].concat(t).map(function(e){return zP(e)?n&&(e=NP(e)):e=n?LF(e):kF(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&_P(i)||HP(e)&&HP(i))return i}return new oU(r)}(this,e))},includes:function(e){return this.some(function(t){return vU(t,e)})},entries:function(){return this.__iterator(2)},every:function(e,t){FU(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return uU(this,nU(this,e,t,!0))},partition:function(e,t){return function(e,t,n){var r=_P(e),i=[[],[]];e.__iterate(function(o,a){i[t.call(n,o,a,e)?1:0].push(r?[a,o]:o)});var o=hU(e);return i.map(function(t){return uU(e,o(t))})}(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return FU(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){FU(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(0)},map:function(e,t){return uU(this,eU(this,e,t))},reduce:function(e,t,n){return Kq(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Kq(this,e,t,n,arguments.length<2,!0)},reverse:function(){return uU(this,tU(this,!0))},slice:function(e,t){return uU(this,rU(this,e,t,!0))},some:function(e,t){FU(this.size);var n=!1;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=!0,!1}),n},sort:function(e){return uU(this,lU(this,e))},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(e,t){return eF(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=UU().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return tW(this,e)},entrySeq:function(){var e=this;if(e._cache)return new bF(e._cache);var t=e.toSeq().map(Xq).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Jq(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(nF,null,e)},flatMap:function(e,t){return uU(this,function(e,t,n){var r=hU(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return uU(this,aU(this,e,!0))},fromEntrySeq:function(){return new JF(this)},get:function(e,t){return this.find(function(t,n){return vU(n,e)},void 0,t)},getIn:hW,groupBy:function(e,t){return function(e,t,n){var r=_P(e),i=(fF(e)?Zq():UU()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=hU(e);return i.map(function(t){return uU(e,o(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,XP)!==XP},hasIn:function(e){return pW(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:IP(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:IP(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return vU(t,e)})},keySeq:function(){return this.toSeq().map(Yq).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return sU(this,e)},maxBy:function(e,t){return sU(this,t,e)},min:function(e){return sU(this,e?$q(e):eW)},minBy:function(e,t){return sU(this,t?$q(t):eW,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return uU(this,iU(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Jq(e),t)},sortBy:function(e,t){return uU(this,lU(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return uU(this,function(e,t,n){var r=pU(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),l=!0;return new BP(function(){if(!l)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,s=i[0],c=i[1];return t.call(n,c,s,o)?2===r?e:PP(r,s,c,e):(l=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Jq(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=gW(this))}});var wW=IP.prototype;wW[OP]=!0,wW[RP]=wW.values,wW.toJSON=wW.toArray,wW.__toStringMapper=hq,wW.inspect=wW.toSource=function(){return this.toString()},wW.chain=wW.flatMap,wW.contains=wW.includes,yW(NP,{flip:function(){return uU(this,$F(this))},mapEntries:function(e,t){var n=this,r=0;return uU(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return uU(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var bW=NP.prototype;bW[SP]=!0,bW[RP]=wW.entries,bW.toJSON=CW,bW.__toStringMapper=function(e,t){return hq(t)+": "+hq(e)},yW(TP,{toKeyedSeq:function(){return new KF(this,!1)},filter:function(e,t){return uU(this,nU(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return uU(this,tU(this,!1))},slice:function(e,t){return uU(this,rU(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=iF(e,e<0?this.count():this.size);var r=this.slice(0,e);return uU(this,1===n?r:r.concat(LU(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return uU(this,aU(this,e,!1))},get:function(e,t){return(e=tF(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=tF(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return uU(this,function(e,t){var n=pU(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new BP(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?PP(n,a++,t):PP(n,a++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(LU(arguments)),t=dU(this.toSeq(),yF.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),uU(this,n)},keySeq:function(){return rW(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return uU(this,iU(this,e,t,!1))},zip:function(){return uU(this,dU(this,AW,[this].concat(LU(arguments))))},zipAll:function(){return uU(this,dU(this,AW,[this].concat(LU(arguments)),!0))},zipWith:function(e){var t=LU(arguments);return t[0]=this,uU(this,dU(this,e,t))}});var EW=TP.prototype;EW[kP]=!0,EW[uF]=!0,yW(DP,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var MW=DP.prototype;function AW(){return LU(arguments)}function xW(e){return oW(e)&&fF(e)}MW.has=wW.includes,MW.contains=MW.includes,MW.keys=MW.values,yW(vF,bW),yW(yF,EW),yW(wF,MW);var LW=function(e){function t(e){return null==e?_W():xW(e)?e:_W().withMutations(function(t){var n=DP(e);FU(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(NP(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(aW);LW.isOrderedSet=xW;var kW,HW=LW.prototype;function SW(e,t){var n=Object.create(HW);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function _W(){return kW||(kW=SW(Rq()))}HW[uF]=!0,HW.zip=EW.zip,HW.zipWith=EW.zipWith,HW.zipAll=EW.zipAll,HW.__empty=_W,HW.__make=SW;var VW=function(e,t){var n;!function(e){if(cF(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(dF(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var l=Object.keys(e),s=i._indices={};i._name=t,i._keys=l,i._defaultValues=e;for(var c=0;c<l.length;c++){var d=l[c];s[d]=c,i[d]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+IW(this)+' with property "'+d+'" since that property name is part of the Record API.'):TW(i,d)}}return this.__ownerID=void 0,this._values=Aq().withMutations(function(e){e.setSize(a._keys.length),NP(o).forEach(function(t,n){e.set(a._indices[n],t===a._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(OW);return i.constructor=r,t&&(r.displayName=t),r};VW.prototype.toString=function(){for(var e,t=IW(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+hq(this.get(e));return t+" }"},VW.prototype.equals=function(e){return this===e||cF(e)&&NW(this).equals(NW(e))},VW.prototype.hashCode=function(){return NW(this).hashCode()},VW.prototype.has=function(e){return this._indices.hasOwnProperty(e)},VW.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},VW.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return zW(this,n)}return this},VW.prototype.remove=function(e){return this.set(e)},VW.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:zW(this,e)},VW.prototype.wasAltered=function(){return this._values.wasAltered()},VW.prototype.toSeq=function(){return NW(this)},VW.prototype.toJS=function(){return mW(this)},VW.prototype.entries=function(){return this.__iterator(2)},VW.prototype.__iterator=function(e,t){return NW(this).__iterator(e,t)},VW.prototype.__iterate=function(e,t){return NW(this).__iterate(e,t)},VW.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?zW(this,t,e):(this.__ownerID=e,this._values=t,this)},VW.isRecord=cF,VW.getDescriptiveName=IW;var OW=VW.prototype;function zW(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function IW(e){return e.constructor.displayName||e.constructor.name||"Record"}function NW(e){return LF(e._keys.map(function(t){return[t,e.get(t)]}))}function TW(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){PU(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}OW[sF]=!0,OW[GP]=OW.remove,OW.deleteIn=OW.removeIn=bq,OW.getIn=hW,OW.hasIn=wW.hasIn,OW.merge=wU,OW.mergeWith=bU,OW.mergeIn=zU,OW.mergeDeep=_U,OW.mergeDeepWith=VU,OW.mergeDeepIn=OU,OW.setIn=NU,OW.update=TU,OW.updateIn=DU,OW.withMutations=jU,OW.asMutable=_F,OW.asImmutable=SF,OW[RP]=OW.entries,OW.toJSON=OW.toObject=wW.toObject,OW.inspect=OW.toSource=function(){return this.toString()};var DW,ZW=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(DW)return DW;DW=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return vU(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return rF(e,n,r)?this:new t(this._value,oF(n,r)-iF(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return vU(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return vU(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new BP(function(){return i===r?{value:void 0,done:!0}:PP(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?vU(this._value,e._value):tW(this,e)},t}(yF);function jW(e,t,n,r,i,o){if("string"!=typeof n&&!dF(n)&&(mF(n)||UP(n)||AU(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,gF(n).map(function(r,o){return jW(e,t,r,o,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function RW(e,t){return HP(t)?t.toList():_P(t)?t.toMap():t.toSet()}var BW,PW=IP,FW=_(Object.freeze({__proto__:null,Collection:IP,Iterable:PW,List:Aq,Map:UU,OrderedMap:Zq,OrderedSet:LW,PairSorting:{LeftThenRight:-1,RightThenLeft:1},Range:rW,Record:VW,Repeat:ZW,Seq:gF,Set:aW,Stack:Uq,fromJS:function(e,t){return jW([],t||RW,e,"",t&&t.length>2?[]:void 0,{"":e})},get:Cq,getIn:fW,has:pq,hasIn:pW,hash:IF,is:vU,isAssociative:VP,isCollection:zP,isImmutable:dF,isIndexed:HP,isKeyed:_P,isList:Mq,isMap:BU,isOrdered:fF,isOrderedMap:Tq,isOrderedSet:xW,isPlainObject:AU,isRecord:cF,isSeq:pF,isSet:oW,isStack:Fq,isValueObject:gU,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return SU(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return HU(e,t)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return HU(t,n,e)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return SU(t,n,e)},remove:mq,removeIn:wq,set:gq,setIn:IU,update:yU,updateIn:vq,version:"5.1.4"}));var UW=(BW||(BW=1,window,LP.exports=function(e,t,n){return o={},r.m=i=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
|
|
43
|
+
let r=n?.map(e=>({...e,stepId:Qt()}));const i=new Set(["group","pre","post","script"]);return e.map(e=>{const n=i.has(e?.entityType?.toLowerCase())||i.has(e?.type?.toLowerCase());return e.stepId===t&&n?{...e,data:[...r||[]]}:e.data?{...e,data:DO(e.data,t,r)}:e})},ZO=(e,t,n,r)=>e.map(e=>e.title===t?{...e,data:DO(e.data,n,r)}:e),jO=e=>{let t;if(e.includes("T"))t=new Date(e);else{const[n,r]=e.split(" ");if(!n||!r)throw new Error("Invalid input format. Expected 'DD-MM-YYYY HH:mm'");const[i,o,a]=n.split("-"),[l,s]=r.split(":");t=new Date(parseInt(a||"",10),parseInt(o||"",10)-1,parseInt(i||"",10),parseInt(l||"",10),parseInt(s||"",10))}const n=`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}`,r=`${("0"+t.getHours()).slice(-2)}:${("0"+t.getMinutes()).slice(-2)}:00`;return new Date(`${n}T${r}`)},RO=e=>{const t=new Date;return new Intl.DateTimeFormat("en-US",{timeZone:e,weekday:"long",year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).format(t)},BO=({data:r,level:i=0,columnCount:o=1,viewModeId:a,ViewComponent:l,handleClick:s,handleStepGroupExpand:c,isStepGroupExpanded:d})=>{const u=0===i?26:i+8,h=new Set(["group","pre","post","script"]),C=p((e,t)=>h.has(e?.toLowerCase())||h.has(t?.toLowerCase())?"6px 8px":"7px 8px",[]);return e(t,{children:r?.map(t=>{const r=a===t.stepId,i=d?.(t.stepId),p=C(t.type,t?.entityType),m=h.has(t?.entityType?.toLowerCase())||h.has(t?.type?.toLowerCase());return n(f,{children:[e("tr",r?{className:"pre-edit-row",id:"getInFocus",children:e("td",{colSpan:o,children:e("div",{style:{marginLeft:u},children:l&&e(l,{})})})}:{children:e("td",{colSpan:o,style:{padding:p},children:n("div",{style:{marginLeft:u,display:"flex",alignItems:"center"},children:[e(Y,{title:t?.name,children:n(U,{as:"div",color:"var(--brand-color)",lineHeight:"18px",onClick:()=>s?.(t),children:[t.displayOrder,".",oe(t.name,40)]})}),m&&e("div",{className:"pre-accordion-arrow "+(i?"expanded":""),children:e(F,{name:"arrow_right",className:"pre-arrow-svg",color:i?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>c?.(t)})})]})})}),i&&e(BO,{data:t.data,level:u,columnCount:o,viewModeId:a,handleClick:s,ViewComponent:l,handleStepGroupExpand:c,isStepGroupExpanded:d})]},t.stepId)})})};var PO=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:a,tableDataTextColor:l,withCheckbox:s,onSelectClick:c,draggable:d,indexNumber:u=0,dataLength:f=0,viewModeId:p,ViewComponent:C,handleClick:m,handleStepGroupExpand:g,isStepGroupExpanded:v,scriptType:y})=>{const w=new Set(["group","pre","post","script"]),b=w.has(r?.entityType?.toLowerCase())||w.has(r?.type?.toLowerCase()),E=r?.isDisabled,M=r?._id||r?.stepId,A=!!y&&"cascaded"===r.cascaded,x=E||f<=1||A;let L=(u+1).toString();const{attributes:k,listeners:H,setNodeRef:S,transform:_,transition:V}=wa({id:M,disabled:x}),O=h(()=>({transform:Qr.Transform.toString(_),transition:V}),[_,V]),z=v?.(r.stepId);return n(t,{children:[e("tr",{ref:S,style:O,className:I(o,{"disabled-row":E}),children:i.map((t,i)=>{const o=0===i;return e("td",{style:{paddingLeft:o&&d?"0px":"8px"},onClick:()=>a(t,r,i),className:I(t.className,{"clickable-cell":t.onClick}),children:n(U,{as:"div",color:l,className:"ff-data-checkbox-container",children:[o&&s&&e("span",{className:"ff-table-pre-post-checkbox",children:e(ne,{onChange:e=>c(e,r),checked:r.checked,disabled:!!E})}),o&&d&&e("div",{className:E?"ff-table-drag":"ff-table-drag-icon",...H,...k,children:e(F,{name:"drag",className:x?"drag-icon-disabled":"drag-icon"})}),br(r,t,u),o&&b&&e("div",{className:"pre-accordion-arrow "+(z?"expanded":""),children:e(F,{name:"arrow_right",color:z?"var(--brand-color)":"var(--default-color)",width:12,height:12,className:"pre-arrow-svg",onClick:()=>{g?.({...r,serialNumber:L})}})}),t.extraInfo&&t.extraInfo({row:r,indexNumber:u})]})},`${t.accessor}${i}`)})},M),z&&e(BO,{data:r.data,columnCount:i.length,viewModeId:p,ViewComponent:C,handleClick:m,handleStepGroupExpand:g,isStepGroupExpanded:v})]})});const FO=(e,t)=>{const{action:n,sourceIndex:r,nlpName:i,id:o}=t;if(!n)return e;const a=[...e];let l={stepId:"stepId-9745-9745",isNew:!0,disabled:!1,...i&&{name:i},...o&&{id:o}};switch(n){case"addBelow":void 0!==r&&a.splice(r+1,0,l);break;case"replaceNlp":void 0!==r&&a.splice(r,0,l);break;case"EditNlp":void 0!==r&&(a.splice(r,1),a.splice(r,0,l));break;case"addLast":a.push(l)}return a},UO=(e,t="nearest",n=5)=>{if(!e)return;const r=document.getElementById(e);r?r.scrollIntoView({behavior:"smooth",block:t}):n>0?setTimeout(()=>{UO(e,t,n-1)},300):console.warn(`Element with id - "${e}" not found after multiple retries.`)},qO=o(({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:s,allSelected:d,partialSelected:u=!1,withFixedHeader:f=!0,borderWithRadius:h=!1,headerCheckboxDisabled:p=!1,noDataContent:C,height:m="100%",className:g="",tableHeadClass:v="",tableBodyRowClass:E="",headerTextColor:M,tableDataTextColor:A,draggable:x=!1,onDragEnd:L,loadMore:k=()=>{},editMode:H="",editComponent:S,NlpComponent:_,AddNlp:V,handleDragStart:O,handleViewComponent:z,handleAccordion:N,loading:T,scriptType:D=!1},Z)=>{const j=a(null),[R,B]=c(null),[P,F]=c(null),q=e=>{F(t=>t===e?.stepId?null:e?.stepId)},W=e=>{q(e);const t=z?.(e,q);t?B(()=>t):q(null)},[Q,G]=c(new Map),Y=e=>Q.has(e),X=e=>{Y(e?.stepId)||(P&&q(null),N?.(e)),T||G(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})};l(()=>{const e=document.getElementById("ff-table-scroll-container"),n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return j.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";k(t)}})},{root:e,rootMargin:"8px",threshold:.1}),j.current.observe(n),j.current.observe(r),()=>{j.current?.disconnect()}},[t,k]);const J=(e,t,n)=>{let{onClick:r,accessor:i}=e;r&&Cr(r)&&r(i,t,n)},$=(e,t)=>{s&&s(e,t)};return l(()=>{UO("getInFocus")},[V,P]),Z&&b(Z,()=>({resetStepGroupAccordion:()=>{G(new Map)}})),e(Zo,{collisionDetection:Ci,onDragStart:()=>{O?.(),Q.clear()},onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&L&&L(i,o)},modifiers:[ih],children:e(ha,{disabled:!x,items:t?.map(e=>e.stepId||e._id),strategy:da,children:n("div",{style:{height:m},id:"ff-table-scroll-container",className:I(g,{"pre-fixed-header-table":f,"pre-border-borderRadius":h}),children:[n("table",{className:I("ff-table-pre-post"),cellSpacing:0,children:[e("thead",{className:I({"pre-table-thead":f},v),children:e("tr",{children:r.map((t,r)=>e("th",{className:I(`${i&&`${i}-bg`}`,`${M&&`${M}-color`}`),style:{width:t?.width},children:n(U,{as:"div",fontWeight:"semi-bold",className:"ff-label-checkbox-container",lineHeight:"18px",color:"var(--drawer-title-color)",children:[0===r&&o&&e("span",{className:"ff-table-pre-post-checkbox",children:e(ne,{onChange:e=>{$(e,{allSelected:e.target.checked})},checked:void 0!==d&&d,partial:!!u,disabled:p})}),t.header]})},t.header))})}),n("tbody",{className:"pre-table-tbody",children:[e("tr",{id:"ff-table-first-node"}),FO(t,V??{})?.map((i,a)=>{const l=H===i.stepId;return l||i.isNew?n("tr",{id:"getInFocus",className:"pre-edit-row",children:[l&&w(S)&&e("td",{colSpan:r.length,children:y(S,{rowData:i,rowIndex:a+1})}),i.isNew&&!l&&w(_)&&e("td",{colSpan:r.length,children:y(_,{rowIndex:a,rowData:i})})]},i.stepId||a):e(PO,{row:i,indexNumber:a,columns:r,tableBodyRowClass:E,handleOnclick:J,tableDataTextColor:A,withCheckbox:o,onSelectClick:$,draggable:x,dataLength:t?.length,viewModeId:P,ViewComponent:R,handleClick:W,handleStepGroupExpand:X,isStepGroupExpanded:Y,scriptType:D})}),e("tr",{id:"ff-table-last-node"})]})]}),K(t)&&K(V)&&e("div",{className:"ff-no-data-content",style:{height:`calc(${m} - 50px)`},children:C})]})})})}),WO=g(({data:r=[],level:o=0,columnCount:s=1,viewModeId:c,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:C,columns:m=[],parentIndex:g,updateRowHeight:v})=>{const y=a([]),w=new Set(["group","pre","post","script"]),b=o+8,E=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const o=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...o&&{refId:o}})}return t.accessor||i&&"object"!=typeof i?i:"--"};return l(()=>{if(!v)return;const e=new ResizeObserver(()=>{let e=0;y.current.forEach(t=>{t&&(e+=t.getBoundingClientRect().height)}),e>0&&v(g??0,e)});return y.current.forEach(t=>{t&&e.observe(t)}),()=>e.disconnect()},[r,v,g,p]),e(t,{children:r?.map((t,r)=>{const o=g??0+r+1,a=w.has(t?.entityType?.toLowerCase())||w.has(t?.type?.toLowerCase());return n(i.Fragment,{children:[e("tr",c===t?.stepId?{ref:e=>y.current[r]=e,className:"steps-edit-row",id:"getInFocus",children:e("td",{colSpan:s,children:e("div",{style:{marginLeft:`${b}px`},children:d&&e(d,{})})})}:{ref:e=>y.current[r]=e,children:m.map((r,i)=>{return e("td",{style:{maxWidth:r.width,padding:(o=t?.type,l=t?.entityType,w.has(o?.toLowerCase())||w.has(l?.toLowerCase())?"6px 8px":"7px 8px")},children:n(U,{as:"div",className:"ff-data-checkbox-container",children:[n("div",{className:"ff-data-checkbox-container-content",style:{marginLeft:0===i?`${b}px`:0},onClick:()=>{0===i&&!t?.displayName?.includes("End")&&!t?.isDisabled&&u?.({...t,tableType:f})},children:[!C&&0===i&&e("div",{style:{padding:"4px 18px"}}),E({...t,marginLeft:b},r)]}),0===i&&a&&e("div",{className:"ff-accordion-arrow "+(p?.(t.stepId)?"expanded":""),children:e(F,{name:"arrow_right",color:p?.(t.stepId)?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12,onClick:()=>h?.({...t,tableType:f})})})]})},`${t.stepId}-${i}`);var o,l})}),p?.(t.stepId)&&e(WO,{data:t.data,level:b,columnCount:s,viewModeId:c,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:C,columns:m,parentIndex:o,updateRowHeight:v})]},t.stepId)})})});WO.displayName="StepGroupAccordions";const QO=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:s,tableDataTextColor:c,withCheckbox:d,onSelectClick:u,draggable:f,indexNumber:p=0,tableType:C="",viewModeId:m,ViewComponent:g,handleClick:v,selectedRows:y,handleStepGroupExpand:w,isStepGroupExpanded:b,dataLength:E,stepPartialSelect:M,isViewPrivilegeMode:A,isClientSide:x,updateRowHeight:L,rowId:k,onRowHover:H,onRowHoverOut:S})=>{const _=new Set(["group","pre","post","script"]),V=_.has(r?.entityType?.toLowerCase())||_.has(r?.type?.toLowerCase()),O=a(null),z=h(()=>r?.isDisabled||(E??0)<=1||r.isSpecialNlp,[r,E]),N=(p+1).toString(),{attributes:T,listeners:D,setNodeRef:Z,transform:j,transition:R}=wa({id:r?._id||r?.stepId,disabled:z}),B=h(()=>({transform:Qr.Transform.toString(j),transition:R}),[j,R]),P=r?._id||r?.stepId;l(()=>{if(O.current&&L){const e=O.current.getBoundingClientRect().height;L(p,e)}},[r,L,p,b?.(r?.stepId)]);const q=e=>A||x?V&&0===e?"4px 8px":"7px 8px":0!==e?"Steps"===C?"4px 8px":"7px 8px":"Steps"===C&&f?"4px 8px 4px 0px":"4px 8px 4px 24px";return n(t,{children:[e("tr",{"data-rowid":k,ref:e=>{O.current=e,Z(e)},style:B,className:I(o,"sortable-item",{"disabled-inner-row":z}),id:P,onMouseEnter:()=>{H?.(k||"")},onMouseLeave:()=>{S?.(k||"")},children:i?.map((i,o)=>e(t,{children:e("td",{style:{padding:q(o),maxWidth:i.width},onClick:()=>s(i,r,p),children:n(U,{as:"div",color:c,className:"ff-data-checkbox-container",children:[0===o&&!x&&f&&e("div",{className:z?"ff-table-drag":"ff-table-drag-icon",...D,...T,children:e(F,{name:"drag",className:z?"drag-icon-disabled":"drag-icon"})}),0===o&&!x&&d&&e("span",{className:C&&y[C]?.has(r.stepId)||M?.has(r.stepId)?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(ne,{onChange:e=>u(C,r,e.target.checked),checked:!!y[C]?.has(r.stepId),partial:M?.has(r.stepId),disabled:r?.isSpecialNlp&&r?.name?.includes("End")})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===o?r.marginLeft:0},children:[br(r,i,p,C),V&&0===o&&!x&&e("div",{className:"ff-accordion-arrow "+(b?.(r?.stepId)?"expanded":""),children:e(F,{name:"arrow_right",className:"steps-arrow-svg",color:b?.(r?.stepId)?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>w?.({...r,tableType:C,serialNumber:N})})}),i.extraInfo?.({row:r,indexNumber:p,tableType:C})]})]})},`${i.accessor}-${Qt()}`)}))},P),b?.(r?.stepId)&&e(WO,{data:r.data||r?.stepResults,columnCount:i.length,viewModeId:m,ViewComponent:g,handleClick:v,tableType:C,handleStepGroupExpand:w,isStepGroupExpanded:b,level:r?.marginLeft,isViewPrivilegeMode:A,columns:i,parentIndex:p,updateRowHeight:L})]})});QO.displayName="StepTableMainRow";const GO=({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:s,withFixedHeader:d=!0,borderWithRadius:u=!1,noDataContent:f,height:C="100%",className:m="",tableBodyRowClass:g="",headerTextColor:v,tableDataTextColor:b,draggable:E=!1,onDragEnd:M,loadMore:A=()=>{},editMode:x="",editComponent:L,NlpComponent:k,AddNlp:H,handleDragStart:S,tableType:_,viewModeId:V,ViewComponent:O,handleClick:z,selectedRows:N,handleStepGroupExpand:T,isStepGroupExpanded:D,stepPartialSelect:Z,isViewPrivilegeMode:j,isClientSide:R,highlightKey:B,onHighlightComplete:P,handleRowHover:F,handleRowHoverOut:U})=>{const q=a(null),W=a(null),[Q,G]=c(0),[Y,X]=c(0),[J,$]=c([]),[ee,te]=c(null),ne=50,re=a(0);l(()=>{W.current&&X(W.current.clientHeight);const e=FO(t,H??{});$(t=>{const n=[...t];for(;n.length<e.length;)n.push(ne);return n.length>e.length&&(n.length=e.length),n})},[t,H]),l(()=>{re.current>0&&W.current&&(W.current.scrollTop=re.current,re.current=0)},[J]),l(()=>{if(K(B))if(x)te(x);else if(H&&Object.keys(H).length>0){const e=FO(t,H).find(e=>e.isNew);e&&te(e.stepId||"new-row")}else te(null);else te(B)},[x,H,t,B]),l(()=>{if(ee&&W.current){const e=setTimeout(()=>{const e=W.current?.querySelector(`[data-rowid="${ee}"]`);e&&(e.scrollIntoView({behavior:"smooth",block:"nearest"}),setTimeout(()=>{K(B)||P?.()},300))},100);return()=>clearTimeout(e)}},[ee,J,B,P]);const ie=p(e=>{const t=e.currentTarget.scrollTop;G(t)},[]),oe=p((e,t)=>{$(n=>{const r=[...n];return e<r.length&&r[e]!==t?(r[e]=t,r):n})},[]),ae=h(()=>FO(t,H??{}),[t,H]),le=ae.length,{startIndex:se,paddingTop:ce,paddingBottom:de,visibleRows:ue}=h(()=>{let e=0,t=le-1,n=0,r=0;if(J.length===le&&Y>0){let i=0;for(let t=0;t<le;t++)i<=Q&&(e=t),i+=J[t]??0;i=0;for(let e=0;e<le;e++)if(i+=J[e]??0,i>=Q+Y&&t===le-1){t=e;break}if(e=Math.max(0,e-5),t=Math.min(le-1,t+5),ee){const n=ae.findIndex(e=>e.stepId===ee||e.isNew&&"new-row"===ee);n>=0&&(n<e?e=n:n>t&&(t=n))}n=J.slice(0,e).reduce((e,t)=>e+t,0),r=J.slice(t+1).reduce((e,t)=>e+t,0)}else{if(e=Math.max(0,Math.floor(Q/ne)-5),t=Math.min(le-1,e+Math.ceil(Y/ne)+5),ee){const n=ae.findIndex(e=>e.stepId===ee||e.isNew&&"new-row"===ee);n>=0&&(n<e?e=n:n>t&&(t=n))}n=e*ne,r=(le-t-1)*ne}return{startIndex:e,endIndex:t,paddingTop:n,paddingBottom:r,visibleRows:ae.slice(e,t+1)}},[ae,le,J,Y,Q,5,ee,ne]);l(()=>{const e=W.current,n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return q.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";A(t)}})},{root:e,rootMargin:"8px",threshold:.1}),q.current.observe(n),q.current.observe(r),()=>{q.current?.disconnect()}},[t?.length,A]);const fe=(e,t,n)=>{const{onClick:r,accessor:i}=e;r&&Cr(r)&&r(i,t,n)},he=(e,t,n)=>{s&&s(e,t,n)};return e(Zo,{collisionDetection:Ci,onDragStart:S,onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&M&&M(i,o)},modifiers:[ih],children:e(ha,{disabled:!E,items:t?.map(e=>e._id||e.stepId),strategy:da,children:n("div",{ref:W,style:{height:C,position:"relative",overflowY:C?.includes("vh")?"auto":void 0},id:"ff-table-scroll-container",className:I(m,{"ff-fixed-header-steps-table":d,"steps-border-borderRadius":u}),onScroll:ie,children:[n("table",{className:I("ff-table-steps"),cellSpacing:0,children:[e("thead",{className:"steps-inner-thead",children:e("tr",{children:r?.map(t=>e("th",{className:I(`${i&&`${i}-bg`}`,`${v&&`${v}-color`}`),style:{width:t?.width}},`${t.header}-${Qt()}`))})}),n("tbody",{className:"ff-steps-tbody",children:[e("tr",{id:"ff-table-first-node",style:{display:"none"}}),ce>0&&e("tr",{children:e("td",{style:{height:ce,padding:0},colSpan:r.length})}),ue.map((i,a)=>{const l=se+a,s=x===i.stepId,c=s||i.isNew,d=s&&i.stepId===ee||i.isNew&&"new-row"===ee;return c?n("tr",{className:"steps-edit-row",id:d?"getInFocus":void 0,"data-rowid":i.stepId||"new-row",children:[s&&w(L)&&e("td",{colSpan:r.length,children:y(L,{rowData:i,rowIndex:l+1})}),i.isNew&&!s&&w(k)&&e("td",{colSpan:r.length,children:y(k,{rowIndex:l,rowData:i})})]},i.stepId||l):e(QO,{rowId:i.stepId,row:i,onRowHover:F,onRowHoverOut:U,indexNumber:l,columns:r,tableBodyRowClass:g,handleOnclick:fe,tableDataTextColor:b,withCheckbox:o,onSelectClick:he,draggable:E,tableType:_,viewModeId:V,ViewComponent:O,handleClick:z,selectedRows:N,handleStepGroupExpand:T,isStepGroupExpanded:D,dataLength:t?.length,stepPartialSelect:Z,isViewPrivilegeMode:j,isClientSide:R,updateRowHeight:oe})}),de>0&&e("tr",{children:e("td",{style:{height:de,padding:0},colSpan:r.length})}),e("tr",{id:"ff-table-last-node",style:{display:"none"}})]})]}),t?.length<=0&&e("div",{className:"steps-no-data-content",style:{height:`calc(${C} - 50px)`},children:f})]})})})},KO=e=>["ElseIfCondition","ElseCondition"].includes(e?.nlpName);let YO=null,XO=null;const JO=e=>{if(XO===e&&YO)return YO;const t=((e,t="Steps")=>{const n=e.find(e=>e?.title===t);return n?.data??[]})(e),n=new Map,r=(e,n,r)=>{const i=t,o=i.findIndex(t=>t.stepId===e?.stepId),a=i.findIndex(e=>e.stepId===n?.stepId);return r?i.slice(o+1,a).map(e=>e.stepId):i.slice(o,a+1).map(e=>e.stepId)};return t?.forEach(e=>{const i=(e=>e.specialNlpId??e.conditionSearchKey??null)(e);if(!i)return;const o=n.get(i)||{start:null,end:null,childIds:[],allIds:[]};if(e?.isSpecialNlp&&e.name?.startsWith("Start")){o.start=e;const n=(e=>{const n=(e=>({IfCondition:"EndIfCondition",StartForLoop:"EndForLoop",StartIteration:"EndIteration",ElseIfCondition:"EndElseIfCondition",ElseCondition:"EndElseCondition"}[e.nlpName]||e.nlpName))(e),r=t;if(void 0!==e?.conditionId&&void 0!==e?.conditionSearchKey&&!e.specialNlpId){const t=e.conditionId===e.conditionSearchKey?e.conditionId:e.conditionSearchKey;return r.find(e=>e.conditionSearchKey===t&&e.nlpName===n)||null}return e.specialNlpId&&r.find(t=>t.specialNlpId===e.specialNlpId&&t.nlpName===n)||null})(e);n&&(o.end=n,o.childIds=r(e,n,!0),o.allIds=r(e,n,!1))}n.set(i,o)}),YO=n,XO=e,n},$O=e=>e.includes("/")?e.split("/").slice(0,-1).join("/"):e;const ez=e=>{if(!e)return!1;for(const t of Object.values(e))if(t&&t.size>0)return!0;return!1},tz=e=>{switch(e){case"PASS":return"var(--status-button-text-passed)";case"FAIL":return"var(--status-button-text-failed)";case"SKIP":return"var(--status-button-text-skipped)";case"WARNING":return"var(--status-warning-text-color)";default:return"var(--status-button-text-notExecuted)"}},nz=e=>{switch(e){case"PASS":return"Passed";case"FAIL":return"Failed";case"SKIP":return"Skipped";case"WARNING":return"Warning";default:return e}},rz=e=>{switch(e){case"PASS":return"passed";case"FAIL":return"failed";case"SKIP":return"skipped";case"WARNING":return"warning";case"Running":return"running";case"Partially Executed":return"partially-executed";case"Aborted":return"aborted";case"Terminated":return"terminated";default:return"default"}},iz=({metaData:t,width:r=0,displayIcon:i=!1})=>{const o=t?.total||0,a=[{name:"Passed",count:t?.totalPassed,color:"var(--status-approved-text-color)"},{name:"Failed",count:t?.totalFailed,color:"var(--status-rejected-text-color)"},{name:"Warning",count:t?.totalWarning,color:"var(--status-warning-text-color)"},{name:"Skipped",count:t?.totalSkipped,color:"var(--status-skipped-text-color)"},{name:"Terminated",count:t?.totalTerminated,color:"var(--status-skipped-text-color)"},{name:"Aborted",count:t?.totalAborted,color:"var(--status-skipped-text-color)"}],l=a.filter(e=>e.count>0),s=l.map(({count:e,name:t})=>`${e}/${o} ${t}`).join(" "),c=r?oe(s,r,"pixel"):s,d=a.map(e=>({...e,count:e.count??0})),u=d.reduce((e,{count:t})=>e+t,0),f=d.some(({count:e})=>e>0),p=i?d:a,C=[["Passed","Failed"],["Warning","Skipped"]].map(e=>p.filter(({name:t})=>e.includes(t))),m=(e,t)=>"Skipped"===e?"var(--status-skipped-bg-color)":t,g=h(()=>n("div",{className:"ff-status-tooltip",children:[C.map((t,r)=>e("div",{className:"ff-status-tooltip-row",children:t.map(({name:t,count:r,color:i})=>n("div",{className:"ff-status-item",children:[e("span",{className:"ff-status-dot",style:{backgroundColor:m(t,i)}}),n(U,{as:"span",fontWeight:"medium",fontSize:10,className:"ff-status-result-tooltip-text",color:"var(--tooltip-text-color)",children:[t,": ",r]})]},t))},r)),e("div",{className:"ff-status-tooltip-divider"}),n(U,{as:"span",fontWeight:"medium",fontSize:10,className:"ff-status-tooltip-total",children:["Total Steps - ",u]})]}),[C,u]);if(i)return f?e(Y,{title:g,children:e("span",{className:"ff-status-icon-wrapper",children:e(F,{name:"status_icon"})})}):null;const v=[];let y=0;for(const{count:e,name:t,color:n}of l){const r=`${e}/${o} ${t}`;if(!(y+r.length<=c.length)){const e=c.slice(y).trim();e&&v.push({text:e,color:n});break}v.push({text:r,color:n}),y+=r.length+1}return e("div",{className:"ff-stepResultStats",children:e(Y,{title:s,children:e(U,{as:"div",className:"status-inline-text",fontWeight:"semi-bold",children:v.map(({text:t,color:n},r)=>e(U,{as:"span",fontWeight:"semi-bold",style:{color:n,whiteSpace:"nowrap"},children:t+" "},r))})})})},oz=({isHeaderRequired:r,isViewPrivilegeMode:i,onAccordionClick:o,isBulkEnable:a,showActionCell:l,handleMainCheckbox:s,isAllSelected:c,isPartialSelected:d,tableMeta:u=[],title:f,totalRows:h,expanded:p,actionCell:C,row:m,metaData:g,isClientSide:v,isMaximize:y})=>{const w=u?.map(e=>e.width),b=e=>{const t=w[e]??0;switch(e){case 0:return t+110;case 1:return t+(t>300?60:70);case 2:return t+20;default:return 0}};return n("article",{className:"step-title-article",style:{...!r&&!v&&{backgroundColor:"var(--hover-color)"}},children:[e("div",{style:{width:`${b(0)}px`},children:n("div",{className:"accordion-header",style:{paddingLeft:i||v?"8px":"24px"},children:[!i&&!v&&e(ne,{onChange:e=>s(f,e.target.checked),checked:c(f,h),partial:d(f,h),disabled:0===h}),e("div",{className:"header-title",children:e(U,{as:"div",fontWeight:"semi-bold",color:v?"var(--brand-color)":"var(--nlp-option-color)",cursor:"default",lineHeight:"18px",children:f})}),e("div",v?{style:{padding:"12px"}}:{className:"accordion-arrow "+(p?"expanded":""),onClick:()=>o(f),children:e(F,{name:"arrow_right",color:p?"var(--brand-color)":"var(--default-color)",width:16,height:16,className:"steps-arrow-svg"})}),n("div",{className:"ff_action_container",children:[g&&e(iz,{metaData:g,width:(()=>{const e=m?.marginLeft??0;if((c?.(f,h)||d?.(f,h))&&"Steps"===f)return 200-e;return(y?350:{"Depends on Scripts":240,"Post Conditions":230,"Pre Conditions":260,Steps:310}[f]??250)-e})()}),l&&!a&&e(t,{children:C(m)})]})]})}),g?.message&&e("div",{className:"step-result",style:{width:`${b(1)}px`},children:e(Y,{title:g?.message,placement:"bottom-start",children:e(U,{lineHeight:"18px",as:"div",className:"step-result-text",color:tz(g?.status),children:g?.message})})}),g?.status&&e("div",{className:"step-result",style:{width:`${b(2)}px`},children:e(ur,{label:nz(g?.status),status:rz(g?.status),children:g?.status})})]})},az=new Set(["group","pre","post","script"]),lz=new Set(["EndIfCondition","EndForLoop","EndIteration","EndElseIfCondition","EndElseCondition"]),sz=(e,t)=>{if("All"===t)return!0;switch(t){case"Steps":return"Steps"===e;case"Depends":return"Depends on Scripts"===e;case"PRE":return"Pre Conditions"===e;case"POST":return"Post Conditions"===e}},cz=e=>{if(!e)return null;switch(e){case"IfCondition":return"EndIfCondition";case"StartForLoop":return"EndForLoop";case"StartIteration":return"EndIteration";case"ElseIfCondition":return"EndElseIfCondition";case"ElseCondition":return"EndElseCondition";default:return null}},dz=e=>{switch(e){case"IfCondition":return"if";case"ElseIfCondition":return"elseif";case"ElseCondition":return"else";case"StartForLoop":return"for";case"StartIteration":return"iteration";default:return null}},uz=e=>Boolean(e?.isSpecialNlp&&lz.has(String(e?.nlpName??""))),fz=e=>{if((e=>Boolean(e?.isSpecialNlp&&dz(e?.nlpName)))(e))return"special-start";if(uz(e))return"special-end";if((e=>{const t=String(e?.type??"").toLowerCase(),n=String(e?.entityType??"").toLowerCase();return az.has(t)||az.has(n)})(e)){const t=String(e?.type??e?.entityType??"").toLowerCase();return"script"===t?"script":"pre"===t?"pre":"post"===t?"post":"group"}return"leaf"},hz=(e,t,n)=>Boolean(n&&"steps"===t&&!e?.isDisabled&&!e?.isSpecialNlp),pz=e=>{const t=e?.conditionSearchKey;return"string"==typeof t&&t.length>0?t.split("/")[0]??t:e?.conditionId??e?.specialNlpId??null},Cz=e=>`block:${e}`;function mz(e,t,n,r,i){const o=r?.specialNlpId??r?.conditionSearchKey??null;if(!o)return null;for(let r=n+1;r<e.length;r+=1){const n=e[r];if(!n)continue;const a=t.get(n);if(!a)continue;if((a.raw?.specialNlpId??a.raw?.conditionSearchKey??null)===o&&a.raw?.nlpName===i)return{rowId:n,index:r}}return null}function gz(e,t){const n=function(e){return e.map(e=>({id:`${e.accessor}:${e.header}`,header:e.header,accessor:e.accessor,width:Number(e.width??240),className:e.className,renderCell:e.cell,renderExtraInfo:e.extraInfo}))}(e.tableMeta),r=[],i=new Map,o=[],a=new Map,l=new Map,s=new Map,c=new Map;let d=0;e.tableData.forEach((t,n)=>{const u=String(t?.title??`Section ${n+1}`),f=(e=>`section:${e.toLowerCase().replace(/\s+/g,"-")}`)(u),h=(e=>{switch(e){case"Steps":return"steps";case"Depends on Scripts":return"depends";case"Pre Conditions":return"pre";case"Post Conditions":return"post";default:return"custom"}})(u),p=[],C=[];r.push(f),s.set(f,n);const m=(t,n,r)=>{const i=String(t?.stepId??t?._id??`${u}:${o.length}`),s=(p=t,Array.isArray(p?.data)?p.data:Array.isArray(p?.stepResults)?p.stepResults:[]);var p;const g=fz(t),v=null==n&&((e,t)=>!t&&!uz(e))(t,e.isViewPrivilegeMode),y=v?d:null;null!=y&&(c.set(y,i),C.push(y),d+=1),o.push(i),l.set(i,o.length-1);const w={id:i,sectionId:f,parentId:n,childIds:[],depth:r,kind:g,name:String(t?.name??t?.displayName??"--"),displayName:t?.displayName,message:t?.message,status:t?.status,marginLeft:Number(t?.marginLeft??8*r),raw:t,isDisabled:Boolean(t?.isDisabled),isDraggable:null==n&&hz(t,h,e.isDraggable),isSelectable:v,isExpandable:s.length>0||"group"===g||"script"===g,hasAsyncChildren:0===s.length&&("group"===g||"script"===g),childrenLoaded:s.length>0,detailCapable:Boolean(t?.stepId),selectableOrdinal:y,subtreeSelectableStart:y,subtreeSelectableEnd:y,blockId:null,ancestorBlockIds:[],contentVersion:vz(t,s.length)};a.set(i,w);const b=s.map(e=>m(e,i,r+1)),E=a.get(i);if(!E)return i;const M=[E.selectableOrdinal,...b.flatMap(e=>{const t=a.get(e);return t?[t.subtreeSelectableStart,t.subtreeSelectableEnd]:[]})].filter(e=>null!=e);return a.set(i,{...E,childIds:b,isExpandable:E.isExpandable||b.length>0,hasAsyncChildren:E.hasAsyncChildren&&0===b.length,childrenLoaded:b.length>0,subtreeSelectableStart:M.length>0?Math.min(...M):null,subtreeSelectableEnd:M.length>0?Math.max(...M):null}),i};(Array.isArray(t?.data)?t.data:[]).forEach(e=>{const t=m(e,null,0);p.push(t)}),i.set(f,{id:f,title:u,kind:h,rowIds:p,selectableOrdinalStart:C.length>0?C[0]??0:0,selectableOrdinalEnd:C.length>0?C[C.length-1]??-1:-1,selectableCount:C.length,metaData:t?.metaData,actionCell:t?.actionCell??null,isDefaultExpanded:sz(u,e.defaultExpanded)})});const u=function(e,t){const n=new Map,r=new Map,i=new Map,o=new Map,a=new Map,l=[];e.forEach((e,t)=>{a.set(e,t),o.set(e,{blockId:null,ancestorBlockIds:[]})});for(let o=0;o<e.length;o+=1){const a=e[o];if(!a)continue;const s=t.get(a);if(!s||"special-start"!==s.kind)continue;const c=dz(s.raw?.nlpName),d=cz(s.raw?.nlpName);if(!c||!d)continue;const u=mz(e,t,o,s.raw,d);if(!u)continue;const f=t.get(u.rowId);if(!f)continue;const h=[];for(let n=o+1;n<u.index;n+=1){const r=e[n];if(!r)continue;const i=t.get(r);null!=i?.selectableOrdinal&&h.push(i.selectableOrdinal)}const p=Cz(s.id),C=s.sectionId;n.set(p,{id:p,kind:c,startRowId:s.id,endRowId:f.id,sectionId:C,parentBlockId:null,familyId:pz(s.raw),childRowIds:e.slice(o+1,u.index),allRowIds:e.slice(o,u.index+1),selectableStartOrdinal:h.length>0?h[0]??0:0,selectableEndOrdinal:h.length>0?h[h.length-1]??-1:-1,selectableLeafCount:h.length,startDepth:s.depth}),r.set(s.id,p),i.set(f.id,p),l.push({id:p,startIndex:o,endIndex:u.index})}const s=[...l].sort((e,t)=>{const n=e.endIndex-e.startIndex;return t.endIndex-t.startIndex-n});for(const t of s)for(let n=t.startIndex;n<=t.endIndex;n+=1){const r=e[n];if(!r)continue;const i=o.get(r);i&&(i.ancestorBlockIds=[...i.ancestorBlockIds,t.id],o.set(r,i))}for(const e of l){let t=null,r=Number.POSITIVE_INFINITY;for(const n of l)if(n.id!==e.id&&n.startIndex<=e.startIndex&&n.endIndex>=e.endIndex){const e=n.endIndex-n.startIndex;e<r&&(r=e,t=n.id)}const i=n.get(e.id);i&&n.set(e.id,{...i,parentBlockId:t})}for(const t of e){const e=o.get(t),n=e?.ancestorBlockIds??[],a=r.get(t)??i.get(t)??n[n.length-1]??null;o.set(t,{blockId:a,ancestorBlockIds:n})}return{blocksById:n,blockIdByStartRowId:r,blockIdByEndRowId:i,rowBlockMeta:o}}(o,a);return u.rowBlockMeta.forEach((e,t)=>{const n=a.get(t);n&&a.set(t,{...n,blockId:e.blockId,ancestorBlockIds:e.ancestorBlockIds})}),{version:(t?.version??0)+1,columns:n,sectionIds:r,sectionsById:i,rowIds:o,rowsById:a,blocksById:u.blocksById,rowIndexById:l,sectionIndexById:s,rowIdBySelectableOrdinal:c,blockIdByStartRowId:u.blockIdByStartRowId,blockIdByEndRowId:u.blockIdByEndRowId}}function vz(e,t){const n=[e?.stepId??e?._id??"",e?.name??"",e?.displayName??"",e?.message??"",e?.status??"",e?.marginLeft??0,e?.isDisabled?"1":"0",t].join("|");let r=0;for(let e=0;e<n.length;e+=1)r=31*r+n.charCodeAt(e)|0;return Math.abs(r)}class yz{intervals;selectedTotal;constructor(){this.intervals=[],this.selectedTotal=0}clone(){const e=new yz;return e.intervals=this.intervals.map(e=>({...e})),e.selectedTotal=this.selectedTotal,e}has(e){const t=this.findInsertIndex(e),n=this.intervals[t-1];return Boolean(n&&n.start<=e&&n.end>=e)}addPoint(e){this.addRange(e,e)}removePoint(e){this.removeRange(e,e)}addRange(e,t){if(t<e)return;let n=e,r=t;const i=[];let o=!1;for(const e of this.intervals)e.end+1<n?i.push(e):r+1<e.start?(o||(i.push({start:n,end:r}),o=!0),i.push(e)):(n=Math.min(n,e.start),r=Math.max(r,e.end));o||i.push({start:n,end:r}),this.replaceIntervals(i)}removeRange(e,t){if(t<e)return;const n=[];for(const r of this.intervals)r.end<e||r.start>t?n.push(r):(r.start<e&&n.push({start:r.start,end:e-1}),r.end>t&&n.push({start:t+1,end:r.end}));this.replaceIntervals(n)}clear(){this.intervals=[],this.selectedTotal=0}fill(e,t){this.intervals=e<=t?[{start:e,end:t}]:[],this.selectedTotal=e<=t?t-e+1:0}countInRange(e,t){if(t<e)return 0;let n=0;for(const r of this.intervals){if(r.end<e)continue;if(r.start>t)break;const i=Math.max(r.start,e),o=Math.min(r.end,t);n+=Math.max(0,o-i+1)}return n}selectedCount(){return this.selectedTotal}iterateRanges(e){for(const t of this.intervals)e(t.start,t.end)}findInsertIndex(e){let t=0,n=this.intervals.length;for(;t<n;){const r=Math.floor((t+n)/2),i=this.intervals[r];!i||i.start>e?n=r:t=r+1}return t}replaceIntervals(e){this.intervals=e,this.selectedTotal=e.reduce((e,t)=>e+(t.end-t.start+1),0)}}function wz(e){const t=new Map;return e.sectionIds.forEach(e=>{t.set(e,new yz)}),t}function bz(e){const t=new Map;return e.forEach((e,n)=>{t.set(n,e.clone())}),t}function Ez(e,t,n,r){const i=bz(t),o=e.sectionsById.get(n),a=i.get(n);return o&&a?(r&&o.selectableCount>0?a.fill(o.selectableOrdinalStart,o.selectableOrdinalEnd):a.clear(),i):i}function Mz(e,t,n,r){const i=e.rowsById.get(n);if(!i)return t;const o=bz(t),a=o.get(i.sectionId);if(!a)return o;const l=Lz(e,t,n),s=r??!l.selected,c=Hz(e,i);if(c){const t=Sz(e,c);if(0===t.length)return o;const n=t[0]??0,r=t[t.length-1]??-1;return s?a.addRange(n,r):(a.removeRange(n,r),"if"===c.kind&&c.familyId&&e.blocksById.forEach(t=>{if(t.id===c.id||t.sectionId!==c.sectionId||t.familyId!==c.familyId)return;const n=Sz(e,t);0!==n.length&&a.removeRange(n[0]??0,n[n.length-1]??-1)})),o}return null==i.selectableOrdinal||(s?a.addPoint(i.selectableOrdinal):a.removePoint(i.selectableOrdinal)),o}function Az(e,t,n){return Mz(e,t,n,!1)}function xz(e,t,n){return Lz(e,t,n).selected}function Lz(e,t,n,r=kz()){const i=r.rowStates.get(n);if(i)return i;const o=e.rowsById.get(n);if(!o){const e={selected:!1,partial:!1};return r.rowStates.set(n,e),e}const a=Hz(e,o);if(a){const i=function(e,t,n,r){const i=r.blockStates.get(n.id);if(i)return i;const o={selected:!1,partial:!1};if(0===n.childRowIds.length)return r.blockStates.set(n.id,o),o;let a=0,l=0;return n.childRowIds.forEach(n=>{const i=Lz(e,t,n,r);i.selected?a+=1:i.partial&&(l+=1)}),o.selected=a===n.childRowIds.length,o.partial=!o.selected&&(a>0||l>0),r.blockStates.set(n.id,o),o}(e,t,a,r);return r.rowStates.set(n,i),i}const l=t.get(o.sectionId),s={selected:null!=o.selectableOrdinal&&(l?.has(o.selectableOrdinal)??!1),partial:!1};return r.rowStates.set(n,s),s}function kz(){return{blockStates:new Map,rowStates:new Map}}function Hz(e,t){if("special-start"!==t.kind&&"special-end"!==t.kind)return null;const n=e.blockIdByStartRowId.get(t.id)??e.blockIdByEndRowId.get(t.id)??t.blockId;return n?e.blocksById.get(n)??null:null}function Sz(e,t){const n=[];return t.allRowIds.forEach(t=>{const r=e.rowsById.get(t);null!=r?.selectableOrdinal&&n.push(r.selectableOrdinal)}),n}function _z(e,t){return{snapshot:gz({tableMeta:e.tableMeta,tableData:e.tableData,defaultExpanded:e.defaultExpanded??"Steps",isDraggable:e.isDraggable??!0,isViewPrivilegeMode:e.isViewPrivilegeMode??!1},t)}}function Vz(e){const t={};e.snapshot.sectionIds.forEach(n=>{const r=e.snapshot.sectionsById.get(n);if(!r)return;const i=new Set;r.rowIds.forEach(t=>{xz(e.snapshot,e.selection.bySectionId,t)&&i.add(t)}),t[r.title]=i});const n=function(e,t){const n=new Set,r=kz();return e.rowIds.forEach(i=>{e.rowsById.get(i)&&Lz(e,t,i,r).partial&&n.add(i)}),n}(e.snapshot,e.selection.bySectionId);return n.size>0&&(t.partialSelected=n),t}class Oz{chunks;chunkSize;idToIndex;constructor(e=[],t=128){this.chunkSize=t,this.chunks=[],this.idToIndex=new Map,this.reset(e)}static fromArray(e){return new Oz(e)}get length(){let e=0;for(const t of this.chunks)e+=t.length;return e}toArray(){return this.chunks.flat()}get(e){const{chunkIndex:t,offset:n}=this.findChunk(e),r=this.chunks[t];if(!r)throw new RangeError(`Chunk not found for index ${e}`);const i=r[n];if(!i)throw new RangeError(`Item not found for index ${e}`);return i}range(e,t){if(e<0||t<e)throw new RangeError(`Invalid range ${e}..${t}`);if(t===e)return[];const n=[];let r=0;for(const i of this.chunks){const o=r,a=o+i.length;if(a<=e){r=a;continue}if(o>=t)break;const l=Math.max(0,e-o),s=Math.min(i.length,t-o);s>l&&n.push(...i.slice(l,s)),r=a}return n}indexOfId(e){return this.idToIndex.get(e)??-1}insertMany(e,t){if(0===t.length)return;if(e<0||e>this.length)throw new RangeError(`Invalid insert index ${e}`);if(0===this.chunks.length)return void this.reset(t);const{chunkIndex:n,offset:r}=this.findChunk(e,!0),i=this.cloneChunks(),o=i[n]??[];o.splice(r,0,...t),i[n]=o,this.chunks=this.rebalance(i),this.rebuildIndex()}removeMany(e,t){if(t<=0)return[];if(e<0||e+t>this.length)throw new RangeError(`Invalid remove range ${e}..${e+t}`);const n=this.toArray().slice(e,e+t),r=this.toArray();return r.splice(e,t),this.reset(r),n}replaceRange(e,t,n){this.removeMany(e,t),this.insertMany(e,n)}forEachRange(e,t,n){this.range(e,t).forEach((t,r)=>n(t,e+r))}reset(e){this.chunks=[];for(let t=0;t<e.length;t+=this.chunkSize)this.chunks.push(e.slice(t,t+this.chunkSize));this.rebuildIndex()}cloneChunks(){return this.chunks.map(e=>[...e])}rebalance(e){const t=[];for(const n of e)if(0!==n.length)if(n.length>192)for(let e=0;e<n.length;e+=this.chunkSize)t.push(n.slice(e,e+this.chunkSize));else t.push(n);if(t.length<=1)return t;const n=[];for(const e of t){const t=n[n.length-1];t&&t.length+e.length<=this.chunkSize?t.push(...e):t&&t.length<48?t.push(...e):n.push([...e])}return n}rebuildIndex(){this.idToIndex.clear();let e=0;for(const t of this.chunks)for(const n of t)this.idToIndex.set(n.id,e),e+=1}findChunk(e,t=!1){if(e===this.length&&t){const e=Math.max(0,this.chunks.length-1),t=this.chunks[e];return{chunkIndex:e,offset:t?.length??0}}let n=0;for(let t=0;t<this.chunks.length;t+=1){const r=this.chunks[t];if(!r)continue;const i=n+r.length;if(e<i)return{chunkIndex:t,offset:e-n};n=i}throw new RangeError(`Index ${e} is out of bounds`)}}function zz(e,t,n,r){const i=t.rowsById.get(r);if(!i)return;const o=n.editor.active&&n.editor.anchorRowId===i.id&&("edit"===n.editor.mode||"replace"===n.editor.mode);if(o){const t="edit"===n.editor.mode?"edit":"replace";e.push({kind:"editor",id:`visible:editor:${t}:${i.id}`,anchorRowId:i.id,sectionId:i.sectionId,mode:t,estimateHeight:72,contentVersion:i.contentVersion})}else e.push({kind:"row",id:`visible:row:${i.id}`,rowId:i.id,sectionId:i.sectionId,depth:i.depth,estimateHeight:32,contentVersion:i.contentVersion});if(o||n.activeDetailRowId!==i.id||e.push({kind:"detail",id:`visible:detail:${i.id}`,rowId:i.id,sectionId:i.sectionId,estimateHeight:96,contentVersion:i.contentVersion}),n.editor.active&&n.editor.anchorRowId===i.id&&"add-below"===n.editor.mode&&e.push({kind:"editor",id:`visible:editor:${n.editor.mode}:${i.id}`,anchorRowId:i.id,sectionId:i.sectionId,mode:n.editor.mode,estimateHeight:72,contentVersion:i.contentVersion}),n.expandedGroupIds.has(i.id)){n.loadingRowIds.has(i.id)&&e.push({kind:"loading",id:`visible:loading:${i.id}`,parentRowId:i.id,sectionId:i.sectionId,estimateHeight:48,contentVersion:i.contentVersion});for(const r of i.childIds)zz(e,t,n,r)}}class Iz{heights;tree;nodeIds;constructor(e=[],t=[]){this.heights=[...e],this.tree=[],this.nodeIds=[...t],this.rebuildTree()}static fromHeights(e,t){return new Iz(e,t)}get length(){return this.heights.length}totalHeight(){return this.prefixSum(this.heights.length)}getHeight(e){return this.heights[e]??0}prefixSum(e){let t=0,n=Math.min(e,this.tree.length-1);for(;n>0;)t+=this.tree[n]??0,n-=n&-n;return t}lowerBound(e){if(0===this.heights.length)return 0;if(e<=0)return 0;const t=Math.min(e,this.totalHeight());let n=0,r=0,i=1<<Math.floor(Math.log2(Math.max(1,this.tree.length-1)));for(;i>0;){const e=n+i;if(e<this.tree.length){const i=r+(this.tree[e]??0);i<t&&(n=e,r=i)}i>>=1}return Math.min(n,this.heights.length-1)}upperBound(e){if(0===this.heights.length)return-1;if(e<=0)return 0;const t=Math.min(e,this.totalHeight());return this.lowerBound(t)}insertMany(e,t,n){this.heights.splice(e,0,...t),this.nodeIds.splice(e,0,...n),this.rebuildTree()}removeMany(e,t){this.heights.splice(e,t),this.nodeIds.splice(e,t),this.rebuildTree()}update(e,t){const n=this.heights[e]??0;if(n===t)return 0;this.heights[e]=t;const r=t-n;let i=e+1;for(;i<this.tree.length;)this.tree[i]=(this.tree[i]??0)+r,i+=i&-i;return r}batchUpdate(e){let t=0;for(const n of e)t+=this.update(n.index,n.nextHeight);return t}getNodeId(e){return this.nodeIds[e]??null}rebuildTree(){this.tree=new Array(this.heights.length+1).fill(0);for(let e=0;e<this.heights.length;e+=1){let t=e+1;const n=this.heights[e]??0;for(;t<this.tree.length;)this.tree[t]=(this.tree[t]??0)+n,t+=t&-t}}}function Nz(e,t){if(e<=0)return 600;return function(e,t,n){return Math.min(n,Math.max(t,e))}(.75*e+120*Math.abs(t),600,3200)}function Tz(e){let t=function(e){const t=new Set;e.sectionIds.forEach(n=>{const r=e.sectionsById.get(n);r?.isDefaultExpanded&&t.add(n)});const n={snapshot:e,expansion:{expandedSectionIds:t,expandedGroupIds:new Set},selection:{bySectionId:wz(e),version:0},detail:{activeRowId:null,version:0},editor:jz({active:!1,mode:"none",anchorRowId:null,sectionId:null,sourceIndex:null,version:0}),hover:{rowId:null},drag:{activeRowId:null,overRowId:null},async:{loadingRowIds:new Set,requestVersionByRowId:new Map,lastAppliedSnapshotVersion:e.version},visible:{seq:Oz.fromArray([]),version:0},viewport:{scrollTop:0,viewportHeight:0,viewportWidth:0,velocityPxPerMs:0,overscanPx:800,isScrolling:!1,range:{startIndex:0,endIndex:-1,overscanStartIndex:0,overscanEndIndex:-1,topOffsetPx:0,bottomOffsetPx:0},anchorNodeId:null,anchorOffsetPx:0,lastScrollTs:0},heights:{index:new Iz,widthBucket:0,measuredByNodeId:new Map,version:0}};return Dz(n)}(e);const n=new Set,r=(e,r={})=>{const i=e(t);i!==t&&(t=i,r.rebuildVisible?t=Dz(t):r.recomputeRange&&(t=Zz(t)),n.forEach(e=>e()))};return{getState:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),actions:{setSnapshot(e){r(t=>{const n=new Set([...t.expansion.expandedSectionIds].filter(t=>e.sectionsById.has(t)));0===n.size&&e.sectionIds.forEach(t=>{const r=e.sectionsById.get(t);r?.isDefaultExpanded&&n.add(t)});const r=new Set([...t.expansion.expandedGroupIds].filter(t=>{const n=e.rowsById.get(t);return Boolean(n?.isExpandable)})),i=function(e,t,n){const r=wz(t);return n.forEach(n=>{n.iterateRanges((n,i)=>{for(let o=n;o<=i;o+=1){const n=e.rowIdBySelectableOrdinal.get(o);if(!n)continue;const i=t.rowsById.get(n);null!=i?.selectableOrdinal&&r.get(i.sectionId)?.addPoint(i.selectableOrdinal)}})}),r}(t.snapshot,e,t.selection.bySectionId),o=new Set([...t.async.loadingRowIds].filter(t=>{const n=e.rowsById.get(t);return Boolean(n?.hasAsyncChildren&&!n.childrenLoaded)}));return{...t,snapshot:e,expansion:{expandedSectionIds:n,expandedGroupIds:r},selection:{bySectionId:i,version:t.selection.version+1},detail:{activeRowId:t.detail.activeRowId&&e.rowsById.has(t.detail.activeRowId)?t.detail.activeRowId:null,version:t.detail.version+1},editor:jz({...t.editor,anchorRowId:t.editor.anchorRowId&&e.rowsById.has(t.editor.anchorRowId)?t.editor.anchorRowId:null,sectionId:t.editor.sectionId&&e.sectionsById.has(t.editor.sectionId)?t.editor.sectionId:null,version:t.editor.version+1}),async:{...t.async,loadingRowIds:o,lastAppliedSnapshotVersion:e.version}}},{rebuildVisible:!0})},toggleSectionExpansion(e,t="toggle"){r(n=>{const r=new Set(n.expansion.expandedSectionIds);return"open"===t||!r.has(e)?r.add(e):r.delete(e),{...n,expansion:{...n.expansion,expandedSectionIds:r}}},{rebuildVisible:!0})},toggleGroupExpansion(e){r(t=>{const n=new Set(t.expansion.expandedGroupIds);return n.has(e)?n.delete(e):n.add(e),{...t,expansion:{...t.expansion,expandedGroupIds:n}}},{rebuildVisible:!0})},resetSelection(){r(e=>({...e,selection:{bySectionId:wz(e.snapshot),version:e.selection.version+1}}))},resetStepGroupAccordion(){r(e=>({...e,expansion:{...e.expansion,expandedGroupIds:new Set}}),{rebuildVisible:!0})},setHoveredRow(e){r(t=>t.hover.rowId===e?t:{...t,hover:{rowId:e}})},setViewportSize(e,t){r(n=>n.viewport.viewportWidth===e&&n.viewport.viewportHeight===t?n:{...n,viewport:{...n.viewport,viewportWidth:e,viewportHeight:t}},{recomputeRange:!0})},flushScrollFrame(e,t){r(n=>{const r=e-n.viewport.scrollTop,i=t-n.viewport.lastScrollTs,o=i>0?r/i:n.viewport.velocityPxPerMs;return{...n,viewport:{...n.viewport,scrollTop:e,velocityPxPerMs:o,isScrolling:!0,lastScrollTs:t}}},{recomputeRange:!0})},settleScroll(){r(e=>({...e,viewport:{...e.viewport,velocityPxPerMs:0,isScrolling:!1}}),{recomputeRange:!0})},setMeasuredHeights(e){const n=!t.viewport.isScrolling;r(t=>{if(0===e.length)return t;const n=new Map(t.heights.measuredByNodeId),r=[];return e.forEach(e=>{const i=t.visible.seq.indexOfId(e.nodeId);if(-1===i)return;if(t.visible.seq.get(i).contentVersion!==e.contentVersion)return;const o=Math.max(1,Math.ceil(e.nextHeight));t.heights.index.getHeight(i)!==o&&(n.set(e.nodeId,{height:o,contentVersion:e.contentVersion}),r.push({...e,index:i,nextHeight:o}))}),0===r.length?t:(t.heights.index.batchUpdate(r),{...t,heights:{...t.heights,measuredByNodeId:n,version:t.heights.version+1}})},{recomputeRange:n})},toggleRowSelection(e,t){r(n=>({...n,selection:{bySectionId:Mz(n.snapshot,n.selection.bySectionId,e,t),version:n.selection.version+1}}))},toggleSectionSelection(e,t){r(n=>({...n,selection:{bySectionId:Ez(n.snapshot,n.selection.bySectionId,e,t),version:n.selection.version+1}}))},removeRowSelection(e){r(t=>({...t,selection:{bySectionId:Az(t.snapshot,t.selection.bySectionId,e),version:t.selection.version+1}}))},setDetailRow(e){r(t=>t.detail.activeRowId===e?t:{...t,detail:{activeRowId:e,version:t.detail.version+1}},{rebuildVisible:!0})},setEditorState(e){r(t=>{const n=jz({...t.editor,...e,version:t.editor.version+1});return r=t.editor,i=n,r.active===i.active&&r.mode===i.mode&&r.anchorRowId===i.anchorRowId&&r.sectionId===i.sectionId&&r.sourceIndex===i.sourceIndex&&r.nlpName===i.nlpName?t:{...t,editor:n};var r,i},{rebuildVisible:!0})},setLoadingRow(e,t){r(n=>{const r=new Set(n.async.loadingRowIds);return t?r.add(e):r.delete(e),{...n,async:{...n.async,loadingRowIds:r}}},{rebuildVisible:!0})},setDragState(e,t=null){r(n=>({...n,drag:{activeRowId:e,overRowId:t}}))},clearDrag(){r(e=>({...e,drag:{activeRowId:null,overRowId:null}}))}}}}function Dz(e){const t={expandedSectionIds:e.expansion.expandedSectionIds,expandedGroupIds:e.expansion.expandedGroupIds,activeDetailRowId:e.detail.activeRowId,editor:e.editor,loadingRowIds:e.async.loadingRowIds},n=function(e,t){const n=[];for(const r of e.sectionIds){const i=e.sectionsById.get(r);if(i&&(n.push({kind:"section",id:`visible:section:${r}`,sectionId:r,estimateHeight:40,contentVersion:e.version}),t.expandedSectionIds.has(r))){0===i.rowIds.length&&n.push({kind:"empty",id:`visible:empty:${r}`,sectionId:r,estimateHeight:88,contentVersion:e.version});for(const r of i.rowIds)zz(n,e,t,r);t.editor.active&&"add-last"===t.editor.mode&&t.editor.sectionId===r&&n.push({kind:"editor",id:`visible:editor:add-last:${r}`,anchorRowId:null,sectionId:r,mode:"add-last",estimateHeight:72,contentVersion:e.version})}}return Oz.fromArray(n)}(e.snapshot,t),r=n.toArray(),i=new Set(r.map(e=>e.id)),o=new Map,a=r.map(t=>{const n=e.heights.measuredByNodeId.get(t.id);return n&&n.contentVersion===t.contentVersion?(o.set(t.id,n),n.height):t.estimateHeight}),l=Iz.fromHeights(a,r.map(e=>e.id)),s=new Map;return o.forEach((e,t)=>{i.has(t)&&s.set(t,e)}),Zz({...e,visible:{seq:n,version:e.visible.version+1},heights:{...e.heights,index:l,measuredByNodeId:s}})}function Zz(e){const t=Nz(e.viewport.viewportHeight,e.viewport.velocityPxPerMs),n=function(e,t,n,r){if(0===e.length)return{startIndex:0,endIndex:-1,overscanStartIndex:0,overscanEndIndex:-1,topOffsetPx:0,bottomOffsetPx:0};if(n<=0){const t=Math.min(e.length-1,23);return{startIndex:0,endIndex:t,overscanStartIndex:0,overscanEndIndex:t,topOffsetPx:0,bottomOffsetPx:e.totalHeight()-e.prefixSum(t+1)}}const i=Math.max(0,t),o=i+n,a=Math.max(0,i-r),l=o+r,s=e.lowerBound(i),c=e.upperBound(o),d=e.lowerBound(a),u=e.upperBound(l);return{startIndex:s,endIndex:c,overscanStartIndex:d,overscanEndIndex:u,topOffsetPx:e.prefixSum(d),bottomOffsetPx:e.totalHeight()-e.prefixSum(u+1)}}(e.heights.index,e.viewport.scrollTop,e.viewport.viewportHeight,t),r=n.startIndex<=n.endIndex?e.heights.index.getNodeId(n.startIndex):null,i=n.startIndex<=n.endIndex?e.viewport.scrollTop-e.heights.index.prefixSum(n.startIndex):0;return{...e,viewport:{...e.viewport,overscanPx:t,range:n,anchorNodeId:r,anchorOffsetPx:i}}}function jz(e){return e.active&&"none"!==e.mode?{active:!0,mode:e.mode,anchorRowId:e.anchorRowId??null,sectionId:e.sectionId??null,sourceIndex:e.sourceIndex??null,nlpName:e.nlpName,version:e.version}:{active:!1,mode:"none",anchorRowId:null,sectionId:null,sourceIndex:null,nlpName:void 0,version:e.version}}const Rz=i.memo(i.forwardRef((t,r)=>{const i=h(()=>_z(t),[]),o=a(Tz(i.snapshot)),s=a(i.snapshot),c=a(t.onSelectClick),d=a(null),f=a(null),C=a(null),m=a(0),g=a(null),v=a(new Map),y=a([]),w=h(()=>_z(t,s.current),[t.defaultExpanded,t.isDraggable,t.isViewPrivilegeMode,t.tableData,t.tableMeta]);l(()=>{(function(e,t){if(e===t)return!0;if(e.columns.length!==t.columns.length)return!1;for(let n=0;n<e.columns.length;n+=1){const r=e.columns[n],i=t.columns[n];if(!r||!i)return!1;if(r.id!==i.id||r.header!==i.header||r.accessor!==i.accessor||r.width!==i.width||r.className!==i.className||Boolean(r.renderCell)!==Boolean(i.renderCell)||Boolean(r.renderExtraInfo)!==Boolean(i.renderExtraInfo))return!1}if(!Gz(e.sectionIds,t.sectionIds))return!1;if(e.sectionsById.size!==t.sectionsById.size)return!1;for(let n=0;n<e.sectionIds.length;n+=1){const r=e.sectionIds[n];if(!r)return!1;const i=e.sectionsById.get(r),o=t.sectionsById.get(r);if(!i||!o)return!1;if(i.title!==o.title||i.kind!==o.kind||i.selectableOrdinalStart!==o.selectableOrdinalStart||i.selectableOrdinalEnd!==o.selectableOrdinalEnd||i.selectableCount!==o.selectableCount||i.metaData!==o.metaData||i.actionCell!==o.actionCell||i.isDefaultExpanded!==o.isDefaultExpanded||!Gz(i.rowIds,o.rowIds))return!1}if(!Gz(e.rowIds,t.rowIds))return!1;if(e.rowsById.size!==t.rowsById.size||e.blocksById.size!==t.blocksById.size)return!1;for(let n=0;n<e.rowIds.length;n+=1){const r=e.rowIds[n];if(!r)return!1;const i=e.rowsById.get(r),o=t.rowsById.get(r);if(!i||!o)return!1;if(i.sectionId!==o.sectionId||i.parentId!==o.parentId||i.depth!==o.depth||i.kind!==o.kind||i.name!==o.name||i.displayName!==o.displayName||i.message!==o.message||i.status!==o.status||i.marginLeft!==o.marginLeft||i.raw!==o.raw||i.isDisabled!==o.isDisabled||i.isDraggable!==o.isDraggable||i.isSelectable!==o.isSelectable||i.isExpandable!==o.isExpandable||i.hasAsyncChildren!==o.hasAsyncChildren||i.childrenLoaded!==o.childrenLoaded||i.detailCapable!==o.detailCapable||i.selectableOrdinal!==o.selectableOrdinal||i.subtreeSelectableStart!==o.subtreeSelectableStart||i.subtreeSelectableEnd!==o.subtreeSelectableEnd||i.blockId!==o.blockId||i.contentVersion!==o.contentVersion||!Gz(i.childIds,o.childIds)||!Gz(i.ancestorBlockIds,o.ancestorBlockIds))return!1}for(const[n,r]of e.blocksById.entries()){const e=t.blocksById.get(n);if(!e)return!1;if(r.kind!==e.kind||r.startRowId!==e.startRowId||r.endRowId!==e.endRowId||r.sectionId!==e.sectionId||r.parentBlockId!==e.parentBlockId||r.familyId!==e.familyId||r.selectableStartOrdinal!==e.selectableStartOrdinal||r.selectableEndOrdinal!==e.selectableEndOrdinal||r.selectableLeafCount!==e.selectableLeafCount||r.startDepth!==e.startDepth||!Gz(r.childRowIds,e.childRowIds)||!Gz(r.allRowIds,e.allRowIds))return!1}return!0})(s.current,w.snapshot)||(s.current=w.snapshot,o.current.actions.setSnapshot(w.snapshot))},[w.snapshot]);const E=M(o.current.subscribe,o.current.getState,o.current.getState),A=h(()=>Vz(E),[E.selection.version,E.snapshot.version]);l(()=>{c.current=t.onSelectClick},[t.onSelectClick]),l(()=>{c.current?.(A)},[A]),l(()=>{const e=function(e,t){const n=Qz(t),r=n?t.sectionsById.get(n):null;if(e.editMode){const n=String(e.editMode),i=t.rowsById.get(n);return{active:Boolean(i),mode:i?"edit":"none",anchorRowId:i?.id??null,sectionId:i?.sectionId??null,sourceIndex:i&&r?r.rowIds.indexOf(i.id):null}}if(!e.AddNlp?.action||!n||!r)return{active:!1,mode:"none"};const i=null!=e.AddNlp.sourceIndex?e.AddNlp.sourceIndex:null,o=null!=i?r.rowIds[i]??null:null;return{active:!0,mode:{addBelow:"add-below",addLast:"add-last",replaceNlp:"replace",EditNlp:"replace"}[e.AddNlp.action]??"none",anchorRowId:o,sectionId:n,sourceIndex:i,nlpName:e.AddNlp.nlpName}}(t,o.current.getState().snapshot);o.current.actions.setEditorState(e),e.active&&o.current.actions.setDetailRow(null),e.active&&"add-last"===e.mode&&e.sectionId&&o.current.actions.toggleSectionExpansion(e.sectionId,"open")},[t.AddNlp,t.editMode,E.snapshot.version]),u(()=>{const e=d.current;if(!e)return;const t=()=>{o.current.actions.setViewportSize(e.clientWidth,e.clientHeight)};t();const n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]),l(()=>{const e=d.current;if(!e)return;const t=e=>{f.current=null,o.current.actions.flushScrollFrame(m.current,e)},n=()=>{m.current=e.scrollTop,null==f.current&&(f.current=requestAnimationFrame(t)),null!=C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{o.current.actions.settleScroll()},120)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n),null!=f.current&&cancelAnimationFrame(f.current),null!=C.current&&window.clearTimeout(C.current)}},[]),l(()=>()=>{null!=g.current&&cancelAnimationFrame(g.current)},[]),b(r,()=>({resetSelection:()=>{o.current.actions.resetSelection()},handleUpdateCheckbox:e=>{const t=e?.stepId;t&&o.current.actions.removeRowSelection(t)},deleteRow:e=>{const t=e?.stepId;t&&o.current.actions.removeRowSelection(t)},resetStepGroupAccordion:()=>{o.current.actions.resetStepGroupAccordion()}}),[]);const x=h(()=>E.snapshot.columns.map(e=>`${e.width}px`).join(" "),[E.snapshot.columns]),L=h(()=>{const e=new Map;return t.tableData.forEach(t=>{const n=E.snapshot.sectionIds.find(e=>{const n=E.snapshot.sectionsById.get(e);return n?.title===t?.title});n&&e.set(n,t)}),e},[t.tableData,E.snapshot.sectionIds,E.snapshot.version]),k=h(()=>{const e=new Map;return E.snapshot.sectionIds.forEach(t=>{const n=E.snapshot.sectionsById.get(t);n?.rowIds.forEach((t,n)=>{e.set(t,n)})}),e},[E.snapshot.version]),H=h(()=>{const e=Qz(E.snapshot);if(!e)return[];const t=E.snapshot.sectionsById.get(e);return t?.rowIds.filter(e=>{const t=E.snapshot.rowsById.get(e);return Boolean(t?.isDraggable)})??[]},[E.snapshot.version,t.isDraggable]),S=h(()=>{const e=E.visible.seq.length;if(0===e)return y.current=[],[];const t=e-1,{overscanStartIndex:n,overscanEndIndex:r}=E.viewport.range,i=Math.max(0,Math.min(n,t)),o=Math.max(i,Math.min(r,t)),a=E.visible.seq.range(i,o+1).map((e,t)=>{const n=i+t;return{node:e,index:n,top:E.heights.index.prefixSum(n)}});return 0===a.length&&E.viewport.isScrolling?y.current:(a.length>0&&(y.current=a),a)},[E.visible.version,E.viewport.range.overscanStartIndex,E.viewport.range.overscanEndIndex,E.heights.version,E.viewport.isScrolling]),_=p(()=>{g.current=null;const e=Array.from(v.current.values());v.current.clear(),0!==e.length&&o.current.actions.setMeasuredHeights(e)},[]),V=p(e=>{v.current.set(e.node.id,{index:0,nodeId:e.node.id,nextHeight:e.height,contentVersion:e.node.contentVersion}),null==g.current&&(g.current=requestAnimationFrame(_))},[_]),O=p(e=>{o.current.actions.toggleSectionExpansion(e)},[]),z=p((e,t)=>{o.current.actions.toggleSectionSelection(e,t)},[]),N=p(e=>{const t=o.current.getState().detail.activeRowId;o.current.actions.setDetailRow(t===e?null:e)},[]),T=p(e=>{const n=o.current.getState(),r=n.snapshot.rowsById.get(e);if(!r)return;if(!n.expansion.expandedGroupIds.has(e)&&r.hasAsyncChildren&&!r.childrenLoaded){const i=n.snapshot.sectionsById.get(r.sectionId),a=k.get(e);o.current.actions.setLoadingRow(e,!0),t.handleAccordion?.({...r.raw,tableType:i?.title,serialNumber:null!=a?String(a+1):void 0})}o.current.actions.toggleGroupExpansion(e)},[t.handleAccordion,k]),D=p(e=>{const n=e.active.id;o.current.actions.setDragState(n),t.handleDragStart?.()},[t.handleDragStart]),Z=p(e=>{const n=e.active.id,r=e.over?.id;if(o.current.actions.clearDrag(),!r||n===r)return;const i=Qz(o.current.getState().snapshot);if(!i)return;const a=o.current.getState().snapshot.sectionsById.get(i);if(!a)return;const l=a.rowIds.indexOf(n),s=a.rowIds.indexOf(r);-1!==l&&-1!==s&&t.onDragEnd?.(l,s)},[t.onDragEnd]),j=E.heights.index.totalHeight(),R=E.snapshot.sectionIds.length>0;return n("div",{className:I("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":t.withFixedHeader}),children:[!1!==t.isHeaderRequired&&!t.isClientSide&&e("table",{cellSpacing:0,className:I("ff-accordion-table",{"ff-accordion-fixed-header":t.withFixedHeader}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:E.snapshot.columns.map((n,r)=>e("th",{style:{width:n.width},className:I("ff-table-header",t.headerType&&`ff-accordion-table--${t.headerType}-bg`),children:e(U,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:n.header})},`${n.id}:${r}`))})})}),e(Zo,{collisionDetection:Ci,modifiers:[ih],onDragStart:D,onDragEnd:Z,children:e(ha,{items:H,strategy:da,children:e("div",{ref:d,className:"ff-accordion-table-body",style:{height:t.height??"100%",overflowY:"auto",position:"relative"},children:R?e("div",{style:{height:`${Math.max(j,1)}px`,position:"relative"},children:S.map(({node:n,index:r,top:i})=>e(Pz,{node:n,top:i,onMeasure:V,children:Bz({node:n,index:r,props:t,state:E,store:o.current,gridTemplateColumns:x,selectionPayload:A,sectionSourceById:L,topLevelIndexByRowId:k,onToggleSectionExpansion:O,onToggleSectionSelection:z,onToggleDetailRow:N,onToggleGroup:T})},n.id))}):t.noDataContent??null})})})]})}));function Bz({node:t,index:n,props:r,state:o,store:a,gridTemplateColumns:l,selectionPayload:s,sectionSourceById:c,topLevelIndexByRowId:d,onToggleSectionExpansion:u,onToggleSectionSelection:f,onToggleDetailRow:h,onToggleGroup:p}){switch(t.kind){case"section":{const n=o.snapshot.sectionsById.get(t.sectionId);if(!n)return e(i.Fragment,{});const a=c.get(t.sectionId),l=s[n.title]??new Set,d=n.rowIds.length,h=d>0&&l.size===d,p=l.size>0&&l.size<d,C=l.size>0&&d>0&&Boolean(n.actionCell),m=n.title.includes("Script")&&h;return e("div",{className:"column-table-accordion",children:e(oz,{isViewPrivilegeMode:r.isViewPrivilegeMode,onAccordionClick:()=>u(t.sectionId),showActionCell:C,handleMainCheckbox:(e,r)=>{e===n.title&&f(t.sectionId,r)},isAllSelected:()=>h,isPartialSelected:()=>p,title:n.title,totalRows:d,expanded:o.expansion.expandedSectionIds.has(t.sectionId),metaData:n.metaData,actionCell:n.actionCell,row:a??{title:n.title,data:n.rowIds.map(e=>o.snapshot.rowsById.get(e)?.raw)},tableMeta:r.tableMeta,isHeaderRequired:r.isHeaderRequired,isBulkEnable:m,isClientSide:r.isClientSide,isMaximize:r.isMaximize})})}case"row":{const s=o.snapshot.rowsById.get(t.rowId);return s?e(Fz,{row:s,node:t,props:r,state:o,store:a,gridTemplateColumns:l,rowIndex:d.get(s.id)??n,onToggleDetailRow:h,onToggleGroup:p}):e(i.Fragment,{})}case"detail":{const n=o.snapshot.rowsById.get(t.rowId),i=n?r.handleViewComponent?.(n.raw,()=>a.actions.setDetailRow(null)):null;return e("div",{className:"steps-edit-row",style:{padding:"8px 16px"},children:i?e(i,{}):e(U,{as:"div",lineHeight:"18px",children:"Detail unavailable"})})}case"editor":{const i=t.anchorRowId?o.snapshot.rowsById.get(t.anchorRowId):null,a=function(e,t,n){return{...n?.raw??{},stepId:n?.id??"new-row",isNew:!0,name:e.editor.nlpName??n?.name??""}}(o,0,i??null),l=o.editor.sourceIndex??(t.anchorRowId?d.get(t.anchorRowId)??n:n);return e("div",{className:"steps-edit-row",children:"edit"===t.mode&&w(r.editComponent)?y(r.editComponent,{rowData:i?.raw??a,rowIndex:l+1}):w(r.NlpComponent)?y(r.NlpComponent,{rowData:a,rowIndex:l}):e(U,{as:"div",lineHeight:"18px",children:"Editor unavailable"})})}case"loading":return e("div",{className:"steps-edit-row",style:{padding:"8px 16px"},children:e(U,{as:"div",lineHeight:"18px",children:"Loading..."})});case"empty":return e("div",{className:"steps-no-data-content",children:r.noDataContent??e(U,{as:"div",lineHeight:"18px",children:"No data available"})})}}function Pz({node:t,top:n,onMeasure:r,children:i}){const o=a(null);return u(()=>{const e=o.current;if(!e)return;const n=requestAnimationFrame(()=>{r({node:t,height:e.getBoundingClientRect().height})});return()=>{cancelAnimationFrame(n)}},[t.id,t.contentVersion,r]),e("div",{ref:o,"data-nodeid":t.id,style:{position:"absolute",top:n,left:0,right:0},children:i})}function Fz({row:t,props:n,state:r,store:i,gridTemplateColumns:o,rowIndex:a,onToggleDetailRow:l,onToggleGroup:s}){const c=Boolean(!1!==n.isDraggable&&!n.isClientSide&&null==t.parentId&&t.isDraggable&&!t.isDisabled);return e(c?Uz:qz,{row:t,props:n,state:r,store:i,gridTemplateColumns:o,rowIndex:a,onToggleDetailRow:l,onToggleGroup:s})}function Uz(t){const{row:n}=t,{attributes:r,listeners:i,setNodeRef:o,transform:a,transition:l}=wa({id:n.id,disabled:!1});return e(Wz,{...t,canDrag:!0,dragBindings:{setNodeRef:o,attributes:r,listeners:i,transform:Qr.Transform.toString(a),transition:l}})}function qz(t){return e(Wz,{...t,canDrag:!1})}function Wz({row:t,props:r,state:i,store:o,gridTemplateColumns:a,rowIndex:l,onToggleDetailRow:s,onToggleGroup:c,canDrag:d,dragBindings:u}){const f=i.snapshot.sectionsById.get(t.sectionId),h=xz(i.snapshot,i.selection.bySectionId,t.id),p=(C=i.snapshot,m=i.selection.bySectionId,g=t.id,Lz(C,m,g).partial);var C,m,g;const v=null==t.parentId&&!r.isViewPrivilegeMode&&!r.isClientSide,y=null!=t.parentId&&!t.isDisabled&&!String(t.displayName??t.name??"").includes("End")&&Boolean(r.handleViewComponent),w=i.expansion.expandedGroupIds.has(t.id);return e("div",{ref:u?.setNodeRef,"data-rowid":t.id,className:I("sortable-item",{"disabled-inner-row":t.isDisabled}),onMouseEnter:()=>{o.actions.setHoveredRow(t.id),null==t.parentId&&r.handleParentRowHover?.(t.id)},onMouseLeave:()=>{o.actions.setHoveredRow(null),null==t.parentId&&r.handleParentRowHoverOut?.(t.id)},style:{transform:u?.transform??void 0,transition:u?.transition??void 0,display:"grid",gridTemplateColumns:a,alignItems:"center"},children:i.snapshot.columns.map((i,a)=>{const C=t.raw?.[i.accessor],m=f?.title,g=t.raw?._id||t.raw?.id,b=i.renderCell?i.renderCell({value:C,row:t.raw,column:i.accessor,index:l,tableType:m,refId:g}):C??"--";return e("div",{className:i.className,style:{padding:0===a?null==t.parentId?d?"4px 8px 4px 0":"4px 8px 4px 24px":"7px 8px":null==t.parentId&&"Steps"===m?"4px 8px":"7px 8px",maxWidth:i.width},children:n(U,{as:"div",lineHeight:"18px",className:"ff-data-checkbox-container",children:[0===a&&d&&e("div",{className:"ff-table-drag-icon",...u?.listeners??{},...u?.attributes??{},children:e(F,{name:"drag",className:"drag-icon"})}),0===a&&v&&e("span",{className:h||p?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(ne,{onChange:e=>o.actions.toggleRowSelection(t.id,e.target.checked),checked:h,partial:p,disabled:"special-end"===t.kind})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===a?t.marginLeft:0,display:"flex",alignItems:"center",gap:"8px"},onDoubleClick:()=>{0===a&&y&&s(t.id)},children:[e("div",{style:{minWidth:0,flex:1},children:b}),0===a&&t.isExpandable&&!r.isClientSide&&e("button",{type:"button",className:"ff-accordion-arrow "+(w?"expanded":""),style:{border:0,background:"transparent",padding:0},onClick:()=>c(t.id),children:e(F,{name:"arrow_right",color:w?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12})}),i.renderExtraInfo?.({value:C,row:t.raw,column:i.accessor,index:l,tableType:m,refId:g})]})]})},`${t.id}:${i.id}`)})})}function Qz(e){return e.sectionIds.find(t=>{const n=e.sectionsById.get(t);return"steps"===n?.kind||"Steps"===n?.title})??null}function Gz(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}Rz.displayName="StepLandingTableV2";const Kz=i.memo(i.forwardRef(({tableMeta:t=[],tableData:r=[],noDataContent:i,height:o="100%",withFixedHeader:a=!1,headerType:s,handleDragStart:d,onDragEnd:u,editMode:f,editComponent:C,NlpComponent:m,AddNlp:g,handleAccordion:v,handleViewComponent:y,onSelectClick:w,loading:E=!1,isViewPrivilegeMode:M=!1,defaultExpanded:A="Steps",isHeaderRequired:x=!0,isClientSide:L=!1,highlightKey:k,onHighlightComplete:H,isDraggable:S=!0,isMaximize:_=!1,handleParentRowHover:V,handleParentRowHoverOut:O},z)=>{const[N,T]=c(null),[D,Z]=c(null),[j,R]=c({}),[B,P]=c(new Map),[F,q]=c(!1),W=p((e,t)=>{const n=r.find(t=>t.title===e);n&&n.data&&0!==n.data.length&&R(n=>({...n,[e]:"open"===t||!n[e]}))},[r]),Q=h(()=>e=>j[e]??!1,[j]),G=p(e=>{Z(t=>t===e?.stepId?null:e?.stepId)},[]),Y=p(e=>{G(e);const t=y?.(e,G);t?T(()=>t):G(null)},[y,G]),[X,J]=c(Object.fromEntries(r.map(e=>[e.title,new Set]))),[$,ee]=c(new Set);l(()=>{if(J(e=>function(e,t){const n={};return e.forEach(e=>{const r=e.data.map(e=>e.stepId),i=t[e.title]||new Set,o=new Set([...i].filter(e=>r.includes(e)));n[e.title]=o}),n}(r,e)),ee(e=>function(e,t){const n=e.reduce((e,t)=>(t.data.forEach(t=>e.add(t.stepId)),e),new Set);return new Set([...t].filter(e=>n.has(e)))}(r,e)),R(e=>function(e,t,n){const r={Steps:"Steps",Depends:"Depends on Scripts",PRE:"Pre Conditions",POST:"Post Conditions"},i={};return e.forEach(e=>{const o=e.title,a=o in t,l="All"===n?Object.values(r).includes(o):o===r[n];i[o]=a?t[o]??!1:l}),i}(r,e,A)),X&&!ez(X))return;const{updateSelectRow:e,updateStepPartialSelect:t}=((e,t,n)=>{const r=JO(e),i=new Set(t.Steps),o=new Set(n);return r?.forEach(e=>{const t=e?.childIds;if(0===t?.length)return;const n=t.every(e=>i.has(e)),a=t.some(e=>i.has(e));if(n?(i.add(e.start.stepId),i.add(e.end.stepId)):(i.delete(e.start.stepId),i.delete(e.end.stepId)),KO(e?.start)&&(a||n)){const t=e?.start?.conditionSearchKey,n=$O(t),a=r?.get(n)?.allIds;if(0===a?.length)return;a?.forEach(e=>{i.add(e),o.delete(e)})}a&&!n?(o.add(e.start.stepId),o.add(e.end.stepId)):(o.delete(e.start.stepId),o.delete(e.end.stepId))}),{updateSelectRow:{...t,Steps:i},updateStepPartialSelect:o}})(r,X,$);t&&ee(t),e&&J(e)},[r]),l(()=>{if(ez(X)){const e={...X,partialSelected:$};w?.(e)}else w?.(X)},[X]);const te=p((e,t)=>{const n=r.find(t=>t.title===e)?.data.map(e=>e.stepId);n&&(J(r=>({...r,[e]:t?new Set(n):new Set})),t||ee(new Set))},[r]),ne=p((e,t,n,r)=>{const{updateSelectRow:i,updateStepPartialSelect:o}=((e,t,n,r,i,o="Steps")=>{const a=new Set(r[o]);if("Steps"===o&&(t?.isSpecialNlp||t?.conditionId||t?.parentSpecialNlpId)){const{updateStepPartialSelect:l}=function(r){const o=new Set(i),l=JO(e),s=e=>{const t=e?.conditionSearchKey,n=$O(t),r=l.get(n);r&&"IfCondition"===r.start.nlpName&&0===r?.start?.marginLeft&&c(r.start),!r?.start?.conditionSearchKey?.includes("/")||"IfCondition"===r?.start.nlpName&&0===r?.start?.marginLeft||s(r.start)},c=e=>{if(e?.isSpecialNlp){const t=e?.specialNlpId||e?.conditionSearchKey,r=t&&l.get(t);r&&Array.isArray(r.allIds)&&r.allIds.forEach(e=>{o.delete(e),n?a.add(e):a.delete(e)})}else n?a.add(e?.stepId):a.delete(e?.stepId)},d=e=>{let c=!0;const d=e=>{const t=e?.childIds;if(KO(e?.start)){const t=(e=>e.includes("/")&&e.split("/")[0]||e)(e?.start?.conditionSearchKey),o=l.get(t),a=o?.start?.stepId,c=i.has(a);n&&!c&&s(r)}if(0===t?.length)return;const u=t.every(e=>a.has(e)),f=t.some(e=>a.has(e));if(u?(a.add(e.start?.stepId),a.add(e.end?.stepId)):(a.delete(e.start?.stepId),a.delete(e.end?.stepId)),f&&!u?(o.add(e.start?.stepId),o.add(e.end?.stepId)):(o.delete(e.start?.stepId),o.delete(e.end?.stepId)),e?.start?.parentSpecialNlpId){const t=l.get(e.start.parentSpecialNlpId);t&&d(t)}if(e?.start?.conditionSearchKey){const t=$O(e?.start?.conditionSearchKey),n=e?.start?.conditionSearchKey,r=e?.start?.conditionId;if(n===r&&c){c=!1;const e=l.get(t);return void(e&&d(e))}if(n===r)return;const i=l.get(t);return void(i&&d(i))}};if(e?.conditionSearchKey===e?.conditionId&&!e?.parentSpecialNlpId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);return void(t&&d(t))}if(e?.conditionSearchKey||e?.conditionId||!e?.specialNlpId||e?.parentSpecialNlpId){if(e?.conditionSearchKey&&e?.conditionSearchKey===e?.conditionId&&e?.conditionId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);t&&d(t)}if(e?.parentSpecialNlpId){const t=l.get(e?.parentSpecialNlpId);t&&d(t)}if(e?.conditionSearchKey){const r=l.get(e?.conditionSearchKey).childIds;let i=0;r.forEach(e=>{a.has(e)&&i++});const s=i>0&&i<r.length,u=0===i,f=e?.conditionSearchKey;if(!f.includes("/")&&f&&!n&&!s&&u){const t=e?.conditionId;let n=[];if(l&&t)for(const[e,r]of l.entries())e.includes(t)&&e.includes("/")&&n.push(r);n.forEach(e=>{["ElseIfCondition","ElseCondition"].includes(e.start?.nlpName)&&(e.childIds?.forEach(e=>{a.delete(e),o.delete(e)}),a.delete(e.start.stepId),a.delete(e.end.stepId),o.delete(e.start.stepId),o.delete(e.end.stepId))})}const h=!t?.isSpecialNlp||KO(e)||t?.specialNlpId?e.conditionSearchKey:$O(e.conditionSearchKey);c=!0;const p=l.get(h);p&&d(p)}}};return c(r),d(r),{updateStepPartialSelect:o}}(t);return{updateSelectRow:{...r,[o]:a},updateStepPartialSelect:l}}return n?a.add(t.stepId):a.delete(t.stepId),{updateSelectRow:{...r,[o]:a}}})(e,t,n,X,$,r);o&&ee(o),i&&J(i)},[X,$]),re=p((e,t,n)=>{ne(r,t,n,e)},[r,ne]),ie=p((e,t)=>{const n=t>0&&X[e]?.size===t;return e.includes("Script")&&q(n),n},[X]),oe=p((e,t)=>{const n=X[e]?.size||0;return n>0&&n<t},[X]),ae=p(e=>B.has(e),[B]),le=p(e=>{ae(e?.stepId)||(D&&G(null),v?.(e)),E||P(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})},[ae,D,G,v,E]),se=p(n=>"Steps"!==n.title||M?e(GO,{onHighlightComplete:H,highlightKey:k,draggable:!1,editMode:f,withCheckbox:!M,editComponent:C,columns:t,data:n.data,headerType:s,noDataContent:i,tableType:n.title,onSelect:re,selectedRows:X,viewModeId:D,ViewComponent:N,handleClick:Y,handleStepGroupExpand:le,isStepGroupExpanded:ae,isViewPrivilegeMode:M,height:n?.data?.length<=15?"auto":o,isClientSide:L}):e(GO,{onHighlightComplete:H,highlightKey:k,draggable:S,columns:t,onDragEnd:u,data:n.data,headerType:s,withCheckbox:!0,editMode:f,editComponent:C,noDataContent:i,NlpComponent:m,AddNlp:g,tableType:n.title,handleDragStart:()=>{B.clear(),d?.()},onSelect:re,selectedRows:X,viewModeId:D,ViewComponent:N,handleClick:Y,handleStepGroupExpand:le,isStepGroupExpanded:ae,stepPartialSelect:$,height:0===n?.data?.length?"300px":n?.data?.length<=12?"auto":o,isClientSide:L,handleRowHover:V,handleRowHoverOut:O}),[M,H,k,S,t,u,s,f,C,i,m,g,B,d,re,X,D,N,Y,le,ae,$,r.length,o,L]);return b(z,()=>({resetSelection:()=>{J(Object.fromEntries(r.map(e=>[e.title,new Set]))),ee(new Set)},handleUpdateCheckbox:(e,t)=>{const n=e?.parentSpecialNlpId,i=e?.conditionSearchKey;(n||i)&&ne(t||r,e,!1)},deleteRow:e=>{J(t=>Object.fromEntries(Object.entries(t)?.map(([t,n])=>[t,new Set([...n].filter(t=>t!==e?.stepId))])))},resetStepGroupAccordion:()=>{P(new Map)}}),[r,ne]),l(()=>{K(g)||(T(()=>null),Z(null),"addLast"===g?.action&&W("Steps","open"))},[g]),n("div",{className:I("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":a}),children:[x&&!L&&e("table",{cellSpacing:0,className:I("ff-accordion-table",{"ff-accordion-fixed-header":a}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:t.map((t,n)=>e("th",{style:{width:t?.width},className:I("ff-table-header",s&&`ff-accordion-table--${s}-bg`),children:e(U,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:t.header})},`${t.header}-${n}`))})})}),e("div",{className:"ff-accordion-table-body",style:{height:o,overflowY:"auto"},children:r?.map(r=>{const{title:i,data:o,actionCell:a,metaData:l}=r,s=o.length,c=Q(i),d=X[i]?.size??0;return n("div",{className:"column-table-accordion",children:[e(oz,{isViewPrivilegeMode:M,onAccordionClick:W,showActionCell:d>0&&s>0&&a,handleMainCheckbox:te,isAllSelected:ie,isPartialSelected:oe,title:i,totalRows:s,expanded:c,metaData:l,actionCell:a,row:r,tableMeta:t,isHeaderRequired:x,isBulkEnable:F,isClientSide:L,isMaximize:_}),c&&se(r)]},i)})})]})}));Kz.displayName="LegacyStepLandingTable";const Yz=i.memo(i.forwardRef((t,n)=>t.useV2Engine?e(Rz,{...t,ref:n}):e(Kz,{...t,ref:n})));Yz.displayName="StepLandingTable";var Xz,Jz,$z,eI,tI,nI,rI,iI,oI,aI,lI,sI,cI,dI,uI,fI,hI,pI,CI,mI,gI,vI,yI,wI,bI,EI,MI,AI,xI,LI,kI,HI,SI,_I,VI,OI,zI,II,NI,TI,DI,ZI,jI,RI,BI,PI,FI,UI,qI,WI,QI,GI,KI,YI,XI,JI,$I,eN,tN,nN,rN,iN,oN,aN,lN,sN,cN,dN,uN,fN,hN,pN,CN,mN,gN,vN,yN,wN,bN,EN,MN,AN,xN,LN,kN,HN,SN,_N,VN,ON,zN,IN={exports:{}};function NN(){return Xz||(Xz=1,IN.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:Q(e)}function r(e){return l(e)?e:G(e)}function i(e){return s(e)?e:K(e)}function o(e){return a(e)&&!c(e)?e:Y(e)}function a(e){return!(!e||!e[u])}function l(e){return!(!e||!e[f])}function s(e){return!(!e||!e[h])}function c(e){return l(e)||s(e)}function d(e){return!(!e||!e[p])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=l,n.isIndexed=s,n.isAssociative=c,n.isOrdered=d,n.Keyed=r,n.Indexed=i,n.Set=o;var u="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",p="@@__IMMUTABLE_ORDERED__@@",C="delete",m=5,g=1<<m,v=g-1,y={},w={value:!1},b={value:!1};function E(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function A(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function L(e){return void 0===e.size&&(e.size=e.__iterate(H)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?L(e)+t:t}function H(){return!0}function S(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function _(e,t){return O(e,t,0)}function V(e,t){return O(e,t,t)}function O(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var z=0,I=1,N=2,T="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",Z=T||D;function j(e){this.next=e}function R(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function P(e){return!!q(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=q(e);return t&&t.call(e)}function q(e){var t=e&&(T&&e[T]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function Q(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?l(e)?e.toSeq():e.fromEntrySeq():le(e)}function K(e){return null==e?ae():a(e)?l(e)?e.entrySeq():e.toIndexedSeq():se(e)}function Y(e){return(null==e?ae():a(e)?l(e)?e.entrySeq():e:se(e)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=z,j.VALUES=I,j.ENTRIES=N,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[Z]=function(){return this},t(Q,n),Q.of=function(){return Q(arguments)},Q.prototype.toSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq {","}")},Q.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Q.prototype.__iterate=function(e,t){return ue(this,e,t,!0)},Q.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(G,Q),G.prototype.toKeyedSeq=function(){return this},t(K,Q),K.of=function(){return K(arguments)},K.prototype.toIndexedSeq=function(){return this},K.prototype.toString=function(){return this.__toString("Seq [","]")},K.prototype.__iterate=function(e,t){return ue(this,e,t,!1)},K.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(Y,Q),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},Q.isSeq=oe,Q.Keyed=G,Q.Set=Y,Q.Indexed=K;var X,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function le(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new ie(e).fromEntrySeq():P(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=de(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=de(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function de(e){return W(e)?new te(e):F(e)?new ie(e):P(e)?new re(e):void 0}function ue(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var l=i[n?o-a:a];if(!1===t(l[1],r?l[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new j(function(){var e=i[n?o-a:a];return a++>o?B():R(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function he(e,t){return t?pe(t,e,"",{"":e}):Ce(e)}function pe(e,t,n,r){return Array.isArray(t)?e.call(r,n,K(t).map(function(n,r){return pe(e,n,r,t)})):me(t)?e.call(r,n,G(t).map(function(n,r){return pe(e,n,r,t)})):t}function Ce(e){return Array.isArray(e)?K(e).map(Ce).toList():me(e)?G(e).map(Ce).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||l(e)!==l(t)||s(e)!==s(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(d(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ge(i[1],e)&&(n||ge(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var u=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!ge(t,e.get(r,y)):!ge(e.get(r,y),t))return u=!1,!1});return u&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function we(e,t){if(!e)throw new Error(t)}function be(e,t,n){if(!(this instanceof be))return new be(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function Ee(){throw TypeError("Abstract")}function Me(){}function Ae(){}function xe(){}Q.prototype[ee]=!0,t(te,K),te.prototype.get=function(e,t){return this.has(e)?this._array[k(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new j(function(){return i>r?B():R(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new j(function(){var a=r[t?i-o:o];return o++>i?B():R(e,a,n[a])})},ne.prototype[p]=!0,t(re,K),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!F(n))return new j(B);var r=0;return new j(function(){var t=n.next();return t.done?t:R(e,r++,t.value)})},t(ie,K),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new j(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return R(e,i,r[i++])})},t(ye,K),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ge(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:new ye(this._value,V(t,n)-_(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new j(function(){return r<n.size?R(e,r++,n._value):B()})},ye.prototype.equals=function(e){return e instanceof ye?ge(this._value,e._value):ve(e)},t(be,K),be.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},be.prototype.get=function(e,t){return this.has(e)?this._start+k(this,e)*this._step:t},be.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},be.prototype.slice=function(e,t){return S(e,t,this.size)?this:(e=_(e,this.size),(t=V(t,this.size))<=e?new be(0,0):new be(this.get(e,this._end),this.get(t,this._end),this._step))},be.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},be.prototype.lastIndexOf=function(e){return this.indexOf(e)},be.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},be.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new j(function(){var a=i;return i+=t?-r:r,o>n?B():R(e,o++,a)})},be.prototype.equals=function(e){return e instanceof be?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(Ee,n),t(Me,Ee),t(Ae,Ee),t(xe,Ee),Ee.Keyed=Me,Ee.Indexed=Ae,Ee.Set=xe;var Le="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function He(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>je?Se(e):_e(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ve(e);if("function"==typeof e.toString)return _e(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Se(e){var t=Pe[e];return void 0===t&&(t=_e(e),Be===Re&&(Be=0,Pe={}),Be++,Pe[e]=t),t}function _e(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ke(t)}function Ve(e){var t;if(Te&&void 0!==(t=Ne.get(e)))return t;if(void 0!==(t=e[Ze]))return t;if(!ze){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ze]))return t;if(void 0!==(t=Ie(e)))return t}if(t=++De,1073741824&De&&(De=0),Te)Ne.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ze)Object.defineProperty(e,Ze,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ze]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ze]=t}}return t}var Oe=Object.isExtensible,ze=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ie(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Ne,Te="function"==typeof WeakMap;Te&&(Ne=new WeakMap);var De=0,Ze="__immutablehash__";"function"==typeof Symbol&&(Ze=Symbol(Ze));var je=16,Re=255,Be=0,Pe={};function Fe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():qe(e)&&!d(e)?e:it().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function qe(e){return!(!e||!e[Qe])}t(Ue,Me),Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=mt(this,En(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ft(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ft(this,ht,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,pt(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Pt(un(this,e))},Ue.prototype.sortBy=function(e,t){return Pt(un(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new A)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var We,Qe="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ke(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return We||(We=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=E(w),a=E(b);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===y?-1:1:0)}else{if(n===y)return e;i=1,r=new Ke(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===y?e:(M(l),M(a),new $e(t,r,[i,o]))}function lt(e){return e.constructor===$e||e.constructor===Je}function st(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,l=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<l,a===l?[st(e,t,n+m,r,i)]:(o=new $e(t,r,i),a<l?[e,o]:[o,e]))}function ct(e,t,n,r){e||(e=new A);for(var i=new $e(e,He(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function dt(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,s=1,c=t.length;l<c;l++,s<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=s,a[o++]=d)}return new Ye(e,i,a)}function ut(e,t,n,r,i){for(var o=0,a=new Array(g),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new Xe(e,o+1,a)}function ft(e,t,n){for(var i=[],o=0;o<n.length;o++){var l=n[o],s=r(l);a(l)||(s=s.map(function(e){return he(e)})),i.push(s)}return Ct(e,t,i)}function ht(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ge(e,t)?e:t}function pt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ge(t,i)?t:i}}function Ct(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function mt(e,t,n,r){var i=e===y,o=t.next();if(o.done){var a=i?n:e,l=r(a);return l===a?e:l}we(i||e&&e.set,"invalid keyPath");var s=o.value,c=i?y:e.get(s,y),d=mt(c,t,n,r);return d===c?e:d===y?e.remove(s):(i?it():e).set(s,d)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:x(e);return i[t]=n,i}function yt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[Qe]=!0,Ge[C]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Ke.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===y,s=this.entries,c=0,d=s.length;c<d&&!ge(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(M(a),(l||!u)&&M(o),!l||1!==s.length){if(!u&&!l&&s.length>=bt)return ct(e,s,r,i);var f=e&&e===this.ownerID,h=f?s:x(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Ke(e,h)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[gt(o&i-1)].get(e+m,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,s=1<<l,c=this.bitmap,d=0!==(c&s);if(!d&&i===y)return this;var u=gt(c&s-1),f=this.nodes,h=d?f[u]:void 0,p=at(h,e,t+m,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=Et)return ut(e,f,c,l,p);if(d&&!p&&2===f.length&<(f[1^u]))return f[1^u];if(d&&p&&1===f.length&<(p))return p;var C=e&&e===this.ownerID,g=d?p?c:c^s:c|s,w=d?p?vt(f,u,p,C):wt(f,u,C):yt(f,u,p,C);return C?(this.bitmap=g,this.nodes=w,this):new Ye(e,g,w)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+m,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,s=i===y,c=this.nodes,d=c[l];if(s&&!d)return this;var u=at(d,e,t+m,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<Mt)return dt(e,c,f,l)}else f++;var h=e&&e===this.ownerID,p=vt(c,l,u,h);return h?(this.count=f,this.nodes=p,this):new Xe(e,f,p)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=i===y;if(n!==this.keyHash)return l?this:(M(a),M(o),st(this,e,t,n,[r,i]));for(var s=this.entries,c=0,d=s.length;c<d&&!ge(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(M(a),(l||!u)&&M(o),l&&2===d)return new $e(e,this.keyHash,s[1^c]);var f=e&&e===this.ownerID,h=f?s:x(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Je(e,this.keyHash,h)},$e.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,o,a){var l=i===y,s=ge(r,this.entry[0]);return(s?i===this.entry[1]:l)?this:(M(a),l?void M(o):s?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(M(o),st(this,e,t,He(r),[r,i])))},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,j),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return B()};var bt=g/4,Et=g/2,Mt=g/4;function At(e){var t=It();if(null==e)return t;if(xt(e))return e;var n=i(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<g?zt(0,r,m,null,new Ht(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function xt(e){return!(!e||!e[Lt])}t(At,Ae),At.of=function(){return this(arguments)},At.prototype.toString=function(){return this.__toString("List [","]")},At.prototype.get=function(e,t){if((e=k(this,e))>=0&&e<this.size){var n=Zt(this,e+=this._origin);return n&&n.array[e&v]}return t},At.prototype.set=function(e,t){return Nt(this,e,t)},At.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},At.prototype.insert=function(e,t){return this.splice(e,0,t)},At.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):It()},At.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){jt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},At.prototype.pop=function(){return jt(this,0,-1)},At.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){jt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},At.prototype.shift=function(){return jt(this,1)},At.prototype.merge=function(){return Rt(this,void 0,arguments)},At.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},At.prototype.mergeDeep=function(){return Rt(this,ht,arguments)},At.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,pt(t),n)},At.prototype.setSize=function(e){return jt(this,0,e)},At.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:jt(this,_(e,n),V(t,n))},At.prototype.__iterator=function(e,t){var n=0,r=Ot(this,t);return new j(function(){var t=r();return t===Vt?B():R(e,n++,t)})},At.prototype.__iterate=function(e,t){for(var n,r=0,i=Ot(this,t);(n=i())!==Vt&&!1!==e(n,r++,this););return r},At.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},At.isList=xt;var Lt="@@__IMMUTABLE_LIST__@@",kt=At.prototype;function Ht(e,t){this.array=e,this.ownerID=t}kt[Lt]=!0,kt[C]=kt.remove,kt.setIn=Ge.setIn,kt.deleteIn=kt.removeIn=Ge.removeIn,kt.update=Ge.update,kt.updateIn=Ge.updateIn,kt.mergeIn=Ge.mergeIn,kt.mergeDeepIn=Ge.mergeDeepIn,kt.withMutations=Ge.withMutations,kt.asMutable=Ge.asMutable,kt.asImmutable=Ge.asImmutable,kt.wasAltered=Ge.wasAltered,Ht.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new Ht([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-m,n))===a&&o)return this}if(o&&!i)return this;var l=Dt(this,e);if(!o)for(var s=0;s<r;s++)l.array[s]=void 0;return i&&(l.array[r]=i),l},Ht.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-m,n))===o&&i===this.array.length-1)return this}var a=Dt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var St,_t,Vt={};function Ot(e,t){var n=e._origin,r=e._capacity,i=Bt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?l(e,n):s(e,t,n)}function l(e,a){var l=a===i?o&&o.array:e&&e.array,s=a>n?0:n-a,c=r-a;return c>g&&(c=g),function(){if(s===c)return Vt;var e=t?--c:s++;return l&&l[e]}}function s(e,i,o){var l,s=e&&e.array,c=o>n?0:n-o>>i,d=1+(r-o>>i);return d>g&&(d=g),function(){for(;;){if(l){var e=l();if(e!==Vt)return e;l=null}if(c===d)return Vt;var n=t?--d:c++;l=a(s&&s[n],i-m,o+(n<<i))}}}}function zt(e,t,n,r,i,o,a){var l=Object.create(kt);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function It(){return St||(St=zt(0,0,m))}function Nt(e,t,n){if((t=k(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?jt(e,t).set(0,n):jt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=E(b);return t>=Bt(e._capacity)?r=Tt(r,e.__ownerID,0,t,n,o):i=Tt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):zt(e._origin,e._capacity,e._level,i,r):e}function Tt(e,t,n,r,i,o){var a,l=r>>>n&v,s=e&&l<e.array.length;if(!s&&void 0===i)return e;if(n>0){var c=e&&e.array[l],d=Tt(c,t,n-m,r,i,o);return d===c?e:((a=Dt(e,t)).array[l]=d,a)}return s&&e.array[l]===i?e:(M(o),a=Dt(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Dt(e,t){return t&&e&&t===e.ownerID?e:new Ht(e?e.array.slice():[],t)}function Zt(e,t){if(t>=Bt(e._capacity))return e._tail;if(t<1<<e._level+m){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=m;return n}}function jt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new A,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var s=e._level,c=e._root,d=0;a+d<0;)c=new Ht(c&&c.array.length?[void 0,c]:[],r),d+=1<<(s+=m);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Bt(o),f=Bt(l);f>=1<<s+m;)c=new Ht(c&&c.array.length?[c]:[],r),s+=m;var h=e._tail,p=f<u?Zt(e,l-1):f>u?new Ht([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var C=c=Dt(c,r),g=s;g>m;g-=m){var y=u>>>g&v;C=C.array[y]=Dt(C.array[y],r)}C.array[u>>>m&v]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,s=m,c=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;c;){var w=a>>>s&v;if(w!==f>>>s&v)break;w&&(d+=(1<<s)*w),s-=m,c=c.array[w]}c&&a>i&&(c=c.removeBefore(r,s,a-d)),c&&f<u&&(c=c.removeAfter(r,s,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):zt(a,l,s,c,p)}function Rt(e,t,n){for(var r=[],o=0,l=0;l<n.length;l++){var s=n[l],c=i(s);c.size>o&&(o=c.size),a(s)||(c=c.map(function(e){return he(e)})),r.push(c)}return o>e.size&&(e=e.setSize(o)),Ct(e,t,r)}function Bt(e){return e<g?0:e-1>>>m<<m}function Pt(e){return null==e?qt():Ft(e)?e:qt().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ft(e){return qe(e)&&d(e)}function Ut(e,t,n,r){var i=Object.create(Pt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function qt(){return _t||(_t=Ut(it(),It()))}function Wt(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),s=void 0!==l;if(n===y){if(!s)return e;a.size>=g&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(s){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Qt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new j(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===I?z:I,n)},t}function Jt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,y);return o===y?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(N,i);return new j(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return R(r,l,t.call(n,a[1],l,e),i)})},r}function $t(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=yn(e);return r&&(i.has=function(r){var i=e.get(r,y);return i!==y&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,y);return o!==y&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,s){if(t.call(n,e,o,s))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(N,o),l=0;return new j(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],d=s[1];if(t.call(n,d,c,e))return R(i,r?c:l++,d,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=l(e),i=(d(e)?Pt():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return Cn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),S(t,n,i))return e;var o=_(t,i),a=V(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var l,s=a-o;s==s&&(l=s<0?0:s);var c=yn(e);return c.size=0===l?l:e.size&&l||void 0,!r&&oe(e)&&l>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&t<l?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,s=!0,c=0;return e.__iterate(function(e,n){if(!s||!(s=a++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==l}),c},c.__iteratorUncached=function(t,n){if(0!==l&&n)return this.cacheResult().__iterator(t,n);var i=0!==l&&e.__iterator(t,n),a=0,s=0;return new j(function(){for(;a++<o;)i.next();if(++s>l)return B();var e=i.next();return r||t===I?e:R(t,s-1,t===z?void 0:e.value[1],e)})},c}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(N,i),l=!0;return new j(function(){if(!l)return B();var e=a.next();if(e.done)return e;var i=e.value,s=i[0],c=i[1];return t.call(n,c,s,o)?r===N?e:R(r,s,c,e):(l=!1,B())})},r}function an(e,t,n,r){var i=yn(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,s=0;return e.__iterate(function(e,o,c){if(!l||!(l=t.call(n,e,o,c)))return s++,i(e,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(N,o),s=!0,c=0;return new j(function(){var e,o,d;do{if((e=l.next()).done)return r||i===I?e:R(i,c++,i===z?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],s&&(s=t.call(n,d,o,a))}while(s);return i===N?e:R(i,o,d,e)})},i}function ln(e,t){var n=l(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?le(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&l(o)||s(e)&&s(o))return o}var c=new te(i);return n?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function sn(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=0,l=!1;function s(e,c){var d=this;e.__iterate(function(e,i){return(!t||c<t)&&a(e)?s(e,c+1):!1===r(e,n?i:o++,d)&&(l=!0),!l},i)}return s(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),l=[],s=0;return new j(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(r===N&&(c=c[1]),t&&!(l.length<t)||!a(c))return n?e:R(r,s++,c,e);l.push(o),o=c.__iterator(r,i)}else o=l.pop()}return B()})},r}function cn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function dn(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(I,r),a=0;return new j(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?R(n,a++,t):R(n,a++,i.value,i)})},n}function un(e,t,n){t||(t=bn);var r=l(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):s(e)?K(o):Y(o)}function fn(e,t,n){if(t||(t=bn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return hn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return hn(t,e,n)?n:e})}function hn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function pn(e,t,r){var i=yn(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(I,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,l=!1;return new j(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=n.some(function(e){return e.done})),l?B():R(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function Cn(e,t){return oe(e)?t:e.constructor(t)}function mn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Fe(e.size),L(e)}function vn(e){return l(e)?r:s(e)?i:o}function yn(e){return Object.create((l(e)?G:s(e)?K:Y).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Q.prototype.cacheResult.call(this)}function bn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=U(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function Mn(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);kn(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(An);return i.constructor=r,r}t(Pt,Ue),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Pt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):qt()},Pt.prototype.set=function(e,t){return Wt(this,e,t)},Pt.prototype.remove=function(e){return Wt(this,e,y)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Pt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Pt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Pt.isOrderedMap=Ft,Pt.prototype[p]=!0,Pt.prototype[C]=Pt.prototype.remove,t(Qt,G),Qt.prototype.get=function(e,t){return this._iter.get(e,t)},Qt.prototype.has=function(e){return this._iter.has(e)},Qt.prototype.valueSeq=function(){return this._iter.valueSeq()},Qt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Qt.prototype.map=function(e,t){var n=this,r=Jt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Qt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Qt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(I,t),r=t?gn(this):0;return new j(function(){var i=n.next();return i.done?i:R(e,t?--r:r++,i.value,i)})},Qt.prototype[p]=!0,t(Gt,K),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t),r=0;return new j(function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)})},t(Kt,Y),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new j(function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){mn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new j(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){mn(r);var i=a(r);return R(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Qt.prototype.cacheResult=Kt.prototype.cacheResult=Yt.prototype.cacheResult=wn,t(Mn,Me),Mn.prototype.toString=function(){return this.__toString(Ln(this)+" {","}")},Mn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Mn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Mn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=xn(this,it()))},Mn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Ln(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:xn(this,n)},Mn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:xn(this,t)},Mn.prototype.wasAltered=function(){return this._map.wasAltered()},Mn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Mn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Mn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?xn(this,t,e):(this.__ownerID=e,this._map=t,this)};var An=Mn.prototype;function xn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Ln(e){return e._name||e.constructor.name||"Record"}function kn(e,t){try{t.forEach(Hn.bind(void 0,e))}catch(e){}}function Hn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Sn(e){return null==e?Tn():_n(e)&&!d(e)?e:Tn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function _n(e){return!(!e||!e[On])}An[C]=An.remove,An.deleteIn=An.removeIn=Ge.removeIn,An.merge=Ge.merge,An.mergeWith=Ge.mergeWith,An.mergeIn=Ge.mergeIn,An.mergeDeep=Ge.mergeDeep,An.mergeDeepWith=Ge.mergeDeepWith,An.mergeDeepIn=Ge.mergeDeepIn,An.setIn=Ge.setIn,An.update=Ge.update,An.updateIn=Ge.updateIn,An.withMutations=Ge.withMutations,An.asMutable=Ge.asMutable,An.asImmutable=Ge.asImmutable,t(Sn,xe),Sn.of=function(){return this(arguments)},Sn.fromKeys=function(e){return this(r(e).keySeq())},Sn.prototype.toString=function(){return this.__toString("Set {","}")},Sn.prototype.has=function(e){return this._map.has(e)},Sn.prototype.add=function(e){return In(this,this._map.set(e,!0))},Sn.prototype.remove=function(e){return In(this,this._map.remove(e))},Sn.prototype.clear=function(){return In(this,this._map.clear())},Sn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Sn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},Sn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},Sn.prototype.merge=function(){return this.union.apply(this,arguments)},Sn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Sn.prototype.sort=function(e){return Dn(un(this,e))},Sn.prototype.sortBy=function(e,t){return Dn(un(this,t,e))},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},Sn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Sn.isSet=_n;var Vn,On="@@__IMMUTABLE_SET__@@",zn=Sn.prototype;function In(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Nn(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Tn(){return Vn||(Vn=Nn(it()))}function Dn(e){return null==e?Pn():Zn(e)?e:Pn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function Zn(e){return _n(e)&&d(e)}zn[On]=!0,zn[C]=zn.remove,zn.mergeDeep=zn.merge,zn.mergeDeepWith=zn.mergeWith,zn.withMutations=Ge.withMutations,zn.asMutable=Ge.asMutable,zn.asImmutable=Ge.asImmutable,zn.__empty=Tn,zn.__make=Nn,t(Dn,Sn),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Dn.isOrderedSet=Zn;var jn,Rn=Dn.prototype;function Bn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Pn(){return jn||(jn=Bn(qt()))}function Fn(e){return null==e?Kn():Un(e)?e:Kn().unshiftAll(e)}function Un(e){return!(!e||!e[Wn])}Rn[p]=!0,Rn.__empty=Pn,Rn.__make=Bn,t(Fn,Ae),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=k(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.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):Kn()},Fn.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var n=_(e,this.size);if(V(t,this.size)!==this.size)return Ae.prototype.slice.call(this,e,t);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):Gn(r,i)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new j(function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return B()})},Fn.isStack=Un;var qn,Wn="@@__IMMUTABLE_STACK__@@",Qn=Fn.prototype;function Gn(e,t,n,r){var i=Object.create(Qn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kn(){return qn||(qn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Qn[Wn]=!0,Qn.withMutations=Ge.withMutations,Qn.asMutable=Ge.asMutable,Qn.asImmutable=Ge.asImmutable,Qn.wasAltered=Ge.wasAltered,n.Iterator=j,Yn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Qt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Pt(this.toKeyedSeq())},toOrderedSet:function(){return Dn(l(this)?this.valueSeq():this)},toSet:function(){return Sn(l(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(l(this)?this.valueSeq():this)},toList:function(){return At(l(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return Cn(this,ln(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ge(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return Cn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(z)},map:function(e,t){return Cn(this,Jt(this,e,t))},reduce:function(e,t,n){var r,i;return Fe(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Cn(this,$t(this,!0))},slice:function(e,t){return Cn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return Cn(this,un(this,e))},values:function(){return this.__iterator(I)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return L(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(H)},flatMap:function(e,t){return Cn(this,cn(this,e,t))},flatten:function(e){return Cn(this,sn(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ge(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=En(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):or)},minBy:function(e,t){return fn(this,t?nr(t):or,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Cn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Cn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return Cn(this,un(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Cn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Cn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[u]=!0,Xn[Z]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.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. "+e),this.size}}})}catch(e){}}(),Yn(r,{flip:function(){return Cn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey(function(t){return ge(t,e)})},lastKeyOf:function(e){return this.findLastKey(function(t){return ge(t,e)})},mapEntries:function(e,t){var n=this,r=0;return Cn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Cn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Jn=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function ir(){return x(arguments)}function or(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=d(e),n=l(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sr(He(e),He(t))|0}:function(e,t){r=r+sr(He(e),He(t))|0}:t?function(e){r=31*r+He(e)|0}:function(e){r=r+He(e)|0});return lr(i,r)}function lr(e,t){return t=Le(t,3432918353),t=Le(t<<15|t>>>-15,461845907),t=Le(t<<13|t>>>-13,5),t=Le((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Le(t^t>>>13,3266489909))^t>>>16)}function sr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Jn[f]=!0,Jn[Z]=Xn.entries,Jn.__toJS=Xn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Yn(i,{toKeyedSeq:function(){return new Qt(this,!1)},filter:function(e,t){return Cn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Cn(this,$t(this,!1))},slice:function(e,t){return Cn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,e<0?this.count():this.size);var r=this.slice(0,e);return Cn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return Cn(this,sn(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Cn(this,dn(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=pn(this.toSeq(),K.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Cn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Cn(this,an(this,e,t,!1))},zip:function(){return Cn(this,pn(this,ir,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,Cn(this,pn(this,e,t))}}),i.prototype[h]=!0,i.prototype[p]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Xn.includes,Yn(G,r.prototype),Yn(K,i.prototype),Yn(Y,o.prototype),Yn(Me,r.prototype),Yn(Ae,i.prototype),Yn(xe,o.prototype);var cr={Iterable:n,Seq:Q,Collection:Ee,Map:Ue,OrderedMap:Pt,List:At,Stack:Fn,Set:Sn,OrderedSet:Dn,Record:Mn,Range:be,Repeat:ye,is:ge,fromJS:he};return cr}()),IN.exports}function TN(){if($z)return Jz;$z=1;var e=NN().OrderedMap;return Jz={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function DN(){if(tI)return eI;tI=1;var e=NN(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var c=a.prototype;return c.getStyle=function(){return this.get("style")},c.getEntity=function(){return this.get("entity")},c.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return l;var n=t({style:i,entity:null}).merge(e),r=s.get(n);if(r)return r;var o=new a(n);return s=s.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),l=new a,s=t([[t(o),l]]);return a.EMPTY=l,eI=a}function ZN(){if(rI)return nI;return rI=1,nI=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function jN(){if(oI)return iI;oI=1;var e=DN(),t=ZN(),n=NN(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,s=o(),c=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),d=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var c=a.prototype;return c.getKey=function(){return this.get("key")},c.getType=function(){return this.get("type")},c.getText=function(){return this.get("text")},c.getCharacterList=function(){return this.get("characterList")},c.getLength=function(){return this.getText().length},c.getDepth=function(){return this.get("depth")},c.getData=function(){return this.get("data")},c.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():s},c.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},c.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},c.findEntityRanges=function(e,n){t(this.getCharacterList(),f,e,n)},a}(c);function u(e,t){return e.getStyle()===t.getStyle()}function f(e,t){return e.getEntity()===t.getEntity()}return iI=d}function RN(){if(lI)return aI;lI=1;var e=DN(),t=ZN(),n=NN(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,s=o(),c={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},d=function(e,t){return e.getStyle()===t.getStyle()},u=function(e,t){return e.getEntity()===t.getEntity()},f=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var f=a.prototype;return f.getKey=function(){return this.get("key")},f.getType=function(){return this.get("type")},f.getText=function(){return this.get("text")},f.getCharacterList=function(){return this.get("characterList")},f.getLength=function(){return this.getText().length},f.getDepth=function(){return this.get("depth")},f.getData=function(){return this.get("data")},f.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():s},f.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},f.getChildKeys=function(){return this.get("children")},f.getParentKey=function(){return this.get("parent")},f.getPrevSiblingKey=function(){return this.get("prevSibling")},f.getNextSiblingKey=function(){return this.get("nextSibling")},f.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},f.findEntityRanges=function(e,n){t(this.getCharacterList(),u,e,n)},a}(a(c));return aI=f}function BN(){if(hI)return fI;hI=1;var e=function(){if(uI)return dI;uI=1;var e=DN();return dI=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=NN();return fI=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),l=r.getStartOffset(),s=r.getEndKey(),c=r.getEndOffset(),d=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===s}).toOrderedMap().merge(t.OrderedMap([[s,o.get(s)]])).map(function(t,n){var r=n===a?l:0,o=n===s?c:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(d),selectionBefore:r,selectionAfter:r})},fI}function PN(){if(gI)return mI;gI=1;var e="production"!==process.env.NODE_ENV?function(e){if(void 0===e)throw new Error("invariant(...): Second argument must be a string.")}:function(e){};return mI=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(e(n),!t){var a;if(void 0===n)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;(a=new Error(n.replace(/%s/g,function(){return String(i[l++])}))).name="Invariant Violation"}throw a.framesToPop=1,a}},mI}function FN(){if(bI)return wI;bI=1;var e=CI?pI:(CI=1,pI={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,l=r,s=null,c=null,d=0;d<o.length;d++){if(e<(a=l+o[d].length)&&l<t)null!==s||(s=l),c=a;else if(null!==s)break;l=a}var u=r+n.length,f=s===r,h=c===u;return(!f&&h||f&&!h)&&("forward"===i?c!==u&&c++:s!==r&&s--),{start:s,end:c}}}),t=function(){if(yI)return vI;yI=1;var e=PN();return vI=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||("production"!==process.env.NODE_ENV?e(!1,"Entity key not found in this range."):e(!1)),r},vI}(),n=PN();function r(r,i,o,a,l,s,c){var d=o.getStartOffset(),u=o.getEndOffset(),f=r.__get(l).getMutability(),h=c?d:u;if("MUTABLE"===f)return o;var p=t(i,l).filter(function(e){return h<=e.end&&h>=e.start});1!=p.length&&("production"!==process.env.NODE_ENV?n(!1,"There should only be one entity range within this removal range."):n(!1));var C=p[0];if("IMMUTABLE"===f)return o.merge({anchorOffset:C.start,focusOffset:C.end,isBackward:!1});s||(c?u=C.end:d=C.start);var m=e.getRemovalRange(d,u,i.getText().slice(C.start,C.end),C.start,a);return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1})}return wI=function(e,t,n,i,o){var a=i.getStartOffset(),l=i.getEndOffset(),s=t.getEntityAt(a),c=n.getEntityAt(l-1);if(!s&&!c)return i;var d=i;if(s&&s===c)d=r(e,t,d,o,s,!0,!0);else if(s&&c){var u=r(e,t,d,o,s,!1,!0),f=r(e,n,d,o,c,!1,!1);d=d.merge({anchorOffset:u.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(s){var h=r(e,t,d,o,s,!1,!0);d=d.merge({anchorOffset:h.getStartOffset(),isBackward:!1})}else if(c){var p=r(e,n,d,o,c,!1,!1);d=d.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return d}}function UN(){if(MI)return EI;MI=1;var e={},t=Math.pow(2,24);return EI=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n},EI}function qN(){if(xI)return AI;xI=1;var e=RN(),t=UN(),n=NN().OrderedMap;return AI=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),l=n.getNextSiblingKey(),s=n.getPrevSiblingKey(),c=n.getChildKeys(),d=n.getParentKey(),u=t();if(i[a]=u,l&&(e.get(l)?e.setIn([l,"prevSibling"],u):e.setIn([a,"nextSibling"],null)),s&&(e.get(s)?e.setIn([s,"nextSibling"],u):e.setIn([a,"prevSibling"],null)),d&&e.get(d)){var f=e.get(d).getChildKeys();e.setIn([d,"children"],f.set(f.indexOf(n.getKey()),u))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],u),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);c.forEach(function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)},AI}function WN(){if(kI)return LI;kI=1;var e=DN(),t=ZN(),n=PN();function r(r,i,o){var a=i.getCharacterList(),l=o>0?a.get(o-1):void 0,s=o<a.count()?a.get(o):void 0,c=l?l.getEntity():void 0,d=s?s.getEntity():void 0;if(d&&d===c&&"MUTABLE"!==r.__get(d).getMutability()){for(var u,f=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&("production"!==process.env.NODE_ENV?n(!1,"Removal range must exist within character list."):n(!1)),o}(a,d,o),h=f.start,p=f.end;h<p;)u=a.get(h),a=a.set(h,e.applyEntity(u,null)),h++;return i.set("characterList",a)}return i}return LI=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),l=t.getStartOffset(),s=n.get(a),c=r(i,s,l);c!==s&&(o[a]=c);var d=t.getEndKey(),u=t.getEndOffset(),f=n.get(d);a===d&&(f=c);var h=r(i,f,u);return h!==f&&(o[d]=h),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function QN(){if(SI)return HI;SI=1;var e=qN(),t=WN();return HI=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),l=r.getEndOffset(),s=t(n,r).getBlockMap(),c=s.keySeq(),d=c.indexOf(i),u=c.indexOf(a)+1;return e(s.slice(d,u).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,l),characterList:r.slice(o,l)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,l),characterList:r.slice(0,l)}):e}))}}function GN(){if(VI)return _I;return VI=1,_I=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function KN(){if(zI)return OI;zI=1;var e=TN(),t=RN(),n=NN(),r=GN(),i=PN(),o=qN(),a=n.List,l=function(n,r,i,o,l,s){var c=i.first()instanceof t,d=[],u=o.size,f=i.get(l),h=o.first(),p=o.last(),C=p.getLength(),m=p.getKey(),g=c&&(!f.getChildKeys().isEmpty()||!h.getChildKeys().isEmpty());i.forEach(function(e,t){t===l?(g?d.push(e):d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),l=n.first();return e.merge({text:o+l.getText(),characterList:a.concat(l.getCharacterList()),type:o?e.getType():l.getType(),data:l.getData()})}(e,s,o)),o.slice(g?0:1,u-1).forEach(function(e){return d.push(e)}),d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),l=i.slice(t,o),s=n.last();return s.merge({text:s.getText()+a,characterList:s.getCharacterList().concat(l),data:s.getData()})}(e,s,o))):d.push(e)});var v=e.createFromArray(d);return c&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),l=n.getNextSiblingKey(),s=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),d=c[c.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([d,"nextSibling"],l),l&&t.setIn([l,"prevSibling"],d),c.forEach(function(e){return t.setIn([e,"parent"],s)}),s){var u=e.get(s).getChildKeys(),f=u.indexOf(i)+1,h=u.toArray();h.splice.apply(h,[f,0].concat(c)),t.setIn([s,"children"],a(h))}})}(v,0,f,h)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:m,anchorOffset:C,focusKey:m,focusOffset:C,isBackward:!1})})};return OI=function(e,n,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should only be called with a collapsed selection state."):i(!1));var c=e.getBlockMap(),d=o(a),u=n.getStartKey(),f=n.getStartOffset(),h=c.get(u);return h instanceof t&&(h.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should not be called when a container node is selected."):i(!1))),1===d.size?function(e,t,n,i,o,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),c=s.getText(),d=s.getCharacterList(),u=o,f=a+i.getText().length,h=null;switch(l){case"MERGE_OLD_DATA_TO_NEW_DATA":h=i.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":h=i.getData()}var p=s.getType();c&&"unstyled"===p&&(p=i.getType());var C=s.merge({text:c.slice(0,a)+i.getText()+c.slice(a),characterList:r(d,i.getCharacterList(),a),type:p,data:h});return e.merge({blockMap:n.set(o,C),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:f,focusKey:u,focusOffset:f,isBackward:!1})})}(e,n,c,d.first(),u,f,s):l(e,n,c,d,u,f)},OI}function YN(){if(DI)return TI;DI=1;var e=NN().Map;return TI=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(l),selectionBefore:n,selectionAfter:n})},TI}function XN(){if(jI)return ZI;jI=1;var e=RN();return ZI=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function JN(){if(BI)return RI;BI=1;var e=RN(),t=XN(),n=NN();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},s=function(e,n,r,s){return e.withMutations(function(c){if(i(n.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})}),i(r.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})}),o(n.getKey(),s).forEach(function(e){return i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),i(n.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:a(e,c,s)})}),i(r.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:l(e,c,s)})}),i(r.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),s).forEach(function(e){i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,s).forEach(function(e){return i(e,c,function(e){return e.merge({nextSibling:a(e,c,s),prevSibling:l(e,c,s)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var d=n.getPrevSiblingKey();i(r.getKey(),c,function(e){return e.merge({prevSibling:d})}),i(d,c,function(e){return e.merge({nextSibling:r.getKey()})});var u=d?e.get(d):null,f=u?u.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,c,function(e){return e.merge({parent:f})})}),null!=f){var h=e.get(f);i(f,c,function(e){return e.merge({children:h.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),c,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},c=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return RI=function(n,i){if(i.isCollapsed())return n;var a,l=n.getBlockMap(),d=i.getStartKey(),u=i.getStartOffset(),f=i.getEndKey(),h=i.getEndOffset(),p=l.get(d),C=l.get(f),m=p instanceof e,g=[];if(m){var v=C.getChildKeys(),y=o(f,l);C.getNextSiblingKey()&&(g=g.concat(y)),v.isEmpty()||(g=g.concat(y.concat([f]))),g=g.concat(o(t(C,l),l))}a=p===C?c(p.getCharacterList(),u,h):p.getCharacterList().slice(0,u).concat(C.getCharacterList().slice(h));var w=p.merge({text:p.getText().slice(0,u)+C.getText().slice(h),characterList:a}),b=m&&0===u&&0===h&&C.getParentKey()===d&&null==C.getPrevSiblingKey()?r([[d,null]]):l.toSeq().skipUntil(function(e,t){return t===d}).takeUntil(function(e,t){return t===f}).filter(function(e,t){return-1===g.indexOf(t)}).concat(r([[f,null]])).map(function(e,t){return t===d?w:null}),E=l.merge(b).filter(function(e){return!!e});return m&&p!==C&&(E=s(E,p,C,l)),n.merge({blockMap:E,selectionBefore:i,selectionAfter:i.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})},RI}function $N(){if(FI)return PI;FI=1;var e=RN(),t=UN(),n=NN(),r=PN(),i=YN(),o=n.List,a=n.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return PI=function(n,s){s.isCollapsed()||("production"!==process.env.NODE_ENV?r(!1,"Selection range must be collapsed."):r(!1));var c=s.getAnchorKey(),d=n.getBlockMap(),u=d.get(c),f=u.getText();if(!f){var h=u.getType();if("unordered-list-item"===h||"ordered-list-item"===h)return i(n,s,function(e){return e.merge({type:"unstyled",depth:0})})}var p=s.getAnchorOffset(),C=u.getCharacterList(),m=t(),g=u instanceof e,v=u.merge({text:f.slice(0,p),characterList:C.slice(0,p)}),y=v.merge({key:m,text:f.slice(p),characterList:C.slice(p),data:a()}),w=d.toSeq().takeUntil(function(e){return e===u}),b=d.toSeq().skipUntil(function(e){return e===u}).rest(),E=w.concat([[c,v],[m,y]],b).toOrderedMap();return g&&(u.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?r(!1,"ContentBlockNode must not have children"):r(!1)),E=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();l(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),l(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),l(r,e,function(e){return e.merge({nextSibling:i})}),l(i,e,function(e){return e.merge({prevSibling:r})})})}(E,v,y)),n.merge({blockMap:E,selectionBefore:s,selectionAfter:s.merge({anchorKey:m,anchorOffset:0,focusKey:m,focusOffset:0,isBackward:!1})})},PI}function eT(){if(qI)return UI;qI=1;var e=DN(),t=function(){if(cI)return sI;cI=1;var e=DN(),t=NN().Map;function n(n,r,i,o){var a=n.getBlockMap(),l=r.getStartKey(),s=r.getStartOffset(),c=r.getEndKey(),d=r.getEndOffset(),u=a.skipUntil(function(e,t){return t===l}).takeUntil(function(e,t){return t===c}).concat(t([[c,a.get(c)]])).map(function(t,n){var r,a;l===c?(r=s,a=d):(r=n===l?s:0,a=n===c?d:t.getLength());for(var u,f=t.getCharacterList();r<a;)u=f.get(r),f=f.set(r,o?e.applyStyle(u,i):e.removeStyle(u,i)),r++;return t.set("characterList",f)});return n.merge({blockMap:a.merge(u),selectionBefore:r,selectionAfter:r})}return sI={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=BN(),r=FN(),i=QN(),o=NN(),a=KN(),l=function(){if(NI)return II;NI=1;var e=NN(),t=GN(),n=PN(),r=e.Repeat;return II=function(e,i,o,a){i.isCollapsed()||("production"!==process.env.NODE_ENV?n(!1,"`insertText` should only be called with a collapsed range."):n(!1));var l=null;if(null!=o&&(l=o.length),null==l||0===l)return e;var s=e.getBlockMap(),c=i.getStartKey(),d=i.getStartOffset(),u=s.get(c),f=u.getText(),h=u.merge({text:f.slice(0,d)+o+f.slice(d,u.getLength()),characterList:t(u.getCharacterList(),r(a,l).toList(),d)}),p=d+l;return e.merge({blockMap:s.set(c,h),selectionAfter:i.merge({anchorOffset:p,focusOffset:p})})},II}(),s=PN(),c=YN(),d=WN(),u=JN(),f=$N(),h=o.OrderedSet,p={replaceText:function(t,n,r,i,o){var a=d(t,n),s=u(a,n),c=e.create({style:i||h(),entity:o||null});return l(s,s.getSelectionAfter(),r,c)},insertText:function(e,t,n,r,i){return t.isCollapsed()||("production"!==process.env.NODE_ENV?s(!1,"Target range must be collapsed for `insertText`."):s(!1)),p.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=p.removeRange(e,t,"backward");return p.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(e,t),o=u(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,l;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),l=e.getBlockForKey(o);var s=t.getStartOffset(),c=t.getEndOffset(),f=a.getEntityAt(s),h=l.getEntityAt(c-1);if(i===o&&f&&f===h){var p=r(e.getEntityMap(),a,l,t,n);return u(e,p)}var C=d(e,t);return u(C,t)},splitBlock:function(e,t){var n=d(e,t),r=u(n,t);return f(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return c(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=d(e,t);return n(i,t,r)}};return UI=p}function tT(){if(QI)return WI;return QI=1,WI=function(e){return Object.keys(e).map(function(t){return e[t]})},WI}function nT(){if(KI)return GI;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}KI=1;var t=ZN(),n=tT(),r=NN(),i=r.List,o=r.Repeat,a=r.Record,l=function(){return!0},s=a({start:null,end:null}),c=a({start:null,end:null,decoratorKey:null,leaves:null}),d={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new c({start:0,end:0,decoratorKey:null,leaves:i.of(new s({start:0,end:0}))}));var d=[],h=r?r.getDecorations(n,e):i(o(null,a)),p=n.getCharacterList();return t(h,f,l,function(e,t){d.push(new c({start:e,end:t,decoratorKey:h.get(e),leaves:u(p.slice(e,t).toList(),e)}))}),i(d)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new c(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return s(e)}):null}))}};function u(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,f,l,function(e,t){r.push(new s({start:e+n,end:t+n}))}),i(r)}function f(e,t){return e===t}return GI=d}function rT(){if(XI)return YI;XI=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,NN().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return YI=e}function iT(){if(tN)return eN;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tN=1;var t=rT(),n=NN(),r=PN(),i=($I||($I=1,JI=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),JI),o=(0,n.Map)(),a=i();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var s={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),s.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),s.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),s.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),s.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),s.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),s.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return s.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||("production"!==process.env.NODE_ENV?r(!1,"Unknown DraftEntity key: %s.",e):r(!1)),t},__mergeData:function(t,n){var r=s.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=s.__get(e).set("data",t);return o=o.set(e,n),n}};return eN=s}function oT(){if(rN)return nN;rN=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var l=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=l&&n>=l},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,NN().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return nN=e}function aT(){return oN?iN:(oN=1,iN=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function lT(){if(lN)return aN;lN=1;var e=new RegExp("\r","g");return aN=function(t){return t.replace(e,"")}}function sT(){if(cN)return sN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cN=1;var n=TN(),r=DN(),i=jN(),o=RN(),a=iT(),l=oT(),s=UN(),c=tT(),d=aT(),u=NN(),f=lT(),h=u.List,p=u.Record,C=u.Repeat,m=u.Map,g=u.OrderedMap,v=p({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),y=d("draft_tree_data_support")?o:i,w=function(t){var i,o;function d(){return t.apply(this,arguments)||this}o=t,(i=d).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var u=d.prototype;return u.getEntityMap=function(){return a},u.getBlockMap=function(){return this.get("blockMap")},u.getSelectionBefore=function(){return this.get("selectionBefore")},u.getSelectionAfter=function(){return this.get("selectionAfter")},u.getBlockForKey=function(e){return this.getBlockMap().get(e)},u.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlocksAsArray=function(){return this.getBlockMap().toArray()},u.getFirstBlock=function(){return this.getBlockMap().first()},u.getLastBlock=function(){return this.getBlockMap().last()},u.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},u.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},u.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},u.createEntity=function(e,t,n){return a.__create(e,t,n),this},u.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},u.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},u.addEntity=function(e){return a.__add(e),this},u.getEntity=function(e){return a.__get(e)},u.getAllEntities=function(){return a.__getAll()},u.loadWithEntities=function(e){return a.__loadWithEntities(e)},d.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new l:l.createEmpty(i.first().getKey());return new d({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},d.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=f(e),new y({key:s(),text:e,type:"unstyled",characterList:h(C(r.EMPTY,e.length))})});return d.createFromBlockArray(n)},d.fromJS=function(t){return new d(e({},t,{blockMap:g(t.blockMap).map(d.createContentBlockFromJS),selectionBefore:new l(t.selectionBefore),selectionAfter:new l(t.selectionAfter)}))},d.createContentBlockFromJS=function(t){var n=t.characterList;return new y(e({},t,{data:m(t.data),characterList:null!=n?h((Array.isArray(n)?n:c(n)).map(function(e){return r.fromJS(e)})):void 0}))},d}(v);return sN=w}function cT(){if(uN)return dN;uN=1;var e=PN(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),n===t?"ltr":"rtl"}function o(e){n=e}return dN={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),r(n)||("production"!==process.env.NODE_ENV?e(!1,"`otherDir` must be a strong direction to be converted to HTML Direction"):e(!1)),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||("production"!==process.env.NODE_ENV?e(!1,"Global direction not set."):e(!1)),n}}}function dT(){if(hN)return fN;hN=1;var e=cT(),t=PN(),n="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",r="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function l(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function s(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=l(t);return r===e.NEUTRAL?n:r}function c(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||("production"!==process.env.NODE_ENV?t(!1,"Fallback direction must be a strong direction"):t(!1)),s(n,r)}return fN={firstStrongChar:a,firstStrongCharDir:l,resolveBlockDir:s,getDirection:c,isDirectionLTR:function(t,n){return c(t,n)===e.LTR},isDirectionRTL:function(t,n){return c(t,n)===e.RTL}}}function uT(){if(gN)return mN;gN=1;return mN=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}}function fT(){if(yN)return vN;yN=1;var e,t=function(){if(CN)return pN;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}CN=1;var t=dT(),n=cT(),r=PN();return pN=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||("production"!==process.env.NODE_ENV?r(!1,"Default direction must be a strong direction (LTR or RTL)"):r(!1)):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=NN(),r=uT(),i=n.OrderedMap;return vN={getDirectionMap:function(o,a){e?e.reset():e=new t;var l=o.getBlockMap(),s=l.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),c=i(l.keySeq().zip(s));return null!=a&&n.is(a,c)?a:c}}}function hT(){if(bN)return wN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bN=1;var n=nT(),r=sT(),i=fT(),o=oT(),a=NN(),l=a.OrderedSet,s=a.Record,c=a.Stack,d=a.OrderedMap,u=a.List,f=s({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:c(),selection:null,treeMap:null,undoStack:c()}),h=function(){s.createEmpty=function(e){return this.createWithText("",e)},s.createWithText=function(e,t){return s.createWithContent(r.createFromText(e),t)},s.createWithContent=function(e,t){if(0===e.getBlockMap().count())return s.createEmpty(t);var n=e.getBlockMap().first().getKey();return s.create({currentContent:e,undoStack:c(),redoStack:c(),decorator:t||null,selection:o.createEmpty(n)})},s.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:C(n,t.decorator),directionMap:i.getDirectionMap(n)});return new s(new f(r))},s.fromJS=function(t){return new s(new f(e({},t,{directionMap:null!=t.directionMap?d(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?l(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?c(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?d(t.treeMap).map(function(e){return u(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?c(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},s.set=function(e,t){var r=e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var l,s=r.get("treeMap");return l=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),s,o,i):C(a,o),void r.merge({decorator:o,treeMap:l,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),l=e.getImmutable().get("treeMap");return l.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)});return new s(r)};var a=s.prototype;function s(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},s.setInlineStyleOverride=function(e,t){return s.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return m(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return m(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},s.acceptSelection=function(e,t){return p(e,t,!1)},s.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),p(e,t,!0)},s.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return s.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},s.moveFocusToEnd=function(e){var t=s.moveSelectionToEnd(e);return s.forceSelection(t,t.getSelection())},s.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return s.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),l=e.getCurrentContent(),d=e.getUndoStack(),u=t;a!==l.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(d=d.push(l),u=u.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(u=u.set("selectionBefore",l.getSelectionBefore()));var f=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(f=null);var h={currentContent:u,directionMap:o,undoStack:d,redoStack:c(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:f};return s.set(e,h)},s.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return s.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},s.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return s.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},s}();function p(e,t,n){return h.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function C(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function m(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}return wN=h}function pT(){if(xN)return AN;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xN=1;var n=TN(),r=DN(),i=jN(),o=RN(),a=eT(),l=hT(),s=UN(),c=aT(),d=NN(),u=function(){if(MN)return EN;MN=1;var e=RN(),t=XN(),n=NN(),r=PN(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},l=function(e,t,n,r,i){if(!i)return e;var l="after"===r,s=t.getKey(),c=n.getKey(),d=t.getParentKey(),u=t.getNextSiblingKey(),f=t.getPrevSiblingKey(),h=n.getParentKey(),p=l?n.getNextSiblingKey():c,C=l?c:n.getPrevSiblingKey();return e.withMutations(function(e){a(d,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(s))})}),a(f,e,function(e){return e.merge({nextSibling:u})}),a(u,e,function(e){return e.merge({prevSibling:f})}),a(p,e,function(e){return e.merge({prevSibling:s})}),a(C,e,function(e){return e.merge({nextSibling:s})}),a(h,e,function(e){var t=e.getChildKeys(),n=t.indexOf(c),r=l?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,s),e.merge({children:o(i)})}),a(s,e,function(e){return e.merge({nextSibling:p,prevSibling:C,parent:h})})})};return EN=function(n,o,a,s){"replace"===s&&("production"!==process.env.NODE_ENV?r(!1,"Replacing blocks is not supported."):r(!1));var c=a.getKey(),d=o.getKey();d===c&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1));var u=n.getBlockMap(),f=o instanceof e,h=[o],p=u.delete(d);f&&(h=[],p=u.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===d}).takeWhile(function(e){var t=e.getKey(),i=t===d,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){h.push(t),e.delete(t.getKey())})}));var C=p.toSeq().takeUntil(function(e){return e===a}),m=p.toSeq().skipUntil(function(e){return e===a}).skip(1),g=h.map(function(e){return[e.getKey(),e]}),v=i();if("before"===s){var y=n.getBlockBefore(c);y&&y.getKey()===o.getKey()&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=C.concat([].concat(g,[[c,a]]),m).toOrderedMap()}else if("after"===s){var w=n.getBlockAfter(c);w&&w.getKey()===d&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=C.concat([[c,a]].concat(g),m).toOrderedMap()}return n.merge({blockMap:l(v,o,a,s,f),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:d,focusKey:d})})},EN}(),f=c("draft_tree_data_support"),h=f?o:i,p=d.List,C=d.Repeat;return AN={insertAtomicBlock:function(t,i,o){var c=t.getCurrentContent(),d=t.getSelection(),u=a.removeRange(c,d,"backward"),m=u.getSelectionAfter(),g=a.splitBlock(u,m),v=g.getSelectionAfter(),y=a.setBlockType(g,v,"atomic"),w=r.create({entity:i}),b={key:s(),type:"atomic",text:o,characterList:p(C(w,o.length))},E={key:s(),type:"unstyled"};f&&(b=e({},b,{nextSibling:E.key}),E=e({},E,{prevSibling:b.key}));var M=[new h(b),new h(E)],A=n.createFromArray(M),x=a.replaceWithFragment(y,v,A),L=x.merge({selectionBefore:d,selectionAfter:x.getSelectionAfter().set("hasFocus",!0)});return l.push(t,L,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),s=e.getSelection();if("before"===r||"after"===r){var c=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=u(o,t,c,r)}else{var d=a.removeRange(o,n,"backward"),f=d.getSelectionAfter(),h=d.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=u(d,t,h,"before");else if(f.getEndOffset()===h.getLength())i=u(d,t,h,"after");else{var p=a.splitBlock(d,f),C=p.getSelectionAfter(),m=p.getBlockForKey(C.getFocusKey());i=u(p,t,m,"before")}}var g=i.merge({selectionBefore:s,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(e,g,"move-block")}}}function CT(){if(kN)return LN;kN=1;var e=NN().List,t=function(){function t(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_decorators",void 0),this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return LN=t}function mT(){if(SN)return HN;function e(e){return e.replace(/\//g,"-")}return SN=1,HN=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},HN}function gT(){if(VN)return _N;VN=1;var e=i,t=mT(),n=(0,NN().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:e.createElement("ul",{className:t("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:e.createElement("ol",{className:t("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:e.createElement("pre",{className:t("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return _N=n}function vT(){return zN?ON:(zN=1,ON={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}var yT,wT,bT,ET,MT,AT,xT,LT,kT,HT,ST,_T,VT,OT,zT,IT,NT,TT,DT,ZT,jT,RT,BT,PT,FT,UT,qT,WT,QT,GT,KT,YT,XT,JT,$T,eD,tD,nD,rD,iD,oD,aD,lD,sD,cD,dD,uD,fD,hD,pD,CD,mD,gD,vD,yD,wD,bD,ED,MD,AD,xD,LD,kD,HD,SD,_D,VD,OD,zD,ID,ND,TD,DD,ZD,jD,RD,BD,PD,FD,UD,qD,WD,QD,GD,KD,YD,XD,JD,$D,eZ,tZ,nZ,rZ,iZ,oZ,aZ,lZ,sZ,cZ,dZ,uZ,fZ,hZ,pZ,CZ,mZ,gZ,vZ,yZ,wZ,bZ,EZ,MZ,AZ,xZ,LZ,kZ,HZ,SZ,_Z={exports:{}},VZ=_Z.exports;function OZ(){return yT||(yT=1,function(e,t){!function(n,r){var i="function",o="undefined",a="object",l="string",s="major",c="model",d="name",u="type",f="vendor",h="version",p="architecture",C="console",m="mobile",g="tablet",v="smarttv",y="wearable",w="embedded",b="Amazon",E="Apple",M="ASUS",A="BlackBerry",x="Browser",L="Chrome",k="Firefox",H="Google",S="Honor",_="Huawei",V="LG",O="Microsoft",z="Motorola",I="Nvidia",N="OnePlus",T="Opera",D="OPPO",Z="Samsung",j="Sharp",R="Sony",B="Xiaomi",P="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",W=" Browser",Q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===l&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},X=function(e,t){for(var n,o,l,s,c,d,u=0;u<t.length&&!c;){var f=t[u],h=t[u+1];for(n=o=0;n<f.length&&!c&&f[n];)if(c=f[n++].exec(e))for(l=0;l<h.length;l++)d=c[++o],typeof(s=h[l])===a&&s.length>0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,d):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=d?d.replace(s[1],s[2]):r:this[s[0]]=d?s[1].call(this,d,s[2]):r:4===s.length&&(this[s[0]]=d?s[3].call(this,d.replace(s[1],s[2])):r):this[s]=d||r;u+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,h],[/opios[\/ ]+([\w\.]+)/i],[h,[d,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[d,T+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[d,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[d,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[d,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[d,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[d,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[d,"MIUI"+W]],[/fxios\/([\w\.-]+)/i],[h,[d,k]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+W],h],[/samsungbrowser\/([\w\.]+)/i],[h,[d,Z+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[d,L+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,L+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[h,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[d,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[f,Z],[u,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[f,Z],[u,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[f,E],[u,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,E],[u,g]],[/(macintosh);/i],[c,[f,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[f,j],[u,m]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[c,[f,S],[u,g]],[/honor([-\w ]+)[;\)]/i],[c,[f,S],[u,m]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[c,[f,_],[u,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[f,_],[u,m]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[c,/_/g," "],[f,B],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[c,/_/g," "],[f,B],[u,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[f,D],[u,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[c,[f,J,{OnePlus:["304","403","203"],"*":D}],[u,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[f,"Vivo"],[u,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[f,"Realme"],[u,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[f,z],[u,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[f,z],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[f,V],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[f,V],[u,m]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[c,[f,"Lenovo"],[u,g]],[/(nokia) (t[12][01])/i],[f,c,[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[c,/_/g," "],[u,m],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[c,[f,H],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[f,H],[u,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[f,R],[u,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[f,R],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[f,N],[u,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[f,b],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[f,b],[u,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,f,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[f,A],[u,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[f,M],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[f,M],[u,m]],[/(nexus 9)/i],[c,[f,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[c,/_/g," "],[u,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[f,"TCL"],[u,g]],[/(itel) ((\w+))/i],[[f,K],c,[u,J,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[f,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[f,"Meizu"],[u,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[f,"Ulefone"],[u,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[f,"Energizer"],[u,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[f,"Cat"],[u,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[f,"Smartfren"],[u,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[f,"Nothing"],[u,m]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[c,[f,"Archos"],[u,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[c,[f,"Archos"],[u,m]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,c,[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[f,c,[u,m]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,c,[u,g]],[/(surface duo)/i],[c,[f,O],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[f,"Fairphone"],[u,m]],[/(u304aa)/i],[c,[f,"AT&T"],[u,m]],[/\bsie-(\w*)/i],[c,[f,"Siemens"],[u,m]],[/\b(rct\w+) b/i],[c,[f,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[c,[f,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[c,[f,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[f,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[c,[f,"NuVision"],[u,g]],[/\b(k88) b/i],[c,[f,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[c,[f,"ZTE"],[u,m]],[/\b(gen\d{3}) b.+49h/i],[c,[f,"Swiss"],[u,m]],[/\b(zur\d{3}) b/i],[c,[f,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[c,[f,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],c,[u,g]],[/\b(ns-?\w{0,9}) b/i],[c,[f,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[f,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],c,[u,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],c,[u,m]],[/\b(ph-1) /i],[c,[f,"Essential"],[u,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[f,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[c,[f,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[c,[f,"Rotor"],[u,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[c,[f,I],[u,g]],[/(sprint) (\w+)/i],[f,c,[u,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,O],[u,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,P],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,P],[u,m]],[/smart-tv.+(samsung)/i],[f,[u,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,Z],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,V],[u,v]],[/(apple) ?tv/i],[f,[c,E+" TV"],[u,v]],[/crkey/i],[[c,L+"cast"],[f,H],[u,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[f,b],[u,v]],[/(shield \w+ tv)/i],[c,[f,I],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[f,j],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[f,R],[u,v]],[/(mi(tv|box)-?\w+) bui/i],[c,[f,B],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[f,c,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[c,Y],[u,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[c,[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,c,[u,C]],[/droid.+; (shield)( bui|\))/i],[c,[f,I],[u,C]],[/(playstation \w+)/i],[c,[f,R],[u,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[f,O],[u,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[c,[f,Z],[u,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,c,[u,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[c,[f,D],[u,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[f,E],[u,y]],[/(opwwe\d{3})/i],[c,[f,N],[u,y]],[/(moto 360)/i],[c,[f,z],[u,y]],[/(smartwatch 3)/i],[c,[f,R],[u,y]],[/(g watch r)/i],[c,[f,V],[u,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[f,P],[u,y]],[/droid.+; (glass) \d/i],[c,[f,H],[u,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,c,[u,y]],[/; (quest( \d| pro)?)/i],[c,[f,F],[u,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[u,w]],[/(aeobc)\b/i],[c,[f,b],[u,w]],[/(homepod).+mac os/i],[c,[f,E],[u,w]],[/windows iot/i],[[u,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,m]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[c,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,h],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[h,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,J,$],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,h],[/\(bb(10);/i],[h,[d,A]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[d,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[d,L+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,h],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var C=typeof n!==o&&n.navigator?n.navigator:r,v=e||(C&&C.userAgent?C.userAgent:""),y=C&&C.userAgentData?C.userAgentData:r,w=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,b=C&&C.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.browser),e[s]=function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[h]),b&&C&&C.brave&&typeof C.brave.isBrave==i&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[p]=r,X.call(e,v,w.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[c]=r,e[u]=r,X.call(e,v,w.device),b&&!e[u]&&y&&y.mobile&&(e[u]=m),b&&"Macintosh"==e[c]&&C&&typeof C.standalone!==o&&C.maxTouchPoints&&C.maxTouchPoints>2&&(e[c]="iPad",e[u]=g),e},this.getEngine=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.engine),e},this.getOS=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.os),b&&!e[d]&&y&&y.platform&&"Unknown"!=y.platform&&(e[d]=y.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===l&&e.length>500?Y(e,500):e,this},this.setUA(v),this};te.VERSION="0.7.41",te.BROWSER=Q([d,h,s]),te.CPU=Q([p]),te.DEVICE=Q([c,f,u,C,m,v,g,y,w]),te.ENGINE=te.OS=Q([d,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==o&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:VZ)}(_Z,_Z.exports)),_Z.exports}function zZ(){if(bT)return wT;bT=1;var e=OZ(),t="Unknown",n={"Mac OS":"Mac OS X"};var r,i=(new e).getResult(),o=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(i.browser.version),a={browserArchitecture:i.cpu.architecture||t,browserFullVersion:i.browser.version||t,browserMinorVersion:o.minor||t,browserName:i.browser.name||t,browserVersion:i.browser.major||t,deviceName:i.device.model||t,engineName:i.engine.name||t,engineVersion:i.engine.version||t,platformArchitecture:i.cpu.architecture||t,platformName:(r=i.os.name,n[r]||r||t),platformVersion:i.os.version||t,platformFullVersion:i.os.version||t};return wT=a}function IZ(){if(MT)return ET;MT=1;var e=PN(),t=/\./,n=/\|\|/,r=/\s+\-\s+/,i=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,o=/^(\d*)(.*)/;function a(t,i){var o=t.split(n);return o.length>1?o.some(function(e){return g.contains(e,i)}):function(t,n){var i=t.split(r);if(i.length>0&&i.length<=2||("production"!==process.env.NODE_ENV?e(!1,'the "-" operator expects exactly 2 operands'):e(!1)),1===i.length)return l(i[0],n);var o=i[0],a=i[1];return f(o)&&f(a)||("production"!==process.env.NODE_ENV?e(!1,'operands to the "-" operator must be simple (no modifiers)'):e(!1)),l(">="+o,n)&&l("<="+a,n)}(t=o[0].trim(),i)}function l(e,n){if(""===(e=e.trim()))return!0;var r=n.split(t),i=d(e),o=i.modifier,a=i.rangeComponents;switch(o){case"<":return s(r,a);case"<=":return function(e,t){var n=m(e,t);return-1===n||0===n}(r,a);case">=":return c(r,a);case">":return 1===m(r,a);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var i=r.length-1,o=parseInt(r[i],10);u(o)&&(r[i]=o+1+"");return c(e,n)&&s(e,r)}(r,a);default:return function(e,t){return 0===m(e,t)}(r,a)}}function s(e,t){return-1===m(e,t)}function c(e,t){var n=m(e,t);return 1===n||0===n}function d(n){var r=n.split(t),o=r[0].match(i);return o||("production"!==process.env.NODE_ENV?e(!1,"expected regex to match but it did not"):e(!1)),{modifier:o[1],rangeComponents:[o[2]].concat(r.slice(1))}}function u(e){return!isNaN(e)&&isFinite(e)}function f(e){return!d(e).modifier}function h(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function p(e,t){var n=e.match(o)[1],r=t.match(o)[1],i=parseInt(n,10),a=parseInt(r,10);return u(i)&&u(a)&&i!==a?C(i,a):C(e,t)}function C(t,n){return typeof t!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,'"a" and "b" must be of the same type'):e(!1)),t>n?1:t<n?-1:0}function m(e,t){for(var n=function(e,t){h(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var i=n;i<e.length;i++)e[i]="0"}return h(t,e.length),[e,t]}(e,t),r=n[0],i=n[1],o=0;o<i.length;o++){var a=p(r[o],i[o]);if(a)return a}return 0}var g={contains:function(e,t){return a(e.trim(),t.trim())}};return ET=g}function NZ(){if(ST)return HT;ST=1;var e=zZ(),t=IZ(),n=function(){if(xT)return AT;xT=1;var e=Object.prototype.hasOwnProperty;return AT=function(t,n,r){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=n.call(r,t[o],o,t));return i},AT}(),r=kT?LT:(kT=1,LT=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}});function i(e,n,r,i){if(e===r)return!0;if(!r.startsWith(e))return!1;var o=r.slice(e.length);return!!n&&(o=i?i(o):o,t.contains(o,n))}function o(t){return"Windows"===e.platformName?t.replace(/^\s*NT/,""):t}return HT=n({isBrowser:function(t){return i(e.browserName,e.browserFullVersion,t)},isBrowserArchitecture:function(t){return i(e.browserArchitecture,null,t)},isDevice:function(t){return i(e.deviceName,null,t)},isEngine:function(t){return i(e.engineName,e.engineVersion,t)},isPlatform:function(t){return i(e.platformName,e.platformFullVersion,t,o)},isPlatformArchitecture:function(t){return i(e.platformArchitecture,null,t)}},r)}function TZ(){if(VT)return _T;return VT=1,_T=function(e){return e&&e.ownerDocument?e.ownerDocument:document}}function DZ(){if(zT)return OT;return zT=1,OT=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}}function ZZ(){if(NT)return IT;NT=1;var e=DZ();return IT=function t(n){if(e(n)){var r=n,i=r.getAttribute("data-offset-key");if(i)return i;for(var o=0;o<r.childNodes.length;o++){var a=t(r.childNodes[o]);if(a)return a}}return null},IT}function jZ(){if(DT)return TT;DT=1;var e=TZ(),t=ZZ();return TT=function(n){for(var r=n;r&&r!==e(n).documentElement;){var i=t(r);if(null!=i)return i;r=r.parentNode}return null},TT}function RZ(){if(jT)return ZT;return jT=1,ZT=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}}function BZ(){if(FT)return PT;FT=1;var e="-";return PT={encode:function(t,n,r){return t+e+n+e+r},decode:function(t){var n=t.split(e).reverse(),r=n[0],i=n[1];return{blockKey:n.slice(2).reverse().join(e),decoratorKey:parseInt(i,10),leafKey:parseInt(r,10)}}}}function PZ(){return qT?UT:(qT=1,UT={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105})}function FZ(){return QT?WT:(QT=1,WT={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}})}function UZ(){if(KT)return GT;return KT=1,GT=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}}function qZ(){if(XT)return YT;XT=1;var e=PN(),t=UZ();return YT=function(n){var r=n.editorContainer;return r||("production"!==process.env.NODE_ENV?e(!1,"Missing editorNode"):e(!1)),t(r.firstChild)||("production"!==process.env.NODE_ENV?e(!1,"editorNode.firstChild is not an HTMLElement"):e(!1)),r.firstChild}}function WZ(){if($T)return JT;$T=1;var e=BZ(),t=uT();return JT=function(n,r,i,o,a){var l=t(n.getSelection());if(!r||!o)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var s=e.decode(r),c=s.blockKey,d=n.getBlockTree(c),u=d&&d.getIn([s.decoratorKey,"leaves",s.leafKey]),f=e.decode(o),h=f.blockKey,p=n.getBlockTree(h),C=p&&p.getIn([f.decoratorKey,"leaves",f.leafKey]);if(!u||!C)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var m=u.get("start"),g=C.get("start"),v=u?m+i:null,y=C?g+a:null;if(l.getAnchorKey()===c&&l.getAnchorOffset()===v&&l.getFocusKey()===h&&l.getFocusOffset()===y)return l;var w=!1;if(c===h){var b=u.get("end"),E=C.get("end");w=g===m&&E===b?a<i:g<m}else{var M=n.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===c||e===h}).first();w=M===h}return l.merge({anchorKey:c,anchorOffset:v,focusKey:h,focusOffset:y,isBackward:w})},JT}function QZ(){if(tD)return eD;tD=1;var e=jZ(),t=ZZ(),n=WZ(),r=PN(),i=DZ(),o=uT();function a(n,a,s){var c=a,d=e(c);(null!=d||n&&(n===c||n.firstChild===c)||("production"!==process.env.NODE_ENV?r(!1,"Unknown node in selection range."):r(!1)),n===c)&&(c=c.firstChild,i(c)||("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents node."):r(!1)),"true"!==(c=c).getAttribute("data-contents")&&("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents structure."):r(!1)),s>0&&(s=c.childNodes.length));if(0===s){var u=null;if(null!=d)u=d;else{var f=function(e){for(;e.firstChild&&(i(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||t(e.firstChild));)e=e.firstChild;return e}(c);u=o(t(f))}return{key:u,offset:0}}var h=c.childNodes[s-1],p=null,C=null;if(t(h)){var m=function(e){for(;e.lastChild&&(i(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||t(e.lastChild));)e=e.lastChild;return e}(h);p=o(t(m)),C=l(m)}else p=o(d),C=l(h);return{key:p,offset:C}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}return eD=function(t,r,i,l,s,c){var d=i.nodeType===Node.TEXT_NODE,u=s.nodeType===Node.TEXT_NODE;if(d&&u)return{selectionState:n(t,o(e(i)),l,o(e(s)),c),needsRecovery:!1};var f=null,h=null,p=!0;return d?(f={key:o(e(i)),offset:l},h=a(r,s,c)):u?(h={key:o(e(s)),offset:c},f=a(r,i,l)):(f=a(r,i,l),h=a(r,s,c),i===s&&l===c&&(p=!!i.firstChild&&"BR"!==i.firstChild.nodeName)),{selectionState:n(t,f.key,f.offset,h.key,h.offset),needsRecovery:p}}}function GZ(){if(rD)return nD;rD=1;var e=QZ();return nD=function(t,n){var r=n.ownerDocument.defaultView.getSelection(),i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,l=r.focusOffset;return 0===r.rangeCount||null==i||null==a?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:e(t,n,i,o,a,l)}}function KZ(){if(oD)return iD;oD=1;var e=FZ(),t=hT(),n=qZ(),r=GZ();return iD=function(i){if(i._blockSelectEvents||i._latestEditorState!==i.props.editorState){if(i._blockSelectEvents){var o=i.props.editorState.getSelection();e.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(o.toJS())})}}else{var a=i.props.editorState,l=r(a,n(i)),s=l.selectionState;s!==a.getSelection()&&(a=l.needsRecovery?t.forceSelection(a,s):t.acceptSelection(a,s),i.update(a))}}}function YZ(){if(lD)return aD;return lD=1,aD={notEmptyKey:function(e){return null!=e&&""!=e}},aD}function XZ(){if(cD)return sD;cD=1;var e=YZ().notEmptyKey;function t(t,n){return e(n)&&"MUTABLE"===t.__get(n).getMutability()?n:null}return sD=function(e,n){var r;if(n.isCollapsed()){var i=n.getAnchorKey(),o=n.getAnchorOffset();return o>0?(r=e.getBlockForKey(i).getEntityAt(o-1))!==e.getBlockForKey(i).getEntityAt(o)?null:t(e.getEntityMap(),r):null}var a=n.getStartKey(),l=n.getStartOffset(),s=e.getBlockForKey(a);return r=l===s.getLength()?null:s.getEntityAt(l),t(e.getEntityMap(),r)},sD}function JZ(){if(uD)return dD;uD=1;var e=function(){if(BT)return RT;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}BT=1;var t=NZ(),n=jZ(),r=RZ(),i=NN(),o=PN(),a=uT(),l=i.Map,s={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},c=t.isBrowser("IE <= 11"),d=function(){function t(t){var n=this;e(this,"observer",void 0),e(this,"container",void 0),e(this,"mutations",void 0),e(this,"onCharData",void 0),this.container=t,this.mutations=l();var i=r(t);i.MutationObserver&&!c?this.observer=new i.MutationObserver(function(e){return n.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||("production"!==process.env.NODE_ENV?o(!1,"Expected target to be an instance of Node"):o(!1)),n.registerMutation({type:"characterData",target:e.target})}}var i=t.prototype;return i.start=function(){this.observer?this.observer.observe(this.container,s):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},i.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=l(),t},i.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},i.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return c?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},i.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var r=a(n(e.target));this.mutations=this.mutations.set(r,t)}},t}();return RT=d}(),t=eT(),n=BZ(),r=hT(),i=PZ(),o=NZ(),a=KZ(),l=qZ(),s=GZ(),c=XZ(),d=uT(),u=o.isBrowser("IE"),f=!1,h=!1,p=null;var C={onCompositionStart:function(t){h=!0,function(t){p||(p=new e(l(t))).start()}(t)},onCompositionEnd:function(e){f=!1,h=!1,setTimeout(function(){f||C.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){if(!h)return C.resolveComposition(e),void e._onKeyDown(t);t.which!==i.RIGHT&&t.which!==i.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===i.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!h){var i=d(p).stopAndFlushMutations();p=null,f=!0;var o=r.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),i.size){var a=o.getCurrentContent();i.forEach(function(e,i){var l=n.decode(i),s=l.blockKey,d=l.decoratorKey,u=l.leafKey,f=o.getBlockTree(s).getIn([d,"leaves",u]),h=f.start,p=f.end,C=o.getSelection().merge({anchorKey:s,focusKey:s,anchorOffset:h,focusOffset:p,isBackward:!1}),m=c(a,C),g=a.getBlockForKey(s).getInlineStyleAt(h);a=t.replaceText(a,C,e,g,m),o=r.set(o,{currentContent:a})});var C=s(o,l(e)).selectionState;e.restoreEditorDOM();var m=u?r.forceSelection(o,C):r.acceptSelection(o,C);e.update(r.push(m,a,"insert-characters"))}else e.update(o)}}};return dD=C}function $Z(){if(hD)return fD;hD=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=BZ(),r=i,o=dT(),a=cT(),l=function(e){var i,l;function s(){return e.apply(this,arguments)||this}return l=e,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,s.prototype.render=function(){var e=this.props,i=e.block,l=e.children,s=e.contentState,c=e.decorator,d=e.decoratorKey,u=e.direction,f=e.leafSet,h=e.text,p=i.getKey(),C=f.get("leaves"),m=c.getComponentForKey(d),g=c.getPropsForKey(d),v=n.encode(p,parseInt(d,10),0),y=h.slice(C.first().get("start"),C.last().get("end")),w=a.getHTMLDirIfDifferent(o.getDirection(y),u);return r.createElement(m,t({},g,{contentState:s,decoratedText:y,dir:w,key:v,entityKey:i.getEntityAt(f.get("start")),offsetKey:v}),l)},s}(r.Component);return fD=l}function ej(){if(CD)return pD;function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}CD=1;var n=i,r=NZ(),o=PN(),a=DZ(),l=r.isBrowser("IE <= 11");var s=function(r){var i,s;function c(n){var i;return t(e(i=r.call(this,n)||this),"_forceFlag",void 0),t(e(i),"_node",void 0),i._forceFlag=!1,i}s=r,(i=c).prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s;var d=c.prototype;return d.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;a(t)||("production"!==process.env.NODE_ENV?o(!1,"node is not an Element"):o(!1));var r=t;return n?!function(e){return l?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},d.componentDidMount=function(){this._forceFlag=!this._forceFlag},d.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},d.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},l?n.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"A","data-text":"true",ref:e})):function(e){return l?n.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"B","data-text":"true",ref:e})}(function(e){return t._node=e}):n.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},c}(n.Component);return pD=s}function tj(){if(gD)return mD;gD=1;var e=DZ();return mD=function(t){return!(!t||!t.ownerDocument)&&(e(t)&&"BR"===t.nodeName)}}function nj(){return yD?vD:(yD=1,vD={initODS:function(){},handleExtensionCausedError:function(){}})}function rj(){if(MD)return ED;MD=1;var e=bD?wD:(bD=1,wD=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))});return ED=function(t){return e(t)&&3==t.nodeType}}function ij(){if(xD)return AD;xD=1;var e=rj();return AD=function t(n,r){return!(!n||!r)&&(n===r||!e(n)&&(e(r)?t(n,r.parentNode):"contains"in n?n.contains(r):!!n.compareDocumentPosition&&!!(16&n.compareDocumentPosition(r))))},AD}function oj(){if(kD)return LD;return kD=1,LD=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}}function aj(){if(SD)return HD;SD=1;var e=nj(),t=FZ(),n=NZ(),r=ij(),i=oj(),o=TZ(),a=PN(),l=DZ(),s=n.isBrowser("IE");function c(e,t){if(!e)return"[empty]";var n=d(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(l(n)||("production"!==process.env.NODE_ENV?a(!1,"Node must be an Element if it is not a text node."):a(!1)),n.outerHTML)}function d(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return o(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var i=e.cloneNode();1===i.nodeType&&n.length&&i.setAttribute("data-labels",n.join(", "));for(var a=e.childNodes,l=0;l<a.length;l++)i.appendChild(d(a[l],t));return i}function u(e,t){for(var n=e,r=n;n;){if(l(n)&&r.hasAttribute("contenteditable"))return c(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function f(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function h(e,n,o,a){var l=i();if(e.extend&&null!=n&&r(l,n)){o>f(n)&&t.logSelectionStateFailure({anonymizedDom:u(n),extraParams:JSON.stringify({offset:o}),selectionState:JSON.stringify(a.toJS())});var s=n===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(n,o)}catch(r){throw t.logSelectionStateFailure({anonymizedDom:u(n,function(t){var n=[];return t===l&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n}),extraParams:JSON.stringify({activeElementName:l?l.nodeName:null,nodeIsFocus:n===e.focusNode,nodeWasFocus:s,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:r?""+r:null,offset:o},null,2),selectionState:JSON.stringify(a.toJS(),null,2)}),r}}else if(n&&e.rangeCount>0){var c=e.getRangeAt(0);c.setEnd(n,o),e.addRange(c.cloneRange())}}function p(n,r,i,a){var l=o(r).createRange();if(i>f(r)&&(t.logSelectionStateFailure({anonymizedDom:u(r),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(a.toJS())}),e.handleExtensionCausedError()),l.setStart(r,i),s)try{n.addRange(l)}catch(e){"production"!==process.env.NODE_ENV&&console.warn("Call to selection.addRange() threw exception: ",e)}else n.addRange(l)}return HD={setDraftEditorSelection:function(e,t,n,i,a){var l=o(t);if(r(l.documentElement,t)){var s=l.defaultView.getSelection(),c=e.getAnchorKey(),d=e.getAnchorOffset(),u=e.getFocusKey(),f=e.getFocusOffset(),C=e.getIsBackward();if(!s.extend&&C){var m=c,g=d;c=u,d=f,u=m,f=g,C=!1}var v=c===n&&i<=d&&a>=d,y=u===n&&i<=f&&a>=f;if(v&&y)return s.removeAllRanges(),p(s,t,d-i,e),void h(s,t,f-i,e);if(C){if(y&&(s.removeAllRanges(),p(s,t,f-i,e)),v){var w=s.focusNode,b=s.focusOffset;s.removeAllRanges(),p(s,t,d-i,e),h(s,w,b,e)}}else v&&(s.removeAllRanges(),p(s,t,d-i,e)),y&&h(s,t,f-i,e)}},addFocusToSelection:h}}function lj(){if(VD)return _D;VD=1;var e=Fh();var t=ej(),n=i,r=PN(),o=tj(),a=aj().setDraftEditorSelection,l=function(i){var l,s;function c(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=i.call.apply(i,[this].concat(n))||this),"leaf",void 0),e}s=i,(l=c).prototype=Object.create(s.prototype),l.prototype.constructor=l,l.__proto__=s;var d=c.prototype;return d._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,i=t.start,l=t.text,s=n.getKey(),c=i+l.length;if(e.hasEdgeWithin(s,i,c)){var d=this.leaf;d||("production"!==process.env.NODE_ENV?r(!1,"Missing node"):r(!1));var u,f=d.firstChild;f||("production"!==process.env.NODE_ENV?r(!1,"Missing child"):r(!1)),f.nodeType===Node.TEXT_NODE?u=f:o(f)?u=d:(u=f.firstChild)||("production"!==process.env.NODE_ENV?r(!1,"Missing targetNode"):r(!1)),a(e,u,s,i,c)}}},d.shouldComponentUpdate=function(e){var t=this.leaf;return t||("production"!==process.env.NODE_ENV?r(!1,"Missing leafNode"):r(!1)),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},d.componentDidUpdate=function(){this._setSelection()},d.componentDidMount=function(){this._setSelection()},d.render=function(){var r=this,i=this.props.block,o=this.props.text;o.endsWith("\n")&&this.props.isLast&&(o+="\n");var a=this.props,l=a.customStyleMap,s=a.customStyleFn,c=a.offsetKey,d=a.styleSet,u=d.reduce(function(t,n){var r={},i=l[n];return void 0!==i&&t.textDecoration!==i.textDecoration&&(r.textDecoration=[t.textDecoration,i.textDecoration].join(" ").trim()),e(t,i,r)},{});if(s){var f=s(d,i);u=e(u,f)}return n.createElement("span",{"data-offset-key":c,ref:function(e){return r.leaf=e},style:u},n.createElement(t,null,o))},c}(n.Component);return _D=l}function sj(){if(zD)return OD;zD=1;var e=$Z(),t=lj(),n=BZ(),r=NN(),o=i,a=mT();r.List;var l=function(r){var i,l;function s(){return r.apply(this,arguments)||this}return l=r,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,s.prototype.render=function(){var r=this.props,i=r.block,l=r.contentState,s=r.customStyleFn,c=r.customStyleMap,d=r.decorator,u=r.direction,f=r.forceSelection,h=r.hasSelection,p=r.selection,C=r.tree,m=i.getKey(),g=i.getText(),v=C.size-1,y=this.props.children||C.map(function(r,a){var C=r.get("decoratorKey"),y=r.get("leaves"),w=y.size-1,b=y.map(function(e,r){var l=n.encode(m,a,r),d=e.get("start"),u=e.get("end");return o.createElement(t,{key:l,offsetKey:l,block:i,start:d,selection:h?p:null,forceSelection:f,text:g.slice(d,u),styleSet:i.getInlineStyleAt(d),customStyleMap:c,customStyleFn:s,isLast:C===v&&r===w})}).toArray();return C&&d?o.createElement(e,{block:i,children:b,contentState:l,decorator:d,decoratorKey:C,direction:u,leafSet:r,text:g,key:a}):b}).toArray();return o.createElement("div",{"data-offset-key":n.encode(m,0,0),className:a({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===u,"public/DraftStyleDefault/rtl":"RTL"===u})},y)},s}(o.Component);return OD=l}function cj(){if(ND)return ID;function e(e,t){return!!t&&(e===t.documentElement||e===t.body)}return ND=1,ID={getTop:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollTop||n.documentElement.scrollTop:t.scrollTop},setTop:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollTop=r.documentElement.scrollTop=n:t.scrollTop=n},getLeft:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollLeft||n.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollLeft=r.documentElement.scrollLeft=n:t.scrollLeft=n}}}function dj(){if(BD)return RD;BD=1;var e=function(){if(DD)return TD;DD=1;var e=/-(.)/g;return TD=function(t){return t.replace(e,function(e,t){return t.toUpperCase()})}}(),t=function(){if(jD)return ZD;jD=1;var e=/([A-Z])/g;return ZD=function(t){return t.replace(e,"-$1").toLowerCase()}}();function n(e){return null==e?e:String(e)}return RD=function(r,i){var o;if(window.getComputedStyle&&(o=window.getComputedStyle(r,null)))return n(o.getPropertyValue(t(i)));if(document.defaultView&&document.defaultView.getComputedStyle){if(o=document.defaultView.getComputedStyle(r,null))return n(o.getPropertyValue(t(i)));if("display"===i)return"none"}return r.currentStyle?n("float"===i?r.currentStyle.cssFloat||r.currentStyle.styleFloat:r.currentStyle[e(i)]):n(r.style&&r.style[e(i)])}}function uj(){if(FD)return PD;function e(e,n){var r=t.get(e,n);return"auto"===r||"scroll"===r}FD=1;var t={get:dj(),getScrollParent:function(t){if(!t)return null;for(var n=t.ownerDocument;t&&t!==n.body;){if(e(t,"overflow")||e(t,"overflowY")||e(t,"overflowX"))return t;t=t.parentNode}return n.defaultView||n.parentWindow}};return PD=t}function fj(){if(QD)return WD;QD=1;var e=function(){if(qD)return UD;qD=1;var e=ij();return UD=function(t){var n=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!e(n,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-n.clientLeft,right:Math.round(r.right)-n.clientLeft,top:Math.round(r.top)-n.clientTop,bottom:Math.round(r.bottom)-n.clientTop}}}();return WD=function(t){var n=e(t);return{x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top}}}function hj(){if($D)return JD;$D=1;var e=function(){if(KD)return GD;KD=1;var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;return GD=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}}(),t=XD?YD:(XD=1,YD=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}});return JD=function(n){var r=e(n.ownerDocument||n.document);n.Window&&n instanceof n.Window&&(n=r);var i=t(n),o=n===r?n.ownerDocument.documentElement:n,a=n.scrollWidth-o.clientWidth,l=n.scrollHeight-o.clientHeight;return i.x=Math.max(0,Math.min(i.x,a)),i.y=Math.max(0,Math.min(i.y,l)),i}}function pj(){if(tZ)return eZ;function e(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function t(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||t()}}return tZ=1,n.withoutScrollbars=function(){return{width:e(),height:t()}},eZ=n}function Cj(){if(rZ)return nZ;rZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=sj(),a=BZ(),l=i,s=cj(),c=uj(),d=fj(),u=hj(),f=pj(),h=NN(),p=PN(),C=UZ();h.List;var m=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},g=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},y=function(e,t,r,i,o,a){var l={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},s=i(e);return s&&(l.className=s),void 0!==o.customEditable&&(l=n({},l,{contentEditable:o.customEditable,suppressContentEditableWarning:!0})),l},w=function(e){var i,h;function w(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(i))||this),"wrapperRef",l.createRef()),t}h=e,(i=w).prototype=Object.create(h.prototype),i.prototype.constructor=i,i.__proto__=h;var b=w.prototype;return b.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,i=t.tree,o=!n.getChildKeys().isEmpty(),a=n!==e.block||i!==e.tree||r!==e.direction||m(e.selection,e.block.getKey())&&e.forceSelection;return o||a},b.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,i=c.getScrollParent(n),o=u(i);if(i===window){var a=d(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{C(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1));var l=n;(r=l.offsetHeight+l.offsetTop-(i.offsetHeight+o.y))>0&&s.setTop(i,s.getTop(i)+r+10)}}}},b.render=function(){var e=this,r=this.props,i=r.block,s=r.blockRenderMap,c=r.blockRendererFn,d=r.blockStyleFn,u=r.contentState,f=r.decorator,h=r.editorKey,p=r.editorState,C=r.customStyleFn,b=r.customStyleMap,E=r.direction,M=r.forceSelection,A=r.selection,x=r.tree,L=null;i.children.size&&(L=i.children.reduce(function(t,r){var i=a.encode(r,0,0),o=u.getBlockForKey(r),f=v(o,c),C=f.CustomComponent||w,m=g(o,s),b=m.Element,E=m.wrapperTemplate,M=y(o,h,i,d,f,null),A=n({},e.props,{tree:p.getBlockTree(r),blockProps:f.customProps,offsetKey:i,block:o});return t.push(l.createElement(b,M,l.createElement(C,A))),!E||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(o,u)||function(e,t,n){var r=[],i=!0,o=!1,s=void 0;try{for(var c,d=n.reverse()[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var u=c.value;if(u.type!==t)break;r.push(u)}}catch(e){o=!0,s=e}finally{try{i||null==d.return||d.return()}finally{if(o)throw s}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),h=f[0].key;n.push(l.cloneElement(e,{key:"".concat(h,"-wrap"),"data-offset-key":a.encode(h,0,0)},f))}(E,b,t),t},[]));var k=i.getKey(),H=a.encode(k,0,0),S=v(i,c),_=S.CustomComponent,V=null!=_?l.createElement(_,t({},this.props,{tree:p.getBlockTree(k),blockProps:S.customProps,offsetKey:H,block:i})):l.createElement(o,{block:i,children:L,contentState:u,customStyleFn:C,customStyleMap:b,decorator:f,direction:E,forceSelection:M,hasSelection:m(A,k),selection:A,tree:x});if(i.getParentKey())return V;var O=g(i,s).Element,z=y(i,h,H,d,S,this.wrapperRef);return l.createElement(O,z,V)},w}(l.Component);return nZ=w}function mj(){if(oZ)return iZ;oZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=Cj(),r=BZ(),o=i,a=uT(),l=function(e){var i,l;function s(){return e.apply(this,arguments)||this}l=e,(i=s).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var c=s.prototype;return c.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),s=t.getDecorator(),c=n.getDecorator();return i!==o||a!==l||s!==c||n.mustForceSelection()},c.render=function(){for(var e=this.props,i=e.blockRenderMap,l=e.blockRendererFn,s=e.blockStyleFn,c=e.customStyleMap,d=e.customStyleFn,u=e.editorState,f=e.editorKey,h=e.textDirectionality,p=u.getCurrentContent(),C=u.getSelection(),m=u.mustForceSelection(),g=u.getDecorator(),v=a(u.getDirectionMap()),y=[],w=p.getBlocksAsArray()[0];w;){var b=w.getKey(),E={blockRenderMap:i,blockRendererFn:l,blockStyleFn:s,contentState:p,customStyleFn:d,customStyleMap:c,decorator:g,editorKey:f,editorState:u,forceSelection:m,selection:C,block:w,direction:h||v.get(b),tree:u.getBlockTree(b)},M=(i.get(w.getType())||i.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:b},E)),wrapperTemplate:M,key:b,offsetKey:r.encode(b,0,0)});var A=w.getNextSiblingKey();w=A?p.getBlockForKey(A):null}for(var x=[],L=0;L<y.length;){var k=y[L];if(k.wrapperTemplate){var H=[];do{H.push(y[L].block),L++}while(L<y.length&&y[L].wrapperTemplate===k.wrapperTemplate);var S=o.cloneElement(k.wrapperTemplate,{key:k.key+"-wrap","data-offset-key":k.offsetKey},H);x.push(S)}else x.push(k.block),L++}return o.createElement("div",{"data-contents":"true"},x)},s}(o.Component);return iZ=l}function gj(){if(lZ)return aZ;lZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=lj(),r=BZ(),o=i,a=cj(),l=uj(),s=dT(),c=cT(),d=mT(),u=fj(),f=hj(),h=pj(),p=PN(),C=UZ(),m=uT(),g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},v=function(e){var i,v;function y(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}v=e,(i=y).prototype=Object.create(v.prototype),i.prototype.constructor=i,i.__proto__=v;var w=y.prototype;return w.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection},w.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,i=l.getScrollParent(n),o=f(i);if(i===window){var s=u(n);(r=s.y+s.height-h().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{C(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1)),(r=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&a.setTop(i,a.getTop(i)+r+10)}}}}},w._renderChildren=function(){var e=this,i=this.props.block,a=i.getKey(),l=i.getText(),d=this.props.tree.size-1,u=g(this.props.selection,a);return this.props.tree.map(function(f,h){var p=f.get("leaves");if(0===p.size)return null;var C=p.size-1,g=p.map(function(t,s){var c=r.encode(a,h,s),f=t.get("start"),p=t.get("end");return o.createElement(n,{key:c,offsetKey:c,block:i,start:f,selection:u?e.props.selection:null,forceSelection:e.props.forceSelection,text:l.slice(f,p),styleSet:i.getInlineStyleAt(f),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:h===d&&s===C})}).toArray(),v=f.get("decoratorKey");if(null==v)return g;if(!e.props.decorator)return g;var y=m(e.props.decorator),w=y.getComponentForKey(v);if(!w)return g;var b=y.getPropsForKey(v),E=r.encode(a,h,0),M=p.first().get("start"),A=p.last().get("end"),x=l.slice(M,A),L=i.getEntityAt(f.get("start")),k=c.getHTMLDirIfDifferent(s.getDirection(x),e.props.direction),H={contentState:e.props.contentState,decoratedText:x,dir:k,start:M,end:A,blockKey:a,entityKey:L,offsetKey:E};return o.createElement(w,t({},b,H,{key:E}),g)}).toArray()},w.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,i=d({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return o.createElement("div",{"data-offset-key":r,className:i,ref:function(t){return e._node=t}},this._renderChildren())},y}(o.Component);return aZ=v}function vj(){if(uZ)return dZ;uZ=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=gj(),a=BZ(),l=i,s=mT(),c=(cZ||(cZ=1,sZ=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var i=arguments[r];i&&(t=(t?t+" ":"")+i)}return t}),sZ),d=uT(),u=function(e,t,n,r){return s({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){var r,i;function s(){return e.apply(this,arguments)||this}i=e,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var f=s.prototype;return f.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),s=t.getDecorator(),c=n.getDecorator();return i!==o||a!==l||s!==c||n.mustForceSelection()},f.render=function(){for(var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,s=e.blockStyleFn,f=e.customStyleMap,h=e.customStyleFn,p=e.editorState,C=e.editorKey,m=e.preventScroll,g=e.textDirectionality,v=p.getCurrentContent(),y=p.getSelection(),w=p.mustForceSelection(),b=p.getDecorator(),E=d(p.getDirectionMap()),M=v.getBlocksAsArray(),A=[],x=null,L=null,k=0;k<M.length;k++){var H=M[k],S=H.getKey(),_=H.getType(),V=i(H),O=void 0,z=void 0,I=void 0;V&&(O=V.component,z=V.props,I=V.editable);var N=g||E.get(S),T=a.encode(S,0,0),D={contentState:v,block:H,blockProps:z,blockStyleFn:s,customStyleMap:f,customStyleFn:h,decorator:b,direction:N,forceSelection:w,offsetKey:T,preventScroll:m,selection:y,tree:p.getBlockTree(S)},Z=r.get(_)||r.get("unstyled"),j=Z.wrapper,R=Z.element||r.get("unstyled").element,B=H.getDepth(),P="";if(s&&(P=s(H)),"li"===R)P=c(P,u(_,B,L!==j||null===x||B>x,N));var F=O||o,U={className:P,"data-block":!0,"data-editor":C,"data-offset-key":T,key:S};void 0!==I&&(U=n({},U,{contentEditable:I,suppressContentEditableWarning:!0}));var q=l.createElement(R,U,l.createElement(F,t({},D,{key:S})));A.push({block:q,wrapperTemplate:j,key:S,offsetKey:T}),x=j?H.getDepth():null,L=j}for(var W=[],Q=0;Q<A.length;){var G=A[Q];if(G.wrapperTemplate){var K=[];do{K.push(A[Q].block),Q++}while(Q<A.length&&A[Q].wrapperTemplate===G.wrapperTemplate);var Y=l.cloneElement(G.wrapperTemplate,{key:G.key+"-wrap","data-offset-key":G.offsetKey},K);W.push(Y)}else W.push(G.block),Q++}return l.createElement("div",{"data-contents":"true"},W)},s}(l.Component);return dZ=f}function yj(){if(gZ)return mZ;gZ=1;var e=PN();return mZ=function(t){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(t)?Array.isArray(t)?t.slice():function(t){var n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Array-like object expected"):e(!1)),"number"!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object needs a length property"):e(!1)),0===n||n-1 in t||("production"!==process.env.NODE_ENV?e(!1,"toArray: Object should have keys for indices"):e(!1)),"function"==typeof t.callee&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object can't be `arguments`. Use rest params (function(...args) {}) or Array.from() instead."):e(!1)),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r=Array(n),i=0;i<n;i++)r[i]=t[i];return r}(t):[t]}}function wj(){if(yZ)return vZ;function e(e){return function(){return e}}yZ=1;var t=function(){};return t.thatReturns=e,t.thatReturnsFalse=e(!1),t.thatReturnsTrue=e(!0),t.thatReturnsNull=e(null),t.thatReturnsThis=function(){return this},t.thatReturnsArgument=function(e){return e},vZ=t}function bj(){if(bZ)return wZ;bZ=1;var e=function(){if(CZ)return pZ;CZ=1;var e={isImage:function(e){return"image"===t(e)[0]},isJpeg:function(n){var r=t(n);return e.isImage(n)&&("jpeg"===r[1]||"pjpeg"===r[1])}};function t(e){return e.split("/")}return pZ=e}(),t=yj(),n=wj(),r=new RegExp("\r\n","g"),i={"text/rtf":1,"text/html":1};function o(e){if("file"==e.kind)return e.getAsFile()}return wZ=function(){function a(e){this.data=e,this.types=e.types?t(e.types):[]}var l=a.prototype;return l.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return i[e]})},l.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(r,"\n"):null},l.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},l.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},l.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},l.isImage=function(){var t=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(t)return!0;for(var n=this.getFiles(),r=0;r<n.length;r++){var i=n[r].type;if(!e.isImage(i))return!1}return!0},l.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},l.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(o).filter(n.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},l.hasFiles=function(){return this.getFiles().length>0},a}()}function Ej(){if(MZ)return EZ;MZ=1;var e=PN(),t=/\.textClipping$/,n={"text/plain":!0,"text/html":!0,"text/rtf":!0};return EZ=function(r,i){var o=0,a=[];r.forEach(function(l){!function(r,i){if(!H.FileReader||r.type&&!(r.type in n))return void i("");if(""===r.type){var o="";return t.test(r.name)&&(o=r.name.replace(t,"")),void i(o)}var a=new FileReader;a.onload=function(){var t=a.result;"string"!=typeof t&&("production"!==process.env.NODE_ENV?e(!1,'We should be calling "FileReader.readAsText" which returns a string'):e(!1)),i(t)},a.onerror=function(){i("")},a.readAsText(r)}(l,function(e){o++,e&&a.push(e.slice(0,5e3)),o==r.length&&i(a.join("\r"))})})},EZ}function Mj(){if(xZ)return AZ;return xZ=1,AZ=function(e){return"handled"===e||!0===e}}function Aj(){if(kZ)return LZ;kZ=1;var e=bj(),t=eT(),n=hT(),r=jZ(),i=TZ(),o=Ej(),a=WZ(),l=RZ(),s=Mj(),c=uT();var d={onDragEnd:function(e){e.exitCurrentMode(),u(e)},onDrop:function(l,d){var h=new e(d.nativeEvent.dataTransfer),p=l._latestEditorState,C=function(e,t){var n=null,o=null,l=i(e.currentTarget);if("function"==typeof l.caretRangeFromPoint){var s=l.caretRangeFromPoint(e.x,e.y);n=s.startContainer,o=s.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,o=e.rangeOffset}n=c(n),o=c(o);var d=c(r(n));return a(t,d,o,d,o)}(d.nativeEvent,p);if(d.preventDefault(),l._dragCount=0,l.exitCurrentMode(),null!=C){var m=h.getFiles();if(m.length>0){if(l.props.handleDroppedFiles&&s(l.props.handleDroppedFiles(C,m)))return;o(m,function(e){e&&l.update(f(p,C,e))})}else{var g=l._internalDrag?"internal":"external";l.props.handleDrop&&s(l.props.handleDrop(C,h,g))||(l._internalDrag?l.update(function(e,r){var i=t.moveText(e.getCurrentContent(),e.getSelection(),r);return n.push(e,i,"insert-fragment")}(p,C)):l.update(f(p,C,h.getText()))),u(l)}}}};function u(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function f(e,r,i){var o=t.insertText(e.getCurrentContent(),r,i,e.getCurrentInlineStyle());return n.push(e,o,"insert-fragment")}return LZ=d}var xj,Lj,kj,Hj,Sj,_j,Vj,Oj,zj,Ij,Nj,Tj,Dj,Zj,jj,Rj,Bj,Pj,Fj,Uj,qj,Wj,Qj,Gj,Kj,Yj,Xj,Jj,$j,eR,tR,nR,rR,iR,oR,aR,lR,sR,cR,dR,uR,fR,hR,pR,CR,mR,gR,vR,yR,wR,bR,ER,MR,AR,xR,LR,kR,HR,SR,_R,VR,OR,zR,IR,NR,TR,DR,ZR,jR,RR,BR,PR,FR,UR,qR,WR,QR,GR,KR,YR,XR,JR,$R,eB,tB,nB,rB,iB,oB,aB,lB,sB,cB,dB,uB,fB,hB,pB,CB,mB,gB,vB={};function yB(){return kj?Lj:(kj=1,xj||(xj=1,function(e){if(!e.setImmediate){var t,n,r,i,o=1,a={},l=!1,s=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(r="setImmediate$"+Math.random()+"$",i=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&u(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),t=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},t=function(e){n.port2.postMessage(e)}):s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;t=function(t){var n=s.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];var i={callback:e,args:n};return a[o]=i,t(o),o++},c.clearImmediate=d}function d(e){delete a[e]}function u(e){if(l)setTimeout(u,0,e);else{var t=a[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===H?vB:H:self)),Lj=H.setImmediate)}function wB(){if(Sj)return Hj;Sj=1;var e=eT(),t=hT(),n=NZ(),r=XZ(),i=Mj(),o=SZ?HZ:(SZ=1,HZ=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),i=t.getStartOffset(),o=!1;return r.some(function(e){return i===e.get("start")?(o=!0,!0):i<e.get("end")&&e.get("leaves").some(function(e){var t=e.get("start");return i===t&&(o=!0,!0)})}),o}),a=uT(),l=yB(),s=n.isBrowser("Firefox");function c(n,r,i,o,a){var l=e.replaceText(n.getCurrentContent(),n.getSelection(),r,i,o);return t.push(n,l,"insert-characters",a)}return Hj=function(e,n){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var d=e._latestEditorState,u=n.data;if(u)if(e.props.handleBeforeInput&&i(e.props.handleBeforeInput(u,d,n.timeStamp)))n.preventDefault();else{var f=d.getSelection(),h=f.getStartOffset(),p=f.getAnchorKey();if(!f.isCollapsed())return n.preventDefault(),void e.update(c(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!0));var C,m=c(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!1),g=!1;if(g||(g=o(e._latestCommittedEditorState)),!g){var v=d.getBlockTree(p),y=m.getBlockTree(p);g=v.size!==y.size||v.zip(y).some(function(e){var t=e[0],n=e[1],r=t.get("start"),i=r+(r>=h?u.length:0),o=t.get("end"),a=o+(o>=h?u.length:0),l=n.get("start"),s=n.get("end"),c=n.get("decoratorKey");return t.get("decoratorKey")!==c||t.get("leaves").size!==n.get("leaves").size||i!==l||a!==s||null!=c&&s-l!==o-r})}if(g||(C=u,g=s&&("'"==C||"/"==C)),g||(g=a(m.getDirectionMap()).get(p)!==a(d.getDirectionMap()).get(p)),g)return n.preventDefault(),m=t.set(m,{forceSelection:!0}),void e.update(m);m=t.set(m,{nativelyRenderedContent:m.getCurrentContent()}),e._pendingStateFromBeforeInput=m,l(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)})}},Hj}function bB(){if(Nj)return Ij;Nj=1;var e=QN();return Ij=function(t){var n=t.getSelection();return n.isCollapsed()?null:e(t.getCurrentContent(),n)}}function EB(){if(Bj)return Rj;Bj=1;var e=eT(),t=hT(),n=uj(),r=bB(),i=hj(),o=jj?Zj:(jj=1,Zj=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1});return Rj=function(a,l){var s,c=a._latestEditorState,d=c.getSelection(),u=l.target;if(d.isCollapsed())l.preventDefault();else{if(o(u)){var f=u;s=i(n.getScrollParent(f))}var h=r(c);a.setClipboard(h),a.setMode("cut"),setTimeout(function(){a.restoreEditorDOM(s),a.exitCurrentMode(),a.update(function(n){var r=e.removeRange(n.getCurrentContent(),n.getSelection(),"forward");return t.push(n,r,"remove-range")}(c))},0)}},Rj}function MB(){if(Kj)return Gj;Kj=1;var e=PN(),t=/[\uD800-\uDFFF]/;function n(e){return 55296<=e&&e<=57343}function r(e){return t.test(e)}function i(e,t){return 1+n(e.charCodeAt(t))}function o(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!r(e))return e.substr(t,n);var o=e.length;if(o<=0||t>o||n<=0)return"";var a=0;if(t>0){for(;t>0&&a<o;t--)a+=i(e,a);if(a>=o)return""}else if(t<0){for(a=o;t<0&&0<a;t++)a-=i(e,a-1);a<0&&(a=0)}var l=o;if(n<o)for(l=a;n>0&&l<o;n--)l+=i(e,l);return e.substring(a,l)}var a={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=i(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:i,hasSurrogateUnit:r,isCodeUnitInSurrogateRange:n,isSurrogatePair:function(t,n){if(0<=n&&n<t.length||("production"!==process.env.NODE_ENV?e(!1,"isSurrogatePair: Invalid index %s for string length %s.",n,t.length):e(!1)),n+1===t.length)return!1;var r=t.charCodeAt(n),i=t.charCodeAt(n+1);return 55296<=r&&r<=56319&&56320<=i&&i<=57343},strlen:function(e){if(!r(e))return e.length;for(var t=0,n=0;n<e.length;n+=i(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return o(e,t=t<n?t:n,r)},substr:o};return Gj=a}function AB(){if(Xj)return Yj;Xj=1;var e=wj();function t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}}var n="production"!==process.env.NODE_ENV?function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.apply(void 0,[n].concat(i))}}:e;return Yj=n}function xB(){if($j)return Jj;$j=1;var e=AB();return Jj=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionBackward should only be called with a collapsed SelectionState");var i=t.getCurrentContent(),o=r.getStartKey(),a=r.getStartOffset(),l=o,s=0;if(n>a){var c=i.getKeyBefore(o);if(null==c)l=o;else l=c,s=i.getBlockForKey(c).getText().length}else s=a-n;return r.merge({focusKey:l,focusOffset:s,isBackward:!0})},Jj}function LB(){if(tR)return eR;tR=1;var e=eT(),t=aT()("draft_tree_data_support");return eR=function(n,r,i){var o=n.getSelection(),a=n.getCurrentContent(),l=o,s=o.getAnchorKey(),c=o.getFocusKey(),d=a.getBlockForKey(s);if(t&&"forward"===i&&s!==c)return a;if(o.isCollapsed()){if("forward"===i){if(n.isSelectionAtEndOfContent())return a;if(t)if(o.getAnchorOffset()===a.getBlockForKey(s).getLength()){var u=a.getBlockForKey(d.nextSibling);if(!u||0===u.getLength())return a}}else if(n.isSelectionAtStartOfContent())return a;if((l=r(n))===o)return a}return e.removeRange(a,l,i)}}function kB(){if(rR)return nR;rR=1;var e=hT(),t=MB(),n=xB(),r=LB();return nR=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a-1];return n(e,l?t.getUTF16Length(l,0):1)},"backward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"backspace-character":"remove-range")},nR}function HB(){if(oR)return iR;oR=1;var e=eT(),t=BZ(),n=hT(),r=NZ(),i=YZ().notEmptyKey,o=jZ(),a=kB(),l=uT(),s=r.isEngine("Gecko");return iR=function(r,c){void 0!==r._pendingStateFromBeforeInput&&(r.update(r._pendingStateFromBeforeInput),r._pendingStateFromBeforeInput=void 0);var d=r.editor.ownerDocument.defaultView.getSelection(),u=d.anchorNode,f=d.isCollapsed,h=(null==u?void 0:u.nodeType)!==Node.TEXT_NODE&&(null==u?void 0:u.nodeType)!==Node.ELEMENT_NODE;if(null!=u&&!h){if(u.nodeType===Node.TEXT_NODE&&(null!==u.previousSibling||null!==u.nextSibling)){var p=u.parentNode;if(null==p)return;u.nodeValue=p.textContent;for(var C=p.firstChild;null!=C;C=C.nextSibling)C!==u&&p.removeChild(C)}var m=u.textContent,g=r._latestEditorState,v=l(o(u)),y=t.decode(v),w=y.blockKey,b=y.decoratorKey,E=y.leafKey,M=g.getBlockTree(w).getIn([b,"leaves",E]),A=M.start,x=M.end,L=g.getCurrentContent(),k=L.getBlockForKey(w),H=k.getText().slice(A,x);if(m.endsWith("\n\n")&&(m=m.slice(0,-1)),m!==H){var S,_,V,O,z=g.getSelection(),I=z.merge({anchorOffset:A,focusOffset:x,isBackward:!1}),N=k.getEntityAt(A),T=i(N)?L.getEntity(N):null,D="MUTABLE"===(null!=T?T.getMutability():null),Z=D?"spellcheck-change":"apply-entity",j=e.replaceText(L,I,m,k.getInlineStyleAt(A),D?k.getEntityAt(A):null);if(s)S=d.anchorOffset,_=d.focusOffset,O=(V=A+Math.min(S,_))+Math.abs(S-_),S=V,_=O;else{var R=m.length-H.length;V=z.getStartOffset(),O=z.getEndOffset(),S=f?O+R:V,_=O+R}var B=j.merge({selectionBefore:L.getSelectionAfter(),selectionAfter:z.merge({anchorOffset:S,focusOffset:_})});r.update(n.push(g,B,Z))}else{var P=c.nativeEvent.inputType;if(P){var F=function(e,t){return"deleteContentBackward"===e?a(t):t}(P,g);if(F!==g)return r.restoreEditorDOM(),void r.update(F)}}}},iR}function SB(){if(cR)return sR;cR=1;var e=NZ(),t=function(){if(lR)return aR;lR=1;var e=PZ();return aR=function(t){return t.which===e.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))},aR}(),n=e.isPlatform("Mac OS X"),r={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return n&&e.altKey},usesMacOSHeuristics:function(){return n},hasCommandModifier:function(e){return n?!!e.metaKey&&!e.altKey:r.isCtrlKeyCommand(e)},isSoftNewlineEvent:t};return sR=r}function _B(){if(hR)return fR;hR=1;var e=NZ(),t=PN();var n=e.isBrowser("Chrome")?function(e){for(var n=e.cloneRange(),r=[],i=e.endContainer;null!=i;i=i.parentNode){var o=i===e.commonAncestorContainer;o?n.setStart(e.startContainer,e.startOffset):n.setStart(n.endContainer,0);var a,l=Array.from(n.getClientRects());if(r.push(l),o)return r.reverse(),(a=[]).concat.apply(a,r);n.setEndBefore(i)}"production"!==process.env.NODE_ENV?t(!1,"Found an unexpected detached subtree when getting range client rects."):t(!1)}:function(e){return Array.from(e.getClientRects())};return fR=n}function VB(){if(CR)return pR;CR=1;var e=MB(),t=TZ(),n=_B(),r=PN();function i(e,t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<e.length;a++){var l=e[a];0!==l.width&&1!==l.width&&(n=Math.min(n,l.top),r=Math.min(r,l.bottom),i=Math.max(i,l.top),o=Math.max(o,l.bottom))}return i<=r&&i-n<t&&o-r<t}function o(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}return pR=function(a){a.collapsed||("production"!==process.env.NODE_ENV?r(!1,"expandRangeToStartOfLine: Provided range is not collapsed."):r(!1));var l=(a=a.cloneRange()).startContainer;1!==l.nodeType&&(l=l.parentNode);var s=function(e){var n=getComputedStyle(e),i=t(e),o=i.createElement("div");o.style.fontFamily=n.fontFamily,o.style.fontSize=n.fontSize,o.style.fontStyle=n.fontStyle,o.style.fontWeight=n.fontWeight,o.style.lineHeight=n.lineHeight,o.style.position="absolute",o.textContent="M";var a=i.body;a||("production"!==process.env.NODE_ENV?r(!1,"Missing document.body"):r(!1)),a.appendChild(o);var l=o.getBoundingClientRect();return a.removeChild(o),l.height}(l),c=a.endContainer,d=a.endOffset;for(a.setStart(a.startContainer,0);i(n(a),s)&&(c=a.startContainer,d=a.startOffset,c.parentNode||("production"!==process.env.NODE_ENV?r(!1,"Found unexpected detached subtree when traversing."):r(!1)),a.setStartBefore(c),1!==c.nodeType||"inline"===getComputedStyle(c).display););for(var u=c,f=d-1;;){for(var h=u.nodeValue,p=f;p>=0;p--)if(!(null!=h&&p>0&&e.isSurrogatePair(h,p-1))){if(a.setStart(u,p),!i(n(a),s))break;c=u,d=p}if(-1===p||0===u.childNodes.length)break;f=o(u=u.childNodes[p])}return a.setStart(c,d),a},pR}function OB(){if(yR)return vR;yR=1;return vR={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}}function zB(){if(bR)return wR;bR=1;var e="['‘’]",t="\\s|(?![_])"+OB().getPunctuation(),n=new RegExp("^(?:"+t+")*(?:"+e+"|(?!"+t+").)*(?:(?!"+t+").)"),r=new RegExp("(?:(?!"+t+").)(?:"+e+"|(?!"+t+").)*(?:"+t+")*$");function i(e,t){var i=t?r.exec(e):n.exec(e);return i?i[0]:e}return wR={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}}function IB(){if(xR)return AR;xR=1;var e=AB();return AR=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionForward should only be called with a collapsed SelectionState");var i,o=r.getStartKey(),a=r.getStartOffset(),l=t.getCurrentContent(),s=o;return n>l.getBlockForKey(o).getText().length-a?(s=l.getKeyAfter(o),i=0):i=a+n,r.merge({focusKey:s,focusOffset:i})},AR}function NB(){if(BR)return RR;BR=1;var e=eT(),t=hT(),n=SB(),r=PZ(),i=function(){if(uR)return dR;uR=1;var e=eT(),t=hT(),n=QN(),r=uT(),i=null;return dR={cut:function(o){var a=o.getCurrentContent(),l=o.getSelection(),s=null;if(l.isCollapsed()){var c=l.getAnchorKey(),d=a.getBlockForKey(c).getLength();if(d===l.getAnchorOffset()){var u=a.getKeyAfter(c);if(null==u)return o;s=l.set("focusKey",u).set("focusOffset",0)}else s=l.set("focusOffset",d)}else s=l;s=r(s),i=n(a,s);var f=e.removeRange(a,s,"forward");return f===a?o:t.push(o,f,"remove-range")},paste:function(n){if(!i)return n;var r=e.replaceWithFragment(n.getCurrentContent(),n.getSelection(),i);return t.push(n,r,"insert-fragment")}}}(),o=NZ(),a=Mj(),l=function(){if(gR)return mR;gR=1;var e=hT(),t=VB(),n=QZ(),r=xB(),i=LB();return mR=function(o,a){var l=i(o,function(e){var i=e.getSelection();if(i.isCollapsed()&&0===i.getAnchorOffset())return r(e,1);var o=a.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return o=t(o),n(e,null,o.endContainer,o.endOffset,o.startContainer,o.startOffset).selectionState},"backward");return l===o.getCurrentContent()?o:e.push(o,l,"remove-range")},mR}(),s=function(){if(MR)return ER;MR=1;var e=zB(),t=hT(),n=xB(),r=LB();return ER=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset();if(0===i)return n(t,1);var o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(0,i),l=e.getBackward(a);return n(t,l.length||1)},"backward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},ER}(),c=function(){if(kR)return LR;kR=1;var e=zB(),t=hT(),n=IB(),r=LB();return LR=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset(),o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(i),l=e.getForward(a);return n(t,l.length||1)},"forward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},LR}(),d=function(){if(SR)return HR;SR=1;var e=eT(),t=hT();return HR=function(n){var r=e.splitBlock(n.getCurrentContent(),n.getSelection());return t.push(n,r,"split-block")}}(),u=function(){if(VR)return _R;VR=1;var e=hT();return _R=function(t){var n=t.getSelection(),r=n.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}}(),f=function(){if(zR)return OR;zR=1;var e=hT();return OR=function(t){var n=t.getSelection(),r=n.getStartKey();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}}(),h=kB(),p=function(){if(NR)return IR;NR=1;var e=hT(),t=MB(),n=IB(),r=LB();return IR=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a];return n(e,l?t.getUTF16Length(l,0):1)},"forward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"delete-character":"remove-range")},IR}(),C=function(){if(DR)return TR;DR=1;var e=eT(),t=hT(),n=QN();return TR=function(r){var i=r.getSelection();if(!i.isCollapsed())return r;var o=i.getAnchorOffset();if(0===o)return r;var a,l,s=i.getAnchorKey(),c=r.getCurrentContent(),d=c.getBlockForKey(s).getLength();if(d<=1)return r;o===d?(a=i.set("anchorOffset",o-1),l=i):l=(a=i.set("focusOffset",o+1)).set("anchorOffset",o+1);var u=n(c,a),f=e.removeRange(c,a,"backward"),h=f.getSelectionAfter(),p=h.getAnchorOffset()-1,C=h.merge({anchorOffset:p,focusOffset:p}),m=e.replaceWithFragment(f,C,u),g=t.push(r,m,"insert-fragment");return t.acceptSelection(g,l)}}(),m=function(){if(jR)return ZR;jR=1;var e=hT();return ZR=function(t,n,r){var i=e.undo(n);if("spellcheck-change"!==n.getLastChangeType())t.preventDefault(),n.getNativelyRenderedContent()?(r(e.set(n,{nativelyRenderedContent:null})),setTimeout(function(){r(i)},0)):r(i);else{var o=i.getCurrentContent();r(e.set(i,{nativelyRenderedContent:o}))}},ZR}(),g=n.isOptionKeyCommand,v=o.isBrowser("Chrome");return RR=function(n,o){var y=o.which,w=n._latestEditorState;function b(e){var t=n.props[e];return!!t&&(t(o),!0)}switch(y){case r.RETURN:if(o.preventDefault(),n.props.handleReturn&&a(n.props.handleReturn(o,w)))return;break;case r.ESC:if(o.preventDefault(),b("onEscape"))return;break;case r.TAB:if(b("onTab"))return;break;case r.UP:if(b("onUpArrow"))return;break;case r.RIGHT:if(b("onRightArrow"))return;break;case r.DOWN:if(b("onDownArrow"))return;break;case r.LEFT:if(b("onLeftArrow"))return;break;case r.SPACE:v&&g(o)&&o.preventDefault()}var E=n.props.keyBindingFn(o);if(null!=E&&""!==E)if("undo"!==E){if(o.preventDefault(),!n.props.handleKeyCommand||!a(n.props.handleKeyCommand(E,w,o.timeStamp))){var M=function(e,n,r){switch(e){case"redo":return t.redo(n);case"delete":return p(n);case"delete-word":return c(n);case"backspace":return h(n);case"backspace-word":return s(n);case"backspace-to-start-of-line":return l(n,r);case"split-block":return d(n);case"transpose-characters":return C(n);case"move-selection-to-start-of-block":return f(n);case"move-selection-to-end-of-block":return u(n);case"secondary-cut":return i.cut(n);case"secondary-paste":return i.paste(n);default:return n}}(E,w,o);M!==w&&n.update(M)}}else m(o,w,n.update);else if(y===r.SPACE&&v&&g(o)){var A=e.replaceText(w.getCurrentContent(),w.getSelection()," ");n.update(t.push(w,A,"insert-characters"))}},RR}function TB(){if(FR)return PR;FR=1;var e=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}();return PR=e}function DB(){if(qR)return UR;qR=1;var e=NZ(),t=PN(),n=e.isBrowser("IE <= 9");return UR=function(e){var r,i=null;return!n&&document.implementation&&document.implementation.createHTMLDocument&&((r=document.implementation.createHTMLDocument("foo")).documentElement||("production"!==process.env.NODE_ENV?t(!1,"Missing doc.documentElement"):t(!1)),r.documentElement.innerHTML=e,i=r.getElementsByTagName("body")[0]),i},UR}function ZB(){if(XR)return YR;var e;function t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}XR=1;var r=DN(),i=jN(),o=RN(),a=gT(),l=iT(),s=TB(),c=mT(),d=UN(),u=DB(),f=aT(),h=NN(),p=h.List,C=h.Map,m=h.OrderedSet,g=function(){if(QR)return WR;QR=1;var e=DZ();return WR=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"A"===t.nodeName}}(),v=tj(),y=UZ(),w=function(){if(KR)return GR;KR=1;var e=DZ();return GR=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"IMG"===t.nodeName}}(),b=f("draft_tree_data_support"),E=new RegExp("\r","g"),M=new RegExp("\n","g"),A=new RegExp("^\n","g"),x=new RegExp(" ","g"),L=new RegExp(" ?","g"),k=new RegExp("​?","g"),H=["bold","bolder","500","600","700","800","900"],S=["light","lighter","normal","100","200","300","400"],_=["className","href","rel","target","title"],V=["alt","className","height","src","width"],O=(n(e={},c("public/DraftStyleDefault/depth0"),0),n(e,c("public/DraftStyleDefault/depth1"),1),n(e,c("public/DraftStyleDefault/depth2"),2),n(e,c("public/DraftStyleDefault/depth3"),3),n(e,c("public/DraftStyleDefault/depth4"),4),e),z=C({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),I=function(e){if(y(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(O).some(function(n){e.classList.contains(n)&&(t=O[n])}),t},T=function(e){if(!g(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new s(t.href);return!0}catch(e){return!1}},D=function(e){if(!w(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},Z=function(e,t){if(!y(e))return t;var n=e,r=n.style.fontWeight,i=n.style.fontStyle,o=n.style.textDecoration;return t.withMutations(function(e){H.indexOf(r)>=0?e.add("BOLD"):S.indexOf(r)>=0&&e.remove("BOLD"),"italic"===i?e.add("ITALIC"):"normal"===i&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})},j=function(e){return"ul"===e||"ol"===e},R=function(){function e(e,t){n(this,"characterList",p()),n(this,"currentBlockType","unstyled"),n(this,"currentDepth",0),n(this,"currentEntity",null),n(this,"currentText",""),n(this,"wrapper",null),n(this,"blockConfigs",[]),n(this,"contentBlocks",[]),n(this,"entityMap",l),n(this,"blockTypeMap",void 0),n(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var a=e.prototype;return a.clear=function(){this.characterList=p(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},a.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],m())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},a.getContentBlocks=function(){return 0===this.contentBlocks.length&&(b?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},a._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:p(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=p(),this.currentBlockType="unstyled",this.currentText="",n},a._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i.nodeName.toLowerCase();if("body"===o||j(o)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,l=this.wrapper;j(o)&&(this.wrapper=o,j(l)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),t)),this.currentDepth=a,this.wrapper=l}else{var s=this.blockTypeMap.get(o);if(void 0===s)if("#text"!==o)if("br"!==o)if(D(i))this._addImgNode(i,t);else if(T(i))this._addAnchorNode(i,n,t);else{var c=t;z.has(o)&&(c=c.add(z.get(o))),c=Z(i,c);var u=I(i);null!=u&&(c=c.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),c))}else this._addBreakNode(i,t);else this._addTextNode(i,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var f=this.currentDepth,h=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof s&&(s=this.disambiguate(o,this.wrapper)||s[0]||"unstyled"),!b&&y(i)&&("unordered-list-item"===s||"ordered-list-item"===s)){var p=i;this.currentDepth=N(p,this.currentDepth)}var C=d(),m=this._toBlockConfigs(Array.from(i.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:C,childConfigs:m,type:s})),this.currentDepth=f,this.wrapper=h}}}return n},a._appendText=function(e,t){var n;this.currentText+=e;var i=r.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(i))},a._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()});(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=p()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},a._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(A,"")).replace(M," ")),this._appendText(n,t)},a._addBreakNode=function(e,t){v(e)&&this._appendText("\n",t)},a._addImgNode=function(e,t){if(w(e)){var n=e,r={};V.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),f("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},a._addAnchorNode=function(e,t,n){if(g(e)){var r=e,i={};_.forEach(function(e){var t=r.getAttribute(e);t&&(i[e]=t)}),i.url=new s(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},a._toContentBlocks=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.length-1,i=0;i<=r;i++){var a=e[i];a.parent=n,a.prevSibling=i>0?e[i-1].key:null,a.nextSibling=i<r?e[i+1].key:null,a.children=p(a.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new o(t({},a))),this._toContentBlocks(a.childConfigs,a.key)}},a._hoistContainersInBlockConfigs=function(e){var t=this;return p(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},a._toFlatContentBlocks=function(e){var n=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var r=n._extractTextFromBlockConfigs(e.childConfigs),o=r.text,a=r.characterList;n.contentBlocks.push(new i(t({},e,{text:e.text+o,characterList:e.characterList.concat(a)})))})},a._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=p(),i=0;i<=t;i++){var o=e[i];n+=o.text,r=r.concat(o.characterList),""!==n&&"unstyled"!==o.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}();return YR=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:u)(e=e.trim().replace(E,"").replace(x," ").replace(L,"").replace(k,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys(function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach(function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)})}),C(t)}(t);return new R(r,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(n).getContentBlocks()},YR}function jB(){if($R)return JR;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}$R=1;var t=jN(),n=RN(),r=ZB(),i=UN(),o=DB(),a=aT(),l=NN(),s=lT(),c=l.List,d=l.Repeat,u=a("draft_tree_data_support"),f=u?n:t,h={processHTML:function(e,t){return r(e,o,t)},processText:function(t,n,r){return t.reduce(function(t,o,a){o=s(o);var l=i(),h={key:l,type:r,text:o,characterList:c(d(n,o.length))};if(u&&0!==a){var p=a-1;h=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},h,{prevSibling:(t[p]=t[p].merge({nextSibling:l})).getKey()})}return t.push(new f(h)),t},[])}};return JR=h}function RB(){if(rB)return nB;rB=1;var e=eT(),t=hT(),n=(tB||(tB=1,eB=function(e,t,n,r){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat([[o,a.get(o)]]).map(function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)});return a=a.merge(l),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}),eB),r=uT(),i={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return i.toggleInlineStyle(e,"BOLD");case"italic":return i.toggleInlineStyle(e,"ITALIC");case"underline":return i.toggleInlineStyle(e,"UNDERLINE");case"code":return i.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return i.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return i.onDelete(e);default:return null}},insertSoftNewline:function(n){var r=e.insertText(n.getCurrentContent(),n.getSelection(),"\n",n.getCurrentInlineStyle(),null),i=t.push(n,r,"insert-characters");return t.forceSelection(i,r.getSelectionAfter())},onBackspace:function(e){var n=e.getSelection();if(!n.isCollapsed()||n.getAnchorOffset()||n.getFocusOffset())return null;var r=e.getCurrentContent(),o=n.getStartKey(),a=r.getBlockBefore(o);if(a&&"atomic"===a.getType()){var l=r.getBlockMap().delete(a.getKey()),s=r.merge({blockMap:l,selectionAfter:n});if(s!==r)return t.push(e,s,"remove-range")}var c=i.tryToRemoveBlockStyle(e);return c?t.push(e,c,"change-block-type"):null},onDelete:function(n){var r=n.getSelection();if(!r.isCollapsed())return null;var i=n.getCurrentContent(),o=r.getStartKey(),a=i.getBlockForKey(o).getLength();if(r.getStartOffset()<a)return null;var l=i.getBlockAfter(o);if(!l||"atomic"!==l.getType())return null;var s=r.merge({focusKey:l.getKey(),focusOffset:l.getLength()}),c=e.removeRange(i,s,"forward");return c!==i?t.push(n,c,"remove-range"):null},onTab:function(e,r,i){var o=r.getSelection(),a=o.getAnchorKey();if(a!==o.getFocusKey())return r;var l=r.getCurrentContent(),s=l.getBlockForKey(a),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return r;e.preventDefault();var d=s.getDepth();if(!e.shiftKey&&d===i)return r;var u=n(l,o,e.shiftKey?-1:1,i);return t.push(r,u,"adjust-depth")},toggleBlockType:function(n,i){var o=n.getSelection(),a=o.getStartKey(),l=o.getEndKey(),s=n.getCurrentContent(),c=o;if(a!==l&&0===o.getEndOffset()){var d=r(s.getBlockBefore(l));l=d.getKey(),c=c.merge({anchorKey:a,anchorOffset:o.getStartOffset(),focusKey:l,focusOffset:d.getLength(),isBackward:!1})}var u=s.getBlockMap().skipWhile(function(e,t){return t!==a}).reverse().skipWhile(function(e,t){return t!==l}).some(function(e){return"atomic"===e.getType()});if(u)return n;var f=s.getBlockForKey(a).getType()===i?"unstyled":i;return t.push(n,e.setBlockType(s,c,f),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?i.toggleBlockType(e,"code-block"):i.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(n,r){var i=n.getSelection(),o=n.getCurrentInlineStyle();if(i.isCollapsed())return t.setInlineStyleOverride(n,o.has(r)?o.remove(r):o.add(r));var a,l=n.getCurrentContent();return a=o.has(r)?e.removeInlineStyle(l,i,r):e.applyInlineStyle(l,i,r),t.push(n,a,"change-inline-style")},toggleLink:function(n,r,i){var o=e.applyEntity(n.getCurrentContent(),r,i);return t.push(n,o,"apply-entity")},tryToRemoveBlockStyle:function(t){var n=t.getSelection(),r=n.getAnchorOffset();if(n.isCollapsed()&&0===r){var i=n.getAnchorKey(),o=t.getCurrentContent(),a=o.getBlockForKey(i).getType(),l=o.getBlockBefore(i);if("code-block"===a&&l&&"code-block"===l.getType()&&0!==l.getLength())return null;if("unstyled"!==a)return e.setBlockType(o,n,"unstyled")}return null}};return nB=i}function BB(){if(lB)return aB;lB=1;var e=TN(),t=DN(),n=bj(),r=eT(),i=jB(),o=hT(),a=RB(),l=XZ(),s=Ej(),c=Mj(),d=function(){if(oB)return iB;oB=1;var e=/\r\n?|\n/g;return iB=function(t){return t.split(e)}}();function u(e,t,n){var i=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return o.push(e,i.set("entityMap",n),"insert-fragment")}return aB=function(f,h){h.preventDefault();var p=new n(h.clipboardData);if(!p.isRichText()){var C=p.getFiles(),m=p.getText();if(C.length>0){if(f.props.handlePastedFiles&&c(f.props.handlePastedFiles(C)))return;return void s(C,function(n){if(n=n||m){var s=f._latestEditorState,c=d(n),u=t.create({style:s.getCurrentInlineStyle(),entity:l(s.getCurrentContent(),s.getSelection())}),h=a.getCurrentBlockType(s),p=i.processText(c,u,h),C=e.createFromArray(p),g=r.replaceWithFragment(s.getCurrentContent(),s.getSelection(),C);f.update(o.push(s,g,"insert-fragment"))}})}}var g=[],v=p.getText(),y=p.getHTML(),w=f._latestEditorState;if(f.props.formatPastedText){var b=f.props.formatPastedText(v,y);v=b.text,y=b.html}if(!f.props.handlePastedText||!c(f.props.handlePastedText(v,y,w))){if(v&&(g=d(v)),!f.props.stripPastedStyles){var E,M=f.getClipboard();if(!f.props.formatPastedText&&p.isRichText()&&M){if(-1!==(null===(E=y)||void 0===E?void 0:E.indexOf(f.getEditorKey()))||1===g.length&&1===M.size&&M.first().getText()===v)return void f.update(u(f._latestEditorState,M))}else if(M&&p.types.includes("com.apple.webarchive")&&!p.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every(function(t,n){return t.getText()===e[n]})}(g,M))return void f.update(u(f._latestEditorState,M));if(y){var A=i.processHTML(y,f.props.blockRenderMap);if(A){var x=A.contentBlocks,L=A.entityMap;if(x){var k=e.createFromArray(x);return void f.update(u(f._latestEditorState,k,L))}}}f.setClipboard(null)}if(g.length){var H=t.create({style:w.getCurrentInlineStyle(),entity:l(w.getCurrentContent(),w.getSelection())}),S=a.getCurrentBlockType(w),_=i.processText(g,H,S),V=e.createFromArray(_);f.update(u(f._latestEditorState,V))}}},aB}function PB(){if(cB)return sB;cB=1;var e=NZ(),t=wB(),n=function(){if(Vj)return _j;Vj=1;var e=hT(),t=ij(),n=oj();return _j=function(r,i){var o=i.currentTarget.ownerDocument;if(!Boolean(r.props.preserveSelectionOnBlur)&&n(o)===o.body){var a=o.defaultView.getSelection(),l=r.editor;1===a.rangeCount&&t(l,a.anchorNode)&&t(l,a.focusNode)&&a.removeAllRanges()}var s=r._latestEditorState,c=s.getSelection();if(c.getHasFocus()){var d=c.set("hasFocus",!1);r.props.onBlur&&r.props.onBlur(i),r.update(e.acceptSelection(s,d))}},_j}(),r=function(){if(zj)return Oj;zj=1;var e=hT();return Oj=function(t,n){t.setMode("composite"),t.update(e.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(n)},Oj}(),i=function(){if(Dj)return Tj;Dj=1;var e=bB();return Tj=function(t,n){t._latestEditorState.getSelection().isCollapsed()?n.preventDefault():t.setClipboard(e(t._latestEditorState))},Tj}(),o=EB(),a=(Fj||(Fj=1,Pj=function(e,t){e.setMode("drag"),t.preventDefault()}),Pj),l=qj?Uj:(qj=1,Uj=function(e){e._internalDrag=!0,e.setMode("drag")}),s=function(){if(Qj)return Wj;Qj=1;var e=hT(),t=NZ();return Wj=function(n,r){var i=n._latestEditorState,o=i.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);n.props.onFocus&&n.props.onFocus(r),t.isBrowser("Chrome < 60.0.3081.0")?n.update(e.forceSelection(i,a)):n.update(e.acceptSelection(i,a))}},Wj}(),c=HB(),d=NB(),u=BB(),f=KZ(),h=e.isBrowser("Chrome"),p=e.isBrowser("Firefox"),C=h||p?f:function(e){};return sB={onBeforeInput:t,onBlur:n,onCompositionStart:r,onCopy:i,onCut:o,onDragOver:a,onDragStart:l,onFocus:s,onInput:c,onKeyDown:d,onPaste:u,onSelect:f,onMouseUp:C,onKeyUp:C}}function FB(){if(hB)return fB;hB=1;var e=i,t=mT(),n=function(n){var r,i;function o(){return n.apply(this,arguments)||this}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var a=o.prototype;return a.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},a.render=function(){var n=this.props.editorState.getSelection().getHasFocus(),r=t({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":n});return e.createElement("div",{className:r},e.createElement("div",{className:t("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},o}(e.Component);return fB=n}function UB(){if(CB)return pB;CB=1;var e=SB(),t=PZ(),n=NZ(),r=n.isPlatform("Mac OS X"),i=r&&n.isBrowser("Firefox < 29"),o=e.hasCommandModifier,a=e.isCtrlKeyCommand;function l(e){return r&&e.altKey||a(e)}return pB=function(e){switch(e.keyCode){case 66:return o(e)?"bold":null;case 68:return a(e)?"delete":null;case 72:return a(e)?"backspace":null;case 73:return o(e)?"italic":null;case 74:return o(e)?"code":null;case 75:return r&&a(e)?"secondary-cut":null;case 77:case 79:return a(e)?"split-block":null;case 84:return r&&a(e)?"transpose-characters":null;case 85:return o(e)?"underline":null;case 87:return r&&a(e)?"backspace-word":null;case 89:return a(e)?r?"secondary-paste":"redo":null;case 90:return function(e){return o(e)?e.shiftKey?"redo":"undo":null}(e)||null;case t.RETURN:return"split-block";case t.DELETE:return function(e){return!r&&e.shiftKey?null:l(e)?"delete-word":"delete"}(e);case t.BACKSPACE:return function(e){return o(e)&&r?"backspace-to-start-of-line":l(e)?"backspace-word":"backspace"}(e);case t.LEFT:return i&&o(e)?"move-selection-to-start-of-block":null;case t.RIGHT:return i&&o(e)?"move-selection-to-end-of-block":null;default:return null}},pB}function qB(){if(gB)return mB;gB=1;var e=Fh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l=gT(),s=vT(),c=JZ(),d=function(){if(hZ)return fZ;hZ=1;var e=aT()("draft_tree_data_support");return fZ=e?mj():vj()}(),u=Aj(),f=PB(),h=function(){if(uB)return dB;uB=1;var e=A.unstable_flushControlled;return dB=e}(),p=FB(),C=nj(),m=hT(),g=i,v=cj(),y=uj(),w=NZ(),b=mT(),E=UN(),M=UB(),x=hj(),L=aT(),k=PN(),S=UZ(),_=uT(),V=w.isBrowser("IE"),O=!V,z={edit:f,composite:c,drag:u,cut:null,render:null},I=!1,N=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(g.Component),T=function(e){function i(t){var i;return o(r(i=e.call(this,t)||this),"_blockSelectEvents",void 0),o(r(i),"_clipboard",void 0),o(r(i),"_handler",void 0),o(r(i),"_dragCount",void 0),o(r(i),"_internalDrag",void 0),o(r(i),"_editorKey",void 0),o(r(i),"_placeholderAccessibilityID",void 0),o(r(i),"_latestEditorState",void 0),o(r(i),"_latestCommittedEditorState",void 0),o(r(i),"_pendingStateFromBeforeInput",void 0),o(r(i),"_onBeforeInput",void 0),o(r(i),"_onBlur",void 0),o(r(i),"_onCharacterData",void 0),o(r(i),"_onCompositionEnd",void 0),o(r(i),"_onCompositionStart",void 0),o(r(i),"_onCopy",void 0),o(r(i),"_onCut",void 0),o(r(i),"_onDragEnd",void 0),o(r(i),"_onDragOver",void 0),o(r(i),"_onDragStart",void 0),o(r(i),"_onDrop",void 0),o(r(i),"_onInput",void 0),o(r(i),"_onFocus",void 0),o(r(i),"_onKeyDown",void 0),o(r(i),"_onKeyPress",void 0),o(r(i),"_onKeyUp",void 0),o(r(i),"_onMouseDown",void 0),o(r(i),"_onMouseUp",void 0),o(r(i),"_onPaste",void 0),o(r(i),"_onSelect",void 0),o(r(i),"editor",void 0),o(r(i),"editorContainer",void 0),o(r(i),"focus",void 0),o(r(i),"blur",void 0),o(r(i),"setMode",void 0),o(r(i),"exitCurrentMode",void 0),o(r(i),"restoreEditorDOM",void 0),o(r(i),"setClipboard",void 0),o(r(i),"getClipboard",void 0),o(r(i),"getEditorKey",void 0),o(r(i),"update",void 0),o(r(i),"onDragEnter",void 0),o(r(i),"onDragLeave",void 0),o(r(i),"_handleEditorContainerRef",function(e){i.editorContainer=e,i.editor=null!==e?e.firstChild:null}),o(r(i),"focus",function(e){var t=i.props.editorState,n=t.getSelection().getHasFocus(),r=i.editor;if(r){var o=y.getScrollParent(r),a=e||x(o),l=a.x,s=a.y;S(r)||("production"!==process.env.NODE_ENV?k(!1,"editorNode is not an HTMLElement"):k(!1)),r.focus(),o===window?window.scrollTo(l,s):v.setTop(o,s),n||i.update(m.forceSelection(t,t.getSelection()))}}),o(r(i),"blur",function(){var e=i.editor;e&&(S(e)||("production"!==process.env.NODE_ENV?k(!1,"editorNode is not an HTMLElement"):k(!1)),e.blur())}),o(r(i),"setMode",function(e){var t=i.props,r=t.onPaste,o=t.onCut,a=t.onCopy,l=n({},z.edit);r&&(l.onPaste=r),o&&(l.onCut=o),a&&(l.onCopy=a);var s=n({},z,{edit:l});i._handler=s[e]}),o(r(i),"exitCurrentMode",function(){i.setMode("edit")}),o(r(i),"restoreEditorDOM",function(e){i.setState({contentsKey:i.state.contentsKey+1},function(){i.focus(e)})}),o(r(i),"setClipboard",function(e){i._clipboard=e}),o(r(i),"getClipboard",function(){return i._clipboard}),o(r(i),"update",function(e){i._latestEditorState=e,i.props.onChange(e)}),o(r(i),"onDragEnter",function(){i._dragCount++}),o(r(i),"onDragLeave",function(){i._dragCount--,0===i._dragCount&&i.exitCurrentMode()}),i._blockSelectEvents=!1,i._clipboard=null,i._handler=null,i._dragCount=0,i._editorKey=t.editorKey||E(),i._placeholderAccessibilityID="placeholder-"+i._editorKey,i._latestEditorState=t.editorState,i._latestCommittedEditorState=t.editorState,i._onBeforeInput=i._buildHandler("onBeforeInput"),i._onBlur=i._buildHandler("onBlur"),i._onCharacterData=i._buildHandler("onCharacterData"),i._onCompositionEnd=i._buildHandler("onCompositionEnd"),i._onCompositionStart=i._buildHandler("onCompositionStart"),i._onCopy=i._buildHandler("onCopy"),i._onCut=i._buildHandler("onCut"),i._onDragEnd=i._buildHandler("onDragEnd"),i._onDragOver=i._buildHandler("onDragOver"),i._onDragStart=i._buildHandler("onDragStart"),i._onDrop=i._buildHandler("onDrop"),i._onInput=i._buildHandler("onInput"),i._onFocus=i._buildHandler("onFocus"),i._onKeyDown=i._buildHandler("onKeyDown"),i._onKeyPress=i._buildHandler("onKeyPress"),i._onKeyUp=i._buildHandler("onKeyUp"),i._onMouseDown=i._buildHandler("onMouseDown"),i._onMouseUp=i._buildHandler("onMouseUp"),i._onPaste=i._buildHandler("onPaste"),i._onSelect=i._buildHandler("onSelect"),i.getEditorKey=function(){return i._editorKey},"production"!==process.env.NODE_ENV&&["onDownArrow","onEscape","onLeftArrow","onRightArrow","onTab","onUpArrow"].forEach(function(e){t.hasOwnProperty(e)&&console.warn("Supplying an `".concat(e,"` prop to `DraftEditor` has ")+"been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/wHKQ3W).")}),i.state={contentsKey:0},i}a(i,e);var l=i.prototype;return l._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(h?h(function(){return r(t,n)}):r(t,n))}}},l._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},l._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:_(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return g.createElement(p,e)}return null},l._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},l.render=function(){var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,o=e.blockStyleFn,a=e.customStyleFn,l=e.customStyleMap,c=e.editorState,u=e.preventScroll,f=e.readOnly,h=e.textAlignment,p=e.textDirectionality,C=b({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===h,"DraftEditor/alignRight":"right"===h,"DraftEditor/alignCenter":"center"===h}),m=this.props.role||"textbox",v="combobox"===m?!!this.props.ariaExpanded:null,y={blockRenderMap:r,blockRendererFn:i,blockStyleFn:o,customStyleMap:n({},s,l),customStyleFn:a,editorKey:this._editorKey,editorState:c,preventScroll:u,textDirectionality:p};return g.createElement("div",{className:C},this._renderPlaceholder(),g.createElement("div",{className:b("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:b({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:m,spellCheck:O&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(N,{editor:this,editorState:c}),g.createElement(d,t({},y,{key:"contents"+this.state.contentsKey})))))},l.componentDidMount=function(){this._blockSelectEvents=!1,!I&&L("draft_ods_enabled")&&(I=!0,C.initODS()),this.setMode("edit"),V&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):H.execCommand("AutoUrlDetect",!1,!1))},l.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},i}(g.Component);return o(T,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:l,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:M,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),mB=T}var WB,QB,GB,KB,YB,XB,JB,$B,eP,tP,nP,rP,iP,oP,aP,lP,sP,cP,dP,uP,fP,hP,pP,CP,mP,gP,vP,yP={};function wP(){return WB||(WB=1),yP}function bP(){if(GB)return QB;GB=1;var e={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};return QB=e}function EP(){if(JB)return XB;JB=1;var e=MB(),t=ZN(),n=function(e,t){return e===t},r=function(e){return!!e},i=[];return XB=function(o){var a=o.getCharacterList().map(function(e){return e.getStyle()}).toList(),l=a.flatten().toSet().map(function(i){return function(i,o,a){var l=[],s=o.map(function(e){return e.has(a)}).toList();return t(s,n,r,function(t,n){var r=i.getText();l.push({offset:e.strlen(r.slice(0,t)),length:e.strlen(r.slice(t,n)),style:a})}),l}(o,a,i)});return Array.prototype.concat.apply(i,l.toJS())}}function MP(){if(eP)return $B;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}eP=1;var t=jN(),n=RN(),r=bP(),i=function(){if(YB)return KB;YB=1;var e=bP(),t=MB().strlen;return KB=function(n,r){var i=[];return n.findEntityRanges(function(e){return!!e.getEntity()},function(o,a){var l=n.getText(),s=n.getEntityAt(o);i.push({offset:t(l.slice(0,o)),length:t(l.slice(o,a)),key:Number(r[e.stringify(s)])})}),i},KB}(),o=EP(),a=PN(),l=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:o(e),entityRanges:i(e,t),data:e.getData().toObject()}},s=function(r,i,o,s){if(r instanceof t)o.push(l(r,i));else{r instanceof n||("production"!==process.env.NODE_ENV?a(!1,"block is not a BlockNode"):a(!1));var c=r.getParentKey(),d=s[r.getKey()]=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},l(r,i),{children:[]});c?s[c].children.push(d):o.push(d)}};return $B=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.entityMap,i=[],o={},a={},l=0;return e.getBlockMap().forEach(function(e){e.findEntityRanges(function(e){return null!==e.getEntity()},function(t){var i=e.getEntityAt(t),o=r.stringify(i);a[o]||(a[o]=i,n[o]="".concat(l),l++)}),s(e,n,i,o)}),{blocks:i,entityMap:n}}(e,t),t=function(e,t){var n=t.blocks,i=t.entityMap,o={};return Object.keys(i).forEach(function(t,n){var i=e.getEntity(r.unstringify(t));o[n]={type:i.getType(),mutability:i.getMutability(),data:i.getData()}}),{blocks:n,entityMap:o}}(e,t),t},$B}function AP(){if(nP)return tP;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}nP=1;var n=UN(),r=PN(),i=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},o={fromRawTreeStateToRawState:function(t){var n=t.blocks,o=[];return Array.isArray(n)||("production"!==process.env.NODE_ENV?r(!1,"Invalid raw state"):r(!1)),Array.isArray(n)&&n.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var i=n.pop();t(i);var o=i.children;Array.isArray(o)||("production"!==process.env.NODE_ENV?r(!1,"Invalid tree raw block"):r(!1)),n=n.concat([].concat(o.reverse()))}}(n,function(t){var n=e({},t);i(t)&&(n.depth=n.depth||0,function(t){Array.isArray(t.children)&&(t.children=t.children.map(function(n){return n.type===t.type?e({},n,{depth:(t.depth||0)+1}):n}))}(t),null!=t.children&&t.children.length>0)||(delete n.children,o.push(n))}),t.blocks=o,e({},t,{blocks:o})):t},fromRawStateToRawTreeState:function(t){var r=[],o=[];return t.blocks.forEach(function(t){var a=i(t),l=t.depth||0,s=e({},t,{children:[]});if(a){var c=o[0];if(null==c&&0===l)r.push(s);else if(null==c||c.depth<l-1){var d={key:n(),text:"",depth:l-1,type:t.type,children:[],entityRanges:[],inlineStyleRanges:[]};o.unshift(d),1===l?r.push(d):null!=c&&c.children.push(d),d.children.push(s)}else if(c.depth===l-1)c.children.push(s);else{for(;null!=c&&c.depth>=l;)o.shift(),c=o[0];l>0?c.children.push(s):r.push(s)}}else r.push(s)}),e({},t,{blocks:r})}};return tP=o}function xP(){if(fP)return uP;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fP=1;var n=jN(),r=RN(),i=sT(),o=iT(),a=AP(),l=function(){if(iP)return rP;iP=1;var e=AB(),t={isValidBlock:function(t,n){var r=t.getKey(),i=t.getParentKey();if(null!=i&&!n.get(i).getChildKeys().includes(r))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing parent -> child pointer on %s",r),!1;var o=t.getChildKeys().map(function(e){return n.get(e)});if(!o.every(function(e){return e.getParentKey()===r}))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing child -> parent pointer on %s",r),!1;var a=t.getPrevSiblingKey();if(null!=a&&n.get(a).getNextSiblingKey()!==r)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing nextSibling pointer on %s's prevSibling",r),!1;var l=t.getNextSiblingKey();return null!=l&&n.get(l).getPrevSiblingKey()!==r?("production"!==process.env.NODE_ENV&&e(!0,"Tree is missing prevSibling pointer on %s's nextSibling",r),!1):null!==l&&null!==a&&a===l?("production"!==process.env.NODE_ENV&&e(!0,"Tree has a two-node cycle at %s",r),!1):!(""!=t.text&&t.getChildKeys().size>0&&("production"!==process.env.NODE_ENV&&e(!0,"Leaf node %s has children",r),1))},isConnectedTree:function(t){var n=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==n.length)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. More or less than one first node"),!1;for(var r=0,i=n.shift().getKey(),o=[];null!=i;){var a=t.get(i),l=a.getChildKeys(),s=a.getNextSiblingKey();if(l.size>0){null!=s&&o.unshift(s);var c=l.map(function(e){return t.get(e)}),d=c.find(function(e){return null==e.getPrevSiblingKey()});if(null==d)return"production"!==process.env.NODE_ENV&&e(!0,"%s has no first child",i),!1;i=d.getKey()}else i=null!=a.getNextSiblingKey()?a.getNextSiblingKey():o.shift();r++}return r===t.size||("production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. %s nodes were seen instead of %s",r,t.size),!1)},isValidTree:function(e){var t=this;return!!e.toArray().every(function(n){return t.isValidBlock(n,e)})&&this.isConnectedTree(e)}};return rP=t}(),s=oT(),c=function(){if(aP)return oP;aP=1;var e=DN(),t=NN().List;return oP=function(n,r){var i=n.map(function(t,n){var i=r[n];return e.create({style:t,entity:i})});return t(i)}}(),d=function(){if(sP)return lP;sP=1;var e=MB().substr;return lP=function(t,n){var r=Array(t.length).fill(null);return n&&n.forEach(function(n){for(var i=e(t,0,n.offset).length,o=i+e(t,n.offset,n.length).length,a=i;a<o;a++)r[a]=n.key}),r},lP}(),u=function(){if(dP)return cP;dP=1;var e=MB(),t=NN().OrderedSet,n=e.substr,r=t();return cP=function(e,t){var i=Array(e.length).fill(r);return t&&t.forEach(function(t){for(var r=n(e,0,t.offset).length,o=r+n(e,t.offset,t.length).length;r<o;)i[r]=i[r].add(t.style),r++}),i},cP}(),f=UN(),h=aT(),p=NN(),C=PN(),m=h("draft_tree_data_support"),g=p.List,v=p.Map,y=p.OrderedMap,w=function(e,t){var n=e.key,r=e.type,i=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||f(),data:v(i),characterList:b(e,t)}},b=function(t,n){var r=t.text,i=t.entityRanges,o=t.inlineStyleRanges,a=i||[];return c(u(r,o||[]),d(r,a.filter(function(e){return n.hasOwnProperty(e.key)}).map(function(t){return e({},t,{key:n[t.key]})})))},E=function(t){return e({},t,{key:t.key||f()})},M=function(t,n,r){var i=n.map(function(t){return e({},t,{parentRef:r})});return t.concat(i.reverse())},A=function(t,i){var o=t.blocks.find(function(e){return Array.isArray(e.children)&&e.children.length>0}),s=m&&!o?a.fromRawStateToRawTreeState(t).blocks:t.blocks;if(!m)return function(e,t){return y(e.map(function(e){var r=new n(w(e,t));return[r.getKey(),r]}))}(o?a.fromRawTreeStateToRawState(t).blocks:s,i);var c=function(t,n){return t.map(E).reduce(function(i,o,a){Array.isArray(o.children)||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):C(!1));var l=o.children.map(E),s=new r(e({},w(o,n),{prevSibling:0===a?null:t[a-1].key,nextSibling:a===t.length-1?null:t[a+1].key,children:g(l.map(function(e){return e.key}))}));i=i.set(s.getKey(),s);for(var c=M([],l,s);c.length>0;){var d=c.pop(),u=d.parentRef,f=u.getChildKeys(),h=f.indexOf(d.key),p=Array.isArray(d.children);if(!p){p||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):C(!1));break}var m=d.children.map(E),v=new r(e({},w(d,n),{parent:u.getKey(),children:g(m.map(function(e){return e.key})),prevSibling:0===h?null:f.get(h-1),nextSibling:h===f.size-1?null:f.get(h+1)}));i=i.set(v.getKey(),v),c=M(c,m,v)}return i},y())}(s,i);return"production"!==process.env.NODE_ENV&&(l.isValidTree(c)||("production"!==process.env.NODE_ENV?C(!1,"Should be a valid tree"):C(!1))),c};return uP=function(e){Array.isArray(e.blocks)||("production"!==process.env.NODE_ENV?C(!1,"invalid RawDraftContentState"):C(!1));var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach(function(e){var r=t[e],i=r.type,a=r.mutability,l=r.data;n[e]=o.__create(i,a,l||{})}),n}(e),n=A(e,t),r=n.isEmpty()?new s:s.createEmpty(n.first().getKey());return new i({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}}function LP(){if(mP)return CP;mP=1;var e=function(){if(pP)return hP;pP=1;var e=_B();return hP=function(t){var n=e(t),r=0,i=0,o=0,a=0;if(n.length){if(n.length>1&&0===n[0].width){var l=n[1];r=l.top,i=l.right,o=l.bottom,a=l.left}else{var s=n[0];r=s.top,i=s.right,o=s.bottom,a=s.left}for(var c=1;c<n.length;c++){var d=n[c];0!==d.height&&0!==d.width&&(r=Math.min(r,d.top),i=Math.max(i,d.right),o=Math.max(o,d.bottom),a=Math.min(a,d.left))}}return{top:r,right:i,bottom:o,left:a,width:i-a,height:o-r}},hP}();return CP=function(t){var n=t.getSelection();if(!n.rangeCount)return null;var r=n.getRangeAt(0),i=e(r),o=i.top,a=i.right,l=i.bottom,s=i.left;return 0===o&&0===a&&0===l&&0===s?null:i},CP}function kP(){if(vP)return gP;vP=1;var e=pT(),t=TN(),n=DN(),r=CT(),i=jN(),o=sT(),a=gT(),l=vT(),s=qB(),c=gj(),d=iT(),u=eT(),f=rT(),h=hT(),p=SB(),C=wP(),m=RB(),g=oT(),v=MP(),y=xP(),w=UN(),b=UB(),E=LP(),M=ZB();return gP={Editor:s,EditorBlock:c,EditorState:h,CompositeDecorator:r,Entity:d,EntityInstance:f,BlockMapBuilder:t,CharacterMetadata:n,ContentBlock:i,ContentState:o,RawDraftContentState:C,SelectionState:g,AtomicBlockUtils:e,KeyBindingUtil:p,Modifier:u,RichUtils:m,DefaultDraftBlockRenderMap:a,DefaultDraftInlineStyle:l,convertFromHTML:M,convertFromRaw:y,convertToRaw:v,genKey:w,getDefaultKeyBinding:b,getVisibleSelectionRect:E}}var HP=kP(),SP={exports:{}},_P="@@__IMMUTABLE_INDEXED__@@";function VP(e){return Boolean(e&&e[_P])}var OP="@@__IMMUTABLE_KEYED__@@";function zP(e){return Boolean(e&&e[OP])}function IP(e){return zP(e)||VP(e)}var NP="@@__IMMUTABLE_ITERABLE__@@";function TP(e){return Boolean(e&&e[NP])}var DP=function(e){return TP(e)?e:wF(e)},ZP=function(e){function t(e){return zP(e)?e:bF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(DP),jP=function(e){function t(e){return VP(e)?e:EF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(DP),RP=function(e){function t(e){return TP(e)&&!IP(e)?e:MF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(DP);DP.Keyed=ZP,DP.Indexed=jP,DP.Set=RP;var BP="function"==typeof Symbol&&Symbol.iterator,PP="@@iterator",FP=BP||PP,UP=function(e){this.next=e};function qP(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function WP(){return{value:void 0,done:!0}}function QP(e){return!!Array.isArray(e)||!!YP(e)}function GP(e){return!(!e||"function"!=typeof e.next)}function KP(e){var t=YP(e);return t&&t.call(e)}function YP(e){var t=e&&(BP&&e[BP]||e[PP]);if("function"==typeof t)return t}UP.prototype.toString=function(){return"[Iterator]"},UP.KEYS=0,UP.VALUES=1,UP.ENTRIES=2,UP.prototype.inspect=UP.prototype.toSource=function(){return this.toString()},UP.prototype[FP]=function(){return this};var XP="delete",JP=32,$P=31,eF={};function tF(e){e&&(e.value=!0)}function nF(){}function rF(e){return void 0===e.size&&(e.size=e.__iterate(oF)),e.size}function iF(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?rF(e)+t:t}function oF(){return!0}function aF(e,t,n){return(0===e&&!dF(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function lF(e,t){return cF(e,t,0)}function sF(e,t){return cF(e,t,t)}function cF(e,t,n){return void 0===e?n:dF(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function dF(e){return e<0||0===e&&1/e==-1/0}var uF="@@__IMMUTABLE_RECORD__@@";function fF(e){return Boolean(e&&e[uF])}function hF(e){return TP(e)||fF(e)}var pF="@@__IMMUTABLE_ORDERED__@@";function CF(e){return Boolean(e&&e[pF])}var mF="@@__IMMUTABLE_SEQ__@@";function gF(e){return Boolean(e&&e[mF])}var vF=Object.prototype.hasOwnProperty;function yF(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var wF=function(e){function t(e){return null==e?HF():hF(e)?e.toSeq():function(e){var t=VF(e);if(t)return(r=YP(n=e))&&r===n.entries?t.fromEntrySeq():function(e){var t=YP(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var n,r;if("object"==typeof e)return new xF(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new UP(function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return qP(e,o[0],o[1])})}return this.__iteratorUncached(e,t)},t}(DP),bF=function(e){function t(e){return null==e?HF().toKeyedSeq():TP(e)?zP(e)?e.toSeq():e.fromEntrySeq():fF(e)?e.toSeq():SF(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(wF),EF=function(e){function t(e){return null==e?HF():TP(e)?zP(e)?e.entrySeq():e.toIndexedSeq():fF(e)?e.toSeq().entrySeq():_F(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(wF),MF=function(e){function t(e){return(TP(e)&&!IP(e)?e:EF(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(wF);wF.isSeq=gF,wF.Keyed=bF,wF.Set=MF,wF.Indexed=EF,wF.prototype[mF]=!0;var AF=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[iF(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new UP(function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return qP(e,o,n[o])})},t}(EF),xF=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return vF.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new UP(function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return qP(e,a,n[a])})},t}(bF);xF.prototype[pF]=!0;var LF,kF=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=KP(this._collection),r=0;if(GP(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=KP(this._collection);if(!GP(n))return new UP(WP);var r=0;return new UP(function(){var t=n.next();return t.done?t:qP(e,r++,t.value)})},t}(EF);function HF(){return LF||(LF=new AF([]))}function SF(e){var t=VF(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new xF(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function _F(e){var t=VF(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function VF(e){return yF(e)?new AF(e):QP(e)?new kF(e):void 0}function OF(){return this.__ensureOwner()}function zF(){return this.__ownerID?this:this.__ensureOwner(new nF)}var IF="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function NF(e){return e>>>1&1073741824|3221225471&e}var TF=Object.prototype.valueOf;function DF(e){if(null==e)return ZF(e);if("function"==typeof e.hashCode)return NF(e.hashCode(e));var t,n=(t=e).valueOf!==TF&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==n)return ZF(n);switch(typeof n){case"boolean":return n?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return NF(t)}(n);case"string":return n.length>GF?function(e){var t=XF[e];void 0===t&&(t=jF(e),YF===KF&&(YF=0,XF={}),YF++,XF[e]=t);return t}(n):jF(n);case"object":case"function":return function(e){var t;if(UF&&void 0!==(t=FF.get(e)))return t;if(t=e[QF],void 0!==t)return t;if(!BF){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[QF]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=PF(),UF)FF.set(e,t);else{if(void 0!==RF&&!1===RF(e))throw new Error("Non-extensible objects are not allowed as keys.");if(BF)Object.defineProperty(e,QF,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[QF]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[QF]=t}}return t}(n);case"symbol":return function(e){var t=qF[e];if(void 0!==t)return t;return t=PF(),qF[e]=t,t}(n);default:if("function"==typeof n.toString)return jF(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function ZF(e){return null===e?1108378658:1108378659}function jF(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return NF(t)}var RF=Object.isExtensible,BF=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function PF(){var e=++WF;return 1073741824&WF&&(WF=0),e}var FF,UF="function"==typeof WeakMap;UF&&(FF=new WeakMap);var qF=Object.create(null),WF=0,QF="__immutablehash__";"function"==typeof Symbol&&(QF=Symbol(QF));var GF=16,KF=255,YF=0,XF={},JF=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=iU(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=rU(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(bF);JF.prototype[pF]=!0;var $F=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&rF(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&rF(this),new UP(function(){var o=r.next();return o.done?o:qP(e,t?n.size-++i:i++,o.value,o)})},t}(EF),eU=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new UP(function(){var t=n.next();return t.done?t:qP(e,t.value,t.value,t)})},t}(MF),tU=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){CU(t);var r=TP(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new UP(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){CU(r);var i=TP(r);return qP(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(bF);function nU(e){var t=gU(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=vU,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new UP(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(1===t?0:1,n)},t}function rU(e,t,n){var r=gU(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,eF);return o===eF?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new UP(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return qP(r,l,t.call(n,a[1],l,e),i)})},r}function iU(e,t){var n=this,r=gU(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=nU(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=vU,r.__iterate=function(n,r){var i=this,o=0;return r&&rF(e),e.__iterate(function(e,a){return n(e,t?a:r?i.size-++o:o++,i)},!r)},r.__iterator=function(r,i){var o=0;i&&rF(e);var a=e.__iterator(2,!i);return new UP(function(){var e=a.next();if(e.done)return e;var l=e.value;return qP(r,t?l[0]:i?n.size-++o:o++,l[1],e)})},r}function oU(e,t,n,r){var i=gU(e);return r&&(i.has=function(r){var i=e.get(r,eF);return i!==eF&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,eF);return o!==eF&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,s){if(t.call(n,e,o,s))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),l=0;return new UP(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],d=s[1];if(t.call(n,d,c,e))return qP(i,r?c:l++,d,o)}})},i}function aU(e,t,n,r){var i=e.size;if(aF(t,n,i))return e;if(void 0===i&&(t<0||n<0))return aU(e.toSeq().cacheResult(),t,n,r);var o,a=lF(t,i),l=sF(n,i)-a;l==l&&(o=l<0?0:l);var s=gU(e);return s.size=0===o?o:e.size&&o||void 0,!r&&gF(e)&&o>=0&&(s.get=function(t,n){return(t=iF(this,t))>=0&&t<o?e.get(t+a,n):n}),s.__iterateUncached=function(t,n){var i=this;if(0===o)return 0;if(n)return this.cacheResult().__iterate(t,n);var l=0,s=!0,c=0;return e.__iterate(function(e,n){if(!s||!(s=l++<a))return c++,!1!==t(e,r?n:c-1,i)&&c!==o}),c},s.__iteratorUncached=function(t,n){if(0!==o&&n)return this.cacheResult().__iterator(t,n);if(0===o)return new UP(WP);var i=e.__iterator(t,n),l=0,s=0;return new UP(function(){for(;l++<a;)i.next();if(++s>o)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:qP(t,s-1,0===t?void 0:e.value[1],e)})},s}function lU(e,t,n,r){var i=gU(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,s=0;return e.__iterate(function(e,o,c){if(!l||!(l=t.call(n,e,o,c)))return s++,i(e,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(2,o),s=!0,c=0;return new UP(function(){var e,o,d;do{if((e=l.next()).done)return r||1===i?e:qP(i,c++,0===i?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],s&&(s=t.call(n,d,o,a))}while(s);return 2===i?e:qP(i,o,d,e)})},i}$F.prototype.cacheResult=JF.prototype.cacheResult=eU.prototype.cacheResult=tU.prototype.cacheResult=vU;var sU=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),this[OP]=this._wrappedIterables[0][OP],this[_P]=this._wrappedIterables[0][_P],this[pF]=this._wrappedIterables[0][pF]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(0!==this._wrappedIterables.length){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=zP(this),i=r?2:1,o=this._wrappedIterables[n].__iterator(i,t),a=!0,l=0;a;){for(var s=o.next();s.done;){if(++n===this._wrappedIterables.length)return l;s=(o=this._wrappedIterables[n].__iterator(i,t)).next()}a=!1!==(r?e(s.value[1],s.value[0],this):e(s.value,l,this)),l++}return l}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(0===this._wrappedIterables.length)return new UP(WP);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new UP(function(){for(var o=i.next();o.done;){if(++r===n._wrappedIterables.length)return o;o=(i=n._wrappedIterables[r].__iterator(e,t)).next()}return o})},t}(wF);function cU(e,t,n){var r=gU(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,l=!1;return function e(s,c){s.__iterate(function(o,s){return(!t||c<t)&&TP(o)?e(o,c+1):(a++,!1===i(o,n?s:a-1,r)&&(l=!0)),!l},o)}(e,0),a},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),a=[],l=0;return new UP(function(){for(;o;){var e=o.next();if(!1===e.done){var s=e.value;if(2===r&&(s=s[1]),t&&!(a.length<t)||!TP(s))return n?e:qP(r,l++,s,e);a.push(o),o=s.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}})},r}function dU(e,t,n){t||(t=yU);var r=zP(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?bF(o):VP(e)?EF(o):MF(o)}function uU(e,t,n){if(t||(t=yU),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return fU(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return fU(t,e,n)?n:e})}function fU(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hU(e,t,n,r){var i=gU(e),o=new AF(n).map(function(e){return e.size});return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map(function(e){return e=DP(e),KP(i?e.reverse():e)}),a=0,l=!1;return new UP(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),l?{value:void 0,done:!0}:qP(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function pU(e,t){return e===t?e:gF(e)?t:e.constructor(t)}function CU(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function mU(e){return zP(e)?ZP:VP(e)?jP:RP}function gU(e){return Object.create((zP(e)?bF:VP(e)?EF:MF).prototype)}function vU(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):wF.prototype.cacheResult.call(this)}function yU(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function wU(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function bU(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(wU(e)&&wU(t)&&e.equals(t))}function EU(e,t,n,r){return bq(e,[t],n,r)}function MU(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return xU(this,e)}function AU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return xU(this,t,e)}function xU(e,t,n){for(var r=[],i=0;i<t.length;i++){var o=ZP(t[i]);0!==o.size&&r.push(o)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){EU(e,r,eF,function(e){return e===eF?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):fF(e)?e:e.constructor(r[0])}var LU=Object.prototype.toString;function kU(e){if(!e||"object"!=typeof e||"[object Object]"!==LU.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function HU(e){return"object"==typeof e&&(hF(e)||Array.isArray(e)||kU(e))}function SU(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function _U(e){if(Array.isArray(e))return SU(e);var t={};for(var n in e)vF.call(e,n)&&(t[n]=e[n]);return t}function VU(e,t,n){return OU(e,t,function(e){function t(n,r,i){return HU(n)&&HU(r)&&(o=r,a=wF(n),l=wF(o),VP(a)===VP(l)&&zP(a)===zP(l))?OU(n,[r],t):e?e(n,r,i):r;var o,a,l}return t}(n))}function OU(e,t,n){if(!HU(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(hF(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?jP:ZP,a=r?function(t){i===e&&(i=_U(i)),i.push(t)}:function(t,r){var o=vF.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=_U(i)),i[r]=a)},l=0;l<t.length;l++)o(t[l]).forEach(a);return i}function zU(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return VU(this,e)}function IU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return VU(this,t,e)}function NU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return bq(this,e,oq(),function(e){return VU(e,t)})}function TU(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return bq(this,e,oq(),function(e){return OU(e,t)})}function DU(e,t,n){return bq(e,t,eF,function(){return n})}function ZU(e,t){return DU(this,e,t)}function jU(e,t,n){return 1===arguments.length?e(this):EU(this,e,t,n)}function RU(e,t,n){return bq(this,e,t,n)}function BU(){return this.__altered}function PU(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var FU="@@__IMMUTABLE_MAP__@@";function UU(e){return Boolean(e&&e[FU])}function qU(e,t){if(!e)throw new Error(t)}function WU(e){qU(e!==1/0,"Cannot perform this action with an infinite size.")}var QU=function(e){function t(t){return null==t?oq():UU(t)&&!CF(t)?t:oq().withMutations(function(n){var r=e(t);WU(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return aq(this,e,t)},t.prototype.remove=function(e){return aq(this,e,eF)},t.prototype.deleteAll=function(e){var t=DP(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):oq()},t.prototype.sort=function(e){return Bq(dU(this,e))},t.prototype.sortBy=function(e,t){return Bq(dU(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,o){r.set(o,e.call(t,i,o,n))})})},t.prototype.__iterator=function(e,t){return new tq(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?iq(this.size,this._root,e,this.__hash):0===this.size?oq():(this.__ownerID=e,this.__altered=!1,this)},t}(ZP);QU.isMap=UU;var GU=QU.prototype;GU[FU]=!0,GU[XP]=GU.remove,GU.removeAll=GU.deleteAll,GU.setIn=ZU,GU.removeIn=GU.deleteIn=Aq,GU.update=jU,GU.updateIn=RU,GU.merge=GU.concat=MU,GU.mergeWith=AU,GU.mergeDeep=zU,GU.mergeDeepWith=IU,GU.mergeIn=TU,GU.mergeDeepIn=NU,GU.withMutations=PU,GU.wasAltered=BU,GU.asImmutable=OF,GU["@@transducer/init"]=GU.asMutable=zF,GU["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},GU["@@transducer/result"]=function(e){return e.asImmutable()};var KU=function(e,t){this.ownerID=e,this.entries=t};KU.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(bU(n,i[o][0]))return i[o][1];return r},KU.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===eF,s=this.entries,c=0,d=s.length;c<d&&!bU(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(tF(a),(l||!u)&&tF(o),!l||1!==s.length){if(!u&&!l&&s.length>=fq)return function(e,t,n,r){e||(e=new nF);for(var i=new $U(e,DF(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,s,r,i);var f=e&&e===this.ownerID,h=f?s:SU(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new KU(e,h)}};var YU=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};YU.prototype.get=function(e,t,n,r){void 0===t&&(t=DF(n));var i=1<<((0===e?t:t>>>e)&$P),o=this.bitmap;return 0===(o&i)?r:this.nodes[dq(o&i-1)].get(e+5,t,n,r)},YU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=DF(r));var l=(0===t?n:n>>>t)&$P,s=1<<l,c=this.bitmap,d=0!==(c&s);if(!d&&i===eF)return this;var u=dq(c&s-1),f=this.nodes,h=d?f[u]:void 0,p=lq(h,e,t+5,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=hq)return function(e,t,n,r,i){for(var o=0,a=new Array(JP),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new XU(e,o+1,a)}(e,f,c,l,p);if(d&&!p&&2===f.length&&sq(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&sq(p))return p;var C=e&&e===this.ownerID,m=d?p?c:c^s:c|s,g=d?p?uq(f,u,p,C):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(f,u,C):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}(f,u,p,C);return C?(this.bitmap=m,this.nodes=g,this):new YU(e,m,g)};var XU=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};XU.prototype.get=function(e,t,n,r){void 0===t&&(t=DF(n));var i=(0===e?t:t>>>e)&$P,o=this.nodes[i];return o?o.get(e+5,t,n,r):r},XU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=DF(r));var l=(0===t?n:n>>>t)&$P,s=i===eF,c=this.nodes,d=c[l];if(s&&!d)return this;var u=lq(d,e,t+5,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<pq)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,s=1,c=t.length;l<c;l++,s<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=s,a[o++]=d)}return new YU(e,i,a)}(e,c,f,l)}else f++;var h=e&&e===this.ownerID,p=uq(c,l,u,h);return h?(this.count=f,this.nodes=p,this):new XU(e,f,p)};var JU=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};JU.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(bU(n,i[o][0]))return i[o][1];return r},JU.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=DF(r));var l=i===eF;if(n!==this.keyHash)return l?this:(tF(a),tF(o),cq(this,e,t,n,[r,i]));for(var s=this.entries,c=0,d=s.length;c<d&&!bU(r,s[c][0]);c++);var u=c<d;if(u?s[c][1]===i:l)return this;if(tF(a),(l||!u)&&tF(o),l&&2===d)return new $U(e,this.keyHash,s[1^c]);var f=e&&e===this.ownerID,h=f?s:SU(s);return u?l?c===d-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new JU(e,this.keyHash,h)};var $U=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};$U.prototype.get=function(e,t,n,r){return bU(n,this.entry[0])?this.entry[1]:r},$U.prototype.update=function(e,t,n,r,i,o,a){var l=i===eF,s=bU(r,this.entry[0]);return(s?i===this.entry[1]:l)?this:(tF(a),l?void tF(o):s?e&&e===this.ownerID?(this.entry[1]=i,this):new $U(e,this.keyHash,[r,i]):(tF(o),cq(this,e,t,DF(r),[r,i])))},KU.prototype.iterate=JU.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},YU.prototype.iterate=XU.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},$U.prototype.iterate=function(e,t){return e(this.entry)};var eq,tq=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&rq(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return nq(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return nq(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return nq(e,o.entry);t=this._stack=rq(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(UP);function nq(e,t){return qP(e,t[0],t[1])}function rq(e,t){return{node:e,index:0,__prev:t}}function iq(e,t,n,r){var i=Object.create(GU);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function oq(){return eq||(eq=iq(0))}function aq(e,t,n){var r,i;if(e._root){var o={value:!1},a={value:!1};if(r=lq(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===eF?-1:1:0)}else{if(n===eF)return e;i=1,r=new KU(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?iq(i,r):oq()}function lq(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===eF?e:(tF(l),tF(a),new $U(t,r,[i,o]))}function sq(e){return e.constructor===$U||e.constructor===JU}function cq(e,t,n,r,i){if(e.keyHash===r)return new JU(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&$P,l=(0===n?r:r>>>n)&$P,s=a===l?[cq(e,t,n+5,r,i)]:(o=new $U(t,r,i),a<l?[e,o]:[o,e]);return new YU(t,1<<a|1<<l,s)}function dq(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function uq(e,t,n,r){var i=r?e:SU(e);return i[t]=n,i}var fq=8,hq=16,pq=8;function Cq(e){if(yF(e)&&"string"!=typeof e)return e;if(CF(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function mq(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function gq(e,t){return hF(e)?e.has(t):HU(e)&&vF.call(e,t)}function vq(e,t,n){return hF(e)?e.get(t,n):gq(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function yq(e,t){if(!HU(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(hF(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!vF.call(e,t))return e;var n=_U(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function wq(e,t,n){if(!HU(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(hF(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(vF.call(e,t)&&n===e[t])return e;var r=_U(e);return r[t]=n,r}function bq(e,t,n,r){r||(r=n,n=void 0);var i=Eq(hF(e),e,Cq(t),0,n,r);return i===eF?n:i}function Eq(e,t,n,r,i,o){var a=t===eF;if(r===n.length){var l=a?i:t,s=o(l);return s===l?t:s}if(!a&&!HU(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(n).slice(0,r).map(mq)+"]: "+t);var c=n[r],d=a?eF:vq(t,c,eF),u=Eq(d===eF?e:hF(d),d,n,r+1,i,o);return u===d?t:u===eF?yq(t,c):wq(a?e?oq():{}:t,c,u)}function Mq(e,t){return bq(e,t,function(){return eF})}function Aq(e){return Mq(this,e)}var xq="@@__IMMUTABLE_LIST__@@";function Lq(e){return Boolean(e&&e[xq])}var kq=function(e){function t(t){var n=zq();if(null==t)return n;if(Lq(t))return t;var r=e(t),i=r.size;return 0===i?n:(WU(i),i>0&&i<JP?Oq(0,i,5,null,new Sq(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=iF(this,e))>=0&&e<this.size){var n=Tq(this,e+=this._origin);return n&&n.array[e&$P]}return t},t.prototype.set=function(e,t){return function(e,t,n){if(t=iF(e,t),t!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Dq(e,t).set(0,n):Dq(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=Zq(e._capacity)?r=Iq(r,e.__ownerID,0,t,n,o):i=Iq(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Oq(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):zq()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Dq(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return Dq(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Dq(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return Dq(this,1)},t.prototype.shuffle=function(e){return void 0===e&&(e=Math.random),this.withMutations(function(t){for(var n,r,i=t.size;i;)n=Math.floor(e()*i--),r=t.get(n),t.set(n,t.get(i)),t.set(i,r)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&QP(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return Dq(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return aF(e,t,n)?this:Dq(this,lF(e,n),sF(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=Vq(this,t);return new UP(function(){var i=r();return i===_q?{value:void 0,done:!0}:qP(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=Vq(this,t);(n=i())!==_q&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Oq(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?zq():(this.__ownerID=e,this.__altered=!1,this)},t}(jP);kq.isList=Lq;var Hq=kq.prototype;Hq[xq]=!0,Hq[XP]=Hq.remove,Hq.merge=Hq.concat,Hq.setIn=ZU,Hq.deleteIn=Hq.removeIn=Aq,Hq.update=jU,Hq.updateIn=RU,Hq.mergeIn=TU,Hq.mergeDeepIn=NU,Hq.withMutations=PU,Hq.wasAltered=BU,Hq.asImmutable=OF,Hq["@@transducer/init"]=Hq.asMutable=zF,Hq["@@transducer/step"]=function(e,t){return e.push(t)},Hq["@@transducer/result"]=function(e){return e.asImmutable()};var Sq=function(e,t){this.array=e,this.ownerID=t};Sq.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+5)-1)||0===this.array.length)return this;var r=n>>>t&$P;if(r>=this.array.length)return new Sq([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var l=Nq(this,e);if(!o)for(var s=0;s<r;s++)l.array[s]=void 0;return i&&(l.array[r]=i),l},Sq.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+5:JP)||0===this.array.length)return this;var r,i=n-1>>>t&$P;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=Nq(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var _q={};function Vq(e,t){var n=e._origin,r=e._capacity,i=Zq(r),o=e._tail;return a(e._root,e._level,0);function a(e,l,s){return 0===l?function(e,a){var l=a===i?o&&o.array:e&&e.array,s=a>n?0:n-a,c=r-a;c>JP&&(c=JP);return function(){if(s===c)return _q;var e=t?--c:s++;return l&&l[e]}}(e,s):function(e,i,o){var l,s=e&&e.array,c=o>n?0:n-o>>i,d=1+(r-o>>i);d>JP&&(d=JP);return function(){for(;;){if(l){var e=l();if(e!==_q)return e;l=null}if(c===d)return _q;var n=t?--d:c++;l=a(s&&s[n],i-5,o+(n<<i))}}}(e,l,s)}}function Oq(e,t,n,r,i,o,a){var l=Object.create(Hq);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function zq(){return Oq(0,0,5)}function Iq(e,t,n,r,i,o){var a,l=r>>>n&$P,s=e&&l<e.array.length;if(!s&&void 0===i)return e;if(n>0){var c=e&&e.array[l],d=Iq(c,t,n-5,r,i,o);return d===c?e:((a=Nq(e,t)).array[l]=d,a)}return s&&e.array[l]===i?e:(o&&tF(o),a=Nq(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Nq(e,t){return t&&e&&t===e.ownerID?e:new Sq(e?e.array.slice():[],t)}function Tq(e,t){if(t>=Zq(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&$P],r-=5;return n}}function Dq(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new nF,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var s=e._level,c=e._root,d=0;a+d<0;)c=new Sq(c&&c.array.length?[void 0,c]:[],r),d+=1<<(s+=5);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Zq(o),f=Zq(l);f>=1<<s+5;)c=new Sq(c&&c.array.length?[c]:[],r),s+=5;var h=e._tail,p=f<u?Tq(e,l-1):f>u?new Sq([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var C=c=Nq(c,r),m=s;m>5;m-=5){var g=u>>>m&$P;C=C.array[g]=Nq(C.array[g],r)}C.array[u>>>5&$P]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,s=5,c=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;c;){var v=a>>>s&$P;if(v!==f>>>s&$P)break;v&&(d+=(1<<s)*v),s-=5,c=c.array[v]}c&&a>i&&(c=c.removeBefore(r,s,a-d)),c&&f<u&&(c=c.removeAfter(r,s,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):Oq(a,l,s,c,p)}function Zq(e){return e<JP?0:e-1>>>5<<5}function jq(e){return UU(e)&&CF(e)}var Rq,Bq=function(e){function t(e){return null==e?Fq():jq(e)?e:Fq().withMutations(function(t){var n=ZP(e);WU(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Fq()},t.prototype.set=function(e,t){return Uq(this,e,t)},t.prototype.remove=function(e){return Uq(this,e,eF)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Pq(t,n,e,this.__hash):0===this.size?Fq():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(QU);function Pq(e,t,n,r){var i=Object.create(Bq.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Fq(){return Rq||(Rq=Pq(oq(),zq()))}function Uq(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),s=void 0!==l;if(n===eF){if(!s)return e;a.size>=JP&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(s){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e.__altered=!0,e):Pq(r,i)}Bq.isOrderedMap=jq,Bq.prototype[pF]=!0,Bq.prototype[XP]=Bq.prototype.remove;var qq="@@__IMMUTABLE_STACK__@@";function Wq(e){return Boolean(e&&e[qq])}var Qq=function(e){function t(e){return null==e?Xq():Wq(e)?e:Xq().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=iF(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Yq(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Wq(t))return t;WU(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Yq(n,r)},t.prototype.pop=function(){return this.slice(1)},t.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):Xq()},t.prototype.slice=function(t,n){if(aF(t,n,this.size))return this;var r=lF(t,this.size);if(sF(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Yq(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yq(this.size,this._head,e,this.__hash):0===this.size?Xq():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new AF(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new AF(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new UP(function(){if(r){var t=r.value;return r=r.next,qP(e,n++,t)}return{value:void 0,done:!0}})},t}(jP);Qq.isStack=Wq;var Gq,Kq=Qq.prototype;function Yq(e,t,n,r){var i=Object.create(Kq);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Xq(){return Gq||(Gq=Yq(0))}function Jq(e,t,n,r,i,o){return WU(e.size),e.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)},o),n}function $q(e,t){return t}function eW(e,t){return[t,e]}function tW(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function nW(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function rW(e,t){return e<t?1:e>t?-1:0}function iW(e,t){if(e===t)return!0;if(!TP(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||zP(e)!==zP(t)||VP(e)!==VP(t)||CF(e)!==CF(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!IP(e);if(CF(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&bU(i[1],e)&&(n||bU(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,l=t.__iterate(function(t,r){if(n?!e.has(t):i?!bU(t,e.get(r,eF)):!bU(e.get(r,eF),t))return a=!1,!1});return a&&e.size===l}Kq[qq]=!0,Kq.shift=Kq.pop,Kq.unshift=Kq.push,Kq.unshiftAll=Kq.pushAll,Kq.withMutations=PU,Kq.wasAltered=BU,Kq.asImmutable=OF,Kq["@@transducer/init"]=Kq.asMutable=zF,Kq["@@transducer/step"]=function(e,t){return e.unshift(t)},Kq["@@transducer/result"]=function(e){return e.asImmutable()};var oW,aW=function(e){function t(e,n,r){if(void 0===r&&(r=1),!(this instanceof t))return new t(e,n,r);if(qU(0!==r,"Cannot step a Range by 0"),qU(void 0!==e,"You must define a start value when using Range"),qU(void 0!==n,"You must define an end value when using Range"),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(oW)return oW;oW=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+iF(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return aF(e,n,this.size)?this:(e=lF(e,this.size),(n=sF(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new UP(function(){if(o===n)return{value:void 0,done:!0};var a=i;return i+=t?-r:r,qP(e,t?n-++o:o++,a)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:iW(this,e)},t}(EF),lW="@@__IMMUTABLE_SET__@@";function sW(e){return Boolean(e&&e[lW])}var cW=function(e){function t(t){return null==t?pW():sW(t)&&!CF(t)?t:pW().withMutations(function(n){var r=e(t);WU(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(ZP(e).keySeq())},t.intersect=function(e){return(e=DP(e).toArray()).length?uW.intersect.apply(t(e.pop()),e):pW()},t.union=function(e){return(e=DP(e).toArray()).length?uW.union.apply(t(e.pop()),e):pW()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return fW(this,this._map.set(e,e))},t.prototype.remove=function(e){return fW(this,this._map.remove(e))},t.prototype.clear=function(){return fW(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=fW(this,this._map.mapEntries(function(i){var o=i[1],a=e.call(t,o,o,n);return a!==o&&(r=!0),[a,a]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)"string"==typeof t[r]?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return SW(dU(this,e))},t.prototype.sortBy=function(e,t){return SW(dU(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(RP);cW.isSet=sW;var dW,uW=cW.prototype;function fW(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function hW(e,t){var n=Object.create(uW);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function pW(){return dW||(dW=hW(oq()))}function CW(e,t,n){for(var r=Cq(t),i=0;i!==r.length;)if((e=vq(e,r[i++],eF))===eF)return n;return e}function mW(e,t){return CW(this,e,t)}function gW(e,t){return CW(e,t,eF)!==eF}function vW(){WU(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}function yW(e){if(!e||"object"!=typeof e)return e;if(!TP(e)){if(!HU(e))return e;e=wF(e)}if(zP(e)){var t={};return e.__iterate(function(e,n){t[n]=yW(e)}),t}var n=[];return e.__iterate(function(e){n.push(yW(e))}),n}function wW(e){if(e.size===1/0)return 0;var t=CF(e),n=zP(e),r=t?1:0;return e.__iterate(n?t?function(e,t){r=31*r+bW(DF(e),DF(t))|0}:function(e,t){r=r+bW(DF(e),DF(t))|0}:t?function(e){r=31*r+DF(e)|0}:function(e){r=r+DF(e)|0}),function(e,t){return t=IF(t,3432918353),t=IF(t<<15|t>>>-15,461845907),t=IF(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=IF(t^t>>>16,2246822507),t=IF(t^t>>>13,3266489909),t=NF(t^t>>>16),t}(e.size,r)}function bW(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function EW(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}uW[lW]=!0,uW[XP]=uW.remove,uW.merge=uW.concat=uW.union,uW.withMutations=PU,uW.asImmutable=OF,uW["@@transducer/init"]=uW.asMutable=zF,uW["@@transducer/step"]=function(e,t){return e.add(t)},uW["@@transducer/result"]=function(e){return e.asImmutable()},uW.__empty=pW,uW.__make=hW,DP.Iterator=UP,EW(DP,{toArray:function(){WU(this.size);var e=new Array(this.size||0),t=zP(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new $F(this)},toJS:function(){return yW(this)},toKeyedSeq:function(){return new JF(this,!0)},toMap:function(){return QU(this.toKeyedSeq())},toObject:vW,toOrderedMap:function(){return Bq(this.toKeyedSeq())},toOrderedSet:function(){return SW(zP(this)?this.valueSeq():this)},toSet:function(){return cW(zP(this)?this.valueSeq():this)},toSetSeq:function(){return new eU(this)},toSeq:function(){return VP(this)?this.toIndexedSeq():zP(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Qq(zP(this)?this.valueSeq():this)},toList:function(){return kq(zP(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return pU(this,function(e,t){var n=zP(e),r=[e].concat(t).map(function(e){return TP(e)?n&&(e=ZP(e)):e=n?SF(e):_F(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&zP(i)||VP(e)&&VP(i))return i}return new sU(r)}(this,e))},includes:function(e){return this.some(function(t){return bU(t,e)})},entries:function(){return this.__iterator(2)},every:function(e,t){WU(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return pU(this,oU(this,e,t,!0))},partition:function(e,t){return function(e,t,n){var r=zP(e),i=[[],[]];e.__iterate(function(o,a){i[t.call(n,o,a,e)?1:0].push(r?[a,o]:o)});var o=mU(e);return i.map(function(t){return pU(e,o(t))})}(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return WU(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){WU(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(0)},map:function(e,t){return pU(this,rU(this,e,t))},reduce:function(e,t,n){return Jq(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Jq(this,e,t,n,arguments.length<2,!0)},reverse:function(){return pU(this,iU(this,!0))},slice:function(e,t){return pU(this,aU(this,e,t,!0))},some:function(e,t){WU(this.size);var n=!1;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=!0,!1}),n},sort:function(e){return pU(this,dU(this,e))},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(e,t){return rF(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=QU().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return iW(this,e)},entrySeq:function(){var e=this;if(e._cache)return new AF(e._cache);var t=e.toSeq().map(eW).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tW(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(oF,null,e)},flatMap:function(e,t){return pU(this,function(e,t,n){var r=mU(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return pU(this,cU(this,e,!0))},fromEntrySeq:function(){return new tU(this)},get:function(e,t){return this.find(function(t,n){return bU(n,e)},void 0,t)},getIn:mW,groupBy:function(e,t){return function(e,t,n){var r=zP(e),i=(CF(e)?Bq():QU()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=mU(e);return i.map(function(t){return pU(e,o(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,eF)!==eF},hasIn:function(e){return gW(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:DP(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:DP(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return bU(t,e)})},keySeq:function(){return this.toSeq().map($q).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return uU(this,e)},maxBy:function(e,t){return uU(this,t,e)},min:function(e){return uU(this,e?nW(e):rW)},minBy:function(e,t){return uU(this,t?nW(t):rW,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return pU(this,lU(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tW(e),t)},sortBy:function(e,t){return pU(this,dU(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return pU(this,function(e,t,n){var r=gU(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),l=!0;return new UP(function(){if(!l)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,s=i[0],c=i[1];return t.call(n,c,s,o)?2===r?e:qP(r,s,c,e):(l=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tW(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=wW(this))}});var MW=DP.prototype;MW[NP]=!0,MW[FP]=MW.values,MW.toJSON=MW.toArray,MW.__toStringMapper=mq,MW.inspect=MW.toSource=function(){return this.toString()},MW.chain=MW.flatMap,MW.contains=MW.includes,EW(ZP,{flip:function(){return pU(this,nU(this))},mapEntries:function(e,t){var n=this,r=0;return pU(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return pU(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var AW=ZP.prototype;AW[OP]=!0,AW[FP]=MW.entries,AW.toJSON=vW,AW.__toStringMapper=function(e,t){return mq(t)+": "+mq(e)},EW(jP,{toKeyedSeq:function(){return new JF(this,!1)},filter:function(e,t){return pU(this,oU(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return pU(this,iU(this,!1))},slice:function(e,t){return pU(this,aU(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=lF(e,e<0?this.count():this.size);var r=this.slice(0,e);return pU(this,1===n?r:r.concat(SU(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return pU(this,cU(this,e,!1))},get:function(e,t){return(e=iF(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=iF(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return pU(this,function(e,t){var n=gU(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new UP(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?qP(n,a++,t):qP(n,a++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(SU(arguments)),t=hU(this.toSeq(),EF.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),pU(this,n)},keySeq:function(){return aW(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return pU(this,lU(this,e,t,!1))},zip:function(){return pU(this,hU(this,kW,[this].concat(SU(arguments))))},zipAll:function(){return pU(this,hU(this,kW,[this].concat(SU(arguments)),!0))},zipWith:function(e){var t=SU(arguments);return t[0]=this,pU(this,hU(this,e,t))}});var xW=jP.prototype;xW[_P]=!0,xW[pF]=!0,EW(RP,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var LW=RP.prototype;function kW(){return SU(arguments)}function HW(e){return sW(e)&&CF(e)}LW.has=MW.includes,LW.contains=LW.includes,LW.keys=LW.values,EW(bF,AW),EW(EF,xW),EW(MF,LW);var SW=function(e){function t(e){return null==e?zW():HW(e)?e:zW().withMutations(function(t){var n=RP(e);WU(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(ZP(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(cW);SW.isOrderedSet=HW;var _W,VW=SW.prototype;function OW(e,t){var n=Object.create(VW);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function zW(){return _W||(_W=OW(Fq()))}VW[pF]=!0,VW.zip=xW.zip,VW.zipWith=xW.zipWith,VW.zipAll=xW.zipAll,VW.__empty=zW,VW.__make=OW;var IW=function(e,t){var n;!function(e){if(fF(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(hF(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var l=Object.keys(e),s=i._indices={};i._name=t,i._keys=l,i._defaultValues=e;for(var c=0;c<l.length;c++){var d=l[c];s[d]=c,i[d]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+DW(this)+' with property "'+d+'" since that property name is part of the Record API.'):jW(i,d)}}return this.__ownerID=void 0,this._values=kq().withMutations(function(e){e.setSize(a._keys.length),ZP(o).forEach(function(t,n){e.set(a._indices[n],t===a._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(NW);return i.constructor=r,t&&(r.displayName=t),r};IW.prototype.toString=function(){for(var e,t=DW(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+mq(this.get(e));return t+" }"},IW.prototype.equals=function(e){return this===e||fF(e)&&ZW(this).equals(ZW(e))},IW.prototype.hashCode=function(){return ZW(this).hashCode()},IW.prototype.has=function(e){return this._indices.hasOwnProperty(e)},IW.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},IW.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return TW(this,n)}return this},IW.prototype.remove=function(e){return this.set(e)},IW.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:TW(this,e)},IW.prototype.wasAltered=function(){return this._values.wasAltered()},IW.prototype.toSeq=function(){return ZW(this)},IW.prototype.toJS=function(){return yW(this)},IW.prototype.entries=function(){return this.__iterator(2)},IW.prototype.__iterator=function(e,t){return ZW(this).__iterator(e,t)},IW.prototype.__iterate=function(e,t){return ZW(this).__iterate(e,t)},IW.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?TW(this,t,e):(this.__ownerID=e,this._values=t,this)},IW.isRecord=fF,IW.getDescriptiveName=DW;var NW=IW.prototype;function TW(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function DW(e){return e.constructor.displayName||e.constructor.name||"Record"}function ZW(e){return SF(e._keys.map(function(t){return[t,e.get(t)]}))}function jW(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){qU(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}NW[uF]=!0,NW[XP]=NW.remove,NW.deleteIn=NW.removeIn=Aq,NW.getIn=mW,NW.hasIn=MW.hasIn,NW.merge=MU,NW.mergeWith=AU,NW.mergeIn=TU,NW.mergeDeep=zU,NW.mergeDeepWith=IU,NW.mergeDeepIn=NU,NW.setIn=ZU,NW.update=jU,NW.updateIn=RU,NW.withMutations=PU,NW.asMutable=zF,NW.asImmutable=OF,NW[FP]=NW.entries,NW.toJSON=NW.toObject=MW.toObject,NW.inspect=NW.toSource=function(){return this.toString()};var RW,BW=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(RW)return RW;RW=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return bU(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return aF(e,n,r)?this:new t(this._value,sF(n,r)-lF(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return bU(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return bU(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new UP(function(){return i===r?{value:void 0,done:!0}:qP(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?bU(this._value,e._value):iW(this,e)},t}(EF);function PW(e,t,n,r,i,o){if("string"!=typeof n&&!hF(n)&&(yF(n)||QP(n)||kU(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,wF(n).map(function(r,o){return PW(e,t,r,o,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function FW(e,t){return VP(t)?t.toList():zP(t)?t.toMap():t.toSet()}var UW,qW=DP,WW=_(Object.freeze({__proto__:null,Collection:DP,Iterable:qW,List:kq,Map:QU,OrderedMap:Bq,OrderedSet:SW,PairSorting:{LeftThenRight:-1,RightThenLeft:1},Range:aW,Record:IW,Repeat:BW,Seq:wF,Set:cW,Stack:Qq,fromJS:function(e,t){return PW([],t||FW,e,"",t&&t.length>2?[]:void 0,{"":e})},get:vq,getIn:CW,has:gq,hasIn:gW,hash:DF,is:bU,isAssociative:IP,isCollection:TP,isImmutable:hF,isIndexed:VP,isKeyed:zP,isList:Lq,isMap:UU,isOrdered:CF,isOrderedMap:jq,isOrderedSet:HW,isPlainObject:kU,isRecord:fF,isSeq:gF,isSet:sW,isStack:Wq,isValueObject:wU,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return OU(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return VU(e,t)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return VU(t,n,e)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return OU(t,n,e)},remove:yq,removeIn:Mq,set:wq,setIn:DU,update:EU,updateIn:bq,version:"5.1.4"}));var QW=(UW||(UW=1,window,SP.exports=function(e,t,n){return o={},r.m=i=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
|
|
44
44
|
/*!
|
|
45
45
|
Copyright (c) 2017 Jed Watson.
|
|
46
46
|
Licensed under the MIT License (MIT), see
|
|
47
47
|
http://jedwatson.github.io/classnames
|
|
48
|
-
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function I(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function N(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=I(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==I(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function T(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return T}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return N}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var i=N(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var T=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(o,r.Component);var e,t,n=I(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}T.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},T.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(T,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(T,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t){return(Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Ne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(T,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(T,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(T,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(T,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(T,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(T,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(T,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(T,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(T,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(T,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(o,r.Component);var e,t,n=Tt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(T,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(T,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&It(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===In(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tn(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Nn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(T,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(T,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(T,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Ir=Vr;function Nr(e){return(Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Tr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Ir,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,AP(),FW)),LP.exports);const qW=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},WW=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new xP.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:qW}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:xP.convertToRaw(xP.ContentState.createFromText(e))}catch(t){return xP.convertToRaw(xP.ContentState.createFromText(e))}};l(()=>{let e;try{if(K(t))e="view"===h||g&&!L?xP.EditorState.createWithContent(xP.ContentState.createFromText("---"),O):xP.EditorState.createEmpty(O);else{const n=z(t);e=n?xP.EditorState.createWithContent(xP.convertFromRaw(n),O):xP.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=xP.EditorState.createWithContent(xP.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=xP.ContentState.createFromText("---");e=xP.EditorState.createWithContent(t,O)}else e=xP.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);X(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?xP.EditorState.createWithContent(xP.convertFromRaw(e),O):xP.EditorState.createWithContent(xP.ContentState.createFromText("---"),O);b(t)}},[V]);const I=UW.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(U,{className:"required-asterisk",children:"* "}),d&&e(U,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(Y,{title:"Update",placement:"bottom",children:e(F,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=xP.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(xP.convertToRaw(xP.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(Y,{title:"Cancel",placement:"bottom",children:e(F,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?xP.EditorState.createWithContent(xP.convertFromRaw(e),O):xP.EditorState.createWithContent(xP.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?xP.EditorState.createEmpty(O):e?xP.EditorState.createWithContent(xP.convertFromRaw(e),O):xP.EditorState.createEmpty(O);b(n)}},children:w&&e(I,{editorState:w,onEditorStateChange:e=>{b(e);const t=xP.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=xP.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(U,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},QW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(F,{name:t,width:r,height:i}),e(U,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),GW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},KW=e=>kt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),YW=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},XW=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!K(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return K(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function JW(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function $W(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const eQ=e=>new Promise(t=>setTimeout(t,e)),tQ=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},nQ=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){ja.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&ja.error(r)}catch(e){ja.error(n),console.error("Permission query error:",e)}},rQ=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(q,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Ws,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(F,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(U,{children:r?.[C]})})]})]})};rQ.displayName="DebugToolsPanel";const iQ=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(Y,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(F,{className:"ff-session-manager-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-session-manager-container__modal"})]})},a)})})});iQ.displayName="SessionManager";const oQ=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(Y,{title:`${zp(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(F,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(U,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},aQ=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(U,{children:t.label}),o&&s&&e(F,{name:s})]},t.value)})}),lQ=({value:t,min:r=10,max:i=200,step:o=10,onChange:a,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:o,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));a(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(F,{onClick:()=>{const e=Math.max(t-o,r);a(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(U,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(F,{onClick:()=>{const e=Math.min(t+o,i);a(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]});var sQ=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function I(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function N(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function T(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(N(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())I(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){I(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){I(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let cQ=!0,dQ=!0;function uQ(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function fQ(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function hQ(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(cQ=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function pQ(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(dQ=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function CQ(){if("object"==typeof window){if(cQ)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function mQ(e,t){dQ&&console.warn(e+" is deprecated, please use "+t+" instead.")}function gQ(e){return"[object Object]"===Object.prototype.toString.call(e)}function vQ(e){return gQ(e)?Object.keys(e).reduce(function(t,n){const r=gQ(e[n]),i=r?vQ(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function yQ(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?yQ(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{yQ(e,e.get(t),n)})}))}function wQ(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&yQ(e,n,i)})}),i}const bQ=CQ;function EQ(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),bQ("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return bQ("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function MQ(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function AQ(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else fQ(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function xQ(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function LQ(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>wQ(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),fQ(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>wQ(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function kQ(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function HQ(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return kQ(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function SQ(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function _Q(e,t){fQ(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var VQ=Object.freeze({__proto__:null,fixNegotiationNeeded:_Q,shimAddTrackRemoveTrack:HQ,shimAddTrackRemoveTrackWithNative:kQ,shimGetSendersWithDtmf:xQ,shimGetUserMedia:EQ,shimMediaStream:MQ,shimOnTrack:AQ,shimPeerConnection:SQ,shimSenderReceiverGetStats:LQ});function OQ(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){mQ("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function zQ(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function IQ(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function NQ(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function TQ(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),fQ(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function DQ(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){mQ("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function ZQ(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function jQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function RQ(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function BQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function PQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var FQ=Object.freeze({__proto__:null,shimAddTransceiver:jQ,shimCreateAnswer:PQ,shimCreateOffer:BQ,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:RQ,shimGetUserMedia:OQ,shimOnTrack:zQ,shimPeerConnection:IQ,shimRTCDataChannel:ZQ,shimReceiverGetStats:TQ,shimRemoveStream:DQ,shimSenderGetStats:NQ});function UQ(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function qQ(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function WQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function QQ(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(GQ(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function GQ(e){return e&&void 0!==e.video?Object.assign({},e,{video:vQ(e.video)}):e}function KQ(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(mQ("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function YQ(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function XQ(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function JQ(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var $Q,eG=Object.freeze({__proto__:null,shimAudioContext:JQ,shimCallbacksAPI:WQ,shimConstraints:GQ,shimCreateOfferLegacy:XQ,shimGetUserMedia:QQ,shimLocalStreamsAPI:UQ,shimRTCIceServerUrls:KQ,shimRemoteStreamsAPI:qQ,shimTrackEventTransceiver:YQ}),tG={exports:{}};var nG=($Q||($Q=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(tG)),tG.exports),rG=S(nG),iG=k({__proto__:null,default:rG},[nG]);function oG(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=rG.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,fQ(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function aG(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||fQ(e,"icecandidate",e=>{if(e.candidate){const t=rG.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function lG(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=rG.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=rG.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=rG.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function sG(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},fQ(e,"datachannel",e=>(t(e.channel,e.target),e))}function cG(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function dG(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function uG(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function fG(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var hG=Object.freeze({__proto__:null,removeExtmapAllowMixed:dG,shimAddIceCandidateNullOrEmpty:uG,shimConnectionState:cG,shimMaxMessageSize:lG,shimParameterlessSetLocalDescription:fG,shimRTCIceCandidate:oG,shimRTCIceCandidateRelayProtocol:aG,shimSendThrowTypeError:sG});const pG=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=CQ,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(uQ(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(uQ(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(uQ(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=uQ(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:hG,extractVersion:uQ,disableLog:hQ,disableWarnings:pQ,sdp:iG};switch(r.browser){case"chrome":if(!VQ||!SQ||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=VQ,uG(e,r),fG(e),EQ(e,r),MQ(e),SQ(e,r),AQ(e),HQ(e,r),xQ(e),LQ(e),_Q(e,r),oG(e),aG(e),cG(e),lG(e,r),sG(e),dG(e,r);break;case"firefox":if(!FQ||!IQ||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=FQ,uG(e,r),fG(e),OQ(e,r),IQ(e,r),zQ(e),DQ(e),NQ(e),TQ(e),ZQ(e),jQ(e),RQ(e),BQ(e),PQ(e),oG(e),cG(e),lG(e,r),sG(e);break;case"safari":if(!eG||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=eG,uG(e,r),fG(e),KQ(e),XQ(e),WQ(e),UQ(e),qQ(e),YQ(e),QQ(e),JQ(e),oG(e),aG(e),lG(e,r),sG(e),dG(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),CG=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(U,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},mG=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},gG=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n},vG=({used:t,total:r,unit:i="GB",showValue:o=!0,width:a="216px"})=>{const l=((e,t)=>t>0?Math.min(e/t*100,100):0)(t,r);return e("div",{className:"ff-storage-bar",style:{width:a},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${l}%`},children:o&&n("span",{className:"ff-storage-bar__value",children:[t,i]})})})})};export{Re as AADHAAR_REGEX,we as ALPHABET_ONLY_REGEX,Pt as ALPHABET_WITH_SPACES_ONLY_REGEX,pt as ALPHANUMERIC_PARENTHESIS_REGEX,Ee as ALPHANUMERIC_REGEX,Rt as ALPHANUMERIC_WITH_DOT_REGEX,Me as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,jt as ALPHA_NUM_EXTENDED_REGEX,zt as ALPHA_NUM_REGEX,ee as Accordion,BE as AddContentButton,_a as AddResourceButton,NE as AiToggle,lh as AllProjectsDropdown,TE as AnimatedSetting,ph as AppHeader,Hv as AttachMedia,kp as AttachmentButton,Sp as Avatar,Xe as BASE64_REGEX,Ie as BIG_END_WHITESPACE,Je as BINARY_NUMBER_REGEX,At as BODY_TAG_TYPE_VALIDATION,VA as BarChart,GW as Box,Qs as BrowserTabs,q as Button,mt as CAMEL_CASE_REGEX,Et as CERTIFICATES_NAME_REGEX,kt as CHECK_CAMEL_CASE,He as CREDIT_CARD_REGEX,tt as CURRENCY_GENERIC_REGEX,OE as ChatModal,zE as ChatModalAi,ne as Checkbox,rn as Chip,jE as ChipWithCount,xE as ChooseFile,tn as Col,rk as Comments,ck as ConditionalDropdown,XL as ConnectingBranch,$t as Container,Vp as ContentCard,EE as CreateVariableSlider,Ae as DATE_REGEX,Qe as DECIMAL_NUMBER_REGEX,qe as DRIVING_LICENSE_REGEX,yt as DYNAMIC_VALUE_PATTERN_REGEX,wt as DYNAMIC_VALUE_TYPE_REGEX,bt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,vt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,bh as DashboardDonutChart,$f as DatePicker,rQ as DebugToolsPanel,Ia as DonutChart,vE as DownloadClient,oh as DragAndDrop,J as Drawer,Ua as Dropzone,ut as ELEMENTS_TRAILING_SPACE_REGEX,ft as ELEMENTS_WHITE_SPACE_REGEX,Wt as EMAIL_FORMAT_REGEX,ue as EMAIL_REGEX,Dt as EMAIL_VALIDATION_REGEX,Bt as EXCEL_SPACING_REGEX,js as EditLabel,Ip as EditTextField,qL as Editor,RE as ErrorBoundary,Av as Excel,sn as ExpandableMenu,Ft as FILENAME_VALIDATION_REGEX,Le as FILE_EXTENSION_REGEX,dt as FILE_NAME_REGEX,yE as FieldSet,Wa as FileDropzone,qa as FilePreview,Vs as Form,lk as FormatString,Ze as GSTIN_REGEX,$e as HEXADECIMAL_NUMBER_REGEX,ge as HEX_COLOR_REGEX,Ye as HSL_COLOR_REGEX,Ge as HTML_ATTRIBUTE_REGEX,Mt as HTML_FILE_TYPE_VALIDATION,Ve as HTML_TAG_REGEX,$ as HighlightText,IE as HistoryCard,Pe as INDIAN_CURRENCY_REGEX,Ue as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,De as INDIAN_PIN_CODE_REGEX,Fe as INTERNATIONAL_PHONE_REGEX,Ce as IPV4_REGEX,me as IPV6_REGEX,F as Icon,th as IconButton,kv as IconRadialChart,yp as IconRadioGroup,on as Input,Os as InputWithDropdown,Lt as JAVASCRIPT_FILE_TYPE_VALIDATION,sQ as Janus,nt as LINKEDIN_PROFILE_REGEX,Zt as LINK_VALIDATION_REGEX,Op as LabelEditTextField,rr as LazyLoad,gE as LineChart,_p as LineLoader,ZE as Link,ke as MAC_ADDRESS_REGEX,lt as MEMORY_VALIDATION_REGEX,wp as MachineInputField,HE as MediaPreview,WE as MediaViewerModel,pr as MenuOption,VE as MessageBox,zs as MiniModal,SE as MobileSkin,nh as Modal,xv as ModuleChip,zA as MultiRadialChart,Xt as MultiSelect,vp as NLPInput,ct as NLP_DESCRIPTION_REGEX,Ut as NO_LEADING_TRAILING_SPACE_REGEX,be as NUMBERS_ONLY_REGEX,it as NUMBER_REGEX,QW as NoDataContent,UE as OsTree,qE as OtpVerification,Is as OverviewModal,je as PAN_CARD_REGEX,ht as PARAMETER_ALPHANUMERIC_REGEX,ye as PASSWORD_COMPLEX_REGEX,ve as PASSWORD_SIMPLE_REGEX,he as PHONE_REGEX,pe as POSTAL_CODE_REGEX,Ch as Paper,LO as PhoneInputField,ch as PieChart,ok as PopUpModal,qO as PrePostTable,AE as ProgressBar,_E as Prompt,DE as PromptContainer,Ke as RGB_COLOR_REGEX,et as ROMAN_NUMERALS_REGEX,ln as RadialChart,Ba as RadioButton,Pa as RadioGroup,hp as Recaptcha,en as Row,at as SCRIPT_REGEX,qt as SERVER_HOST_REGEX,Se as SSN_REGEX,Ot as START_END_WHITESPACE_REGEX,st as STEP_GROUP_NAME_REGEX,CG as ScriptGenerationLoader,LE as ScriptSwitchButton,Gs as Search,sr as Select,aQ as SelectionSwitcher,Lp as SequentialConnectingBranch,QE as SessionDropdown,iQ as SessionManager,eh as StateDropdown,oQ as StatusBadge,ur as StatusButton,Sv as StatusCard,FE as StatusIndicator,Qz as StepLandingTable,iz as StepResultStats,vG as StorageUsageBar,kE as SwitchButton,xe as TIME_REGEX,rt as TWITTER_HANDLE_REGEX,Ha as Table,qs as TableTree,iM as TableTreeFn,ME as TableWithAccordion,Ws as Tabs,PE as TabsWithSilder,dr as TextArea,WW as TextEditor,G as ThemeProvider,Jt as Toaster,Za as Toastify,nn as Toggle,Hp as ToggleSwitch,Y as Tooltip,dn as TruncatedTooltip,U as Typography,ot as UNIT_REGEX,fe as URL_REGEX,Ne as USERNAME_REGEX,We as USERNAME_SPECIAL_REGEX,ze as US_ZIP_CODE_REGEX,_e as UUID_REGEX,Be as VEHICLE_REGISTRATION_REGEX,mE as VariableDropdown,ah as VariableInput,bE as VariableSuggestionInputDropDown,Oe as WHITESPACE_REGEX,xt as XML_FILE_TYPE_VALIDATION,lQ as ZoomControl,pG as adapter,DO as addPrePostStepGroup,ZO as addStepGroup,YW as autoScrollToTableLastRow,zp as capitalize,K as checkEmpty,nQ as checkMicrophoneAccess,hh as clearStore,lM as compareArrays,aM as compareObjects,SO as convertFormDataToObject,SA as convertToBytes,_A as convertToGB,jO as convertToISO,gG as copyToClipboard,ka as debounce,fh as deleteStoreValue,Qt as ffid,oM as findAndInsert,TO as formatDate,HO as formatResponseDate,HA as getEncryptedData,Na as getExtension,Ta as getExtensionWithPeriod,tQ as getNavigateToKey,WL as getSequentialPayload,uh as getStoreValue,$W as getTopVisibleNodeKey,_O as getTreeDetails,RO as handleTimeZoneChange,XW as handleTreeExpandAllCollapseAll,NO as handleTreeNodeExpandCollapse,zO as handleTreeNodeSect,IO as handleUnCheckAllTreeNodesWithUpdates,dk as hasDuplicateFile,Ep as isEmptyObject,ae as isTextTruncated,eQ as nlpInputDelay,kO as rearrangeDragItem,JL as saveFileFromBlob,UO as scrollToView,dh as setStoreValue,bv as throttle,KW as toCamelCase,ja as toast,JW as toggleShowHideEntity,oe as truncateText,VO as updateTreeState,OO as useBeforeUnload,X as useClickOutside,mG as useDeviceType,Ra as useFileDropzone,de as useKeyboardActions,Qa as useTheme,ik as useTriggerControl};
|
|
48
|
+
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function I(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function N(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=I(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==I(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function T(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return T}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return N}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var i=N(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var T=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(o,r.Component);var e,t,n=I(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}T.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},T.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(T,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(T,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t){return(Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Ne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(T,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(T,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(T,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(T,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(T,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(T,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(T,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(T,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(T,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(T,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(o,r.Component);var e,t,n=Tt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(T,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(T,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&It(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===In(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tn(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Nn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(T,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(T,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(T,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Ir=Vr;function Nr(e){return(Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Tr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Ir,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,kP(),WW)),SP.exports);const GW=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},KW=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new HP.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:GW}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:HP.convertToRaw(HP.ContentState.createFromText(e))}catch(t){return HP.convertToRaw(HP.ContentState.createFromText(e))}};l(()=>{let e;try{if(K(t))e="view"===h||g&&!L?HP.EditorState.createWithContent(HP.ContentState.createFromText("---"),O):HP.EditorState.createEmpty(O);else{const n=z(t);e=n?HP.EditorState.createWithContent(HP.convertFromRaw(n),O):HP.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=HP.EditorState.createWithContent(HP.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=HP.ContentState.createFromText("---");e=HP.EditorState.createWithContent(t,O)}else e=HP.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);X(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?HP.EditorState.createWithContent(HP.convertFromRaw(e),O):HP.EditorState.createWithContent(HP.ContentState.createFromText("---"),O);b(t)}},[V]);const I=QW.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(U,{className:"required-asterisk",children:"* "}),d&&e(U,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(Y,{title:"Update",placement:"bottom",children:e(F,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=HP.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(HP.convertToRaw(HP.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(Y,{title:"Cancel",placement:"bottom",children:e(F,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?HP.EditorState.createWithContent(HP.convertFromRaw(e),O):HP.EditorState.createWithContent(HP.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?HP.EditorState.createEmpty(O):e?HP.EditorState.createWithContent(HP.convertFromRaw(e),O):HP.EditorState.createEmpty(O);b(n)}},children:w&&e(I,{editorState:w,onEditorStateChange:e=>{b(e);const t=HP.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=HP.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(U,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},YW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(F,{name:t,width:r,height:i}),e(U,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),XW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},JW=e=>kt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),$W=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},eQ=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!K(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return K(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function tQ(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function nQ(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const rQ=e=>new Promise(t=>setTimeout(t,e)),iQ=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},oQ=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){ja.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&ja.error(r)}catch(e){ja.error(n),console.error("Permission query error:",e)}},aQ=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(q,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Ws,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(F,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(U,{children:r?.[C]})})]})]})};aQ.displayName="DebugToolsPanel";const lQ=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(Y,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(F,{className:"ff-session-manager-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-session-manager-container__modal"})]})},a)})})});lQ.displayName="SessionManager";const sQ=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(Y,{title:`${zp(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(F,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(U,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},cQ=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(U,{children:t.label}),o&&s&&e(F,{name:s})]},t.value)})}),dQ=({value:t,min:r=10,max:i=200,step:o=10,onChange:a,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:o,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));a(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(F,{onClick:()=>{const e=Math.max(t-o,r);a(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(U,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(F,{onClick:()=>{const e=Math.min(t+o,i);a(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]});var uQ=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function I(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function N(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function T(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(N(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())I(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){I(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){I(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let fQ=!0,hQ=!0;function pQ(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function CQ(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function mQ(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(fQ=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function gQ(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(hQ=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function vQ(){if("object"==typeof window){if(fQ)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function yQ(e,t){hQ&&console.warn(e+" is deprecated, please use "+t+" instead.")}function wQ(e){return"[object Object]"===Object.prototype.toString.call(e)}function bQ(e){return wQ(e)?Object.keys(e).reduce(function(t,n){const r=wQ(e[n]),i=r?bQ(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function EQ(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?EQ(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{EQ(e,e.get(t),n)})}))}function MQ(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&EQ(e,n,i)})}),i}const AQ=vQ;function xQ(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),AQ("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return AQ("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function LQ(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function kQ(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else CQ(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function HQ(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function SQ(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>MQ(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),CQ(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>MQ(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function _Q(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function VQ(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return _Q(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function OQ(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function zQ(e,t){CQ(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var IQ=Object.freeze({__proto__:null,fixNegotiationNeeded:zQ,shimAddTrackRemoveTrack:VQ,shimAddTrackRemoveTrackWithNative:_Q,shimGetSendersWithDtmf:HQ,shimGetUserMedia:xQ,shimMediaStream:LQ,shimOnTrack:kQ,shimPeerConnection:OQ,shimSenderReceiverGetStats:SQ});function NQ(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){yQ("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function TQ(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function DQ(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function ZQ(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function jQ(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),CQ(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function RQ(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){yQ("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function BQ(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function PQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function FQ(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function UQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function qQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var WQ=Object.freeze({__proto__:null,shimAddTransceiver:PQ,shimCreateAnswer:qQ,shimCreateOffer:UQ,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:FQ,shimGetUserMedia:NQ,shimOnTrack:TQ,shimPeerConnection:DQ,shimRTCDataChannel:BQ,shimReceiverGetStats:jQ,shimRemoveStream:RQ,shimSenderGetStats:ZQ});function QQ(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function GQ(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function KQ(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function YQ(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(XQ(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function XQ(e){return e&&void 0!==e.video?Object.assign({},e,{video:bQ(e.video)}):e}function JQ(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(yQ("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function $Q(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function eG(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function tG(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var nG,rG=Object.freeze({__proto__:null,shimAudioContext:tG,shimCallbacksAPI:KQ,shimConstraints:XQ,shimCreateOfferLegacy:eG,shimGetUserMedia:YQ,shimLocalStreamsAPI:QQ,shimRTCIceServerUrls:JQ,shimRemoteStreamsAPI:GQ,shimTrackEventTransceiver:$Q}),iG={exports:{}};var oG=(nG||(nG=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(iG)),iG.exports),aG=S(oG),lG=k({__proto__:null,default:aG},[oG]);function sG(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=aG.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,CQ(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function cG(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||CQ(e,"icecandidate",e=>{if(e.candidate){const t=aG.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function dG(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=aG.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=aG.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=aG.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function uG(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},CQ(e,"datachannel",e=>(t(e.channel,e.target),e))}function fG(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function hG(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function pG(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function CG(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var mG=Object.freeze({__proto__:null,removeExtmapAllowMixed:hG,shimAddIceCandidateNullOrEmpty:pG,shimConnectionState:fG,shimMaxMessageSize:dG,shimParameterlessSetLocalDescription:CG,shimRTCIceCandidate:sG,shimRTCIceCandidateRelayProtocol:cG,shimSendThrowTypeError:uG});const gG=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=vQ,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(pQ(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(pQ(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(pQ(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=pQ(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:mG,extractVersion:pQ,disableLog:mQ,disableWarnings:gQ,sdp:lG};switch(r.browser){case"chrome":if(!IQ||!OQ||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=IQ,pG(e,r),CG(e),xQ(e,r),LQ(e),OQ(e,r),kQ(e),VQ(e,r),HQ(e),SQ(e),zQ(e,r),sG(e),cG(e),fG(e),dG(e,r),uG(e),hG(e,r);break;case"firefox":if(!WQ||!DQ||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=WQ,pG(e,r),CG(e),NQ(e,r),DQ(e,r),TQ(e),RQ(e),ZQ(e),jQ(e),BQ(e),PQ(e),FQ(e),UQ(e),qQ(e),sG(e),fG(e),dG(e,r),uG(e);break;case"safari":if(!rG||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=rG,pG(e,r),CG(e),JQ(e),eG(e),KQ(e),QQ(e),GQ(e),$Q(e),YQ(e),tG(e),sG(e),cG(e),dG(e,r),uG(e),hG(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),vG=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(U,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},yG=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},wG=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n},bG=({used:t,total:r,unit:i="GB",showValue:o=!0,width:a="216px"})=>{const l=((e,t)=>t>0?Math.min(e/t*100,100):0)(t,r);return e("div",{className:"ff-storage-bar",style:{width:a},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${l}%`},children:o&&n("span",{className:"ff-storage-bar__value",children:[t,i]})})})})};export{Re as AADHAAR_REGEX,we as ALPHABET_ONLY_REGEX,Pt as ALPHABET_WITH_SPACES_ONLY_REGEX,pt as ALPHANUMERIC_PARENTHESIS_REGEX,Ee as ALPHANUMERIC_REGEX,Rt as ALPHANUMERIC_WITH_DOT_REGEX,Me as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,jt as ALPHA_NUM_EXTENDED_REGEX,zt as ALPHA_NUM_REGEX,ee as Accordion,BE as AddContentButton,_a as AddResourceButton,NE as AiToggle,lh as AllProjectsDropdown,TE as AnimatedSetting,ph as AppHeader,Hv as AttachMedia,kp as AttachmentButton,Sp as Avatar,Xe as BASE64_REGEX,Ie as BIG_END_WHITESPACE,Je as BINARY_NUMBER_REGEX,At as BODY_TAG_TYPE_VALIDATION,VA as BarChart,XW as Box,Qs as BrowserTabs,q as Button,mt as CAMEL_CASE_REGEX,Et as CERTIFICATES_NAME_REGEX,kt as CHECK_CAMEL_CASE,He as CREDIT_CARD_REGEX,tt as CURRENCY_GENERIC_REGEX,OE as ChatModal,zE as ChatModalAi,ne as Checkbox,rn as Chip,jE as ChipWithCount,xE as ChooseFile,tn as Col,rk as Comments,ck as ConditionalDropdown,XL as ConnectingBranch,$t as Container,Vp as ContentCard,EE as CreateVariableSlider,Ae as DATE_REGEX,Qe as DECIMAL_NUMBER_REGEX,qe as DRIVING_LICENSE_REGEX,yt as DYNAMIC_VALUE_PATTERN_REGEX,wt as DYNAMIC_VALUE_TYPE_REGEX,bt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,vt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,bh as DashboardDonutChart,$f as DatePicker,aQ as DebugToolsPanel,Ia as DonutChart,vE as DownloadClient,oh as DragAndDrop,J as Drawer,Ua as Dropzone,ut as ELEMENTS_TRAILING_SPACE_REGEX,ft as ELEMENTS_WHITE_SPACE_REGEX,Wt as EMAIL_FORMAT_REGEX,ue as EMAIL_REGEX,Dt as EMAIL_VALIDATION_REGEX,Bt as EXCEL_SPACING_REGEX,js as EditLabel,Ip as EditTextField,qL as Editor,RE as ErrorBoundary,Av as Excel,sn as ExpandableMenu,Ft as FILENAME_VALIDATION_REGEX,Le as FILE_EXTENSION_REGEX,dt as FILE_NAME_REGEX,yE as FieldSet,Wa as FileDropzone,qa as FilePreview,Vs as Form,lk as FormatString,Ze as GSTIN_REGEX,$e as HEXADECIMAL_NUMBER_REGEX,ge as HEX_COLOR_REGEX,Ye as HSL_COLOR_REGEX,Ge as HTML_ATTRIBUTE_REGEX,Mt as HTML_FILE_TYPE_VALIDATION,Ve as HTML_TAG_REGEX,$ as HighlightText,IE as HistoryCard,Pe as INDIAN_CURRENCY_REGEX,Ue as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,De as INDIAN_PIN_CODE_REGEX,Fe as INTERNATIONAL_PHONE_REGEX,Ce as IPV4_REGEX,me as IPV6_REGEX,F as Icon,th as IconButton,kv as IconRadialChart,yp as IconRadioGroup,on as Input,Os as InputWithDropdown,Lt as JAVASCRIPT_FILE_TYPE_VALIDATION,uQ as Janus,nt as LINKEDIN_PROFILE_REGEX,Zt as LINK_VALIDATION_REGEX,Op as LabelEditTextField,rr as LazyLoad,gE as LineChart,_p as LineLoader,ZE as Link,ke as MAC_ADDRESS_REGEX,lt as MEMORY_VALIDATION_REGEX,wp as MachineInputField,HE as MediaPreview,WE as MediaViewerModel,pr as MenuOption,VE as MessageBox,zs as MiniModal,SE as MobileSkin,nh as Modal,xv as ModuleChip,zA as MultiRadialChart,Xt as MultiSelect,vp as NLPInput,ct as NLP_DESCRIPTION_REGEX,Ut as NO_LEADING_TRAILING_SPACE_REGEX,be as NUMBERS_ONLY_REGEX,it as NUMBER_REGEX,YW as NoDataContent,UE as OsTree,qE as OtpVerification,Is as OverviewModal,je as PAN_CARD_REGEX,ht as PARAMETER_ALPHANUMERIC_REGEX,ye as PASSWORD_COMPLEX_REGEX,ve as PASSWORD_SIMPLE_REGEX,he as PHONE_REGEX,pe as POSTAL_CODE_REGEX,Ch as Paper,LO as PhoneInputField,ch as PieChart,ok as PopUpModal,qO as PrePostTable,AE as ProgressBar,_E as Prompt,DE as PromptContainer,Ke as RGB_COLOR_REGEX,et as ROMAN_NUMERALS_REGEX,ln as RadialChart,Ba as RadioButton,Pa as RadioGroup,hp as Recaptcha,en as Row,at as SCRIPT_REGEX,qt as SERVER_HOST_REGEX,Se as SSN_REGEX,Ot as START_END_WHITESPACE_REGEX,st as STEP_GROUP_NAME_REGEX,vG as ScriptGenerationLoader,LE as ScriptSwitchButton,Gs as Search,sr as Select,cQ as SelectionSwitcher,Lp as SequentialConnectingBranch,QE as SessionDropdown,lQ as SessionManager,eh as StateDropdown,sQ as StatusBadge,ur as StatusButton,Sv as StatusCard,FE as StatusIndicator,Yz as StepLandingTable,iz as StepResultStats,bG as StorageUsageBar,kE as SwitchButton,xe as TIME_REGEX,rt as TWITTER_HANDLE_REGEX,Ha as Table,qs as TableTree,iM as TableTreeFn,ME as TableWithAccordion,Ws as Tabs,PE as TabsWithSilder,dr as TextArea,KW as TextEditor,G as ThemeProvider,Jt as Toaster,Za as Toastify,nn as Toggle,Hp as ToggleSwitch,Y as Tooltip,dn as TruncatedTooltip,U as Typography,ot as UNIT_REGEX,fe as URL_REGEX,Ne as USERNAME_REGEX,We as USERNAME_SPECIAL_REGEX,ze as US_ZIP_CODE_REGEX,_e as UUID_REGEX,Be as VEHICLE_REGISTRATION_REGEX,mE as VariableDropdown,ah as VariableInput,bE as VariableSuggestionInputDropDown,Oe as WHITESPACE_REGEX,xt as XML_FILE_TYPE_VALIDATION,dQ as ZoomControl,gG as adapter,DO as addPrePostStepGroup,ZO as addStepGroup,$W as autoScrollToTableLastRow,zp as capitalize,K as checkEmpty,oQ as checkMicrophoneAccess,hh as clearStore,lM as compareArrays,aM as compareObjects,SO as convertFormDataToObject,SA as convertToBytes,_A as convertToGB,jO as convertToISO,wG as copyToClipboard,ka as debounce,fh as deleteStoreValue,Qt as ffid,oM as findAndInsert,TO as formatDate,HO as formatResponseDate,HA as getEncryptedData,Na as getExtension,Ta as getExtensionWithPeriod,iQ as getNavigateToKey,WL as getSequentialPayload,uh as getStoreValue,nQ as getTopVisibleNodeKey,_O as getTreeDetails,RO as handleTimeZoneChange,eQ as handleTreeExpandAllCollapseAll,NO as handleTreeNodeExpandCollapse,zO as handleTreeNodeSect,IO as handleUnCheckAllTreeNodesWithUpdates,dk as hasDuplicateFile,Ep as isEmptyObject,ae as isTextTruncated,rQ as nlpInputDelay,kO as rearrangeDragItem,JL as saveFileFromBlob,UO as scrollToView,dh as setStoreValue,bv as throttle,JW as toCamelCase,ja as toast,tQ as toggleShowHideEntity,oe as truncateText,VO as updateTreeState,OO as useBeforeUnload,X as useClickOutside,yG as useDeviceType,Ra as useFileDropzone,de as useKeyboardActions,Qa as useTheme,ik as useTriggerControl};
|
|
49
49
|
//# sourceMappingURL=index.js.map
|