Viewing File: /home/ubuntu/fansforx_landing_ui/blog/wp-content/plugins/web-stories/assets/js/7102.js

(globalThis.webpackChunkweb_stories_wp=globalThis.webpackChunkweb_stories_wp||[]).push([[7102],{88862:function(t,e){!function(t){"use strict";function e(t){var e,r=t.toLowerCase();if("rgb"===r.substring(0,3)){var n=/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)([^)]*)\)$/.exec(r);e={r:n[1]/255,g:n[2]/255,b:n[3]/255,a:1},n[4]&&(e.a=parseFloat(/^,\s*(.*)$/.exec(n[4])[1]))}else"#"===r.charAt(0)&&(r=r.substr(1)),3===r.length&&(r=r.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3")),4===r.length&&(r=r.replace(/^(.)(.)(.)(.)$/,"$1$1$2$2$3$3$4$4")),e={r:parseInt(r.substr(0,2),16)/255,g:parseInt(r.substr(2,2),16)/255,b:parseInt(r.substr(4,2),16)/255,a:1},8===r.length&&(e.a=parseInt(r.substr(6,2),16)/255);return e}function r(t){var e,r,n,i=t.r,o=t.g,a=t.b,s=t.a,u=Math.min(i,o,a),c=Math.max(i,o,a),l=c-u;return c===u?e=0:i===c?e=(o-a)/l:o===c?e=2+(a-i)/l:a===c&&(e=4+(i-o)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(u+c)/2,r=c===u?0:n<=.5?l/(c+u):l/(2-c-u),{h:e,s:r*=100,l:n*=100,a:s}}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e){return s(t)||u(t,e)||c(t,e)||_nonIterableRest()}function s(t){if(Array.isArray(t))return t}function u(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _nonIterableRest(){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 f(t){var e=r(o(o({},t),{},{a:1}));return{h:e.h,s:e.s,l:e.l}}function p(t){var e,r,n,i,o,a,s=t.h,u=t.s,c=t.l,l=t.a;return isFinite(s)||(s=0),isFinite(u)||(u=0),isFinite(c)||(c=0),(s/=60)<0&&(s=6- -s%6),s%=6,u=Math.max(0,Math.min(1,u/100)),c=Math.max(0,Math.min(1,c/100)),a=(o=(1-Math.abs(2*c-1))*u)*(1-Math.abs(s%2-1)),s<1?(e=o,r=a,n=0):s<2?(e=a,r=o,n=0):s<3?(e=0,r=o,n=a):s<4?(e=0,r=a,n=o):s<5?(e=a,r=0,n=o):(e=o,r=0,n=a),{r:e+=i=c-o/2,g:r+=i,b:n+=i,a:l}}function d(t){var e=p(o(o({},t),{},{a:1}));return{r:e.r,g:e.g,b:e.b}}function h(t){var e=t.r,r=t.g,n=t.b,i=t.a;return"#"+(255*e|256).toString(16).slice(1)+(255*r|256).toString(16).slice(1)+(255*n|256).toString(16).slice(1)+(255*i|256).toString(16).slice(1)}function g(t){return h(o(o({},t),{},{a:1})).slice(0,7)}function v(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}function y(t){var e=t.r,r=t.g,n=t.b,i=t.a,o=a([e,r,n].map((function(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),3);return(.2126*o[0]+.7152*o[1]+.0722*o[2])*i}var m={"min-ratio-3":{description:"(WCAG AA, large text)",minRatio:3},"min-ratio-4.5":{description:"(WCAG AA, normal text / WCAG AAA, large text)",minRatio:4.5},"min-ratio-7":{description:"(WCAG AAA, normal text)",minRatio:7},"AA-large":{description:"(WCAG AA, large text)",minRatio:3},AA:{description:"(WCAG AA, normal text)",minRatio:4.5},AAA:{description:"(WCAG AAA, normal text)",minRatio:7}};function b(t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t>=3&&(arguments.length>1&&void 0!==arguments[1]?arguments[1]:16)>=18?(e&&console.log(m["min-ratio-3"]),!0):t>=4.5&&(e&&console.log(m["min-ratio-4.5"]),!0)}function _(t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t>=4.5&&(arguments.length>1&&void 0!==arguments[1]?arguments[1]:16)>=18?(e&&console.log(m["min-ratio-4.5"]),!0):t>=7&&(e&&console.log(m["min-ratio-7"]),!0)}function S(t,e){var r=t.h,n=t.s,i=t.l,o=t.a,a=e[0],s=e[1],u=e[2],c=(r+a)%360;return c<0&&(c+=360),{h:c,s:Math.min(Math.max(n+s,0),100),l:Math.min(Math.max(i+u,0),100),a:o}}var w=.1;function x(t,n,i){var o,a=t;do{o=v(y(e(h(a=p(S(r(a),[0,0,w]))))),y(n))}while(Math.round(100*o)/100<=i);return a}t.aa=b,t.aaa=_,t.contrast=v,t.getAccesibleHexColor=x,t.hsl2rgb=d,t.hsla2rgba=p,t.hslaVector3=S,t.ratios=m,t.relativeLuminance=y,t.rgb2hex=g,t.rgb2hsl=f,t.rgba2hex=h,t.rgba2hsla=r,t.str2rgba=e,Object.defineProperty(t,"__esModule",{value:!0})}(e)},91703:(t,e,r)=>{const n=r(67294);function i(t){return t&&!Array.isArray(t)&&Object(t)===t}function o(t){let e=null;if(navigator.mediaDevices&&(e=navigator.mediaDevices.getSupportedConstraints()),null===e)return;let r=Object.keys(t).filter((t=>!e[t]));if(0!==r.length){let t=r.join(",");console.error(`The following constraints ${t} are not supported on this browser.`)}}const a=()=>{};t.exports=function({blobOptions:t,recordScreen:e,customMediaStream:r,onStop:s=a,onStart:u=a,onError:c=a,mediaRecorderOptions:l,onDataAvailable:f=a,mediaStreamConstraints:p={}}){let d=n.useRef([]),h=n.useRef(null),g=n.useRef(null),[v,y]=n.useState("idle"),[m,b]=n.useState(null),[_,S]=n.useState(null),[w,x]=n.useState(!1);async function E(){if(m&&b(null),y("acquiring_media"),r&&r instanceof MediaStream)return h.current=r,r;try{let t;if(t=e?await window.navigator.mediaDevices.getDisplayMedia(p):await window.navigator.mediaDevices.getUserMedia(p),e&&p.audio){(await window.navigator.mediaDevices.getUserMedia({audio:p.audio})).getAudioTracks().forEach((e=>t.addTrack(e)))}return h.current=t,y("ready"),t}catch(t){b(t),y("failed")}}function O(){h.current&&(h.current.getTracks().forEach((t=>t.stop())),h.current=null,y("idle"))}function C(t){t.data.size&&d.current.push(t.data),f(t.data)}function k(){let e=new Blob,r=new Blob;if(d.current.length){[r]=d.current;let n=Object.assign({type:r.type},t);e=new Blob(d.current,n),S(e)}y("stopped"),s(e)}function M(t){b(t.error),y("idle"),c(t.error)}function D(t){x(t),h.current&&h.current.getAudioTracks().forEach((e=>{e.enabled=!t}))}return n.useEffect((()=>{if(!window.MediaRecorder)throw new ReferenceError("MediaRecorder is not supported in this browser. Please ensure that you are running the latest version of chrome/firefox/edge.");if(e&&!window.navigator.mediaDevices.getDisplayMedia)throw new ReferenceError("This browser does not support screen capturing.");i(p.video)&&o(p.video),i(p.audio)&&o(p.audio),l&&l.mimeType&&(MediaRecorder.isTypeSupported(l.mimeType)||console.error("The specified MIME type supplied to MediaRecorder is not supported by this browser."))}),[p,l,e]),{error:m,status:v,mediaBlob:_,isAudioMuted:w,stopRecording:function(){g.current&&(y("stopping"),g.current.stop(),g.current.removeEventListener("dataavailable",C),g.current.removeEventListener("stop",k),g.current.removeEventListener("error",M),g.current=null,r||O())},getMediaStream:E,startRecording:async function(t){if(m&&b(null),h.current||await E(),d.current=[],h.current){g.current=new MediaRecorder(h.current,l),g.current.addEventListener("dataavailable",C),g.current.addEventListener("stop",k),g.current.addEventListener("error",M);try{g.current.start(t),y("recording"),u()}catch(t){M({error:t})}}},pauseRecording:function(){g.current&&"recording"===g.current.state&&(g.current.pause(),y("paused"))},resumeRecording:function(){g.current&&"paused"===g.current.state&&(g.current.resume(),y("recording"))},clearMediaStream:O,clearMediaBlob:function(){S(null)},muteAudio:()=>D(!0),unMuteAudio:()=>D(!1),get liveStream(){return h.current?new MediaStream(h.current.getTracks()):null}}}},94184:(t,e)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&t.push(a)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){t.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},96077:(t,e,r)=>{var n=r(60614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},25787:(t,e,r)=>{var n=r(47976),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw i("Incorrect invocation")}},23013:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},90260:(t,e,r)=>{"use strict";var n,i,o,a=r(23013),s=r(19781),u=r(17854),c=r(60614),l=r(70111),f=r(92597),p=r(70648),d=r(66330),h=r(68880),g=r(98052),v=r(47045),y=r(47976),m=r(79518),b=r(27674),_=r(5112),S=r(69711),w=r(29909),x=w.enforce,E=w.get,O=u.Int8Array,C=O&&O.prototype,k=u.Uint8ClampedArray,M=k&&k.prototype,D=O&&m(O),I=C&&m(C),A=Object.prototype,T=u.TypeError,R=_("toStringTag"),B=S("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",z=a&&!!b&&"Opera"!==p(u.opera),L=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},K=function(t){var e=m(t);if(l(e)){var r=E(e);return r&&f(r,P)?r[P]:K(e)}},q=function(t){if(!l(t))return!1;var e=p(t);return f(j,e)||f(N,e)};for(n in j)(o=(i=u[n])&&i.prototype)?x(o)[P]=i:z=!1;for(n in N)(o=(i=u[n])&&i.prototype)&&(x(o)[P]=i);if((!z||!c(D)||D===Function.prototype)&&(D=function TypedArray(){throw T("Incorrect invocation")},z))for(n in j)u[n]&&b(u[n],D);if((!z||!I||I===A)&&(I=D.prototype,z))for(n in j)u[n]&&b(u[n].prototype,I);if(z&&m(M)!==I&&b(M,I),s&&!f(I,R))for(n in L=!0,v(I,R,{configurable:!0,get:function(){return l(this)?this[B]:void 0}}),j)u[n]&&h(u[n],B,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:z,TYPED_ARRAY_TAG:L&&B,aTypedArray:function(t){if(q(t))return t;throw T("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||y(D,t)))return t;throw T(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var i in j){var o=u[i];if(o&&f(o.prototype,t))try{delete o.prototype[t]}catch(r){try{o.prototype[t]=e}catch(t){}}}I[t]&&!r||g(I,t,r?e:z&&C[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(s){if(b){if(r)for(n in j)if((i=u[n])&&f(i,t))try{delete i[t]}catch(t){}if(D[t]&&!r)return;try{return g(D,t,r?e:z&&D[t]||e)}catch(t){}}for(n in j)!(i=u[n])||i[t]&&!r||g(i,t,e)}},getTypedArrayConstructor:K,isView:function(t){if(!l(t))return!1;var e=p(t);return"DataView"===e||f(j,e)||f(N,e)},isTypedArray:q,TypedArray:D,TypedArrayPrototype:I}},9671:(t,e,r)=>{var n=r(49974),i=r(68361),o=r(47908),a=r(26244),s=function(t){var e=1==t;return function(r,s,u){for(var c,l=o(r),f=i(l),p=n(s,u),d=a(f);d-- >0;)if(p(c=f[d],d,l))switch(t){case 0:return c;case 1:return d}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},21843:(t,e,r)=>{var n=r(26244);t.exports=function(t,e){for(var r=n(t),i=new e(r),o=0;o<r;o++)i[o]=t[r-o-1];return i}},11572:(t,e,r)=>{var n=r(26244),i=r(19303),o=RangeError;t.exports=function(t,e,r,a){var s=n(t),u=i(r),c=u<0?s+u:u;if(c>=s||c<0)throw o("Incorrect index");for(var l=new e(s),f=0;f<s;f++)l[f]=f===c?a:t[f];return l}},70648:(t,e,r)=>{var n=r(51694),i=r(60614),o=r(84326),a=r(5112)("toStringTag"),s=Object,u="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:u?o(e):"Object"==(n=o(e))&&i(e.callee)?"Arguments":n}},49920:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},86135:(t,e,r)=>{"use strict";var n=r(34948),i=r(3070),o=r(79114);t.exports=function(t,e,r){var a=n(e);a in t?i.f(t,a,o(0,r)):t[a]=r}},85117:(t,e,r)=>{"use strict";var n=r(66330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+n(e)+" of "+n(t))}},93678:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},7871:(t,e,r)=>{var n=r(83823),i=r(35268);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},83823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},35268:(t,e,r)=>{var n=r(84326);t.exports="undefined"!=typeof process&&"process"==n(process)},11060:(t,e,r)=>{var n=r(1702),i=Error,o=n("".replace),a=String(i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,s,"");return t}},22914:(t,e,r)=>{var n=r(47293),i=r(79114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},75668:(t,e,r)=>{var n=r(1702),i=r(19662);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},71246:(t,e,r)=>{var n=r(70648),i=r(58173),o=r(68554),a=r(97497),s=r(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[n(t)]}},18554:(t,e,r)=>{var n=r(46916),i=r(19662),o=r(19670),a=r(66330),s=r(71246),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return o(n(r,t));throw u(a(t)+" is not iterable")}},79587:(t,e,r)=>{var n=r(60614),i=r(70111),o=r(27674);t.exports=function(t,e,r){var a,s;return o&&n(a=e.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(t,s),t}},97659:(t,e,r)=>{var n=r(5112),i=r(97497),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},44067:(t,e,r)=>{var n=r(70648);t.exports=function(t){var e=n(t);return"BigInt64Array"==e||"BigUint64Array"==e}},4411:(t,e,r)=>{var n=r(1702),i=r(47293),o=r(60614),a=r(70648),s=r(35005),u=r(42788),c=function(){},l=[],f=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),h=!p.exec(c),g=function(t){if(!o(t))return!1;try{return f(c,l,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!d(p,u(t))}catch(t){return!0}};v.sham=!0,t.exports=!f||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?v:g},20408:(t,e,r)=>{var n=r(49974),i=r(46916),o=r(19670),a=r(66330),s=r(97659),u=r(26244),c=r(47976),l=r(18554),f=r(71246),p=r(99212),d=TypeError,Result=function(t,e){this.stopped=t,this.result=e},h=Result.prototype;t.exports=function(t,e,r){var g,v,y,m,b,_,S,w=r&&r.that,x=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),O=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),k=n(e,w),M=function(t){return g&&p(g,"normal",t),new Result(!0,t)},D=function(t){return x?(o(t),C?k(t[0],t[1],M):k(t[0],t[1])):C?k(t,M):k(t)};if(E)g=t.iterator;else if(O)g=t;else{if(!(v=f(t)))throw d(a(t)+" is not iterable");if(s(v)){for(y=0,m=u(t);m>y;y++)if((b=D(t[y]))&&c(h,b))return b;return new Result(!1)}g=l(t,v)}for(_=E?t.next:g.next;!(S=i(_,g)).done;){try{b=D(S.value)}catch(t){p(g,"throw",t)}if("object"==typeof b&&b&&c(h,b))return b}return new Result(!1)}},99212:(t,e,r)=>{var n=r(46916),i=r(19670),o=r(58173);t.exports=function(t,e,r){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return i(a),r}},97497:t=>{t.exports={}},75706:(t,e,r)=>{var n=r(1702),i=Map.prototype;t.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},56277:(t,e,r)=>{var n=r(41340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},79518:(t,e,r)=>{var n=r(92597),i=r(60614),o=r(47908),a=r(6200),s=r(49920),u=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=o(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?l:null}},27674:(t,e,r)=>{var n=r(75668),i=r(19670),o=r(96077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},34706:(t,e,r)=>{var n=r(46916),i=r(92597),o=r(47976),a=r(67066),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:n(a,t)}},79405:(t,e,r)=>{var n=r(1702),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i,$has:i.has,$keys:i.keys}},64124:(t,e,r)=>{var n=r(17854),i=r(47293),o=r(7392),a=r(7871),s=r(83823),u=r(35268),c=n.structuredClone;t.exports=!!c&&!i((function(){if(s&&o>92||u&&o>94||a&&o>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength}))},64599:(t,e,r)=>{var n=r(57593),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw i("Can't convert number to bigint");return BigInt(e)}},51694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},41340:(t,e,r)=>{var n=r(70648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},48053:t=>{var e=TypeError;t.exports=function(t,r){if(t<r)throw e("Not enough arguments");return t}},52262:(t,e,r)=>{"use strict";var n=r(82109),i=r(47908),o=r(26244),a=r(19303),s=r(51223);n({target:"Array",proto:!0},{at:function(t){var e=i(this),r=o(e),n=a(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}}),s("at")},77287:(t,e,r)=>{"use strict";var n=r(82109),i=r(9671).findLastIndex,o=r(51223);n({target:"Array",proto:!0},{findLastIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("findLastIndex")},30541:(t,e,r)=>{"use strict";var n=r(82109),i=r(47908),o=r(26244),a=r(83658),s=r(85117),u=r(7207);n({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=i(this),r=o(e),n=arguments.length;if(n){u(r+n);for(var c=r;c--;){var l=c+n;c in e?e[l]=e[c]:s(e,l)}for(var f=0;f<n;f++)e[f]=arguments[f]}return a(e,r+n)}})},24506:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),o=r(84488),a=r(19303),s=r(41340),u=r(47293),c=i("".charAt);n({target:"String",proto:!0,forced:u((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=s(o(this)),r=e.length,n=a(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:c(e,i)}})},48675:(t,e,r)=>{"use strict";var n=r(90260),i=r(26244),o=r(19303),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=a(this),r=i(e),n=o(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}))},14590:(t,e,r)=>{"use strict";var n=r(90260),i=r(9671).findLastIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},63408:(t,e,r)=>{"use strict";var n=r(90260),i=r(9671).findLast,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},1439:(t,e,r)=>{"use strict";var n=r(21843),i=r(90260),o=i.aTypedArray,a=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;a("toReversed",(function(){return n(o(this),s(this))}))},87585:(t,e,r)=>{"use strict";var n=r(90260),i=r(1702),o=r(19662),a=r(97745),s=n.aTypedArray,u=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=i(n.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&o(t);var e=s(this),r=a(u(e),e);return l(r,t)}))},55315:(t,e,r)=>{"use strict";var n=r(11572),i=r(90260),o=r(44067),a=r(19303),s=r(64599),u=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,f=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var r=u(this),i=a(t),l=o(r)?s(e):+e;return n(r,c(r),i,l)}}.with,!f)},23767:(t,e,r)=>{r(1439)},8585:(t,e,r)=>{r(87585)},68696:(t,e,r)=>{r(55315)},82801:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),o=r(35005),a=r(79114),s=r(3070).f,u=r(92597),c=r(25787),l=r(79587),f=r(56277),p=r(93678),d=r(11060),h=r(19781),g=r(31913),v="DOMException",y=o("Error"),m=o(v),b=function DOMException(){c(this,_);var t=arguments.length,e=f(t<1?void 0:arguments[0]),r=f(t<2?void 0:arguments[1],"Error"),n=new m(e,r),i=y(e);return i.name=v,s(n,"stack",a(1,d(i.stack,1))),l(n,this,b),n},_=b.prototype=m.prototype,S="stack"in y(v),w="stack"in new m(1,2),x=m&&h&&Object.getOwnPropertyDescriptor(i,v),E=!(!x||x.writable&&x.configurable),O=S&&!E&&!w;n({global:!0,constructor:!0,forced:g||O},{DOMException:O?b:m});var C=o(v),k=C.prototype;if(k.constructor!==C)for(var M in g||s(k,"constructor",a(1,C)),p)if(u(p,M)){var D=p[M],I=D.s;u(C,I)||s(C,I,a(6,D.c))}},61295:(t,e,r)=>{var n,i=r(31913),o=r(82109),a=r(17854),s=r(35005),u=r(1702),c=r(47293),l=r(69711),f=r(60614),p=r(4411),d=r(68554),h=r(70111),g=r(52190),v=r(20408),y=r(19670),m=r(70648),b=r(92597),_=r(86135),S=r(68880),w=r(26244),x=r(48053),E=r(34706),O=r(75706),C=r(79405),k=r(22914),M=r(64124),D=a.Object,I=a.Array,A=a.Date,T=a.Error,R=a.EvalError,B=a.RangeError,P=a.ReferenceError,z=a.SyntaxError,L=a.TypeError,j=a.URIError,N=a.PerformanceMark,K=a.WebAssembly,q=K&&K.CompileError||T,F=K&&K.LinkError||T,U=K&&K.RuntimeError||T,G=s("DOMException"),H=O.Map,W=O.has,V=O.get,Y=O.set,X=C.Set,$=C.add,J=s("Object","keys"),Z=u([].push),Q=u((!0).valueOf),tt=u(1..valueOf),et=u("".valueOf),rt=u(A.prototype.getTime),nt=l("structuredClone"),it="DataCloneError",ot="Transferring",at=function(t){return!c((function(){var e=new a.Set([7]),r=t(e),n=t(D(7));return r==e||!r.has(7)||"object"!=typeof n||7!=n}))&&t},st=function(t,e){return!c((function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)}))},ut=a.structuredClone,ct=i||!st(ut,T)||!st(ut,G)||(n=ut,!!c((function(){var t=n(new a.AggregateError([1],nt,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=nt||3!=t.cause}))),lt=!ut&&at((function(t){return new N(nt,{detail:t}).detail})),ft=at(ut)||lt,pt=function(t){throw new G("Uncloneable type: "+t,it)},dt=function(t,e){throw new G((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",it)},ht=function(t,e){if(g(t)&&pt("Symbol"),!h(t))return t;if(e){if(W(e,t))return V(e,t)}else e=new H;var r,n,i,o,u,c,l,p,d,v,y,x=m(t),O=!1;switch(x){case"Array":i=I(w(t)),O=!0;break;case"Object":i={},O=!0;break;case"Map":i=new H,O=!0;break;case"Set":i=new X,O=!0;break;case"RegExp":i=new RegExp(t.source,E(t));break;case"Error":switch(n=t.name){case"AggregateError":i=s("AggregateError")([]);break;case"EvalError":i=R();break;case"RangeError":i=B();break;case"ReferenceError":i=P();break;case"SyntaxError":i=z();break;case"TypeError":i=L();break;case"URIError":i=j();break;case"CompileError":i=q();break;case"LinkError":i=F();break;case"RuntimeError":i=U();break;default:i=T()}O=!0;break;case"DOMException":i=new G(t.message,t.name),O=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=a[x],h(r)||dt(x),i=new r(ht(t.buffer,e),t.byteOffset,"DataView"===x?t.byteLength:t.length);break;case"DOMQuad":try{i=new DOMQuad(ht(t.p1,e),ht(t.p2,e),ht(t.p3,e),ht(t.p4,e))}catch(e){ft?i=ft(t):dt(x)}break;case"FileList":if(o=function(){var t;try{t=new a.DataTransfer}catch(e){try{t=new a.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(u=0,c=w(t);u<c;u++)o.items.add(ht(t[u],e));i=o.files}else ft?i=ft(t):dt(x);break;case"ImageData":try{i=new ImageData(ht(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(e){ft?i=ft(t):dt(x)}break;default:if(ft)i=ft(t);else switch(x){case"BigInt":i=D(t.valueOf());break;case"Boolean":i=D(Q(t));break;case"Number":i=D(tt(t));break;case"String":i=D(et(t));break;case"Date":i=new A(rt(t));break;case"ArrayBuffer":(r=a.DataView)||"function"==typeof t.slice||dt(x);try{if("function"!=typeof t.slice||t.resizable){c=t.byteLength,y="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(c,y),d=new r(t),v=new r(i);for(u=0;u<c;u++)v.setUint8(u,d.getUint8(u))}else i=t.slice(0)}catch(t){throw new G("ArrayBuffer is detached",it)}break;case"SharedArrayBuffer":i=t;break;case"Blob":try{i=t.slice(0,t.size,t.type)}catch(t){dt(x)}break;case"DOMPoint":case"DOMPointReadOnly":r=a[x];try{i=r.fromPoint?r.fromPoint(t):new r(t.x,t.y,t.z,t.w)}catch(t){dt(x)}break;case"DOMRect":case"DOMRectReadOnly":r=a[x];try{i=r.fromRect?r.fromRect(t):new r(t.x,t.y,t.width,t.height)}catch(t){dt(x)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=a[x];try{i=r.fromMatrix?r.fromMatrix(t):new r(t)}catch(t){dt(x)}break;case"AudioData":case"VideoFrame":f(t.clone)||dt(x);try{i=t.clone()}catch(t){pt(x)}break;case"File":try{i=new File([t],t.name,t)}catch(t){dt(x)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":dt(x);default:pt(x)}}if(Y(e,t,i),O)switch(x){case"Array":case"Object":for(l=J(t),u=0,c=w(l);u<c;u++)p=l[u],_(i,p,ht(t[p],e));break;case"Map":t.forEach((function(t,r){Y(i,ht(r,e),ht(t,e))}));break;case"Set":t.forEach((function(t){$(i,ht(t,e))}));break;case"Error":S(i,"message",ht(t.message,e)),b(t,"cause")&&S(i,"cause",ht(t.cause,e)),"AggregateError"==n&&(i.errors=ht(t.errors,e));case"DOMException":k&&S(i,"stack",ht(t.stack,e))}return i};o({global:!0,enumerable:!0,sham:!M,forced:ct},{structuredClone:function(t){var e,r=x(arguments.length,1)>1&&!d(arguments[1])?y(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(t,e){if(!h(t))throw L("Transfer option cannot be converted to a sequence");var r=[];v(t,(function(t){Z(r,y(t))}));var n,i,o,s,u,c,l=0,d=w(r);if(M)for(s=ut(r,{transfer:r});l<d;)Y(e,r[l],s[l++]);else for(;l<d;){if(n=r[l++],W(e,n))throw new G("Duplicate transferable",it);switch(i=m(n)){case"ImageBitmap":o=a.OffscreenCanvas,p(o)||dt(i,ot);try{(c=new o(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),u=c.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":f(n.clone)&&f(n.close)||dt(i,ot);try{u=n.clone(),n.close()}catch(t){}break;case"ArrayBuffer":f(n.transfer)||dt(i,ot),u=n.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":dt(i,ot)}if(void 0===u)throw new G("This object cannot be transferred: "+i,it);Y(e,n,u)}}(n,e=new H),ht(t,e)}})},42699:(t,e,r)=>{"use strict";r.d(e,{default:()=>o});var n=r(19013),i=r(13882);function o(t,e){(0,i.default)(2,arguments);var r=(0,n.default)(t),o=(0,n.default)(e);return r.getTime()>o.getTime()}},29042:(t,e,r)=>{"use strict";r.d(e,{default:()=>s});var n=r(83946),i=r(51820),o=r(13882),a=6e4;function s(t,e){return(0,o.default)(2,arguments),function(t,e){(0,o.default)(2,arguments);var r=(0,n.default)(e);return(0,i.default)(t,r*a)}(t,-(0,n.default)(e))}},46276:(t,e,r)=>{"use strict";function n(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(r,!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.d(e,{stateToHTML:()=>j});const u=function(t,e){if(null==t)return e;for(var r=s(e,2),i=r[0],a=r[1],u=o({},i),c=n(a),l=0,f=Object.keys(t);l<f.length;l++){var p=f[l];if(i.hasOwnProperty(p)){var d=i[p];u[p]=o({},d,{},t[p])}else u[p]=t[p],c.push(p)}return[u,c]};var c={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};const helpers_normalizeAttributes=function(t){if(null==t)return t;for(var e={},r=!1,n=0,i=Object.keys(t);n<i.length;n++){var o=i[n],a=o;c.hasOwnProperty(o)&&(a=c[o],r=!0),e[a]=t[o]}return r?e:t};var l=/^(moz|ms|o|webkit)-/,f=/^\d+$/,p=/([A-Z])/g,d={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const h=function(t){return Object.keys(t).map((function(e){var r=function(t,e){var r;return"string"==typeof e?r=f.test(e):(r=!0,e=String(e)),r&&"0"!==e&&!0!==d[t]?e+"px":e}(e,t[e]),n=function(t){return t.replace(p,"-$1").toLowerCase().replace(l,"-$1-")}(e);return"".concat(n,": ").concat(r)})).join("; ")};var g,v,y,m=r(25134);function b(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(r,!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function stateToHTML_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function x(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var E=m.INLINE_STYLE.BOLD,O=m.INLINE_STYLE.CODE,C=m.INLINE_STYLE.ITALIC,k=m.INLINE_STYLE.STRIKETHROUGH,M=m.INLINE_STYLE.UNDERLINE,D="<br>",I=/^data-([a-z0-9-]+)$/,A=(x(g={},E,{element:"strong"}),x(g,O,{element:"code"}),x(g,C,{element:"em"}),x(g,k,{element:"del"}),x(g,M,{element:"u"}),g),T=[E,C,M,k,O],R=(x(v={},m.ENTITY_TYPE.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),x(v,m.ENTITY_TYPE.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),v),B=(x(y={},m.ENTITY_TYPE.LINK,(function(t,e){for(var r=R.hasOwnProperty(t)?R[t]:{},n=e.getData(),i={},o=0,a=Object.keys(n);o<a.length;o++){var s=a[o],u=n[s];if(r.hasOwnProperty(s))i[r[s]]=u;else I.test(s)&&(i[s]=u)}return i})),x(y,m.ENTITY_TYPE.IMAGE,(function(t,e){for(var r=R.hasOwnProperty(t)?R[t]:{},n=e.getData(),i={},o=0,a=Object.keys(n);o<a.length;o++){var s=a[o],u=n[s];if(r.hasOwnProperty(s))i[r[s]]=u;else I.test(s)&&(i[s]=u)}return i})),y);function P(t,e){switch(t){case m.BLOCK_TYPE.HEADER_ONE:return["h1"];case m.BLOCK_TYPE.HEADER_TWO:return["h2"];case m.BLOCK_TYPE.HEADER_THREE:return["h3"];case m.BLOCK_TYPE.HEADER_FOUR:return["h4"];case m.BLOCK_TYPE.HEADER_FIVE:return["h5"];case m.BLOCK_TYPE.HEADER_SIX:return["h6"];case m.BLOCK_TYPE.UNORDERED_LIST_ITEM:case m.BLOCK_TYPE.ORDERED_LIST_ITEM:return["li"];case m.BLOCK_TYPE.BLOCKQUOTE:return["blockquote"];case m.BLOCK_TYPE.CODE:return["pre","code"];case m.BLOCK_TYPE.ATOMIC:return["figure"];default:return null===e?[]:[e||"p"]}}var z=function(){function MarkupGenerator(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,MarkupGenerator),x(this,"blocks",void 0),x(this,"contentState",void 0),x(this,"currentBlock",void 0),x(this,"indentLevel",void 0),x(this,"output",void 0),x(this,"totalBlocks",void 0),x(this,"wrapperTag",void 0),x(this,"options",void 0),x(this,"inlineStyles",void 0),x(this,"inlineStyleFn",void 0),x(this,"styleOrder",void 0),null==e&&(e={}),this.contentState=t,this.options=e;var r=S(u(e.inlineStyles,[A,T]),2),n=r[0],i=r[1];this.inlineStyles=n,this.inlineStyleFn=e.inlineStyleFn,this.styleOrder=i}var t,e,r;return t=MarkupGenerator,(e=[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var t=this.options,e=t.blockRenderers,r=t.defaultBlockTag,n=this.blocks[this.currentBlock],i=n.getType(),o=function(t){switch(t){case m.BLOCK_TYPE.UNORDERED_LIST_ITEM:return"ul";case m.BLOCK_TYPE.ORDERED_LIST_ITEM:return"ol";default:return null}}(i);this.wrapperTag!==o&&(this.wrapperTag&&this.closeWrapperTag(),o&&this.openWrapperTag(o)),this.indent();var a=null!=e&&e.hasOwnProperty(i)?e[i]:null,s=a?a(n):null;if(null!=s)return this.output.push(s),this.output.push("\n"),void(this.currentBlock+=1);this.writeStartTag(n,r),this.output.push(this.renderBlockContent(n));var u=this.getNextBlock();if(function(t){switch(t){case m.BLOCK_TYPE.UNORDERED_LIST_ITEM:case m.BLOCK_TYPE.ORDERED_LIST_ITEM:return!0;default:return!1}}(i)&&u&&u.getDepth()===n.getDepth()+1){this.output.push("\n");var c=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(u.getDepth()),this.wrapperTag=c,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(n,r)}},{key:"processBlocksAtDepth",value:function(t){for(var e=this.blocks[this.currentBlock];e&&e.getDepth()===t;)this.processBlock(),e=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(t,e){var r,n=P(t.getType(),e);if(this.options.blockStyleFn){var i=this.options.blockStyleFn(t)||{},o=i.attributes,a=i.style;if(o=helpers_normalizeAttributes(o),null!=a){var s=h(a);o=null==o?{style:s}:_({},o,{style:s})}r=L(o)}else r="";var u=!0,c=!1,l=void 0;try{for(var f,p=n[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;this.output.push("<".concat(d).concat(r,">"))}}catch(t){c=!0,l=t}finally{try{u||null==p.return||p.return()}finally{if(c)throw l}}}},{key:"writeEndTag",value:function(t,e){var r=P(t.getType(),e);if(1===r.length)this.output.push("</".concat(r[0],">\n"));else{var n=[],i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.unshift("</".concat(c,">"))}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}this.output.push(n.join("")+"\n")}}},{key:"openWrapperTag",value:function(t){this.wrapperTag=t,this.indent(),this.output.push("<".concat(t,">\n")),this.indentLevel+=1}},{key:"closeWrapperTag",value:function(){var t=this.wrapperTag;t&&(this.indentLevel-=1,this.indent(),this.output.push("</".concat(t,">\n")),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push("  ".repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(t,e){if(!this.inlineStyleFn)return t;var r=this.inlineStyleFn(e);if(!r)return t;var n=r.element,i=void 0===n?"span":n,o=r.attributes,a=r.style,s=L(_({},o,{style:a&&h(a)}));return"<".concat(i).concat(s,">").concat(t,"</").concat(i,">")}},{key:"renderBlockContent",value:function(t){var e=this,r=t.getType(),n=t.getText();if(""===n)return D;n=this.preserveWhitespace(n);var i=t.getCharacterList();return(0,m.getEntityRanges)(n,i).map((function(t){var n,i=S(t,2),o=i[0],a=i[1].map((function(t){var n=S(t,2),i=n[0],o=n[1],a=function(t){return t.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split(" ").join("&nbsp;").split("\n").join(D+"\n")}(i),s=!0,u=!1,c=void 0;try{for(var l,f=e.styleOrder[Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var p=l.value;if((p!==O||r!==m.BLOCK_TYPE.CODE)&&o.has(p)){var d=e.inlineStyles[p],g=d.element,v=d.attributes,y=d.style;if(null==g&&(g="span"),v=helpers_normalizeAttributes(v),null!=y){var b=h(y);v=null==v?{style:b}:_({},v,{style:b})}var w=L(v);a="<".concat(g).concat(w,">").concat(a,"</").concat(g,">")}}}catch(t){u=!0,c=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}return e.withCustomInlineStyles(a,o)})).join(""),s=o?e.contentState.getEntity(o):null,u=null==s?null:s.getType().toUpperCase();if(null!=s&&e.options.entityStyleFn&&(n=e.options.entityStyleFn(s))){var c=n,l=c.element,f=c.attributes,p=c.style;if(null==l&&(l="span"),f=helpers_normalizeAttributes(f),null!=p){var d=h(p);f=null==f?{style:d}:_({},f,{style:d})}var g=L(f);return"<".concat(l).concat(g,">").concat(a,"</").concat(l,">")}if(null!=u&&u===m.ENTITY_TYPE.LINK){var v=L(B.hasOwnProperty(u)?B[u](u,s):null);return"<a".concat(v,">").concat(a,"</a>")}if(null!=u&&u===m.ENTITY_TYPE.IMAGE){var y=L(B.hasOwnProperty(u)?B[u](u,s):null);return"<img".concat(y,"/>")}return a})).join("")}},{key:"preserveWhitespace",value:function(t){for(var e=t.length,r=new Array(e),n=0;n<e;n++)" "!==t[n]||0!==n&&n!==e-1&&" "!==t[n-1]?r[n]=t[n]:r[n]=" ";return r.join("")}}])&&w(t.prototype,e),r&&w(t,r),MarkupGenerator}();function L(t){if(null==t)return"";for(var e=[],r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],o=t[i];null!=o&&e.push(" ".concat(i,'="').concat((o+"").split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;"),'"'))}return e.join("")}function j(t,e){return new z(t,e).generate()}},19225:(t,e,r)=>{"use strict";function n(t,e,r){for(var n=t.text,o=t.characterMeta,a=e.length,s=r.length,u=[],c=o.slice(0,0),l=0,f=n.indexOf(e);-1!==f;)u.push(n.slice(l,f)+r),c=c.concat(o.slice(l,f),i(o.slice(f,f+1),s)),l=f+a,f=n.indexOf(e,l);return u.push(n.slice(l)),c=c.concat(o.slice(l)),{text:u.join(""),characterMeta:c}}function i(t,e){for(var r=t.slice(0,0);e-- >0;)r=r.concat(t);return r}r.d(e,{stateFromHTML:()=>I});var o=r(9041),a=r(43393),s=r(25134);var u={a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,var:1,video:1,wbr:1,acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1},c={area:1,base:1,br:1,col:1,colgroup:1,command:1,dl:1,embed:1,head:1,hgroup:1,hr:1,iframe:1,img:1,input:1,keygen:1,link:1,meta:1,ol:1,optgroup:1,option:1,param:1,script:1,select:1,source:1,style:1,table:1,tbody:1,textarea:1,tfoot:1,thead:1,title:1,tr:1,track:1,ul:1,wbr:1,basefont:1,dialog:1,dir:1,isindex:1},l={img:1};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var g=/^data:/i,v=(0,a.OrderedSet)(),y=new o.ContentBlock({key:(0,o.genKey)(),text:"",type:s.BLOCK_TYPE.UNSTYLED,characterList:(0,a.List)(),depth:0}),m=/(\r\n|\r|\n)/g,b="\r",_=/^data-([a-z0-9-]+)$/,S={a:{href:"url",rel:"rel",target:"target",title:"title"},img:{src:"src",alt:"alt",width:"width",height:"height"}},w=function(t,e){var r={};if(S.hasOwnProperty(t))for(var n=S[t],i=0;i<e.attributes.length;i++){var o=e.attributes[i],a=o.name,s=o.value;if("string"==typeof s){var u=s;if(n.hasOwnProperty(a))r[n[a]]=u;else _.test(a)&&(r[a]=u)}}return r},x={a:function(t,e,r){var n,i=w(e,r);if(null!=(n=i.url)&&!n.match(g))return t.createEntity(s.ENTITY_TYPE.LINK,i)},img:function(t,e,r){var n=w(e,r);if(null!=n.src)return t.createEntity(s.ENTITY_TYPE.IMAGE,n)}},E=function(){function ContentGenerator(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,ContentGenerator),h(this,"contentStateForEntities",void 0),h(this,"blockStack",void 0),h(this,"blockList",void 0),h(this,"depth",void 0),h(this,"options",void 0),h(this,"inlineCreators",{Style:function(t){function Style(e){return t.apply(this,arguments)}return Style.toString=function(){return t.toString()},Style}((function(t){return{type:"STYLE",style:t}})),Entity:function Entity(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MUTABLE";return{type:"ENTITY",entityKey:t.createEntity(e,O(r),n)}}}),this.options=e,this.contentStateForEntities=o.ContentState.createFromBlockArray([]),this.blockStack=[],this.blockList=[],this.depth=0}var t,e,r;return t=ContentGenerator,e=[{key:"process",value:function(t){this.processBlockElement(t);var e=[];return this.blockList.forEach((function(t){var r=function(t){var e="",r=(0,a.Seq)();return t.forEach((function(t){e+=t.text,r=r.concat(t.characterMeta)})),{text:e,characterMeta:r}}(t.textFragments),i=r.text,s=r.characterMeta,u=!1;if(i===b&&(u=!0,i=""),"pre"===t.tagName){var c=function(t,e){return"\n"===t.charAt(0)&&(t=t.slice(1),e=e.slice(1)),{text:t,characterMeta:e}}(i,s);i=c.text,s=c.characterMeta}else{var l=function(t,e){var r=function(t,e){for(;" "===t.charAt(0);)t=t.slice(1),e=e.slice(1);return{text:t,characterMeta:e}}(t=t.replace(/[ \t\n]/g," "),e);t=r.text,e=r.characterMeta;var i=function(t,e){for(;" "===t.slice(-1);)t=t.slice(0,-1),e=e.slice(0,-1);return{text:t,characterMeta:e}}(t,e);t=i.text,e=i.characterMeta;for(var o=t.length;o--;)" "===t.charAt(o)&&" "===t.charAt(o-1)&&(t=t.slice(0,o)+t.slice(o+1),e=e.slice(0,o).concat(e.slice(o+1)));var a=n({text:t,characterMeta:e},b+" ",b);t=a.text,e=a.characterMeta;var s=n({text:t,characterMeta:e}," "+b,b);return t=s.text,e=s.characterMeta,{text:t,characterMeta:e}}(i,s);i=l.text,s=l.characterMeta}((i=i.split(b).join("\n")).length||u)&&e.push(new o.ContentBlock({key:(0,o.genKey)(),text:i,type:t.type,characterList:s.toList(),depth:t.depth,data:t.data?(0,a.Map)(t.data):(0,a.Map)()}))})),e.length||(e=[y]),o.ContentState.createFromBlockArray(e,this.contentStateForEntities.getEntityMap())}},{key:"getBlockTypeFromTagName",value:function(t){var e=this.options.blockTypes;if(e&&e[t])return e[t];switch(t){case"li":return"ol"===this.blockStack.slice(-1)[0].tagName?s.BLOCK_TYPE.ORDERED_LIST_ITEM:s.BLOCK_TYPE.UNORDERED_LIST_ITEM;case"blockquote":return s.BLOCK_TYPE.BLOCKQUOTE;case"h1":return s.BLOCK_TYPE.HEADER_ONE;case"h2":return s.BLOCK_TYPE.HEADER_TWO;case"h3":return s.BLOCK_TYPE.HEADER_THREE;case"h4":return s.BLOCK_TYPE.HEADER_FOUR;case"h5":return s.BLOCK_TYPE.HEADER_FIVE;case"h6":return s.BLOCK_TYPE.HEADER_SIX;case"pre":return s.BLOCK_TYPE.CODE;case"figure":return s.BLOCK_TYPE.ATOMIC;default:return s.BLOCK_TYPE.UNSTYLED}}},{key:"processBlockElement",value:function(t){if(t){var e,r,n=this.options.customBlockFn,i=t.nodeName.toLowerCase();if(n){var o=n(t);null!=o&&(e=o.type,r=o.data)}var a=!0;if(null==e&&(a=!1,e=this.getBlockTypeFromTagName(i)),e===s.BLOCK_TYPE.CODE){var u=t.getAttribute("data-language");u&&(r=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(r,!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r,{language:u}))}var l=function(t){switch(t){case s.BLOCK_TYPE.UNORDERED_LIST_ITEM:case s.BLOCK_TYPE.ORDERED_LIST_ITEM:return!0;default:return!1}}(e),f=!c.hasOwnProperty(i);if(!a&&e===s.BLOCK_TYPE.UNSTYLED){var d=this.blockStack.slice(-1)[0];d&&(e=d.type)}var g={tagName:i,textFragments:[],type:e,styleStack:[v],entityStack:[null],depth:l?this.depth:0,data:r};f&&(this.blockList.push(g),l&&(this.depth+=1)),this.blockStack.push(g),null!=t.childNodes&&Array.from(t.childNodes).forEach(this.processNode,this),this.blockStack.pop(),f&&l&&(this.depth-=1)}}},{key:"processInlineElement",value:function(t){var e=t.nodeName.toLowerCase();if("br"!==e){var r=this.blockStack.slice(-1)[0],n=r.styleStack.slice(-1)[0],i=r.entityStack.slice(-1)[0],o=this.options.customInlineFn,a=o?o(t,this.inlineCreators):null;if(null!=a)switch(a.type){case"STYLE":[].concat(a.style).forEach((t=>{n=n.add(t)}));break;case"ENTITY":i=a.entityKey}else n=function(t,e,r){switch(e){case"b":case"strong":return t.add(s.INLINE_STYLE.BOLD);case"i":case"em":return t.add(s.INLINE_STYLE.ITALIC);case"u":case"ins":return t.add(s.INLINE_STYLE.UNDERLINE);case"code":return t.add(s.INLINE_STYLE.CODE);case"s":case"del":return t.add(s.INLINE_STYLE.STRIKETHROUGH);default:return r&&r[e]?t.add(r[e]):t}}(n,e,this.options.elementStyles),x.hasOwnProperty(e)&&(i=x[e](this,e,t)||i);r.styleStack.push(n),r.entityStack.push(i),null!=t.childNodes&&Array.from(t.childNodes).forEach(this.processNode,this),l.hasOwnProperty(e)&&this.processText(" "),r.entityStack.pop(),r.styleStack.pop()}else this.processText(b)}},{key:"processTextNode",value:function(t){var e=t.nodeValue;e=(e=e.replace(m,"\n")).split("​").join(b),this.processText(e)}},{key:"processText",value:function(t){var e=this.blockStack.slice(-1)[0],r=e.styleStack.slice(-1)[0],n=e.entityStack.slice(-1)[0],i=o.CharacterMetadata.create({style:r,entity:n}),s=(0,a.Repeat)(i,t.length);e.textFragments.push({text:t,characterMeta:s})}},{key:"processNode",value:function(t){if(1===t.nodeType){var e=t,r=e.nodeName.toLowerCase();u.hasOwnProperty(r)?this.processInlineElement(e):this.processBlockElement(e)}else 3===t.nodeType&&this.processTextNode(t)}},{key:"createEntity",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MUTABLE";return this.contentStateForEntities=this.contentStateForEntities.createEntity(t,r,e),this.contentStateForEntities.getLastCreatedEntityKey()}}],e&&d(t.prototype,e),r&&d(t,r),ContentGenerator}();function O(t){var e={};if(null!==t&&"object"===f(t)&&!Array.isArray(t))for(var r=t,n=0,i=Object.keys(r);n<i.length;n++){var o=i[n],a=r[o];"string"==typeof a&&(e[o]=a)}return e}function C(t,e){return new E(e).process(t)}function k(t){var e;"undefined"!=typeof DOMParser?e=(new DOMParser).parseFromString(t,"text/html"):(e=document.implementation.createHTMLDocument("")).documentElement&&(e.documentElement.innerHTML=t);return e.body||e.createElement("body")}function M(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var D={};function I(t,e){var r=e||D,n=r.parser,i=M(r,["parser"]);return null==n&&(n=k),C(n(t),i)}},25134:(t,e,r)=>{"use strict";r.d(e,{BLOCK_TYPE:()=>n,ENTITY_TYPE:()=>i,INLINE_STYLE:()=>o,getEntityRanges:()=>u});var n={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},i={LINK:"LINK",IMAGE:"IMAGE",EMBED:"embed"},o={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"};var a=r(43393),s=new a.OrderedSet;function u(t,e){for(var r=null,n=null,i=[],o=0,a=0,s=t.length;a<s;a++){n=r;var u=e.get(a);r=u?u.getEntity():null,a>0&&r!==n&&(i.push([n,c(t.slice(o,a),e.slice(o,a))]),o=a)}return i.push([r,c(t.slice(o),e.slice(o))]),i}function c(t,e){for(var r=s,n=s,i=[],o=0,u=0,c=t.length;u<c;u++){n=r;var l=e.get(u);r=l?l.getStyle():s,u>0&&!(0,a.is)(r,n)&&(i.push([t.slice(o,u),n]),o=u)}return i.push([t.slice(o),r]),i}r(9041)},19785:(t,e,r)=>{"use strict";function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(10329),a=r(4516),s=r(38777),u=r(67953),c=r(42307),l=r(14289),f=r(25027),p=r(68642),d=r(43393),h=r(61173),g=p("draft_tree_data_support"),v=g?u:s,y=d.List,m=d.Repeat,b={insertAtomicBlock:function(t,e,r){var i=t.getCurrentContent(),s=t.getSelection(),u=c.removeRange(i,s,"backward"),p=u.getSelectionAfter(),d=c.splitBlock(u,p),h=d.getSelectionAfter(),b=c.setBlockType(d,h,"atomic"),_=a.create({entity:e}),S={key:f(),type:"atomic",text:r,characterList:y(m(_,r.length))},w={key:f(),type:"unstyled"};g&&(S=n({},S,{nextSibling:w.key}),w=n({},w,{prevSibling:S.key}));var x=[new v(S),new v(w)],E=o.createFromArray(x),O=c.replaceWithFragment(b,h,E),C=O.merge({selectionBefore:s,selectionAfter:O.getSelectionAfter().set("hasFocus",!0)});return l.push(t,C,"insert-fragment")},moveAtomicBlock:function(t,e,r,n){var i,o=t.getCurrentContent(),a=t.getSelection();if("before"===n||"after"===n){var s=o.getBlockForKey("before"===n?r.getStartKey():r.getEndKey());i=h(o,e,s,n)}else{var u=c.removeRange(o,r,"backward"),f=u.getSelectionAfter(),p=u.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=h(u,e,p,"before");else if(f.getEndOffset()===p.getLength())i=h(u,e,p,"after");else{var d=c.splitBlock(u,f),g=d.getSelectionAfter(),v=d.getBlockForKey(g.getFocusKey());i=h(d,e,v,"before")}}var y=i.merge({selectionBefore:a,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(t,y,"move-block")}};t.exports=b},10329:(t,e,r)=>{"use strict";var n=r(43393).OrderedMap,i={createFromArray:function(t){return n(t.map((function(t){return[t.getKey(),t]})))}};t.exports=i},34365:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(29407),o=r(96495),a=r(43393),s=a.List,u=a.Repeat,c=a.Record,l=function(){return!0},f=c({start:null,end:null}),p=c({start:null,end:null,decoratorKey:null,leaves:null}),d={generate:function(t,e,r){var n=e.getLength();if(!n)return s.of(new p({start:0,end:0,decoratorKey:null,leaves:s.of(new f({start:0,end:0}))}));var o=[],a=r?r.getDecorations(e,t):s(u(null,n)),c=e.getCharacterList();return i(a,g,l,(function(t,e){o.push(new p({start:t,end:e,decoratorKey:a.get(t),leaves:h(c.slice(t,e).toList(),t)}))})),s(o)},fromJS:function(t){var e=t.leaves,r=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,["leaves"]);return new p(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},r,{leaves:null!=e?s(Array.isArray(e)?e:o(e)).map((function(t){return f(t)})):null}))}};function h(t,e){var r=[],n=t.map((function(t){return t.getStyle()})).toList();return i(n,g,l,(function(t,n){r.push(new f({start:t+e,end:n+e}))})),s(r)}function g(t,e){return t===e}t.exports=d},4516:(t,e,r)=>{"use strict";var n=r(43393),i=n.Map,o=n.OrderedSet,a=n.Record,s=o(),u={style:s,entity:null},c=function(t){var e,r;function CharacterMetadata(){return t.apply(this,arguments)||this}r=t,(e=CharacterMetadata).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=CharacterMetadata.prototype;return n.getStyle=function(){return this.get("style")},n.getEntity=function(){return this.get("entity")},n.hasStyle=function(t){return this.getStyle().includes(t)},CharacterMetadata.applyStyle=function(t,e){var r=t.set("style",t.getStyle().add(e));return CharacterMetadata.create(r)},CharacterMetadata.removeStyle=function(t,e){var r=t.set("style",t.getStyle().remove(e));return CharacterMetadata.create(r)},CharacterMetadata.applyEntity=function(t,e){var r=t.getEntity()===e?t:t.set("entity",e);return CharacterMetadata.create(r)},CharacterMetadata.create=function(t){if(!t)return l;var e=i({style:s,entity:null}).merge(t),r=f.get(e);if(r)return r;var n=new CharacterMetadata(e);return f=f.set(e,n),n},CharacterMetadata.fromJS=function(t){var e=t.style,r=t.entity;return new CharacterMetadata({style:Array.isArray(e)?o(e):e,entity:Array.isArray(r)?o(r):r})},CharacterMetadata}(a(u)),l=new c,f=i([[i(u),l]]);c.EMPTY=l,t.exports=c},25369:(t,e,r)=>{"use strict";var n=r(43393).List,i=function(){function CompositeDraftDecorator(t){var e,r,n;n=void 0,(r="_decorators")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this._decorators=t.slice()}var t=CompositeDraftDecorator.prototype;return t.getDecorations=function(t,e){var r=Array(t.getText().length).fill(null);return this._decorators.forEach((function(n,i){var o=0;(0,n.strategy)(t,(function(t,e){(function(t,e,r){for(var n=e;n<r;n++)if(null!=t[n])return!1;return!0})(r,t,e)&&(!function(t,e,r,n){for(var i=e;i<r;i++)t[i]=n}(r,t,e,i+"."+o),o++)}),e)})),n(r)},t.getComponentForKey=function(t){var e=parseInt(t.split(".")[0],10);return this._decorators[e].component},t.getPropsForKey=function(t){var e=parseInt(t.split(".")[0],10);return this._decorators[e].props},CompositeDraftDecorator}();t.exports=i},38777:(t,e,r)=>{"use strict";var n=r(4516),i=r(29407),o=r(43393),a=o.List,s=o.Map,u=o.OrderedSet,c=o.Record,l=o.Repeat,f=u(),p=c({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:s()}),d=function(t){var e,r;function ContentBlock(e){return t.call(this,function(t){if(!t)return t;var e=t.characterList,r=t.text;return r&&!e&&(t.characterList=a(l(n.EMPTY,r.length))),t}(e))||this}r=t,(e=ContentBlock).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var o=ContentBlock.prototype;return o.getKey=function(){return this.get("key")},o.getType=function(){return this.get("type")},o.getText=function(){return this.get("text")},o.getCharacterList=function(){return this.get("characterList")},o.getLength=function(){return this.getText().length},o.getDepth=function(){return this.get("depth")},o.getData=function(){return this.get("data")},o.getInlineStyleAt=function(t){var e=this.getCharacterList().get(t);return e?e.getStyle():f},o.getEntityAt=function(t){var e=this.getCharacterList().get(t);return e?e.getEntity():null},o.findStyleRanges=function(t,e){i(this.getCharacterList(),h,t,e)},o.findEntityRanges=function(t,e){i(this.getCharacterList(),g,t,e)},ContentBlock}(p);function h(t,e){return t.getStyle()===e.getStyle()}function g(t,e){return t.getEntity()===e.getEntity()}t.exports=d},67953:(t,e,r)=>{"use strict";var n=r(4516),i=r(29407),o=r(43393),a=o.List,s=o.Map,u=o.OrderedSet,c=o.Record,l=o.Repeat,f=u(),p={parent:null,characterList:a(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:a(),prevSibling:null,nextSibling:null},d=function(t,e){return t.getStyle()===e.getStyle()},h=function(t,e){return t.getEntity()===e.getEntity()},g=function(t){var e,r;function ContentBlockNode(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return t.call(this,function(t){if(!t)return t;var e=t.characterList,r=t.text;return r&&!e&&(t.characterList=a(l(n.EMPTY,r.length))),t}(e))||this}r=t,(e=ContentBlockNode).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var o=ContentBlockNode.prototype;return o.getKey=function(){return this.get("key")},o.getType=function(){return this.get("type")},o.getText=function(){return this.get("text")},o.getCharacterList=function(){return this.get("characterList")},o.getLength=function(){return this.getText().length},o.getDepth=function(){return this.get("depth")},o.getData=function(){return this.get("data")},o.getInlineStyleAt=function(t){var e=this.getCharacterList().get(t);return e?e.getStyle():f},o.getEntityAt=function(t){var e=this.getCharacterList().get(t);return e?e.getEntity():null},o.getChildKeys=function(){return this.get("children")},o.getParentKey=function(){return this.get("parent")},o.getPrevSiblingKey=function(){return this.get("prevSibling")},o.getNextSiblingKey=function(){return this.get("nextSibling")},o.findStyleRanges=function(t,e){i(this.getCharacterList(),d,t,e)},o.findEntityRanges=function(t,e){i(this.getCharacterList(),h,t,e)},ContentBlockNode}(c(p));t.exports=g},66912:(t,e,r)=>{"use strict";function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(10329),a=r(4516),s=r(38777),u=r(67953),c=r(82222),l=r(25110),f=r(25027),p=r(96495),d=r(68642),h=r(43393),g=r(55283),v=h.List,y=h.Record,m=h.Repeat,b=h.Map,_=h.OrderedMap,S=y({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),w=d("draft_tree_data_support")?u:s,x=function(t){var e,r;function ContentState(){return t.apply(this,arguments)||this}r=t,(e=ContentState).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var i=ContentState.prototype;return i.getEntityMap=function(){return c},i.getBlockMap=function(){return this.get("blockMap")},i.getSelectionBefore=function(){return this.get("selectionBefore")},i.getSelectionAfter=function(){return this.get("selectionAfter")},i.getBlockForKey=function(t){return this.getBlockMap().get(t)},i.getKeyBefore=function(t){return this.getBlockMap().reverse().keySeq().skipUntil((function(e){return e===t})).skip(1).first()},i.getKeyAfter=function(t){return this.getBlockMap().keySeq().skipUntil((function(e){return e===t})).skip(1).first()},i.getBlockAfter=function(t){return this.getBlockMap().skipUntil((function(e,r){return r===t})).skip(1).first()},i.getBlockBefore=function(t){return this.getBlockMap().reverse().skipUntil((function(e,r){return r===t})).skip(1).first()},i.getBlocksAsArray=function(){return this.getBlockMap().toArray()},i.getFirstBlock=function(){return this.getBlockMap().first()},i.getLastBlock=function(){return this.getBlockMap().last()},i.getPlainText=function(t){return this.getBlockMap().map((function(t){return t?t.getText():""})).join(t||"\n")},i.getLastCreatedEntityKey=function(){return c.__getLastCreatedEntityKey()},i.hasText=function(){var t=this.getBlockMap();return t.size>1||escape(t.first().getText()).replace(/%u200B/g,"").length>0},i.createEntity=function(t,e,r){return c.__create(t,e,r),this},i.mergeEntityData=function(t,e){return c.__mergeData(t,e),this},i.replaceEntityData=function(t,e){return c.__replaceData(t,e),this},i.addEntity=function(t){return c.__add(t),this},i.getEntity=function(t){return c.__get(t)},i.getAllEntities=function(){return c.__getAll()},i.loadWithEntities=function(t){return c.__loadWithEntities(t)},ContentState.createFromBlockArray=function(t,e){var r=Array.isArray(t)?t:t.contentBlocks,n=o.createFromArray(r),i=n.isEmpty()?new l:l.createEmpty(n.first().getKey());return new ContentState({blockMap:n,entityMap:e||c,selectionBefore:i,selectionAfter:i})},ContentState.createFromText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=t.split(e).map((function(t){return t=g(t),new w({key:f(),text:t,type:"unstyled",characterList:v(m(a.EMPTY,t.length))})}));return ContentState.createFromBlockArray(r)},ContentState.fromJS=function(t){return new ContentState(n({},t,{blockMap:_(t.blockMap).map(ContentState.createContentBlockFromJS),selectionBefore:new l(t.selectionBefore),selectionAfter:new l(t.selectionAfter)}))},ContentState.createContentBlockFromJS=function(t){var e=t.characterList;return new w(n({},t,{data:b(t.data),characterList:null!=e?v((Array.isArray(e)?e:p(e)).map((function(t){return a.fromJS(t)}))):void 0}))},ContentState}(S);t.exports=x},13483:(t,e,r)=>{"use strict";var n=r(4516),i=r(43393).Map,o={add:function(t,e,r){return a(t,e,r,!0)},remove:function(t,e,r){return a(t,e,r,!1)}};function a(t,e,r,o){var a=t.getBlockMap(),s=e.getStartKey(),u=e.getStartOffset(),c=e.getEndKey(),l=e.getEndOffset(),f=a.skipUntil((function(t,e){return e===s})).takeUntil((function(t,e){return e===c})).concat(i([[c,a.get(c)]])).map((function(t,e){var i,a;s===c?(i=u,a=l):(i=e===s?u:0,a=e===c?l:t.getLength());for(var f,p=t.getCharacterList();i<a;)f=p.get(i),p=p.set(i,o?n.applyStyle(f,r):n.removeStyle(f,r)),i++;return t.set("characterList",p)}));return t.merge({blockMap:a.merge(f),selectionBefore:e,selectionAfter:e})}t.exports=o},77907:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(4856),o=r(69270),a=r(48083),s=r(43393),u=r(73759),c=r(22045),l=s.Map,f={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},p=i.isBrowser("IE <= 11"),d=function(){function DOMObserver(t){var e=this;n(this,"observer",void 0),n(this,"container",void 0),n(this,"mutations",void 0),n(this,"onCharData",void 0),this.container=t,this.mutations=l();var r=a(t);r.MutationObserver&&!p?this.observer=new r.MutationObserver((function(t){return e.registerMutations(t)})):this.onCharData=function(t){t.target instanceof Node||u(!1),e.registerMutation({type:"characterData",target:t.target})}}var t=DOMObserver.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,f):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var t=this.observer;t?(this.registerMutations(t.takeRecords()),t.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var e=this.mutations;return this.mutations=l(),e},t.registerMutations=function(t){for(var e=0;e<t.length;e++)this.registerMutation(t[e])},t.getMutationTextContent=function(t){var e=t.type,r=t.target,n=t.removedNodes;if("characterData"===e){if(""!==r.textContent)return p?r.textContent.replace("\n",""):r.textContent}else if("childList"===e){if(n&&n.length)return"";if(""!==r.textContent)return r.textContent}return null},t.registerMutation=function(t){var e=this.getMutationTextContent(t);if(null!=e){var r=c(o(t.target));this.mutations=this.mutations.set(r,e)}},DOMObserver}();t.exports=d},526:(t,e,r)=>{"use strict";var n=r(67294),i=r(62620),o=(0,r(43393).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:n.createElement("ul",{className:i("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:n.createElement("ol",{className:i("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:n.createElement("pre",{className:i("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});t.exports=o},37619:t=>{"use strict";t.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},9041:(t,e,r)=>{"use strict";var n=r(19785),i=r(10329),o=r(4516),a=r(25369),s=r(38777),u=r(66912),c=r(526),l=r(37619),f=r(87210),p=r(37898),d=r(82222),h=r(42307),g=r(39006),v=r(14289),y=r(47387),m=r(70054),b=r(41947),_=r(25110),S=r(79981),w=r(99607),x=r(25027),E=r(41714),O=r(96629),C={Editor:f,EditorBlock:p,EditorState:v,CompositeDecorator:a,Entity:d,EntityInstance:g,BlockMapBuilder:i,CharacterMetadata:o,ContentBlock:s,ContentState:u,RawDraftContentState:m,SelectionState:_,AtomicBlockUtils:n,KeyBindingUtil:y,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:l,convertFromHTML:r(67841),convertFromRaw:w,convertToRaw:S,genKey:x,getDefaultKeyBinding:E,getVisibleSelectionRect:O};t.exports=C},87210:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){s(t,e,r[e])}))}return t}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var c=r(526),l=r(37619),f=r(33418),p=r(87791),d=r(61494),h=r(19394),g=r(4083),v=r(28094),y=r(5880),m=r(14289),b=r(67294),_=r(65994),S=r(19051),w=r(4856),x=r(62620),E=r(25027),O=r(41714),C=r(79749),k=r(68642),M=r(73759),D=r(20717),I=r(22045),A=w.isBrowser("IE"),T=!A,R={edit:h,composite:f,drag:d,cut:null,render:null},B=!1,P=function(t){function UpdateDraftEditorFlags(){return t.apply(this,arguments)||this}u(UpdateDraftEditorFlags,t);var e=UpdateDraftEditorFlags.prototype;return e.render=function(){return null},e.componentDidMount=function(){this._update()},e.componentDidUpdate=function(){this._update()},e._update=function(){var t=this.props.editor;t._latestEditorState=this.props.editorState,t._blockSelectEvents=!0},UpdateDraftEditorFlags}(b.Component),z=function(t){function DraftEditor(e){var r;return s(a(r=t.call(this,e)||this),"_blockSelectEvents",void 0),s(a(r),"_clipboard",void 0),s(a(r),"_handler",void 0),s(a(r),"_dragCount",void 0),s(a(r),"_internalDrag",void 0),s(a(r),"_editorKey",void 0),s(a(r),"_placeholderAccessibilityID",void 0),s(a(r),"_latestEditorState",void 0),s(a(r),"_latestCommittedEditorState",void 0),s(a(r),"_pendingStateFromBeforeInput",void 0),s(a(r),"_onBeforeInput",void 0),s(a(r),"_onBlur",void 0),s(a(r),"_onCharacterData",void 0),s(a(r),"_onCompositionEnd",void 0),s(a(r),"_onCompositionStart",void 0),s(a(r),"_onCopy",void 0),s(a(r),"_onCut",void 0),s(a(r),"_onDragEnd",void 0),s(a(r),"_onDragOver",void 0),s(a(r),"_onDragStart",void 0),s(a(r),"_onDrop",void 0),s(a(r),"_onInput",void 0),s(a(r),"_onFocus",void 0),s(a(r),"_onKeyDown",void 0),s(a(r),"_onKeyPress",void 0),s(a(r),"_onKeyUp",void 0),s(a(r),"_onMouseDown",void 0),s(a(r),"_onMouseUp",void 0),s(a(r),"_onPaste",void 0),s(a(r),"_onSelect",void 0),s(a(r),"editor",void 0),s(a(r),"editorContainer",void 0),s(a(r),"focus",void 0),s(a(r),"blur",void 0),s(a(r),"setMode",void 0),s(a(r),"exitCurrentMode",void 0),s(a(r),"restoreEditorDOM",void 0),s(a(r),"setClipboard",void 0),s(a(r),"getClipboard",void 0),s(a(r),"getEditorKey",void 0),s(a(r),"update",void 0),s(a(r),"onDragEnter",void 0),s(a(r),"onDragLeave",void 0),s(a(r),"_handleEditorContainerRef",(function(t){r.editorContainer=t,r.editor=null!==t?t.firstChild:null})),s(a(r),"focus",(function(t){var e=r.props.editorState,n=e.getSelection().getHasFocus(),i=r.editor;if(i){var o=S.getScrollParent(i),a=t||C(o),s=a.x,u=a.y;D(i)||M(!1),i.focus(),o===window?window.scrollTo(s,u):_.setTop(o,u),n||r.update(m.forceSelection(e,e.getSelection()))}})),s(a(r),"blur",(function(){var t=r.editor;t&&(D(t)||M(!1),t.blur())})),s(a(r),"setMode",(function(t){var e=r.props,n=e.onPaste,i=e.onCut,a=e.onCopy,s=o({},R.edit);n&&(s.onPaste=n),i&&(s.onCut=i),a&&(s.onCopy=a);var u=o({},R,{edit:s});r._handler=u[t]})),s(a(r),"exitCurrentMode",(function(){r.setMode("edit")})),s(a(r),"restoreEditorDOM",(function(t){r.setState({contentsKey:r.state.contentsKey+1},(function(){r.focus(t)}))})),s(a(r),"setClipboard",(function(t){r._clipboard=t})),s(a(r),"getClipboard",(function(){return r._clipboard})),s(a(r),"update",(function(t){r._latestEditorState=t,r.props.onChange(t)})),s(a(r),"onDragEnter",(function(){r._dragCount++})),s(a(r),"onDragLeave",(function(){r._dragCount--,0===r._dragCount&&r.exitCurrentMode()})),r._blockSelectEvents=!1,r._clipboard=null,r._handler=null,r._dragCount=0,r._editorKey=e.editorKey||E(),r._placeholderAccessibilityID="placeholder-"+r._editorKey,r._latestEditorState=e.editorState,r._latestCommittedEditorState=e.editorState,r._onBeforeInput=r._buildHandler("onBeforeInput"),r._onBlur=r._buildHandler("onBlur"),r._onCharacterData=r._buildHandler("onCharacterData"),r._onCompositionEnd=r._buildHandler("onCompositionEnd"),r._onCompositionStart=r._buildHandler("onCompositionStart"),r._onCopy=r._buildHandler("onCopy"),r._onCut=r._buildHandler("onCut"),r._onDragEnd=r._buildHandler("onDragEnd"),r._onDragOver=r._buildHandler("onDragOver"),r._onDragStart=r._buildHandler("onDragStart"),r._onDrop=r._buildHandler("onDrop"),r._onInput=r._buildHandler("onInput"),r._onFocus=r._buildHandler("onFocus"),r._onKeyDown=r._buildHandler("onKeyDown"),r._onKeyPress=r._buildHandler("onKeyPress"),r._onKeyUp=r._buildHandler("onKeyUp"),r._onMouseDown=r._buildHandler("onMouseDown"),r._onMouseUp=r._buildHandler("onMouseUp"),r._onPaste=r._buildHandler("onPaste"),r._onSelect=r._buildHandler("onSelect"),r.getEditorKey=function(){return r._editorKey},r.state={contentsKey:0},r}u(DraftEditor,t);var e=DraftEditor.prototype;return e._buildHandler=function(t){var e=this;return function(r){if(!e.props.readOnly){var n=e._handler&&e._handler[t];n&&(g?g((function(){return n(e,r)})):n(e,r))}}},e._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},e._renderPlaceholder=function(){if(this._showPlaceholder()){var t={text:I(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return b.createElement(v,t)}return null},e._renderARIADescribedBy=function(){var t=this.props.ariaDescribedBy||"",e=this._showPlaceholder()?this._placeholderAccessibilityID:"";return t.replace("{{editor_id_placeholder}}",e)||void 0},e.render=function(){var t=this.props,e=t.blockRenderMap,r=t.blockRendererFn,n=t.blockStyleFn,a=t.customStyleFn,s=t.customStyleMap,u=t.editorState,c=t.preventScroll,f=t.readOnly,d=t.textAlignment,h=t.textDirectionality,g=x({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===d,"DraftEditor/alignRight":"right"===d,"DraftEditor/alignCenter":"center"===d}),v=this.props.role||"textbox",y="combobox"===v?!!this.props.ariaExpanded:null,m={blockRenderMap:e,blockRendererFn:r,blockStyleFn:n,customStyleMap:o({},l,s),customStyleFn:a,editorKey:this._editorKey,editorState:u,preventScroll:c,textDirectionality:h};return b.createElement("div",{className:g},this._renderPlaceholder(),b.createElement("div",{className:x("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},b.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:y,"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:x({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:v,spellCheck:T&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},b.createElement(P,{editor:this,editorState:u}),b.createElement(p,i({},m,{key:"contents"+this.state.contentsKey})))))},e.componentDidMount=function(){this._blockSelectEvents=!1,!B&&k("draft_ods_enabled")&&(B=!0,y.initODS()),this.setMode("edit"),A&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):r.g.execCommand("AutoUrlDetect",!1,!1))},e.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},DraftEditor}(b.Component);s(z,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:c,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:O,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),t.exports=z},37898:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}var o=r(42282),a=r(22146),s=r(67294),u=r(65994),c=r(19051),l=r(54191),f=r(16633),p=r(62620),d=r(55258),h=r(79749),g=r(70746),v=r(73759),y=r(20717),m=r(22045),b=function(t,e){return t.getAnchorKey()===e||t.getFocusKey()===e},_=function(t){var e,r;function DraftEditorBlock(){for(var e,r,n,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a))||this,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e),i=void 0,(n="_node")in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,e}r=t,(e=DraftEditorBlock).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=DraftEditorBlock.prototype;return n.shouldComponentUpdate=function(t){return this.props.block!==t.block||this.props.tree!==t.tree||this.props.direction!==t.direction||b(t.selection,t.block.getKey())&&t.forceSelection},n.componentDidMount=function(){if(!this.props.preventScroll){var t=this.props.selection,e=t.getEndKey();if(t.getHasFocus()&&e===this.props.block.getKey()){var r=this._node;if(null!=r){var n,i=c.getScrollParent(r),o=h(i);if(i===window){var a=d(r);(n=a.y+a.height-g().height)>0&&window.scrollTo(o.x,o.y+n+10)}else{y(r)||v(!1),(n=r.offsetHeight+r.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&u.setTop(i,u.getTop(i)+n+10)}}}}},n._renderChildren=function(){var t=this,e=this.props.block,r=e.getKey(),n=e.getText(),u=this.props.tree.size-1,c=b(this.props.selection,r);return this.props.tree.map((function(p,d){var h=p.get("leaves");if(0===h.size)return null;var g=h.size-1,v=h.map((function(i,l){var f=a.encode(r,d,l),p=i.get("start"),h=i.get("end");return s.createElement(o,{key:f,offsetKey:f,block:e,start:p,selection:c?t.props.selection:null,forceSelection:t.props.forceSelection,text:n.slice(p,h),styleSet:e.getInlineStyleAt(p),customStyleMap:t.props.customStyleMap,customStyleFn:t.props.customStyleFn,isLast:d===u&&l===g})})).toArray(),y=p.get("decoratorKey");if(null==y)return v;if(!t.props.decorator)return v;var b=m(t.props.decorator),_=b.getComponentForKey(y);if(!_)return v;var S=b.getPropsForKey(y),w=a.encode(r,d,0),x=h.first().get("start"),E=h.last().get("end"),O=n.slice(x,E),C=e.getEntityAt(p.get("start")),k=f.getHTMLDirIfDifferent(l.getDirection(O),t.props.direction),M={contentState:t.props.contentState,decoratedText:O,dir:k,start:x,end:E,blockKey:r,entityKey:C,offsetKey:w};return s.createElement(_,i({},S,M,{key:w}),v)})).toArray()},n.render=function(){var t=this,e=this.props,r=e.direction,n=e.offsetKey,i=p({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===r,"public/DraftStyleDefault/rtl":"RTL"===r});return s.createElement("div",{"data-offset-key":n,className:i,ref:function(e){return t._node=e}},this._renderChildren())},DraftEditorBlock}(s.Component);t.exports=_},25821:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){a(t,e,r[e])}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(59513),u=r(22146),c=r(67294),l=r(65994),f=r(19051),p=r(55258),d=r(79749),h=r(70746),g=r(43393),v=r(73759),y=r(20717),m=(g.List,function(t,e){return t.getAnchorKey()===e||t.getFocusKey()===e}),b=function(t,e){var r=e.get(t.getType())||e.get("unstyled"),n=r.wrapper;return{Element:r.element||e.get("unstyled").element,wrapperTemplate:n}},_=function(t,e){var r=e(t);return r?{CustomComponent:r.component,customProps:r.props,customEditable:r.editable}:{}},S=function(t,e,r,n,i,a){var s={"data-block":!0,"data-editor":e,"data-offset-key":r,key:t.getKey(),ref:a},u=n(t);return u&&(s.className=u),void 0!==i.customEditable&&(s=o({},s,{contentEditable:i.customEditable,suppressContentEditableWarning:!0})),s},w=function(t){var e,r;function DraftEditorBlockNode(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return a(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e=t.call.apply(t,[this].concat(n))||this),"wrapperRef",c.createRef()),e}r=t,(e=DraftEditorBlockNode).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=DraftEditorBlockNode.prototype;return n.shouldComponentUpdate=function(t){var e=this.props,r=e.block,n=e.direction,i=e.tree,o=!r.getChildKeys().isEmpty(),a=r!==t.block||i!==t.tree||n!==t.direction||m(t.selection,t.block.getKey())&&t.forceSelection;return o||a},n.componentDidMount=function(){var t=this.props.selection,e=t.getEndKey();if(t.getHasFocus()&&e===this.props.block.getKey()){var r=this.wrapperRef.current;if(r){var n,i=f.getScrollParent(r),o=d(i);if(i===window){var a=p(r);(n=a.y+a.height-h().height)>0&&window.scrollTo(o.x,o.y+n+10)}else{y(r)||v(!1);var s=r;(n=s.offsetHeight+s.offsetTop-(i.offsetHeight+o.y))>0&&l.setTop(i,l.getTop(i)+n+10)}}}},n.render=function(){var t=this,e=this.props,r=e.block,n=e.blockRenderMap,a=e.blockRendererFn,l=e.blockStyleFn,f=e.contentState,p=e.decorator,d=e.editorKey,h=e.editorState,g=e.customStyleFn,v=e.customStyleMap,y=e.direction,w=e.forceSelection,x=e.selection,E=e.tree,O=null;r.children.size&&(O=r.children.reduce((function(e,r){var i=u.encode(r,0,0),s=f.getBlockForKey(r),p=_(s,a),g=p.CustomComponent||DraftEditorBlockNode,v=b(s,n),y=v.Element,m=v.wrapperTemplate,w=S(s,d,i,l,p,null),x=o({},t.props,{tree:h.getBlockTree(r),blockProps:p.customProps,offsetKey:i,block:s});return e.push(c.createElement(y,w,c.createElement(g,x))),!m||function(t,e){var r=t.getNextSiblingKey();return!!r&&e.getBlockForKey(r).getType()===t.getType()}(s,f)||function(t,e,r){var n=[],i=!0,o=!1,a=void 0;try{for(var s,l=r.reverse()[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var f=s.value;if(f.type!==e)break;n.push(f)}}catch(t){o=!0,a=t}finally{try{i||null==l.return||l.return()}finally{if(o)throw a}}r.splice(r.indexOf(n[0]),n.length+1);var p=n.reverse(),d=p[0].key;r.push(c.cloneElement(t,{key:"".concat(d,"-wrap"),"data-offset-key":u.encode(d,0,0)},p))}(m,y,e),e}),[]));var C=r.getKey(),k=u.encode(C,0,0),M=_(r,a),D=M.CustomComponent,I=null!=D?c.createElement(D,i({},this.props,{tree:h.getBlockTree(C),blockProps:M.customProps,offsetKey:k,block:r})):c.createElement(s,{block:r,children:O,contentState:f,customStyleFn:g,customStyleMap:v,decorator:p,direction:y,forceSelection:w,hasSelection:m(x,C),selection:x,tree:E});if(r.getParentKey())return I;var A=b(r,n).Element,T=S(r,d,k,l,M,this.wrapperRef);return c.createElement(A,T,I)},DraftEditorBlockNode}(c.Component);t.exports=w},33418:(t,e,r)=>{"use strict";var n=r(77907),i=r(42307),o=r(22146),a=r(14289),s=r(25399),u=r(4856),c=r(14507),l=r(84907),f=r(1244),p=r(42128),d=r(22045),h=u.isBrowser("IE"),g=!1,v=!1,y=null;var m={onCompositionStart:function(t){v=!0,function(t){y||(y=new n(l(t))).start()}(t)},onCompositionEnd:function(t){g=!1,v=!1,setTimeout((function(){g||m.resolveComposition(t)}),20)},onSelect:c,onKeyDown:function(t,e){if(!v)return m.resolveComposition(t),void t._onKeyDown(e);e.which!==s.RIGHT&&e.which!==s.LEFT||e.preventDefault()},onKeyPress:function(t,e){e.which===s.RETURN&&e.preventDefault()},resolveComposition:function(t){if(!v){var e=d(y).stopAndFlushMutations();y=null,g=!0;var r=a.set(t._latestEditorState,{inCompositionMode:!1});if(t.exitCurrentMode(),e.size){var n=r.getCurrentContent();e.forEach((function(t,e){var s=o.decode(e),u=s.blockKey,c=s.decoratorKey,l=s.leafKey,f=r.getBlockTree(u).getIn([c,"leaves",l]),d=f.start,h=f.end,g=r.getSelection().merge({anchorKey:u,focusKey:u,anchorOffset:d,focusOffset:h,isBackward:!1}),v=p(n,g),y=n.getBlockForKey(u).getInlineStyleAt(d);n=i.replaceText(n,g,t,y,v),r=a.set(r,{currentContent:n})}));var s=f(r,l(t)).selectionState;t.restoreEditorDOM();var u=h?a.forceSelection(r,s):a.acceptSelection(r,s);t.update(a.push(u,n,"insert-characters"))}else t.update(r)}}};t.exports=m},88795:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){a(t,e,r[e])}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(37898),u=r(22146),c=r(67294),l=r(62620),f=r(71108),p=r(22045),d=function(t,e,r,n){return l({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===t,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===t,"public/DraftStyleDefault/reset":r,"public/DraftStyleDefault/depth0":0===e,"public/DraftStyleDefault/depth1":1===e,"public/DraftStyleDefault/depth2":2===e,"public/DraftStyleDefault/depth3":3===e,"public/DraftStyleDefault/depth4":e>=4,"public/DraftStyleDefault/listLTR":"LTR"===n,"public/DraftStyleDefault/listRTL":"RTL"===n})},h=function(t){var e,r;function DraftEditorContents(){return t.apply(this,arguments)||this}r=t,(e=DraftEditorContents).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=DraftEditorContents.prototype;return n.shouldComponentUpdate=function(t){var e=this.props.editorState,r=t.editorState;if(e.getDirectionMap()!==r.getDirectionMap())return!0;if(e.getSelection().getHasFocus()!==r.getSelection().getHasFocus())return!0;var n=r.getNativelyRenderedContent(),i=e.isInCompositionMode(),o=r.isInCompositionMode();if(e===r||null!==n&&r.getCurrentContent()===n||i&&o)return!1;var a=e.getCurrentContent(),s=r.getCurrentContent(),u=e.getDecorator(),c=r.getDecorator();return i!==o||a!==s||u!==c||r.mustForceSelection()},n.render=function(){for(var t=this.props,e=t.blockRenderMap,r=t.blockRendererFn,n=t.blockStyleFn,a=t.customStyleMap,l=t.customStyleFn,h=t.editorState,g=t.editorKey,v=t.preventScroll,y=t.textDirectionality,m=h.getCurrentContent(),b=h.getSelection(),_=h.mustForceSelection(),S=h.getDecorator(),w=p(h.getDirectionMap()),x=m.getBlocksAsArray(),E=[],O=null,C=null,k=0;k<x.length;k++){var M=x[k],D=M.getKey(),I=M.getType(),A=r(M),T=void 0,R=void 0,B=void 0;A&&(T=A.component,R=A.props,B=A.editable);var P=y||w.get(D),z=u.encode(D,0,0),L={contentState:m,block:M,blockProps:R,blockStyleFn:n,customStyleMap:a,customStyleFn:l,decorator:S,direction:P,forceSelection:_,offsetKey:z,preventScroll:v,selection:b,tree:h.getBlockTree(D)},j=e.get(I)||e.get("unstyled"),N=j.wrapper,K=j.element||e.get("unstyled").element,q=M.getDepth(),F="";if(n&&(F=n(M)),"li"===K)F=f(F,d(I,q,C!==N||null===O||q>O,P));var U=T||s,G={className:F,"data-block":!0,"data-editor":g,"data-offset-key":z,key:D};void 0!==B&&(G=o({},G,{contentEditable:B,suppressContentEditableWarning:!0}));var H=c.createElement(K,G,c.createElement(U,i({},L,{key:D})));E.push({block:H,wrapperTemplate:N,key:D,offsetKey:z}),O=N?M.getDepth():null,C=N}for(var W=[],V=0;V<E.length;){var Y=E[V];if(Y.wrapperTemplate){var X=[];do{X.push(E[V].block),V++}while(V<E.length&&E[V].wrapperTemplate===Y.wrapperTemplate);var $=c.cloneElement(Y.wrapperTemplate,{key:Y.key+"-wrap","data-offset-key":Y.offsetKey},X);W.push($)}else W.push(Y.block),V++}return c.createElement("div",{"data-contents":"true"},W)},DraftEditorContents}(c.Component);t.exports=h},87791:(t,e,r)=>{"use strict";var n=r(68642)("draft_tree_data_support");t.exports=r(n?69459:88795)},69459:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}var o=r(25821),a=r(22146),s=r(67294),u=r(22045),c=function(t){var e,r;function DraftEditorContentsExperimental(){return t.apply(this,arguments)||this}r=t,(e=DraftEditorContentsExperimental).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=DraftEditorContentsExperimental.prototype;return n.shouldComponentUpdate=function(t){var e=this.props.editorState,r=t.editorState;if(e.getDirectionMap()!==r.getDirectionMap())return!0;if(e.getSelection().getHasFocus()!==r.getSelection().getHasFocus())return!0;var n=r.getNativelyRenderedContent(),i=e.isInCompositionMode(),o=r.isInCompositionMode();if(e===r||null!==n&&r.getCurrentContent()===n||i&&o)return!1;var a=e.getCurrentContent(),s=r.getCurrentContent(),u=e.getDecorator(),c=r.getDecorator();return i!==o||a!==s||u!==c||r.mustForceSelection()},n.render=function(){for(var t=this.props,e=t.blockRenderMap,r=t.blockRendererFn,n=t.blockStyleFn,c=t.customStyleMap,l=t.customStyleFn,f=t.editorState,p=t.editorKey,d=t.textDirectionality,h=f.getCurrentContent(),g=f.getSelection(),v=f.mustForceSelection(),y=f.getDecorator(),m=u(f.getDirectionMap()),b=[],_=h.getBlocksAsArray()[0];_;){var S=_.getKey(),w={blockRenderMap:e,blockRendererFn:r,blockStyleFn:n,contentState:h,customStyleFn:l,customStyleMap:c,decorator:y,editorKey:p,editorState:f,forceSelection:v,selection:g,block:_,direction:d||m.get(S),tree:f.getBlockTree(S)},x=(e.get(_.getType())||e.get("unstyled")).wrapper;b.push({block:s.createElement(o,i({key:S},w)),wrapperTemplate:x,key:S,offsetKey:a.encode(S,0,0)});var E=_.getNextSiblingKey();_=E?h.getBlockForKey(E):null}for(var O=[],C=0;C<b.length;){var k=b[C];if(k.wrapperTemplate){var M=[];do{M.push(b[C].block),C++}while(C<b.length&&b[C].wrapperTemplate===k.wrapperTemplate);var D=s.cloneElement(k.wrapperTemplate,{key:k.key+"-wrap","data-offset-key":k.offsetKey},M);O.push(D)}else O.push(k.block),C++}return s.createElement("div",{"data-contents":"true"},O)},DraftEditorContentsExperimental}(s.Component);t.exports=c},3259:(t,e,r)=>{"use strict";var n=r(27418);function i(){return i=n||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}var o=r(22146),a=r(67294),s=r(54191),u=r(16633),c=function(t){var e,r;function DraftEditorDecoratedLeaves(){return t.apply(this,arguments)||this}return r=t,(e=DraftEditorDecoratedLeaves).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,DraftEditorDecoratedLeaves.prototype.render=function(){var t=this.props,e=t.block,r=t.children,n=t.contentState,c=t.decorator,l=t.decoratorKey,f=t.direction,p=t.leafSet,d=t.text,h=e.getKey(),g=p.get("leaves"),v=c.getComponentForKey(l),y=c.getPropsForKey(l),m=o.encode(h,parseInt(l,10),0),b=d.slice(g.first().get("start"),g.last().get("end")),_=u.getHTMLDirIfDifferent(s.getDirection(b),f);return a.createElement(v,i({},y,{contentState:n,decoratedText:b,dir:_,key:m,entityKey:e.getEntityAt(p.get("start")),offsetKey:m}),r)},DraftEditorDecoratedLeaves}(a.Component);t.exports=c},61494:(t,e,r)=>{"use strict";var n=r(44891),i=r(42307),o=r(14289),a=r(69270),s=r(75795),u=r(21738),c=r(94486),l=r(48083),f=r(42177),p=r(22045);var d={onDragEnd:function(t){t.exitCurrentMode(),h(t)},onDrop:function(t,e){var r=new n(e.nativeEvent.dataTransfer),l=t._latestEditorState,d=function(t,e){var r=null,n=null,i=s(t.currentTarget);if("function"==typeof i.caretRangeFromPoint){var o=i.caretRangeFromPoint(t.x,t.y);r=o.startContainer,n=o.startOffset}else{if(!t.rangeParent)return null;r=t.rangeParent,n=t.rangeOffset}r=p(r),n=p(n);var u=p(a(r));return c(e,u,n,u,n)}(e.nativeEvent,l);if(e.preventDefault(),t._dragCount=0,t.exitCurrentMode(),null!=d){var v=r.getFiles();if(v.length>0){if(t.props.handleDroppedFiles&&f(t.props.handleDroppedFiles(d,v)))return;u(v,(function(e){e&&t.update(g(l,d,e))}))}else{var y=t._internalDrag?"internal":"external";t.props.handleDrop&&f(t.props.handleDrop(d,r,y))||(t._internalDrag?t.update(function(t,e){var r=i.moveText(t.getCurrentContent(),t.getSelection(),e);return o.push(t,r,"insert-fragment")}(l,d)):t.update(g(l,d,r.getText()))),h(t)}}}};function h(t){t._internalDrag=!1;var e=t.editorContainer;if(e){var r=new MouseEvent("mouseup",{view:l(e),bubbles:!0,cancelable:!0});e.dispatchEvent(r)}}function g(t,e,r){var n=i.insertText(t.getCurrentContent(),e,r,t.getCurrentInlineStyle());return o.push(t,n,"insert-fragment")}t.exports=d},19394:(t,e,r)=>{"use strict";var n=r(4856),i=r(26396),o=r(43421),a=r(6155),s=r(69328),u=r(88922),c=r(39499),l=r(80981),f=r(62186),p=r(29971),d=r(46397),h=r(6089),g=r(14507),v=n.isBrowser("Chrome"),y=n.isBrowser("Firefox"),m=v||y?g:function(t){},b={onBeforeInput:i,onBlur:o,onCompositionStart:a,onCopy:s,onCut:u,onDragOver:c,onDragStart:l,onFocus:f,onInput:p,onKeyDown:d,onPaste:h,onSelect:g,onMouseUp:m,onKeyUp:m};t.exports=b},4083:(t,e,r)=>{"use strict";var n=r(73935).unstable_flushControlled;t.exports=n},42282:(t,e,r)=>{"use strict";var n=r(27418);var i=r(80052),o=r(67294),a=r(73759),s=r(16581),u=r(45412).setDraftEditorSelection,c=function(t){var e,r;function DraftEditorLeaf(){for(var e,r,n,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a))||this,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e),i=void 0,(n="leaf")in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,e}r=t,(e=DraftEditorLeaf).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var c=DraftEditorLeaf.prototype;return c._setSelection=function(){var t=this.props.selection;if(null!=t&&t.getHasFocus()){var e=this.props,r=e.block,n=e.start,i=e.text,o=r.getKey(),c=n+i.length;if(t.hasEdgeWithin(o,n,c)){var l=this.leaf;l||a(!1);var f,p=l.firstChild;p||a(!1),p.nodeType===Node.TEXT_NODE?f=p:s(p)?f=l:(f=p.firstChild)||a(!1),u(t,f,o,n,c)}}},c.shouldComponentUpdate=function(t){var e=this.leaf;return e||a(!1),e.textContent!==t.text||t.styleSet!==this.props.styleSet||t.forceSelection},c.componentDidUpdate=function(){this._setSelection()},c.componentDidMount=function(){this._setSelection()},c.render=function(){var t=this,e=this.props.block,r=this.props.text;r.endsWith("\n")&&this.props.isLast&&(r+="\n");var a=this.props,s=a.customStyleMap,u=a.customStyleFn,c=a.offsetKey,l=a.styleSet,f=l.reduce((function(t,e){var r={},i=s[e];return void 0!==i&&t.textDecoration!==i.textDecoration&&(r.textDecoration=[t.textDecoration,i.textDecoration].join(" ").trim()),n(t,i,r)}),{});if(u){var p=u(l,e);f=n(f,p)}return o.createElement("span",{"data-offset-key":c,ref:function(e){return t.leaf=e},style:f},o.createElement(i,null,r))},DraftEditorLeaf}(o.Component);t.exports=c},59513:(t,e,r)=>{"use strict";var n=r(3259),i=r(42282),o=r(22146),a=r(43393),s=r(67294),u=r(62620),c=(a.List,function(t){var e,r;function DraftEditorNode(){return t.apply(this,arguments)||this}return r=t,(e=DraftEditorNode).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,DraftEditorNode.prototype.render=function(){var t=this.props,e=t.block,r=t.contentState,a=t.customStyleFn,c=t.customStyleMap,l=t.decorator,f=t.direction,p=t.forceSelection,d=t.hasSelection,h=t.selection,g=t.tree,v=e.getKey(),y=e.getText(),m=g.size-1,b=this.props.children||g.map((function(t,u){var g=t.get("decoratorKey"),b=t.get("leaves"),_=b.size-1,S=b.map((function(t,r){var n=o.encode(v,u,r),l=t.get("start"),f=t.get("end");return s.createElement(i,{key:n,offsetKey:n,block:e,start:l,selection:d?h:null,forceSelection:p,text:y.slice(l,f),styleSet:e.getInlineStyleAt(l),customStyleMap:c,customStyleFn:a,isLast:g===m&&r===_})})).toArray();return g&&l?s.createElement(n,{block:e,children:S,contentState:r,decorator:l,decoratorKey:g,direction:f,leafSet:t,text:y,key:u}):S})).toArray();return s.createElement("div",{"data-offset-key":o.encode(v,0,0),className:u({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===f,"public/DraftStyleDefault/rtl":"RTL"===f})},b)},DraftEditorNode}(s.Component));t.exports=c},28094:(t,e,r)=>{"use strict";var n=r(67294),i=r(62620),o=function(t){var e,r;function DraftEditorPlaceholder(){return t.apply(this,arguments)||this}r=t,(e=DraftEditorPlaceholder).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var o=DraftEditorPlaceholder.prototype;return o.shouldComponentUpdate=function(t){return this.props.text!==t.text||this.props.editorState.getSelection().getHasFocus()!==t.editorState.getSelection().getHasFocus()},o.render=function(){var t=this.props.editorState.getSelection().getHasFocus(),e=i({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":t});return n.createElement("div",{className:e},n.createElement("div",{className:i("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},DraftEditorPlaceholder}(n.Component);t.exports=o},80052:(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(67294),a=r(4856),s=r(73759),u=r(84368),c=a.isBrowser("IE <= 11");var l=function(t){var e,r;function DraftEditorTextNode(e){var r;return i(n(r=t.call(this,e)||this),"_forceFlag",void 0),i(n(r),"_node",void 0),r._forceFlag=!1,r}r=t,(e=DraftEditorTextNode).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var a=DraftEditorTextNode.prototype;return a.shouldComponentUpdate=function(t){var e=this._node,r=""===t.children;u(e)||s(!1);var n=e;return r?!function(t){return c?"\n"===t.textContent:"BR"===t.tagName}(n):n.textContent!==t.children},a.componentDidMount=function(){this._forceFlag=!this._forceFlag},a.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},a.render=function(){var t=this;return""===this.props.children?this._forceFlag?function NEWLINE_A(t){return c?o.createElement("span",{key:"A","data-text":"true",ref:t},"\n"):o.createElement("br",{key:"A","data-text":"true",ref:t})}((function(e){return t._node=e})):function NEWLINE_B(t){return c?o.createElement("span",{key:"B","data-text":"true",ref:t},"\n"):o.createElement("br",{key:"B","data-text":"true",ref:t})}((function(e){return t._node=e})):o.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},DraftEditorTextNode}(o.Component);t.exports=l},5880:t=>{"use strict";t.exports={initODS:function(){},handleExtensionCausedError:function(){}}},82222:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(39006),o=r(43393),a=r(73759),s=r(76363),u=(0,o.Map)(),c=s();function l(t,e){console.warn("WARNING: "+t+' will be deprecated soon!\nPlease use "'+e+'" instead.')}var f={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),f.__getLastCreatedEntityKey()},create:function(t,e,r){return l("DraftEntity.create","contentState.createEntity"),f.__create(t,e,r)},add:function(t){return l("DraftEntity.add","contentState.addEntity"),f.__add(t)},get:function(t){return l("DraftEntity.get","contentState.getEntity"),f.__get(t)},__getAll:function __getAll(){return u},__loadWithEntities:function __loadWithEntities(t){u=t,c=s()},mergeData:function(t,e){return l("DraftEntity.mergeData","contentState.mergeEntityData"),f.__mergeData(t,e)},replaceData:function(t,e){return l("DraftEntity.replaceData","contentState.replaceEntityData"),f.__replaceData(t,e)},__getLastCreatedEntityKey:function __getLastCreatedEntityKey(){return c},__create:function __create(t,e,r){return f.__add(new i({type:t,mutability:e,data:r||{}}))},__add:function __add(t){return c=s(),u=u.set(c,t),c},__get:function __get(t){var e=u.get(t);return e||a(!1),e},__mergeData:function __mergeData(t,e){var r=f.__get(t),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},r.getData(),e),o=r.set("data",i);return u=u.set(t,o),o},__replaceData:function __replaceData(t,e){var r=f.__get(t).set("data",e);return u=u.set(t,r),r}};t.exports=f},39006:(t,e,r)=>{"use strict";var n=function(t){var e,r;function DraftEntityInstance(){return t.apply(this,arguments)||this}r=t,(e=DraftEntityInstance).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=DraftEntityInstance.prototype;return n.getType=function(){return this.get("type")},n.getMutability=function(){return this.get("mutability")},n.getData=function(){return this.get("data")},DraftEntityInstance}((0,r(43393).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));t.exports=n},5195:t=>{"use strict";t.exports={getRemovalRange:function(t,e,r,n,i){var o=r.split(" ");o=o.map((function(t,e){if("forward"===i){if(e>0)return" "+t}else if(e<o.length-1)return t+" ";return t}));for(var a,s=n,u=null,c=null,l=0;l<o.length;l++){if(t<(a=s+o[l].length)&&s<e)null!==u||(u=s),c=a;else if(null!==u)break;s=a}var f=n+r.length,p=u===n,d=c===f;return(!p&&d||p&&!d)&&("forward"===i?c!==f&&c++:u!==n&&u--),{start:u,end:c}}}},97432:t=>{"use strict";t.exports={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}}},42307:(t,e,r)=>{"use strict";var n=r(4516),i=r(13483),o=r(68750),a=r(81446),s=r(88687),u=r(43393),c=r(54542),l=r(18467),f=r(73759),p=r(57429),d=r(14017),h=r(54879),g=r(36043),v=u.OrderedSet,y={replaceText:function(t,e,r,i,o){var a=d(t,e),s=h(a,e),u=n.create({style:i||v(),entity:o||null});return l(s,s.getSelectionAfter(),r,u)},insertText:function(t,e,r,n,i){return e.isCollapsed()||f(!1),y.replaceText(t,e,r,n,i)},moveText:function(t,e,r){var n=s(t,e),i=y.removeRange(t,e,"backward");return y.replaceWithFragment(i,r,n)},replaceWithFragment:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(t,e),o=h(i,e);return c(o,o.getSelectionAfter(),r,n)},removeRange:function(t,e,r){var n,i,o,s;e.getIsBackward()&&(e=e.merge({anchorKey:e.getFocusKey(),anchorOffset:e.getFocusOffset(),focusKey:e.getAnchorKey(),focusOffset:e.getAnchorOffset(),isBackward:!1})),n=e.getAnchorKey(),i=e.getFocusKey(),o=t.getBlockForKey(n),s=t.getBlockForKey(i);var u=e.getStartOffset(),c=e.getEndOffset(),l=o.getEntityAt(u),f=s.getEntityAt(c-1);if(n===i&&l&&l===f){var p=a(t.getEntityMap(),o,s,e,r);return h(t,p)}var g=d(t,e);return h(g,e)},splitBlock:function(t,e){var r=d(t,e),n=h(r,e);return g(n,n.getSelectionAfter())},applyInlineStyle:function(t,e,r){return i.add(t,e,r)},removeInlineStyle:function(t,e,r){return i.remove(t,e,r)},setBlockType:function(t,e,r){return p(t,e,(function(t){return t.merge({type:r,depth:0})}))},setBlockData:function(t,e,r){return p(t,e,(function(t){return t.merge({data:r})}))},mergeBlockData:function(t,e,r){return p(t,e,(function(t){return t.merge({data:t.getData().merge(r)})}))},applyEntity:function(t,e,r){var n=d(t,e);return o(n,e,r)}};t.exports=y},22146:t=>{"use strict";var e="-",r={encode:function(t,r,n){return t+e+r+e+n},decode:function(t){var r=t.split(e).reverse(),n=r[0],i=r[1];return{blockKey:r.slice(2).reverse().join(e),decoratorKey:parseInt(i,10),leafKey:parseInt(n,10)}}};t.exports=r},45712:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(38777),o=r(67953),a=r(67841),s=r(25027),u=r(69769),c=r(68642),l=r(43393),f=r(55283),p=l.List,d=l.Repeat,h=c("draft_tree_data_support"),g=h?o:i,v={processHTML:function(t,e){return a(t,u,e)},processText:function(t,e,r){return t.reduce((function(t,i,o){i=f(i);var a=s(),u={key:a,type:r,text:i,characterList:p(d(e,i.length))};if(h&&0!==o){var c=o-1;u=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},u,{prevSibling:(t[c]=t[c].merge({nextSibling:a})).getKey()})}return t.push(new g(u)),t}),[])}};t.exports=v},73932:(t,e,r)=>{"use strict";var n="['‘’]",i="\\s|(?![_])"+r(65724).getPunctuation(),o=new RegExp("^(?:"+i+")*(?:"+n+"|(?!"+i+").)*(?:(?!"+i+").)"),a=new RegExp("(?:(?!"+i+").)(?:"+n+"|(?!"+i+").)*(?:"+i+")*$");function s(t,e){var r=e?a.exec(t):o.exec(t);return r?r[0]:t}var u={getBackward:function(t){return s(t,!0)},getForward:function(t){return s(t,!1)}};t.exports=u},86155:t=>{"use strict";var e={stringify:function(t){return"_"+String(t)},unstringify:function(t){return t.slice(1)}};t.exports=e},68957:(t,e,r)=>{"use strict";function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(25027),a=r(73759),s=function(t){if(!t||!t.type)return!1;var e=t.type;return"unordered-list-item"===e||"ordered-list-item"===e},u={fromRawTreeStateToRawState:function(t){var e=t.blocks,r=[];return Array.isArray(e)||a(!1),Array.isArray(e)&&e.length?(function(t,e){for(var r=[].concat(t).reverse();r.length;){var n=r.pop();e(n);var i=n.children;Array.isArray(i)||a(!1),r=r.concat([].concat(i.reverse()))}}(e,(function(t){var e=n({},t);s(t)&&(e.depth=e.depth||0,function(t){Array.isArray(t.children)&&(t.children=t.children.map((function(e){return e.type===t.type?n({},e,{depth:(t.depth||0)+1}):e})))}(t),null!=t.children&&t.children.length>0)||(delete e.children,r.push(e))})),t.blocks=r,n({},t,{blocks:r})):t},fromRawStateToRawTreeState:function(t){var e=[],r=[];return t.blocks.forEach((function(t){var i=s(t),a=t.depth||0,u=n({},t,{children:[]});if(i){var c=r[0];if(null==c&&0===a)e.push(u);else if(null==c||c.depth<a-1){var l={key:o(),text:"",depth:a-1,type:t.type,children:[],entityRanges:[],inlineStyleRanges:[]};r.unshift(l),1===a?e.push(l):null!=c&&c.children.push(l),l.children.push(u)}else if(c.depth===a-1)c.children.push(u);else{for(;null!=c&&c.depth>=a;)r.shift(),c=r[0];a>0?c.children.push(u):e.push(u)}}else e.push(u)})),n({},t,{blocks:e})}};t.exports=u},12119:(t,e,r)=>{"use strict";r(63620);t.exports={isValidBlock:function(t,e){var r=t.getKey(),n=t.getParentKey();if(null!=n&&!e.get(n).getChildKeys().includes(r))return!1;if(!t.getChildKeys().map((function(t){return e.get(t)})).every((function(t){return t.getParentKey()===r})))return!1;var i=t.getPrevSiblingKey();if(null!=i&&e.get(i).getNextSiblingKey()!==r)return!1;var o=t.getNextSiblingKey();if(null!=o&&e.get(o).getPrevSiblingKey()!==r)return!1;return(null===o||null===i||i!==o)&&!(""!=t.text&&t.getChildKeys().size>0)},isConnectedTree:function(t){var e=t.toArray().filter((function(t){return null==t.getParentKey()&&null==t.getPrevSiblingKey()}));if(1!==e.length)return!1;for(var r=0,n=e.shift().getKey(),i=[];null!=n;){var o=t.get(n),a=o.getChildKeys(),s=o.getNextSiblingKey();if(a.size>0){null!=s&&i.unshift(s);var u=a.map((function(e){return t.get(e)})).find((function(t){return null==t.getPrevSiblingKey()}));if(null==u)return!1;n=u.getKey()}else n=null!=o.getNextSiblingKey()?o.getNextSiblingKey():i.shift();r++}return r===t.size},isValidTree:function(t){var e=this;return!!t.toArray().every((function(r){return e.isValidBlock(r,t)}))&&this.isConnectedTree(t)}}},33337:(t,e,r)=>{"use strict";var n,i=r(7902),o=r(43393),a=r(22045),s=o.OrderedMap,u={getDirectionMap:function(t,e){n?n.reset():n=new i;var r=t.getBlockMap(),u=r.valueSeq().map((function(t){return a(n).getDirection(t.getText())})),c=s(r.keySeq().zip(u));return null!=e&&o.is(e,c)?e:c}};t.exports=u},14289:(t,e,r)=>{"use strict";function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(34365),a=r(66912),s=r(33337),u=r(25110),c=r(43393),l=c.OrderedSet,f=c.Record,p=c.Stack,d=c.OrderedMap,h=c.List,g=f({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:p(),selection:null,treeMap:null,undoStack:p()}),v=function(){EditorState.createEmpty=function(t){return this.createWithText("",t)},EditorState.createWithText=function(t,e){return EditorState.createWithContent(a.createFromText(t),e)},EditorState.createWithContent=function(t,e){if(0===t.getBlockMap().count())return EditorState.createEmpty(e);var r=t.getBlockMap().first().getKey();return EditorState.create({currentContent:t,undoStack:p(),redoStack:p(),decorator:e||null,selection:u.createEmpty(r)})},EditorState.create=function(t){var e=t.currentContent,r=n({},t,{treeMap:m(e,t.decorator),directionMap:s.getDirectionMap(e)});return new EditorState(new g(r))},EditorState.fromJS=function(t){return new EditorState(new g(n({},t,{directionMap:null!=t.directionMap?d(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?l(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?a.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?p(t.redoStack.map((function(t){return a.fromJS(t)}))):t.redoStack,selection:null!=t.selection?new u(t.selection):t.selection,treeMap:null!=t.treeMap?d(t.treeMap).map((function(t){return h(t).map((function(t){return o.fromJS(t)}))})):t.treeMap,undoStack:null!=t.undoStack?p(t.undoStack.map((function(t){return a.fromJS(t)}))):t.undoStack,currentContent:a.fromJS(t.currentContent)})))},EditorState.set=function(t,e){return new EditorState(t.getImmutable().withMutations((function(r){var n=r.get("decorator"),i=n;null===e.decorator?i=null:e.decorator&&(i=e.decorator);var a=e.currentContent||t.getCurrentContent();if(i!==n){var s,u=r.get("treeMap");return s=i&&n?function(t,e,r,n,i){return r.merge(e.toSeq().filter((function(e){return n.getDecorations(e,t)!==i.getDecorations(e,t)})).map((function(e){return o.generate(t,e,n)})))}(a,a.getBlockMap(),u,i,n):m(a,i),void r.merge({decorator:i,treeMap:s,nativelyRenderedContent:null})}a!==t.getCurrentContent()&&r.set("treeMap",function(t,e,r,n){var i=t.getCurrentContent().set("entityMap",r),a=i.getBlockMap(),s=t.getImmutable().get("treeMap");return s.merge(e.toSeq().filter((function(t,e){return t!==a.get(e)})).map((function(t){return o.generate(i,t,n)})))}(t,a.getBlockMap(),a.getEntityMap(),i)),r.merge(e)})))};var t=EditorState.prototype;function EditorState(t){i(this,"_immutable",void 0),this._immutable=t}return t.toJS=function(){return this.getImmutable().toJS()},t.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},t.getCurrentContent=function(){return this.getImmutable().get("currentContent")},t.getUndoStack=function(){return this.getImmutable().get("undoStack")},t.getRedoStack=function(){return this.getImmutable().get("redoStack")},t.getSelection=function(){return this.getImmutable().get("selection")},t.getDecorator=function(){return this.getImmutable().get("decorator")},t.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},t.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},t.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},t.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},t.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},EditorState.setInlineStyleOverride=function(t,e){return EditorState.set(t,{inlineStyleOverride:e})},t.getCurrentInlineStyle=function(){var t=this.getInlineStyleOverride();if(null!=t)return t;var e=this.getCurrentContent(),r=this.getSelection();return r.isCollapsed()?function(t,e){var r=e.getStartKey(),n=e.getStartOffset(),i=t.getBlockForKey(r);if(n>0)return i.getInlineStyleAt(n-1);if(i.getLength())return i.getInlineStyleAt(0);return b(t,r)}(e,r):function(t,e){var r=e.getStartKey(),n=e.getStartOffset(),i=t.getBlockForKey(r);if(n<i.getLength())return i.getInlineStyleAt(n);if(n>0)return i.getInlineStyleAt(n-1);return b(t,r)}(e,r)},t.getBlockTree=function(t){return this.getImmutable().getIn(["treeMap",t])},t.isSelectionAtStartOfContent=function(){var t=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(t,0,0)},t.isSelectionAtEndOfContent=function(){var t=this.getCurrentContent().getBlockMap().last(),e=t.getLength();return this.getSelection().hasEdgeWithin(t.getKey(),e,e)},t.getDirectionMap=function(){return this.getImmutable().get("directionMap")},EditorState.acceptSelection=function(t,e){return y(t,e,!1)},EditorState.forceSelection=function(t,e){return e.getHasFocus()||(e=e.set("hasFocus",!0)),y(t,e,!0)},EditorState.moveSelectionToEnd=function(t){var e=t.getCurrentContent().getLastBlock(),r=e.getKey(),n=e.getLength();return EditorState.acceptSelection(t,new u({anchorKey:r,anchorOffset:n,focusKey:r,focusOffset:n,isBackward:!1}))},EditorState.moveFocusToEnd=function(t){var e=EditorState.moveSelectionToEnd(t);return EditorState.forceSelection(e,e.getSelection())},EditorState.push=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.getCurrentContent()===e)return t;var i=s.getDirectionMap(e,t.getDirectionMap());if(!t.getAllowUndo())return EditorState.set(t,{currentContent:e,directionMap:i,lastChangeType:r,selection:e.getSelectionAfter(),forceSelection:n,inlineStyleOverride:null});var o=t.getSelection(),a=t.getCurrentContent(),u=t.getUndoStack(),c=e;o!==a.getSelectionAfter()||function(t,e){var r=t.getLastChangeType();return e!==r||"insert-characters"!==e&&"backspace-character"!==e&&"delete-character"!==e}(t,r)?(u=u.push(a),c=c.set("selectionBefore",o)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(c=c.set("selectionBefore",a.getSelectionBefore()));var l=t.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(l=null);var f={currentContent:c,directionMap:i,undoStack:u,redoStack:p(),lastChangeType:r,selection:e.getSelectionAfter(),forceSelection:n,inlineStyleOverride:l};return EditorState.set(t,f)},EditorState.undo=function(t){if(!t.getAllowUndo())return t;var e=t.getUndoStack(),r=e.peek();if(!r)return t;var n=t.getCurrentContent(),i=s.getDirectionMap(r,t.getDirectionMap());return EditorState.set(t,{currentContent:r,directionMap:i,undoStack:e.shift(),redoStack:t.getRedoStack().push(n),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:n.getSelectionBefore()})},EditorState.redo=function(t){if(!t.getAllowUndo())return t;var e=t.getRedoStack(),r=e.peek();if(!r)return t;var n=t.getCurrentContent(),i=s.getDirectionMap(r,t.getDirectionMap());return EditorState.set(t,{currentContent:r,directionMap:i,undoStack:t.getUndoStack().push(n),redoStack:e.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},t.getImmutable=function(){return this._immutable},EditorState}();function y(t,e,r){return v.set(t,{selection:e,forceSelection:r,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(t,e){return t.getBlockMap().map((function(r){return o.generate(t,r,e)})).toOrderedMap()}function b(t,e){var r=t.getBlockMap().reverse().skipUntil((function(t,r){return r===e})).skip(1).skipUntil((function(t,e){return t.getLength()})).first();return r?r.getInlineStyleAt(r.getLength()-1):l()}t.exports=v},47387:(t,e,r)=>{"use strict";var n=r(4856),i=r(17797),o=n.isPlatform("Mac OS X"),a={isCtrlKeyCommand:function(t){return!!t.ctrlKey&&!t.altKey},isOptionKeyCommand:function(t){return o&&t.altKey},usesMacOSHeuristics:function(){return o},hasCommandModifier:function(t){return o?!!t.metaKey&&!t.altKey:a.isCtrlKeyCommand(t)},isSoftNewlineEvent:i};t.exports=a},70054:()=>{},41947:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(1665),a=r(22045),s={currentBlockContainsLink:function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=r.getEntityMap();return r.getBlockForKey(e.getAnchorKey()).getCharacterList().slice(e.getStartOffset(),e.getEndOffset()).some((function(t){var e=t.getEntity();return!!e&&"LINK"===n.__get(e).getType()}))},getCurrentBlockType:function(t){var e=t.getSelection();return t.getCurrentContent().getBlockForKey(e.getStartKey()).getType()},getDataObjectForLinkURL:function(t){return{url:t.toString()}},handleKeyCommand:function(t,e,r){switch(e){case"bold":return s.toggleInlineStyle(t,"BOLD");case"italic":return s.toggleInlineStyle(t,"ITALIC");case"underline":return s.toggleInlineStyle(t,"UNDERLINE");case"code":return s.toggleCode(t);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return s.onBackspace(t);case"delete":case"delete-word":case"delete-to-end-of-block":return s.onDelete(t);default:return null}},insertSoftNewline:function(t){var e=n.insertText(t.getCurrentContent(),t.getSelection(),"\n",t.getCurrentInlineStyle(),null),r=i.push(t,e,"insert-characters");return i.forceSelection(r,e.getSelectionAfter())},onBackspace:function(t){var e=t.getSelection();if(!e.isCollapsed()||e.getAnchorOffset()||e.getFocusOffset())return null;var r=t.getCurrentContent(),n=e.getStartKey(),o=r.getBlockBefore(n);if(o&&"atomic"===o.getType()){var a=r.getBlockMap().delete(o.getKey()),u=r.merge({blockMap:a,selectionAfter:e});if(u!==r)return i.push(t,u,"remove-range")}var c=s.tryToRemoveBlockStyle(t);return c?i.push(t,c,"change-block-type"):null},onDelete:function(t){var e=t.getSelection();if(!e.isCollapsed())return null;var r=t.getCurrentContent(),o=e.getStartKey(),a=r.getBlockForKey(o).getLength();if(e.getStartOffset()<a)return null;var s=r.getBlockAfter(o);if(!s||"atomic"!==s.getType())return null;var u=e.merge({focusKey:s.getKey(),focusOffset:s.getLength()}),c=n.removeRange(r,u,"forward");return c!==r?i.push(t,c,"remove-range"):null},onTab:function(t,e,r){var n=e.getSelection(),a=n.getAnchorKey();if(a!==n.getFocusKey())return e;var s=e.getCurrentContent(),u=s.getBlockForKey(a),c=u.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;t.preventDefault();var l=u.getDepth();if(!t.shiftKey&&l===r)return e;var f=o(s,n,t.shiftKey?-1:1,r);return i.push(e,f,"adjust-depth")},toggleBlockType:function(t,e){var r=t.getSelection(),o=r.getStartKey(),s=r.getEndKey(),u=t.getCurrentContent(),c=r;if(o!==s&&0===r.getEndOffset()){var l=a(u.getBlockBefore(s));s=l.getKey(),c=c.merge({anchorKey:o,anchorOffset:r.getStartOffset(),focusKey:s,focusOffset:l.getLength(),isBackward:!1})}if(u.getBlockMap().skipWhile((function(t,e){return e!==o})).reverse().skipWhile((function(t,e){return e!==s})).some((function(t){return"atomic"===t.getType()})))return t;var f=u.getBlockForKey(o).getType()===e?"unstyled":e;return i.push(t,n.setBlockType(u,c,f),"change-block-type")},toggleCode:function(t){var e=t.getSelection(),r=e.getAnchorKey(),n=e.getFocusKey();return e.isCollapsed()||r!==n?s.toggleBlockType(t,"code-block"):s.toggleInlineStyle(t,"CODE")},toggleInlineStyle:function(t,e){var r=t.getSelection(),o=t.getCurrentInlineStyle();if(r.isCollapsed())return i.setInlineStyleOverride(t,o.has(e)?o.remove(e):o.add(e));var a,s=t.getCurrentContent();return a=o.has(e)?n.removeInlineStyle(s,r,e):n.applyInlineStyle(s,r,e),i.push(t,a,"change-inline-style")},toggleLink:function(t,e,r){var o=n.applyEntity(t.getCurrentContent(),e,r);return i.push(t,o,"apply-entity")},tryToRemoveBlockStyle:function(t){var e=t.getSelection(),r=e.getAnchorOffset();if(e.isCollapsed()&&0===r){var i=e.getAnchorKey(),o=t.getCurrentContent(),a=o.getBlockForKey(i).getType(),s=o.getBlockBefore(i);if("code-block"===a&&s&&"code-block"===s.getType()&&0!==s.getLength())return null;if("unstyled"!==a)return n.setBlockType(o,e,"unstyled")}return null}};t.exports=s},83751:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(88687),a=r(22045),s=null,u={cut:function(t){var e=t.getCurrentContent(),r=t.getSelection(),u=null;if(r.isCollapsed()){var c=r.getAnchorKey(),l=e.getBlockForKey(c).getLength();if(l===r.getAnchorOffset()){var f=e.getKeyAfter(c);if(null==f)return t;u=r.set("focusKey",f).set("focusOffset",0)}else u=r.set("focusOffset",l)}else u=r;u=a(u),s=o(e,u);var p=n.removeRange(e,u,"forward");return p===e?t:i.push(t,p,"remove-range")},paste:function(t){if(!s)return t;var e=n.replaceWithFragment(t.getCurrentContent(),t.getSelection(),s);return i.push(t,e,"insert-fragment")}};t.exports=u},25110:(t,e,r)=>{"use strict";var n=function(t){var e,r;function SelectionState(){return t.apply(this,arguments)||this}r=t,(e=SelectionState).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var n=SelectionState.prototype;return n.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},n.getAnchorKey=function(){return this.get("anchorKey")},n.getAnchorOffset=function(){return this.get("anchorOffset")},n.getFocusKey=function(){return this.get("focusKey")},n.getFocusOffset=function(){return this.get("focusOffset")},n.getIsBackward=function(){return this.get("isBackward")},n.getHasFocus=function(){return this.get("hasFocus")},n.hasEdgeWithin=function(t,e,r){var n=this.getAnchorKey(),i=this.getFocusKey();if(n===i&&n===t){var o=this.getStartOffset(),a=this.getEndOffset();return e<=o&&o<=r||e<=a&&a<=r}if(t!==n&&t!==i)return!1;var s=t===n?this.getAnchorOffset():this.getFocusOffset();return e<=s&&r>=s},n.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},n.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},n.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},n.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},n.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},SelectionState.createEmpty=function(t){return new SelectionState({anchorKey:t,anchorOffset:0,focusKey:t,focusOffset:0,isBackward:!1,hasFocus:!1})},SelectionState}((0,r(43393).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));t.exports=n},1665:t=>{"use strict";t.exports=function(t,e,r,n){var i=e.getStartKey(),o=e.getEndKey(),a=t.getBlockMap(),s=a.toSeq().skipUntil((function(t,e){return e===i})).takeUntil((function(t,e){return e===o})).concat([[o,a.get(o)]]).map((function(t){var e=t.getDepth()+r;return e=Math.max(0,Math.min(e,n)),t.set("depth",e)}));return a=a.merge(s),t.merge({blockMap:a,selectionBefore:e,selectionAfter:e})}},2835:(t,e,r)=>{"use strict";var n=r(4516);t.exports=function(t,e,r,i){for(var o=e,a=t.getCharacterList();o<r;)a=a.set(o,n.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}},68750:(t,e,r)=>{"use strict";var n=r(2835),i=r(43393);t.exports=function(t,e,r){var o=t.getBlockMap(),a=e.getStartKey(),s=e.getStartOffset(),u=e.getEndKey(),c=e.getEndOffset(),l=o.skipUntil((function(t,e){return e===a})).takeUntil((function(t,e){return e===u})).toOrderedMap().merge(i.OrderedMap([[u,o.get(u)]])).map((function(t,e){var i=e===a?s:0,o=e===u?c:t.getLength();return n(t,i,o,r)}));return t.merge({blockMap:o.merge(l),selectionBefore:e,selectionAfter:e})}},79981:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(38777),o=r(67953),a=r(86155),s=r(56265),u=r(31487),c=r(73759),l=function(t,e){return{key:t.getKey(),text:t.getText(),type:t.getType(),depth:t.getDepth(),inlineStyleRanges:u(t),entityRanges:s(t,e),data:t.getData().toObject()}},f=function(t,e,r,a){if(t instanceof i)r.push(l(t,e));else{t instanceof o||c(!1);var s=t.getParentKey(),u=a[t.getKey()]=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},l(t,e),{children:[]});s?a[s].children.push(u):r.push(u)}};t.exports=function(t){var e={entityMap:{},blocks:[]};return e=function(t,e){var r=e.entityMap,n=[],i={},o={},s=0;return t.getBlockMap().forEach((function(t){t.findEntityRanges((function(t){return null!==t.getEntity()}),(function(e){var n=t.getEntityAt(e),i=a.stringify(n);o[i]||(o[i]=n,r[i]="".concat(s),s++)})),f(t,r,n,i)})),{blocks:n,entityMap:r}}(t,e),e=function(t,e){var r=e.blocks,n=e.entityMap,i={};return Object.keys(n).forEach((function(e,r){var n=t.getEntity(a.unstringify(e));i[r]={type:n.getType(),mutability:n.getMutability(),data:n.getData()}})),{blocks:r,entityMap:i}}(t,e),e}},67841:(t,e,r)=>{"use strict";var n;function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){o(t,e,r[e])}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(4516),s=r(38777),u=r(67953),c=r(526),l=r(82222),f=r(61425),p=r(62620),d=r(25027),h=r(69769),g=r(68642),v=r(43393),y=v.List,m=v.Map,b=v.OrderedSet,_=r(78241),S=r(16581),w=r(20717),x=r(35039),E=g("draft_tree_data_support"),O=new RegExp("\r","g"),C=new RegExp("\n","g"),k=new RegExp("^\n","g"),M=new RegExp("&nbsp;","g"),D=new RegExp("&#13;?","g"),I=new RegExp("&#8203;?","g"),A=["bold","bolder","500","600","700","800","900"],T=["light","lighter","normal","100","200","300","400"],R=["className","href","rel","target","title"],B=["alt","className","height","src","width"],P=(o(n={},p("public/DraftStyleDefault/depth0"),0),o(n,p("public/DraftStyleDefault/depth1"),1),o(n,p("public/DraftStyleDefault/depth2"),2),o(n,p("public/DraftStyleDefault/depth3"),3),o(n,p("public/DraftStyleDefault/depth4"),4),n),z=m({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),L=function(t){if(w(t)&&t.style.fontFamily.includes("monospace"))return"CODE";return null},j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(P).some((function(r){t.classList.contains(r)&&(e=P[r])})),e},N=function(t){if(!_(t))return!1;var e=t;if(!e.href||"http:"!==e.protocol&&"https:"!==e.protocol&&"mailto:"!==e.protocol&&"tel:"!==e.protocol)return!1;try{new f(e.href);return!0}catch(t){return!1}},K=function(t){if(!x(t))return!1;var e=t;return!(!e.attributes.getNamedItem("src")||!e.attributes.getNamedItem("src").value)},q=function(t,e){if(!w(t))return e;var r=t,n=r.style.fontWeight,i=r.style.fontStyle,o=r.style.textDecoration;return e.withMutations((function(t){A.indexOf(n)>=0?t.add("BOLD"):T.indexOf(n)>=0&&t.remove("BOLD"),"italic"===i?t.add("ITALIC"):"normal"===i&&t.remove("ITALIC"),"underline"===o&&t.add("UNDERLINE"),"line-through"===o&&t.add("STRIKETHROUGH"),"none"===o&&(t.remove("UNDERLINE"),t.remove("STRIKETHROUGH"))}))},F=function(t){return"ul"===t||"ol"===t},U=function(){function ContentBlocksBuilder(t,e){o(this,"characterList",y()),o(this,"currentBlockType","unstyled"),o(this,"currentDepth",0),o(this,"currentEntity",null),o(this,"currentText",""),o(this,"wrapper",null),o(this,"blockConfigs",[]),o(this,"contentBlocks",[]),o(this,"entityMap",l),o(this,"blockTypeMap",void 0),o(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=t,this.disambiguate=e}var t=ContentBlocksBuilder.prototype;return t.clear=function(){this.characterList=y(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(t){var e;return this.contentBlocks=[],this.currentDepth=0,(e=this.blockConfigs).push.apply(e,this._toBlockConfigs([t],b())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(E?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=i({key:t.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:y(),prevSibling:null,nextSibling:null,childConfigs:[]},t);return this.characterList=y(),this.currentBlockType="unstyled",this.currentText="",e},t._toBlockConfigs=function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],o=i.nodeName.toLowerCase();if("body"===o||F(o)){this._trimCurrentText(),""!==this.currentText&&r.push(this._makeBlockConfig());var a=this.currentDepth,s=this.wrapper;F(o)&&(this.wrapper=o,F(s)&&this.currentDepth++),r.push.apply(r,this._toBlockConfigs(Array.from(i.childNodes),e)),this.currentDepth=a,this.wrapper=s}else{var u=this.blockTypeMap.get(o);if(void 0===u)if("#text"!==o)if("br"!==o)if(K(i))this._addImgNode(i,e);else if(N(i))this._addAnchorNode(i,r,e);else{var c=e;z.has(o)&&(c=c.add(z.get(o))),c=q(i,c);var l=L(i);null!=l&&(c=c.add(l)),r.push.apply(r,this._toBlockConfigs(Array.from(i.childNodes),c))}else this._addBreakNode(i,e);else this._addTextNode(i,e);else{this._trimCurrentText(),""!==this.currentText&&r.push(this._makeBlockConfig());var f=this.currentDepth,p=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof u&&(u=this.disambiguate(o,this.wrapper)||u[0]||"unstyled"),!E&&w(i)&&("unordered-list-item"===u||"ordered-list-item"===u)){var h=i;this.currentDepth=j(h,this.currentDepth)}var g=d(),v=this._toBlockConfigs(Array.from(i.childNodes),e);this._trimCurrentText(),r.push(this._makeBlockConfig({key:g,childConfigs:v,type:u})),this.currentDepth=f,this.wrapper=p}}}return r},t._appendText=function(t,e){var r;this.currentText+=t;var n=a.create({style:e,entity:this.currentEntity});this.characterList=(r=this.characterList).push.apply(r,Array(t.length).fill(n))},t._trimCurrentText=function(){var t=this.currentText.length,e=t-this.currentText.trimLeft().length,r=this.currentText.trimRight().length,n=this.characterList.findEntry((function(t){return null!==t.getEntity()}));(e=void 0!==n?Math.min(e,n[0]):e)>(r=void 0!==(n=this.characterList.reverse().findEntry((function(t){return null!==t.getEntity()})))?Math.max(r,t-n[0]):r)?(this.currentText="",this.characterList=y()):(this.currentText=this.currentText.slice(e,r),this.characterList=this.characterList.slice(e,r))},t._addTextNode=function(t,e){var r=t.textContent;""===r.trim()&&"pre"!==this.wrapper&&(r=" "),"pre"!==this.wrapper&&(r=(r=r.replace(k,"")).replace(C," ")),this._appendText(r,e)},t._addBreakNode=function(t,e){S(t)&&this._appendText("\n",e)},t._addImgNode=function(t,e){if(x(t)){var r=t,n={};B.forEach((function(t){var e=r.getAttribute(t);e&&(n[t]=e)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",n),g("draftjs_fix_paste_for_img")?"presentation"!==r.getAttribute("role")&&this._appendText("📷",e):this._appendText("📷",e),this.currentEntity=null}},t._addAnchorNode=function(t,e,r){if(_(t)){var n=t,i={};R.forEach((function(t){var e=n.getAttribute(t);e&&(i[t]=e)})),i.url=new f(n.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),e.push.apply(e,this._toBlockConfigs(Array.from(t.childNodes),r)),this.currentEntity=null}},t._toContentBlocks=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.length-1,n=0;n<=r;n++){var o=t[n];o.parent=e,o.prevSibling=n>0?t[n-1].key:null,o.nextSibling=n<r?t[n+1].key:null,o.children=y(o.childConfigs.map((function(t){return t.key}))),this.contentBlocks.push(new u(i({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(t){var e=this;return y(t).flatMap((function(t){return"unstyled"!==t.type||""!==t.text?[t]:e._hoistContainersInBlockConfigs(t.childConfigs)}))},t._toFlatContentBlocks=function(t){var e=this;this._hoistContainersInBlockConfigs(t).forEach((function(t){var r=e._extractTextFromBlockConfigs(t.childConfigs),n=r.text,o=r.characterList;e.contentBlocks.push(new s(i({},t,{text:t.text+n,characterList:t.characterList.concat(o)})))}))},t._extractTextFromBlockConfigs=function(t){for(var e=t.length-1,r="",n=y(),i=0;i<=e;i++){var o=t[i];r+=o.text,n=n.concat(o.characterList),""!==r&&"unstyled"!==o.type&&(r+="\n",n=n.push(n.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);r+=a.text,n=n.concat(a.characterList)}return{text:r,characterList:n}},ContentBlocksBuilder}();t.exports=function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:h)(t=t.trim().replace(O,"").replace(M," ").replace(D,"").replace(I,""));if(!r)return null;var n=function(t){var e={};return t.mapKeys((function(t,r){var n=[r.element];void 0!==r.aliasedElements&&n.push.apply(n,r.aliasedElements),n.forEach((function(r){void 0===e[r]?e[r]=t:"string"==typeof e[r]?e[r]=[e[r],t]:e[r].push(t)}))})),m(e)}(e);return new U(n,(function(t,e){return"li"===t?"ol"===e?"ordered-list-item":"unordered-list-item":null})).addDOMNode(r).getContentBlocks()}},99607:(t,e,r)=>{"use strict";function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(38777),a=r(67953),s=r(66912),u=r(82222),c=r(68957),l=(r(12119),r(25110)),f=r(86019),p=r(67134),d=r(59672),h=r(25027),g=r(68642),v=r(43393),y=r(73759),m=g("draft_tree_data_support"),b=v.List,_=v.Map,S=v.OrderedMap,w=function(t,e){var r=t.key,n=t.type,i=t.data;return{text:t.text,depth:t.depth||0,type:n||"unstyled",key:r||h(),data:_(i),characterList:x(t,e)}},x=function(t,e){var r=t.text,i=t.entityRanges,o=t.inlineStyleRanges,a=i||[];return f(d(r,o||[]),p(r,a.filter((function(t){return e.hasOwnProperty(t.key)})).map((function(t){return n({},t,{key:e[t.key]})}))))},E=function(t){return n({},t,{key:t.key||h()})},O=function(t,e,r){var i=e.map((function(t){return n({},t,{parentRef:r})}));return t.concat(i.reverse())},C=function(t,e){var r=t.blocks.find((function(t){return Array.isArray(t.children)&&t.children.length>0})),i=m&&!r?c.fromRawStateToRawTreeState(t).blocks:t.blocks;if(!m)return function(t,e){return S(t.map((function(t){var r=new o(w(t,e));return[r.getKey(),r]})))}(r?c.fromRawTreeStateToRawState(t).blocks:i,e);var s=function(t,e){return t.map(E).reduce((function(r,i,o){Array.isArray(i.children)||y(!1);var s=i.children.map(E),u=new a(n({},w(i,e),{prevSibling:0===o?null:t[o-1].key,nextSibling:o===t.length-1?null:t[o+1].key,children:b(s.map((function(t){return t.key})))}));r=r.set(u.getKey(),u);for(var c=O([],s,u);c.length>0;){var l=c.pop(),f=l.parentRef,p=f.getChildKeys(),d=p.indexOf(l.key),h=Array.isArray(l.children);if(!h){h||y(!1);break}var g=l.children.map(E),v=new a(n({},w(l,e),{parent:f.getKey(),children:b(g.map((function(t){return t.key}))),prevSibling:0===d?null:p.get(d-1),nextSibling:d===p.size-1?null:p.get(d+1)}));r=r.set(v.getKey(),v),c=O(c,g,v)}return r}),S())}(i,e);return s};t.exports=function(t){Array.isArray(t.blocks)||y(!1);var e=function(t){var e=t.entityMap,r={};return Object.keys(e).forEach((function(t){var n=e[t],i=n.type,o=n.mutability,a=n.data;r[t]=u.__create(i,o,a||{})})),r}(t),r=C(t,e),n=r.isEmpty()?new l:l.createEmpty(r.first().getKey());return new s({blockMap:r,entityMap:e,selectionBefore:n,selectionAfter:n})}},86019:(t,e,r)=>{"use strict";var n=r(4516),i=r(43393).List;t.exports=function(t,e){var r=t.map((function(t,r){var i=e[r];return n.create({style:t,entity:i})}));return i(r)}},67134:(t,e,r)=>{"use strict";var n=r(38935).substr;t.exports=function(t,e){var r=Array(t.length).fill(null);return e&&e.forEach((function(e){for(var i=n(t,0,e.offset).length,o=i+n(t,e.offset,e.length).length,a=i;a<o;a++)r[a]=e.key})),r}},59672:(t,e,r)=>{"use strict";var n=r(38935),i=r(43393).OrderedSet,o=n.substr,a=i();t.exports=function(t,e){var r=Array(t.length).fill(a);return e&&e.forEach((function(e){for(var n=o(t,0,e.offset).length,i=n+o(t,e.offset,e.length).length;n<i;)r[n]=r[n].add(e.style),n++})),r}},99407:t=>{"use strict";t.exports={notEmptyKey:function(t){return null!=t&&""!=t}}},26396:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(4856),a=r(42128),s=r(42177),u=r(40258),c=r(22045),l=r(56926),f="'",p="/",d=o.isBrowser("Firefox");function h(t,e,r,o,a){var s=n.replaceText(t.getCurrentContent(),t.getSelection(),e,r,o);return i.push(t,s,"insert-characters",a)}t.exports=function(t,e){void 0!==t._pendingStateFromBeforeInput&&(t.update(t._pendingStateFromBeforeInput),t._pendingStateFromBeforeInput=void 0);var r=t._latestEditorState,n=e.data;if(n)if(t.props.handleBeforeInput&&s(t.props.handleBeforeInput(n,r,e.timeStamp)))e.preventDefault();else{var o=r.getSelection(),g=o.getStartOffset(),v=o.getAnchorKey();if(!o.isCollapsed())return e.preventDefault(),void t.update(h(r,n,r.getCurrentInlineStyle(),a(r.getCurrentContent(),r.getSelection()),!0));var y,m=h(r,n,r.getCurrentInlineStyle(),a(r.getCurrentContent(),r.getSelection()),!1),b=!1;if(b||(b=u(t._latestCommittedEditorState)),!b){var _=r.getBlockTree(v),S=m.getBlockTree(v);b=_.size!==S.size||_.zip(S).some((function(t){var e=t[0],r=t[1],i=e.get("start"),o=i+(i>=g?n.length:0),a=e.get("end"),s=a+(a>=g?n.length:0),u=r.get("start"),c=r.get("end"),l=r.get("decoratorKey");return e.get("decoratorKey")!==l||e.get("leaves").size!==r.get("leaves").size||o!==u||s!==c||null!=l&&c-u!=a-i}))}if(b||(y=n,b=d&&(y==f||y==p)),b||(b=c(m.getDirectionMap()).get(v)!==c(r.getDirectionMap()).get(v)),b)return e.preventDefault(),m=i.set(m,{forceSelection:!0}),void t.update(m);m=i.set(m,{nativelyRenderedContent:m.getCurrentContent()}),t._pendingStateFromBeforeInput=m,l((function(){void 0!==t._pendingStateFromBeforeInput&&(t.update(t._pendingStateFromBeforeInput),t._pendingStateFromBeforeInput=void 0)}))}}},43421:(t,e,r)=>{"use strict";var n=r(14289),i=r(67476),o=r(31003);t.exports=function(t,e){var r=e.currentTarget.ownerDocument;if(!Boolean(t.props.preserveSelectionOnBlur)&&o(r)===r.body){var a=r.defaultView.getSelection(),s=t.editor;1===a.rangeCount&&i(s,a.anchorNode)&&i(s,a.focusNode)&&a.removeAllRanges()}var u=t._latestEditorState,c=u.getSelection();if(c.getHasFocus()){var l=c.set("hasFocus",!1);t.props.onBlur&&t.props.onBlur(e),t.update(n.acceptSelection(u,l))}}},6155:(t,e,r)=>{"use strict";var n=r(14289);t.exports=function(t,e){t.setMode("composite"),t.update(n.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(e)}},69328:(t,e,r)=>{"use strict";var n=r(94882);t.exports=function(t,e){t._latestEditorState.getSelection().isCollapsed()?e.preventDefault():t.setClipboard(n(t._latestEditorState))}},88922:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(19051),a=r(94882),s=r(79749),u=r(80809);t.exports=function(t,e){var r,c=t._latestEditorState,l=c.getSelection(),f=e.target;if(l.isCollapsed())e.preventDefault();else{if(u(f)){var p=f;r=s(o.getScrollParent(p))}var d=a(c);t.setClipboard(d),t.setMode("cut"),setTimeout((function(){t.restoreEditorDOM(r),t.exitCurrentMode(),t.update(function(t){var e=n.removeRange(t.getCurrentContent(),t.getSelection(),"forward");return i.push(t,e,"remove-range")}(c))}),0)}}},39499:t=>{"use strict";t.exports=function(t,e){t.setMode("drag"),e.preventDefault()}},80981:t=>{"use strict";t.exports=function(t){t._internalDrag=!0,t.setMode("drag")}},62186:(t,e,r)=>{"use strict";var n=r(14289),i=r(4856);t.exports=function(t,e){var r=t._latestEditorState,o=r.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);t.props.onFocus&&t.props.onFocus(e),i.isBrowser("Chrome < 60.0.3081.0")?t.update(n.forceSelection(r,a)):t.update(n.acceptSelection(r,a))}}},29971:(t,e,r)=>{"use strict";var n=r(42307),i=r(22146),o=r(14289),a=r(4856),s=r(99407).notEmptyKey,u=r(69270),c=r(62800),l=r(22045),f=a.isEngine("Gecko"),p="\n\n";t.exports=function(t,e){void 0!==t._pendingStateFromBeforeInput&&(t.update(t._pendingStateFromBeforeInput),t._pendingStateFromBeforeInput=void 0);var r=t.editor.ownerDocument.defaultView.getSelection(),a=r.anchorNode,d=r.isCollapsed,h=(null==a?void 0:a.nodeType)!==Node.TEXT_NODE&&(null==a?void 0:a.nodeType)!==Node.ELEMENT_NODE;if(null!=a&&!h){if(a.nodeType===Node.TEXT_NODE&&(null!==a.previousSibling||null!==a.nextSibling)){var g=a.parentNode;if(null==g)return;a.nodeValue=g.textContent;for(var v=g.firstChild;null!=v;v=v.nextSibling)v!==a&&g.removeChild(v)}var y=a.textContent,m=t._latestEditorState,b=l(u(a)),_=i.decode(b),S=_.blockKey,w=_.decoratorKey,x=_.leafKey,E=m.getBlockTree(S).getIn([w,"leaves",x]),O=E.start,C=E.end,k=m.getCurrentContent(),M=k.getBlockForKey(S),D=M.getText().slice(O,C);if(y.endsWith(p)&&(y=y.slice(0,-1)),y!==D){var I,A,T,R,B=m.getSelection(),P=B.merge({anchorOffset:O,focusOffset:C,isBackward:!1}),z=M.getEntityAt(O),L=s(z)?k.getEntity(z):null,j="MUTABLE"===(null!=L?L.getMutability():null),N=j?"spellcheck-change":"apply-entity",K=n.replaceText(k,P,y,M.getInlineStyleAt(O),j?M.getEntityAt(O):null);if(f)I=r.anchorOffset,A=r.focusOffset,R=(T=O+Math.min(I,A))+Math.abs(I-A),I=T,A=R;else{var q=y.length-D.length;T=B.getStartOffset(),R=B.getEndOffset(),I=d?R+q:T,A=R+q}var F=K.merge({selectionBefore:k.getSelectionAfter(),selectionAfter:B.merge({anchorOffset:I,focusOffset:A})});t.update(o.push(m,F,N))}else{var U=e.nativeEvent.inputType;if(U){var G=function(t,e){return"deleteContentBackward"===t?c(e):e}(U,m);if(G!==m)return t.restoreEditorDOM(),void t.update(G)}}}}},46397:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(47387),a=r(25399),s=r(83751),u=r(4856),c=r(42177),l=r(49779),f=r(51050),p=r(13767),d=r(77978),h=r(67217),g=r(8425),v=r(62800),y=r(13998),m=r(53318),b=r(87051),_=o.isOptionKeyCommand,S=u.isBrowser("Chrome");t.exports=function(t,e){var r=e.which,o=t._latestEditorState;function u(r){var n=t.props[r];return!!n&&(n(e),!0)}switch(r){case a.RETURN:if(e.preventDefault(),t.props.handleReturn&&c(t.props.handleReturn(e,o)))return;break;case a.ESC:if(e.preventDefault(),u("onEscape"))return;break;case a.TAB:if(u("onTab"))return;break;case a.UP:if(u("onUpArrow"))return;break;case a.RIGHT:if(u("onRightArrow"))return;break;case a.DOWN:if(u("onDownArrow"))return;break;case a.LEFT:if(u("onLeftArrow"))return;break;case a.SPACE:S&&_(e)&&e.preventDefault()}var w=t.props.keyBindingFn(e);if(null!=w&&""!==w)if("undo"!==w){if(e.preventDefault(),!t.props.handleKeyCommand||!c(t.props.handleKeyCommand(w,o,e.timeStamp))){var x=function(t,e,r){switch(t){case"redo":return i.redo(e);case"delete":return y(e);case"delete-word":return p(e);case"backspace":return v(e);case"backspace-word":return f(e);case"backspace-to-start-of-line":return l(e,r);case"split-block":return d(e);case"transpose-characters":return m(e);case"move-selection-to-start-of-block":return g(e);case"move-selection-to-end-of-block":return h(e);case"secondary-cut":return s.cut(e);case"secondary-paste":return s.paste(e);default:return e}}(w,o,e);x!==o&&t.update(x)}}else b(e,o,t.update);else if(r===a.SPACE&&S&&_(e)){var E=n.replaceText(o.getCurrentContent(),o.getSelection()," ");t.update(i.push(o,E,"insert-characters"))}}},6089:(t,e,r)=>{"use strict";var n=r(10329),i=r(4516),o=r(44891),a=r(42307),s=r(45712),u=r(14289),c=r(41947),l=r(42128),f=r(21738),p=r(42177),d=r(44300);function h(t,e,r){var n=a.replaceWithFragment(t.getCurrentContent(),t.getSelection(),e);return u.push(t,n.set("entityMap",r),"insert-fragment")}t.exports=function(t,e){e.preventDefault();var r=new o(e.clipboardData);if(!r.isRichText()){var g=r.getFiles(),v=r.getText();if(g.length>0){if(t.props.handlePastedFiles&&p(t.props.handlePastedFiles(g)))return;return void f(g,(function(e){if(e=e||v){var r=t._latestEditorState,o=d(e),f=i.create({style:r.getCurrentInlineStyle(),entity:l(r.getCurrentContent(),r.getSelection())}),p=c.getCurrentBlockType(r),h=s.processText(o,f,p),g=n.createFromArray(h),y=a.replaceWithFragment(r.getCurrentContent(),r.getSelection(),g);t.update(u.push(r,y,"insert-fragment"))}}))}}var y=[],m=r.getText(),b=r.getHTML(),_=t._latestEditorState;if(t.props.formatPastedText){var S=t.props.formatPastedText(m,b);m=S.text,b=S.html}if(!t.props.handlePastedText||!p(t.props.handlePastedText(m,b,_))){if(m&&(y=d(m)),!t.props.stripPastedStyles){var w,x=t.getClipboard();if(!t.props.formatPastedText&&r.isRichText()&&x){if(-1!==(null===(w=b)||void 0===w?void 0:w.indexOf(t.getEditorKey()))||1===y.length&&1===x.size&&x.first().getText()===m)return void t.update(h(t._latestEditorState,x))}else if(x&&r.types.includes("com.apple.webarchive")&&!r.types.includes("text/html")&&function(t,e){return t.length===e.size&&e.valueSeq().every((function(e,r){return e.getText()===t[r]}))}(y,x))return void t.update(h(t._latestEditorState,x));if(b){var E=s.processHTML(b,t.props.blockRenderMap);if(E){var O=E.contentBlocks,C=E.entityMap;if(O){var k=n.createFromArray(O);return void t.update(h(t._latestEditorState,k,C))}}}t.setClipboard(null)}if(y.length){var M=i.create({style:_.getCurrentInlineStyle(),entity:l(_.getCurrentContent(),_.getSelection())}),D=c.getCurrentBlockType(_),I=s.processText(y,M,D),A=n.createFromArray(I);t.update(h(t._latestEditorState,A))}}}},14507:(t,e,r)=>{"use strict";var n=r(97432),i=r(14289),o=r(84907),a=r(1244);t.exports=function(t){if(t._blockSelectEvents||t._latestEditorState!==t.props.editorState){if(t._blockSelectEvents){var e=t.props.editorState.getSelection();n.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(e.toJS())})}}else{var r=t.props.editorState,s=a(r,o(t)),u=s.selectionState;u!==r.getSelection()&&(r=s.needsRecovery?i.forceSelection(r,u):i.acceptSelection(r,u),t.update(r))}}},56265:(t,e,r)=>{"use strict";var n=r(86155),i=r(38935).strlen;t.exports=function(t,e){var r=[];return t.findEntityRanges((function(t){return!!t.getEntity()}),(function(o,a){var s=t.getText(),u=t.getEntityAt(o);r.push({offset:i(s.slice(0,o)),length:i(s.slice(o,a)),key:Number(e[n.stringify(u)])})})),r}},31487:(t,e,r)=>{"use strict";var n=r(38935),i=r(29407),o=function(t,e){return t===e},a=function(t){return!!t},s=[];t.exports=function(t){var e=t.getCharacterList().map((function(t){return t.getStyle()})).toList(),r=e.flatten().toSet().map((function(r){return function(t,e,r){var s=[],u=e.map((function(t){return t.has(r)})).toList();return i(u,o,a,(function(e,i){var o=t.getText();s.push({offset:n.strlen(o.slice(0,e)),length:n.strlen(o.slice(e,i)),style:r})})),s}(t,e,r)}));return Array.prototype.concat.apply(s,r.toJS())}},88182:(t,e,r)=>{"use strict";var n=r(38935),i=r(75795),o=r(6092),a=r(73759);function s(t,e){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0;a<t.length;a++){var s=t[a];0!==s.width&&1!==s.width&&(r=Math.min(r,s.top),n=Math.min(n,s.bottom),i=Math.max(i,s.top),o=Math.max(o,s.bottom))}return i<=n&&i-r<e&&o-n<e}function u(t){switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return t.length;default:return t.childNodes.length}}t.exports=function(t){t.collapsed||a(!1);var e=(t=t.cloneRange()).startContainer;1!==e.nodeType&&(e=e.parentNode);var r=function(t){var e=getComputedStyle(t),r=i(t),n=r.createElement("div");n.style.fontFamily=e.fontFamily,n.style.fontSize=e.fontSize,n.style.fontStyle=e.fontStyle,n.style.fontWeight=e.fontWeight,n.style.lineHeight=e.lineHeight,n.style.position="absolute",n.textContent="M";var o=r.body;o||a(!1),o.appendChild(n);var s=n.getBoundingClientRect();return o.removeChild(n),s.height}(e),c=t.endContainer,l=t.endOffset;for(t.setStart(t.startContainer,0);s(o(t),r)&&(c=t.startContainer,l=t.startOffset,c.parentNode||a(!1),t.setStartBefore(c),1!==c.nodeType||"inline"===getComputedStyle(c).display););for(var f=c,p=l-1;;){for(var d=f.nodeValue,h=p;h>=0;h--)if(!(null!=d&&h>0&&n.isSurrogatePair(d,h-1))){if(t.setStart(f,h),!s(o(t),r))break;c=f,l=h}if(-1===h||0===f.childNodes.length)break;p=u(f=f.childNodes[h])}return t.setStart(c,l),t}},69270:(t,e,r)=>{"use strict";var n=r(75795),i=r(93578);t.exports=function(t){for(var e=t;e&&e!==n(t).documentElement;){var r=i(e);if(null!=r)return r;e=e.parentNode}return null}},29407:t=>{"use strict";t.exports=function(t,e,r,n){if(t.size){var i=0;t.reduce((function(t,o,a){return e(t,o)||(r(t)&&n(i,a),i=a),o})),r(t.last())&&n(i,t.count())}}},25027:t=>{"use strict";var e={},r=Math.pow(2,24);t.exports=function(){for(var t;void 0===t||e.hasOwnProperty(t)||!isNaN(+t);)t=Math.floor(Math.random()*r).toString(32);return e[t]=!0,t}},81446:(t,e,r)=>{"use strict";var n=r(5195),i=r(64994),o=r(73759);function a(t,e,r,a,s,u,c){var l=r.getStartOffset(),f=r.getEndOffset(),p=t.__get(s).getMutability(),d=c?l:f;if("MUTABLE"===p)return r;var h=i(e,s).filter((function(t){return d<=t.end&&d>=t.start}));1!=h.length&&o(!1);var g=h[0];if("IMMUTABLE"===p)return r.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1});u||(c?f=g.end:l=g.start);var v=n.getRemovalRange(l,f,e.getText().slice(g.start,g.end),g.start,a);return r.merge({anchorOffset:v.start,focusOffset:v.end,isBackward:!1})}t.exports=function(t,e,r,n,i){var o=n.getStartOffset(),s=n.getEndOffset(),u=e.getEntityAt(o),c=r.getEntityAt(s-1);if(!u&&!c)return n;var l=n;if(u&&u===c)l=a(t,e,l,i,u,!0,!0);else if(u&&c){var f=a(t,e,l,i,u,!1,!0),p=a(t,r,l,i,c,!1,!1);l=l.merge({anchorOffset:f.getAnchorOffset(),focusOffset:p.getFocusOffset(),isBackward:!1})}else if(u){var d=a(t,e,l,i,u,!1,!0);l=l.merge({anchorOffset:d.getStartOffset(),isBackward:!1})}else if(c){var h=a(t,r,l,i,c,!1,!1);l=l.merge({focusOffset:h.getEndOffset(),isBackward:!1})}return l}},84907:(t,e,r)=>{"use strict";var n=r(73759),i=r(20717);t.exports=function(t){var e=t.editorContainer;return e||n(!1),i(e.firstChild)||n(!1),e.firstChild}},88687:(t,e,r)=>{"use strict";var n=r(98555),i=r(14017);t.exports=function(t,e){var r=e.getStartKey(),o=e.getStartOffset(),a=e.getEndKey(),s=e.getEndOffset(),u=i(t,e).getBlockMap(),c=u.keySeq(),l=c.indexOf(r),f=c.indexOf(a)+1;return n(u.slice(l,f).map((function(t,e){var n=t.getText(),i=t.getCharacterList();return r===a?t.merge({text:n.slice(o,s),characterList:i.slice(o,s)}):e===r?t.merge({text:n.slice(o),characterList:i.slice(o)}):e===a?t.merge({text:n.slice(0,s),characterList:i.slice(0,s)}):t})))}},75795:t=>{"use strict";t.exports=function(t){return t&&t.ownerDocument?t.ownerDocument:document}},41714:(t,e,r)=>{"use strict";var n=r(47387),i=r(25399),o=r(4856),a=o.isPlatform("Mac OS X"),s=a&&o.isBrowser("Firefox < 29"),u=n.hasCommandModifier,c=n.isCtrlKeyCommand;function l(t){return a&&t.altKey||c(t)}t.exports=function(t){switch(t.keyCode){case 66:return u(t)?"bold":null;case 68:return c(t)?"delete":null;case 72:return c(t)?"backspace":null;case 73:return u(t)?"italic":null;case 74:return u(t)?"code":null;case 75:return a&&c(t)?"secondary-cut":null;case 77:case 79:return c(t)?"split-block":null;case 84:return a&&c(t)?"transpose-characters":null;case 85:return u(t)?"underline":null;case 87:return a&&c(t)?"backspace-word":null;case 89:return c(t)?a?"secondary-paste":"redo":null;case 90:return function(t){return u(t)?t.shiftKey?"redo":"undo":null}(t)||null;case i.RETURN:return"split-block";case i.DELETE:return function(t){return!a&&t.shiftKey?null:l(t)?"delete-word":"delete"}(t);case i.BACKSPACE:return function(t){return u(t)&&a?"backspace-to-start-of-line":l(t)?"backspace-word":"backspace"}(t);case i.LEFT:return s&&u(t)?"move-selection-to-start-of-block":null;case i.RIGHT:return s&&u(t)?"move-selection-to-end-of-block":null;default:return null}}},1244:(t,e,r)=>{"use strict";var n=r(8101);t.exports=function(t,e){var r=e.ownerDocument.defaultView.getSelection(),i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,s=r.focusOffset;return 0===r.rangeCount||null==i||null==a?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:n(t,e,i,o,a,s)}},8101:(t,e,r)=>{"use strict";var n=r(69270),i=r(93578),o=r(94486),a=r(73759),s=r(84368),u=r(22045);function c(t,e,r){var o=e,c=n(o);(null!=c||t&&(t===o||t.firstChild===o)||a(!1),t===o)&&(o=o.firstChild,s(o)||a(!1),"true"!==(o=o).getAttribute("data-contents")&&a(!1),r>0&&(r=o.childNodes.length));if(0===r){var f=null;if(null!=c)f=c;else{var p=function(t){for(;t.firstChild&&(s(t.firstChild)&&"true"===t.firstChild.getAttribute("data-blocks")||i(t.firstChild));)t=t.firstChild;return t}(o);f=u(i(p))}return{key:f,offset:0}}var d=o.childNodes[r-1],h=null,g=null;if(i(d)){var v=function(t){for(;t.lastChild&&(s(t.lastChild)&&"true"===t.lastChild.getAttribute("data-blocks")||i(t.lastChild));)t=t.lastChild;return t}(d);h=u(i(v)),g=l(v)}else h=u(c),g=l(d);return{key:h,offset:g}}function l(t){var e=t.textContent;return"\n"===e?0:e.length}t.exports=function(t,e,r,i,a,s){var l=r.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(l&&f)return{selectionState:o(t,u(n(r)),i,u(n(a)),s),needsRecovery:!1};var p=null,d=null,h=!0;return l?(p={key:u(n(r)),offset:i},d=c(e,a,s)):f?(d={key:u(n(a)),offset:s},p=c(e,r,i)):(p=c(e,r,i),d=c(e,a,s),r===a&&i===s&&(h=!!r.firstChild&&"BR"!==r.firstChild.nodeName)),{selectionState:o(t,p.key,p.offset,d.key,d.offset),needsRecovery:h}}},42128:(t,e,r)=>{"use strict";var n=r(99407).notEmptyKey;function i(t,e){return n(e)&&"MUTABLE"===t.__get(e).getMutability()?e:null}t.exports=function(t,e){var r;if(e.isCollapsed()){var n=e.getAnchorKey(),o=e.getAnchorOffset();return o>0?(r=t.getBlockForKey(n).getEntityAt(o-1))!==t.getBlockForKey(n).getEntityAt(o)?null:i(t.getEntityMap(),r):null}var a=e.getStartKey(),s=e.getStartOffset(),u=t.getBlockForKey(a);return r=s===u.getLength()?null:u.getEntityAt(s),i(t.getEntityMap(),r)}},94882:(t,e,r)=>{"use strict";var n=r(88687);t.exports=function(t){var e=t.getSelection();return e.isCollapsed()?null:n(t.getCurrentContent(),e)}},39506:(t,e,r)=>{"use strict";var n=r(67953);t.exports=function(t,e){if(!(t instanceof n))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=e.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?e.get(a):null}return o?o.getNextSiblingKey():null}},96495:t=>{"use strict";t.exports=function(t){return Object.keys(t).map((function(e){return t[e]}))}},98056:(t,e,r)=>{"use strict";var n=r(6092);t.exports=function(t){var e=n(t),r=0,i=0,o=0,a=0;if(e.length){if(e.length>1&&0===e[0].width){var s=e[1];r=s.top,i=s.right,o=s.bottom,a=s.left}else{var u=e[0];r=u.top,i=u.right,o=u.bottom,a=u.left}for(var c=1;c<e.length;c++){var l=e[c];0!==l.height&&0!==l.width&&(r=Math.min(r,l.top),i=Math.max(i,l.right),o=Math.max(o,l.bottom),a=Math.min(a,l.left))}}return{top:r,right:i,bottom:o,left:a,width:i-a,height:o-r}}},6092:(t,e,r)=>{"use strict";var n=r(4856),i=r(73759);var o=n.isBrowser("Chrome")?function(t){for(var e=t.cloneRange(),r=[],n=t.endContainer;null!=n;n=n.parentNode){var o=n===t.commonAncestorContainer;o?e.setStart(t.startContainer,t.startOffset):e.setStart(e.endContainer,0);var a,s=Array.from(e.getClientRects());if(r.push(s),o)return r.reverse(),(a=[]).concat.apply(a,r);e.setEndBefore(n)}i(!1)}:function(t){return Array.from(t.getClientRects())};t.exports=o},64994:(t,e,r)=>{"use strict";var n=r(73759);t.exports=function(t,e){var r=[];return t.findEntityRanges((function(t){return t.getEntity()===e}),(function(t,e){r.push({start:t,end:e})})),r.length||n(!1),r}},69769:(t,e,r)=>{"use strict";var n=r(4856),i=r(73759),o=n.isBrowser("IE <= 9");t.exports=function(t){var e,r=null;return!o&&document.implementation&&document.implementation.createHTMLDocument&&((e=document.implementation.createHTMLDocument("foo")).documentElement||i(!1),e.documentElement.innerHTML=t,r=e.getElementsByTagName("body")[0]),r}},93578:(t,e,r)=>{"use strict";var n=r(84368);t.exports=function t(e){if(n(e)){var r=e,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}},21738:(t,e,r)=>{"use strict";var n=r(73759),i=/\.textClipping$/,o={"text/plain":!0,"text/html":!0,"text/rtf":!0},a=5e3;t.exports=function(t,e){var s=0,u=[];t.forEach((function(c){!function(t,e){if(!r.g.FileReader||t.type&&!(t.type in o))return void e("");if(""===t.type){var a="";return i.test(t.name)&&(a=t.name.replace(i,"")),void e(a)}var s=new FileReader;s.onload=function(){var t=s.result;"string"!=typeof t&&n(!1),e(t)},s.onerror=function(){e("")},s.readAsText(t)}(c,(function(r){s++,r&&u.push(r.slice(0,a)),s==t.length&&e(u.join("\r"))}))}))}},94486:(t,e,r)=>{"use strict";var n=r(22146),i=r(22045);t.exports=function(t,e,r,o,a){var s=i(t.getSelection());if(!e||!o)return s;var u=n.decode(e),c=u.blockKey,l=t.getBlockTree(c),f=l&&l.getIn([u.decoratorKey,"leaves",u.leafKey]),p=n.decode(o),d=p.blockKey,h=t.getBlockTree(d),g=h&&h.getIn([p.decoratorKey,"leaves",p.leafKey]);if(!f||!g)return s;var v=f.get("start"),y=g.get("start"),m=f?v+r:null,b=g?y+a:null;if(s.getAnchorKey()===c&&s.getAnchorOffset()===m&&s.getFocusKey()===d&&s.getFocusOffset()===b)return s;var _=!1;if(c===d){var S=f.get("end"),w=g.get("end");_=y===v&&w===S?a<r:y<v}else{_=t.getCurrentContent().getBlockMap().keySeq().skipUntil((function(t){return t===c||t===d})).first()===d}return s.merge({anchorKey:c,anchorOffset:m,focusKey:d,focusOffset:b,isBackward:_})}},96629:(t,e,r)=>{"use strict";var n=r(98056);t.exports=function(t){var e=t.getSelection();if(!e.rangeCount)return null;var r=e.getRangeAt(0),i=n(r),o=i.top,a=i.right,s=i.bottom,u=i.left;return 0===o&&0===a&&0===s&&0===u?null:i}},48083:t=>{"use strict";t.exports=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}},68642:t=>{"use strict";t.exports=function(t){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[t]}},54542:(t,e,r)=>{"use strict";var n=r(10329),i=r(67953),o=r(43393),a=r(40779),s=r(73759),u=r(98555),c=o.List,l=function(t,e,r,o,a,s){var u=r.first()instanceof i,l=[],f=o.size,p=r.get(a),d=o.first(),h=o.last(),g=h.getLength(),v=h.getKey(),y=u&&(!p.getChildKeys().isEmpty()||!d.getChildKeys().isEmpty());r.forEach((function(t,e){e===a?(y?l.push(t):l.push(function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.slice(0,e),a=i.slice(0,e),s=r.first();return t.merge({text:o+s.getText(),characterList:a.concat(s.getCharacterList()),type:o?t.getType():s.getType(),data:s.getData()})}(t,s,o)),o.slice(y?0:1,f-1).forEach((function(t){return l.push(t)})),l.push(function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.length,a=n.slice(e,o),s=i.slice(e,o),u=r.last();return u.merge({text:u.getText()+a,characterList:u.getCharacterList().concat(s),data:u.getData()})}(t,s,o))):l.push(t)}));var m=n.createFromArray(l);return u&&(m=function(t,e,r,n){return t.withMutations((function(e){var i=r.getKey(),o=n.getKey(),a=r.getNextSiblingKey(),s=r.getParentKey(),u=function(t,e){var r=t.getKey(),n=t,i=[];for(e.get(r)&&i.push(r);n&&n.getNextSiblingKey();){var o=n.getNextSiblingKey();if(!o)break;i.push(o),n=e.get(o)}return i}(n,t),l=u[u.length-1];if(e.get(o)?(e.setIn([i,"nextSibling"],o),e.setIn([o,"prevSibling"],i)):(e.setIn([i,"nextSibling"],n.getNextSiblingKey()),e.setIn([n.getNextSiblingKey(),"prevSibling"],i)),e.setIn([l,"nextSibling"],a),a&&e.setIn([a,"prevSibling"],l),u.forEach((function(t){return e.setIn([t,"parent"],s)})),s){var f=t.get(s).getChildKeys(),p=f.indexOf(i)+1,d=f.toArray();d.splice.apply(d,[p,0].concat(u)),e.setIn([s,"children"],c(d))}}))}(m,0,p,d)),t.merge({blockMap:m,selectionBefore:e,selectionAfter:e.merge({anchorKey:v,anchorOffset:g,focusKey:v,focusOffset:g,isBackward:!1})})};t.exports=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";e.isCollapsed()||s(!1);var o=t.getBlockMap(),c=u(r),f=e.getStartKey(),p=e.getStartOffset(),d=o.get(f);return d instanceof i&&(d.getChildKeys().isEmpty()||s(!1)),1===c.size?function(t,e,r,n,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",u=r.get(i),c=u.getText(),l=u.getCharacterList(),f=i,p=o+n.getText().length,d=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":d=n.getData().merge(u.getData());break;case"REPLACE_WITH_NEW_DATA":d=n.getData()}var h=u.getType();c&&"unstyled"===h&&(h=n.getType());var g=u.merge({text:c.slice(0,o)+n.getText()+c.slice(o),characterList:a(l,n.getCharacterList(),o),type:h,data:d});return t.merge({blockMap:r.set(i,g),selectionBefore:e,selectionAfter:e.merge({anchorKey:f,anchorOffset:p,focusKey:f,focusOffset:p,isBackward:!1})})}(t,e,o,c.first(),f,p,n):l(t,e,o,c,f,p)}},40779:t=>{"use strict";t.exports=function(t,e,r){var n=t;if(r===n.count())e.forEach((function(t){n=n.push(t)}));else if(0===r)e.reverse().forEach((function(t){n=n.unshift(t)}));else{var i=n.slice(0,r),o=n.slice(r);n=i.concat(e,o).toList()}return n}},18467:(t,e,r)=>{"use strict";var n=r(43393),i=r(40779),o=r(73759),a=n.Repeat;t.exports=function(t,e,r,n){e.isCollapsed()||o(!1);var s=null;if(null!=r&&(s=r.length),null==s||0===s)return t;var u=t.getBlockMap(),c=e.getStartKey(),l=e.getStartOffset(),f=u.get(c),p=f.getText(),d=f.merge({text:p.slice(0,l)+r+p.slice(l,f.getLength()),characterList:i(f.getCharacterList(),a(n,s).toList(),l)}),h=l+s;return t.merge({blockMap:u.set(c,d),selectionAfter:e.merge({anchorOffset:h,focusOffset:h})})}},84368:t=>{"use strict";t.exports=function(t){return!(!t||!t.ownerDocument)&&t.nodeType===Node.ELEMENT_NODE}},42177:t=>{"use strict";t.exports=function(t){return"handled"===t||!0===t}},78241:(t,e,r)=>{"use strict";var n=r(84368);t.exports=function(t){return!(!t||!t.ownerDocument)&&(n(t)&&"A"===t.nodeName)}},16581:(t,e,r)=>{"use strict";var n=r(84368);t.exports=function(t){return!(!t||!t.ownerDocument)&&(n(t)&&"BR"===t.nodeName)}},20717:t=>{"use strict";t.exports=function(t){return!(!t||!t.ownerDocument)&&(t.ownerDocument.defaultView?t instanceof t.ownerDocument.defaultView.HTMLElement:t instanceof HTMLElement)}},35039:(t,e,r)=>{"use strict";var n=r(84368);t.exports=function(t){return!(!t||!t.ownerDocument)&&(n(t)&&"IMG"===t.nodeName)}},80809:t=>{"use strict";t.exports=function(t){if(!t||!("ownerDocument"in t))return!1;if("ownerDocument"in t){var e=t;if(!e.ownerDocument.defaultView)return e instanceof Node;if(e instanceof e.ownerDocument.defaultView.Node)return!0}return!1}},40258:t=>{"use strict";t.exports=function(t){var e=t.getSelection(),r=e.getAnchorKey(),n=t.getBlockTree(r),i=e.getStartOffset(),o=!1;return n.some((function(t){return i===t.get("start")?(o=!0,!0):i<t.get("end")&&t.get("leaves").some((function(t){var e=t.get("start");return i===e&&(o=!0,!0)}))})),o}},17797:(t,e,r)=>{"use strict";var n=r(25399);t.exports=function(t){return t.which===n.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))}},49779:(t,e,r)=>{"use strict";var n=r(14289),i=r(88182),o=r(8101),a=r(53268),s=r(14730);t.exports=function(t,e){var r=s(t,(function(t){var r=t.getSelection();if(r.isCollapsed()&&0===r.getAnchorOffset())return a(t,1);var n=e.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return n=i(n),o(t,null,n.endContainer,n.endOffset,n.startContainer,n.startOffset).selectionState}),"backward");return r===t.getCurrentContent()?t:n.push(t,r,"remove-range")}},51050:(t,e,r)=>{"use strict";var n=r(73932),i=r(14289),o=r(53268),a=r(14730);t.exports=function(t){var e=a(t,(function(t){var e=t.getSelection(),r=e.getStartOffset();if(0===r)return o(t,1);var i=e.getStartKey(),a=t.getCurrentContent().getBlockForKey(i).getText().slice(0,r),s=n.getBackward(a);return o(t,s.length||1)}),"backward");return e===t.getCurrentContent()?t:i.push(t,e,"remove-range")}},13767:(t,e,r)=>{"use strict";var n=r(73932),i=r(14289),o=r(19417),a=r(14730);t.exports=function(t){var e=a(t,(function(t){var e=t.getSelection(),r=e.getStartOffset(),i=e.getStartKey(),a=t.getCurrentContent().getBlockForKey(i).getText().slice(r),s=n.getForward(a);return o(t,s.length||1)}),"forward");return e===t.getCurrentContent()?t:i.push(t,e,"remove-range")}},77978:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289);t.exports=function(t){var e=n.splitBlock(t.getCurrentContent(),t.getSelection());return i.push(t,e,"split-block")}},67217:(t,e,r)=>{"use strict";var n=r(14289);t.exports=function(t){var e=t.getSelection(),r=e.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return n.set(t,{selection:e.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}},8425:(t,e,r)=>{"use strict";var n=r(14289);t.exports=function(t){var e=t.getSelection(),r=e.getStartKey();return n.set(t,{selection:e.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}},62800:(t,e,r)=>{"use strict";var n=r(14289),i=r(38935),o=r(53268),a=r(14730);t.exports=function(t){var e=a(t,(function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=e.getAnchorKey(),a=e.getAnchorOffset(),s=r.getBlockForKey(n).getText()[a-1];return o(t,s?i.getUTF16Length(s,0):1)}),"backward");if(e===t.getCurrentContent())return t;var r=t.getSelection();return n.push(t,e.set("selectionBefore",r),r.isCollapsed()?"backspace-character":"remove-range")}},13998:(t,e,r)=>{"use strict";var n=r(14289),i=r(38935),o=r(19417),a=r(14730);t.exports=function(t){var e=a(t,(function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=e.getAnchorKey(),a=e.getAnchorOffset(),s=r.getBlockForKey(n).getText()[a];return o(t,s?i.getUTF16Length(s,0):1)}),"forward");if(e===t.getCurrentContent())return t;var r=t.getSelection();return n.push(t,e.set("selectionBefore",r),r.isCollapsed()?"delete-character":"remove-range")}},53318:(t,e,r)=>{"use strict";var n=r(42307),i=r(14289),o=r(88687);t.exports=function(t){var e=t.getSelection();if(!e.isCollapsed())return t;var r=e.getAnchorOffset();if(0===r)return t;var a,s,u=e.getAnchorKey(),c=t.getCurrentContent(),l=c.getBlockForKey(u).getLength();if(l<=1)return t;r===l?(a=e.set("anchorOffset",r-1),s=e):s=(a=e.set("focusOffset",r+1)).set("anchorOffset",r+1);var f=o(c,a),p=n.removeRange(c,a,"backward"),d=p.getSelectionAfter(),h=d.getAnchorOffset()-1,g=d.merge({anchorOffset:h,focusOffset:h}),v=n.replaceWithFragment(p,g,f),y=i.push(t,v,"insert-fragment");return i.acceptSelection(y,s)}},87051:(t,e,r)=>{"use strict";var n=r(14289);t.exports=function(t,e,r){var i=n.undo(e);if("spellcheck-change"!==e.getLastChangeType())t.preventDefault(),e.getNativelyRenderedContent()?(r(n.set(e,{nativelyRenderedContent:null})),setTimeout((function(){r(i)}),0)):r(i);else{var o=i.getCurrentContent();r(n.set(i,{nativelyRenderedContent:o}))}}},57429:(t,e,r)=>{"use strict";var n=r(43393).Map;t.exports=function(t,e,r){var i=e.getStartKey(),o=e.getEndKey(),a=t.getBlockMap(),s=a.toSeq().skipUntil((function(t,e){return e===i})).takeUntil((function(t,e){return e===o})).concat(n([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(s),selectionBefore:e,selectionAfter:e})}},61173:(t,e,r)=>{"use strict";var n=r(67953),i=r(39506),o=r(43393),a=r(73759),s=o.OrderedMap,u=o.List,c=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}},l=function(t,e,r,n,i){if(!i)return t;var o="after"===n,a=e.getKey(),s=r.getKey(),l=e.getParentKey(),f=e.getNextSiblingKey(),p=e.getPrevSiblingKey(),d=r.getParentKey(),h=o?r.getNextSiblingKey():s,g=o?s:r.getPrevSiblingKey();return t.withMutations((function(t){c(l,t,(function(t){var e=t.getChildKeys();return t.merge({children:e.delete(e.indexOf(a))})})),c(p,t,(function(t){return t.merge({nextSibling:f})})),c(f,t,(function(t){return t.merge({prevSibling:p})})),c(h,t,(function(t){return t.merge({prevSibling:a})})),c(g,t,(function(t){return t.merge({nextSibling:a})})),c(d,t,(function(t){var e=t.getChildKeys(),r=e.indexOf(s),n=o?r+1:0!==r?r-1:0,i=e.toArray();return i.splice(n,0,a),t.merge({children:u(i)})})),c(a,t,(function(t){return t.merge({nextSibling:h,prevSibling:g,parent:d})}))}))};t.exports=function(t,e,r,o){"replace"===o&&a(!1);var u=r.getKey(),c=e.getKey();c===u&&a(!1);var f=t.getBlockMap(),p=e instanceof n,d=[e],h=f.delete(c);p&&(d=[],h=f.withMutations((function(t){var r=e.getNextSiblingKey(),n=i(e,t);t.toSeq().skipUntil((function(t){return t.getKey()===c})).takeWhile((function(t){var e=t.getKey(),i=e===c,o=r&&e!==r,a=!r&&t.getParentKey()&&(!n||e!==n);return!!(i||o||a)})).forEach((function(e){d.push(e),t.delete(e.getKey())}))})));var g=h.toSeq().takeUntil((function(t){return t===r})),v=h.toSeq().skipUntil((function(t){return t===r})).skip(1),y=d.map((function(t){return[t.getKey(),t]})),m=s();if("before"===o){var b=t.getBlockBefore(u);b&&b.getKey()===e.getKey()&&a(!1),m=g.concat([].concat(y,[[u,r]]),v).toOrderedMap()}else if("after"===o){var _=t.getBlockAfter(u);_&&_.getKey()===c&&a(!1),m=g.concat([[u,r]].concat(y),v).toOrderedMap()}return t.merge({blockMap:l(m,e,r,o,p),selectionBefore:t.getSelectionAfter(),selectionAfter:t.getSelectionAfter().merge({anchorKey:c,focusKey:c})})}},53268:(t,e,r)=>{"use strict";r(63620);t.exports=function(t,e){var r=t.getSelection(),n=t.getCurrentContent(),i=r.getStartKey(),o=r.getStartOffset(),a=i,s=0;if(e>o){var u=n.getKeyBefore(i);if(null==u)a=i;else a=u,s=n.getBlockForKey(u).getText().length}else s=o-e;return r.merge({focusKey:a,focusOffset:s,isBackward:!0})}},19417:(t,e,r)=>{"use strict";r(63620);t.exports=function(t,e){var r,n=t.getSelection(),i=n.getStartKey(),o=n.getStartOffset(),a=t.getCurrentContent(),s=i;return e>a.getBlockForKey(i).getText().length-o?(s=a.getKeyAfter(i),r=0):r=o+e,n.merge({focusKey:s,focusOffset:r})}},98555:(t,e,r)=>{"use strict";var n=r(67953),i=r(25027),o=r(43393).OrderedMap;t.exports=function(t){return t.first()instanceof n?function(t){var e,r={};return o(t.withMutations((function(t){t.forEach((function(n,o){var a=n.getKey(),s=n.getNextSiblingKey(),u=n.getPrevSiblingKey(),c=n.getChildKeys(),l=n.getParentKey(),f=i();if(r[a]=f,s&&(t.get(s)?t.setIn([s,"prevSibling"],f):t.setIn([a,"nextSibling"],null)),u&&(t.get(u)?t.setIn([u,"nextSibling"],f):t.setIn([a,"prevSibling"],null)),l&&t.get(l)){var p=t.get(l).getChildKeys();t.setIn([l,"children"],p.set(p.indexOf(n.getKey()),f))}else t.setIn([a,"parent"],null),e&&(t.setIn([e.getKey(),"nextSibling"],f),t.setIn([a,"prevSibling"],r[e.getKey()])),e=t.get(a);c.forEach((function(e){t.get(e)?t.setIn([e,"parent"],f):t.setIn([a,"children"],n.getChildKeys().filter((function(t){return t!==e})))}))}))})).toArray().map((function(t){return[r[t.getKey()],t.set("key",r[t.getKey()])]})))}(t):function(t){return o(t.toArray().map((function(t){var e=i();return[e,t.set("key",e)]})))}(t)}},14017:(t,e,r)=>{"use strict";var n=r(4516),i=r(29407),o=r(73759);function a(t,e,r){var a=e.getCharacterList(),s=r>0?a.get(r-1):void 0,u=r<a.count()?a.get(r):void 0,c=s?s.getEntity():void 0,l=u?u.getEntity():void 0;if(l&&l===c&&"MUTABLE"!==t.__get(l).getMutability()){for(var f,p=function(t,e,r){var n;return i(t,(function(t,e){return t.getEntity()===e.getEntity()}),(function(t){return t.getEntity()===e}),(function(t,e){t<=r&&e>=r&&(n={start:t,end:e})})),"object"!=typeof n&&o(!1),n}(a,l,r),d=p.start,h=p.end;d<h;)f=a.get(d),a=a.set(d,n.applyEntity(f,null)),d++;return e.set("characterList",a)}return e}t.exports=function(t,e){var r=t.getBlockMap(),n=t.getEntityMap(),i={},o=e.getStartKey(),s=e.getStartOffset(),u=r.get(o),c=a(n,u,s);c!==u&&(i[o]=c);var l=e.getEndKey(),f=e.getEndOffset(),p=r.get(l);o===l&&(p=c);var d=a(n,p,f);return d!==p&&(i[l]=d),Object.keys(i).length?t.merge({blockMap:r.merge(i),selectionAfter:e}):t.set("selectionAfter",e)}},54879:(t,e,r)=>{"use strict";var n=r(67953),i=r(39506),o=r(43393),a=(o.List,o.Map),s=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}},u=function(t,e){var r=[];if(!t)return r;for(var n=e.get(t);n&&n.getParentKey();){var i=n.getParentKey();i&&r.push(i),n=i?e.get(i):null}return r},c=function(t,e,r){if(!t)return null;for(var n=r.get(t.getKey()).getNextSiblingKey();n&&!e.get(n);)n=r.get(n).getNextSiblingKey()||null;return n},l=function(t,e,r){if(!t)return null;for(var n=r.get(t.getKey()).getPrevSiblingKey();n&&!e.get(n);)n=r.get(n).getPrevSiblingKey()||null;return n},f=function(t,e,r,n){return t.withMutations((function(o){if(s(e.getKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:l(t,o,n)})})),s(r.getKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:l(t,o,n)})})),u(e.getKey(),n).forEach((function(t){return s(t,o,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return o.get(t)})),nextSibling:c(t,o,n),prevSibling:l(t,o,n)})}))})),s(e.getNextSiblingKey(),o,(function(t){return t.merge({prevSibling:e.getPrevSiblingKey()})})),s(e.getPrevSiblingKey(),o,(function(t){return t.merge({nextSibling:c(t,o,n)})})),s(r.getNextSiblingKey(),o,(function(t){return t.merge({prevSibling:l(t,o,n)})})),s(r.getPrevSiblingKey(),o,(function(t){return t.merge({nextSibling:r.getNextSiblingKey()})})),u(r.getKey(),n).forEach((function(t){s(t,o,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return o.get(t)})),nextSibling:c(t,o,n),prevSibling:l(t,o,n)})}))})),function(t,e){var r=[];if(!t)return r;for(var n=i(t,e);n&&e.get(n);){var o=e.get(n);r.push(n),n=o.getParentKey()?i(o,e):null}return r}(r,n).forEach((function(t){return s(t,o,(function(t){return t.merge({nextSibling:c(t,o,n),prevSibling:l(t,o,n)})}))})),null==t.get(e.getKey())&&null!=t.get(r.getKey())&&r.getParentKey()===e.getKey()&&null==r.getPrevSiblingKey()){var a=e.getPrevSiblingKey();s(r.getKey(),o,(function(t){return t.merge({prevSibling:a})})),s(a,o,(function(t){return t.merge({nextSibling:r.getKey()})}));var f=a?t.get(a):null,p=f?f.getParentKey():null;if(e.getChildKeys().forEach((function(t){s(t,o,(function(t){return t.merge({parent:p})}))})),null!=p){var d=t.get(p);s(p,o,(function(t){return t.merge({children:d.getChildKeys().concat(e.getChildKeys())})}))}s(e.getChildKeys().find((function(e){return null===t.get(e).getNextSiblingKey()})),o,(function(t){return t.merge({nextSibling:e.getNextSiblingKey()})}))}}))},p=function(t,e,r){if(0===e)for(;e<r;)t=t.shift(),e++;else if(r===t.count())for(;r>e;)t=t.pop(),r--;else{var n=t.slice(0,e),i=t.slice(r);t=n.concat(i).toList()}return t};t.exports=function(t,e){if(e.isCollapsed())return t;var r,o=t.getBlockMap(),s=e.getStartKey(),c=e.getStartOffset(),l=e.getEndKey(),d=e.getEndOffset(),h=o.get(s),g=o.get(l),v=h instanceof n,y=[];if(v){var m=g.getChildKeys(),b=u(l,o);g.getNextSiblingKey()&&(y=y.concat(b)),m.isEmpty()||(y=y.concat(b.concat([l]))),y=y.concat(u(i(g,o),o))}r=h===g?p(h.getCharacterList(),c,d):h.getCharacterList().slice(0,c).concat(g.getCharacterList().slice(d));var _=h.merge({text:h.getText().slice(0,c)+g.getText().slice(d),characterList:r}),S=v&&0===c&&0===d&&g.getParentKey()===s&&null==g.getPrevSiblingKey()?a([[s,null]]):o.toSeq().skipUntil((function(t,e){return e===s})).takeUntil((function(t,e){return e===l})).filter((function(t,e){return-1===y.indexOf(e)})).concat(a([[l,null]])).map((function(t,e){return e===s?_:null})),w=o.merge(S).filter((function(t){return!!t}));return v&&h!==g&&(w=f(w,h,g,o)),t.merge({blockMap:w,selectionBefore:e,selectionAfter:e.merge({anchorKey:s,anchorOffset:c,focusKey:s,focusOffset:c,isBackward:!1})})}},14730:(t,e,r)=>{"use strict";var n=r(42307),i=r(68642)("draft_tree_data_support");t.exports=function(t,e,r){var o=t.getSelection(),a=t.getCurrentContent(),s=o,u=o.getAnchorKey(),c=o.getFocusKey(),l=a.getBlockForKey(u);if(i&&"forward"===r&&u!==c)return a;if(o.isCollapsed()){if("forward"===r){if(t.isSelectionAtEndOfContent())return a;if(i)if(o.getAnchorOffset()===a.getBlockForKey(u).getLength()){var f=a.getBlockForKey(l.nextSibling);if(!f||0===f.getLength())return a}}else if(t.isSelectionAtStartOfContent())return a;if((s=e(t))===o)return a}return n.removeRange(a,s,r)}},55283:t=>{"use strict";var e=new RegExp("\r","g");t.exports=function(t){return t.replace(e,"")}},45412:(t,e,r)=>{"use strict";var n=r(5880),i=r(97432),o=r(4856),a=r(67476),s=r(31003),u=r(75795),c=r(73759),l=r(84368),f=o.isBrowser("IE");function p(t,e){if(!t)return"[empty]";var r=d(t,e);return r.nodeType===Node.TEXT_NODE?r.textContent:(l(r)||c(!1),r.outerHTML)}function d(t,e){var r=void 0!==e?e(t):[];if(t.nodeType===Node.TEXT_NODE){var n=t.textContent.length;return u(t).createTextNode("[text "+n+(r.length?" | "+r.join(", "):"")+"]")}var i=t.cloneNode();1===i.nodeType&&r.length&&i.setAttribute("data-labels",r.join(", "));for(var o=t.childNodes,a=0;a<o.length;a++)i.appendChild(d(o[a],e));return i}function h(t,e){for(var r=t,n=r;r;){if(l(r)&&n.hasAttribute("contenteditable"))return p(r,e);n=r=r.parentNode}return"Could not find contentEditable parent of node"}function g(t){return null===t.nodeValue?t.childNodes.length:t.nodeValue.length}function v(t,e,r,n){var o=s();if(t.extend&&null!=e&&a(o,e)){r>g(e)&&i.logSelectionStateFailure({anonymizedDom:h(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(n.toJS())});var u=e===t.focusNode;try{t.rangeCount>0&&t.extend&&t.extend(e,r)}catch(a){throw i.logSelectionStateFailure({anonymizedDom:h(e,(function(e){var r=[];return e===o&&r.push("active element"),e===t.anchorNode&&r.push("selection anchor node"),e===t.focusNode&&r.push("selection focus node"),r})),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:e===t.focusNode,nodeWasFocus:u,selectionRangeCount:t.rangeCount,selectionAnchorNodeName:t.anchorNode?t.anchorNode.nodeName:null,selectionAnchorOffset:t.anchorOffset,selectionFocusNodeName:t.focusNode?t.focusNode.nodeName:null,selectionFocusOffset:t.focusOffset,message:a?""+a:null,offset:r},null,2),selectionState:JSON.stringify(n.toJS(),null,2)}),a}}else if(e&&t.rangeCount>0){var c=t.getRangeAt(0);c.setEnd(e,r),t.addRange(c.cloneRange())}}function y(t,e,r,o){var a=u(e).createRange();if(r>g(e)&&(i.logSelectionStateFailure({anonymizedDom:h(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())}),n.handleExtensionCausedError()),a.setStart(e,r),f)try{t.addRange(a)}catch(t){0}else t.addRange(a)}t.exports={setDraftEditorSelection:function(t,e,r,n,i){var o=u(e);if(a(o.documentElement,e)){var s=o.defaultView.getSelection(),c=t.getAnchorKey(),l=t.getAnchorOffset(),f=t.getFocusKey(),p=t.getFocusOffset(),d=t.getIsBackward();if(!s.extend&&d){var h=c,g=l;c=f,l=p,f=h,p=g,d=!1}var m=c===r&&n<=l&&i>=l,b=f===r&&n<=p&&i>=p;if(m&&b)return s.removeAllRanges(),y(s,e,l-n,t),void v(s,e,p-n,t);if(d){if(b&&(s.removeAllRanges(),y(s,e,p-n,t)),m){var _=s.focusNode,S=s.focusOffset;s.removeAllRanges(),y(s,e,l-n,t),v(s,_,S,t)}}else m&&(s.removeAllRanges(),y(s,e,l-n,t)),b&&v(s,e,p-n,t)}},addFocusToSelection:v}},36043:(t,e,r)=>{"use strict";var n=r(67953),i=r(25027),o=r(43393),a=r(73759),s=r(57429),u=o.List,c=o.Map,l=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}};t.exports=function(t,e){e.isCollapsed()||a(!1);var r=e.getAnchorKey(),o=t.getBlockMap(),f=o.get(r),p=f.getText();if(!p){var d=f.getType();if("unordered-list-item"===d||"ordered-list-item"===d)return s(t,e,(function(t){return t.merge({type:"unstyled",depth:0})}))}var h=e.getAnchorOffset(),g=f.getCharacterList(),v=i(),y=f instanceof n,m=f.merge({text:p.slice(0,h),characterList:g.slice(0,h)}),b=m.merge({key:v,text:p.slice(h),characterList:g.slice(h),data:c()}),_=o.toSeq().takeUntil((function(t){return t===f})),S=o.toSeq().skipUntil((function(t){return t===f})).rest(),w=_.concat([[r,m],[v,b]],S).toOrderedMap();return y&&(f.getChildKeys().isEmpty()||a(!1),w=function(t,e,r){return t.withMutations((function(t){var n=e.getKey(),i=r.getKey();l(e.getParentKey(),t,(function(t){var e=t.getChildKeys(),r=e.indexOf(n)+1,o=e.toArray();return o.splice(r,0,i),t.merge({children:u(o)})})),l(e.getNextSiblingKey(),t,(function(t){return t.merge({prevSibling:i})})),l(n,t,(function(t){return t.merge({nextSibling:i})})),l(i,t,(function(t){return t.merge({prevSibling:n})}))}))}(w,m,b)),t.merge({blockMap:w,selectionBefore:e,selectionAfter:e.merge({anchorKey:v,anchorOffset:0,focusKey:v,focusOffset:0,isBackward:!1})})}},44300:t=>{"use strict";var e=/\r\n?|\n/g;t.exports=function(t){return t.split(e)}},76363:t=>{"use strict";t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},84693:(t,e,r)=>{"use strict";r.d(e,{filterEditorState:()=>S});var n=r(9041);const i="atomic",o="unstyled",a="unordered-list-item",s="ordered-list-item",u=t=>{const e=t.getBlockMap(),r=e.filter((t=>{const e=t.getText(),r=t.getEntityAt(0);return Boolean(r)&&["📷"," ","📷 "].includes(e)})).map((t=>t.set("type",i)));return 0!==r.size?t.merge({blockMap:e.merge(r)}):t},c=t=>{let e=t.getBlockMap();const r=e.filter((t=>t.getType()===i&&(" "!==t.getText()||0!==t.getInlineStyleAt(0).size))).map((t=>{const e=t.getCharacterList().slice(0,1).map((t=>{let e=t;return t.getStyle().forEach((t=>{e=n.CharacterMetadata.removeStyle(e,t)})),e}));return t.merge({text:" ",characterList:e})}));return 0!==r.size&&(e=e.merge(r)),t.merge({blockMap:e})},l=(t,e)=>{const r=e.getBlockMap(),n=r.filter((r=>{if(r.getType()!==i)return!0;const n=r.getEntityAt(0);let o;if(n){const r=e.getEntity(n).getType();o=t.some((t=>t.type===r))}else o=!1;return o}));return n.size!==r.size?e.merge({blockMap:n}):e},f=t=>{const e=t.getBlockMap(),r=e.filter((t=>[a,s].includes(t.getType())||0===t.getDepth()));return r.size!==e.size?t.merge({blockMap:r}):t},p=(t,e)=>{const r=e.getBlockMap(),n=r.filter((t=>"unstyled"===t.getType())).map((e=>{const r=e.getText();let n,i=e;const o=t.find((t=>(n=new RegExp(t.test).exec(r),null!==n)));if(o&&n&&n[0]){const t=i.getText();if(i.getEntityAt(0)&&n[0]===t)return i;const e=n[0].length;let r=i.getCharacterList(),a=0;for(;a<e;)r=r.shift(),a++;i=i.merge({type:o.type,depth:o.depth,text:t.slice(e),characterList:r})}return i}));return 0===n.size?e:e.merge({blockMap:r.merge(n)})},d=(t,e)=>{const r=e.getBlockMap(),n=r.filter((e=>e.getDepth()>t)).map((e=>e.set("depth",t)));return 0===n.size?e:e.merge({blockMap:r.merge(n)})},h=(t,e)=>{const r=e.getBlockMap(),n=r.filter((e=>!t.includes(e.getType()))).map((t=>t.merge({type:o,depth:0})));return 0===n.size?e:e.merge({blockMap:r.merge(n)})},g=(t,e)=>{const r=e.getBlockMap(),i=r.map((e=>{let r=!1;const i=e.getCharacterList().map((e=>{let i=e;return e.getStyle().filter((e=>!t.includes(e))).forEach((t=>{r=!0,i=n.CharacterMetadata.removeStyle(i,t)})),i}));return r?e.set("characterList",i):e}));return e.merge({blockMap:r.merge(i)})},v=t=>{let e=t;const r=e.getBlockMap(),i=[],o=t=>{const e=t.getEntity();if(e){if(i.includes(e))return!0;i.push(e)}return!1},a=r.map((t=>{let r=t.getCharacterList(),i=!1;return t.findEntityRanges(o,((t,o)=>{const a=r.get(t).getEntity(),s=e.getEntity(a);e=e.createEntity(s.getType(),s.getMutability(),s.getData());const u=e.getLastCreatedEntityKey();r=r.map(((e,r)=>t<=r&&r<=o?n.CharacterMetadata.applyEntity(e,u):e)),i=!0})),i?t.set("characterList",r):t}));return e.merge({blockMap:r.merge(a)})},y=(t,e)=>{const r=e.getBlockMap(),i=r.map((r=>{let i=!1;const o=r.getCharacterList().map((o=>{const a=o.getEntity();if(a){if(!t(e,a,r))return i=!0,n.CharacterMetadata.applyEntity(o,null)}return o}));return i?r.set("characterList",o):r}));return e.merge({blockMap:r.merge(i)})},m=(t,e)=>{let r=e;const n={};return r.getBlockMap().forEach((t=>{t.findEntityRanges((t=>{const e=t.getEntity();if(e){const t=r.getEntity(e);n[e]=t}return!1}))})),Object.keys(n).forEach((e=>{const i=n[e],o=i.getData(),a=t.find((t=>t.type===i.getType())),s=a?a.attributes:null;if(!s)return o;const u=s.reduce(((t,e)=>(o.hasOwnProperty(e)&&(t[e]=o[e]),t)),{});r=r.replaceEntityData(e,u)})),r},b=(t,e)=>{const r=e.getBlockMap(),n=r.map((e=>{const r=e.getText(),n=t.reduce(((t,e)=>t.replace(new RegExp(e,"g")," ".repeat(e.length))),r);return r!==n?e.set("text",n):e}));return e.merge({blockMap:r.merge(n)})},_=[{test:"^(· |•\t|•|📷 |\t| \t)",type:"unordered-list-item",depth:0},{test:"^(◦|o |o\t)",type:"unordered-list-item",depth:1},{test:"^(§ |\t|◾)",type:"unordered-list-item",depth:2},{test:"^1{0,1}\\d\\.[ \t]",type:"ordered-list-item",depth:0},{test:"^x{0,1}(i|ii|iii|iv|v|vi|vii|viii|ix|x)\\.[ \t]",type:"ordered-list-item",depth:2},{test:"^[a-z]\\.[ \t]",type:"ordered-list-item",depth:1}],S=(t,e)=>{const{blocks:r,styles:a,entities:s,maxNesting:S,whitespacedCharacters:w,blockTextRules:x=_}=t,E=[f,p.bind(null,x),d.bind(null,S),g.bind(null,a),h.bind(null,r.concat([o,i])),u,c,y.bind(null,((t,e,r)=>{const n=t.getEntity(e),o=n.getData(),a=n.getType(),u=r.getType();return c=a,s.some((t=>t.type===c))&&((t,e,r)=>{const n=t.find((t=>t.type===e)),i=n&&n.allowlist?n.allowlist:n&&n.whitelist?n.whitelist:{};return Object.keys(i).every((t=>{const e=i[t];if("boolean"==typeof e){const n=r.hasOwnProperty(t);return e?n:!n}return new RegExp(e).test(r[t])}))})(s,a,o)&&!((t,e)=>"IMAGE"===t&&e!==i)(a,u);var c})),l.bind(null,s),m.bind(null,s),v,b.bind(null,w)],O=e.getCurrentContent();return((t,e,r)=>{if(r===e)return t;if(0===r.getBlockMap().size)return n.EditorState.moveFocusToEnd(n.EditorState.set(t,{currentContent:n.ContentState.createFromText("")}));const i=n.EditorState.set(t,{currentContent:r}),o=t.getSelection(),a=o.getAnchorKey(),s=r.getBlockForKey(a);if(!o.isCollapsed()||s)return i;const u=r.getBlockMap().keySeq().reverse().find((t=>e.getKeyAfter(t)!==r.getKeyAfter(t)));if(u){const t=r.getBlockForKey(u).getText().length,e=o.merge({anchorKey:u,focusKey:u,anchorOffset:t,focusOffset:t});return n.EditorState.acceptSelection(i,e)}return i})(e,O,E.reduce(((t,e)=>e(t)),O))}},44891:(t,e,r)=>{"use strict";var n=r(51006),i=r(89825),o=r(60139),a=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function u(t){if("file"==t.kind)return t.getAsFile()}var c=function(){function DataTransfer(t){this.data=t,this.types=t.types?i(t.types):[]}var t=DataTransfer.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(t){return s[t]}))},t.getText=function(){var t;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(t=this.data.getData("text/plain")):t=this.data.getData("Text")),t?t.replace(a,"\n"):null},t.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")}},t.isLink=function(){return this.types.some((function(t){return-1!=t.indexOf("Url")||-1!=t.indexOf("text/uri-list")||t.indexOf("text/x-moz-url")}))},t.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},t.isImage=function(){var t=this.types.some((function(t){return-1!=t.indexOf("application/x-moz-file")}));if(t)return!0;for(var e=this.getFiles(),r=0;r<e.length;r++){var i=e[r].type;if(!n.isImage(i))return!1}return!0},t.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},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(u).filter(o.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return this.getFiles().length>0},DataTransfer}();t.exports=c},25399:t=>{"use strict";t.exports={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}},51006:t=>{"use strict";var e={isImage:function(t){return"image"===r(t)[0]},isJpeg:function(t){var n=r(t);return e.isImage(t)&&("jpeg"===n[1]||"pjpeg"===n[1])}};function r(t){return t.split("/")}t.exports=e},65994:t=>{"use strict";function e(t,e){return!!e&&(t===e.documentElement||t===e.body)}var r={getTop:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollTop||r.documentElement.scrollTop:t.scrollTop},setTop:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollTop=n.documentElement.scrollTop=r:t.scrollTop=r},getLeft:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollLeft||r.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollLeft=n.documentElement.scrollLeft=r:t.scrollLeft=r}};t.exports=r},19051:(t,e,r)=>{"use strict";function n(t,e){var r=i.get(t,e);return"auto"===r||"scroll"===r}var i={get:r(85466),getScrollParent:function(t){if(!t)return null;for(var e=t.ownerDocument;t&&t!==e.body;){if(n(t,"overflow")||n(t,"overflowY")||n(t,"overflowX"))return t;t=t.parentNode}return e.defaultView||e.parentWindow}};t.exports=i},65724:t=>{"use strict";t.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},61425:t=>{"use strict";var e=function(){function URI(t){var e,r,n;n=void 0,(r="_uri")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this._uri=t}return URI.prototype.toString=function(){return this._uri},URI}();t.exports=e},54191:(t,e,r)=>{"use strict";var n=r(16633),i=r(73759),o="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",a="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",s=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+o+a+"]"),u=new RegExp("["+o+a+"]");function c(t){var e=s.exec(t);return null==e?null:e[0]}function l(t){var e=c(t);return null==e?n.NEUTRAL:u.exec(e)?n.RTL:n.LTR}function f(t,e){if(e=e||n.NEUTRAL,!t.length)return e;var r=l(t);return r===n.NEUTRAL?e:r}function p(t,e){return e||(e=n.getGlobalDir()),n.isStrong(e)||i(!1),f(t,e)}var d={firstStrongChar:c,firstStrongCharDir:l,resolveBlockDir:f,getDirection:p,isDirectionLTR:function(t,e){return p(t,e)===n.LTR},isDirectionRTL:function(t,e){return p(t,e)===n.RTL}};t.exports=d},16633:(t,e,r)=>{"use strict";var n=r(73759),i="LTR",o="RTL",a=null;function s(t){return t===i||t===o}function u(t){return s(t)||n(!1),t===i?"ltr":"rtl"}function c(t){a=t}var l={NEUTRAL:"NEUTRAL",LTR:i,RTL:o,isStrong:s,getHTMLDir:u,getHTMLDirIfDifferent:function(t,e){return s(t)||n(!1),s(e)||n(!1),t===e?null:u(t)},setGlobalDir:c,initGlobalDir:function(){c(i)},getGlobalDir:function(){return a||this.initGlobalDir(),a||n(!1),a}};t.exports=l},7902:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(54191),o=r(16633),a=r(73759),s=function(){function UnicodeBidiService(t){n(this,"_defaultDir",void 0),n(this,"_lastDir",void 0),t?o.isStrong(t)||a(!1):t=o.getGlobalDir(),this._defaultDir=t,this.reset()}var t=UnicodeBidiService.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(t){return this._lastDir=i.getDirection(t,this._lastDir),this._lastDir},UnicodeBidiService}();t.exports=s},38935:(t,e,r)=>{"use strict";var n=r(73759),i=55296,o=56319,a=56320,s=57343,u=/[\uD800-\uDFFF]/;function c(t){return i<=t&&t<=s}function l(t){return u.test(t)}function f(t,e){return 1+c(t.charCodeAt(e))}function p(t,e,r){if(e=e||0,r=void 0===r?1/0:r||0,!l(t))return t.substr(e,r);var n=t.length;if(n<=0||e>n||r<=0)return"";var i=0;if(e>0){for(;e>0&&i<n;e--)i+=f(t,i);if(i>=n)return""}else if(e<0){for(i=n;e<0&&0<i;e++)i-=f(t,i-1);i<0&&(i=0)}var o=n;if(r<n)for(o=i;r>0&&o<n;r--)o+=f(t,o);return t.substring(i,o)}var d={getCodePoints:function(t){for(var e=[],r=0;r<t.length;r+=f(t,r))e.push(t.codePointAt(r));return e},getUTF16Length:f,hasSurrogateUnit:l,isCodeUnitInSurrogateRange:c,isSurrogatePair:function(t,e){if(0<=e&&e<t.length||n(!1),e+1===t.length)return!1;var r=t.charCodeAt(e),u=t.charCodeAt(e+1);return i<=r&&r<=o&&a<=u&&u<=s},strlen:function(t){if(!l(t))return t.length;for(var e=0,r=0;r<t.length;r+=f(t,r))e++;return e},substring:function(t,e,r){(e=e||0)<0&&(e=0),(r=void 0===r?1/0:r||0)<0&&(r=0);var n=Math.abs(r-e);return p(t,e=e<r?e:r,n)},substr:p};t.exports=d},4856:(t,e,r)=>{"use strict";var n=r(95845),i=r(59859),o=r(79467),a=r(51767);function s(t,e,r,n){if(t===r)return!0;if(!r.startsWith(t))return!1;var o=r.slice(t.length);return!!e&&(o=n?n(o):o,i.contains(o,e))}function u(t){return"Windows"===n.platformName?t.replace(/^\s*NT/,""):t}var c={isBrowser:function(t){return s(n.browserName,n.browserFullVersion,t)},isBrowserArchitecture:function(t){return s(n.browserArchitecture,null,t)},isDevice:function(t){return s(n.deviceName,null,t)},isEngine:function(t){return s(n.engineName,n.engineVersion,t)},isPlatform:function(t){return s(n.platformName,n.platformFullVersion,t,u)},isPlatformArchitecture:function(t){return s(n.platformArchitecture,null,t)}};t.exports=o(c,a)},95845:(t,e,r)=>{"use strict";var n=r(42238),i="Unknown",o={"Mac OS":"Mac OS X"};var a,s=(new n).getResult(),u=function(t){if(!t)return{major:"",minor:""};var e=t.split(".");return{major:e[0],minor:e[1]}}(s.browser.version),c={browserArchitecture:s.cpu.architecture||i,browserFullVersion:s.browser.version||i,browserMinorVersion:u.minor||i,browserName:s.browser.name||i,browserVersion:s.browser.major||i,deviceName:s.device.model||i,engineName:s.engine.name||i,engineVersion:s.engine.version||i,platformArchitecture:s.cpu.architecture||i,platformName:(a=s.os.name,o[a]||a||i),platformVersion:s.os.version||i,platformFullVersion:s.os.version||i};t.exports=c},59859:(t,e,r)=>{"use strict";var n=r(73759),i=/\./,o=/\|\|/,a=/\s+\-\s+/,s=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,u=/^(\d*)(.*)/;function c(t,e){var r=t.split(o);return r.length>1?r.some((function(t){return _.contains(t,e)})):function(t,e){var r=t.split(a);if(r.length>0&&r.length<=2||n(!1),1===r.length)return l(r[0],e);var i=r[0],o=r[1];return g(i)&&g(o)||n(!1),l(">="+i,e)&&l("<="+o,e)}(t=r[0].trim(),e)}function l(t,e){if(""===(t=t.trim()))return!0;var r,n=e.split(i),o=d(t),a=o.modifier,s=o.rangeComponents;switch(a){case"<":return f(n,s);case"<=":return-1===(r=b(n,s))||0===r;case">=":return p(n,s);case">":return function(t,e){return 1===b(t,e)}(n,s);case"~":case"~>":return function(t,e){var r=e.slice(),n=e.slice();n.length>1&&n.pop();var i=n.length-1,o=parseInt(n[i],10);h(o)&&(n[i]=o+1+"");return p(t,r)&&f(t,n)}(n,s);default:return function(t,e){return 0===b(t,e)}(n,s)}}function f(t,e){return-1===b(t,e)}function p(t,e){var r=b(t,e);return 1===r||0===r}function d(t){var e=t.split(i),r=e[0].match(s);return r||n(!1),{modifier:r[1],rangeComponents:[r[2]].concat(e.slice(1))}}function h(t){return!isNaN(t)&&isFinite(t)}function g(t){return!d(t).modifier}function v(t,e){for(var r=t.length;r<e;r++)t[r]="0"}function y(t,e){var r=t.match(u)[1],n=e.match(u)[1],i=parseInt(r,10),o=parseInt(n,10);return h(i)&&h(o)&&i!==o?m(i,o):m(t,e)}function m(t,e){return typeof t!=typeof e&&n(!1),t>e?1:t<e?-1:0}function b(t,e){for(var r=function(t,e){v(t=t.slice(),(e=e.slice()).length);for(var r=0;r<e.length;r++){var n=e[r].match(/^[x*]$/i);if(n&&(e[r]=t[r]="0","*"===n[0]&&r===e.length-1))for(var i=r;i<t.length;i++)t[i]="0"}return v(e,t.length),[t,e]}(t,e),n=r[0],i=r[1],o=0;o<i.length;o++){var a=y(n[o],i[o]);if(a)return a}return 0}var _={contains:function(t,e){return c(t.trim(),e.trim())}};t.exports=_},52297:t=>{"use strict";var e=/-(.)/g;t.exports=function(t){return t.replace(e,(function(t,e){return e.toUpperCase()}))}},67476:(t,e,r)=>{"use strict";var n=r(52334);t.exports=function t(e,r){return!(!e||!r)&&(e===r||!n(e)&&(n(r)?t(e,r.parentNode):"contains"in e?e.contains(r):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(r))))}},89825:(t,e,r)=>{"use strict";var n=r(73759);t.exports=function(t){return function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}(t)?Array.isArray(t)?t.slice():function(t){var e=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&n(!1),"number"!=typeof e&&n(!1),0===e||e-1 in t||n(!1),"function"==typeof t.callee&&n(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var r=Array(e),i=0;i<e;i++)r[i]=t[i];return r}(t):[t]}},62620:t=>{"use strict";function e(t){return t.replace(/\//g,"-")}t.exports=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(" ")}},60139:t=>{"use strict";function e(t){return function(){return t}}var r=function(){};r.thatReturns=e,r.thatReturnsFalse=e(!1),r.thatReturnsTrue=e(!0),r.thatReturnsNull=e(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},31003:t=>{"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},35179:t=>{"use strict";var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;t.exports=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}},55258:(t,e,r)=>{"use strict";var n=r(23123);t.exports=function(t){var e=n(t);return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}},23123:(t,e,r)=>{"use strict";var n=r(67476);t.exports=function(t){var e=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!n(e,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-e.clientLeft,right:Math.round(r.right)-e.clientLeft,top:Math.round(r.top)-e.clientTop,bottom:Math.round(r.bottom)-e.clientTop}}},79749:(t,e,r)=>{"use strict";var n=r(35179),i=r(30787);t.exports=function(t){var e=n(t.ownerDocument||t.document);t.Window&&t instanceof t.Window&&(t=e);var r=i(t),o=t===e?t.ownerDocument.documentElement:t,a=t.scrollWidth-o.clientWidth,s=t.scrollHeight-o.clientHeight;return r.x=Math.max(0,Math.min(r.x,a)),r.y=Math.max(0,Math.min(r.y,s)),r}},85466:(t,e,r)=>{"use strict";var n=r(52297),i=r(89349);function o(t){return null==t?t:String(t)}t.exports=function(t,e){var r;if(window.getComputedStyle&&(r=window.getComputedStyle(t,null)))return o(r.getPropertyValue(i(e)));if(document.defaultView&&document.defaultView.getComputedStyle){if(r=document.defaultView.getComputedStyle(t,null))return o(r.getPropertyValue(i(e)));if("display"===e)return"none"}return t.currentStyle?o("float"===e?t.currentStyle.cssFloat||t.currentStyle.styleFloat:t.currentStyle[n(e)]):o(t.style&&t.style[n(e)])}},30787:t=>{"use strict";t.exports=function(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}},70746:t=>{"use strict";function e(){var t;return document.documentElement&&(t=document.documentElement.clientWidth),!t&&document.body&&(t=document.body.clientWidth),t||0}function r(){var t;return document.documentElement&&(t=document.documentElement.clientHeight),!t&&document.body&&(t=document.body.clientHeight),t||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||r()}}n.withoutScrollbars=function(){return{width:e(),height:r()}},t.exports=n},89349:t=>{"use strict";var e=/([A-Z])/g;t.exports=function(t){return t.replace(e,"-$1").toLowerCase()}},73759:t=>{"use strict";var e=function(t){};t.exports=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(e(r),!t){var a;if(void 0===r)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(r.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},20901:t=>{"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},52334:(t,e,r)=>{"use strict";var n=r(20901);t.exports=function(t){return n(t)&&3==t.nodeType}},71108:t=>{"use strict";t.exports=function(t){var e=t||"",r=arguments.length;if(r>1)for(var n=1;n<r;n++){var i=arguments[n];i&&(e=(e?e+" ":"")+i)}return e}},79467:t=>{"use strict";var e=Object.prototype.hasOwnProperty;t.exports=function(t,r,n){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=r.call(n,t[o],o,t));return i}},51767:t=>{"use strict";t.exports=function(t){var e={};return function(r){return e.hasOwnProperty(r)||(e[r]=t.call(this,r)),e[r]}}},22045:t=>{"use strict";t.exports=function(t){if(null!=t)return t;throw new Error("Got unexpected null or undefined")}},56926:(t,e,r)=>{"use strict";r(24889),t.exports=r.g.setImmediate},63620:(t,e,r)=>{"use strict";var n=r(60139);t.exports=n},1745:(t,e,r)=>{"use strict";r.d(e,{FlagsProvider:()=>FlagsProvider,useFeature:()=>u,useFeatures:()=>s});var n=r(67294);function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}var o=(0,n.createContext)({});function a(t){return Array.isArray(t)?Object.fromEntries(t.map((function(t){return[t,!0]}))):t}function FlagsProvider(t){var e,r,u=t.features,c=void 0===u?{}:u,l=t.children,f=s();return(0,n.createElement)(o.Provider,{value:(e=a(f),r=a(c),i({},e,r))},l)}function s(){return(0,n.useContext)(o)}function u(t){var e=s();return Array.isArray(e)?e.includes(t):"boolean"==typeof e[t]?e[t]:t.split("/").reduce((function(t,e){return"boolean"==typeof t?t:void 0!==t[e]&&t[e]}),e)}},43393:function(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function Iterable(t){return r(t)?t:Seq(t)}function KeyedIterable(t){return n(t)?t:KeyedSeq(t)}function IndexedIterable(t){return i(t)?t:IndexedSeq(t)}function SetIterable(t){return r(t)&&!o(t)?t:SetSeq(t)}function r(t){return!(!t||!t[s])}function n(t){return!(!t||!t[u])}function i(t){return!(!t||!t[c])}function o(t){return n(t)||i(t)}function a(t){return!(!t||!t[l])}e(KeyedIterable,Iterable),e(IndexedIterable,Iterable),e(SetIterable,Iterable),Iterable.isIterable=r,Iterable.isKeyed=n,Iterable.isIndexed=i,Iterable.isAssociative=o,Iterable.isOrdered=a,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var s="@@__IMMUTABLE_ITERABLE__@@",u="@@__IMMUTABLE_KEYED__@@",c="@@__IMMUTABLE_INDEXED__@@",l="@@__IMMUTABLE_ORDERED__@@",f="delete",p=5,d=1<<p,h=d-1,g={},v={value:!1},y={value:!1};function MakeRef(t){return t.value=!1,t}function SetRef(t){t&&(t.value=!0)}function OwnerID(){}function m(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function b(t){return void 0===t.size&&(t.size=t.__iterate(S)),t.size}function _(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?b(t)+e:e}function S(){return!0}function w(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function x(t,e){return O(t,e,0)}function E(t,e){return O(t,e,e)}function O(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var C=0,k=1,M=2,D="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",A=D||I;function Iterator(t){this.next=t}function T(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function R(){return{value:void 0,done:!0}}function B(t){return!!L(t)}function P(t){return t&&"function"==typeof t.next}function z(t){var e=L(t);return e&&e.call(t)}function L(t){var e=t&&(D&&t[D]||t[I]);if("function"==typeof e)return e}function j(t){return t&&"number"==typeof t.length}function Seq(t){return null==t?G():r(t)?t.toSeq():V(t)}function KeyedSeq(t){return null==t?G().toKeyedSeq():r(t)?n(t)?t.toSeq():t.fromEntrySeq():H(t)}function IndexedSeq(t){return null==t?G():r(t)?n(t)?t.entrySeq():t.toIndexedSeq():W(t)}function SetSeq(t){return(null==t?G():r(t)?n(t)?t.entrySeq():t:W(t)).toSetSeq()}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=C,Iterator.VALUES=k,Iterator.ENTRIES=M,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[A]=function(){return this},e(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(t,e){return X(this,t,e,!0)},Seq.prototype.__iterator=function(t,e){return $(this,t,e,!0)},e(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},e(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(t,e){return X(this,t,e,!1)},IndexedSeq.prototype.__iterator=function(t,e){return $(this,t,e,!1)},e(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=U,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var N,K,q,F="@@__IMMUTABLE_SEQ__@@";function ArraySeq(t){this._array=t,this.size=t.length}function ObjectSeq(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function IterableSeq(t){this._iterable=t,this.size=t.length||t.size}function IteratorSeq(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[F])}function G(){return N||(N=new ArraySeq([]))}function H(t){var e=Array.isArray(t)?new ArraySeq(t).fromEntrySeq():P(t)?new IteratorSeq(t).fromEntrySeq():B(t)?new IterableSeq(t).fromEntrySeq():"object"==typeof t?new ObjectSeq(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function W(t){var e=Y(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function V(t){var e=Y(t)||"object"==typeof t&&new ObjectSeq(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function Y(t){return j(t)?new ArraySeq(t):P(t)?new IteratorSeq(t):B(t)?new IterableSeq(t):void 0}function X(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[r?o-a:a];if(!1===e(s[1],n?s[0]:a,t))return a+1}return a}return t.__iterateUncached(e,r)}function $(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,a=0;return new Iterator((function(){var t=i[r?o-a:a];return a++>o?R():T(e,n?t[0]:a-1,t[1])}))}return t.__iteratorUncached(e,r)}function J(t,e){return e?Z(e,t,"",{"":t}):Q(t)}function Z(t,e,r,n){return Array.isArray(e)?t.call(n,r,IndexedSeq(e).map((function(r,n){return Z(t,r,n,e)}))):tt(e)?t.call(n,r,KeyedSeq(e).map((function(r,n){return Z(t,r,n,e)}))):e}function Q(t){return Array.isArray(t)?IndexedSeq(t).map(Q).toList():tt(t)?KeyedSeq(t).map(Q).toMap():t}function tt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function et(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function rt(t,e){if(t===e)return!0;if(!r(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||n(t)!==n(e)||i(t)!==i(e)||a(t)!==a(e))return!1;if(0===t.size&&0===e.size)return!0;var s=!o(t);if(a(t)){var u=t.entries();return e.every((function(t,e){var r=u.next().value;return r&&et(r[1],t)&&(s||et(r[0],e))}))&&u.next().done}var c=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{c=!0;var l=t;t=e,e=l}var f=!0,p=e.__iterate((function(e,r){if(s?!t.has(e):c?!et(e,t.get(r,g)):!et(t.get(r,g),e))return f=!1,!1}));return f&&t.size===p}function Repeat(t,e){if(!(this instanceof Repeat))return new Repeat(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(K)return K;K=this}}function nt(t,e){if(!t)throw new Error(e)}function Range(t,e,r){if(!(this instanceof Range))return new Range(t,e,r);if(nt(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(q)return q;q=this}}function Collection(){throw TypeError("Abstract")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[F]=!0,e(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(t,e){return this.has(t)?this._array[_(this,t)]:e},ArraySeq.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===t(r[e?n-i:i],i,this))return i+1;return i},ArraySeq.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new Iterator((function(){return i>n?R():T(t,i,r[e?n-i++:i++])}))},e(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},ObjectSeq.prototype.has=function(t){return this._object.hasOwnProperty(t)},ObjectSeq.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var a=n[e?i-o:o];if(!1===t(r[a],a,this))return o+1}return o},ObjectSeq.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new Iterator((function(){var a=n[e?i-o:o];return o++>i?R():T(t,a,r[a])}))},ObjectSeq.prototype[l]=!0,e(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=z(this._iterable),n=0;if(P(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},IterableSeq.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=z(this._iterable);if(!P(r))return new Iterator(R);var n=0;return new Iterator((function(){var e=r.next();return e.done?e:T(t,n++,e.value)}))},e(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(r=n.next()).done;){var a=r.value;if(i[o]=a,!1===t(a,o++,this))break}return o},IteratorSeq.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Iterator((function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return T(t,i,n[i++])}))},e(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(t,e){return this.has(t)?this._value:e},Repeat.prototype.includes=function(t){return et(this._value,t)},Repeat.prototype.slice=function(t,e){var r=this.size;return w(t,e,r)?this:new Repeat(this._value,E(e,r)-x(t,r))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(t){return et(this._value,t)?0:-1},Repeat.prototype.lastIndexOf=function(t){return et(this._value,t)?this.size:-1},Repeat.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(!1===t(this._value,r,this))return r+1;return r},Repeat.prototype.__iterator=function(t,e){var r=this,n=0;return new Iterator((function(){return n<r.size?T(t,n++,r._value):R()}))},Repeat.prototype.equals=function(t){return t instanceof Repeat?et(this._value,t._value):rt(t)},e(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},Range.prototype.get=function(t,e){return this.has(t)?this._start+_(this,t)*this._step:e},Range.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Range.prototype.slice=function(t,e){return w(t,e,this.size)?this:(t=x(t,this.size),(e=E(e,this.size))<=t?new Range(0,0):new Range(this.get(t,this._end),this.get(e,this._end),this._step))},Range.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},Range.prototype.lastIndexOf=function(t){return this.indexOf(t)},Range.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;o<=r;o++){if(!1===t(i,o,this))return o+1;i+=e?-n:n}return o},Range.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new Iterator((function(){var a=i;return i+=e?-n:n,o>r?R():T(t,o++,a)}))},Range.prototype.equals=function(t){return t instanceof Range?this._start===t._start&&this._end===t._end&&this._step===t._step:rt(this,t)},e(Collection,Iterable),e(KeyedCollection,Collection),e(IndexedCollection,Collection),e(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var it="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function ot(t){return t>>>1&1073741824|3221225471&t}function at(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return ot(r)}if("string"===e)return t.length>yt?st(t):ut(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ct(t);if("function"==typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function st(t){var e=_t[t];return void 0===e&&(e=ut(t),bt===mt&&(bt=0,_t={}),bt++,_t[t]=e),e}function ut(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return ot(e)}function ct(t){var e;if(ht&&void 0!==(e=dt.get(t)))return e;if(void 0!==(e=t[vt]))return e;if(!ft){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[vt]))return e;if(void 0!==(e=pt(t)))return e}if(e=++gt,1073741824&gt&&(gt=0),ht)dt.set(t,e);else{if(void 0!==lt&&!1===lt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(ft)Object.defineProperty(t,vt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[vt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[vt]=e}}return e}var lt=Object.isExtensible,ft=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function pt(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}var dt,ht="function"==typeof WeakMap;ht&&(dt=new WeakMap);var gt=0,vt="__immutablehash__";"function"==typeof Symbol&&(vt=Symbol(vt));var yt=16,mt=255,bt=0,_t={};function St(t){nt(t!==1/0,"Cannot perform this action with an infinite size.")}function Map(t){return null==t?Dt():wt(t)&&!a(t)?t:Dt().withMutations((function(e){var r=KeyedIterable(t);St(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function wt(t){return!(!t||!t[Et])}e(Map,KeyedCollection),Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Map.prototype.set=function(t,e){return It(this,t,e)},Map.prototype.setIn=function(t,e){return this.updateIn(t,g,(function(){return e}))},Map.prototype.remove=function(t){return It(this,t,g)},Map.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return g}))},Map.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Map.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=qt(this,Ne(t),e,r);return n===g?void 0:n},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Dt()},Map.prototype.merge=function(){return Lt(this,void 0,arguments)},Map.prototype.mergeWith=function(e){return Lt(this,e,t.call(arguments,1))},Map.prototype.mergeIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,Dt(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,r):r[r.length-1]}))},Map.prototype.mergeDeep=function(){return Lt(this,jt,arguments)},Map.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return Lt(this,Nt(e),r)},Map.prototype.mergeDeepIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,Dt(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,r):r[r.length-1]}))},Map.prototype.sort=function(t){return OrderedMap(Me(this,t))},Map.prototype.sortBy=function(t,e){return OrderedMap(Me(this,e,t))},Map.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(t,e){return new MapIterator(this,t,e)},Map.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},Map.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Mt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Map.isMap=wt;var xt,Et="@@__IMMUTABLE_MAP__@@",Ot=Map.prototype;function ArrayMapNode(t,e){this.ownerID=t,this.entries=e}function BitmapIndexedNode(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function HashArrayMapNode(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function HashCollisionNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function ValueNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function MapIterator(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&kt(t._root)}function Ct(t,e){return T(t,e[0],e[1])}function kt(t,e){return{node:t,index:0,__prev:e}}function Mt(t,e,r,n){var i=Object.create(Ot);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dt(){return xt||(xt=Mt(0))}function It(t,e,r){var n,i;if(t._root){var o=MakeRef(v),a=MakeRef(y);if(n=At(t._root,t.__ownerID,0,void 0,e,r,o,a),!a.value)return t;i=t.size+(o.value?r===g?-1:1:0)}else{if(r===g)return t;i=1,n=new ArrayMapNode(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?Mt(i,n):Dt()}function At(t,e,r,n,i,o,a,s){return t?t.update(e,r,n,i,o,a,s):o===g?t:(SetRef(s),SetRef(a),new ValueNode(e,n,[i,o]))}function Tt(t){return t.constructor===ValueNode||t.constructor===HashCollisionNode}function Rt(t,e,r,n,i){if(t.keyHash===n)return new HashCollisionNode(e,n,[t.entry,i]);var o,a=(0===r?t.keyHash:t.keyHash>>>r)&h,s=(0===r?n:n>>>r)&h;return new BitmapIndexedNode(e,1<<a|1<<s,a===s?[Rt(t,e,r+p,n,i)]:(o=new ValueNode(e,n,i),a<s?[t,o]:[o,t]))}function Bt(t,e,r,n){t||(t=new OwnerID);for(var i=new ValueNode(t,at(r),[r,n]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}function Pt(t,e,r,n){for(var i=0,o=0,a=new Array(r),s=0,u=1,c=e.length;s<c;s++,u<<=1){var l=e[s];void 0!==l&&s!==n&&(i|=u,a[o++]=l)}return new BitmapIndexedNode(t,i,a)}function zt(t,e,r,n,i){for(var o=0,a=new Array(d),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[o++]:void 0;return a[n]=i,new HashArrayMapNode(t,o+1,a)}function Lt(t,e,n){for(var i=[],o=0;o<n.length;o++){var a=n[o],s=KeyedIterable(a);r(a)||(s=s.map((function(t){return J(t)}))),i.push(s)}return Kt(t,e,i)}function jt(t,e,n){return t&&t.mergeDeep&&r(e)?t.mergeDeep(e):et(t,e)?t:e}function Nt(t){return function(e,n,i){if(e&&e.mergeDeepWith&&r(n))return e.mergeDeepWith(t,n);var o=t(e,n,i);return et(e,o)?e:o}}function Kt(t,e,r){return 0===(r=r.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations((function(t){for(var n=e?function(r,n){t.update(n,g,(function(t){return t===g?r:e(t,r,n)}))}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)})):t.constructor(r[0])}function qt(t,e,r,n){var i=t===g,o=e.next();if(o.done){var a=i?r:t,s=n(a);return s===a?t:s}nt(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?g:t.get(u,g),l=qt(c,e,r,n);return l===c?t:l===g?t.remove(u):(i?Dt():t).set(u,l)}function Ft(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ut(t,e,r,n){var i=n?t:m(t);return i[e]=r,i}function Gt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),a=0,s=0;s<i;s++)s===e?(o[s]=r,a=-1):o[s]=t[s+a];return o}function Ht(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a<n;a++)a===e&&(o=1),i[a]=t[a+o];return i}Ot[Et]=!0,Ot[f]=Ot.remove,Ot.removeIn=Ot.deleteIn,ArrayMapNode.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(et(r,i[o][0]))return i[o][1];return n},ArrayMapNode.prototype.update=function(t,e,r,n,i,o,a){for(var s=i===g,u=this.entries,c=0,l=u.length;c<l&&!et(n,u[c][0]);c++);var f=c<l;if(f?u[c][1]===i:s)return this;if(SetRef(a),(s||!f)&&SetRef(o),!s||1!==u.length){if(!f&&!s&&u.length>=Wt)return Bt(t,u,n,i);var p=t&&t===this.ownerID,d=p?u:m(u);return f?s?c===l-1?d.pop():d[c]=d.pop():d[c]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new ArrayMapNode(t,d)}},BitmapIndexedNode.prototype.get=function(t,e,r,n){void 0===e&&(e=at(r));var i=1<<((0===t?e:e>>>t)&h),o=this.bitmap;return 0==(o&i)?n:this.nodes[Ft(o&i-1)].get(t+p,e,r,n)},BitmapIndexedNode.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=at(n));var s=(0===e?r:r>>>e)&h,u=1<<s,c=this.bitmap,l=0!=(c&u);if(!l&&i===g)return this;var f=Ft(c&u-1),d=this.nodes,v=l?d[f]:void 0,y=At(v,t,e+p,r,n,i,o,a);if(y===v)return this;if(!l&&y&&d.length>=Vt)return zt(t,d,c,s,y);if(l&&!y&&2===d.length&&Tt(d[1^f]))return d[1^f];if(l&&y&&1===d.length&&Tt(y))return y;var m=t&&t===this.ownerID,b=l?y?c:c^u:c|u,_=l?y?Ut(d,f,y,m):Ht(d,f,m):Gt(d,f,y,m);return m?(this.bitmap=b,this.nodes=_,this):new BitmapIndexedNode(t,b,_)},HashArrayMapNode.prototype.get=function(t,e,r,n){void 0===e&&(e=at(r));var i=(0===t?e:e>>>t)&h,o=this.nodes[i];return o?o.get(t+p,e,r,n):n},HashArrayMapNode.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=at(n));var s=(0===e?r:r>>>e)&h,u=i===g,c=this.nodes,l=c[s];if(u&&!l)return this;var f=At(l,t,e+p,r,n,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&--d<Yt)return Pt(t,c,d,s)}else d++;var v=t&&t===this.ownerID,y=Ut(c,s,f,v);return v?(this.count=d,this.nodes=y,this):new HashArrayMapNode(t,d,y)},HashCollisionNode.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(et(r,i[o][0]))return i[o][1];return n},HashCollisionNode.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=at(n));var s=i===g;if(r!==this.keyHash)return s?this:(SetRef(a),SetRef(o),Rt(this,t,e,r,[n,i]));for(var u=this.entries,c=0,l=u.length;c<l&&!et(n,u[c][0]);c++);var f=c<l;if(f?u[c][1]===i:s)return this;if(SetRef(a),(s||!f)&&SetRef(o),s&&2===l)return new ValueNode(t,this.keyHash,u[1^c]);var p=t&&t===this.ownerID,d=p?u:m(u);return f?s?c===l-1?d.pop():d[c]=d.pop():d[c]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new HashCollisionNode(t,this.keyHash,d)},ValueNode.prototype.get=function(t,e,r,n){return et(r,this.entry[0])?this.entry[1]:n},ValueNode.prototype.update=function(t,e,r,n,i,o,a){var s=i===g,u=et(n,this.entry[0]);return(u?i===this.entry[1]:s)?this:(SetRef(a),s?void SetRef(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new ValueNode(t,this.keyHash,[n,i]):(SetRef(o),Rt(this,t,e,at(n),[n,i])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},ValueNode.prototype.iterate=function(t,e){return t(this.entry)},e(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ct(t,n.entry)}else if(n.entries){if(i<=(r=n.entries.length-1))return Ct(t,n.entries[this._reverse?r-i:i])}else if(i<=(r=n.nodes.length-1)){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ct(t,o.entry);e=this._stack=kt(o,e)}continue}e=this._stack=this._stack.__prev}return R()};var Wt=d/4,Vt=d/2,Yt=d/4;function List(t){var e=ne();if(null==t)return e;if(Xt(t))return t;var r=IndexedIterable(t),n=r.size;return 0===n?e:(St(n),n>0&&n<d?re(0,n,p,null,new VNode(r.toArray())):e.withMutations((function(t){t.setSize(n),r.forEach((function(e,r){return t.set(r,e)}))})))}function Xt(t){return!(!t||!t[$t])}e(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString("List [","]")},List.prototype.get=function(t,e){if((t=_(this,t))>=0&&t<this.size){var r=se(this,t+=this._origin);return r&&r.array[t&h]}return e},List.prototype.set=function(t,e){return ie(this,t,e)},List.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},List.prototype.insert=function(t,e){return this.splice(t,0,e)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=p,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ne()},List.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){ue(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},List.prototype.pop=function(){return ue(this,0,-1)},List.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){ue(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},List.prototype.shift=function(){return ue(this,1)},List.prototype.merge=function(){return ce(this,void 0,arguments)},List.prototype.mergeWith=function(e){return ce(this,e,t.call(arguments,1))},List.prototype.mergeDeep=function(){return ce(this,jt,arguments)},List.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return ce(this,Nt(e),r)},List.prototype.setSize=function(t){return ue(this,0,t)},List.prototype.slice=function(t,e){var r=this.size;return w(t,e,r)?this:ue(this,x(t,r),E(e,r))},List.prototype.__iterator=function(t,e){var r=0,n=ee(this,e);return new Iterator((function(){var e=n();return e===te?R():T(t,r++,e)}))},List.prototype.__iterate=function(t,e){for(var r,n=0,i=ee(this,e);(r=i())!==te&&!1!==t(r,n++,this););return n},List.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?re(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},List.isList=Xt;var $t="@@__IMMUTABLE_LIST__@@",Jt=List.prototype;function VNode(t,e){this.array=t,this.ownerID=e}Jt[$t]=!0,Jt[f]=Jt.remove,Jt.setIn=Ot.setIn,Jt.deleteIn=Jt.removeIn=Ot.removeIn,Jt.update=Ot.update,Jt.updateIn=Ot.updateIn,Jt.mergeIn=Ot.mergeIn,Jt.mergeDeepIn=Ot.mergeDeepIn,Jt.withMutations=Ot.withMutations,Jt.asMutable=Ot.asMutable,Jt.asImmutable=Ot.asImmutable,Jt.wasAltered=Ot.wasAltered,VNode.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&h;if(n>=this.array.length)return new VNode([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-p,r))===a&&o)return this}if(o&&!i)return this;var s=ae(this,t);if(!o)for(var u=0;u<n;u++)s.array[u]=void 0;return i&&(s.array[n]=i),s},VNode.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,i=r-1>>>e&h;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-p,r))===o&&i===this.array.length-1)return this}var a=ae(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var Zt,Qt,te={};function ee(t,e){var r=t._origin,n=t._capacity,i=le(n),o=t._tail;return a(t._root,t._level,0);function a(t,e,r){return 0===e?s(t,r):u(t,e,r)}function s(t,a){var s=a===i?o&&o.array:t&&t.array,u=a>r?0:r-a,c=n-a;return c>d&&(c=d),function(){if(u===c)return te;var t=e?--c:u++;return s&&s[t]}}function u(t,i,o){var s,u=t&&t.array,c=o>r?0:r-o>>i,l=1+(n-o>>i);return l>d&&(l=d),function(){for(;;){if(s){var t=s();if(t!==te)return t;s=null}if(c===l)return te;var r=e?--l:c++;s=a(u&&u[r],i-p,o+(r<<i))}}}}function re(t,e,r,n,i,o,a){var s=Object.create(Jt);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ne(){return Zt||(Zt=re(0,0,p))}function ie(t,e,r){if((e=_(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?ue(t,e).set(0,r):ue(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o=MakeRef(y);return e>=le(t._capacity)?n=oe(n,t.__ownerID,0,e,r,o):i=oe(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):re(t._origin,t._capacity,t._level,i,n):t}function oe(t,e,r,n,i,o){var a,s=n>>>r&h,u=t&&s<t.array.length;if(!u&&void 0===i)return t;if(r>0){var c=t&&t.array[s],l=oe(c,e,r-p,n,i,o);return l===c?t:((a=ae(t,e)).array[s]=l,a)}return u&&t.array[s]===i?t:(SetRef(o),a=ae(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function ae(t,e){return e&&t&&e===t.ownerID?t:new VNode(t?t.array.slice():[],e)}function se(t,e){if(e>=le(t._capacity))return t._tail;if(e<1<<t._level+p){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&h],n-=p;return r}}function ue(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new OwnerID,i=t._origin,o=t._capacity,a=i+e,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,l=0;a+l<0;)c=new VNode(c&&c.array.length?[void 0,c]:[],n),l+=1<<(u+=p);l&&(a+=l,i+=l,s+=l,o+=l);for(var f=le(o),d=le(s);d>=1<<u+p;)c=new VNode(c&&c.array.length?[c]:[],n),u+=p;var g=t._tail,v=d<f?se(t,s-1):d>f?new VNode([],n):g;if(g&&d>f&&a<o&&g.array.length){for(var y=c=ae(c,n),m=u;m>p;m-=p){var b=f>>>m&h;y=y.array[b]=ae(y.array[b],n)}y.array[f>>>p&h]=g}if(s<o&&(v=v&&v.removeAfter(n,0,s)),a>=d)a-=d,s-=d,u=p,c=null,v=v&&v.removeBefore(n,0,a);else if(a>i||d<f){for(l=0;c;){var _=a>>>u&h;if(_!==d>>>u&h)break;_&&(l+=(1<<u)*_),u-=p,c=c.array[_]}c&&a>i&&(c=c.removeBefore(n,u,a-l)),c&&d<f&&(c=c.removeAfter(n,u,d-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=c,t._tail=v,t.__hash=void 0,t.__altered=!0,t):re(a,s,u,c,v)}function ce(t,e,n){for(var i=[],o=0,a=0;a<n.length;a++){var s=n[a],u=IndexedIterable(s);u.size>o&&(o=u.size),r(s)||(u=u.map((function(t){return J(t)}))),i.push(u)}return o>t.size&&(t=t.setSize(o)),Kt(t,e,i)}function le(t){return t<d?0:t-1>>>p<<p}function OrderedMap(t){return null==t?de():fe(t)?t:de().withMutations((function(e){var r=KeyedIterable(t);St(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function fe(t){return wt(t)&&a(t)}function pe(t,e,r,n){var i=Object.create(OrderedMap.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function de(){return Qt||(Qt=pe(Dt(),ne()))}function he(t,e,r){var n,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(r===g){if(!u)return t;a.size>=d&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(r===a.get(s)[1])return t;n=o,i=a.set(s,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):pe(n,i)}function ToKeyedSequence(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ToIndexedSequence(t){this._iter=t,this.size=t.size}function ToSetSequence(t){this._iter=t,this.size=t.size}function FromEntriesSequence(t){this._iter=t,this.size=t.size}function ge(t){var e=ze(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Le,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(e===M){var n=t.__iterator(e,r);return new Iterator((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===k?C:k,r)},e}function ve(t,e,r){var n=ze(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,g);return o===g?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate((function(t,i,a){return!1!==n(e.call(r,t,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(M,i);return new Iterator((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return T(n,s,e.call(r,a[1],s,t),i)}))},n}function ye(t,e){var r=ze(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=ge(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Le,r.__iterate=function(e,r){var n=this;return t.__iterate((function(t,r){return e(t,r,n)}),!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function me(t,e,r,n){var i=ze(t);return n&&(i.has=function(n){var i=t.get(n,g);return i!==g&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,g);return o!==g&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate((function(t,o,u){if(e.call(r,t,o,u))return s++,i(t,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(M,o),s=0;return new Iterator((function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(e.call(r,l,c,t))return T(i,n?c:s++,l,o)}}))},i}function be(t,e,r){var n=Map().asMutable();return t.__iterate((function(i,o){n.update(e.call(r,i,o,t),0,(function(t){return t+1}))})),n.asImmutable()}function _e(t,e,r){var i=n(t),o=(a(t)?OrderedMap():Map()).asMutable();t.__iterate((function(n,a){o.update(e.call(r,n,a,t),(function(t){return(t=t||[]).push(i?[a,n]:n),t}))}));var s=Pe(t);return o.map((function(e){return Te(t,s(e))}))}function Se(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r|=0),w(e,r,i))return t;var o=x(e,i),a=E(r,i);if(o!=o||a!=a)return Se(t.toSeq().cacheResult(),e,r,n);var s,u=a-o;u==u&&(s=u<0?0:u);var c=ze(t);return c.size=0===s?s:t.size&&s||void 0,!n&&U(t)&&s>=0&&(c.get=function(e,r){return(e=_(this,e))>=0&&e<s?t.get(e+o,r):r}),c.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,u=!0,c=0;return t.__iterate((function(t,r){if(!u||!(u=a++<o))return c++,!1!==e(t,n?r:c-1,i)&&c!==s})),c},c.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);var i=0!==s&&t.__iterator(e,r),a=0,u=0;return new Iterator((function(){for(;a++<o;)i.next();if(++u>s)return R();var t=i.next();return n||e===k?t:T(e,u-1,e===C?void 0:t.value[1],t)}))},c}function we(t,e,r){var n=ze(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return t.__iterate((function(t,i,s){return e.call(r,t,i,s)&&++a&&n(t,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(M,i),s=!0;return new Iterator((function(){if(!s)return R();var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(r,c,u,o)?n===M?t:T(n,u,c,t):(s=!1,R())}))},n}function xe(t,e,r,n){var i=ze(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(M,o),u=!0,c=0;return new Iterator((function(){var t,o,l;do{if((t=s.next()).done)return n||i===k?t:T(i,c++,i===C?void 0:t.value[1],t);var f=t.value;o=f[0],l=f[1],u&&(u=e.call(r,l,o,a))}while(u);return i===M?t:T(i,o,l,t)}))},i}function Ee(t,e){var o=n(t),a=[t].concat(e).map((function(t){return r(t)?o&&(t=KeyedIterable(t)):t=o?H(t):W(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===a.length)return t;if(1===a.length){var s=a[0];if(s===t||o&&n(s)||i(t)&&i(s))return s}var u=new ArraySeq(a);return o?u=u.toKeyedSeq():i(t)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=a.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),u}function Oe(t,e,n){var i=ze(t);return i.__iterateUncached=function(i,o){var a=0,s=!1;function u(t,c){var l=this;t.__iterate((function(t,o){return(!e||c<e)&&r(t)?u(t,c+1):!1===i(t,n?o:a++,l)&&(s=!0),!s}),o)}return u(t,0),a},i.__iteratorUncached=function(i,o){var a=t.__iterator(i,o),s=[],u=0;return new Iterator((function(){for(;a;){var t=a.next();if(!1===t.done){var c=t.value;if(i===M&&(c=c[1]),e&&!(s.length<e)||!r(c))return n?t:T(i,u++,c,t);s.push(a),a=c.__iterator(i,o)}else a=s.pop()}return R()}))},i}function Ce(t,e,r){var n=Pe(t);return t.toSeq().map((function(i,o){return n(e.call(r,i,o,t))})).flatten(!0)}function ke(t,e){var r=ze(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate((function(t,n){return(!o||!1!==r(e,o++,i))&&!1!==r(t,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(k,n),a=0;return new Iterator((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?T(r,a++,e):T(r,a++,i.value,i)}))},r}function Me(t,e,r){e||(e=je);var o=n(t),a=0,s=t.toSeq().map((function(e,n){return[n,e,a++,r?r(e,n,t):e]})).toArray();return s.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(o?function(t,e){s[e].length=2}:function(t,e){s[e]=t[1]}),o?KeyedSeq(s):i(t)?IndexedSeq(s):SetSeq(s)}function De(t,e,r){if(e||(e=je),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return Ie(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return Ie(e,t,r)?r:t}))}function Ie(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Ae(t,e,r){var n=ze(t);return n.size=new ArraySeq(r).map((function(t){return t.size})).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(k,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},n.__iteratorUncached=function(t,n){var i=r.map((function(t){return t=Iterable(t),z(n?t.reverse():t)})),o=0,a=!1;return new Iterator((function(){var r;return a||(r=i.map((function(t){return t.next()})),a=r.some((function(t){return t.done}))),a?R():T(t,o++,e.apply(null,r.map((function(t){return t.value}))))}))},n}function Te(t,e){return U(t)?e:t.constructor(e)}function Re(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Be(t){return St(t.size),b(t)}function Pe(t){return n(t)?KeyedIterable:i(t)?IndexedIterable:SetIterable}function ze(t){return Object.create((n(t)?KeyedSeq:i(t)?IndexedSeq:SetSeq).prototype)}function Le(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function je(t,e){return t>e?1:t<e?-1:0}function Ne(t){var e=z(t);if(!e){if(!j(t))throw new TypeError("Expected iterable or array-like: "+t);e=z(Iterable(t))}return e}function Record(t,e){var r,n=function Record(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var a=Object.keys(t);Ue(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=Map(o)},i=n.prototype=Object.create(Ke);return i.constructor=n,n}e(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString("OrderedMap {","}")},OrderedMap.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):de()},OrderedMap.prototype.set=function(t,e){return he(this,t,e)},OrderedMap.prototype.remove=function(t){return he(this,t,g)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},OrderedMap.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},OrderedMap.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?pe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},OrderedMap.isOrderedMap=fe,OrderedMap.prototype[l]=!0,OrderedMap.prototype[f]=OrderedMap.prototype.remove,e(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(t,e){return this._iter.get(t,e)},ToKeyedSequence.prototype.has=function(t){return this._iter.has(t)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var t=this,e=ye(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ToKeyedSequence.prototype.map=function(t,e){var r=this,n=ve(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ToKeyedSequence.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Be(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ToKeyedSequence.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(k,e),n=e?Be(this):0;return new Iterator((function(){var i=r.next();return i.done?i:T(t,e?--n:n++,i.value,i)}))},ToKeyedSequence.prototype[l]=!0,e(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(t){return this._iter.includes(t)},ToIndexedSequence.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate((function(e){return t(e,n++,r)}),e)},ToIndexedSequence.prototype.__iterator=function(t,e){var r=this._iter.__iterator(k,e),n=0;return new Iterator((function(){var e=r.next();return e.done?e:T(t,n++,e.value,e)}))},e(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(t){return this._iter.includes(t)},ToSetSequence.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},ToSetSequence.prototype.__iterator=function(t,e){var r=this._iter.__iterator(k,e);return new Iterator((function(){var e=r.next();return e.done?e:T(t,e.value,e.value,e)}))},e(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){if(e){Re(e);var i=r(e);return t(i?e.get(1):e[1],i?e.get(0):e[0],n)}}),e)},FromEntriesSequence.prototype.__iterator=function(t,e){var n=this._iter.__iterator(k,e);return new Iterator((function(){for(;;){var e=n.next();if(e.done)return e;var i=e.value;if(i){Re(i);var o=r(i);return T(t,o?i.get(0):i[0],o?i.get(1):i[1],e)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=Le,e(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(Fe(this)+" {","}")},Record.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Record.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=qe(this,Dt()))},Record.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Fe(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:qe(this,r)},Record.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:qe(this,e)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(t,e){var r=this;return KeyedIterable(this._defaultValues).map((function(t,e){return r.get(e)})).__iterator(t,e)},Record.prototype.__iterate=function(t,e){var r=this;return KeyedIterable(this._defaultValues).map((function(t,e){return r.get(e)})).__iterate(t,e)},Record.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?qe(this,e,t):(this.__ownerID=t,this._map=e,this)};var Ke=Record.prototype;function qe(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Fe(t){return t._name||t.constructor.name||"Record"}function Ue(t,e){try{e.forEach(Ge.bind(void 0,t))}catch(t){}}function Ge(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){nt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Set(t){return null==t?Je():He(t)&&!a(t)?t:Je().withMutations((function(e){var r=SetIterable(t);St(r.size),r.forEach((function(t){return e.add(t)}))}))}function He(t){return!(!t||!t[Ve])}Ke[f]=Ke.remove,Ke.deleteIn=Ke.removeIn=Ot.removeIn,Ke.merge=Ot.merge,Ke.mergeWith=Ot.mergeWith,Ke.mergeIn=Ot.mergeIn,Ke.mergeDeep=Ot.mergeDeep,Ke.mergeDeepWith=Ot.mergeDeepWith,Ke.mergeDeepIn=Ot.mergeDeepIn,Ke.setIn=Ot.setIn,Ke.update=Ot.update,Ke.updateIn=Ot.updateIn,Ke.withMutations=Ot.withMutations,Ke.asMutable=Ot.asMutable,Ke.asImmutable=Ot.asImmutable,e(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(t){return this(KeyedIterable(t).keySeq())},Set.prototype.toString=function(){return this.__toString("Set {","}")},Set.prototype.has=function(t){return this._map.has(t)},Set.prototype.add=function(t){return Xe(this,this._map.set(t,!0))},Set.prototype.remove=function(t){return Xe(this,this._map.remove(t))},Set.prototype.clear=function(){return Xe(this,this._map.clear())},Set.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var r=0;r<e.length;r++)SetIterable(e[r]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},Set.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return SetIterable(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.every((function(t){return t.includes(r)}))||t.remove(r)}))}))},Set.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return SetIterable(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.some((function(t){return t.includes(r)}))&&t.remove(r)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(e){var r=t.call(arguments,1);return this.union.apply(this,r)},Set.prototype.sort=function(t){return OrderedSet(Me(this,t))},Set.prototype.sortBy=function(t,e){return OrderedSet(Me(this,e,t))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e,n){return t(n,n,r)}),e)},Set.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},Set.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Set.isSet=He;var We,Ve="@@__IMMUTABLE_SET__@@",Ye=Set.prototype;function Xe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function $e(t,e){var r=Object.create(Ye);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Je(){return We||(We=$e(Dt()))}function OrderedSet(t){return null==t?rr():Ze(t)?t:rr().withMutations((function(e){var r=SetIterable(t);St(r.size),r.forEach((function(t){return e.add(t)}))}))}function Ze(t){return He(t)&&a(t)}Ye[Ve]=!0,Ye[f]=Ye.remove,Ye.mergeDeep=Ye.merge,Ye.mergeDeepWith=Ye.mergeWith,Ye.withMutations=Ot.withMutations,Ye.asMutable=Ot.asMutable,Ye.asImmutable=Ot.asImmutable,Ye.__empty=Je,Ye.__make=$e,e(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(t){return this(KeyedIterable(t).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString("OrderedSet {","}")},OrderedSet.isOrderedSet=Ze;var Qe,tr=OrderedSet.prototype;function er(t,e){var r=Object.create(tr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function rr(){return Qe||(Qe=er(de()))}function Stack(t){return null==t?ur():nr(t)?t:ur().unshiftAll(t)}function nr(t){return!(!t||!t[or])}tr[l]=!0,tr.__empty=rr,tr.__make=er,e(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString("Stack [","]")},Stack.prototype.get=function(t,e){var r=this._head;for(t=_(this,t);r&&t--;)r=r.next;return r?r.value:e},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):sr(t,e)},Stack.prototype.pushAll=function(t){if(0===(t=IndexedIterable(t)).size)return this;St(t.size);var e=this.size,r=this._head;return t.reverse().forEach((function(t){e++,r={value:t,next:r}})),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):sr(e,r)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(t){return this.pushAll(t)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.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):ur()},Stack.prototype.slice=function(t,e){if(w(t,e,this.size))return this;var r=x(t,this.size);if(E(e,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,t,e);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):sr(n,i)},Stack.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?sr(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Stack.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},Stack.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new Iterator((function(){if(n){var e=n.value;return n=n.next,T(t,r++,e)}return R()}))},Stack.isStack=nr;var ir,or="@@__IMMUTABLE_STACK__@@",ar=Stack.prototype;function sr(t,e,r,n){var i=Object.create(ar);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ur(){return ir||(ir=sr(0))}function cr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}ar[or]=!0,ar.withMutations=Ot.withMutations,ar.asMutable=Ot.asMutable,ar.asImmutable=Ot.asImmutable,ar.wasAltered=Ot.wasAltered,Iterable.Iterator=Iterator,cr(Iterable,{toArray:function(){St(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,r){t[r]=e})),t},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){St(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(n(this)?this.valueSeq():this)},toSet:function(){return Set(n(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return i(this)?this.toIndexedSeq():n(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(n(this)?this.valueSeq():this)},toList:function(){return List(n(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return Te(this,Ee(this,t.call(arguments,0)))},includes:function(t){return this.some((function(e){return et(e,t)}))},entries:function(){return this.__iterator(M)},every:function(t,e){St(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1})),r},filter:function(t,e){return Te(this,me(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},findEntry:function(t,e){var r;return this.__iterate((function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1})),r},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return St(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){St(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(C)},map:function(t,e){return Te(this,ve(this,t,e))},reduce:function(t,e,r){var n,i;return St(this.size),arguments.length<2?i=!0:n=e,this.__iterate((function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)})),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return Te(this,ye(this,!0))},slice:function(t,e){return Te(this,Se(this,t,e,!0))},some:function(t,e){return!this.every(hr(t),e)},sort:function(t){return Te(this,Me(this,t))},values:function(){return this.__iterator(k)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return b(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return be(this,t,e)},equals:function(t){return rt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ArraySeq(t._cache);var e=t.toSeq().map(dr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(hr(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(S)},flatMap:function(t,e){return Te(this,Ce(this,t,e))},flatten:function(t){return Te(this,Oe(this,t,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(t,e){return this.find((function(e,r){return et(r,t)}),void 0,e)},getIn:function(t,e){for(var r,n=this,i=Ne(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,g):g)===g)return e}return n},groupBy:function(t,e){return _e(this,t,e)},has:function(t){return this.get(t,g)!==g},hasIn:function(t){return this.getIn(t,g)!==g},isSubset:function(t){return t="function"==typeof t.includes?t:Iterable(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:Iterable(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(pr).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return De(this,t)},maxBy:function(t,e){return De(this,e,t)},min:function(t){return De(this,t?gr(t):mr)},minBy:function(t,e){return De(this,e?gr(e):mr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Te(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Te(this,xe(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(hr(t),e)},sortBy:function(t,e){return Te(this,Me(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Te(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Te(this,we(this,t,e))},takeUntil:function(t,e){return this.takeWhile(hr(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=br(this))}});var lr=Iterable.prototype;lr[s]=!0,lr[A]=lr.values,lr.__toJS=lr.toArray,lr.__toStringMapper=vr,lr.inspect=lr.toSource=function(){return this.toString()},lr.chain=lr.flatMap,lr.contains=lr.includes,function(){try{Object.defineProperty(lr,"length",{get:function(){if(!Iterable.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),cr(KeyedIterable,{flip:function(){return Te(this,ge(this))},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey((function(e){return et(e,t)}))},lastKeyOf:function(t){return this.findLastKey((function(e){return et(e,t)}))},mapEntries:function(t,e){var r=this,n=0;return Te(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Te(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var fr=KeyedIterable.prototype;function pr(t,e){return e}function dr(t,e){return[e,t]}function hr(t){return function(){return!t.apply(this,arguments)}}function gr(t){return function(){return-t.apply(this,arguments)}}function vr(t){return"string"==typeof t?JSON.stringify(t):t}function yr(){return m(arguments)}function mr(t,e){return t<e?1:t>e?-1:0}function br(t){if(t.size===1/0)return 0;var e=a(t),r=n(t),i=e?1:0;return _r(t.__iterate(r?e?function(t,e){i=31*i+Sr(at(t),at(e))|0}:function(t,e){i=i+Sr(at(t),at(e))|0}:e?function(t){i=31*i+at(t)|0}:function(t){i=i+at(t)|0}),i)}function _r(t,e){return e=it(e,3432918353),e=it(e<<15|e>>>-15,461845907),e=it(e<<13|e>>>-13,5),e=it((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ot((e=it(e^e>>>13,3266489909))^e>>>16)}function Sr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return fr[u]=!0,fr[A]=lr.entries,fr.__toJS=lr.toObject,fr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+vr(t)},cr(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(t,e){return Te(this,me(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return Te(this,ye(this,!1))},slice:function(t,e){return Te(this,Se(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=x(t,t<0?this.count():this.size);var n=this.slice(0,t);return Te(this,1===r?n:n.concat(m(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Te(this,Oe(this,t,!1))},get:function(t,e){return(t=_(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=_(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Te(this,ke(this,t))},interleave:function(){var t=[this].concat(m(arguments)),e=Ae(this.toSeq(),IndexedSeq.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Te(this,r)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Te(this,xe(this,t,e,!1))},zip:function(){return Te(this,Ae(this,yr,[this].concat(m(arguments))))},zipWith:function(t){var e=m(arguments);return e[0]=this,Te(this,Ae(this,t,e))}}),IndexedIterable.prototype[c]=!0,IndexedIterable.prototype[l]=!0,cr(SetIterable,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=lr.includes,cr(KeyedSeq,KeyedIterable.prototype),cr(IndexedSeq,IndexedIterable.prototype),cr(SetSeq,SetIterable.prototype),cr(KeyedCollection,KeyedIterable.prototype),cr(IndexedCollection,IndexedIterable.prototype),cr(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is:et,fromJS:J}}()},84967:(t,e,r)=>{"use strict";r.d(e,{parseToRgb:()=>b,readableColor:()=>M,rgbToColorString:()=>D,rgba:()=>x});var n=r(97326),i=r(94578),o=r(52146);var a=function(t){function PolishedError(e){var r;return r=t.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+e+" for more information.")||this,(0,n.default)(r)}return(0,i.default)(PolishedError,t),PolishedError}((0,o.default)(Error));function s(t){return Math.round(255*t)}function u(t,e,r){return s(t)+","+s(e)+","+s(r)}function c(t,e,r,n){if(void 0===n&&(n=u),0===e)return n(r,r,r);var i=(t%360+360)%360/60,o=(1-Math.abs(2*r-1))*e,a=o*(1-Math.abs(i%2-1)),s=0,c=0,l=0;i>=0&&i<1?(s=o,c=a):i>=1&&i<2?(s=a,c=o):i>=2&&i<3?(c=o,l=a):i>=3&&i<4?(c=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);var f=r-o/2;return n(s+f,c+f,l+f)}var l={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var f=/^#[a-fA-F0-9]{6}$/,p=/^#[a-fA-F0-9]{8}$/,d=/^#[a-fA-F0-9]{3}$/,h=/^#[a-fA-F0-9]{4}$/,g=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,v=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,y=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,m=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function b(t){if("string"!=typeof t)throw new a(3);var e=function(t){if("string"!=typeof t)return t;var e=t.toLowerCase();return l[e]?"#"+l[e]:t}(t);if(e.match(f))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(p)){var r=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alpha:r}}if(e.match(d))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(h)){var n=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:n}}var i=g.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=v.exec(e.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var s=y.exec(e);if(s){var u="rgb("+c(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",b=g.exec(u);if(!b)throw new a(4,e,u);return{red:parseInt(""+b[1],10),green:parseInt(""+b[2],10),blue:parseInt(""+b[3],10)}}var _=m.exec(e.substring(0,50));if(_){var S="rgb("+c(parseInt(""+_[1],10),parseInt(""+_[2],10)/100,parseInt(""+_[3],10)/100)+")",w=g.exec(S);if(!w)throw new a(4,e,S);return{red:parseInt(""+w[1],10),green:parseInt(""+w[2],10),blue:parseInt(""+w[3],10),alpha:parseFloat(""+_[4])>1?parseFloat(""+_[4])/100:parseFloat(""+_[4])}}throw new a(5)}var _=function(t){return 7===t.length&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t};function S(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function w(t,e,r){if("number"==typeof t&&"number"==typeof e&&"number"==typeof r)return _("#"+S(t)+S(e)+S(r));if("object"==typeof t&&void 0===e&&void 0===r)return _("#"+S(t.red)+S(t.green)+S(t.blue));throw new a(6)}function x(t,e,r,n){if("string"==typeof t&&"number"==typeof e){var i=b(t);return"rgba("+i.red+","+i.green+","+i.blue+","+e+")"}if("number"==typeof t&&"number"==typeof e&&"number"==typeof r&&"number"==typeof n)return n>=1?w(t,e,r):"rgba("+t+","+e+","+r+","+n+")";if("object"==typeof t&&void 0===e&&void 0===r&&void 0===n)return t.alpha>=1?w(t.red,t.green,t.blue):"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")";throw new a(7)}function E(t){if("transparent"===t)return 0;var e=b(t),r=Object.keys(e).map((function(t){var r=e[t]/255;return r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)})),n=r[0],i=r[1],o=r[2];return parseFloat((.2126*n+.7152*i+.0722*o).toFixed(3))}function O(t,e){var r=E(t),n=E(e);return parseFloat((r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)).toFixed(2))}var C="#000",k="#fff";function M(t,e,r,n){void 0===e&&(e=C),void 0===r&&(r=k),void 0===n&&(n=!0);var i=E(t)>.179,o=i?e:r;return!n||O(t,o)>=4.5?o:i?C:k}function D(t){if("object"==typeof t&&"number"==typeof t.red&&"number"==typeof t.green&&"number"==typeof t.blue)return"number"==typeof t.alpha?x({red:t.red,green:t.green,blue:t.blue,alpha:t.alpha}):w({red:t.red,green:t.green,blue:t.blue});throw new a(46)}},38698:(t,e,r)=>{"use strict";var n=r(27418),i=r(67294);function o(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=60106,s=60107,u=60108,c=60114,l=60109,f=60110,p=60112,d=60113,h=60120,g=60115,v=60116,y=60121,m=60117,b=60119,_=60129,S=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;a=w("react.portal"),s=w("react.fragment"),u=w("react.strict_mode"),c=w("react.profiler"),l=w("react.provider"),f=w("react.context"),p=w("react.forward_ref"),d=w("react.suspense"),h=w("react.suspense_list"),g=w("react.memo"),v=w("react.lazy"),y=w("react.block"),m=w("react.fundamental"),b=w("react.scope"),_=w("react.debug_trace_mode"),S=w("react.legacy_hidden")}function x(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case s:return"Fragment";case a:return"Portal";case c:return"Profiler";case u:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case f:return(t.displayName||"Context")+".Consumer";case l:return(t._context.displayName||"Context")+".Provider";case p:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case g:return x(t.type);case y:return x(t._render);case v:e=t._payload,t=t._init;try{return x(t(e))}catch(t){}}return null}var E=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O={};function C(t,e){for(var r=0|t._threadCount;r<=e;r++)t[r]=t._currentValue2,t._threadCount=r+1}for(var k=new Uint16Array(16),M=0;15>M;M++)k[M]=M+1;k[15]=0;var D=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,I=Object.prototype.hasOwnProperty,A={},T={};function R(t){return!!I.call(T,t)||!I.call(A,t)&&(D.test(t)?T[t]=!0:(A[t]=!0,!1))}function B(t,e,r,n,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){P[t]=new B(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];P[e]=new B(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){P[t]=new B(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){P[t]=new B(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){P[t]=new B(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){P[t]=new B(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){P[t]=new B(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){P[t]=new B(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){P[t]=new B(t,5,!1,t.toLowerCase(),null,!1,!1)}));var z=/[\-:]([a-z])/g;function L(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(z,L);P[e]=new B(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(z,L);P[e]=new B(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(z,L);P[e]=new B(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){P[t]=new B(t,1,!1,t.toLowerCase(),null,!1,!1)})),P.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){P[t]=new B(t,1,!1,t.toLowerCase(),null,!0,!0)}));var j=/["'&<>]/;function N(t){if("boolean"==typeof t||"number"==typeof t)return""+t;t=""+t;var e=j.exec(t);if(e){var r,n="",i=0;for(r=e.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#x27;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}i!==r&&(n+=t.substring(i,r)),i=r+1,n+=e}t=i!==r?n+t.substring(i,r):n}return t}function K(t,e){var r,n=P.hasOwnProperty(t)?P[t]:null;return(r="style"!==t)&&(r=null!==n?0===n.type:2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])),r||function(t,e,r,n){if(null==e||function(t,e,r,n){if(null!==r&&0===r.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(t,e,n,!1)?"":null!==n?(t=n.attributeName,3===(r=n.type)||4===r&&!0===e?t+'=""':(n.sanitizeURL&&(e=""+e),t+'="'+N(e)+'"')):R(t)?t+'="'+N(e)+'"':""}var q="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},F=null,U=null,G=null,H=!1,W=!1,V=null,Y=0;function X(){if(null===F)throw Error(o(321));return F}function Ba(){if(0<Y)throw Error(o(312));return{memoizedState:null,queue:null,next:null}}function Ca(){return null===G?null===U?(H=!1,U=G=Ba()):(H=!0,G=U):null===G.next?(H=!1,G=G.next=Ba()):(H=!0,G=G.next),G}function Da(t,e,r,n){for(;W;)W=!1,Y+=1,G=null,r=t(e,n);return Ea(),r}function Ea(){F=null,W=!1,U=null,Y=0,G=V=null}function Fa(t,e){return"function"==typeof e?e(t):e}function Ga(t,e,r){if(F=X(),G=Ca(),H){var n=G.queue;if(e=n.dispatch,null!==V&&void 0!==(r=V.get(n))){V.delete(n),n=G.memoizedState;do{n=t(n,r.action),r=r.next}while(null!==r);return G.memoizedState=n,[n,e]}return[G.memoizedState,e]}return t=t===Fa?"function"==typeof e?e():e:void 0!==r?r(e):e,G.memoizedState=t,t=(t=G.queue={last:null,dispatch:null}).dispatch=Ha.bind(null,F,t),[G.memoizedState,t]}function Ia(t,e){if(F=X(),e=void 0===e?null:e,null!==(G=Ca())){var r=G.memoizedState;if(null!==r&&null!==e){var n=r[1];t:if(null===n)n=!1;else{for(var i=0;i<n.length&&i<e.length;i++)if(!q(e[i],n[i])){n=!1;break t}n=!0}if(n)return r[0]}}return t=t(),G.memoizedState=[t,e],t}function Ha(t,e,r){if(!(25>Y))throw Error(o(301));if(t===F)if(W=!0,t={action:r,next:null},null===V&&(V=new Map),void 0===(r=V.get(e)))V.set(e,t);else{for(e=r;null!==e.next;)e=e.next;e.next=t}}function Ja(){}var $=null,J={readContext:function(t){var e=$.threadID;return C(t,e),t[e]},useContext:function(t){X();var e=$.threadID;return C(t,e),t[e]},useMemo:Ia,useReducer:Ga,useRef:function(t){F=X();var e=(G=Ca()).memoizedState;return null===e?(t={current:t},G.memoizedState=t):e},useState:function(t){return Ga(Fa,t)},useLayoutEffect:function(){},useCallback:function(t,e){return Ia((function(){return t}),e)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(t){return X(),t},useTransition:function(){return X(),[function(t){t()},!1]},useOpaqueIdentifier:function(){return($.identifierPrefix||"")+"R:"+($.uniqueID++).toString(36)},useMutableSource:function(t,e){return X(),e(t._source)}},Z="http://www.w3.org/1999/xhtml";function Ma(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var Q={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},tt=n({menuitem:!0},Q),et={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rt=["Webkit","ms","Moz","O"];Object.keys(et).forEach((function(t){rt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),et[e]=et[t]}))}));var nt=/([A-Z])/g,it=/^ms-/,ot=i.Children.toArray,at=E.ReactCurrentDispatcher,st={listing:!0,pre:!0,textarea:!0},ut=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ct={},lt={};var ft=Object.prototype.hasOwnProperty,pt={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function dt(t,e){if(void 0===t)throw Error(o(152,x(e)||"Component"))}function ht(t,e,r){function a(i,a){var s=a.prototype&&a.prototype.isReactComponent,u=function(t,e,r,n){if(n&&"object"==typeof(n=t.contextType)&&null!==n)return C(n,r),n[r];if(t=t.contextTypes){for(var i in r={},t)r[i]=e[i];e=r}else e=O;return e}(a,e,r,s),c=[],l=!1,f={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===c)return null},enqueueReplaceState:function(t,e){l=!0,c=[e]},enqueueSetState:function(t,e){if(null===c)return null;c.push(e)}};if(s){if(s=new a(i.props,u,f),"function"==typeof a.getDerivedStateFromProps){var p=a.getDerivedStateFromProps.call(null,i.props,s.state);null!=p&&(s.state=n({},s.state,p))}}else if(F={},s=a(i.props,u,f),null==(s=Da(a,i.props,s,u))||null==s.render)return void dt(t=s,a);if(s.props=i.props,s.context=u,s.updater=f,void 0===(f=s.state)&&(s.state=f=null),"function"==typeof s.UNSAFE_componentWillMount||"function"==typeof s.componentWillMount)if("function"==typeof s.componentWillMount&&"function"!=typeof a.getDerivedStateFromProps&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&"function"!=typeof a.getDerivedStateFromProps&&s.UNSAFE_componentWillMount(),c.length){f=c;var d=l;if(c=null,l=!1,d&&1===f.length)s.state=f[0];else{p=d?f[0]:s.state;var h=!0;for(d=d?1:0;d<f.length;d++){var g=f[d];null!=(g="function"==typeof g?g.call(s,p,i.props,u):g)&&(h?(h=!1,p=n({},p,g)):n(p,g))}s.state=p}}else c=null;if(dt(t=s.render(),a),"function"==typeof s.getChildContext&&"object"==typeof(i=a.childContextTypes)){var v=s.getChildContext();for(var y in v)if(!(y in i))throw Error(o(108,x(a)||"Unknown",y))}v&&(e=n({},e,v))}for(;i.isValidElement(t);){var s=t,u=s.type;if("function"!=typeof u)break;a(s,u)}return{child:t,context:e}}var gt=function(){function t(t,e,r){i.isValidElement(t)?t.type!==s?t=[t]:(t=t.props.children,t=i.isValidElement(t)?[t]:ot(t)):t=ot(t),t={type:null,domNamespace:Z,children:t,childIndex:0,context:O,footer:""};var n=k[0];if(0===n){var a=k,u=2*(n=a.length);if(!(65536>=u))throw Error(o(304));var c=new Uint16Array(u);for(c.set(a),(k=c)[0]=n+1,a=n;a<u-1;a++)k[a]=a+1;k[u-1]=0}else k[0]=k[n];this.threadID=n,this.stack=[t],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=e,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[],this.uniqueID=0,this.identifierPrefix=r&&r.identifierPrefix||""}var e=t.prototype;return e.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var t=this.threadID;k[t]=k[0],k[0]=t}},e.pushProvider=function(t){var e=++this.contextIndex,r=t.type._context,n=this.threadID;C(r,n);var i=r[n];this.contextStack[e]=r,this.contextValueStack[e]=i,r[n]=t.props.value},e.popProvider=function(){var t=this.contextIndex,e=this.contextStack[t],r=this.contextValueStack[t];this.contextStack[t]=null,this.contextValueStack[t]=null,this.contextIndex--,e[this.threadID]=r},e.clearProviders=function(){for(var t=this.contextIndex;0<=t;t--)this.contextStack[t][this.threadID]=this.contextValueStack[t]},e.read=function(t){if(this.exhausted)return null;var e=$;$=this;var r=at.current;at.current=J;try{for(var n=[""],i=!1;n[0].length<t;){if(0===this.stack.length){this.exhausted=!0;var a=this.threadID;k[a]=k[0],k[0]=a;break}var s=this.stack[this.stack.length-1];if(i||s.childIndex>=s.children.length){var u=s.footer;if(""!==u&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===l)this.popProvider(s.type);else if(s.type===d){this.suspenseDepth--;var c=n.pop();if(i){i=!1;var f=s.fallbackFrame;if(!f)throw Error(o(303));this.stack.push(f),n[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}n[this.suspenseDepth]+=c}n[this.suspenseDepth]+=u}else{var p=s.children[s.childIndex++],h="";try{h+=this.render(p,s.context,s.domNamespace)}catch(t){if(null!=t&&"function"==typeof t.then)throw Error(o(294));throw t}n.length<=this.suspenseDepth&&n.push(""),n[this.suspenseDepth]+=h}}return n[0]}finally{at.current=r,$=e,Ea()}},e.render=function(t,e,r){if("string"==typeof t||"number"==typeof t)return""===(r=""+t)?"":this.makeStaticMarkup?N(r):this.previousWasTextNode?"\x3c!-- --\x3e"+N(r):(this.previousWasTextNode=!0,N(r));if(t=(e=ht(t,e,this.threadID)).child,e=e.context,null===t||!1===t)return"";if(!i.isValidElement(t)){if(null!=t&&null!=t.$$typeof){if((r=t.$$typeof)===a)throw Error(o(257));throw Error(o(258,r.toString()))}return t=ot(t),this.stack.push({type:null,domNamespace:r,children:t,childIndex:0,context:e,footer:""}),""}var y=t.type;if("string"==typeof y)return this.renderDOM(t,e,r);switch(y){case S:case _:case u:case c:case h:case s:return t=ot(t.props.children),this.stack.push({type:null,domNamespace:r,children:t,childIndex:0,context:e,footer:""}),"";case d:throw Error(o(294));case b:throw Error(o(343))}if("object"==typeof y&&null!==y)switch(y.$$typeof){case p:F={};var w=y.render(t.props,t.ref);return w=Da(y.render,t.props,w,t.ref),w=ot(w),this.stack.push({type:null,domNamespace:r,children:w,childIndex:0,context:e,footer:""}),"";case g:return t=[i.createElement(y.type,n({ref:t.ref},t.props))],this.stack.push({type:null,domNamespace:r,children:t,childIndex:0,context:e,footer:""}),"";case l:return r={type:t,domNamespace:r,children:y=ot(t.props.children),childIndex:0,context:e,footer:""},this.pushProvider(t),this.stack.push(r),"";case f:y=t.type,w=t.props;var x=this.threadID;return C(y,x),y=ot(w.children(y[x])),this.stack.push({type:t,domNamespace:r,children:y,childIndex:0,context:e,footer:""}),"";case m:throw Error(o(338));case v:return y=(w=(y=t.type)._init)(y._payload),t=[i.createElement(y,n({ref:t.ref},t.props))],this.stack.push({type:null,domNamespace:r,children:t,childIndex:0,context:e,footer:""}),""}throw Error(o(130,null==y?y:typeof y,""))},e.renderDOM=function(t,e,r){var a=t.type.toLowerCase();if(r===Z&&Ma(a),!ct.hasOwnProperty(a)){if(!ut.test(a))throw Error(o(65,a));ct[a]=!0}var s=t.props;if("input"===a)s=n({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===a){var u=s.value;if(null==u){u=s.defaultValue;var c=s.children;if(null!=c){if(null!=u)throw Error(o(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(o(93));c=c[0]}u=""+c}null==u&&(u="")}s=n({},s,{value:void 0,children:""+u})}else if("select"===a)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=n({},s,{value:void 0});else if("option"===a){c=this.currentSelectValue;var l=function Xa(t){if(null==t)return t;var e="";return i.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(s.children);if(null!=c){var f=null!=s.value?s.value+"":l;if(u=!1,Array.isArray(c)){for(var p=0;p<c.length;p++)if(""+c[p]===f){u=!0;break}}else u=""+c===f;s=n({selected:void 0,children:void 0},s,{selected:u,children:l})}}if(u=s){if(tt[a]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(o(137,a));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(o(60));if("object"!=typeof u.dangerouslySetInnerHTML||!("__html"in u.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(o(62))}u=s,c=this.makeStaticMarkup,l=1===this.stack.length,f="<"+t.type;t:if(-1===a.indexOf("-"))p="string"==typeof u.is;else switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":p=!1;break t;default:p=!0}for(S in u)if(ft.call(u,S)){var d=u[S];if(null!=d){if("style"===S){var h=void 0,g="",v="";for(h in d)if(d.hasOwnProperty(h)){var y=0===h.indexOf("--"),m=d[h];if(null!=m){if(y)var b=h;else if(b=h,lt.hasOwnProperty(b))b=lt[b];else{var _=b.replace(nt,"-$1").toLowerCase().replace(it,"-ms-");b=lt[b]=_}g+=v+b+":",v=h,g+=y=null==m||"boolean"==typeof m||""===m?"":y||"number"!=typeof m||0===m||et.hasOwnProperty(v)&&et[v]?(""+m).trim():m+"px",v=";"}}d=g||null}h=null,p?pt.hasOwnProperty(S)||(h=R(h=S)&&null!=d?h+'="'+N(d)+'"':""):h=K(S,d),h&&(f+=" "+h)}}c||l&&(f+=' data-reactroot=""');var S=f;u="",Q.hasOwnProperty(a)?S+="/>":(S+=">",u="</"+t.type+">");t:{if(null!=(c=s.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break t}}else if("string"==typeof(c=s.children)||"number"==typeof c){c=N(c);break t}c=null}return null!=c?(s=[],st.hasOwnProperty(a)&&"\n"===c.charAt(0)&&(S+="\n"),S+=c):s=ot(s.children),t=t.type,r=null==r||"http://www.w3.org/1999/xhtml"===r?Ma(t):"http://www.w3.org/2000/svg"===r&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":r,this.stack.push({domNamespace:r,type:a,children:s,childIndex:0,context:e,footer:u}),this.previousWasTextNode=!1,S},t}();e.renderToStaticMarkup=function(t,e){t=new gt(t,!0,e);try{return t.read(1/0)}finally{t.destroy()}}},73935:(t,e,r)=>{"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=r(64448)},97762:(t,e,r)=>{"use strict";t.exports=r(38698)},26858:(t,e,r)=>{"use strict";function n(t,e){for(var r=t.length,n=0;n<r;++n)if(e(t[n],n))return!0;return!1}function i(t,e){for(var r=t.length,n=0;n<r;++n)if(e(t[n],n))return t[n];return null}function o(t){var e=t;if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}function a(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function s(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var t=navigator.userAgentData,e=t.brands||t.uaList;return!(!e||!e.length)}function u(t){return t.replace(/_/g,".")}function c(t,e){var r=null,i="-1";return n(t,(function(t){var n=a("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",e);return!(!n||t.brand)&&(r=t,i=n[3]||"-1",t.versionAlias?i=t.versionAlias:t.versionTest&&(i=function(t,e){var r=a("("+t+")((?:\\/|\\s|:)([0-9|\\.|_]+))",e);return r?r[3]:""}(t.versionTest.toLowerCase(),e)||i),i=u(i),!0)})),{preset:r,version:i}}function l(t,e){var r={brand:"",version:"-1"};return n(t,(function(t){var n=f(e,t);return!!n&&(r.brand=t.id,r.version=t.versionAlias||n.version,"-1"!==r.version)})),r}function f(t,e){return i(t,(function(t){var r=t.brand;return a(""+e.test,r.toLowerCase())}))}r.d(e,{default:()=>ka});var p=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],d=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],h=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],g=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],v=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function y(t){return!!c(g,t).preset}function m(t){var e=navigator.userAgentData,r=(e.uaList||e.brands).slice(),a=t&&t.fullVersionList,s=e.mobile||!1,c=r[0],m=(t&&t.platform||e.platform||navigator.platform).toLowerCase(),b={name:c.brand,version:c.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!l(g,r).brand||y(o())},_={name:"unknown",version:"-1",majorVersion:-1};b.webkit=!b.chromium&&n(h,(function(t){return f(r,t)}));var S=l(d,r);if(b.chromium=!!S.brand,b.chromiumVersion=S.version,!b.chromium){var w=l(h,r);b.webkit=!!w.brand,b.webkitVersion=w.version}var x=i(v,(function(t){return new RegExp(""+t.test,"g").exec(m)}));if(_.name=x?x.id:"",t&&(_.version=t.platformVersion),a&&a.length){var E=l(p,a);b.name=E.brand||b.name,b.version=E.version||b.version}else{var O=l(p,r);b.name=O.brand||b.name,b.version=O.brand&&t?t.uaFullVersion:O.version}return b.webkit&&(_.name=s?"ios":"mac"),"ios"===_.name&&b.webview&&(b.version="-1"),_.version=u(_.version),b.version=u(b.version),_.majorVersion=parseInt(_.version,10),b.majorVersion=parseInt(b.version,10),{browser:b,os:_,isMobile:s,isHints:!0}}function b(t){return void 0===t&&s()?m():function(t){var e=o(t),r=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:y(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},a=c(p,e),s=a.preset,u=a.version,l=c(v,e),f=l.preset,g=l.version,m=c(d,e);if(n.chromium=!!m.preset,n.chromiumVersion=m.version,!n.chromium){var b=c(h,e);n.webkit=!!b.preset,n.webkitVersion=b.version}return f&&(i.name=f.id,i.version=g,i.majorVersion=parseInt(g,10)),s&&(n.name=s.id,n.version=u,n.webview&&"ios"===i.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:r,isHints:!1}}(t)}const _=b;function S(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.map((function(e){return e.split(" ").map((function(e){return e?""+t+e:""})).join(" ")})).join(" ")}function w(t,e){return function(r){r&&(t[e]=r)}}function x(t,e,r){return function(n){n&&(t[e][r]=n)}}var E="function",O="object",C="string",k="number",M="undefined",D=typeof window!==M,I=(typeof document!==M&&document,[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}]),A=1e-7,T={cm:function(t){return 96*t/2.54},mm:function(t){return 96*t/254},in:function(t){return 96*t},pt:function(t){return 96*t/72},pc:function(t){return 96*t/6},"%":function(t,e){return t*e/100},vw:function(t,e){return void 0===e&&(e=window.innerWidth),t/100*e},vh:function(t,e){return void 0===e&&(e=window.innerHeight),t/100*e},vmax:function(t,e){return void 0===e&&(e=Math.max(window.innerWidth,window.innerHeight)),t/100*e},vmin:function(t,e){return void 0===e&&(e=Math.min(window.innerWidth,window.innerHeight)),t/100*e}};function R(t,e,r,n){return(t*n+e*r)/(r+n)}function B(t){return typeof t===M}function P(t){return t&&typeof t===O}function z(t){return Array.isArray(t)}function L(t){return typeof t===C}function j(t){return typeof t===k}function N(t){return typeof t===E}function K(t,e,r,n,i){return q(t,e,r)?r:function(t,e,r,n,i){for(var o,a=function(r){var a=e[r].trim();if(a===t.close&&!q(t,e,r))return{value:r};var s=r,u=X(i,(function(t){return t.open===a}));if(u&&(s=K(u,e,r,n,i)),-1===s)return o=r,"break";o=r=s},s=r;s<n;++s){var u=a(s);if(s=o,"object"==typeof u)return u.value;if("break"===u)break}return-1}(t,e,r+1,n,i)}function q(t,e,r){if(!t.ignore)return null;var n=e.slice(Math.max(r-3,0),r+3).join("");return new RegExp(t.ignore).exec(n)}function F(t,e){var r=L(e)?{separator:e}:e,n=r.separator,i=void 0===n?",":n,o=r.isSeparateFirst,a=r.isSeparateOnlyOpenClose,s=r.isSeparateOpenClose,u=void 0===s?a:s,c=r.openCloseCharacters,l=void 0===c?I:c,f=l.map((function(t){var e=t.open,r=t.close;return e===r?e:e+"|"+r})).join("|"),p=new RegExp("(\\s*"+i+"\\s*|"+f+"|\\s+)","g"),d=t.split(p).filter(Boolean),h=d.length,g=[],v=[];function y(){return!!v.length&&(g.push(v.join("")),v=[],!0)}for(var m,b=function(e){var r=d[e].trim(),n=e,s=X(l,(function(t){return t.open===r})),c=X(l,(function(t){return t.close===r}));if(s){if(-1!==(n=K(s,d,e,h,l))&&u)return y()&&o?(m=e,"break"):(g.push(d.slice(e,n+1).join("")),e=n,o?(m=e,"break"):(m=e,"continue"))}else{if(c&&!q(c,d,e)){var f=function __spreadArrays(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}(l);return f.splice(l.indexOf(c),1),{value:F(t,{separator:i,isSeparateFirst:o,isSeparateOnlyOpenClose:a,isSeparateOpenClose:u,openCloseCharacters:f})}}if(function(t,e){return(""===e||" "==e)&&(""===t||" "==t)||t===e}(r,i)&&!a)return y(),o?(m=e,"break"):(m=e,"continue")}-1===n&&(n=h-1),v.push(d.slice(e,n+1).join("")),m=e=n},_=0;_<h;++_){var S=b(_);if(_=m,"object"==typeof S)return S.value;if("break"===S)break}return v.length&&g.push(v.join("")),g}function U(t){return F(t,"")}function G(t){return F(t,",")}function H(t){var e=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(t);return!e||e.length<4?{}:{prefix:e[1],value:e[2],suffix:e[3]}}function W(t){var e=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(t);if(!e)return{prefix:"",unit:"",value:NaN};var r=e[1],n=e[2];return{prefix:r,unit:e[3],value:parseFloat(n)}}function V(){return Date.now?Date.now():(new Date).getTime()}function Y(t,e,r){void 0===r&&(r=-1);for(var n=t.length,i=0;i<n;++i)if(e(t[i],i,t))return i;return r}function X(t,e,r){var n=Y(t,e);return n>-1?t[n]:r}var $=function(){var t=V(),e=D&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return e?e.bind(window):function(e){var r=V();return window.setTimeout((function(){e(r-t)}),1e3/60)}}(),J=function(){var t=D&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return t?t.bind(window):function(t){clearTimeout(t)}}();function Z(t){return Object.keys(t)}function Q(t,e){var r=W(t),n=r.value,i=r.unit;if(P(e)){var o=e[i];if(o){if(N(o))return o(n);if(T[i])return T[i](n,o)}}else if("%"===i)return n*e/100;return T[i]?T[i](n):n}function tt(t,e,r){return Math.max(e,Math.min(t,r))}function et(t,e,r,n){return void 0===n&&(n=t[0]/t[1]),[[at(e[0],A),at(e[0]/n,A)],[at(e[1]*n,A),at(e[1],A)]].filter((function(t){return t.every((function(t,n){var i=e[n],o=at(i,A);return r?t<=i||t<=o:t>=i||t>=o}))}))[0]||t}function rt(t){for(var e=t.length,r=0,n=e-1;n>=0;--n)r+=t[n];return e?r/e:0}function nt(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=Math.atan2(n,r);return i>=0?i:i+2*Math.PI}function it(t){var e=function(t){return[0,1].map((function(e){return rt(t.map((function(t){return t[e]})))}))}(t),r=nt(e,t[0]),n=nt(e,t[1]);return r<n&&n-r<Math.PI||r>n&&n-r<-Math.PI?1:-1}function ot(t,e){return Math.sqrt(Math.pow((e?e[0]:0)-t[0],2)+Math.pow((e?e[1]:0)-t[1],2))}function at(t,e){if(!e)return t;var r=1/e;return Math.round(t/e)/r}function st(t,e){return t.forEach((function(r,n){t[n]=at(t[n],e)})),t}function ut(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function ct(t,e,r,n){t.addEventListener(e,r,n)}function lt(t,e,r,n){t.removeEventListener(e,r,n)}function ft(t,e,r,n,i,o){for(var a=0;a<i;++a){var s=r+a*i,u=n+a*i;t[s]+=t[u]*o,e[s]+=e[u]*o}}function pt(t,e,r,n,i){for(var o=0;o<i;++o){var a=r+o*i,s=n+o*i,u=t[a],c=e[a];t[a]=t[s],t[s]=u,e[a]=e[s],e[s]=c}}function dt(t,e,r,n,i){for(var o=0;o<n;++o){var a=r+o*n;t[a]/=i,e[a]/=i}}function ht(t,e,r){void 0===r&&(r=Math.sqrt(t.length));for(var n=t.slice(),i=0;i<r;++i)n[i*r+e-1]=0,n[(e-1)*r+i]=0;return n[(e-1)*(r+1)]=1,n}function gt(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var r=t.slice(),n=Rt(e),i=0;i<e;++i){var o=e*i+i;if(!at(r[o],A))for(var a=i+1;a<e;++a)if(r[e*i+a]){pt(r,n,i,a,e);break}if(!at(r[o],A))return[];dt(r,n,i,e,r[o]);for(a=0;a<e;++a){var s=a,u=r[a+i*e];at(u,A)&&i!==a&&ft(r,n,s,i,e,-u)}}return n}function vt(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var r=[],n=t[e*e-1],i=0;i<e-1;++i)r[i]=t[e*(e-1)+i]/n;return r[e-1]=0,r}function yt(t,e){for(var r=t.slice(),n=t.length;n<e-1;++n)r[n]=0;return r[e-1]=1,r}function mt(t,e,r){if(void 0===e&&(e=Math.sqrt(t.length)),e===r)return t;for(var n=Rt(r),i=Math.min(e,r),o=0;o<i-1;++o){for(var a=0;a<i-1;++a)n[o*r+a]=t[o*e+a];n[(o+1)*r-1]=t[(o+1)*e-1],n[(r-1)*r+o]=t[(e-1)*e+o]}return n[r*r-1]=t[e*e-1],n}function bt(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Rt(t);return e.forEach((function(e){n=_t(n,e,t)})),n}function _t(t,e,r){void 0===r&&(r=Math.sqrt(t.length));var n=[],i=t.length/r,o=e.length/i;if(!i)return e;if(!o)return t;for(var a=0;a<r;++a)for(var s=0;s<o;++s){n[s*r+a]=0;for(var u=0;u<i;++u)n[s*r+a]+=t[u*r+a]*e[s*i+u]}return n}function St(t,e){for(var r=Math.min(t.length,e.length),n=t.slice(),i=0;i<r;++i)n[i]=n[i]+e[i];return n}function wt(t,e){for(var r=Math.min(t.length,e.length),n=t.slice(),i=0;i<r;++i)n[i]=n[i]-e[i];return n}function xt(t,e){return void 0===e&&(e=9===t.length),e?[t[0],t[1],t[3],t[4],t[6],t[7]]:t}function Et(t,e,r){void 0===r&&(r=e.length);var n=_t(t,e,r),i=n[r-1];return n.map((function(t){return t/i}))}function Ot(t,e){return _t(t,[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1],4)}function Ct(t,e){return _t(t,[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1],4)}function kt(t,e){return _t(t,Tt(e,4))}function Mt(t,e){var r=e[0],n=void 0===r?1:r,i=e[1],o=void 0===i?1:i,a=e[2];return _t(t,[n,0,0,0,0,o,0,0,0,0,void 0===a?1:a,0,0,0,0,1],4)}function Dt(t,e){return Et(Tt(e,3),yt(t,3))}function It(t,e){var r=e[0],n=void 0===r?0:r,i=e[1],o=void 0===i?0:i,a=e[2];return _t(t,[1,0,0,0,0,1,0,0,0,0,1,0,n,o,void 0===a?0:a,1],4)}function At(t,e){return _t(t,e,4)}function Tt(t,e){var r=Math.cos(t),n=Math.sin(t),i=Rt(e);return i[0]=r,i[1]=n,i[e]=-n,i[e+1]=r,i}function Rt(t){for(var e=t*t,r=[],n=0;n<e;++n)r[n]=n%(t+1)?0:1;return r}function Bt(t,e){for(var r=Rt(e),n=Math.min(t.length,e-1),i=0;i<n;++i)r[(e+1)*i]=t[i];return r}function Pt(t,e){for(var r=Rt(e),n=Math.min(t.length,e-1),i=0;i<n;++i)r[e*(e-1)+i]=t[i];return r}function zt(t,e,r,n,i,o,a,s){var u=t[0],c=t[1],l=e[0],f=e[1],p=r[0],d=r[1],h=n[0],g=n[1],v=i[0],y=i[1],m=o[0],b=o[1],_=a[0],S=a[1],w=s[0],x=s[1],E=gt([u,0,l,0,p,0,h,0,c,0,f,0,d,0,g,0,1,0,1,0,1,0,1,0,0,u,0,l,0,p,0,h,0,c,0,f,0,d,0,g,0,1,0,1,0,1,0,1,-v*u,-y*u,-m*l,-b*l,-_*p,-S*p,-w*h,-x*h,-v*c,-y*c,-m*f,-b*f,-_*d,-S*d,-w*g,-x*g],8);if(!E.length)return[];var O=_t(E,[v,y,m,b,_,S,w,x],8);return O[8]=1,mt(function(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var r=[],n=0;n<e;++n)for(var i=0;i<e;++i)r[i*e+n]=t[e*n+i];return r}(O),3,4)}function Lt(t){return jt(Nt(t))}function jt(t){var e=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(t){var r=t.matrixFunction,n=t.functionValue;r&&(e=r(e,n))})),e}function Nt(t){return(z(t)?t:U(t)).map((function(t){var e=H(t),r=e.prefix,n=e.value,i=null,o=r,a="";if("translate"===r||"translateX"===r||"translate3d"===r){var s=G(n).map((function(t){return parseFloat(t)})),u=s[0],c=s[1],l=void 0===c?0:c,f=s[2];i=It,a=[u,l,void 0===f?0:f]}else if("translateY"===r){i=It,a=[0,l=parseFloat(n),0]}else if("translateZ"===r){i=It,a=[0,0,parseFloat(n)]}else if("scale"===r||"scale3d"===r){var p=G(n).map((function(t){return parseFloat(t)})),d=p[0],h=p[1],g=void 0===h?d:h,v=p[2];i=Mt,a=[d,g,void 0===v?1:v]}else if("scaleX"===r){i=Mt,a=[d=parseFloat(n),1,1]}else if("scaleY"===r){i=Mt,a=[1,g=parseFloat(n),1]}else if("scaleZ"===r){i=Mt,a=[1,1,parseFloat(n)]}else if("rotate"===r||"rotateZ"===r||"rotateX"===r||"rotateY"===r){var y=W(n),m=y.unit,b=y.value;"rotate"===r||"rotateZ"===r?(o="rotateZ",i=kt):"rotateX"===r?i=Ot:"rotateY"===r&&(i=Ct),a="rad"===m?b:b*Math.PI/180}else if("matrix3d"===r)i=At,a=G(n).map((function(t){return parseFloat(t)}));else if("matrix"===r){var _=G(n).map((function(t){return parseFloat(t)}));i=At,a=[_[0],_[1],0,0,_[2],_[3],0,0,0,0,1,0,_[4],_[5],0,1]}else o="";return{name:r,functionName:o,value:n,matrixFunction:i,functionValue:a}}))}var Kt=function(){function PolyMap(){this.keys=[],this.values=[]}var t=PolyMap.prototype;return t.get=function(t){return this.values[this.keys.indexOf(t)]},t.set=function(t,e){var r=this.keys,n=this.values,i=r.indexOf(t),o=-1===i?r.length:i;r[o]=t,n[o]=e},PolyMap}(),qt=function(){function HashMap(){this.object={}}var t=HashMap.prototype;return t.get=function(t){return this.object[t]},t.set=function(t,e){this.object[t]=e},HashMap}(),Ft="function"==typeof Map,Ut=function(){function Link(){}var t=Link.prototype;return t.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},t.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},t.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},Link}();var Gt=function(){function Result(t,e,r,n,i,o,a,s){this.prevList=t,this.list=e,this.added=r,this.removed=n,this.changed=i,this.maintained=o,this.changedBeforeAdded=a,this.fixed=s}var t=Result.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var t=function(t,e){var r=[],n=[];return t.forEach((function(t){var e=t[0],i=t[1],o=new Ut;r[e]=o,n[i]=o})),r.forEach((function(t,e){t.connect(r[e-1])})),t.filter((function(t,r){return!e[r]})).map((function(t,e){var i=t[0],o=t[1];if(i===o)return[0,0];var a=r[i],s=n[o-1],u=a.getIndex();return a.disconnect(),s?a.connect(s,s.next):a.connect(void 0,r[0]),[u,a.getIndex()]}))}(this.changedBeforeAdded,this.fixed),e=this.changed,r=[];this.cacheOrdered=t.filter((function(t,n){var i=t[0],o=t[1],a=e[n],s=a[0],u=a[1];if(i!==o)return r.push([s,u]),!0})),this.cachePureChanged=r},Result}();function Ht(t,e,r){var n=Ft?Map:r?qt:Kt,i=r||function(t){return t},o=[],a=[],s=[],u=t.map(i),c=e.map(i),l=new n,f=new n,p=[],d=[],h={},g=[],v=0,y=0;return u.forEach((function(t,e){l.set(t,e)})),c.forEach((function(t,e){f.set(t,e)})),u.forEach((function(t,e){var r=f.get(t);void 0===r?(++y,a.push(e)):h[r]=y})),c.forEach((function(t,e){var r=l.get(t);void 0===r?(o.push(e),++v):(s.push([r,e]),y=h[e]||0,p.push([r-y,e-v]),d.push(e===r),r!==e&&g.push([r,e]))})),a.reverse(),new Gt(t,e,o,a,g,s,p,d)}var Wt=function(){function ListDiffer(t,e){void 0===t&&(t=[]),this.findKeyCallback=e,this.list=[].slice.call(t)}return ListDiffer.prototype.update=function(t){var e=[].slice.call(t),r=Ht(this.list,e,this.findKeyCallback);return this.list=e,r},ListDiffer}();var Vt=function(t,e){return Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},Vt(t,e)};var Yt,Xt="function"==typeof Map?void 0:(Yt=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++Yt)});const $t=function(t){function ChildrenDiffer(e){return void 0===e&&(e=[]),t.call(this,e,Xt)||this}return function __extends(t,e){function __(){this.constructor=t}Vt(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}(ChildrenDiffer,t),ChildrenDiffer}(Wt);function Jt(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function Zt(t){return at(t,A)}function Qt(t){return t.length<3?0:Math.abs(function(t){for(var e=0,r=t.length-1;r>=0;--r)e+=t[r];return e}(t.map((function(e,r){var n=t[r+1]||t[0];return e[0]*n[1]-n[0]*e[1]}))))/2}function te(t,e){var r=e.width,n=e.height,i=e.left,o=e.top,a=ee(t),s=a.minX,u=a.minY,c=a.maxX,l=a.maxY,f=r/(c-s),p=n/(l-u);return t.map((function(t){return[i+(t[0]-s)*f,o+(t[1]-u)*p]}))}function ee(t){var e=t.map((function(t){return t[0]})),r=t.map((function(t){return t[1]}));return{minX:Math.min.apply(Math,e),minY:Math.min.apply(Math,r),maxX:Math.max.apply(Math,e),maxY:Math.max.apply(Math,r)}}function re(t,e,r){var n=t[0],i=t[1],o=ee(e),a=o.minX,s=o.maxX,u=[[a,i],[s,i]],c=ne(u[0],u[1]),l=ae(e),f=[];if(l.forEach((function(e){var r,n=ne(e[0],e[1]),o=e[0];(r=n,c.every((function(t,e){return 0===Zt(t-r[e])})))?f.push({pos:t,line:e,type:"line"}):oe(ie(c,n),[u,e]).forEach((function(t){e.some((function(e){return n=t,!Zt((r=e)[0]-n[0])&&!Zt(r[1]-n[1]);var r,n}))?f.push({pos:t,line:e,type:"point"}):0!==Zt(o[1]-i)&&f.push({pos:t,line:e,type:"intersection"})}))})),!r&&X(f,(function(t){return t[0]===n})))return!0;var p=0,d={};return f.forEach((function(t){var e=t.pos,r=t.type,o=t.line;if(!(e[0]>n))if("intersection"===r)++p;else{if("line"===r)return;if("point"===r){var a=X(o,(function(t){return t[1]!==i})),s=d[e[0]],u=a[1]>i?1:-1;s?s!==u&&++p:d[e[0]]=u}}})),p%2==1}function ne(t,e){var r=t[0],n=t[1],i=e[0]-r,o=e[1]-n;Math.abs(i)<A&&(i=0),Math.abs(o)<A&&(o=0);var a=0,s=0,u=0;return i?o?(s=1,u=-(a=-o/i)*r-n):(s=1,u=-n):o&&(a=-1,u=r),[a,s,u]}function ie(t,e){var r=t[0],n=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=0===r&&0===o,c=0===n&&0===a,l=[];if(u&&c)return[];if(u){var f=-i/n;return f!==-s/a?[]:[[-1/0,f],[1/0,f]]}if(c){var p=-i/r;return p!==-s/o?[]:[[p,-1/0],[p,1/0]]}if(0===r)l=[[d=-(a*(h=-i/n)+s)/o,h]];else if(0===o){l=[[d=-(n*(h=-s/a)+i)/r,h]]}else if(0===n){l=[[d=-i/r,h=-(o*d+s)/a]]}else if(0===a){l=[[d=-s/o,h=-(r*d+i)/n]]}else{var d,h;l=[[d=(n*s-a*i)/(a*r-n*o),h=-(r*d+i)/n]]}return l.map((function(t){return[t[0],t[1]]}))}function oe(t,e){var r=e.map((function(t){return[0,1].map((function(e){return[Math.min(t[0][e],t[1][e]),Math.max(t[0][e],t[1][e])]}))})),n=[];if(2===t.length){var i=t[0],o=i[0],a=i[1];if(Zt(o-t[1][0])){if(!Zt(a-t[1][1])){var s=Math.max.apply(Math,r.map((function(t){return t[0][0]}))),u=Math.min.apply(Math,r.map((function(t){return t[0][1]})));if(Zt(s-u)>0)return[];n=[[s,a],[u,a]]}}else{var c=Math.max.apply(Math,r.map((function(t){return t[1][0]}))),l=Math.min.apply(Math,r.map((function(t){return t[1][1]})));if(Zt(c-l)>0)return[];n=[[o,c],[o,l]]}}return n.length||(n=t.filter((function(t){var e=t[0],n=t[1];return r.every((function(t){return 0<=Zt(e-t[0][0])&&0<=Zt(t[0][1]-e)&&0<=Zt(n-t[1][0])&&0<=Zt(t[1][1]-n)}))}))),n.map((function(t){return[Zt(t[0]),Zt(t[1])]}))}function ae(t){return Jt(t.slice(1),[t[0]]).map((function(e,r){return[t[r],e]}))}function se(t,e){var r=t.slice(),n=e.slice();-1===it(r)&&r.reverse(),-1===it(n)&&n.reverse();var i=ae(r),o=ae(n),a=i.map((function(t){return ne(t[0],t[1])})),s=o.map((function(t){return ne(t[0],t[1])})),u=[];a.forEach((function(t,e){var r=i[e],a=[];s.forEach((function(n,i){var s=oe(ie(t,n),[r,o[i]]);a.push.apply(a,s.map((function(t){return{index1:e,index2:i,pos:t,type:"intersection"}})))})),a.sort((function(t,e){return ot(r[0],t.pos)-ot(r[0],e.pos)})),u.push.apply(u,a),re(r[1],n)&&u.push({index1:e,index2:-1,pos:r[1],type:"inside"})})),o.forEach((function(t,e){if(re(t[1],r)){var n=!1,i=Y(u,(function(t){return t.index2===e?(n=!0,!1):!!n}));-1===i&&(n=!1,i=Y(u,(function(t){var r=t.index1,i=t.index2;return-1===r&&i+1===e?(n=!0,!1):!!n}))),-1===i?u.push({index1:-1,index2:e,pos:t[1],type:"inside"}):u.splice(i,0,{index1:-1,index2:e,pos:t[1],type:"inside"})}}));var c={};return u.filter((function(t){var e=t.pos,r=e[0]+"x"+e[1];return!c[r]&&(c[r]=!0,!0)}))}function ue(t,e){var r=function(t,e){return se(t,e).map((function(t){return t.pos}))}(t,e);return Qt(r)}var __assign=function(){return __assign=Object.assign||function __assign(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)};const ce=function(){function EventEmitter(){this._events={}}var t=EventEmitter.prototype;return t.on=function(t,e){if(P(t))for(var r in t)this.on(r,t[r]);else this._addEvent(t,e,{});return this},t.off=function(t,e){if(t)if(P(t))for(var r in t)this.off(r);else if(e){var n=this._events[t];if(n){var i=Y(n,(function(t){return t.listener===e}));i>-1&&n.splice(i,1)}}else this._events[t]=[];else this._events={};return this},t.once=function(t,e){var r=this;return e&&this._addEvent(t,e,{once:!0}),new Promise((function(e){r._addEvent(t,e,{once:!0})}))},t.emit=function(t,e){var r=this;void 0===e&&(e={});var n=this._events[t];if(!t||!n)return!0;var i=!1;return e.eventType=t,e.stop=function(){i=!0},e.currentTarget=this,function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}(n).forEach((function(n){n.listener(e),n.once&&r.off(t,n.listener)})),!i},t.trigger=function(t,e){return void 0===e&&(e={}),this.emit(t,e)},t._addEvent=function(t,e,r){var n=this._events;n[t]=n[t]||[],n[t].push(__assign({listener:e},r))},EventEmitter}();var le="function",fe="string",pe="undefined";typeof document!==pe&&document;function de(t){return typeof t===fe}function he(t){return typeof t===le}function utils_esm_now(){return Date.now?Date.now():(new Date).getTime()}var ge=function(t,e){return ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},ge(t,e)};var ve=function(){return ve=Object.assign||function __assign(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ve.apply(this,arguments)};function ye(t){var e=t.container;return e===document.body?[e.scrollLeft||document.documentElement.scrollLeft,e.scrollTop||document.documentElement.scrollTop]:[e.scrollLeft,e.scrollTop]}function me(t){return t?de(t)?document.querySelector(t):he(t)?t():t instanceof Element?t:"current"in t?t.current:"value"in t?t.value:void 0:null}const be=function(t){function DragScroll(){var e=null!==t&&t.apply(this,arguments)||this;return e._startRect=null,e._startPos=[],e._prevTime=0,e._timer=0,e._prevScrollPos=[0,0],e._isWait=!1,e._flag=!1,e}!function(t,e){function __(){this.constructor=t}ge(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}(DragScroll,t);var e=DragScroll.prototype;return e.dragStart=function(t,e){var r=me(e.container);if(r){var n=0,i=0,o=0,a=0;if(r===document.body)o=window.innerWidth,a=window.innerHeight;else{var s=r.getBoundingClientRect();n=s.top,i=s.left,o=s.width,a=s.height}this._flag=!0,this._startPos=[t.clientX,t.clientY],this._startRect={top:n,left:i,width:o,height:a},this._prevScrollPos=this._getScrollPosition([0,0],e)}else this._flag=!1},e.drag=function(t,e){if(clearTimeout(this._timer),this._flag){var r=t.clientX,n=t.clientY,i=e.threshold,o=void 0===i?0:i,a=this._startRect,s=this._startPos,u=[0,0];return a.top>n-o?(s[1]>a.top||n<s[1])&&(u[1]=-1):a.top+a.height<n+o&&(s[1]<a.top+a.height||n>s[1])&&(u[1]=1),a.left>r-o?(s[0]>a.left||r<s[0])&&(u[0]=-1):a.left+a.width<r+o&&(s[0]<a.left+a.width||r>s[0])&&(u[0]=1),!(!u[0]&&!u[1])&&this._continueDrag(ve(ve({},e),{direction:u,inputEvent:t,isDrag:!0}))}},e.checkScroll=function(t){var e=this;if(this._isWait)return!1;var r=t.prevScrollPos,n=void 0===r?this._prevScrollPos:r,i=t.direction,o=t.throttleTime,a=void 0===o?0:o,s=t.inputEvent,u=t.isDrag,c=this._getScrollPosition(i||[0,0],t),l=c[0]-n[0],f=c[1]-n[1],p=i||[l?Math.abs(l)/l:0,f?Math.abs(f)/f:0];return this._prevScrollPos=c,!(!l&&!f)&&(this.trigger("move",{offsetX:p[0]?l:0,offsetY:p[1]?f:0,inputEvent:s}),a&&u&&(clearTimeout(this._timer),this._timer=window.setTimeout((function(){e._continueDrag(t)}),a)),!0)},e.dragEnd=function(){this._flag=!1,clearTimeout(this._timer)},e._getScrollPosition=function(t,e){var r=e.container,n=e.getScrollPosition;return(void 0===n?ye:n)({container:me(r),direction:t})},e._continueDrag=function(t){var e,r,n=this,i=t.container,o=t.direction,a=t.throttleTime,s=t.useScroll,u=t.isDrag,c=t.inputEvent;if(!(!this._flag||u&&this._isWait)){var l=utils_esm_now(),f=Math.max(a+this._prevTime-l,0);if(f>0)return clearTimeout(this._timer),this._timer=window.setTimeout((function(){n._continueDrag(t)}),f),!1;this._prevTime=l;var p=this._getScrollPosition(o,t);this._prevScrollPos=p,u&&(this._isWait=!0);var d={container:me(i),direction:o,inputEvent:c};return null===(r=(e=t).requestScroll)||void 0===r||r.call(e,d),this.trigger("scroll",d),this._isWait=!1,s||this.checkScroll(ve(ve({},t),{prevScrollPos:p,direction:o,inputEvent:c}))}},DragScroll}(ce);var _e=r(67294),Se=function(t,e){return Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},Se(t,e)};var we=function(){return we=Object.assign||function __assign(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},we.apply(this,arguments)};function xe(t){return 180*(e=[t[0].clientX,t[0].clientY],r=[t[1].clientX,t[1].clientY],n=r[0]-e[0],i=r[1]-e[1],((o=Math.atan2(i,n))>=0?o:o+2*Math.PI)/Math.PI);var e,r,n,i,o}function Ee(t){return t?t.touches?function(t){for(var e=Math.min(t.length,2),r=[],n=0;n<e;++n)r.push(ke(t[n]));return r}(t.touches):[ke(t)]:[]}function Oe(t,e,r){var n=r.length,i=Me(t,n),o=i.clientX,a=i.clientY,s=i.originalClientX,u=i.originalClientY,c=Me(e,n),l=c.clientX,f=c.clientY,p=Me(r,n);return{clientX:s,clientY:u,deltaX:o-l,deltaY:a-f,distX:o-p.clientX,distY:a-p.clientY}}function Ce(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}function ke(t){return{clientX:t.clientX,clientY:t.clientY}}function Me(t,e){void 0===e&&(e=t.length);for(var r={clientX:0,clientY:0,originalClientX:0,originalClientY:0},n=0;n<e;++n){var i=t[n];r.originalClientX+="originalClientX"in i?i.originalClientX:i.clientX,r.originalClientY+="originalClientY"in i?i.originalClientY:i.clientY,r.clientX+=i.clientX,r.clientY+=i.clientY}return e?{clientX:r.clientX/e,clientY:r.clientY/e,originalClientX:r.originalClientX/e,originalClientY:r.originalClientY/e}:r}var De=function(){function ClientStore(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}var t=ClientStore.prototype;return t.getAngle=function(t){return void 0===t&&(t=this.prevClients),xe(t)},t.getRotation=function(t){return void 0===t&&(t=this.prevClients),xe(t)-xe(this.startClients)},t.getPosition=function(t,e){void 0===t&&(t=this.prevClients);var r=Oe(t||this.prevClients,this.prevClients,this.startClients),n=r.deltaX,i=r.deltaY;return this.movement+=Math.sqrt(n*n+i*i),this.prevClients=t,r},t.getPositions=function(t){void 0===t&&(t=this.prevClients);var e=this.prevClients;return this.startClients.map((function(r,n){return Oe([t[n]],[e[n]],[r])}))},t.getMovement=function(t){var e=this.movement;if(!t)return e;var r=Me(t,this.length),n=Me(this.prevClients,this.length),i=r.clientX-n.clientX,o=r.clientY-n.clientY;return Math.sqrt(i*i+o*o)+e},t.getDistance=function(t){return void 0===t&&(t=this.prevClients),Ce(t)},t.getScale=function(t){return void 0===t&&(t=this.prevClients),Ce(t)/Ce(this.startClients)},t.move=function(t,e){this.startClients.forEach((function(r){r.clientX-=t,r.clientY-=e})),this.prevClients.forEach((function(r){r.clientX-=t,r.clientY-=e}))},ClientStore}(),Ie=["textarea","input"];const Ae=function(t){function Gesto(e,r){void 0===r&&(r={});var n=t.call(this)||this;n.options={},n.flag=!1,n.pinchFlag=!1,n.data={},n.isDrag=!1,n.isPinch=!1,n.isMouse=!1,n.isTouch=!1,n.clientStores=[],n.targets=[],n.prevTime=0,n.doubleFlag=!1,n._dragFlag=!1,n._isMouseEvent=!1,n._isSecondaryButton=!1,n._preventMouseEvent=!1,n.onDragStart=function(t,e){if(void 0===e&&(e=!0),n.flag||!1!==t.cancelable){var r=n.options,i=r.container,o=r.pinchOutside,a=r.preventWheelClick,s=r.preventRightClick,u=r.preventDefault,c=r.checkInput,l=r.preventClickEventOnDragStart,f=r.preventClickEventOnDrag,p=r.preventClickEventByCondition,d=n.isTouch,h=!n.flag;if(n._isSecondaryButton=3===t.which||2===t.button,a&&(2===t.which||1===t.button)||s&&(3===t.which||2===t.button))return n.stop(),!1;if(h){var g=document.activeElement,v=t.target;if(v){var y=v.tagName.toLowerCase(),m=Ie.indexOf(y)>-1,b=v.isContentEditable;if(m||b){if(c||g===v)return!1;if(g&&b&&g.isContentEditable&&g.contains(v))return!1}else if((u||"touchstart"===t.type)&&g){var _=g.tagName.toLowerCase();(g.isContentEditable||Ie.indexOf(_)>-1)&&g.blur()}(l||f||p)&&ct(window,"click",n._onClick,!0)}n.clientStores=[new De(Ee(t))],n.flag=!0,n.isDrag=!1,n._dragFlag=!0,n.data={},n.doubleFlag=V()-n.prevTime<200,n._isMouseEvent=function(t){return t&&(t.type.indexOf("mouse")>-1||"button"in t)}(t),!n._isMouseEvent&&n._preventMouseEvent&&(n._preventMouseEvent=!1),!1===(n._preventMouseEvent||n.emit("dragStart",we(we({data:n.data,datas:n.data,inputEvent:t,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,isTrusted:e,isDouble:n.doubleFlag},n.getCurrentStore().getPosition()),{preventDefault:function(){t.preventDefault()},preventDrag:function(){n._dragFlag=!1}})))&&n.stop(),n._isMouseEvent&&n.flag&&u&&t.preventDefault()}if(!n.flag)return!1;var S=0;if(h?(n._attchDragEvent(),d&&o&&(S=setTimeout((function(){ct(i,"touchstart",n.onDragStart,{passive:!1})})))):d&&o&&lt(i,"touchstart",n.onDragStart),n.flag&&function(t){return t.touches&&t.touches.length>=2}(t)){if(clearTimeout(S),h&&t.touches.length!==t.changedTouches.length)return;n.pinchFlag||n.onPinchStart(t)}}},n.onDrag=function(t,e){if(n.flag){var r=n.options.preventDefault;!n._isMouseEvent&&r&&t.preventDefault();var i=Ee(t),o=n.moveClients(i,t,!1);if(n._dragFlag){if(n.pinchFlag||o.deltaX||o.deltaY)if(!1===(n._preventMouseEvent||n.emit("drag",we(we({},o),{isScroll:!!e,inputEvent:t}))))return void n.stop();n.pinchFlag&&n.onPinch(t,i)}n.getCurrentStore().getPosition(i,!0)}},n.onDragEnd=function(t){if(n.flag){var e=n.options,r=e.pinchOutside,i=e.container,o=e.preventClickEventOnDrag,a=e.preventClickEventOnDragStart,s=e.preventClickEventByCondition,u=n.isDrag;(o||a||s)&&requestAnimationFrame((function(){n._allowClickEvent()})),s||a||!o||u||n._allowClickEvent(),n.isTouch&&r&&lt(i,"touchstart",n.onDragStart),n.pinchFlag&&n.onPinchEnd(t);var c=(null==t?void 0:t.touches)?Ee(t):[];0!==c.length&&n.options.keepDragging?n._addStore(new De(c)):n.flag=!1;var l=n._getPosition(),f=V(),p=!u&&n.doubleFlag;n.prevTime=u||p?0:f,n.flag||(n._dettachDragEvent(),n._preventMouseEvent||n.emit("dragEnd",we({data:n.data,datas:n.data,isDouble:p,isDrag:u,isClick:!u,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,inputEvent:t},l)),n.clientStores=[],n._isMouseEvent||(n._preventMouseEvent=!0,requestAnimationFrame((function(){requestAnimationFrame((function(){n._preventMouseEvent=!1}))}))))}},n.onBlur=function(){n.onDragEnd()},n._allowClickEvent=function(){lt(window,"click",n._onClick,!0)},n._onClick=function(t){n._allowClickEvent(),n._preventMouseEvent=!1;var e=n.options.preventClickEventByCondition;(null==e?void 0:e(t))||(t.stopPropagation(),t.preventDefault())},n._onContextMenu=function(t){n.options.preventRightClick?n.onDragEnd(t):t.preventDefault()},n._passCallback=function(){};var i=[].concat(e);n.options=we({checkInput:!1,container:i.length>1?window:i[0],preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},r);var o=n.options,a=o.container,s=o.events,u=o.checkWindowBlur;if(n.isTouch=s.indexOf("touch")>-1,n.isMouse=s.indexOf("mouse")>-1,n.targets=i,n.isMouse&&(i.forEach((function(t){ct(t,"mousedown",n.onDragStart),ct(t,"mousemove",n._passCallback)})),ct(a,"contextmenu",n._onContextMenu)),u&&ct(window,"blur",n.onBlur),n.isTouch){var c={passive:!1};i.forEach((function(t){ct(t,"touchstart",n.onDragStart,c),ct(t,"touchmove",n._passCallback,c)}))}return n}!function(t,e){function __(){this.constructor=t}Se(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}(Gesto,t);var e=Gesto.prototype;return e.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._allowClickEvent(),this._dettachDragEvent()},e.getMovement=function(t){return this.getCurrentStore().getMovement(t)+this.clientStores.slice(1).reduce((function(t,e){return t+e.movement}),0)},e.isDragging=function(){return this.isDrag},e.isFlag=function(){return this.flag},e.isPinchFlag=function(){return this.pinchFlag},e.isDoubleFlag=function(){return this.doubleFlag},e.isPinching=function(){return this.isPinch},e.scrollBy=function(t,e,r,n){void 0===n&&(n=!0),this.flag&&(this.clientStores[0].move(t,e),n&&this.onDrag(r,!0))},e.move=function(t,e){var r=t[0],n=t[1],i=this.getCurrentStore().prevClients;return this.moveClients(i.map((function(t){var e=t.clientX,i=t.clientY;return{clientX:e+r,clientY:i+n,originalClientX:e,originalClientY:i}})),e,!0)},e.triggerDragStart=function(t){this.onDragStart(t,!1)},e.setEventData=function(t){var e=this.data;for(var r in t)e[r]=t[r];return this},e.setEventDatas=function(t){return this.setEventData(t)},e.getCurrentEvent=function(t){return we(we({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:t})},e.getEventData=function(){return this.data},e.getEventDatas=function(){return this.data},e.unset=function(){var t=this,e=this.targets,r=this.options.container;this.off(),lt(window,"blur",this.onBlur),this.isMouse&&(e.forEach((function(e){lt(e,"mousedown",t.onDragStart)})),lt(r,"contextmenu",this._onContextMenu)),this.isTouch&&(e.forEach((function(e){lt(e,"touchstart",t.onDragStart)})),lt(r,"touchstart",this.onDragStart)),this._allowClickEvent(),this._dettachDragEvent()},e.onPinchStart=function(t){var e=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>e)){var r=new De(Ee(t));this.pinchFlag=!0,this._addStore(r),!1===this.emit("pinchStart",we(we({data:this.data,datas:this.data,angle:r.getAngle(),touches:this.getCurrentStore().getPositions()},r.getPosition()),{inputEvent:t}))&&(this.pinchFlag=!1)}},e.onPinch=function(t,e){if(this.flag&&this.pinchFlag&&!(e.length<2)){var r=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",we(we({data:this.data,datas:this.data,movement:this.getMovement(e),angle:r.getAngle(e),rotation:r.getRotation(e),touches:r.getPositions(e),scale:r.getScale(e),distance:r.getDistance(e)},r.getPosition(e)),{inputEvent:t}))}},e.onPinchEnd=function(t){if(this.pinchFlag){var e=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var r=this.getCurrentStore();this.emit("pinchEnd",we(we({data:this.data,datas:this.data,isPinch:e,touches:r.getPositions()},r.getPosition()),{inputEvent:t}))}},e.getCurrentStore=function(){return this.clientStores[0]},e.moveClients=function(t,e,r){var n=this._getPosition(t,r),i=this.isDrag;(n.deltaX||n.deltaY)&&(this.isDrag=!0);var o=!1;return!i&&this.isDrag&&(o=!0),we(we({data:this.data,datas:this.data},n),{movement:this.getMovement(t),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:e,isFirstDrag:o})},e._addStore=function(t){this.clientStores.splice(0,0,t)},e._getPosition=function(t,e){var r=this.getCurrentStore().getPosition(t,e),n=this.clientStores.slice(1).reduce((function(t,e){var r=e.getPosition();return t.distX+=r.distX,t.distY+=r.distY,t}),r),i=n.distX,o=n.distY;return we(we({},r),{distX:i,distY:o})},e._attchDragEvent=function(){var t=this.options.container,e={passive:!1};this.isMouse&&(ct(t,"mousemove",this.onDrag),ct(t,"mouseup",this.onDragEnd)),this.isTouch&&(ct(t,"touchmove",this.onDrag,e),ct(t,"touchend",this.onDragEnd,e),ct(t,"touchcancel",this.onDragEnd,e))},e._dettachDragEvent=function(){var t=this.options.container;this.isMouse&&(lt(t,"mousemove",this.onDrag),lt(t,"mouseup",this.onDragEnd)),this.isTouch&&(lt(t,"touchstart",this.onDragStart),lt(t,"touchmove",this.onDrag),lt(t,"touchend",this.onDragEnd),lt(t,"touchcancel",this.onDragEnd))},Gesto}(ce);var Te=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return e>>>0};function Re(t,e,r,n){var i=document.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("data-styled-id",t),r.nonce&&i.setAttribute("nonce",r.nonce),i.innerHTML=function(t,e,r){return r.original?e:e.replace(/([^};{\s}][^};{]*|^\s*){/gm,(function(e,r){var n=r.trim();return(n?G(n):[""]).map((function(e){var r=e.trim();return 0===r.indexOf("@")?r:r.indexOf(":global")>-1?r.replace(/\:global/g,""):r.indexOf(":host")>-1?""+r.replace(/\:host/g,"."+t):r?"."+t+" "+r:"."+t})).join(", ")+" {"}))}(t,e,r),(n||document.head||document.body).appendChild(i),i}const Be=function(t){var e,r="rCS"+Te(t).toString(36),n=0;return{className:r,inject:function(i,o){void 0===o&&(o={});var a,s=function(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}(i),u=0===n;return(s||u)&&(a=Re(r,t,o,s)),u&&(e=a),s||++n,{destroy:function(){s?(s.removeChild(a),a=null):(n>0&&--n,0===n&&e&&(e.parentNode.removeChild(e),e=null))}}}}};var Pe=function(t,e){return Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},Pe(t,e)};function ze(t,e){function __(){this.constructor=t}Pe(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var Le=function(){return Le=Object.assign||function __assign(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Le.apply(this,arguments)};var je=function(t){function StyledElement(){var e=null!==t&&t.apply(this,arguments)||this;return e.injectResult=null,e.tag="div",e}ze(StyledElement,t);var e=StyledElement.prototype;return e.render=function(){var t=this.props,e=t.className,r=void 0===e?"":e,n=(t.cspNonce,t.portalContainer),i=function __rest(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(t,["className","cspNonce","portalContainer"]),o=this.injector.className,a=this.tag,s={};return(_e.version||"").indexOf("simple")>-1&&n&&(s={portalContainer:n}),(0,_e.createElement)(a,Le({ref:w(this,"element"),"data-styled-id":o,className:r+" "+o},s,i))},e.componentDidMount=function(){this.injectResult=this.injector.inject(this.element,{nonce:this.props.cspNonce})},e.componentWillUnmount=function(){this.injectResult.destroy(),this.injectResult=null},e.getElement=function(){return this.element},StyledElement}(_e.Component);const Ne=function(t,e){var r=Be(e);return function(e){function Styled(){var n=null!==e&&e.apply(this,arguments)||this;return n.injector=r,n.tag=t,n}return ze(Styled,e),Styled}(je)};var Ke=function(t,e){return Ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Ke(t,e)};function qe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}Ke(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var Fe=function(){return Fe=Object.assign||function __assign(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Fe.apply(this,arguments)};function __spreadArray(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function Ue(t,e){var r;return Fe({events:{},props:(r={},r[t]=Boolean,r),name:t},e)}var Ge,He,We=_(),Ve=We.browser.webkit,Ye=Ve&&(Ge="undefined"==typeof window?{userAgent:""}:window.navigator,!!(He=/applewebkit\/([^\s]+)/g.exec(Ge.userAgent.toLowerCase()))&&parseFloat(He[1])<605),Xe="firefox"===We.browser.name,$e=parseInt(We.browser.webkitVersion,10)>=612||parseInt(We.browser.version,10)>=15,Je="moveable-",Ze="\n{\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tleft: 0;\n\ttop: 0;\n    z-index: 3000;\n    --moveable-color: #4af;\n    --zoom: 1;\n    --zoompx: 1px;\n    will-change: transform;\n}\n.control-box {\n    z-index: 0;\n}\n.line, .control {\n    position: absolute;\n\tleft: 0;\n    top: 0;\n    will-change: transform;\n}\n.control {\n\twidth: 14px;\n\theight: 14px;\n\tborder-radius: 50%;\n\tborder: 2px solid #fff;\n\tbox-sizing: border-box;\n    background: #4af;\n    background: var(--moveable-color);\n\tmargin-top: -7px;\n    margin-left: -7px;\n    border: 2px solid #fff;\n    z-index: 10;\n}\n.padding {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100px;\n    height: 100px;\n    transform-origin: 0 0;\n}\n.line {\n\twidth: 1px;\n    height: 1px;\n    background: #4af;\n    background: var(--moveable-color);\n\ttransform-origin: 0px 50%;\n}\n.line.edge {\n    z-index: 1;\n    background: transparent;\n}\n.line.dashed {\n    box-sizing: border-box;\n    background: transparent;\n}\n.line.dashed.horizontal {\n    border-top: 1px dashed #4af;\n    border-top-color: #4af;\n    border-top-color: var(--moveable-color);\n}\n.line.dashed.vertical {\n    border-left: 1px dashed #4af;\n    border-left-color: #4af;\n    border-left-color: var(--moveable-color);\n}\n.line.vertical {\n    transform: translateX(-50%);\n}\n.line.horizontal {\n    transform: translateY(-50%);\n}\n.line.vertical.bold {\n    width: 2px;\n}\n.line.horizontal.bold {\n    height: 2px;\n}\n\n.control.origin {\n\tborder-color: #f55;\n\tbackground: #fff;\n\twidth: 12px;\n\theight: 12px;\n\tmargin-top: -6px;\n    margin-left: -6px;\n\tpointer-events: none;\n}\n".concat([0,15,30,45,60,75,90,105,120,135,150,165].map((function(t){return'\n.direction[data-rotation="'.concat(t,'"] {\n\t').concat(function(t){var e=function(t,e){return'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32*t,'px" height="').concat(32*t,'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(e,'deg);transform-origin: 16px 16px"></path></svg>')}(1,t),r=45*Math.round(t/45)%180,n="ns-resize";return 135===r?n="nwse-resize":45===r?n="nesw-resize":90===r&&(n="ew-resize"),"cursor:".concat(n,";cursor: url('").concat(e,"') 16 16, ").concat(n,";")}(t),"\n}\n")})).join("\n"),"\n.group {\n    z-index: -1;\n}\n.area {\n    position: absolute;\n}\n.area-pieces {\n    position: absolute;\n    top: 0;\n    left: 0;\n    display: none;\n}\n.area.avoid, .area.pass {\n    pointer-events: none;\n}\n.area.avoid+.area-pieces {\n    display: block;\n}\n.area-piece {\n    position: absolute;\n}\n\n").concat(Ye?':global svg *:before {\n\tcontent:"";\n\ttransform-origin: inherit;\n}':"","\n"),Qe=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],tr=1e-4,er=1e-7,rr=1e-9,nr=Math.pow(10,10),ir=-nr,or=["n","w","s","e"],ar=["n","w","s","e","nw","ne","sw","se"],sr={n:[0,-1],e:[1,0],s:[0,1],w:[-1,0],nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]},ur={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},cr={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},lr=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors"];function fr(t,e,r,n,i,o){void 0===o&&(o="draggable");var a=e.gestos[o].move(r,t.inputEvent),s=a.originalDatas||a.datas,u=s[o]||(s[o]={});return Fe(Fe({},i?Mn(e,a):a),{isPinch:!!n,parentEvent:!0,datas:u,originalDatas:t.originalDatas})}var pr=function(){function CustomGesto(t){var e;void 0===t&&(t="draggable"),this.ableName=t,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((e={})[t]={},e)}var t=CustomGesto.prototype;return t.dragStart=function(t,e){this.isDrag=!1,this.isFlag=!1;var r=e.originalDatas;return this.datas=r,r[this.ableName]||(r[this.ableName]={}),Fe(Fe({},this.move(t,e.inputEvent)),{type:"dragstart"})},t.drag=function(t,e){return this.move([t[0]-this.prevX,t[1]-this.prevY],e)},t.move=function(t,e){var r,n;return this.isFlag?(r=this.prevX+t[0],n=this.prevY+t[1],(t[0]||t[1])&&(this.isDrag=!0)):(this.prevX=t[0],this.prevY=t[1],this.startX=t[0],this.startY=t[1],r=t[0],n=t[1],this.isFlag=!0),this.prevX=r,this.prevY=n,{type:"drag",clientX:r,clientY:n,inputEvent:e,isDrag:this.isDrag,distX:r-this.startX,distY:n-this.startY,deltaX:t[0],deltaY:t[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},CustomGesto}();function dr(t,e){var r=e.clientX,n=e.clientY,i=e.datas,o=t.state,a=o.moveableClientRect,s=o.rootMatrix,u=o.is3d,c=o.pos1,l=wt(kn(s,[r-a.left,n-a.top],u?4:3),c),f=_r({datas:i,distX:l[0],distY:l[1]});return[f[0],f[1]]}function hr(t,e){var r=e.datas,n=t.state,i=n.allMatrix,o=n.beforeMatrix,a=n.is3d,s=n.left,u=n.top,c=n.origin,l=n.offsetMatrix,f=n.targetMatrix,p=n.transformOrigin,d=a?4:3;r.is3d=a,r.matrix=i,r.targetMatrix=f,r.beforeMatrix=o,r.offsetMatrix=l,r.transformOrigin=p,r.inverseMatrix=gt(i,d),r.inverseBeforeMatrix=gt(o,d),r.absoluteOrigin=yt(St([s,u],c),d),r.startDragBeforeDist=Et(r.inverseBeforeMatrix,r.absoluteOrigin,d),r.startDragDist=Et(r.inverseMatrix,r.absoluteOrigin,d)}function gr(t,e){var r=t.datas,n=t.originalDatas.beforeRenderable,i=r.transformIndex,o=n.nextTransforms,a=o.length,s=n.nextTransformAppendedIndexes,u=0;-1===i?(u=o.length,r.transformIndex=u):u=X(s,(function(t){return t.index===i&&t.functionName===e}))?i:i+s.filter((function(t){return t.index<i})).length;var c=function(t,e){var r=t.slice(0,e<0?void 0:e),n=t.slice(0,e<0?void 0:e+1),i=t[e]||"",o=e<0?[]:t.slice(e),a=e<0?[]:t.slice(e+1),s=Nt(r),u=Nt(n),c=Nt([i]),l=Nt(o),f=Nt(a),p=jt(s),d=jt(u),h=jt(l),g=jt(f),v=_t(p,h,4);return{transforms:t,beforeFunctionMatrix:p,beforeFunctionMatrix2:d,targetFunctionMatrix:jt(c),afterFunctionMatrix:h,afterFunctionMatrix2:g,allFunctionMatrix:v,beforeFunctions:s,beforeFunctions2:u,targetFunction:c[0],afterFunctions:l,afterFunctions2:f,beforeFunctionTexts:r,beforeFunctionTexts2:n,targetFunctionText:i,afterFunctionTexts:o,afterFunctionTexts2:a}}(o,u),l=c.targetFunction,f="rotate"===e?"rotateZ":e;r.beforeFunctionTexts=c.beforeFunctionTexts,r.afterFunctionTexts=c.afterFunctionTexts,r.beforeTransform=c.beforeFunctionMatrix,r.beforeTransform2=c.beforeFunctionMatrix2,r.targetTansform=c.targetFunctionMatrix,r.afterTransform=c.afterFunctionMatrix,r.afterTransform2=c.afterFunctionMatrix2,r.targetAllTransform=c.allFunctionMatrix,l.functionName===f?(r.afterFunctionTexts.splice(0,1),r.isAppendTransform=!1):a>u&&(r.isAppendTransform=!0,n.nextTransformAppendedIndexes=__spreadArray(__spreadArray([],s,!0),[{functionName:e,index:u,isAppend:!0}],!1))}function vr(t,e,r){return"".concat(t.beforeFunctionTexts.join(" ")," ").concat(t.isAppendTransform?r:e," ").concat(t.afterFunctionTexts.join(" "))}function yr(t){var e=t.datas,r=br({datas:e,distX:t.distX,distY:t.distY});return Et(mr(e,function(t,e){for(var r=Rt(e),n=0;n<e-1;++n)r[e*(e-1)+n]=t[n]||0;return r}([r[0],r[1]],4)),yt([0,0,0],4),4)}function mr(t,e,r){var n=t.beforeTransform,i=t.afterTransform,o=t.beforeTransform2,a=t.afterTransform2,s=t.targetAllTransform,u=r?_t(s,e,4):_t(e,s,4),c=_t(gt(r?o:n,4),u,4);return _t(c,gt(r?a:i,4),4)}function br(t){var e=t.datas,r=t.distX,n=t.distY,i=e.inverseBeforeMatrix,o=e.is3d,a=e.startDragBeforeDist,s=o?4:3;return wt(Et(i,St(e.absoluteOrigin,[r,n]),s),a)}function _r(t,e){var r=t.datas,n=t.distX,i=t.distY,o=r.inverseBeforeMatrix,a=r.inverseMatrix,s=r.is3d,u=r.startDragBeforeDist,c=r.startDragDist,l=s?4:3;return wt(Et(e?o:a,St(r.absoluteOrigin,[n,i]),l),e?u:c)}function Sr(t){var e=[];return t[1]>=0&&(t[0]>=0&&e.push(3),t[0]<=0&&e.push(2)),t[1]<=0&&(t[0]>=0&&e.push(1),t[0]<=0&&e.push(0)),e}function wr(t,e){var r=(e[0]+1)/2,n=(e[1]+1)/2,i=[R(t[0][0],t[1][0],r,1-r),R(t[0][1],t[1][1],r,1-r)],o=[R(t[2][0],t[3][0],r,1-r),R(t[2][1],t[3][1],r,1-r)];return[R(i[0],o[0],n,1-n),R(i[1],o[1],n,1-n)]}function xr(t,e,r,n){return _t(t,Kr(e,n,r),n)}function Er(t){var e=Mr(t);return{setTransform:function(r,n){void 0===n&&(n=-1),e.startTransforms=z(r)?r:U(r),Cr(t,n)},setTransformIndex:function(e){Cr(t,e)}}}function Or(t,e){Cr(t,Y(Mr(t).startTransforms,(function(t){return 0===t.indexOf("".concat(e,"("))})))}function Cr(t,e){var r=Mr(t),n=t.datas;if(n.transformIndex=e,-1!==e){var i=r.startTransforms[e];if(i){var o=Nt([i]);n.startValue=o[0].functionValue}}}function kr(t,e){Mr(t).nextTransforms=U(e)}function Mr(t){return t.originalDatas.beforeRenderable}function Dr(t){return t.originalDatas.beforeRenderable.nextTransforms}function Ir(t){return Dr(t).join(" ")}function Ar(t){return Mr(t).nextStyle}function Tr(t,e,r,n,i){kr(i,e);var o=Xi.drag(t,fr(i,t.state,r,n,!1)),a=o?o.transform:e;return Fe(Fe({transform:e,drag:o},vn({transform:a},i)),{afterTransform:a})}function Rr(t,e,r,n,i){var o=t.state,a=o.left,s=o.top,u=t.props.groupable,c=function(t,e,r){var n=t.transformOrigin,i=t.offsetMatrix,o=t.is3d,a=e.beforeTransform,s=e.afterTransform,u=o?4:3;return xr(i,mt(_t(_t(a,Lt([r]),4),s,4),4,u),n,u)}(t.state,i,e),l=u?a:0,f=u?s:0,p=wt(n,Br(t,r,c));return wt(p,[l,f])}function Br(t,e,r){void 0===r&&(r=t.state.allMatrix);var n=t.state,i=n.width,o=n.height,a=n.is3d?4:3;return Zr(r,[i/2*(1+e[0]),o/2*(1+e[1])],a)}function Pr(t,e,r,n,i,o){var a=t.props.groupable,s=t.state,u=s.transformOrigin,c=s.offsetMatrix,l=s.is3d,f=s.width,p=s.height,d=s.left,h=s.top,g=o.fixedDirection,v=o.nextTargetMatrix||s.targetMatrix,y=l?4:3,m=function(t,e,r,n,i,o){return void 0===n&&(n=e),void 0===i&&(i=r),void 0===o&&(o=[0,0]),t?t.map((function(t,a){var s=W(t),u=s.value,c=s.unit,l=a?i:n,f=a?r:e;return"%"===t||isNaN(u)?f*(l?o[a]/l:0):"%"!==c?u:f*u/100})):o}(i,e,r,f,p,u),b=a?d:0,_=a?h:0,S=function(t,e,r,n,i,o){var a=wr(Qr(e,r,n,i),o);return[t[0]-a[0],t[1]-a[1]]}(n,xr(c,v,m,y),e,r,y,g);return wt(S,[b,_])}function zr(t,e){return wr(hn(t.state),e)}function Lr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return S.apply(void 0,__spreadArray([Je],t,!1))}function jr(t){t()}function Nr(t){return t&&"none"!==t?P(t)?t:Lt(t):[1,0,0,1,0,0]}function Kr(t,e,r){return bt(e,Pt(r,e),t,Pt(r.map((function(t){return-t})),e))}function qr(t){return Fr(wn(t,":before")).map((function(e,r){var n=W(e),i=n.value,o=n.unit;return i*function(t,e,r){return"%"===e?$r(t.ownerSVGElement)[r?"width":"height"]/100:1}(t,o,0===r)}))}function Fr(t){var e=t.transformOrigin;return e?e.split(" "):["0","0"]}function Ur(t,e){void 0===e&&(e=wn(t));var r=e.transform;if(r&&"none"!==r)return e.transform;if("transform"in t){var n=t.transform.baseVal;if(!n)return"";var i=n.length;if(!i)return"";for(var o=[],a=function(t){var e=n[t].matrix;o.push("matrix(".concat(["a","b","c","d","e","f"].map((function(t){return e[t]})).join(", "),")"))},s=0;s<i;++s)a(s);return o.join(" ")}return""}function Gr(t,e,r){var n,i,o,a,s=document.body,u=!1;if(!t||r)o=t;else{var c=null===(n=null==t?void 0:t.assignedSlot)||void 0===n?void 0:n.parentElement,l=t.parentElement;c?(u=!0,a=l,o=c):o=l}for(var f=!1,p=t===e||o===e,d="relative";o&&o!==s;){e===o&&(p=!0);var h=wn(o),g=o.tagName.toLowerCase(),v=Ur(o,h),y=h.willChange;if(d=h.position,"svg"===g||"static"!==d||v&&"none"!==v||"transform"===y)break;var m=null===(i=null==t?void 0:t.assignedSlot)||void 0===i?void 0:i.parentNode,b=o.parentNode;m&&(u=!0,a=b);var _=m||b;if(_&&11===_.nodeType){o=_.host,f=!0;break}o=_,d="relative"}return{hasSlot:u,parentSlotElement:a,isCustomElement:f,isStatic:"static"===d,isEnd:p||!o||o===s,offsetParent:o||s}}function Hr(t,e,r){var n,i,o,a=t.tagName.toLowerCase(),s=t.offsetLeft,u=t.offsetTop,c=B(s),l=!c;return l||"svg"===a?o=(i=Fr(r).map((function(t){return parseFloat(t)}))).slice():(o=(i=Ye?qr(t):Fr(r).map((function(t){return parseFloat(t)}))).slice(),l=!0,n=function(t,e,r){if(!t.getBBox||!r&&"g"===t.tagName.toLowerCase())return[0,0,0,0];var n=t.getBBox(),i=$r(t.ownerSVGElement),o=n.x-i.x,a=n.y-i.y;return[o,a,e[0]-o,e[1]-a]}(t,i,t===e&&"g"===e.tagName.toLowerCase()),s=n[0],u=n[1],i[0]=n[2],i[1]=n[3]),{tagName:a,isSVG:c,hasOffset:l,offset:[s||0,u||0],origin:i,targetOrigin:o}}function Wr(t,e,r){void 0===r&&(r=wn(t));var n=wn(document.body),i=n.position;if(!(e||i&&"static"!==i))return[0,0];var o=parseInt(n.marginLeft,10),a=parseInt(n.marginTop,10);return"absolute"===r.position&&("auto"===r.top&&"auto"===r.bottom||(a=0),"auto"===r.left&&"auto"===r.right||(o=0)),[o,a]}function Vr(t){t.forEach((function(t){var e=t.matrix;e&&(t.matrix=mt(e,3,4))}))}function Yr(t){for(var e=t.parentElement,r=!1;e;){var n=wn(e).transform;if(n&&"none"!==n){r=!0;break}if(e===document.body)break;e=e.parentElement}return{fixedContainer:e||document.body,hasTransform:r}}function Xr(t,e){return void 0===e&&(e=t.length>9),"".concat(e?"matrix3d":"matrix","(").concat(xt(t,!e).join(","),")")}function $r(t){var e=t.clientWidth,r=t.clientHeight;if(!t)return{x:0,y:0,width:0,height:0,clientWidth:e,clientHeight:r};var n=t.viewBox,i=n&&n.baseVal||{x:0,y:0,width:0,height:0};return{x:i.x,y:i.y,width:i.width||e,height:i.height||r,clientWidth:e,clientHeight:r}}function Jr(t,e){var r=$r(t),n=r.width,i=r.height,o=r.clientWidth,a=r.clientHeight,s=o/n,u=a/i,c=t.preserveAspectRatio.baseVal,l=c.align,f=c.meetOrSlice,p=[0,0],d=[s,u],h=[0,0];if(1!==l){var g=(l-2)%3,v=Math.floor((l-2)/3);p[0]=n*g/2,p[1]=i*v/2;var y=2===f?Math.max(u,s):Math.min(s,u);d[0]=y,d[1]=y,h[0]=(o-n)/2*g,h[1]=(a-i)/2*v}var m=Bt(d,e);return m[e*(e-1)]=h[0],m[e*(e-1)+1]=h[1],Kr(m,e,p)}function Zr(t,e,r){return Et(t,yt(e,r),r)}function Qr(t,e,r,n){return[[0,0],[e,0],[0,r],[e,r]].map((function(e){return Zr(t,e,n)}))}function tn(t){var e=t.map((function(t){return t[0]})),r=t.map((function(t){return t[1]})),n=Math.min.apply(Math,e),i=Math.min.apply(Math,r),o=Math.max.apply(Math,e),a=Math.max.apply(Math,r);return{left:n,top:i,right:o,bottom:a,width:o-n,height:a-i}}function en(t,e,r,n){return tn(Qr(t,e,r,n))}function rn(t,e,r,n){var i=16===t.length?4:3,o=Qr(t,r,n,i),a=o[0],s=a[0],u=a[1],c=o[1],l=c[0],f=c[1],p=o[2],d=p[0],h=p[1],g=o[3],v=g[0],y=g[1],m=Zr(t,e,i),b=m[0],_=m[1],S=Math.min(s,l,d,v),w=Math.min(u,f,h,y),x=Math.max(s,l,d,v);return s=s-S||0,{left:S,top:w,right:x,bottom:Math.max(u,f,h,y),origin:[b=b-S||0,_=_-w||0],pos1:[s,u=u-w||0],pos2:[l=l-S||0,f=f-w||0],pos3:[d=d-S||0,h=h-w||0],pos4:[v=v-S||0,y=y-w||0],direction:it(o)}}function nn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function on(t,e){return nn([e[0]-t[0],e[1]-t[1]])}function an(t,e,r,n){void 0===r&&(r=1),void 0===n&&(n=nt(t,e));var i=on(t,e);return{transform:"translateY(-50%) translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(n,"rad) scaleY(").concat(r,")"),width:"".concat(i,"px")}}function sn(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r.length,o=r.reduce((function(t,e){return t+e[0]}),0)/i,a=r.reduce((function(t,e){return t+e[1]}),0)/i;return{transform:"translateZ(0px) translate(".concat(o,"px, ").concat(a,"px) rotate(").concat(t,"rad) scale(").concat(e,")")}}function un(t,e){var r=t[e];return P(r)?Fe(Fe({},t),r):t}function cn(t,e){void 0===e&&(e=t?wn(t):null);var r=t&&!B(t.offsetWidth),n=0,i=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,p=0,d=0,h=0,g=1/0,v=1/0,y=1/0,m=1/0,b=!1;if(t)if(r||"svg"===t.tagName.toLowerCase()){var _=t.style,S="border-box"===e.boxSizing,w=parseFloat(e.borderLeftWidth)||0,x=parseFloat(e.borderRightWidth)||0,E=parseFloat(e.borderTopWidth)||0,O=parseFloat(e.borderBottomWidth)||0,C=(parseFloat(e.paddingLeft)||0)+(parseFloat(e.paddingRight)||0),k=(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0),M=C+(w+x),D=k+(E+O);f=Math.max(C,Q(e.minWidth,0)||0),p=Math.max(k,Q(e.minHeight,0)||0),g=Q(e.maxWidth,0),v=Q(e.maxHeight,0),isNaN(g)&&(g=1/0),isNaN(v)&&(v=1/0);var I=Q(_.width,0)||0,A=Q(_.height,0)||0,T=parseFloat(e.width)||0,R=parseFloat(e.height)||0;s=parseFloat(e.width),u=parseFloat(e.height),n=c=Math.abs(T-I)<1?tt(f,I||s,g):T,i=l=Math.abs(R-A)<1?tt(p,A||u,v):R,o=c,a=l,S?(y=g,m=v,d=f,h=p,c=n-M,l=i-D):(y=g+M,m=v+D,d=f+M,h=p+D,n=c+M,i=l+D),o=c+C,a=l+k}else{var P=t.getBBox();b=!0,s=n=P.width,u=i=P.height,c=n,l=i,o=n,a=i}return{svg:b,offsetWidth:n,offsetHeight:i,clientWidth:o,clientHeight:a,contentWidth:c,contentHeight:l,cssWidth:s,cssHeight:u,minWidth:f,minHeight:p,maxWidth:g,maxHeight:v,minOffsetWidth:d,minOffsetHeight:h,maxOffsetWidth:y,maxOffsetHeight:m}}function ln(t,e){return nt(e>0?t[0]:t[1],e>0?t[1]:t[0])}function fn(t,e){var r,n=0,i=0,o=0,a=0;if(t)if(t===document.body||t===document.documentElement){o=window.innerWidth,a=window.innerHeight;var s=[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop];n=(r=[-s[0],-s[1]])[0],i=r[1]}else{var u=t.getBoundingClientRect();n=u.left,i=u.top,o=u.width,a=u.height}var c={left:n,top:i,width:o,height:a,right:n+o,bottom:i+a};return t&&e&&(c.clientLeft=t.clientLeft,c.clientTop=t.clientTop,c.clientWidth=t.clientWidth,c.clientHeight=t.clientHeight,c.scrollWidth=t.scrollWidth,c.scrollHeight=t.scrollHeight,c.overflow="visible"!==wn(t).overflow),c}function pn(t){if(t){var e=t.getAttribute("data-direction");if(e){var r=[0,0];return e.indexOf("w")>-1&&(r[0]=-1),e.indexOf("e")>-1&&(r[0]=1),e.indexOf("n")>-1&&(r[1]=-1),e.indexOf("s")>-1&&(r[1]=1),r}}}function dn(t,e){return[St(e,t[0]),St(e,t[1]),St(e,t[2]),St(e,t[3])]}function hn(t){var e=t.left,r=t.top;return dn([t.pos1,t.pos2,t.pos3,t.pos4],[e,r])}function gn(t,e){var r;null===(r=t[e])||void 0===r||r.unset(),t[e]=null}function vn(t,e){if(e){var r=Mr(e);r.nextStyle=Fe(Fe({},r.nextStyle),t)}return{style:t,cssText:Z(t).map((function(e){return"".concat(e,": ").concat(t[e],";")})).join("")}}function yn(t,e,r){var n=e.afterTransform||e.transform;return Fe(Fe({},vn(Fe(Fe(Fe({},t.style),e.style),{transform:n}),r)),{afterTransform:n,transform:t.transform})}function mn(t,e,r,n){var i=e.datas;i.datas||(i.datas={});var o=Fe(Fe({},r),{target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,moveable:t,datas:i.datas,stopDrag:function(){var t;null===(t=e.stop)||void 0===t||t.call(e)}});return i.isStartEvent?n||(i.lastEvent=o):i.isStartEvent=!0,o}function bn(t,e,r){var n=e.datas,i="isDrag"in r?r.isDrag:e.isDrag;return n.datas||(n.datas={}),Fe(Fe({isDrag:i},r),{moveable:t,target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,lastEvent:n.lastEvent,isDouble:e.isDouble,datas:n.datas})}function _n(t,e,r){t._emitter.on(e,r)}function Sn(t,e,r,n){return t.triggerEvent(e,r,n)}function wn(t,e){return window.getComputedStyle(t,e)}function xn(t,e,r){var n={},i={};return t.filter((function(t){var o=t.name;if(n[o]||!e.some((function(e){return t[e]})))return!1;if(!r&&t.ableGroup){if(i[t.ableGroup])return!1;i[t.ableGroup]=!0}return n[o]=!0,!0}))}function En(t,e){return t===e||null==t&&null==e}function On(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function Cn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.sort((function(t,e){return Math.abs(e)-Math.abs(t)})),t[0]}function kn(t,e,r){return Et(gt(t,r),yt(e,r),r)}function Mn(t,e){var r,n=t.is3d?4:3;return r=kn(t.rootMatrix,[e.distX,e.distY],n),e.distX=r[0],e.distY=r[1],e}function Dn(t,e,r,n,i){return wt(Zr(t,St(r,e),i),n)}function In(t,e,r){return r?"".concat(t/e*100,"%"):"".concat(t,"px")}function An(t){return Math.abs(t)<=er?0:t}function Tn(t,e){return void 0===e&&(e=[t]),function(r,n){if(n.isRequest)return!!e.some((function(t){return n.requestAble===t}))&&n.parentDirection;var i=n.inputEvent.target;return ut(i,Lr("direction"))&&(!t||ut(i,Lr(t)))}}function Rn(t){var e={};for(var r in t)e[t[r]]=r;return e}function Bn(t,e){return t?t instanceof Element?t:L(t)?e?document.querySelector(t):t:N(t)?t():"current"in t?t.current:t:null}function Pn(t,e){return t?(!(r=t)||!P(r)||r instanceof Element||!z(r)&&!("length"in r)?[t]:[].slice.call(t)).reduce((function(t,r){return L(r)&&e?__spreadArray(__spreadArray([],t,!0),[].slice.call(document.querySelectorAll(r)),!0):(z(r)?t.push(Pn(r,e)):t.push(Bn(r,e)),t)}),[]):[];var r}function zn(t,e){var r=t.rootMatrix,n=t.is3d,i=gt(r,n?4:3);return n||(i=mt(i,3,4)),i[12]=0,i[13]=0,i[14]=0,function(t,e){var r=Et(t,[e[0],e[1]||0,e[2]||0,1],4),n=r[3]||1;return[r[0]/n,r[1]/n,r[2]/n]}(i,e)}function Ln(t,e,r,n,i){var o=t[0],a=t[1],s=0,u=0;if(i&&o&&a){var c=nt([0,0],e),l=nt([0,0],n),f=nn(e),p=Math.cos(c-l)*f;if(n[0])if(n[1]){var d=2*n[0]*o,h=2*n[1]*a,g=nn([d+e[0],h+e[1]])-nn([d,h]),v=nt([0,0],[r,1]);s=Math.cos(v)*g,u=Math.sin(v)*g}else u=(s=p)/r;else s=(u=p)*r}else s=n[0]*e[0],u=n[1]*e[1];return[s,u]}function jn(t,e,r,n){var i,o=r.ratio,a=r.startOffsetWidth,s=r.startOffsetHeight,u=0,c=0,l=n.distX,f=n.distY,p=n.parentDistance,d=n.parentDist,h=n.parentScale,g=r.fixedDirection,v=[0,1].map((function(e){return Math.abs(t[e]-g[e])})),y=[0,1].map((function(t){var e=v[t];return 0!==e&&(e=2/e),e}));if(d)u=d[0],c=d[1],e&&(u?c||(c=u/o):u=c*o);else if(h)u=(h[0]-1)*a,c=(h[1]-1)*s;else if(p){var m=a*v[0],b=s*v[1],_=nn([m,b]);u=p/_*m*y[0],c=p/_*b*y[1]}else{var S=_r({datas:r,distX:l,distY:f});S=y.map((function(t,e){return S[e]*t})),u=(i=Ln([a,s],S,o,t,e))[0],c=i[1]}return{distWidth:u,distHeight:c}}var Nn=Ue("pinchable",{events:{onPinchStart:"pinchStart",onPinch:"pinch",onPinchEnd:"pinchEnd",onPinchGroupStart:"pinchGroupStart",onPinchGroup:"pinchGroup",onPinchGroupEnd:"pinchGroupEnd"},dragStart:function(){return!0},pinchStart:function(t,e){var r=e.datas,n=e.targets,i=e.angle,o=e.originalDatas,a=t.props,s=a.pinchable,u=a.ables;if(!s)return!1;var c="onPinch".concat(n?"Group":"","Start"),l="drag".concat(n?"Group":"","ControlStart"),f=(!0===s?t.controlAbles:u.filter((function(t){return s.indexOf(t.name)>-1}))).filter((function(t){return t.canPinch&&t[l]})),p=mn(t,e,{});n&&(p.targets=n);var d=Sn(t,c,p);r.isPinch=!1!==d,r.ables=f;var h=r.isPinch;return!!h&&(f.forEach((function(r){if(o[r.name]=o[r.name]||{},r[l]){var n=Fe(Fe({},e),{datas:o[r.name],parentRotate:i,isPinch:!0});r[l](t,n)}})),t.state.snapRenderInfo={request:e.isRequest,direction:[0,0]},h)},pinch:function(t,e){var r=e.datas,n=e.scale,i=e.distance,o=e.originalDatas,a=e.inputEvent,s=e.targets,u=e.angle;if(r.isPinch){var c=i*(1-1/n),l=mn(t,e,{});s&&(l.targets=s);var f="onPinch".concat(s?"Group":"");Sn(t,f,l);var p=r.ables,d="drag".concat(s?"Group":"","Control");return p.forEach((function(r){r[d]&&r[d](t,Fe(Fe({},e),{datas:o[r.name],inputEvent:a,parentDistance:c,parentRotate:u,isPinch:!0}))})),l}},pinchEnd:function(t,e){var r=e.datas,n=e.isPinch,i=e.inputEvent,o=e.targets,a=e.originalDatas;if(r.isPinch){var s="onPinch".concat(o?"Group":"","End"),u=bn(t,e,{isDrag:n});o&&(u.targets=o),Sn(t,s,u);var c=r.ables,l="drag".concat(o?"Group":"","ControlEnd");return c.forEach((function(r){r[l]&&r[l](t,Fe(Fe({},e),{isDrag:n,datas:a[r.name],inputEvent:i,isPinch:!0}))})),n}},pinchGroupStart:function(t,e){return this.pinchStart(t,Fe(Fe({},e),{targets:t.props.targets}))},pinchGroup:function(t,e){return this.pinch(t,Fe(Fe({},e),{targets:t.props.targets}))},pinchGroupEnd:function(t,e){return this.pinchEnd(t,Fe(Fe({},e),{targets:t.props.targets}))}});function Kn(t,e,r){var n=r.originalDatas;n.groupable=n.groupable||{};var i=n.groupable;i.childDatas=i.childDatas||[];var o=i.childDatas;return t.moveables.map((function(t,n){return o[n]=o[n]||{},o[n][e]=o[n][e]||{},Fe(Fe({},r),{datas:o[n][e],originalDatas:o[n]})}))}function qn(t,e,r,n,i,o,a){var s=!!r.match(/Start$/g),u=!!r.match(/End$/g),c=i.isPinch,l=i.datas,f=Kn(t,e.name,i),p=t.moveables,d=f.map((function(t,i){var f=p[i],d=f.state,h=d.gestos,g=t;if(s)g=new pr(a).dragStart(n,t);else{if(h[a]||(h[a]=l.childGestos[i]),!h[a])return;g=fr(t,d,n,c,o,a)}var v=e[r](f,Fe(Fe({},g),{parentFlag:!0}));return u&&(h[a]=null),v}));return s&&(l.childGestos=p.map((function(t){return t.state.gestos[a]}))),d}function Fn(t,e,r,n,i,o){void 0===i&&(i=function(t,e){return e});var a=!!r.match(/End$/g),s=Kn(t,e.name,n),u=t.moveables;return s.map((function(t,n){var s,c=u[n];s=i(c,t);var l=e[r](c,Fe(Fe({},s),{parentFlag:!0}));return l&&o&&o(c,t,l,n),a&&(c.state.gestos={}),l}))}var Un=["left","right","center"],Gn=["top","bottom","middle"],Hn={start:"left",end:"right",center:"center"},Wn={start:"top",end:"bottom",center:"middle"};function Vn(t,e){var r=t.props,n=r.snappable,i=r.bounds,o=r.innerBounds,a=r.verticalGuidelines,s=r.horizontalGuidelines,u=r.snapGridWidth,c=r.snapGridHeight,l=t.state,f=l.guidelines,p=l.enableSnap;return!(!n||!p||e&&!0!==n&&n.indexOf(e)<0)&&!!(u||c||i||o||f&&f.length||a&&a.length||s&&s.length)}function Yn(t){return!1===t?{}:!0!==t&&t?t:{left:!0,right:!0,top:!0,bottom:!0}}function Xn(t,e){var r=function(t,e){var r=Yn(t),n={};for(var i in r)i in e&&r[i]&&(n[i]=e[i]);return n}(t,e),n=Gn.filter((function(t){return t in r})),i=Un.filter((function(t){return t in r}));return{horizontal:n.map((function(t){return r[t]})),vertical:i.map((function(t){return r[t]}))}}function $n(t,e,r,n){var i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.length-1,n=0;n<r;++n){var i=t[n];if(!B(i))return i}return t[r]}(n,t.props.snapThreshold,5);return Jn(t.state.guidelines,e,r,i)}function Jn(t,e,r,n){return{vertical:ti(t,"vertical",e,n),horizontal:ti(t,"horizontal",r,n)}}function Zn(t,e,r){var n=Xn(t.props.snapDirections,e);return $n(t,n.vertical,n.horizontal,r)}function Qn(t){var e=t.isSnap;if(!e)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var r=t.posInfos[0],n=r.guidelineInfos[0],i=n.offset,o=n.dist,a=n.guideline;return{isSnap:e,offset:i,dist:o,pos:r.pos,guideline:a}}function ti(t,e,r,n){if(!t||!t.length)return{isSnap:!1,index:-1,posInfos:[]};var i="vertical"===e?0:1,o=r.map((function(r,o){var a=t.map((function(t){var e=t.pos,n=r-e[i];return{offset:n,dist:Math.abs(n),guideline:t}})).filter((function(t){var r=t.guideline,i=t.dist;return!(r.type!==e||i>n)})).sort((function(t,e){return t.dist-e.dist}));return{pos:r,index:o,guidelineInfos:a}})).filter((function(t){return t.guidelineInfos.length>0})).sort((function(t,e){return t.guidelineInfos[0].dist-e.guidelineInfos[0].dist})),a=o.length>0;return{isSnap:a,index:a?o[0].index:-1,posInfos:o}}function ei(t,e,r){var n=[];if(r[0]&&r[1])n=[r,[-r[0],r[1]],[r[0],-r[1]]].map((function(t){return wr(e,t)}));else if(r[0]||r[1])t.props.keepRatio?n=[[-1,-1],[-1,1],[1,-1],[1,1],r].map((function(t){return wr(e,t)})):(n=function(t,e){return Sr(e).map((function(e){return t[e]}))}(e,r),n.length>1&&n.push([(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]));else for(var i=[e[0],e[1],e[3],e[2],e[0]],o=0;o<4;++o)n.push(i[o]),n.push([(i[o][0]+i[o+1][0])/2,(i[o][1]+i[o+1][1])/2]);return $n(t,n.map((function(t){return t[0]})),n.map((function(t){return t[1]})),1)}function ri(t,e){var r=Math.abs(t.offset),n=Math.abs(e.offset);return t.isBound&&e.isBound?n-r:t.isBound?-1:e.isBound?1:t.isSnap&&e.isSnap?n-r:t.isSnap?-1:e.isSnap||r<er?1:n<er?-1:r-n}function ni(t,e){return t.slice().sort((function(t,r){var n=t.sign[e],i=r.sign[e],o=t.offset[e],a=r.offset[e];return n?i?ri({isBound:t.isBound,isSnap:t.isSnap,offset:o},{isBound:r.isBound,isSnap:r.isSnap,offset:a}):-1:1}))[0]}function ii(t,e){var r=rt([e[0][0],e[1][0]]),n=rt([e[0][1],e[1][1]]);return{vertical:r<=t[0],horizontal:n<=t[1]}}function oi(t,e){var r,n,i=e[0],o=e[1],a=o[0]-i[0],s=o[1]-i[1];if(Math.abs(a)<er&&(a=0),Math.abs(s)<er&&(s=0),a)if(s){r=s/a*(t[0]-i[0])+i[1],n=t[1]}else r=i[1],n=t[1];else r=i[0],n=t[0];return r-n}function ai(t,e,r,n){return void 0===n&&(n=er),t.every((function(t){var i=oi(t,e);return i<=0===r||Math.abs(i)<=n}))}function si(t,e,r,n,i){return void 0===i&&(i=0),n&&e-i<=t||!n&&t<=r+i?{isBound:!0,offset:n?e-t:r-t}:{isBound:!1,offset:0}}function ui(t,e,r,n,i,o){var a=e[0],s=e[1],u=t[0],c=r[0],l=r[1],f=An(l[1]-c[1]),p=s,d=a,h=-a/s;if(!An(l[0]-c[0])){if(o&&!d)return{isBound:!1,offset:0};if(p)return si(h*(c[0]-u[0])+u[1],c[1],l[1],n,i);var g=c[0]-u[0];return{isBound:v=Math.abs(g)<=(i||0),offset:v?g:0}}if(!f){if(o&&!p)return{isBound:!1,offset:0};if(d)return si((c[1]-u[1])/h+u[0],c[0],l[0],n,i);var v;g=c[1]-u[1];return{isBound:v=Math.abs(g)<=(i||0),offset:v?g:0}}return{isBound:!1,offset:0}}function ci(t,e,r){return e.map((function(e){var n=function(t,e){var r=e.line,n=e.centerSign,i=e.verticalSign,o=e.horizontalSign,a=e.lineConstants,s=t.props.innerBounds;if(!s)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var u=s.left,c=s.top,l=s.width,f=s.height,p=[[u,c],[u,c+f]],d=[[u,c],[u+l,c]],h=[[u+l,c],[u+l,c+f]],g=[[u,c+f],[u+l,c+f]];if(ai([[u,c],[u+l,c],[u,c+f],[u+l,c+f]],r,n))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var v=ui(r,a,d,i),y=ui(r,a,g,i),m=ui(r,a,p,o),b=ui(r,a,h,o),_=v.isBound&&y.isBound,S=v.isBound||y.isBound,w=m.isBound&&b.isBound,x=m.isBound||b.isBound,E=Cn(v.offset,y.offset),O=Cn(m.offset,b.offset),C=[0,0],k=!1,M=!1;return Math.abs(O)<Math.abs(E)?(C=[E,0],k=S,M=_):(C=[0,O],k=x,M=w),{isAllBound:M,isVerticalBound:S,isHorizontalBound:x,isBound:k,offset:C}}(t,e),i=n.isBound,o=n.offset,a=n.isVerticalBound,s=n.isHorizontalBound,u=e.multiple,c=_r({datas:r,distX:o[0],distY:o[1]}).map((function(t,e){return t*(u[e]?2/u[e]:0)}));return{sign:u,isBound:i,isVerticalBound:a,isHorizontalBound:s,isSnap:!1,offset:c}}))}function li(t,e,r){var n,i=ci(t,fi(t,e,[0,0],!1).map((function(t){return Fe(Fe({},t),{multiple:t.multiple.map((function(t){return 2*Math.abs(t)}))})})),r),o=ni(i,0),a=ni(i,1),s=0,u=0,c=o.isVerticalBound||a.isVerticalBound,l=o.isHorizontalBound||a.isHorizontalBound;return(c||l)&&(n=function(t,e){var r=t.datas,n=t.distX,i=t.distY,o=r.beforeMatrix,a=r.matrix,s=r.is3d,u=r.startDragBeforeDist,c=r.startDragDist,l=r.absoluteOrigin,f=s?4:3;return wt(Et(e?o:a,St(e?u:c,[n,i]),f),l)}({datas:r,distX:-o.offset[0],distY:-a.offset[1]}),s=n[0],u=n[1]),{vertical:{isBound:c,offset:s},horizontal:{isBound:l,offset:u}}}function fi(t,e,r,n){var i=t.state,o=Qr(i.allMatrix,100,100,i.is3d?4:3),a=wr(o,[0,0]);return function(t,e){var r=[],n=t[0],i=t[1];return n&&i?r.push([[0,2*i],t,[-n,i]],[[2*n,0],t,[n,-i]]):n?(r.push([[2*n,0],[n,1],[n,-1]]),e&&r.push([[0,-1],[n,-1],[-n,-1]],[[0,1],[n,1],[-n,1]])):i?(r.push([[0,2*i],[1,i],[-1,i]]),e&&r.push([[-1,0],[-1,i],[-1,-i]],[[1,0],[1,i],[1,-i]])):r.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),r}(r,n).map((function(t){var r=t[0],n=t[1],i=t[2],s=[wr(o,n),wr(o,i)],u=function(t){var e=t[0],r=t[1],n=r[0]-e[0],i=r[1]-e[1];Math.abs(n)<A&&(n=0),Math.abs(i)<A&&(i=0);var o=0,a=0,s=0;return n?i?(a=1,s=(o=-i/n)*e[0]-e[1]):(a=1,s=-e[1]):(o=-1,s=e[0]),[o,a,s].map((function(t){return at(t,A)}))}(s),c=ii(a,s),l=c.vertical,f=c.horizontal;return{multiple:r,centerSign:oi(a,s)<=0,verticalSign:l,horizontalSign:f,lineConstants:u,line:[wr(e,n),wr(e,i)]}}))}function pi(t,e,r,n){var i=n?t.map((function(t){return Dt(t,n)})):t;return[[i[0],i[1]],[i[1],i[3]],[i[3],i[2]],[i[2],i[0]]].some((function(t){var n=oi(r,t)<=0;return!ai(e,t,n)}))}function di(t,e,r,n,i){var o=t.props.innerBounds,a=i*Math.PI/180;if(!o)return[];var s=o.left,u=o.top,c=o.width,l=o.height,f=s-n[0],p=s+c-n[0],d=u-n[1],h=u+l-n[1],g=[[f,d],[p,d],[f,h],[p,h]],v=wr(r,[0,0]);if(!pi(r,g,v,0))return[];var y=[],m=g.map((function(t){return[nn(t),nt([0,0],t)]}));return[[r[0],r[1]],[r[1],r[3]],[r[3],r[2]],[r[2],r[0]]].forEach((function(t){var r=nt([0,0],function(t){var e=t[0],r=t[1],n=r[0]-e[0],i=r[1]-e[1];if(!n)return[e[0],0];if(!i)return[0,e[1]];var o=i/n,a=-o*e[0]+e[1];return[-a/(o+1/o),a/(o*o+1)]}(t)),n=function(t){var e=t[0],r=t[1],n=r[0]-e[0],i=r[1]-e[1];if(!n)return Math.abs(e[0]);if(!i)return Math.abs(e[1]);var o=i/n;return Math.abs((-o*e[0]+e[1])/Math.sqrt(Math.pow(o,2)+1))}(t);y.push.apply(y,m.filter((function(t){var e=t[0];return e&&n<=e})).map((function(t){var e=t[0],i=t[1],o=Math.acos(e?n/e:0);return[a+(i+o)-r,a+(i-o)-r]})).reduce((function(t,e){return t.push.apply(t,e),t}),[]).filter((function(t){return!pi(e,g,v,t)})).map((function(t){return at(180*t/Math.PI,er)})))})),y}function hi(t,e,r){var n=t||{},i=n.position,o=void 0===i?"client":i,a=n.left,s=void 0===a?-1/0:a,u=n.top,c=void 0===u?-1/0:u,l=n.right,f=void 0===l?1/0:l,p=n.bottom,d={position:o,left:s,top:c,right:f,bottom:void 0===p?1/0:p};return{vertical:vi(d,e,!0),horizontal:vi(d,r,!1)}}function gi(t,e){var r=t.state,n=r.containerClientRect,i=n.clientHeight,o=n.clientWidth,a=n.clientLeft,s=n.clientTop,u=r.snapOffset,c=u.left,l=u.top,f=u.right,p=u.bottom,d=e||t.props.bounds||{},h="css"===(d.position||"client"),g=d.left,v=void 0===g?-1/0:g,y=d.top,m=void 0===y?-1/0:y,b=d.right,_=void 0===b?h?-1/0:1/0:b,S=d.bottom,w=void 0===S?h?-1/0:1/0:S;return h&&(_=o+f-c-_,w=i+p-l-w),{left:v+c-a,right:_+c-a,top:m+l-s,bottom:w+l-s}}function vi(t,e,r){var n=t[r?"left":"top"],i=t[r?"right":"bottom"],o=Math.min.apply(Math,e),a=Math.max.apply(Math,e),s=[];return n+1>o&&s.push({isBound:!0,offset:o-n,pos:n}),i-1<a&&s.push({isBound:!0,offset:a-i,pos:i}),s.length||s.push({isBound:!1,offset:0,pos:0}),s.sort((function(t,e){return Math.abs(e.offset)-Math.abs(t.offset)}))}function yi(t,e,r){return(r?t.map((function(t){return Dt(t,r)})):t).some((function(t){return t[0]<e.left&&Math.abs(t[0]-e.left)>.1||t[0]>e.right&&Math.abs(t[0]-e.right)>.1||t[1]<e.top&&Math.abs(t[1]-e.top)>.1||t[1]>e.bottom&&Math.abs(t[1]-e.bottom)>.1}))}function mi(t,e,r,n,i){if(!t.props.bounds)return[];var o=i*Math.PI/180,a=gi(t),s=a.left,u=a.top,c=a.right,l=a.bottom,f=s-n[0],p=c-n[0],d=u-n[1],h=l-n[1],g={left:f,top:d,right:p,bottom:h};if(!yi(r,g,0))return[];var v=[];return[[f,0],[p,0],[d,1],[h,1]].forEach((function(t){var n=t[0],i=t[1];r.forEach((function(t){var r=nt([0,0],t);v.push.apply(v,function(t,e,r){var n=nn(t),i=Math.sqrt(n*n-e*e)||0;return[i,-i].sort((function(e,n){return Math.abs(e-t[r?0:1])-Math.abs(n-t[r?0:1])})).map((function(t){return nt([0,0],r?[t,e]:[e,t])}))}(t,n,i).map((function(t){return o+t-r})).filter((function(t){return!yi(e,g,t)})).map((function(t){return at(180*t/Math.PI,er)})))}))})),v}function bi(t,e){return function(t,e){var r,n=t.direction,i=t.classNames,o=t.size,a=t.pos,s=t.zoom,u=t.key,c="horizontal"===n,l=c?"Y":"X";return e.createElement("div",{key:u,className:i.join(" "),style:(r={},r[c?"width":"height"]="".concat(o),r.transform="translate(".concat(a[0],", ").concat(a[1],") translate").concat(l,"(-50%) scale").concat(l,"(").concat(s,")"),r)})}(Fe(Fe({},t),{classNames:__spreadArray([Lr("line","guideline",t.direction)],t.classNames,!0).filter((function(t){return t})),size:t.size||"".concat(t.sizeValue,"px"),pos:t.pos||t.posValue.map((function(t){return"".concat(at(t,.1),"px")}))}),e)}function _i(t,e,r,n,i,o,a,s){var u=t.props.zoom;return r.map((function(t,r){var c=t.type,l=t.pos,f=[0,0];return f[a]=n,f[a?0:1]=-i+l,bi({key:"".concat(e,"TargetGuideline").concat(r),classNames:[Lr("target","bold",c)],posValue:f,sizeValue:o,zoom:u,direction:e},s)}))}function Si(t,e,r,n,i,o){var a=t.props,s=a.zoom,u=a.isDisplayInnerSnapDigit,c="horizontal"===e?Hn:Wn,l=i[c.start],f=i[c.end];return r.filter((function(t){var e=t.hide,r=t.elementRect;if(e)return!1;if(u&&r){var n=r.rect;if(n[c.start]<=l&&f<=n[c.end])return!1}return!0})).map((function(t,r){var i=t.pos,a=t.size,u=t.element,c=t.className,l=[-n[0]+i[0],-n[1]+i[1]];return bi({key:"".concat(e,"-default-guideline-").concat(r),classNames:u?[Lr("bold"),c]:[Lr("normal"),c],direction:e,posValue:l,sizeValue:a,zoom:s},o)}))}function wi(t,e,r,n,i,o,a,s){var u,c=t.props,l=c.snapDigit,f=void 0===l?0:l,p=c.isDisplaySnapDigit,d=void 0===p||p,h=c.snapDistFormat,g=void 0===h?function(t,e){return t}:h,v=c.zoom,y="horizontal"===e?"X":"Y",m="vertical"===e?"height":"width",b=Math.abs(i),_=d?parseFloat(b.toFixed(f)):0;return s.createElement("div",{key:"".concat(e,"-").concat(r,"-guideline-").concat(n),className:Lr("guideline-group",e),style:(u={left:"".concat(o[0],"px"),top:"".concat(o[1],"px")},u[m]="".concat(b,"px"),u)},bi({direction:e,classNames:[Lr(r),a],size:"100%",posValue:[0,0],sizeValue:b,zoom:v},s),s.createElement("div",{className:Lr("size-value","gap"),style:{transform:"translate".concat(y,"(-50%) scale(").concat(v,")")}},_>0?g(_,e):""))}function xi(t,e,r,n,i){var o=t.props.isDisplayInnerSnapDigit,a=[];return["vertical","horizontal"].forEach((function(s){var u=e.filter((function(t){return t.type===s})),c="vertical"===s?1:0,l=c?0:1,f=function(t,e,r,n){var i,o,a,s,u="vertical"===t?0:1,c="vertical"===t?1:0,l=u?Hn:Wn,f=r[l.start],p=r[l.end];return(i=e,o=function(t){return t.pos[u]},a=[],s=[],i.forEach((function(t,e){var r=o(t,e,i),n=s.indexOf(r),u=a[n]||[];-1===n&&(s.push(r),a.push(u)),u.push(t)})),a).map((function(e){var r=[],i=[];return e.forEach((function(e){var o,a,s=e.element,d=e.elementRect.rect;if(d[l.end]<f)r.push(e);else if(p<d[l.start])i.push(e);else if(d[l.start]<=f&&p<=d[l.end]&&n){var h=e.pos,g={element:s,rect:Fe(Fe({},d),(o={},o[l.end]=d[l.start],o))},v={element:s,rect:Fe(Fe({},d),(a={},a[l.start]=d[l.end],a))},y=[0,0],m=[0,0];y[u]=h[u],y[c]=h[c],m[u]=h[u],m[c]=h[c]+e.size,r.push({type:t,pos:y,size:0,elementRect:g}),i.push({type:t,pos:m,size:0,elementRect:v})}})),r.sort((function(t,e){return e.pos[c]-t.pos[c]})),i.sort((function(t,e){return t.pos[c]-e.pos[c]})),{total:e,start:r,end:i,inner:[]}}))}(s,u,n,o),p=c?Wn:Hn,d=c?Hn:Wn,h=n[p.start],g=n[p.end];f.forEach((function(e){var o=e.total,u=e.start,f=e.end,v=e.inner,y=r[l]+o[0].pos[l]-n[d.start],m=n;u.forEach((function(e){var n=e.elementRect.rect,o=m[p.start]-n[p.end];if(o>0){var u=[0,0];u[c]=r[c]+m[p.start]-h-o,u[l]=y,a.push(wi(t,s,"dashed",a.length,o,u,e.className,i))}m=n})),m=n,f.forEach((function(e){var n=e.elementRect.rect,o=n[p.start]-m[p.end];if(o>0){var u=[0,0];u[c]=r[c]+m[p.end]-h,u[l]=y,a.push(wi(t,s,"dashed",a.length,o,u,e.className,i))}m=n})),v.forEach((function(e){var n=e.elementRect.rect,o=h-n[p.start],u=n[p.end]-g,f=[0,0],d=[0,0];f[c]=r[c]-o,f[l]=y,d[c]=r[c]+g-h,d[l]=y,a.push(wi(t,s,"dashed",a.length,o,f,e.className,i)),a.push(wi(t,s,"dashed",a.length,u,d,e.className,i))}))}))})),a}function Ei(t,e,r,n,i){var o=function(t,e,r,n){var i=e[0]-t[0],o=e[1]-t[1];if(Math.abs(i)<A&&(i=0),Math.abs(o)<A&&(o=0),!i)return n?[0,0]:[0,r];if(!o)return n?[r,0]:[0,0];var a=o/i,s=t[1]-a*t[0];return n?[r,a*(e[0]+r)+s-e[1]]:[(e[1]+r-s)/a-e[0],r]}(t,e,r,n);if(!o)return{isOutside:!1,offset:[0,0]};var a=ot(t,e),s=ot(o,t),u=ot(o,e),c=s>a||u>a,l=_r({datas:i,distX:o[0],distY:o[1]});return{offset:[l[0],l[1]],isOutside:c}}function Oi(t,e){return t.isBound?t.offset:e.isSnap?Qn(e).offset:0}function Ci(t,e,r,n,i,o){if(!Vn(t,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var a=dn(o.absolutePoses,[e,r]),s=tn(a),u=s.left,c=s.right,l=s.top,f=s.bottom,p={horizontal:a.map((function(t){return t[1]})),vertical:a.map((function(t){return t[0]}))},d=ki(t,i,Xn(Yn(t.props.snapDirections),{left:u,right:c,top:l,bottom:f,center:(u+c)/2,middle:(l+f)/2}),p),h=d.vertical,g=d.horizontal,v=li(t,a,o),y=v.vertical,m=v.horizontal,b=h.isSnap,_=g.isSnap,S=h.isBound||y.isBound,w=g.isBound||m.isBound,x=function(t,e,r,n,i){var o=e[0],a=e[1],s=r[0],u=r[1],c=n[0],l=n[1],f=i[0],p=i[1],d=-f,h=-p;if(t&&o&&a){d=0,h=0;var g=[];if(s&&u?g.push([0,p],[f,0]):s?g.push([f,0]):u?g.push([0,p]):c&&l?g.push([0,p],[f,0]):c?g.push([f,0]):l&&g.push([0,p]),g.length){g.sort((function(t,e){return nn(wt([o,a],t))-nn(wt([o,a],e))}));var v=g[0];if(v[0]&&Math.abs(o)>A)d=-v[0],h=a*Math.abs(o+d)/Math.abs(o)-a;else if(v[1]&&Math.abs(a)>A){var y=a;h=-v[1],d=o*Math.abs(a+h)/Math.abs(y)-o}if(t&&u&&s)if(Math.abs(d)>A&&Math.abs(d)<Math.abs(f))d*=m=Math.abs(f)/Math.abs(d),h*=m;else if(Math.abs(h)>A&&Math.abs(h)<Math.abs(p)){var m;d*=m=Math.abs(p)/Math.abs(h),h*=m}else d=Cn(-f,d),h=Cn(-p,h)}}else d=o||s?-f:0,h=a||u?-p:0;return[d,h]}(n,[e,r],[S,w],[b,_],[Cn(h.offset,y.offset),Cn(g.offset,m.offset)]);return[{isBound:S,isSnap:b,offset:x[0]},{isBound:w,isSnap:_,offset:x[1]}]}function ki(t,e,r,n){void 0===n&&(n=r);var i=hi(gi(t),n.vertical,n.horizontal),o=i.horizontal,a=i.vertical,s=e?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:$n(t,r.vertical,r.horizontal),u=s.horizontal,c=s.vertical,l=Oi(o[0],u),f=Oi(a[0],c),p=Math.abs(l),d=Math.abs(f);return{horizontal:{isBound:o[0].isBound,isSnap:u.isSnap,snapIndex:u.index,offset:l,dist:p,bounds:o,snap:u},vertical:{isBound:a[0].isBound,isSnap:c.isSnap,snapIndex:c.index,offset:f,dist:d,bounds:a,snap:c}}}function Mi(t,e,r,n,i){var o=hi(e,r,n),a=o.horizontal,s=o.vertical,u=Jn(t,r,n,i),c=u.horizontal,l=u.vertical,f=Oi(a[0],c),p=Oi(s[0],l),d=Math.abs(f),h=Math.abs(p);return{horizontal:{isBound:a[0].isBound,isSnap:c.isSnap,snapIndex:c.index,offset:f,dist:d,bounds:a,snap:c},vertical:{isBound:s[0].isBound,isSnap:l.isSnap,snapIndex:l.index,offset:p,dist:h,bounds:s,snap:l}}}function Di(t,e,r,n,i,o){return r.map((function(r){var a=r[0],s=r[1],u=wr(e,a),c=wr(e,s),l=n?function(t,e,r,n){var i=function(t,e,r){var n=gi(t),i=n.left,o=n.top,a=n.right,s=n.bottom,u=r[0],c=r[1],l=wt(r,e),f=l[0],p=l[1];Math.abs(f)<er&&(f=0),Math.abs(p)<er&&(p=0);var d=p>0,h=f>0,g={isBound:!1,offset:0,pos:0},v={isBound:!1,offset:0,pos:0};if(0===f&&0===p)return{vertical:g,horizontal:v};if(0===f)d?s<c&&(v.pos=s,v.offset=c-s):o>c&&(v.pos=o,v.offset=c-o);else if(0===p)h?a<u&&(g.pos=a,g.offset=u-a):i>u&&(g.pos=i,g.offset=u-i);else{var y=p/f,m=r[1]-y*u,b=0,_=0,S=!1;h&&a<=u?(b=y*a+m,_=a,S=!0):!h&&u<=i&&(b=y*i+m,_=i,S=!0),S&&(b<o||b>s)&&(S=!1),S||(d&&s<=c?(_=((b=s)-m)/y,S=!0):!d&&c<=o&&(_=((b=o)-m)/y,S=!0)),S&&(g.isBound=!0,g.pos=_,g.offset=u-_,v.isBound=!0,v.pos=b,v.offset=c-b)}return{vertical:g,horizontal:v}}(t,e,r),o=i.horizontal,a=i.vertical,s=n?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:function(t,e,r){var n=r[0],i=r[1],o=e[0],a=e[1],s=wt(r,e),u=s[0],c=s[1],l=c>0,f=u>0;u=An(u),c=An(c);var p={isSnap:!1,offset:0,pos:0},d={isSnap:!1,offset:0,pos:0};if(0===u&&0===c)return{vertical:p,horizontal:d};var h=$n(t,u?[n]:[],c?[i]:[]),g=h.vertical,v=h.horizontal;g.posInfos.filter((function(t){var e=t.pos;return f?e>=o:e<=o})),v.posInfos.filter((function(t){var e=t.pos;return l?e>=a:e<=a})),g.isSnap=g.posInfos.length>0,v.isSnap=v.posInfos.length>0;var y=Qn(g),m=y.isSnap,b=y.guideline,_=Qn(v),S=_.isSnap,w=_.guideline,x=S?w.pos[1]:0,E=m?b.pos[0]:0;if(0===u)S&&(d.isSnap=!0,d.pos=w.pos[1],d.offset=i-d.pos);else if(0===c)m&&(p.isSnap=!0,p.pos=E,p.offset=n-E);else{var O=c/u,C=r[1]-O*n,k=0,M=0,D=!1;m?(k=O*(M=E)+C,D=!0):S&&(M=((k=x)-C)/O,D=!0),D&&(p.isSnap=!0,p.pos=M,p.offset=n-M,d.isSnap=!0,d.pos=k,d.offset=i-k)}return{vertical:p,horizontal:d}}(t,e,r),u=s.horizontal,c=s.vertical,l=Ii(o,u),f=Ii(a,c),p=Math.abs(l),d=Math.abs(f);return{horizontal:{isBound:o.isBound,isSnap:u.isSnap,offset:l,dist:p},vertical:{isBound:a.isBound,isSnap:c.isSnap,offset:f,dist:d}}}(t,u,c,i):ki(t,i,{vertical:[c[0]],horizontal:[c[1]]}),f=l.horizontal,p=f.offset,d=f.isBound,h=f.isSnap,g=l.vertical,v=g.offset,y=g.isBound,m=g.isSnap,b=wt(s,a);if(!v&&!p)return{isBound:y||d,isSnap:m||h,sign:b,offset:[0,0]};var _=function(t,e,r,n){var i=nt(t,e)/Math.PI*180,o=r.vertical,a=o.isBound,s=o.isSnap,u=o.dist,c=r.horizontal,l=c.isBound,f=c.isSnap,p=i%180,d=p<3||p>177,h=p>87&&p<93;return c.dist<u&&(a||s&&!h&&(!n||!d))?"vertical":!l&&(!f||d||n&&h)?"":"horizontal"}(u,c,l,n);if(!_)return{sign:b,isBound:!1,isSnap:!1,offset:[0,0]};var S="vertical"===_,w=[0,0];return w=(w=n||1!==Math.abs(s[0])||1!==Math.abs(s[1])||a[0]===s[0]||a[1]===s[1]?Ei(u,c,-(S?v:p),S,o).offset:_r({datas:o,distX:-v,distY:-p})).map((function(t,e){return t*(b[e]?2/b[e]:0)})),{sign:b,isBound:S?y:d,isSnap:S?m:h,offset:w}}))}function Ii(t,e){return t.isBound?t.offset:e.isSnap?e.offset:0}function Ai(t){var e=t.state,r=e.snapOffset,n=e.containerClientRect,i=n.overflow,o=n.scrollHeight,a=n.scrollWidth,s=n.clientHeight,u=n.clientWidth,c=n.clientLeft,l=n.clientTop,f=t.props,p=f.snapGap,d=void 0===p||p,h=f.verticalGuidelines,g=f.horizontalGuidelines,v=f.snapThreshold,y=void 0===v?5:v,m=f.snapGridWidth,b=void 0===m?0:m,_=f.snapGridHeight,S=void 0===_?0:_,w=f.maxSnapElementGuidelineDistance,x=void 0===w?1/0:w,E=tn(hn(t.state)),O=E.top,C=E.left,k=E.bottom,M=E.right,D={top:O,left:C,bottom:k,right:M,center:(C+M)/2,middle:(O+k)/2},I=function(t){var e=t.state,r=t.props.elementGuidelines,n=void 0===r?[]:r;if(!n.length)return e.elementRects=[],[];var i=(e.elementRects||[]).filter((function(t){return!t.refresh})),o=n.map((function(t){return P(t)&&"element"in t?Fe(Fe({},t),{element:Bn(t.element,!0)}):{element:Bn(t,!0)}})).filter((function(t){return t.element})),a=(l=i.map((function(t){return t.element})),f=o.map((function(t){return t.element})),Ht(l,f,Xt)),s=a.maintained,u=a.added,c=[];var l,f;s.forEach((function(t){var e=t[0],r=t[1];c[r]=i[e]})),function(t,e){if(!e.length)return[];var r=t.state,n=r.containerClientRect,i=r.targetClientRect,o=i.top,a=i.left,s=r.rootMatrix,u=r.is3d,c=u?4:3,l=function(t,e,r){var n=Zr(t,[e.clientLeft,e.clientTop],r);return[e.left+n[0],e.top+n[1]]}(s,n,c),f=l[0],p=l[1],d=hn(r),h=ee(d),g=h.minX,v=h.minY,y=wt([g,v],kn(s,[a-f,o-p],c)).map((function(t){return e=t,Math.round(e%1==-.5?e-1:e);var e})),m=y[0],b=y[1];return e.map((function(t){var e=t.element.getBoundingClientRect(),r=e.left-f,n=e.top-p,i=n+e.height,o=r+e.width,a=kn(s,[r,n],c),u=a[0],l=a[1],d=kn(s,[o,i],c),h=d[0],g=d[1];return Fe(Fe({},t),{rect:{left:u+m,right:h+m,top:l+b,bottom:g+b,center:(u+h)/2+m,middle:(l+g)/2+b}})}))}(t,u.map((function(t){return o[t]}))).map((function(t,e){c[u[e]]=t})),e.elementRects=c;var p=Yn(t.props.elementSnapDirections),d=[];return c.forEach((function(t){var e=t.element,r=t.top,n=void 0===r?p.top:r,i=t.left,o=void 0===i?p.left:i,a=t.right,s=void 0===a?p.right:a,u=t.bottom,c=void 0===u?p.bottom:u,l=t.center,f=void 0===l?p.center:l,h=t.middle,g=void 0===h?p.middle:h,v=t.className,y=t.rect,m=Xn({top:n,right:s,left:o,bottom:c,center:f,middle:g},y),b=m.horizontal,_=m.vertical,S=y.top,w=y.left,x=y.right-w,E=y.bottom-S,O=[x,E];_.forEach((function(r){d.push({type:"vertical",element:e,pos:[at(r,.1),S],size:E,sizes:O,className:v,elementRect:t})})),b.forEach((function(r){d.push({type:"horizontal",element:e,pos:[w,at(r,.1)],size:x,sizes:O,className:v,elementRect:t})}))})),d}(t),A=__spreadArray([],I,!0);return d&&A.push.apply(A,function(t,e,r){var n=t.props,i=n.maxSnapElementGuidelineDistance,o=void 0===i?1/0:i,a=n.maxSnapElementGapDistance,s=void 0===a?1/0:a,u=t.state.elementRects,c=[];return[["vertical",Hn,Wn],["horizontal",Wn,Hn]].forEach((function(t){var n=t[0],i=t[1],a=t[2],l=e[i.start],f=e[i.end],p=e[i.center],d=e[a.start],h=e[a.end];function g(t){var e=t.rect;return e[i.end]<l+r?l-e[i.end]:f-r<e[i.start]?e[i.start]-f:-1}var v=u.filter((function(t){var e=t.rect;return!(e[a.start]>h||e[a.end]<d)&&g(t)>0})).sort((function(t,e){return g(t)-g(e)})),y=[];v.forEach((function(t){v.forEach((function(e){if(t!==e){var r=t.rect,n=e.rect,i=r[a.start],o=r[a.end],s=n[a.start];i>n[a.end]||s>o||y.push([t,e])}}))})),y.forEach((function(t){var a=t[0],u=t[1],d=a.rect,h=u.rect,g=d[i.start],v=d[i.end],y=h[i.start],m=h[i.end],b=0,_=0,S=!1,w=!1,x=!1;if(v<=l&&f<=y){if(w=!0,_=v+(b=(y-v-(f-l))/2)+(f-l)/2,Math.abs(_-p)>r)return}else if(v<y&&m<l+r){if(S=!0,_=m+(b=y-v),Math.abs(_-l)>r)return}else{if(!(v<y&&f-r<g))return;if(x=!0,_=g-(b=y-v),Math.abs(_-f)>r)return}b&&Ti(e,h,n,o)&&(b>s||c.push({type:n,pos:"vertical"===n?[_,0]:[0,_],element:u.element,size:0,className:u.className,isStart:S,isCenter:w,isEnd:x,gap:b,hide:!0,gapRects:[a,u]}))}))})),c}(t,D,y)),A.push.apply(A,function(t,e,r,n,i,o){void 0===i&&(i=0);void 0===o&&(o=0);var a=[];if(e)for(var s=0;s<=n;s+=e)a.push({type:"horizontal",pos:[0,at(s-o,.1)],size:r,hide:!0});if(t)for(s=0;s<=r;s+=t)a.push({type:"vertical",pos:[at(s-i,.1),0],size:n,hide:!0});return a}(b,S,i?a:u,i?o:s,c,l)),A.push.apply(A,Ri(g||!1,h||!1,i?a:u,i?o:s,c,l,r)),A=A.filter((function(t){var e=t.element,r=t.elementRect,n=t.type;if(!e||!r)return!0;var i=r.rect;return Ti(D,i,n,x)})),A}function Ti(t,e,r,n){return"horizontal"===r?Math.abs(t.right-e.left)<=n||Math.abs(t.left-e.right)<=n||t.left<=e.right&&e.left<=t.right:"vertical"!==r||(Math.abs(t.bottom-e.top)<=n||Math.abs(t.top-e.bottom)<=n||t.top<=e.bottom&&e.top<=t.bottom)}function Ri(t,e,r,n,i,o,a){void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a={left:0,top:0,right:0,bottom:0});var s=[],u=a.left,c=a.top,l=a.bottom,f=r+a.right-u,p=n+l-c;return t&&t.forEach((function(t){var e=P(t)?t:{pos:t};s.push({type:"horizontal",pos:[u,at(e.pos-o+c,.1)],size:f,className:e.className})})),e&&e.forEach((function(t){var e=P(t)?t:{pos:t};s.push({type:"vertical",pos:[at(e.pos-i+u,.1),c],size:p,className:e.className})})),s}function Bi(t){var e=t.state;if(!e.guidelines||!e.guidelines.length){var r=t.state.container,n=t.props.snapContainer||r,i=e.containerClientRect,o={left:0,top:0,bottom:0,right:0};if(r!==n){var a=Bn(n,!0);if(a){var s=fn(a),u=zn(e,[s.left-i.left,s.top-i.top]),c=zn(e,[s.right-i.right,s.bottom-i.bottom]);o.left=at(u[0],1e-5),o.top=at(u[1],1e-5),o.right=at(c[0],1e-5),o.bottom=at(c[1],1e-5)}}e.snapOffset=o,e.guidelines=Ai(t),e.enableSnap=!0}}function Pi(t,e,r,n,i,o){var a=Qr(t,e,r,o?4:3);return dn(a,wt(i,wr(a,n)))}function zi(t,e,r,n,i,o){var a=function(t,e,r){var n=[];if(r)1!==Math.abs(e[0])||1!==Math.abs(e[1])?n.push([e,[-1,-1]],[e,[-1,1]],[e,[1,-1]],[e,[1,1]]):n.push([e,[t[0],-t[1]]],[e,[-t[0],t[1]]]),n.push([e,t]);else if(t[0]&&t[1]||!t[0]&&!t[1]){var i=t[0]?t:[1,1];[1,-1].forEach((function(t){[1,-1].forEach((function(r){var o=[t*i[0],r*i[1]];e[0]===o[0]&&e[1]===o[1]||n.push([e,o])}))}))}else t[0]?(1===Math.abs(e[0])?[1]:[1,-1]).forEach((function(r){n.push([[e[0],-1],[r*t[0],-1]],[[e[0],0],[r*t[0],0]],[[e[0],1],[r*t[0],1]])})):t[1]&&(1===Math.abs(e[1])?[1]:[1,-1]).forEach((function(r){n.push([[-1,e[1]],[-1,r*t[1]]],[[0,e[1]],[0,r*t[1]]],[[1,e[1]],[1,r*t[1]]])}));return n}(r,o.fixedDirection,n),s=fi(t,e,r,n),u=__spreadArray(__spreadArray([],Di(t,e,a,n,i,o),!0),ci(t,s,o),!0),c=ni(u,0),l=ni(u,1);return{width:{isBound:c.isBound,offset:c.offset[0]},height:{isBound:l.isBound,offset:l.offset[1]}}}function Li(t,e,r,n,i,o,a,s){for(var u=hn(t.state),c=t.props.keepRatio,l=0,f=0,p=0;p<2;++p){var d=zi(t,e(l,f),i,c,a,s),h=d.width,g=d.height,v=h.isBound,y=g.isBound,m=h.offset,b=g.offset;if(1===p&&(v||(m=0),y||(b=0)),0===p&&a&&!v&&!y)return[0,0];if(c){var _=Math.abs(m)*(r?1/r:1),S=Math.abs(b)*(n?1/n:1);(v&&y?_<S:y||!v&&_<S)?m=r*b/n:b=n*m/r}l+=m,f+=b}if(i[0]&&i[1]){var w=function(t,e,r,n,i){var o=[-r[0],-r[1]],a=t.state,s=a.width,u=a.height,c=t.props.bounds,l=1/0,f=1/0;if(c){var p=[[r[0],-r[1]],[-r[0],r[1]]],d=c.left,h=void 0===d?-1/0:d,g=c.top,v=void 0===g?-1/0:g,y=c.right,m=void 0===y?1/0:y,b=c.bottom,_=void 0===b?1/0:b;p.forEach((function(t){var r=t[0]!==o[0],a=t[1]!==o[1],c=wr(e,t),p=360*nt(n,c)/Math.PI;if(a){var d=c.slice();(Math.abs(p-360)<2||Math.abs(p-180)<2)&&(d[1]=n[1]);var g=Ei(n,d,(n[1]<c[1]?_:v)-c[1],!1,i),y=g.offset[1],b=g.isOutside;isNaN(y)||(f=u+(b?1:-1)*Math.abs(y))}if(r){d=c.slice(),(Math.abs(p-90)<2||Math.abs(p-270)<2)&&(d[0]=n[0]);var S=Ei(n,d,(n[0]<c[0]?m:h)-c[0],!0,i),w=S.offset[0],x=S.isOutside;isNaN(w)||(l=s+(x?1:-1)*Math.abs(w))}}))}return{maxWidth:l,maxHeight:f}}(t,u,i,o,s),x=w.maxWidth,E=w.maxHeight,O=function(t,e,r,n,i,o,a,s,u){var c=wr(e,a),l=ki(t,s,{vertical:[c[0]],horizontal:[c[1]]}),f=l.horizontal.offset,p=l.vertical.offset;if(p||f){var d=_r({datas:u,distX:-p,distY:-f}),h=d[0],g=d[1];return[Math.min(i||1/0,r+a[0]*h)-r,Math.min(o||1/0,n+a[1]*g)-n]}return[0,0]}(t,e(l,f).map((function(t){return t.map((function(t){return at(t,tr)}))})),r+l,n+f,x,E,i,a,s);l+=m=O[0],f+=b=O[1]}return[l,f]}function ji(t,e,r,n,i){if(!Vn(t,"scalable"))return[0,0];var o=i.startOffsetWidth,a=i.startOffsetHeight,s=i.fixedPosition,u=i.fixedDirection,c=i.is3d,l=Li(t,(function(t,r){return Pi(function(t,e){var r=t.transformOrigin,n=t.offsetMatrix,i=t.is3d?4:3;return xr(n,_t(t.targetMatrix,Bt(e,i),i),r,i)}(i,St(e,[t/o,r/a])),o,a,u,s,c)}),o,a,r,s,n,i);return[l[0]/o,l[1]/a]}function Ni(t){var e=[];return t.forEach((function(t){t.guidelineInfos.forEach((function(t){var r=t.guideline;e.indexOf(r)>-1||e.push(r)}))})),e}function Ki(t,e,r,n,i,o){var a=hi(gi(t,o),e,r),s=a.vertical,u=a.horizontal;s.forEach((function(t){t.isBound&&n.push({type:"bounds",pos:t.pos})})),u.forEach((function(t){t.isBound&&i.push({type:"bounds",pos:t.pos})}));var c=function(t){var e=t.props.innerBounds;if(!e)return{vertical:[],horizontal:[]};var r=t.getRect(),n=[r.pos1,r.pos2,r.pos3,r.pos4],i=wr(n,[0,0]),o=e.left,a=e.top,s=e.width,u=e.height,c=[[o,a],[o,a+u]],l=[[o,a],[o+s,a]],f=[[o+s,a],[o+s,a+u]],p=[[o,a+u],[o+s,a+u]],d=fi(t,n,[0,0],!1),h=[],g=[],v={top:!1,bottom:!1,left:!1,right:!1};return d.forEach((function(t){var e=t.line,r=t.lineConstants,n=ii(i,e),d=n.horizontal,y=n.vertical,m=ui(e,r,l,y,1,!0),b=ui(e,r,p,y,1,!0),_=ui(e,r,c,d,1,!0),S=ui(e,r,f,d,1,!0);m.isBound&&!v.top&&(h.push(a),v.top=!0),b.isBound&&!v.bottom&&(h.push(a+u),v.bottom=!0),_.isBound&&!v.left&&(g.push(o),v.left=!0),S.isBound&&!v.right&&(g.push(o+s),v.right=!0)})),{horizontal:h,vertical:g}}(t),l=c.vertical,f=c.horizontal;l.forEach((function(t){Y(n,(function(e){var r=e.type,n=e.pos;return"bounds"===r&&n===t}))>=0||n.push({type:"bounds",pos:t})})),f.forEach((function(t){Y(i,(function(e){var r=e.type,n=e.pos;return"bounds"===r&&n===t}))>=0||i.push({type:"bounds",pos:t})}))}var qi=Tn("",["resizable","scalable"]),Fi={name:"snappable",dragRelation:"strong",props:{snappable:[Boolean,Array],snapContainer:Object,snapDirections:[Boolean,Object],elementSnapDirections:[Boolean,Object],snapGap:Boolean,snapGridWidth:Number,snapGridHeight:Number,isDisplaySnapDigit:Boolean,isDisplayInnerSnapDigit:Boolean,snapDigit:Number,snapThreshold:Number,horizontalGuidelines:Array,verticalGuidelines:Array,elementGuidelines:Array,bounds:Object,innerBounds:Object,snapDistFormat:Function,maxSnapElementGuidelineDistance:Number,maxSnapElementGapDistance:Number},events:{onSnap:"snap"},css:[":host {\n    --bounds-color: #d66;\n}\n.guideline {\n    pointer-events: none;\n    z-index: 2;\n}\n.guideline.bounds {\n    background: #d66;\n    background: var(--bounds-color);\n}\n.guideline-group {\n    position: absolute;\n    top: 0;\n    left: 0;\n}\n.guideline-group .size-value {\n    position: absolute;\n    color: #f55;\n    font-size: 12px;\n    font-weight: bold;\n}\n.guideline-group.horizontal .size-value {\n    transform-origin: 50% 100%;\n    transform: translateX(-50%);\n    left: 50%;\n    bottom: 5px;\n}\n.guideline-group.vertical .size-value {\n    transform-origin: 0% 50%;\n    top: 50%;\n    transform: translateY(-50%);\n    left: 5px;\n}\n.guideline.gap {\n    background: #f55;\n}\n.size-value.gap {\n    color: #f55;\n}\n"],render:function(t,e){var r=t.state,n=r.top,i=r.left,o=r.pos1,a=r.pos2,s=r.pos3,u=r.pos4,c=r.snapRenderInfo;if(!c||!Vn(t,""))return[];r.guidelines=Ai(t);var l=Math.min(o[0],a[0],s[0],u[0]),f=Math.min(o[1],a[1],s[1],u[1]),p=c.externalPoses||[],d=hn(t.state),h=[],g=[],v=[],y=[],m=[],b=tn(d),_=b.width,S=b.height,w=b.top,x=b.left,E=b.bottom,O=b.right,C={left:x,right:O,top:w,bottom:E,center:(x+O)/2,middle:(w+E)/2},k=p.length>0,M=k?tn(p):{};if(!c.request){if(c.direction&&m.push(ei(t,d,c.direction)),c.snap){var D=tn(d);c.center&&(D.middle=(D.top+D.bottom)/2,D.center=(D.left+D.right)/2),m.push(Zn(t,D,1))}k&&(c.center&&(M.middle=(M.top+M.bottom)/2,M.center=(M.left+M.right)/2),m.push(Zn(t,M,1))),m.forEach((function(t){var e=t.vertical.posInfos,r=t.horizontal.posInfos;h.push.apply(h,e.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),g.push.apply(g,r.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),v.push.apply(v,Ni(e)),y.push.apply(y,Ni(r))}))}Ki(t,[x,O],[w,E],h,g),k&&Ki(t,[M.left,M.right],[M.top,M.bottom],h,g,c.externalBounds);var I=__spreadArray(__spreadArray([],v,!0),y,!0),A=I.filter((function(t){return t.element&&!t.gapRects})),T=I.filter((function(t){return t.gapRects})).sort((function(t,e){return t.gap-e.gap}));return Sn(t,"onSnap",{guidelines:I.filter((function(t){return!t.element})),elements:A,gaps:T},!0),__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],xi(t,A,[l,f],C,e),!0),function(t,e,r,n,i){var o=[];return["horizontal","vertical"].forEach((function(a){var s=e.filter((function(t){return t.type===a})).slice(0,1),u="vertical"===a?0:1,c=u?0:1,l=u?Wn:Hn,f=u?Hn:Wn,p=n[l.start],d=n[l.end],h=n[f.start],g=n[f.end];s.forEach((function(e){var n=e.gap,a=e.gapRects,s=Math.max.apply(Math,__spreadArray([h],a.map((function(t){return t.rect[f.start]})),!1)),v=Math.min.apply(Math,__spreadArray([g],a.map((function(t){return t.rect[f.end]})),!1)),y=(s+v)/2;s!==v&&y!==(h+g)/2&&a.forEach((function(e){var a=e.rect,s=e.className,f=[r[0],r[1]];if(a[l.end]<p)f[u]+=a[l.end]-p;else{if(!(d<a[l.start]))return;f[u]+=a[l.start]-p-n}f[c]+=y-h,o.push(wi(t,u?"vertical":"horizontal","gap",o.length,n,f,s,i))}))}))})),o}(t,T,[l,f],C,e),!0),Si(t,"horizontal",y,[i,n],C,e),!0),Si(t,"vertical",v,[i,n],C,e),!0),_i(t,"horizontal",g,l,n,_,0,e),!0),_i(t,"vertical",h,f,i,S,1,e),!0)},dragStart:function(t,e){t.state.snapRenderInfo={request:e.isRequest,snap:!0,center:!0},Bi(t)},drag:function(t){t.state.guidelines=Ai(t)},pinchStart:function(t){this.unset(t)},dragEnd:function(t){this.unset(t)},dragControlCondition:function(t,e){return!(!qi(t,e)&&!ro(t,e))||(!e.isRequest&&e.inputEvent?ut(e.inputEvent.target,Lr("snap-control")):void 0)},dragControlStart:function(t){t.state.snapRenderInfo=null,Bi(t)},dragControl:function(t){this.drag(t)},dragControlEnd:function(t){this.unset(t)},dragGroupStart:function(t,e){this.dragStart(t,e)},dragGroup:function(t){this.drag(t)},dragGroupEnd:function(t){this.unset(t)},dragGroupControlStart:function(t){t.state.snapRenderInfo=null,Bi(t)},dragGroupControl:function(t){this.drag(t)},dragGroupControlEnd:function(t){this.unset(t)},unset:function(t){var e=t.state;e.enableSnap=!1,e.guidelines=[],e.snapRenderInfo=null,e.elementRects=[]}};function Ui(t,e,r,n){var i=t.getState(),o=i.renderPoses,a=i.rotation,s=i.direction,u=un(t.props,e).zoom,c=s>0?1:-1,l=a/Math.PI*180,f={},p=t.renderState;p.renderDirectionMap||(p.renderDirectionMap={});var d=p.renderDirectionMap;return r.forEach((function(t){var e=t.dir;f[e]=!0})),r.map((function(t){var r=t.data,i=t.classNames,s=t.dir,p=ur[s];if(!p||!f[s])return null;d[s]=!0;var h=(at(l,15)+c*cr[s]+720)%180,g={};return Z(r).forEach((function(t){g["data-".concat(t)]=r[t]})),n.createElement("div",Fe({className:Lr.apply(void 0,__spreadArray(["control","direction",s,e],i,!1)),"data-rotation":h,"data-direction":s},g,{key:"direction-".concat(s),style:sn.apply(void 0,__spreadArray([a,u],p.map((function(t){return o[t]})),!1))}))}))}function Gi(t,e,r,n){var i=un(t.props,r).renderDirections,o=void 0===i?e:i;return o?Ui(t,r,(!0===o?ar:o).map((function(t){return{data:{},classNames:[],dir:t}})),n):[]}function Hi(t,e,r,n,i,o){for(var a=[],s=6;s<arguments.length;s++)a[s-6]=arguments[s];var u=nt(r,n),c=e?at(u/Math.PI*180,15)%180:-1;return t.createElement("div",{key:"line-".concat(o),className:Lr.apply(void 0,__spreadArray(["line","direction",e?"edge":"",e],a,!1)),"data-rotation":c,"data-line-key":o,"data-direction":e,style:an(r,n,i,u)})}function Wi(t,e,r,n,i){return(!0===r?or:r).map((function(r,o){var a=ur[r],s=a[0],u=a[1];if(null!=u)return Hi(t,r,n[s],n[u],i,"".concat(e,"Edge").concat(o),e)})).filter(Boolean)}function Vi(t){return function(e,r){var n=un(e.props,t).edge;return n&&(!0===n||n.length)?__spreadArray(__spreadArray([],Wi(r,t,n,e.getState().renderPoses,e.props.zoom),!0),function(t,e,r){return Gi(t,["nw","ne","sw","se"],e,r)}(e,t,r),!0):Yi(e,t,r)}}function Yi(t,e,r){return Gi(t,ar,e,r)}var Xi={name:"draggable",props:{draggable:Boolean,throttleDrag:Number,throttleDragRotate:Number,startDragRotate:Number,edgeDraggable:Boolean},events:{onDragStart:"dragStart",onDrag:"drag",onDragEnd:"dragEnd",onDragGroupStart:"dragGroupStart",onDragGroup:"dragGroup",onDragGroupEnd:"dragGroupEnd"},render:function(t,e){var r=t.props,n=r.throttleDragRotate,i=r.zoom,o=t.getState(),a=o.dragInfo,s=o.beforeOrigin;if(!n||!a)return[];var u=a.dist;if(!u[0]&&!u[1])return[];var c=nn(u),l=nt(u,[0,0]);return[e.createElement("div",{className:Lr("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(c,"px"),transform:"translate(".concat(s[0],"px, ").concat(s[1],"px) rotate(").concat(l,"rad) scaleY(").concat(i,")")}})]},dragStart:function(t,e){var r=e.datas,n=e.parentEvent,i=e.parentGesto,o=t.state,a=o.target,s=o.gestos;if(s.draggable)return!1;s.draggable=i||t.targetGesto;var u=wn(a);r.datas={},r.left=parseFloat(u.left||"")||0,r.top=parseFloat(u.top||"")||0,r.bottom=parseFloat(u.bottom||"")||0,r.right=parseFloat(u.right||"")||0,r.startValue=[0,0],hr(t,e),Or(e,"translate"),function(t,e){e.absolutePoses=hn(t.state)}(t,r),r.prevDist=[0,0],r.prevBeforeDist=[0,0],r.isDrag=!1,r.deltaOffset=[0,0];var c=mn(t,e,Fe({set:function(t){r.startValue=t}},Er(e)));return!1!==(n||Sn(t,"onDragStart",c))?(r.isDrag=!0,t.state.dragInfo={startRect:t.getRect(),dist:[0,0]}):(s.draggable=null,r.isPinch=!1),!!r.isDrag&&c},drag:function(t,e){if(e){gr(e,"translate");var r=e.datas,n=e.parentEvent,i=e.parentFlag,o=e.isPinch,a=e.isRequest,s=e.deltaOffset,u=e.distX,c=e.distY,l=r.isDrag,f=r.prevDist,p=r.prevBeforeDist,d=r.startValue;if(l){s&&(u+=s[0],c+=s[1]);var h=t.props,g=h.parentMoveable,v=n?0:h.throttleDrag||0,y=n?0:h.throttleDragRotate||0,m=!1,b=0;if(!n&&y>0&&(u||c)){var _=h.startDragRotate||0,S=at(_+180*nt([0,0],[u,c])/Math.PI,y)-_,w=c*Math.abs(Math.cos((S-90)/180*Math.PI)),x=nn([u*Math.abs(Math.cos(S/180*Math.PI)),w]);b=S*Math.PI/180,u=x*Math.cos(b),c=x*Math.sin(b)}if(!o&&!n&&!i&&(!y||u||c)){var E=Ci(t,u,c,y,a||s,r),O=E[0],C=E[1],k=O.isSnap,M=O.isBound,D=O.offset,I=C.isSnap,A=C.isBound;m=k||I||M||A,u+=D,c+=C.offset}var T=St(br({datas:r,distX:u,distY:c}),d),R=St(yr({datas:r,distX:u,distY:c}),d);y||m||(st(R,v),st(T,v)),st(R,er),st(T,er);var B=wt(T,d),P=wt(R,d),z=wt(P,f),L=wt(B,p);r.prevDist=P,r.prevBeforeDist=B,r.passDelta=z,r.passDist=P;var j=r.left+B[0],N=r.top+B[1],K=r.right-B[0],q=r.bottom-B[1],F=vr(r,"translate(".concat(R[0],"px, ").concat(R[1],"px)"),"translate(".concat(P[0],"px, ").concat(P[1],"px)"));if(kr(e,F),t.state.dragInfo.dist=n?[0,0]:P,n||g||!z.every((function(t){return!t}))||!L.some((function(t){return!t}))){var U=t.state,G=U.width,H=U.height,W=mn(t,e,Fe({transform:F,dist:P,delta:z,translate:R,beforeDist:B,beforeDelta:L,beforeTranslate:T,left:j,top:N,right:K,bottom:q,width:G,height:H,isPinch:o},vn({transform:F},e)));return!n&&Sn(t,"onDrag",W),W}}}},dragAfter:function(t,e){var r=e.datas,n=r.deltaOffset;return!(!n[0]&&!n[1])&&(r.deltaOffset=[0,0],this.drag(t,Fe(Fe({},e),{deltaOffset:n})))},dragEnd:function(t,e){var r=e.parentEvent,n=e.datas;if(t.state.dragInfo=null,n.isDrag){n.isDrag=!1;var i=bn(t,e,{});return!r&&Sn(t,"onDragEnd",i),i}},dragGroupStart:function(t,e){var r=e.datas,n=e.clientX,i=e.clientY,o=this.dragStart(t,e);if(!o)return!1;var a=qn(t,this,"dragStart",[n||0,i||0],e,!1,"draggable"),s=Sn(t,"onDragGroupStart",Fe(Fe({},o),{targets:t.props.targets,events:a}));return r.isDrag=!1!==s,!!r.isDrag&&o},dragGroup:function(t,e){if(e.datas.isDrag){var r=this.drag(t,e),n=qn(t,this,"drag",e.datas.passDelta,e,!1,"draggable");if(r){var i=Fe({targets:t.props.targets,events:n},r);return Sn(t,"onDragGroup",i),i}}},dragGroupEnd:function(t,e){var r=e.isDrag;if(e.datas.isDrag){this.dragEnd(t,e);var n=qn(t,this,"dragEnd",[0,0],e,!1,"draggable");return Sn(t,"onDragGroupEnd",bn(t,e,{targets:t.props.targets,events:n})),r}},request:function(t){var e={},r=t.getRect(),n=0,i=0;return{isControl:!1,requestStart:function(){return{datas:e}},request:function(t){return"x"in t?n=t.x-r.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?i=t.y-r.top:"deltaY"in t&&(i+=t.deltaY),{datas:e,distX:n,distY:i}},requestEnd:function(){return{datas:e,isDrag:!0}}}},unset:function(t){t.state.gestos.draggable=null,t.state.dragInfo=null}},$i=Tn("resizable"),Ji={name:"resizable",ableGroup:"size",canPinch:!0,props:{resizable:Boolean,throttleResize:Number,renderDirections:Array,keepRatio:Boolean,resizeFormat:Function,keepRatioFinally:Boolean,edge:Boolean},events:{onResizeStart:"resizeStart",onBeforeResize:"beforeResize",onResize:"resize",onResizeEnd:"resizeEnd",onResizeGroupStart:"resizeGroupStart",onBeforeResizeGroup:"beforeResizeGroup",onResizeGroup:"resizeGroup",onResizeGroupEnd:"resizeGroupEnd"},render:Vi("resizable"),dragControlCondition:$i,dragControlStart:function(t,e){var r,n=e.inputEvent,i=e.isPinch,o=e.isGroup,a=e.parentDirection,s=e.parentGesto,u=e.datas,c=e.parentFixedDirection,l=e.parentEvent,f=a||(i?[0,0]:pn(n.target)),p=t.state,d=p.target,h=p.width,g=p.height,v=p.gestos;if(!f||!d)return!1;if(v.resizable)return!1;v.resizable=s||t.controlGesto,!i&&hr(t,e),u.datas={},u.direction=f,u.startOffsetWidth=h,u.startOffsetHeight=g,u.prevWidth=0,u.prevHeight=0,u.minSize=[0,0],u.startWidth=p.cssWidth,u.startHeight=p.cssHeight,u.maxSize=[1/0,1/0],o||(u.minSize=[p.minOffsetWidth,p.minOffsetHeight],u.maxSize=[p.maxOffsetWidth,p.maxOffsetHeight]);var y=t.props.transformOrigin||"% %";function m(t){u.ratio=t&&isFinite(t)?t:0}function b(t){u.fixedDirection=t,u.fixedPosition=wr(u.startPositions,t)}function _(t){u.minSize=[Q("".concat(t[0]),0)||0,Q("".concat(t[1]),0)||0]}function S(t){var e=[t[0]||1/0,t[1]||1/0];j(e[0])&&!isFinite(e[0])||(e[0]=Q("".concat(e[0]),0)||1/0),j(e[1])&&!isFinite(e[1])||(e[1]=Q("".concat(e[1]),0)||1/0),u.maxSize=e}u.transformOrigin=y&&L(y)?y.split(" "):y,u.startOffsetMatrix=p.offsetMatrix,u.startTransformOrigin=p.transformOrigin,u.isWidth=null!==(r=null==e?void 0:e.parentIsWidth)&&void 0!==r?r:!f[0]&&!f[1]||f[0]||!f[1],u.startPositions=hn(t.state),m(h/g),b(c||[-f[0],-f[1]]),u.setFixedDirection=b,u.setMin=_,u.setMax=S;var w=mn(t,e,{direction:f,startRatio:u.ratio,set:function(t){var e=t[0],r=t[1];u.startWidth=e,u.startHeight=r},setMin:_,setMax:S,setRatio:m,setFixedDirection:b,setOrigin:function(t){u.transformOrigin=t},dragStart:Xi.dragStart(t,(new pr).dragStart([0,0],e))}),x=l||Sn(t,"onResizeStart",w);return u.startFixedDirection=u.fixedDirection,!1!==x&&(u.isResize=!0,t.state.snapRenderInfo={request:e.isRequest,direction:f}),!!u.isResize&&w},dragControl:function(t,e){var r,n=e.datas,i=e.parentFlag,o=e.isPinch,a=e.parentKeepRatio,s=e.dragClient,u=e.parentDist,c=e.isRequest,l=e.isGroup,f=e.parentEvent,p=e.resolveMatrix,d=n.isResize,h=n.transformOrigin,g=n.startWidth,v=n.startHeight,y=n.prevWidth,m=n.prevHeight,b=n.minSize,_=n.maxSize,S=n.ratio,w=n.startOffsetWidth,x=n.startOffsetHeight,E=n.isWidth;if(d){if(p){var O=t.state.is3d,C=n.startOffsetMatrix,k=n.startTransformOrigin,M=O?4:3,D=Lt(Dr(e)),I=Math.sqrt(D.length);M!==I&&(D=mt(D,I,M));var A=xr(C,D,k,M),T=Qr(A,w,x,M);n.startPositions=T,n.nextTargetMatrix=D,n.nextAllMatrix=A}var R=un(t.props,"resizable"),B=R.resizeFormat,P=R.throttleResize,z=void 0===P?i?0:1:P,L=R.parentMoveable,j=R.keepRatioFinally,N=n.direction,K=N,q=0,F=0;N[0]||N[1]||(K=[1,1]);var U=S&&(null!=a?a:R.keepRatio)||!1,G=ot(),H=G[0],W=G[1];f||(n.setFixedDirection(n.fixedDirection),Sn(t,"onBeforeResize",mn(t,e,{startFixedDirection:n.startFixedDirection,setFixedDirection:function(t){var e;return n.setFixedDirection(t),e=ot(),H=e[0],W=e[1],[H,W]},boundingWidth:H,boundingHeight:W,setSize:function(t){H=t[0],W=t[1]}},!0)));var V=s;s||(V=!i&&o?zr(t,[0,0]):n.fixedPosition);var Y=[0,0];if(o||(Y=function(t,e,r,n,i,o,a){if(!Vn(t,"resizable"))return[0,0];var s=a.fixedDirection,u=a.nextAllMatrix,c=t.state,l=c.allMatrix,f=c.is3d;return Li(t,(function(t,n){return Pi(u||l,e+t,r+n,s,i,f)}),e,r,n,i,o,a)}(t,H,W,N,V,c,n)),u&&(!u[0]&&(Y[0]=0),!u[1]&&(Y[1]=0)),U){K[0]&&K[1]&&Y[0]&&Y[1]&&(Math.abs(Y[0])>Math.abs(Y[1])?Y[1]=0:Y[0]=0);var X=!Y[0]&&!Y[1];X&&st(),K[0]&&!K[1]||Y[0]&&!Y[1]||X&&E?(H+=Y[0],W=H/S):(!K[0]&&K[1]||!Y[0]&&Y[1]||X&&!E)&&(W+=Y[1],H=W*S)}else H+=Y[0],W+=Y[1],H=Math.max(0,H),W=Math.max(0,W);r=function(t,e,r,n){if(!n)return t.map((function(t,n){return tt(t,e[n],r[n])}));var i=t[0],o=t[1],a=!0===n?i/o:n,s=et(t,e,!1,a),u=s[0],c=s[1],l=et(t,r,!0,a),f=l[0],p=l[1];return i<u||o<c?(i=u,o=c):(i>f||o>p)&&(i=f,o=p),[i,o]}([H,W],b,_,!!U&&S),H=r[0],W=r[1],st(),U&&(l||j)&&(E?W=H/S:H=W*S);var $=[(q=H-w)-y,(F=W-x)-m];n.prevWidth=q,n.prevHeight=F;var J=Pr(t,H,W,V,h,n);if(L||!$.every((function(t){return!t}))||!J.every((function(t){return!t}))){var Z=Xi.drag(t,fr(e,t.state,J,!!o,!1,"draggable")),Q=Z.transform,rt=g+q,nt=v+F,it=mn(t,e,Fe({width:rt,height:nt,offsetWidth:Math.round(H),offsetHeight:Math.round(W),startRatio:S,boundingWidth:H,boundingHeight:W,direction:N,dist:[q,F],delta:$,isPinch:!!o,drag:Z},yn({style:{width:"".concat(rt,"px"),height:"".concat(nt,"px")},transform:Q},Z,e)));return!f&&Sn(t,"onResize",it),it}}function ot(){var t=n.fixedDirection,r=jn(K,U,n,e);q=r.distWidth,F=r.distHeight;var i=K[0]-t[0]||U?Math.max(w+q,er):w,o=K[1]-t[1]||U?Math.max(x+F,er):x;return U&&w&&x&&(E?o=i/S:i=o*S),[i,o]}function st(){var t;B&&(t=B([H,W]),H=t[0],W=t[1]),H=at(H,z),W=at(W,z)}},dragControlAfter:function(t,e){var r=e.datas,n=r.isResize,i=r.startOffsetWidth,o=r.startOffsetHeight,a=r.prevWidth,s=r.prevHeight;if(n){var u=t.state,c=u.width-(i+a),l=u.height-(o+s),f=Math.abs(c)>3,p=Math.abs(l)>3;return f&&(r.startWidth+=c,r.startOffsetWidth+=c,r.prevWidth+=c),p&&(r.startHeight+=l,r.startOffsetHeight+=l,r.prevHeight+=l),f||p?this.dragControl(t,e):void 0}},dragControlEnd:function(t,e){var r=e.datas,n=e.parentEvent;if(r.isResize){r.isResize=!1;var i=bn(t,e,{});return!n&&Sn(t,"onResizeEnd",i),i}},dragGroupControlCondition:$i,dragGroupControlStart:function(t,e){var r=e.datas,n=this.dragControlStart(t,Fe(Fe({},e),{isGroup:!0}));if(!n)return!1;var i=Kn(t,"resizable",e);function o(e,n){var i=r.fixedDirection,o=r.fixedPosition,a=wr(n.datas.startPositions||hn(e.state),i),s=Et(Tt(-t.rotation/180*Math.PI,3),[a[0]-o[0],a[1]-o[1],1],3),u=s[0],c=s[1];return n.datas.originalX=u,n.datas.originalY=c,n}var a=r.startOffsetWidth,s=r.startOffsetHeight;function u(){var t=r.minSize;i.forEach((function(e){var r=e.datas,n=r.minSize,i=r.startOffsetWidth,o=r.startOffsetHeight,u=a*(i?n[0]/i:0),c=s*(o?n[1]/o:0);t[0]=Math.max(t[0],u),t[1]=Math.max(t[1],c)}))}function c(){var t=r.maxSize;i.forEach((function(e){var r=e.datas,n=r.maxSize,i=r.startOffsetWidth,o=r.startOffsetHeight,u=a*(i?n[0]/i:0),c=s*(o?n[1]/o:0);t[0]=Math.min(t[0],u),t[1]=Math.min(t[1],c)}))}var l=Fn(t,this,"dragControlStart",e,(function(t,e){return o(t,e)}));u(),c();var f=function(t){n.setFixedDirection(t),l.forEach((function(e,r){e.setFixedDirection(t),o(e.moveable,i[r])}))};r.setFixedDirection=f;var p=Fe(Fe({},n),{targets:t.props.targets,events:l.map((function(t){return Fe(Fe({},t),{setMin:function(e){t.setMin(e),u()},setMax:function(e){t.setMax(e),c()}})})),setFixedDirection:f,setMin:function(t){n.setMin(t),u()},setMax:function(t){n.setMax(t),c()}}),d=Sn(t,"onResizeGroupStart",p);return r.isResize=!1!==d,!!r.isResize&&n},dragGroupControl:function(t,e){var r=e.datas;if(r.isResize){var n=un(t.props,"resizable");_n(t,"onBeforeResize",(function(r){Sn(t,"onBeforeResizeGroup",mn(t,e,Fe(Fe({},r),{targets:n.targets}),!0))}));var i=this.dragControl(t,Fe(Fe({},e),{isGroup:!0}));if(i){var o=i.boundingWidth,a=i.boundingHeight,s=i.dist,u=n.keepRatio,c=[o/(o-s[0]),a/(a-s[1])],l=r.fixedPosition,f=Fn(t,this,"dragControl",e,(function(e,r){var n=Et(Tt(t.rotation/180*Math.PI,3),[r.datas.originalX*c[0],r.datas.originalY*c[1],1],3),i=n[0],o=n[1];return Fe(Fe({},r),{parentDist:null,parentScale:c,dragClient:St(l,[i,o]),parentKeepRatio:u})})),p=Fe({targets:n.targets,events:f},i);return Sn(t,"onResizeGroup",p),p}}},dragGroupControlEnd:function(t,e){var r=e.isDrag;if(e.datas.isResize){this.dragControlEnd(t,e);var n=Fn(t,this,"dragControlEnd",e);return Sn(t,"onResizeGroupEnd",bn(t,e,{targets:t.props.targets,events:n})),r}},request:function(t){var e={},r=0,n=0,i=t.getRect();return{isControl:!0,requestStart:function(t){var r;return{datas:e,parentDirection:t.direction||[1,1],parentIsWidth:null===(r=null==t?void 0:t.horizontal)||void 0===r||r}},request:function(t){return"offsetWidth"in t?r=t.offsetWidth-i.offsetWidth:"deltaWidth"in t&&(r+=t.deltaWidth),"offsetHeight"in t?n=t.offsetHeight-i.offsetHeight:"deltaHeight"in t&&(n+=t.deltaHeight),{datas:e,parentDist:[r,n],parentKeepRatio:t.keepRatio}},requestEnd:function(){return{datas:e,isDrag:!0}}}},unset:function(t){t.state.gestos.resizable=null}};function Zi(t,e,r,n,i){var o=t.props.groupable,a=t.state,s=a.is3d?4:3,u=e.origin,c=Zr(t.state.rootMatrix,wt([u[0],u[1]],o?[0,0]:[a.left,a.top]),s),l=St([i.left,i.top],c);e.startAbsoluteOrigin=l,e.prevDeg=nt(l,[r,n])/Math.PI*180,e.defaultDeg=e.prevDeg,e.prevSnapDeg=0,e.loop=0,e.startDist=ot(l,[r,n])}function Qi(t,e,r){var n=r.defaultDeg,i=r.prevDeg,o=i%360,a=Math.floor(i/360);o<0&&(o+=360),o>t&&o>270&&t<90?++a:o<t&&o<90&&t>270&&--a;var s=e*(360*a+t-n);return r.prevDeg=n+s,s}function to(t,e,r,n){return Qi(nt(n.startAbsoluteOrigin,[t,e])/Math.PI*180,r,n)}function eo(t,e,r,n,i,o){var a=t.props.throttleRotate,s=void 0===a?0:a,u=r.prevSnapDeg,c=0,l=!1;if(o){var f=function(t,e,r){if(!Vn(t,"rotatable"))return{isSnap:!1,rotation:r};var n=e.pos1,i=e.pos2,o=e.pos3,a=e.pos4,s=e.origin,u=r*Math.PI/180,c=[n,i,o,a].map((function(t){return wt(t,s)})),l=c.map((function(t){return Dt(t,u)})),f=__spreadArray(__spreadArray([],mi(t,c,l,s,r),!0),di(t,c,l,s,r),!0);f.sort((function(t,e){return Math.abs(t-r)-Math.abs(e-r)}));var p=f.length>0;return{isSnap:p,rotation:p?f[0]:r}}(t,e,n);l=f.isSnap,c=i+f.rotation}l||(c=at(i+n,s));var p=c-i;return r.prevSnapDeg=p,[p-u,p,c]}function ro(t,e){if(e.isRequest)return"rotatable"===e.requestAble;var r=e.inputEvent.target;if(ut(r,Lr("rotation-control"))||ut(r,Lr("around-control"))||ut(r,Lr("control"))&&ut(r,Lr("rotatable")))return!0;var n=t.props.rotationTarget;return!!n&&Pn(n,!0).some((function(t){return!!t&&(r===t||r.contains(t))}))}var no=ar.map((function(t){var e="",r="",n="center",i="center";return t.indexOf("n")>-1&&(e="top: -20px;",i="bottom"),t.indexOf("s")>-1&&(e="top: 0px;",i="top"),t.indexOf("w")>-1&&(r="left: -20px;",n="right"),t.indexOf("e")>-1&&(r="left: 0px;",n="left"),'.around-control[data-direction*="'.concat(t,'"] {\n        ').concat(r).concat(e,"\n        transform-origin: ").concat(n," ").concat(i,";\n    }")})).join("\n"),io=".rotation {\n    position: absolute;\n    height: 40px;\n    width: 1px;\n    transform-origin: 50% 100%;\n    height: calc(40px * var(--zoom));\n    top: auto;\n    left: 0;\n    bottom: 100%;\n    will-change: transform;\n}\n.rotation .rotation-line {\n    display: block;\n    width: 100%;\n    height: 100%;\n    transform-origin: 50% 50%;\n}\n.rotation .rotation-control {\n    border-color: #4af;\n    border-color: var(--moveable-color);\n    background:#fff;\n    cursor: alias;\n}\n.rotatable.direction.control {\n    cursor: alias;\n}\n.around-control {\n    position: absolute;\n    will-change: transform;\n    width: 20px;\n    height: 20px;\n    left: -10px;\n    top: -10px;\n    box-sizing: border-box;\n    background: transparent;\n    z-index: 8;\n    cursor: alias;\n    transform-origin: center center;\n}\n.rotatable.direction.control.move {\n    cursor: move;\n}\n".concat(no,"\n"),oo={name:"rotatable",canPinch:!0,props:{rotatable:Boolean,rotationPosition:String,throttleRotate:Number,renderDirections:Object,rotationTarget:Object,rotateAroundControls:Boolean,edge:Boolean,resolveAblesWithRotatable:Object},events:{onRotateStart:"rotateStart",onBeforeRotate:"beforeRotate",onRotate:"rotate",onRotateEnd:"rotateEnd",onRotateGroupStart:"rotateGroupStart",onBeforeRotateGroup:"beforeRotateGroup",onRotateGroup:"rotateGroup",onRotateGroupEnd:"rotateGroupEnd"},css:[io],render:function(t,e){var r=un(t.props,"rotatable"),n=r.rotatable,i=r.rotationPosition,o=r.zoom,a=r.renderDirections,s=r.rotateAroundControls,u=r.resolveAblesWithRotatable,c=t.getState(),l=c.renderPoses,f=c.direction;if(!n)return null;var p=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];if("none"!==t){var s=(t||"top").split("-"),u=s[0],c=s[1],l=[n,i];"left"===u?l=[o,n]:"right"===u?l=[i,a]:"bottom"===u&&(l=[a,o]);var f=[(l[0][0]+l[1][0])/2,(l[0][1]+l[1][1])/2],p=ln(l,r);if(c){var d="top"===c||"left"===c,h="bottom"===u||"left"===u;f=l[d&&!h||!d&&h?0:1]}return[f,p]}}(i,l,f),d=[];if(p){var h=p[0],g=p[1];d.push(e.createElement("div",{key:"rotation",className:Lr("rotation"),style:{transform:"translate(-50%) translate(".concat(h[0],"px, ").concat(h[1],"px) rotate(").concat(g,"rad)")}},e.createElement("div",{className:Lr("line rotation-line"),style:{transform:"scaleX(".concat(o,")")}}),e.createElement("div",{className:Lr("control rotation-control"),style:{transform:"translate(0.5px) scale(".concat(o,")")}})))}if(a){var v=Z(u||{}),y={};v.forEach((function(t){u[t].forEach((function(e){y[e]=t}))}));var m=[];z(a)&&(m=a.map((function(t){var e=y[t];return{data:e?{resolve:e}:{},classNames:e?["move"]:[],dir:t}}))),d.push.apply(d,Ui(t,"rotatable",m,e))}return s&&d.push.apply(d,function(t,e){var r=t.renderState;r.renderDirectionMap||(r.renderDirectionMap={});var n=t.getState(),i=n.renderPoses,o=n.rotation,a=n.direction,s=r.renderDirectionMap,u=t.props.zoom,c=a>0?1:-1,l=o/Math.PI*180;return Z(s).map((function(t){var r=ur[t];if(!r)return null;var n=(at(l,15)+c*cr[t]+720)%180;return e.createElement("div",{className:Lr("around-control"),"data-rotation":n,"data-direction":t,key:"direction-around-".concat(t),style:sn.apply(void 0,__spreadArray([o,u],r.map((function(t){return i[t]})),!1))})}))}(t,e)),d},dragControlCondition:ro,dragControlStart:function(t,e){var r,n,i=e.datas,o=e.clientX,a=e.clientY,s=e.parentRotate,u=e.parentFlag,c=e.isPinch,l=e.isRequest,f=t.state,p=f.target,d=f.left,h=f.top,g=f.direction,v=f.beforeDirection,y=f.targetTransform,m=f.moveableClientRect,b=f.offsetMatrix,_=f.targetMatrix,S=f.allMatrix,w=f.width,x=f.height;if(!l&&!p)return!1;var E=t.getRect();i.rect=E,i.transform=y,i.left=d,i.top=h;var O=function(e){i.fixedDirection=e,i.fixedPosition=Br(t,e),z&&z.setFixedDirection(e)},C=o,k=a;if(l||c||u){var M=s||0;i.beforeInfo={origin:E.beforeOrigin,prevDeg:M,defaultDeg:M,prevSnapDeg:0,startDist:0},i.afterInfo=Fe(Fe({},i.beforeInfo),{origin:E.origin}),i.absoluteInfo=Fe(Fe({},i.beforeInfo),{origin:E.origin,startValue:M})}else{var D=null===(n=e.inputEvent)||void 0===n?void 0:n.target;if(D){var I=D.getAttribute("data-direction")||"",A=sr[I];if(A){i.isControl=!0,i.isAroundControl=ut(D,Lr("around-control")),i.controlDirection=A;var T=D.getAttribute("data-resolve");T&&(i.resolveAble=T);var R=function(t,e,r){var n=16===t.length?4:3,i=e.map((function(e){return Zr(t,e,n)})),o=r.left,a=r.top;return i.map((function(t){return[t[0]+o,t[1]+a]}))}(f.rootMatrix,f.renderPoses,m);r=wr(R,A),C=r[0],k=r[1]}}i.beforeInfo={origin:E.beforeOrigin},i.afterInfo={origin:E.origin},i.absoluteInfo={origin:E.origin,startValue:E.rotation};var B=O;O=function(e){var r=f.is3d?4:3,n=wr([[0,0],[w,0],[0,x],[w,x]],e),o=St(vt(_,r),n),a=o[0],s=o[1],u=Et(b,yt([a,s],r)),c=Et(S,yt([n[0],n[1]],r));B(e),i.beforeInfo.origin=u,i.afterInfo.origin=c,i.absoluteInfo.origin=c,Zi(t,i.beforeInfo,C,k,m),Zi(t,i.afterInfo,C,k,m),Zi(t,i.absoluteInfo,C,k,m)}}i.startClientX=C,i.startClientY=k,i.direction=g,i.beforeDirection=v,i.startValue=0,i.datas={},Or(e,"rotate");var P=!1,z=!1;i.isControl&&i.resolveAble&&("resizable"===i.resolveAble&&(z=Ji.dragControlStart(t,Fe(Fe({},new pr("resizable").dragStart([0,0],e)),{parentDirection:i.controlDirection,parentFixedDirection:i.fixedDirection}))));z||(P=Xi.dragStart(t,(new pr).dragStart([0,0],e))),O(function(t){var e=t.state,r=e.width,n=e.height,i=e.transformOrigin;return[i[0]/(r/2)-1,i[1]/(n/2)-1]}(t));var L=mn(t,e,Fe(Fe({set:function(t){i.startValue=t*Math.PI/180},setFixedDirection:O},Er(e)),{dragStart:P,resizeStart:z})),j=Sn(t,"onRotateStart",L);return i.isRotate=!1!==j,f.snapRenderInfo={request:e.isRequest},!!i.isRotate&&L},dragControl:function(t,e){var r,n,i,o=e.datas,a=e.distX,s=e.distY,u=e.parentRotate,c=e.parentFlag,l=e.isPinch,f=e.groupDelta,p=o.beforeDirection,d=o.beforeInfo,h=o.afterInfo,g=o.absoluteInfo,v=o.isRotate,y=o.startValue,m=o.rect,b=o.startClientX,_=o.startClientY;if(v){gr(e,"rotate");var S,w,x,E,O,C,k,M,D,I=function(t){return rn(t.datas.beforeTransform,[50,50],100,100).direction}(e),A=p*I,T=t.props.parentMoveable,R=180/Math.PI*y,B=g.startValue,P=!1,z=b+a,L=_+s;if(!c&&"parentDist"in e){var j=e.parentDist;w=j,O=j,M=j}else l||c?(w=Qi(u,p,d),O=Qi(u,A,h),M=Qi(u,A,g)):(w=to(z,L,p,d),O=to(z,L,A,h),M=to(z,L,A,g),P=!0);if(Sn(t,"onBeforeRotate",mn(t,e,{beforeRotation:x=R+w,rotation:C=R+O,absoluteRotation:D=B+M,setRotation:function(t){w=O=t-R,M=O}},!0)),S=(r=eo(t,m,d,w,R,P))[0],w=r[1],x=r[2],E=(n=eo(t,m,h,O,R,P))[0],O=n[1],C=n[2],k=(i=eo(t,m,g,M,B,P))[0],M=i[1],D=i[2],k||E||S||T){var N=vr(o,"rotate(".concat(C,"deg)"),"rotate(".concat(O,"deg)")),K=function(t,e,r){var n=r.fixedDirection,i=r.fixedPosition;return Rr(t,"rotate(".concat(e,"deg)"),n,i,r)}(t,O,o),q=wt(St(f||[0,0],K),o.prevInverseDist||[0,0]);o.prevInverseDist=K,o.requestValue=null;var F=Tr(t,N,q,l,e),U=F,G=ot([z,L],g.startAbsoluteOrigin)-g.startDist,H=void 0;if("resizable"===o.resolveAble){var W=Ji.dragControl(t,Fe(Fe({},fr(e,t.state,[e.deltaX,e.deltaY],!!l,!1,"resizable")),{resolveMatrix:!0,parentDistance:G}));W&&(H=W,U=yn(U,W,e))}var V=mn(t,e,Fe(Fe({delta:E,dist:O,rotate:C,rotation:C,beforeDist:w,beforeDelta:S,beforeRotate:x,beforeRotation:x,absoluteDist:M,absoluteDelta:k,absoluteRotate:D,absoluteRotation:D,isPinch:!!l,resize:H},F),U));return Sn(t,"onRotate",V),V}}},dragControlAfter:function(t,e){e.datas.requestValue},dragControlEnd:function(t,e){var r=e.datas;if(r.isRotate){r.isRotate=!1;var n=bn(t,e,{});return Sn(t,"onRotateEnd",n),n}},dragGroupControlCondition:ro,dragGroupControlStart:function(t,e){var r=e.datas,n=t.state,i=n.left,o=n.top,a=n.beforeOrigin,s=this.dragControlStart(t,e);if(!s)return!1;s.set(r.beforeDirection*t.rotation);var u=Fn(t,this,"dragControlStart",e,(function(t,e){var r=t.state,n=r.left,s=r.top,u=r.beforeOrigin,c=St(wt([n,s],[i,o]),wt(u,a));return e.datas.startGroupClient=c,e.datas.groupClient=c,Fe(Fe({},e),{parentRotate:0})})),c=Sn(t,"onRotateGroupStart",Fe(Fe({},s),{targets:t.props.targets,events:u}));return r.isRotate=!1!==c,!!r.isRotate&&s},dragGroupControl:function(t,e){var r=e.datas;if(r.isRotate){_n(t,"onBeforeRotate",(function(r){Sn(t,"onBeforeRotateGroup",mn(t,e,Fe(Fe({},r),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var i=r.beforeDirection,o=n.beforeDist,a=o/180*Math.PI,s=Fn(t,this,"dragControl",e,(function(t,e){var r=e.datas.startGroupClient,n=e.datas.groupClient,s=n[0],u=n[1],c=Dt(r,a*i),l=c[0],f=c[1],p=[l-s,f-u];return e.datas.groupClient=[l,f],Fe(Fe({},e),{parentRotate:o,groupDelta:p})}));t.rotation=i*n.beforeRotation;var u=Fe({targets:t.props.targets,events:s,set:function(e){t.rotation=e},setGroupRotation:function(e){t.rotation=e}},n);return Sn(t,"onRotateGroup",u),u}}},dragGroupControlEnd:function(t,e){var r=e.isDrag;if(e.datas.isRotate){this.dragControlEnd(t,e);var n=Fn(t,this,"dragControlEnd",e);return Sn(t,"onRotateGroupEnd",bn(t,e,{targets:t.props.targets,events:n})),r}},request:function(t){var e={},r=0,n=t.getRotation();return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaRotate"in t?r+=t.deltaRotate:"rotate"in t&&(r=t.rotate-n),{datas:e,parentDist:r}},requestEnd:function(){return{datas:e,isDrag:!0}}}}},ao=Tn("scalable"),so={name:"scalable",ableGroup:"size",canPinch:!0,props:{scalable:Boolean,throttleScale:Number,renderDirections:String,keepRatio:Boolean,edge:Boolean},events:{onScaleStart:"scaleStart",onBeforeScale:"beforeScale",onScale:"scale",onScaleEnd:"scaleEnd",onScaleGroupStart:"scaleGroupStart",onBeforeScaleGroup:"beforeScaleGroup",onScaleGroup:"scaleGroup",onScaleGroupEnd:"scaleGroupEnd"},render:Vi("scalable"),dragControlCondition:ao,dragControlStart:function(t,e){var r=e.datas,n=e.isPinch,i=e.inputEvent,o=e.parentDirection||(n?[0,0]:pn(i.target)),a=t.state,s=a.width,u=a.height,c=a.targetTransform,l=a.target,f=a.pos1,p=a.pos2,d=a.pos4;if(!o||!l)return!1;n||hr(t,e),r.datas={},r.transform=c,r.prevDist=[1,1],r.direction=o,r.startOffsetWidth=s,r.startOffsetHeight=u,r.startValue=[1,1];var h=ot(f,p),g=ot(p,d),v=!o[0]&&!o[1]||o[0]||!o[1];function y(t){r.ratio=t&&isFinite(t)?t:0}function m(t){r.fixedDirection=t,r.fixedPosition=wr(r.startPositions,t)}r.scaleWidth=h,r.scaleHeight=g,r.scaleXRatio=h/s,r.scaleYRatio=g/u,Or(e,"scale"),r.isWidth=v,r.startPositions=hn(t.state),r.setFixedDirection=m,y(ot(f,p)/ot(p,d)),m([-o[0],-o[1]]);var b=mn(t,e,Fe(Fe({direction:o,set:function(t){r.startValue=t},setRatio:y,setFixedDirection:m},Er(e)),{dragStart:Xi.dragStart(t,(new pr).dragStart([0,0],e))})),_=Sn(t,"onScaleStart",b);return r.startFixedDirection=r.fixedDirection,!1!==_&&(r.isScale=!0,t.state.snapRenderInfo={request:e.isRequest,direction:o}),!!r.isScale&&b},dragControl:function(t,e){gr(e,"scale");var r=e.datas,n=e.parentKeepRatio,i=e.parentFlag,o=e.isPinch,a=e.dragClient,s=e.isRequest,u=r.prevDist,c=r.direction,l=r.startOffsetWidth,f=r.startOffsetHeight,p=r.isScale,d=r.startValue,h=r.isWidth,g=r.ratio;if(!p)return!1;var v=t.props,y=v.throttleScale,m=v.parentMoveable,b=c;c[0]||c[1]||(b=[1,1]);var _=g&&(null!=n?n:v.keepRatio)||!1,S=t.state;function w(){var t=jn(b,_,r,e),n=t.distWidth,i=t.distHeight,o=(l+n)/l,a=(f+i)/f;return o=b[0]||_?o*d[0]:d[0],a=b[1]||_?a*d[1]:d[1],0===o&&(o=(u[0]>0?1:-1)*rr),0===a&&(a=(u[1]>0?1:-1)*rr),[o,a]}var x=w();if(!o&&t.props.groupable){var E=(S.snapRenderInfo||{}).direction;z(E)&&(E[0]||E[1])&&(S.snapRenderInfo={direction:c,request:e.isRequest})}Sn(t,"onBeforeScale",mn(t,e,{scale:x,setFixedDirection:function(t){return r.setFixedDirection(t),x=w()},startFixedDirection:r.startFixedDirection,setScale:function(t){x=t}},!0));var O=[x[0]/d[0],x[1]/d[1]],C=a,k=[0,0];if(a||(C=!i&&o?zr(t,[0,0]):r.fixedPosition),o||(k=ji(t,O,c,s,r)),_){b[0]&&b[1]&&k[0]&&k[1]&&(Math.abs(k[0]*l)>Math.abs(k[1]*f)?k[1]=0:k[0]=0);var M=!k[0]&&!k[1];if(M&&(h?O[0]=at(O[0]*d[0],y)/d[0]:O[1]=at(O[1]*d[1],y)/d[1]),b[0]&&!b[1]||k[0]&&!k[1]||M&&h){O[0]+=k[0];var D=l*O[0]*d[0]/g;O[1]=D/f/d[1]}else if(!b[0]&&b[1]||!k[0]&&k[1]||M&&!h){O[1]+=k[1];var I=f*O[1]*d[1]*g;O[0]=I/l/d[0]}}else O[0]+=k[0],O[1]+=k[1],k[0]||(O[0]=at(O[0]*d[0],y)/d[0]),k[1]||(O[1]=at(O[1]*d[1],y)/d[1]);0===O[0]&&(O[0]=(u[0]>0?1:-1)*rr),0===O[1]&&(O[1]=(u[1]>0?1:-1)*rr);var A,T,R=[O[0]/u[0],O[1]/u[1]];T=d,x=[(A=O)[0]*T[0],A[1]*T[1]];var B=function(t,e,r,n,i){return Rr(t,"scale(".concat(e.join(", "),")"),r,n,i)}(t,O,r.fixedDirection,C,r),P=wt(B,r.prevInverseDist||[0,0]);if(r.prevDist=O,r.prevInverseDist=B,x[0]===u[0]&&x[1]===u[1]&&P.every((function(t){return!t}))&&!m)return!1;var L=vr(r,"scale(".concat(x.join(", "),")"),"scale(".concat(O.join(", "),")")),j=mn(t,e,Fe({offsetWidth:l,offsetHeight:f,direction:c,scale:x,dist:O,delta:R,isPinch:!!o},Tr(t,L,P,o,e)));return Sn(t,"onScale",j),j},dragControlEnd:function(t,e){var r=e.datas;if(!r.isScale)return!1;r.isScale=!1;var n=bn(t,e,{});return Sn(t,"onScaleEnd",n),n},dragGroupControlCondition:ao,dragGroupControlStart:function(t,e){var r=e.datas,n=this.dragControlStart(t,e);if(!n)return!1;var i=Kn(t,"resizable",e);function o(e,n){var i=r.fixedDirection,o=r.fixedPosition,a=wr(n.datas.startPositions||hn(e.state),i),s=Et(Tt(-t.rotation/180*Math.PI,3),[a[0]-o[0],a[1]-o[1],1],3),u=s[0],c=s[1];return n.datas.originalX=u,n.datas.originalY=c,n}r.moveableScale=t.scale;var a=Fn(t,this,"dragControlStart",e,(function(t,e){return o(t,e)})),s=function(t){n.setFixedDirection(t),a.forEach((function(e,r){e.setFixedDirection(t),o(e.moveable,i[r])}))};r.setFixedDirection=s;var u=Fe(Fe({},n),{targets:t.props.targets,events:a,setFixedDirection:s}),c=Sn(t,"onScaleGroupStart",u);return r.isScale=!1!==c,!!r.isScale&&u},dragGroupControl:function(t,e){var r=e.datas;if(r.isScale){_n(t,"onBeforeScale",(function(r){Sn(t,"onBeforeScaleGroup",mn(t,e,Fe(Fe({},r),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var i=r.moveableScale;t.scale=[n.scale[0]*i[0],n.scale[1]*i[1]];var o=t.props.keepRatio,a=n.dist,s=n.scale,u=r.fixedPosition,c=Fn(t,this,"dragControl",e,(function(e,r){var n=Et(Tt(t.rotation/180*Math.PI,3),[r.datas.originalX*a[0],r.datas.originalY*a[1],1],3),i=n[0],c=n[1];return Fe(Fe({},r),{parentDist:null,parentScale:s,parentKeepRatio:o,dragClient:St(u,[i,c])})})),l=Fe({targets:t.props.targets,events:c},n);return Sn(t,"onScaleGroup",l),l}}},dragGroupControlEnd:function(t,e){var r=e.isDrag;if(e.datas.isScale){this.dragControlEnd(t,e);var n=Fn(t,this,"dragControlEnd",e);return Sn(t,"onScaleGroupEnd",bn(t,e,{targets:t.props.targets,events:n})),r}},request:function(){var t={},e=0,r=0;return{isControl:!0,requestStart:function(e){return{datas:t,parentDirection:e.direction||[1,1]}},request:function(n){return e+=n.deltaWidth,r+=n.deltaHeight,{datas:t,parentDist:[e,r],parentKeepRatio:n.keepRatio}},requestEnd:function(){return{datas:t,isDrag:!0}}}}};function uo(t,e){return t.map((function(t,r){return R(t,e[r],1,2)}))}function co(t,e,r){var n=nt(t,e),i=nt(t,r)-n;return i>=0?i:i+2*Math.PI}var lo={name:"warpable",ableGroup:"size",props:{warpable:Boolean,renderDirections:Array,edge:Boolean},events:{onWarpStart:"warpStart",onWarp:"warp",onWarpEnd:"warpEnd"},render:function(t,e){var r=t.props,n=r.resizable,i=r.scalable,o=r.warpable,a=r.zoom;if(n||i||!o)return[];var s=t.state,u=s.pos1,c=s.pos2,l=s.pos3,f=s.pos4,p=uo(u,c),d=uo(c,u),h=uo(u,l),g=uo(l,u),v=uo(l,f),y=uo(f,l),m=uo(c,f),b=uo(f,c);return __spreadArray([e.createElement("div",{className:Lr("line"),key:"middeLine1",style:an(p,v,a)}),e.createElement("div",{className:Lr("line"),key:"middeLine2",style:an(d,y,a)}),e.createElement("div",{className:Lr("line"),key:"middeLine3",style:an(h,m,a)}),e.createElement("div",{className:Lr("line"),key:"middeLine4",style:an(g,b,a)})],Yi(t,"warpable",e),!0)},dragControlCondition:function(t,e){if(e.isRequest)return!1;var r=e.inputEvent.target;return ut(r,Lr("direction"))&&ut(r,Lr("warpable"))},dragControlStart:function(t,e){var r=e.datas,n=e.inputEvent,i=t.props.target,o=pn(n.target);if(!o||!i)return!1;var a=t.state,s=a.transformOrigin,u=a.is3d,c=a.targetTransform,l=a.targetMatrix,f=a.width,p=a.height,d=a.left,h=a.top;return r.datas={},r.targetTransform=c,r.warpTargetMatrix=u?l:mt(l,3,4),r.targetInverseMatrix=ht(gt(r.warpTargetMatrix,4),3,4),r.direction=o,r.left=d,r.top=h,r.poses=[[0,0],[f,0],[0,p],[f,p]].map((function(t){return wt(t,s)})),r.nextPoses=r.poses.map((function(t){var e=t[0],n=t[1];return Et(r.warpTargetMatrix,[e,n,0,1],4)})),r.startValue=Rt(4),r.prevMatrix=Rt(4),r.absolutePoses=hn(a),r.posIndexes=Sr(o),hr(t,e),Or(e,"matrix3d"),a.snapRenderInfo={request:e.isRequest,direction:o},!1!==Sn(t,"onWarpStart",mn(t,e,Fe({set:function(t){r.startValue=t}},Er(e))))&&(r.isWarp=!0),r.isWarp},dragControl:function(t,e){var r=e.datas,n=e.isRequest,i=e.distX,o=e.distY,a=r.targetInverseMatrix,s=r.prevMatrix,u=r.isWarp,c=r.startValue,l=r.poses,f=r.posIndexes,p=r.absolutePoses;if(!u)return!1;if(gr(e,"matrix3d"),Vn(t,"warpable")){var d=f.map((function(t){return p[t]}));d.length>1&&d.push([(d[0][0]+d[1][0])/2,(d[0][1]+d[1][1])/2]);var h=ki(t,n,{horizontal:d.map((function(t){return t[1]+o})),vertical:d.map((function(t){return t[0]+i}))}),g=h.horizontal,v=h.vertical;o-=g.offset,i-=v.offset}var y=_r({datas:r,distX:i,distY:o},!0),m=r.nextPoses.slice();if(f.forEach((function(t){m[t]=St(m[t],y)})),!Qe.every((function(t){return e=t.map((function(t){return l[t]})),r=t.map((function(t){return m[t]})),n=co(e[0],e[1],e[2]),i=co(r[0],r[1],r[2]),o=Math.PI,!(n>=o&&i<=o||n<=o&&i>=o);var e,r,n,i,o})))return!1;var b=zt(l[0],l[2],l[1],l[3],m[0],m[2],m[1],m[3]);if(!b.length)return!1;var _=mr(r,_t(a,b,4),!0),S=_t(gt(s,4),_,4);r.prevMatrix=_;var w=_t(c,_,4),x=vr(r,"matrix3d(".concat(w.join(", "),")"),"matrix3d(".concat(_.join(", "),")"));return kr(e,x),Sn(t,"onWarp",mn(t,e,{delta:S,matrix:w,dist:_,multiply:_t,transform:x})),!0},dragControlEnd:function(t,e){var r=e.datas,n=e.isDrag;return!!r.isWarp&&(r.isWarp=!1,Sn(t,"onWarpEnd",bn(t,e,{})),n)}},fo=Lr("area-pieces"),po=Lr("area-piece"),ho=Lr("avoid");function go(t){var e=t.areaElement;if(e){var r=t.state,n=r.width,i=r.height;!function(t,e){if(t.classList)t.classList.remove(e);else{var r=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(r," ")}}(e,ho),e.style.cssText+="left: 0px; top: 0px; width: ".concat(n,"px; height: ").concat(i,"px")}}function vo(t){return t.createElement("div",{key:"area_pieces",className:fo},t.createElement("div",{className:po}),t.createElement("div",{className:po}),t.createElement("div",{className:po}),t.createElement("div",{className:po}))}var yo={name:"dragArea",props:{dragArea:Boolean,passDragArea:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},render:function(t,e){var r=t.props,n=r.target,i=r.dragArea,o=r.groupable,a=r.passDragArea,s=t.getState(),u=s.width,c=s.height,l=s.renderPoses,f=a?Lr("area","pass"):Lr("area");if(o)return[e.createElement("div",{key:"area",ref:w(t,"areaElement"),className:f}),vo(e)];if(!n||!i)return[];var p=zt([0,0],[u,0],[0,c],[u,c],l[0],l[1],l[2],l[3]),d=p.length?Xr(p,!0):"none";return[e.createElement("div",{key:"area",ref:w(t,"areaElement"),className:f,style:{top:"0px",left:"0px",width:"".concat(u,"px"),height:"".concat(c,"px"),transformOrigin:"0 0",transform:d}}),vo(e)]},dragStart:function(t,e){var r=e.datas,n=e.clientX,i=e.clientY;if(!e.inputEvent)return!1;r.isDragArea=!1;var o,a,s=t.areaElement,u=t.state,c=u.moveableClientRect,l=u.renderPoses,f=u.rootMatrix,p=u.is3d,d=c.left,h=c.top,g=tn(l),v=g.left,y=g.top,m=g.width,b=g.height,_=kn(f,[n-d,i-h],p?4:3),S=_[0],w=_[1],x=[{left:v,top:y,width:m,height:(w-=y)-10},{left:v,top:y,width:(S-=v)-10,height:b},{left:v,top:y+w+10,width:m,height:b-w-10},{left:v+S+10,top:y,width:m-S-10,height:b}],E=[].slice.call(s.nextElementSibling.children);x.forEach((function(t,e){E[e].style.cssText="left: ".concat(t.left,"px;top: ").concat(t.top,"px; width: ").concat(t.width,"px; height: ").concat(t.height,"px;")})),a=ho,(o=s).classList?o.classList.add(a):o.className+=" "+a,u.disableNativeEvent=!0},drag:function(t,e){var r=e.datas,n=e.inputEvent;if(this.enableNativeEvent(t),!n)return!1;r.isDragArea||(r.isDragArea=!0,go(t))},dragEnd:function(t,e){this.enableNativeEvent(t);var r=e.inputEvent,n=e.datas;if(!r)return!1;n.isDragArea||go(t)},dragGroupStart:function(t,e){return this.dragStart(t,e)},dragGroup:function(t,e){return this.drag(t,e)},dragGroupEnd:function(t,e){return this.dragEnd(t,e)},unset:function(t){go(t),t.state.disableNativeEvent=!1},enableNativeEvent:function(t){var e=t.state;e.disableNativeEvent&&$((function(){e.disableNativeEvent=!1}))}},mo=Ue("origin",{render:function(t,e){var r=t.props.zoom,n=t.getState(),i=n.beforeOrigin,o=n.rotation;return[e.createElement("div",{className:Lr("control","origin"),style:sn(o,r,i),key:"beforeOrigin"})]}});function bo(t){var e=t.scrollContainer;return[e.scrollLeft,e.scrollTop]}var _o={name:"scrollable",canPinch:!0,props:{scrollable:Boolean,scrollContainer:Object,scrollThreshold:Number,getScrollPosition:Function},events:{onScroll:"scroll",onScrollGroup:"scrollGroup"},dragRelation:"strong",dragStart:function(t,e){var r=t.props.scrollContainer,n=void 0===r?t.getContainer():r,i=new be,o=Bn(n,!0);e.datas.dragScroll=i;var a=e.isControl?"controlGesto":"targetGesto",s=e.targets;i.on("scroll",(function(r){var n=r.container,i=r.direction,o=mn(t,e,{scrollContainer:n,direction:i}),a=s?"onScrollGroup":"onScroll";s&&(o.targets=s),Sn(t,a,o)})).on("move",(function(r){var n=r.offsetX,i=r.offsetY;t[a].scrollBy(n,i,e.inputEvent,!1)})),i.dragStart(e,{container:o})},checkScroll:function(t,e){var r=e.datas.dragScroll;if(r){var n=t.props,i=n.scrollContainer,o=void 0===i?t.getContainer():i,a=n.scrollThreshold,s=void 0===a?0:a,u=n.getScrollPosition,c=void 0===u?bo:u;return r.drag(e,{container:o,threshold:s,getScrollPosition:function(t){return c({scrollContainer:t.container,direction:t.direction})}}),!0}},drag:function(t,e){return this.checkScroll(t,e)},dragEnd:function(t,e){e.datas.dragScroll.dragEnd(),e.datas.dragScroll=null},dragControlStart:function(t,e){return this.dragStart(t,Fe(Fe({},e),{isControl:!0}))},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupStart:function(t,e){return this.dragStart(t,Fe(Fe({},e),{targets:t.props.targets}))},dragGroup:function(t,e){return this.drag(t,Fe(Fe({},e),{targets:t.props.targets}))},dragGroupEnd:function(t,e){return this.dragEnd(t,Fe(Fe({},e),{targets:t.props.targets}))},dragGroupControlStart:function(t,e){return this.dragStart(t,Fe(Fe({},e),{targets:t.props.targets,isControl:!0}))},dragGroupContro:function(t,e){return this.drag(t,Fe(Fe({},e),{targets:t.props.targets}))},dragGroupControEnd:function(t,e){return this.dragEnd(t,Fe(Fe({},e),{targets:t.props.targets}))}},So={name:"",props:{target:Object,dragTarget:Object,container:Object,portalContainer:Object,rootContainer:Object,useResizeObserver:Boolean,zoom:Number,transformOrigin:Array,edge:Object,ables:Array,className:String,pinchThreshold:Number,pinchOutside:Boolean,triggerAblesSimultaneously:Boolean,checkInput:Boolean,cspNonce:String,translateZ:Number,hideDefaultLines:Boolean,props:Object,flushSync:Function,stopPropagation:Boolean,preventClickEventOnDrag:Boolean,preventClickDefault:Boolean},events:{}},wo=Ue("padding",{render:function(t,e){var r=t.props;if(r.dragArea)return[];var n=r.padding||{},i=n.left,o=void 0===i?0:i,a=n.top,s=void 0===a?0:a,u=n.right,c=void 0===u?0:u,l=n.bottom,f=void 0===l?0:l,p=t.getState(),d=p.renderPoses,h=[p.pos1,p.pos2,p.pos3,p.pos4],g=[];return o>0&&g.push([0,2]),s>0&&g.push([0,1]),c>0&&g.push([1,3]),f>0&&g.push([2,3]),g.map((function(t,r){var n=t[0],i=t[1],o=zt([0,0],[100,0],[0,100],[100,100],h[n],h[i],d[n],d[i]);if(o.length)return e.createElement("div",{key:"padding".concat(r),className:Lr("padding"),style:{transform:Xr(o,!0)}})}))}}),xo=["nw","ne","se","sw"];function Eo(t,e){var r=t[0]+t[1],n=r>e?e/r:1;return t[0]*=n,t[1]=e-t[1]*n,t}var Oo=[1,2,5,6],Co=[0,3,4,7],ko=[1,-1,-1,1],Mo=[1,1,-1,-1];function Do(t,e,r,n,i,o,a,s,u){void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=n),void 0===u&&(u=i);var c=[],l=!1,f=t.map((function(t,f){var p=e[f],d=p.horizontal,h=p.vertical;if(h&&!l&&(l=!0,c.push("/")),l){var g=Math.max(0,1===h?t[1]-a:u-t[1]);return c.push(In(g,i,r)),g}g=Math.max(0,1===d?t[0]-o:s-t[0]);return c.push(In(g,n,r)),g}));return{styles:c,raws:f}}function Io(t){for(var e=[0,0],r=[0,0],n=t.length,i=0;i<n;++i){var o=t[i];o.sub&&(o.horizontal&&(0===e[1]&&(e[0]=i),e[1]=i-e[0]+1,r[0]=i+1),o.vertical&&(0===r[1]&&(r[0]=i),r[1]=i-r[0]+1))}return{horizontalRange:e,verticalRange:r}}function Ao(t,e,r,n,i,o){var a,s,u,c;void 0===o&&(o=[0,0]);var l=t.indexOf("/"),f=(l>-1?t.slice(0,l):t).length,p=t.slice(0,f),d=t.slice(f+1),h=p[0],g=void 0===h?"0px":h,v=p[1],y=void 0===v?g:v,m=p[2],b=void 0===m?g:m,_=p[3],S=void 0===_?y:_,w=d[0],x=void 0===w?g:w,E=d[1],O=void 0===E?x:E,C=d[2],k=void 0===C?x:C,M=d[3],D=void 0===M?O:M,I=[g,y,b,S].map((function(t){return Q(t,e)})),A=[x,O,k,D].map((function(t){return Q(t,r)})),T=I.slice(),R=A.slice();a=Eo([T[0],T[1]],e),T[0]=a[0],T[1]=a[1],s=Eo([T[3],T[2]],e),T[3]=s[0],T[2]=s[1],u=Eo([R[0],R[3]],r),R[0]=u[0],R[3]=u[1],c=Eo([R[1],R[2]],r),R[1]=c[0],R[2]=c[1];var B=T.slice(0,Math.max(o[0],p.length)),P=R.slice(0,Math.max(o[1],d.length));return __spreadArray(__spreadArray([],B.map((function(t,e){var o=xo[e];return{horizontal:ko[e],vertical:0,pos:[n+t,i+(-1===Mo[e]?r:0)],sub:!0,raw:I[e],direction:o}})),!0),P.map((function(t,r){var o=xo[r];return{horizontal:0,vertical:Mo[r],pos:[n+(-1===ko[r]?e:0),i+t],sub:!0,raw:A[r],direction:o}})),!0)}function To(t,e,r,n,i){void 0===i&&(i=e.length);var o=Io(t.slice(n)),a=o.horizontalRange,s=o.verticalRange,u=r-n,c=0;if(0===u)c=i;else if(u>0&&u<a[1])c=a[1]-u;else{if(!(u>=s[0]))return;c=s[0]+s[1]-u}t.splice(r,c),e.splice(r,c)}function Ro(t,e,r,n,i,o,a,s,u,c,l){void 0===c&&(c=0),void 0===l&&(l=0);var f=Io(t.slice(r)),p=f.horizontalRange,d=f.verticalRange;if(n>-1)for(var h=1===ko[n]?o-c:s-o,g=p[1];g<=n;++g){var v=1===Mo[g]?l:u,y=0;if(n===g?y=o:0===g?y=c+h:-1===ko[g]&&(y=s-(e[r][0]-c)),t.splice(r+g,0,{horizontal:ko[g],vertical:0,pos:[y,v]}),e.splice(r+g,0,[y,v]),0===g)break}else if(i>-1){var m=1===Mo[i]?a-l:u-a;if(0===p[1]&&0===d[1]){var b=[c+m,l];t.push({horizontal:ko[0],vertical:0,pos:b}),e.push(b)}var _=d[0];for(g=d[1];g<=i;++g){y=1===ko[g]?c:s,v=0;if(i===g?v=a:0===g?v=l+m:1===Mo[g]?v=e[r+_][1]:-1===Mo[g]&&(v=u-(e[r+_][1]-l)),t.push({horizontal:0,vertical:Mo[g],pos:[y,v]}),e.push([y,v]),0===g)break}}}function Bo(t,e){return void 0===e&&(e=t.map((function(t){return t.raw}))),{horizontals:t.map((function(t,r){return t.horizontal?e[r]:null})).filter((function(t){return null!=t})),verticals:t.map((function(t,r){return t.vertical?e[r]:null})).filter((function(t){return null!=t}))}}var Po=[[0,-1,"n"],[1,0,"e"]],zo=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function Lo(t,e,r){var n=t.props.clipRelative,i=t.state,o=i.width,a=i.height,s=e,u=s.type,c=s.poses,l="rect"===u,f="circle"===u;if("polygon"===u)return r.map((function(t){return"".concat(In(t[0],o,n)," ").concat(In(t[1],a,n))}));if(l||"inset"===u){var p=r[1][1],d=r[3][0],h=r[7][0],g=r[5][1];if(l)return[p,d,g,h].map((function(t){return"".concat(t,"px")}));var v=[p,o-d,a-g,h].map((function(t,e){return In(t,e%2?o:a,n)}));if(r.length>8){var y=wt(r[4],r[0]),m=y[0],b=y[1];v.push.apply(v,__spreadArray(["round"],Do(r.slice(8),c.slice(8),n,m,b,h,p,d,g).styles,!1))}return v}if(f||"ellipse"===u){var _=r[0],S=In(Math.abs(r[1][1]-_[1]),f?Math.sqrt((o*o+a*a)/2):a,n);return(v=f?[S]:[In(Math.abs(r[2][0]-_[0]),o,n),S]).push("at",In(_[0],o,n),In(_[1],a,n)),v}}function jo(t,e,r,n){var i=[n,(n+e)/2,e],o=[t,(t+r)/2,r];return zo.map((function(t){var e=t[0],r=t[1],n=t[2],a=i[e+1],s=o[r+1];return{vertical:Math.abs(r),horizontal:Math.abs(e),direction:n,pos:[a,s]}}))}function No(t){var e=[1/0,-1/0],r=[1/0,-1/0];return t.forEach((function(t){var n=t.pos;e[0]=Math.min(e[0],n[0]),e[1]=Math.max(e[1],n[0]),r[0]=Math.min(r[0],n[1]),r[1]=Math.max(r[1],n[1])})),[Math.abs(e[1]-e[0]),Math.abs(r[1]-r[0])]}function Ko(t,e,r,n,i){var o,a,s,u,c,l,f,p=i;if(!p){var d=wn(t),h=d.clipPath;p="none"!==h?h:d.clip}if(p&&"none"!==p&&"auto"!==p||(p=n)){var g=H(p),v=g.prefix,y=void 0===v?p:v,m=g.value,b=void 0===m?"":m,_="circle"===y,S=" ";if("polygon"===y){S=",";var w=(k=G(b||"0% 0%, 100% 0%, 100% 100%, 0% 100%")).map((function(t){var n=t.split(" "),i=n[0],o=n[1];return{vertical:1,horizontal:1,pos:[Q(i,e),Q(o,r)]}}));return{type:y,clipText:p,poses:w,splitter:S}}if(_||"ellipse"===y){var x="",E="",O=0,C=0,k=U(b);if(_){var M;M=void 0===(o=k[0])?"50%":o,x=void 0===(a=k[2])?"50%":a,E=void 0===(s=k[3])?"50%":s,O=Q(M,Math.sqrt((e*e+r*r)/2)),C=O}else{var D,I;D=void 0===(u=k[0])?"50%":u,I=void 0===(c=k[1])?"50%":c,x=void 0===(l=k[3])?"50%":l,E=void 0===(f=k[4])?"50%":f,O=Q(D,e),C=Q(I,r)}var A=[Q(x,e),Q(E,r)];w=__spreadArray([{vertical:1,horizontal:1,pos:A,direction:"nesw"}],Po.slice(0,_?1:2).map((function(t){return{vertical:Math.abs(t[1]),horizontal:t[0],direction:t[2],sub:!0,pos:[A[0]+t[0]*O,A[1]+t[1]*C]}})),!0);return{type:y,clipText:p,radiusX:O,radiusY:C,left:A[0]-O,top:A[1]-C,poses:w,splitter:S}}if("inset"===y){var T=(k=U(b||"0 0 0 0")).indexOf("round"),R=(T>-1?k.slice(0,T):k).length,B=k.slice(R+1),P=k.slice(0,R),z=P[0],L=P[1],j=void 0===L?z:L,N=P[2],K=void 0===N?z:N,q=P[3],F=void 0===q?j:q,V=[z,K].map((function(t){return Q(t,r)})),Y=V[0],X=V[1],$=[F,j].map((function(t){return Q(t,e)})),J=$[0],Z=$[1],tt=e-Z,et=r-X,rt=Ao(B,tt-J,et-Y,J,Y);return{type:"inset",clipText:p,poses:w=__spreadArray(__spreadArray([],jo(Y,tt,et,J),!0),rt,!0),top:Y,left:J,right:tt,bottom:et,radius:B,splitter:S}}if("rect"===y){S=",";var nt=(k=G(b||"0px, ".concat(e,"px, ").concat(r,"px, 0px"))).map((function(t){return W(t).value}));return{type:"rect",clipText:p,poses:w=jo(Y=nt[0],Z=nt[1],X=nt[2],J=nt[3]),top:Y,right:Z,bottom:X,left:J,values:k,splitter:S}}}}var qo={name:"clippable",props:{clippable:Boolean,defaultClipPath:String,customClipPath:String,keepRatio:Boolean,clipRelative:Boolean,clipArea:Boolean,dragWithClip:Boolean,clipTargetBounds:Boolean,clipVerticalGuidelines:Array,clipHorizontalGuidelines:Array,clipSnapThreshold:Boolean},events:{onClipStart:"clipStart",onClip:"clip",onClipEnd:"clipEnd"},css:[".control.clip-control {\n    background: #6d6;\n    cursor: pointer;\n}\n.control.clip-control.clip-radius {\n    background: #d66;\n}\n.line.clip-line {\n    background: #6e6;\n    cursor: move;\n    z-index: 1;\n}\n.clip-area {\n    position: absolute;\n    top: 0;\n    left: 0;\n}\n.clip-ellipse {\n    position: absolute;\n    cursor: move;\n    border: 1px solid #6d6;\n    border: var(--zoompx) solid #6d6;\n    border-radius: 50%;\n    transform-origin: 0px 0px;\n}",":host {\n    --bounds-color: #d66;\n}",".guideline {\n    pointer-events: none;\n    z-index: 2;\n}",".line.guideline.bounds {\n    background: #d66;\n    background: var(--bounds-color);\n}"],render:function(t,e){var r=t.props,n=r.customClipPath,i=r.defaultClipPath,o=r.clipArea,a=r.zoom,s=t.getState(),u=s.target,c=s.width,l=s.height,f=s.allMatrix,p=s.is3d,d=s.left,h=s.top,g=s.pos1,v=s.pos2,y=s.pos3,m=s.pos4,b=s.clipPathState,_=s.snapBoundInfos,S=s.rotation;if(!u)return[];var w=Ko(u,c,l,i||"inset",b||n);if(!w)return[];var x=p?4:3,E=w.type,O=w.poses.map((function(t){var e=Zr(f,t.pos,x);return[e[0]-d,e[1]-h]})),C=[],k=[],M="rect"===E,D="inset"===E,I="polygon"===E;if(M||D||I){var A=D?O.slice(0,8):O;k=A.map((function(t,r){var n=0===r?A[A.length-1]:A[r-1],i=nt(n,t),o=on(n,t);return e.createElement("div",{key:"clipLine".concat(r),className:Lr("line","clip-line","snap-control"),"data-clip-index":r,style:{width:"".concat(o,"px"),transform:"translate(".concat(n[0],"px, ").concat(n[1],"px) rotate(").concat(i,"rad) scaleY(").concat(a,")")}})}))}if(C=O.map((function(t,r){return e.createElement("div",{key:"clipControl".concat(r),className:Lr("control","clip-control","snap-control"),"data-clip-index":r,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(S,"rad) scale(").concat(a,")")}})})),D&&C.push.apply(C,O.slice(8).map((function(t,r){return e.createElement("div",{key:"clipRadiusControl".concat(r),className:Lr("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+r,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(S,"rad) scale(").concat(a,")")}})}))),"circle"===E||"ellipse"===E){var T=w.left,R=w.top,B=w.radiusX,P=w.radiusY,z=wt(Zr(f,[T,R],x),Zr(f,[0,0],x)),L=z[0],j=z[1],N="none";if(!o){for(var K=Math.max(10,B/5,P/5),q=[],F=0;F<=K;++F){var U=2*Math.PI/K*F;q.push([B+(B-a)*Math.cos(U),P+(P-a)*Math.sin(U)])}q.push([B,-2]),q.push([-2,-2]),q.push([-2,2*P+2]),q.push([2*B+2,2*P+2]),q.push([2*B+2,-2]),q.push([B,-2]),N="polygon(".concat(q.map((function(t){return"".concat(t[0],"px ").concat(t[1],"px")})).join(", "),")")}C.push(e.createElement("div",{key:"clipEllipse",className:Lr("clip-ellipse","snap-control"),style:{width:"".concat(2*B,"px"),height:"".concat(2*P,"px"),clipPath:N,transform:"translate(".concat(-d+L,"px, ").concat(-h+j,"px) ").concat(Xr(f))}}))}if(o){var G=tn(__spreadArray([g,v,y,m],O,!0)),H=G.width,W=G.height,V=G.left,Y=G.top;if(I||M||D){q=D?O.slice(0,8):O;C.push(e.createElement("div",{key:"clipArea",className:Lr("clip-area","snap-control"),style:{width:"".concat(H,"px"),height:"".concat(W,"px"),transform:"translate(".concat(V,"px, ").concat(Y,"px)"),clipPath:"polygon(".concat(q.map((function(t){return"".concat(t[0]-V,"px ").concat(t[1]-Y,"px")})).join(", "),")")}}))}}return _&&["vertical","horizontal"].forEach((function(t){var r=_[t],n="horizontal"===t;r.isSnap&&k.push.apply(k,r.snap.posInfos.map((function(r,i){var o=r.pos,s=wt(Zr(f,n?[0,o]:[o,0],x),[d,h]),u=wt(Zr(f,n?[c,o]:[o,l],x),[d,h]);return Hi(e,"",s,u,a,"clip".concat(t,"snap").concat(i),"guideline")}))),r.isBound&&k.push.apply(k,r.bounds.map((function(r,i){var o=r.pos,s=wt(Zr(f,n?[0,o]:[o,0],x),[d,h]),u=wt(Zr(f,n?[c,o]:[o,l],x),[d,h]);return Hi(e,"",s,u,a,"clip".concat(t,"bounds").concat(i),"guideline","bounds","bold")})))})),__spreadArray(__spreadArray([],C,!0),k,!0)},dragControlCondition:function(t,e){return e.inputEvent&&(e.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(t,e){var r=t.props.dragWithClip;return!(void 0===r||r)&&this.dragControlStart(t,e)},drag:function(t,e){return this.dragControl(t,Fe(Fe({},e),{isDragTarget:!0}))},dragEnd:function(t,e){return this.dragControlEnd(t,e)},dragControlStart:function(t,e){var r=t.state,n=t.props,i=n.defaultClipPath,o=n.customClipPath,a=r.target,s=r.width,u=r.height,c=e.inputEvent?e.inputEvent.target:null,l=c&&c.getAttribute("class")||"",f=e.datas,p=Ko(a,s,u,i||"inset",o);if(!p)return!1;var d=p.clipText;return!1===Sn(t,"onClipStart",mn(t,e,{clipType:p.type,clipStyle:d,poses:p.poses.map((function(t){return t.pos}))}))?(f.isClipStart=!1,!1):(f.isControl=l&&l.indexOf("clip-control")>-1,f.isLine=l.indexOf("clip-line")>-1,f.isArea=l.indexOf("clip-area")>-1||l.indexOf("clip-ellipse")>-1,f.clipIndex=c?parseInt(c.getAttribute("data-clip-index"),10):-1,f.clipPath=p,f.isClipStart=!0,r.clipPathState=d,hr(t,e),!0)},dragControl:function(t,e){var r,n=e.datas,i=e.originalDatas,o=e.isDragTarget;if(!n.isClipStart)return!1;var a=n,s=a.isControl,u=a.isLine,c=a.isArea,l=a.clipIndex,f=a.clipPath;if(!f)return!1;var p=un(t.props,"clippable"),d=p.keepRatio,h=0,g=0,v=i.draggable,y=_r(e);o&&v?(r=v.prevBeforeDist,h=r[0],g=r[1]):(h=y[0],g=y[1]);var m=[h,g],b=t.state,_=b.width,S=b.height,w=!c&&!s&&!u,x=f.type,E=f.poses,O=f.splitter,C=E.map((function(t){return t.pos}));w&&(h=-h,g=-g);var k=!s||"nesw"===E[l].direction,M="inset"===x||"rect"===x,D=E.map((function(){return[0,0]}));if(s&&!k){var I=E[l],A=I.horizontal,T=I.vertical,R=[h*Math.abs(A),g*Math.abs(T)];D=function(t,e,r,n,i){var o=t[e],a=o.direction,s=o.sub,u=t.map((function(){return[0,0]})),c=a?a.split(""):[];if(n&&e<8){var l=c.filter((function(t){return"w"===t||"e"===t})),f=c.filter((function(t){return"n"===t||"s"===t})),p=l[0],d=f[0];u[e]=r;var h=No(t),g=h[0],v=h[1],y=g&&v?g/v:0;if(y&&i){var m=t[(e+4)%8].pos,b=[0,0];a.indexOf("w")>-1?b[0]=-1:a.indexOf("e")>-1&&(b[0]=1),a.indexOf("n")>-1?b[1]=-1:a.indexOf("s")>-1&&(b[1]=1);var _=Ln([g,v],r,y,b,!0),S=g+_[0],w=v+_[1],x=m[1],E=m[1],O=m[0],C=m[0];-1===b[0]?O=C-S:1===b[0]?C=O+S:(O-=S/2,C+=S/2),-1===b[1]?x=E-w:E=1===b[1]?x+w:(x=E-w/2)+w;var k=jo(x,C,E,O);t.forEach((function(t,e){u[e][0]=k[e].pos[0]-t.pos[0],u[e][1]=k[e].pos[1]-t.pos[1]}))}else t.forEach((function(t,e){var n=t.direction;n&&(n.indexOf(p)>-1&&(u[e][0]=r[0]),n.indexOf(d)>-1&&(u[e][1]=r[1]))})),p&&(u[1][0]=r[0]/2,u[5][0]=r[0]/2),d&&(u[3][1]=r[1]/2,u[7][1]=r[1]/2)}else a&&!s?c.forEach((function(e){var n="n"===e||"s"===e;t.forEach((function(t,i){var o=t.direction,a=t.horizontal,s=t.vertical;o&&-1!==o.indexOf(e)&&(u[i]=[n||!a?0:r[0],n&&s?r[1]:0])}))})):u[e]=r;return u}(E,l,R,M,d)}else k&&(D=C.map((function(){return[h,g]})));var B=C.map((function(t,e){return St(t,D[e])})),P=__spreadArray([],B,!0);b.snapBoundInfos=null;var z="circle"===f.type,L="ellipse"===f.type;if(z||L){var j=tn(B),N=Math.abs(j.bottom-j.top),K=Math.abs(L?j.right-j.left:N),q=B[0][1]+N,F=B[0][0]-K,U=B[0][0]+K;z&&(P.push([U,j.bottom]),D.push([1,0])),P.push([j.left,q]),D.push([0,1]),P.push([F,j.bottom]),D.push([1,0])}var G=Ri((p.clipHorizontalGuidelines||[]).map((function(t){return Q("".concat(t),S)})),(p.clipVerticalGuidelines||[]).map((function(t){return Q("".concat(t),_)})),_,S),H=[],W=[];if(z||L)H=[P[4][0],P[2][0]],W=[P[1][1],P[3][1]];else if(M){var V=[P[0],P[2],P[4],P[6]],Y=[D[0],D[2],D[4],D[6]];H=V.filter((function(t,e){return Y[e][0]})).map((function(t){return t[0]})),W=V.filter((function(t,e){return Y[e][1]})).map((function(t){return t[1]}))}else H=P.filter((function(t,e){return D[e][0]})).map((function(t){return t[0]})),W=P.filter((function(t,e){return D[e][1]})).map((function(t){return t[1]}));var X=[0,0],$=Mi(G,p.clipTargetBounds&&{left:0,top:0,right:_,bottom:S},H,W,5),J=$.horizontal,Z=$.vertical,tt=J.offset,et=Z.offset;if(J.isBound&&(X[1]+=tt),Z.isBound&&(X[0]+=et),(L||z)&&0===D[0][0]&&0===D[0][1]){var rt=(j=tn(B)).bottom-j.top,nt=L?j.right-j.left:rt;nt-=Z.isBound?Math.abs(et):0===Z.snapIndex?-et:et,rt-=J.isBound?Math.abs(tt):0===J.snapIndex?-tt:tt,z&&(nt=rt=ri(Z,J)>0?rt:nt);var it=P[0];P[1][1]=it[1]-rt,P[2][0]=it[0]+nt,P[3][1]=it[1]+rt,P[4][0]=it[0]-nt}else if(M&&d&&s){var ot=No(E),at=ot[0],st=ot[1],ut=at&&st?at/st:0,ct=E[l].direction||"",lt=P[1][1];q=P[5][1],F=P[7][0],U=P[3][0];tt<=et?tt=et/ut:et=tt*ut,ct.indexOf("w")>-1?F-=et:ct.indexOf("e")>-1?U-=et:(F+=et/2,U-=et/2),ct.indexOf("n")>-1?lt-=tt:ct.indexOf("s")>-1?q-=tt:(lt+=tt/2,q-=tt/2);var ft=jo(lt,U,q,F);P.forEach((function(t,e){var r;r=ft[e].pos,t[0]=r[0],t[1]=r[1]}))}else P.forEach((function(t,e){var r=D[e];r[0]&&(t[0]-=et),r[1]&&(t[1]-=tt)}));var pt=Lo(t,f,B),dt="".concat(x,"(").concat(pt.join(O),")");if(b.clipPathState=dt,z||L)H=[P[4][0],P[2][0]],W=[P[1][1],P[3][1]];else if(M){H=(V=[P[0],P[2],P[4],P[6]]).map((function(t){return t[0]})),W=V.map((function(t){return t[1]}))}else H=P.map((function(t){return t[0]})),W=P.map((function(t){return t[1]}));if(b.snapBoundInfos=Mi(G,p.clipTargetBounds&&{left:0,top:0,right:_,bottom:S},H,W,1),v){var ht=b.is3d,gt=b.allMatrix,vt=ht?4:3,yt=X;o&&(yt=[m[0]+X[0]-y[0],m[1]+X[1]-y[1]]),v.deltaOffset=_t(gt,[yt[0],yt[1],0,0],vt)}return Sn(t,"onClip",mn(t,e,{clipEventType:"changed",clipType:x,poses:B,clipStyle:dt,clipStyles:pt,distX:h,distY:g})),!0},dragControlEnd:function(t,e){this.unset(t);var r=e.isDrag,n=e.datas,i=e.isDouble,o=n.isLine,a=n.isClipStart,s=n.isControl;return!!a&&(Sn(t,"onClipEnd",bn(t,e,{})),i&&(s?function(t,e){var r=e.datas,n=r.clipPath,i=r.clipIndex,o=n,a=o.type,s=o.poses,u=o.splitter,c=s.map((function(t){return t.pos})),l=c.length;if("polygon"===a)s.splice(i,1),c.splice(i,1);else{if("inset"!==a)return;if(i<8)return;if(To(s,c,i,8,l),l===s.length)return}var f=Lo(t,n,c);Sn(t,"onClip",mn(t,e,{clipEventType:"removed",clipType:a,poses:c,clipStyles:f,clipStyle:"".concat(a,"(").concat(f.join(u),")"),distX:0,distY:0}))}(t,e):o&&function(t,e){var r=dr(t,e),n=r[0],i=r[1],o=e.datas,a=o.clipPath,s=o.clipIndex,u=a,c=u.type,l=u.poses,f=u.splitter,p=l.map((function(t){return t.pos}));if("polygon"===c)p.splice(s,0,[n,i]);else{if("inset"!==c)return;var d=Oo.indexOf(s),h=Co.indexOf(s),g=l.length;if(Ro(l,p,8,d,h,n,i,p[4][0],p[4][1],p[0][0],p[0][1]),g===l.length)return}var v=Lo(t,a,p);Sn(t,"onClip",mn(t,e,{clipEventType:"added",clipType:c,poses:p,clipStyles:v,clipStyle:"".concat(c,"(").concat(v.join(f),")"),distX:0,distY:0}))}(t,e)),i||r)},unset:function(t){t.state.clipPathState="",t.state.snapBoundInfos=null}},Fo={name:"originDraggable",props:{originDraggable:Boolean,originRelative:Boolean},events:{onDragOriginStart:"dragOriginStart",onDragOrigin:"dragOrigin",onDragOriginEnd:"dragOriginEnd"},css:[":host[data-able-origindraggable] .control.origin {\n    pointer-events: auto;\n}"],dragControlCondition:function(t,e){return e.isRequest?"originDraggable"===e.requestAble:ut(e.inputEvent.target,Lr("origin"))},dragControlStart:function(t,e){var r=e.datas;hr(t,e);var n=mn(t,e,{dragStart:Xi.dragStart(t,(new pr).dragStart([0,0],e))}),i=Sn(t,"onDragOriginStart",n);return r.startOrigin=t.state.transformOrigin,r.startTargetOrigin=t.state.targetOrigin,r.prevOrigin=[0,0],r.isDragOrigin=!0,!1===i?(r.isDragOrigin=!1,!1):n},dragControl:function(t,e){var r=e.datas,n=e.isPinch,i=e.isRequest;if(!r.isDragOrigin)return!1;var o=_r(e),a=o[0],s=o[1],u=t.state,c=u.width,l=u.height,f=u.offsetMatrix,p=u.targetMatrix,d=u.is3d,h=t.props.originRelative,g=void 0===h||h,v=d?4:3,y=[a,s];if(i){var m=e.distOrigin;(m[0]||m[1])&&(y=m)}var b=St(r.startOrigin,y),_=St(r.startTargetOrigin,y),S=wt(y,r.prevOrigin),w=xr(f,p,b,v),x=t.getRect(),E=tn(Qr(w,c,l,v)),O=[x.left-E.left,x.top-E.top];r.prevOrigin=y;var C=mn(t,e,{width:c,height:l,origin:b,dist:y,delta:S,transformOrigin:[In(_[0],c,g),In(_[1],l,g)].join(" "),drag:Xi.drag(t,fr(e,t.state,O,!!n,!1))});return Sn(t,"onDragOrigin",C),C},dragControlEnd:function(t,e){return!!e.datas.isDragOrigin&&(Sn(t,"onDragOriginEnd",bn(t,e,{})),!0)},dragGroupControlCondition:function(t,e){return this.dragControlCondition(t,e)},dragGroupControlStart:function(t,e){return!!this.dragControlStart(t,e)},dragGroupControl:function(t,e){var r=this.dragControl(t,e);return!!r&&(t.transformOrigin=r.transformOrigin,!0)},request:function(t){var e={},r=t.getRect(),n=0,i=0,o=r.transformOrigin,a=[0,0];return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaOrigin"in t?(a[0]+=t.deltaOrigin[0],a[1]+=t.deltaOrigin[1]):"origin"in t?(a[0]=t.origin[0]-o[0],a[1]=t.origin[1]-o[1]):("x"in t?n=t.x-r.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?i=t.y-r.top:"deltaY"in t&&(i+=t.deltaY)),{datas:e,distX:n,distY:i,distOrigin:a}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function Uo(t,e,r,n,i){var o;void 0===n&&(n=[0,0]);if(i)o=i;else{var a=wn(t);o=a&&a.borderRadius||""}return Ao(!o||!i&&"0px"===o?[]:U(o),e,r,0,0,n)}function Go(t,e,r,n,i,o){var a=t.state,s=a.width,u=a.height,c=Do(o,i,t.props.roundRelative,s,u),l=c.raws,f=c.styles,p=Bo(i,l),d=p.horizontals,h=p.verticals,g=f.join(" ");a.borderRadiusState=g,Sn(t,"onRound",mn(t,e,{horizontals:d,verticals:h,borderRadius:g,width:s,height:u,delta:n,dist:r}))}var Ho={name:"roundable",props:{roundable:Boolean,roundRelative:Boolean,minRoundControls:Array,maxRoundControls:Array,roundClickable:Boolean},events:{onRoundStart:"roundStart",onRound:"round",onRoundEnd:"roundEnd"},css:[".control.border-radius {\n    background: #d66;\n    cursor: pointer;\n}",":host[data-able-roundable] .line.direction {\n    cursor: pointer;\n}"],render:function(t,e){var r=t.getState(),n=r.target,i=r.width,o=r.height,a=r.allMatrix,s=r.is3d,u=r.left,c=r.top,l=r.borderRadiusState,f=t.props,p=f.minRoundControls,d=void 0===p?[0,0]:p,h=f.maxRoundControls,g=void 0===h?[4,4]:h,v=f.zoom;if(!n)return null;var y=s?4:3,m=Uo(n,i,o,d,l);if(!m)return null;var b=0,_=0;return m.map((function(t,r){_+=Math.abs(t.horizontal),b+=Math.abs(t.vertical);var n=wt(Zr(a,t.pos,y),[u,c]),i=t.vertical?b<=g[1]:_<=g[0];return e.createElement("div",{key:"borderRadiusControl".concat(r),className:Lr("control","border-radius"),"data-radius-index":r,style:{display:i?"block":"none",transform:"translate(".concat(n[0],"px, ").concat(n[1],"px) scale(").concat(v,")")}})}))},dragControlCondition:function(t,e){if(!e.inputEvent||e.isRequest)return!1;var r=e.inputEvent.target.getAttribute("class")||"";return r.indexOf("border-radius")>-1||r.indexOf("moveable-line")>-1&&r.indexOf("moveable-direction")>-1},dragControlStart:function(t,e){var r=e.inputEvent,n=e.datas,i=r.target,o=i.getAttribute("class")||"",a=o.indexOf("border-radius")>-1,s=o.indexOf("moveable-line")>-1&&o.indexOf("moveable-direction")>-1,u=a?parseInt(i.getAttribute("data-radius-index"),10):-1,c=-1;if(s){var l=i.getAttribute("data-line-key")||"";l&&(c=parseInt(l.replace(/render-line-/g,""),10),isNaN(c)&&(c=-1))}if(!a&&!s)return!1;if(!1===Sn(t,"onRoundStart",mn(t,e,{})))return!1;n.lineIndex=c,n.controlIndex=u,n.isControl=a,n.isLine=s,hr(t,e);var f=t.props,p=f.roundRelative,d=f.minRoundControls,h=void 0===d?[0,0]:d,g=t.state,v=g.target,y=g.width,m=g.height;n.isRound=!0,n.prevDist=[0,0];var b=Uo(v,y,m,h)||[];return n.controlPoses=b,g.borderRadiusState=Do(b.map((function(t){return t.pos})),b,p,y,m).styles.join(" "),!0},dragControl:function(t,e){var r=e.datas;if(!r.isRound||!r.isControl||!r.controlPoses.length)return!1;var n=r.controlIndex,i=r.controlPoses,o=_r(e),a=o[0],s=o[1],u=[a,s],c=wt(u,r.prevDist),l=t.props.maxRoundControls,f=void 0===l?[4,4]:l,p=t.state,d=p.width,h=p.height,g=i[n],v=g.vertical,y=g.horizontal,m=i.map((function(t){var e=t.horizontal,r=t.vertical,n=[e*y*u[0],r*v*u[1]];if(e){if(1===f[0])return n;if(f[0]<4&&e!==y)return n}else{if(0===f[1])return n[1]=r*y*u[0]/d*h,n;if(v){if(1===f[1])return n;if(f[1]<4&&r!==v)return n}}return[0,0]}));m[n]=u;var b=i.map((function(t,e){return St(t.pos,m[e])}));return r.prevDist=[a,s],Go(t,e,u,c,i,b),!0},dragControlEnd:function(t,e){var r=t.state;r.borderRadiusState="";var n=e.datas,i=e.isDouble;if(!n.isRound)return!1;var o=r.width,a=r.height,s=n.isControl,u=n.controlIndex,c=n.isLine,l=n.lineIndex,f=n.controlPoses,p=f.map((function(t){return t.pos})),d=p.length,h=t.props.roundClickable;if(i&&(void 0===h||h)){if(s)To(f,p,u,0);else if(c){var g=dr(t,e);!function(t,e,r,n,i,o,a){var s=Bo(t),u=s.horizontals,c=s.verticals,l=u.length,f=c.length,p=-1,d=-1;0===r?0===l?p=0:1===l&&(p=1):3===r&&(l<=2?p=2:l<=3&&(p=3)),2===r?0===f?d=0:f<4&&(d=3):1===r&&(f<=1?d=1:f<=2&&(d=2)),Ro(t,e,0,p,d,n,i,o,a)}(f,p,l,g[0],g[1],o,a)}d!==f.length&&Go(t,e,[0,0],[0,0],f,p)}return Sn(t,"onRoundEnd",bn(t,e,{})),r.borderRadiusState="",!0},unset:function(t){t.state.borderRadiusState=""}};var Wo={isPinch:!0,name:"beforeRenderable",props:{},events:{onBeforeRenderStart:"beforeRenderStart",onBeforeRender:"beforeRender",onBeforeRenderEnd:"beforeRenderEnd",onBeforeRenderGroupStart:"beforeRenderGroupStart",onBeforeRenderGroup:"beforeRenderGroup",onBeforeRenderGroupEnd:"beforeRenderGroupEnd"},dragRelation:"weak",setTransform:function(t,e){var r=t.state,n=r.is3d,i=r.target,o=r.targetMatrix,a=null==i?void 0:i.style.transform,s=n?"matrix3d(".concat(o.join(","),")"):"matrix(".concat(xt(o,!0),")"),u=a&&"none"!==a?a:s;e.datas.startTransforms=function(t,e){var r=Rt(e?4:3);return t==="matrix".concat(e?"3d":"","(").concat(r.join(","),")")||"matrix(1,0,0,1,0,0)"===t}(u,n)?[]:U(u)},resetStyle:function(t){var e=t.datas;e.nextStyle={},e.nextTransforms=t.datas.startTransforms,e.nextTransformAppendedIndexes=[]},fillDragStartParams:function(t,e){return mn(t,e,{setTransform:function(t){e.datas.startTransforms=z(t)?t:U(t)},isPinch:!!e.isPinch})},fillDragParams:function(t,e){return mn(t,e,{isPinch:!!e.isPinch})},dragStart:function(t,e){this.setTransform(t,e),Sn(t,"onBeforeRenderStart",this.fillDragStartParams(t,e))},drag:function(t,e){this.resetStyle(e),e.datas.nextStyle={},Sn(t,"onBeforeRender",mn(t,e,{isPinch:!!e.isPinch}))},dragEnd:function(t,e){Sn(t,"onBeforeRenderEnd",mn(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag}))},dragGroupStart:function(t,e){var r=this;this.dragStart(t,e);var n=Kn(t,"beforeRenderable",e),i=t.moveables,o=n.map((function(t,e){var n=i[e];return r.setTransform(n,t),r.fillDragStartParams(n,t)}));Sn(t,"onBeforeRenderGroupStart",mn(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,setTransform:function(){},events:o}))},dragGroup:function(t,e){var r=this;this.drag(t,e);var n=Kn(t,"beforeRenderable",e),i=t.moveables,o=n.map((function(t,n){var o=i[n];return r.resetStyle(t),e.datas.nextStyle={},r.fillDragParams(o,t)}));Sn(t,"onBeforeRenderGroup",mn(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,events:o}))},dragGroupEnd:function(t,e){this.dragEnd(t,e),Sn(t,"onBeforeRenderGroupEnd",mn(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets}))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)}},Vo={name:"renderable",props:{},events:{onRenderStart:"renderStart",onRender:"render",onRenderEnd:"renderEnd",onRenderGroupStart:"renderGroupStart",onRenderGroup:"renderGroup",onRenderGroupEnd:"renderGroupEnd"},dragRelation:"weak",dragStart:function(t,e){Sn(t,"onRenderStart",mn(t,e,{isPinch:!!e.isPinch}))},drag:function(t,e){Sn(t,"onRender",this.fillDragParams(t,e))},dragAfter:function(t,e){if(e.resultCount)return this.drag(t,e)},dragEnd:function(t,e){Sn(t,"onRenderEnd",this.fillDragEndParams(t,e))},dragGroupStart:function(t,e){Sn(t,"onRenderGroupStart",mn(t,e,{isPinch:!!e.isPinch,targets:t.props.targets}))},dragGroup:function(t,e){var r=this,n=Kn(t,"beforeRenderable",e),i=t.moveables,o=n.map((function(t,e){var n=i[e];return r.fillDragParams(n,t)}));Sn(t,"onRenderGroup",mn(t,e,Fe(Fe({isPinch:!!e.isPinch,targets:t.props.targets,transform:Ir(e)},vn(Ar(e))),{events:o})))},dragGroupEnd:function(t,e){var r=this,n=Kn(t,"beforeRenderable",e),i=t.moveables,o=n.map((function(t,e){var n=i[e];return r.fillDragEndParams(n,t)}));Sn(t,"onRenderGroupEnd",mn(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets,events:o}))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlAfter:function(t,e){return this.dragAfter(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)},fillDragParams:function(t,e){return mn(t,e,Fe({isPinch:!!e.isPinch,transform:Ir(e)},vn(Ar(e))))},fillDragEndParams:function(t,e){return mn(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag})}};function Yo(t,e,r,n,i,o,a){var s="Start"===i,u=t.state.target,c=o.isRequest;if(!u||s&&n.indexOf("Control")>-1&&!c&&t.areaElement===o.inputEvent.target)return!1;var l="".concat(r).concat(n).concat(i),f="".concat(r).concat(n,"Condition"),p="End"===i,d="After"===i,h=s&&(!t.targetGesto||!t.controlGesto||!t.targetGesto.isFlag()||!t.controlGesto.isFlag());h&&t.updateRect(i,!0,!1),""!==i||c||Mn(t.state,o);var g=__spreadArray([],t[e],!0);if(c){var v=o.requestAble;g.some((function(t){return t.name===v}))||g.push.apply(g,t.props.ables.filter((function(t){return t.name===v})))}if(!g.length||g.every((function(t){return t.dragRelation})))return!1;var y=__spreadArray(__spreadArray([Wo],g,!0),[Vo],!1).filter((function(t){return t[l]})),m=o.datas;h&&y.forEach((function(e){e.unset&&e.unset(t)}));var b,_=o.inputEvent;p&&_&&(b=document.elementFromPoint(o.clientX,o.clientY)||_.target);var S=0,w=!1,x=function(){var t;w=!0,null===(t=o.stop)||void 0===t||t.call(o)},E=y.filter((function(e){var r=e.name,n=m[r]||(m[r]={});if(s&&(n.isEventStart=!e[f]||e[f](t,o)),n.isEventStart){var i=e[l](t,Fe(Fe({},o),{stop:x,resultCount:S,datas:n,originalDatas:m,inputTarget:b}));return t._emitter.off(),s&&!1===i&&(n.isEventStart=!1),S+=i?1:0,i}return!1})).length,O=!1;if(s&&(w||y.length&&!E)&&(O=w||y.filter((function(t){var e=t.name;return!!m[e].isEventStart&&"strong"!==t.dragRelation})).length),(p||O)&&(t.state.gestos={},t.moveables&&t.moveables.forEach((function(t){t.state.gestos={}}))),h&&O&&y.forEach((function(e){e.unset&&e.unset(t)})),s&&!O&&!c&&E&&(null==o||o.preventDefault()),t.isUnmounted||O)return!1;(!s&&E&&!a||p)&&(t.props.flushSync||jr)((function(){t.updateRect(p?i:"",!0,!1),t.forceUpdate()}));return s||p||d||!E||a||Yo(t,e,r,n,i+"After",o),!0}function Xo(t){var e=t.props.dragTarget;return function(r){var n=r.inputEvent.target,i=t.areaElement;return e&&(n===e||e.contains(n))||n===i||!t.isMoveableElement(n)&&!t.controlBox.getElement().contains(n)||ut(n,"moveable-area")||ut(n,"moveable-padding")||ut(n,"moveable-edgeDraggable")}}function $o(t,e,r){var n=t.controlBox.getElement(),i=[],o=t.props.dragTarget;return i.push(n),t.props.dragArea&&!o||i.push(e),Jo(t,i,"targetAbles",r,{dragStart:Xo(t),pinchStart:Xo(t)})}function Jo(t,e,r,n,i){void 0===i&&(i={});var o="targetAbles"===r,a=t.props,s=a.pinchOutside,u=a.pinchThreshold,c=a.preventClickEventOnDrag,l=a.preventClickDefault,f=a.checkInput,p={preventDefault:!0,preventRightClick:!0,preventWheelClick:!0,container:window,pinchThreshold:u,pinchOutside:s,preventClickEventOnDrag:!!o&&c,preventClickEventOnDragStart:!!o&&l,preventClickEventByCondition:o?null:function(e){return t.controlBox.getElement().contains(e.target)},checkInput:!!o&&f},d=new Ae(e,p),h="Control"===n;return["drag","pinch"].forEach((function(e){["Start","","End"].forEach((function(o){d.on("".concat(e).concat(o),(function(a){var s,u=a.eventType;!i[u]||i[u](a)?Yo(t,r,e,n,o,a)?(t.props.stopPropagation||"Start"===o&&h)&&(null===(s=null==a?void 0:a.inputEvent)||void 0===s||s.stopPropagation()):a.stop():a.stop()}))}))})),d}var Zo=function(){function EventManager(t,e,r){var n=this;this.target=t,this.moveable=e,this.eventName=r,this.ables=[],this._onEvent=function(t){var e=n.eventName,r=n.moveable;r.state.disableNativeEvent||n.ables.forEach((function(n){n[e](r,{inputEvent:t})}))},t.addEventListener(r.toLowerCase(),this._onEvent)}var t=EventManager.prototype;return t.setAbles=function(t){this.ables=t},t.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},EventManager}();function Qo(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}function ta(t,e,r){for(var n,i,o,a,s,u=t,c=[],l=!r&&t===e||t===document.body,f=l,p=!1,d=3,h=!1,g=Gr(e,e,!0).offsetParent;u&&!f;){f=l;var v=getComputedStyle(u),y=v.position,m=Ur(u,v),b=(a=Nr(m),void 0===(s=void 0)&&(s=6===a.length),s?[a[0],a[1],0,a[2],a[3],0,a[4],a[5],1]:a),_="fixed"===y,S={hasTransform:!1,fixedContainer:null};_&&(h=!0,g=(S=Yr(u)).fixedContainer);var w=b.length;p||16!==w||(p=!0,d=4,Vr(c),o&&(o=mt(o,3,4))),p&&9===w&&(b=mt(b,3,4));var x=Hr(u,t,v),E=x.tagName,O=x.hasOffset,C=x.isSVG,k=x.origin,M=x.targetOrigin,D=x.offset,I=D[0],A=D[1];"svg"===E&&o&&(c.push({type:"target",target:u,matrix:Jr(u,d)}),c.push({type:"offset",target:u,matrix:Rt(d)}));var T=void 0,R=!1,B=!1;if(_)T=S.fixedContainer,R=!0;else{var P=Gr(u,e);if(T=P.offsetParent,R=P.isEnd,B=P.isStatic,Xe)if(P.parentSlotElement){for(var z=T,L=0,j=0;z&&Qo(z);)L+=z.offsetLeft,j+=z.offsetTop,z=z.offsetParent;I-=L,A-=j}}!Ve||$e||!O||C||!B||"relative"!==y&&"static"!==y||(I-=T.offsetLeft,A-=T.offsetTop,l=l||R);var N=0,K=0,q=0,F=0;if(_)O&&S.hasTransform&&(q=T.clientLeft,F=T.clientTop);else if(O&&g!==T&&(N=T.clientLeft,K=T.clientTop),O&&T===document.body){var U=Wr(u,!1,v);I+=U[0],A+=U[1]}if(c.push({type:"target",target:u,matrix:Kr(b,d,k)}),O){var G=u===t,H=G?0:u.scrollLeft,W=G?0:u.scrollTop;c.push({type:"offset",target:u,matrix:Pt([I-H+N-q,A-W+K-F],d)})}else c.push({type:"offset",target:u,origin:k});if(o||(o=b),n||(n=k),i||(i=M),f||_)break;u=T,l=R,r&&u!==document.body||(f=l)}return o||(o=Rt(d)),n||(n=[0,0]),i||(i=[0,0]),{offsetContainer:g,matrixes:c,targetMatrix:o,transformOrigin:n,targetOrigin:i,is3d:p,hasFixed:h}}function ea(t,e,r,n){var i;void 0===r&&(r=e);var o=ta(t,e),a=o.matrixes,s=o.is3d,u=o.targetMatrix,c=o.transformOrigin,l=o.targetOrigin,f=o.offsetContainer,p=o.hasFixed,d=ta(f,r,!0),h=d.matrixes,g=d.is3d,v=d.offsetContainer,y=n||g||s,m=y?4:3,b="svg"!==t.tagName.toLowerCase()&&"ownerSVGElement"in t,_=u,S=Rt(m),w=Rt(m),x=Rt(m),E=Rt(m),O=a.length;h.reverse(),a.reverse(),!s&&y&&(_=mt(_,3,4),Vr(a)),!g&&y&&Vr(h),h.forEach((function(t){w=_t(w,t.matrix,m)}));var C=r||document.body,k=(null===(i=h[0])||void 0===i?void 0:i.target)||Gr(C,C,!0).offsetParent,M=h.slice(1).reduce((function(t,e){return _t(t,e.matrix,m)}),Rt(m));a.forEach((function(t,e){if(O-2===e&&(x=S.slice()),O-1===e&&(E=S.slice()),!t.matrix){var r=function(t,e,r,n,i){var o,a=t.target,s=t.origin,u=e.matrix,c=cn(a),l=c.offsetWidth,f=c.offsetHeight,p=r.getBoundingClientRect(),d=[0,0];r===document.body&&(d=Wr(a,!0));for(var h=a.getBoundingClientRect(),g=h.left-p.left+r.scrollLeft-(r.clientLeft||0)+d[0],v=h.top-p.top+r.scrollTop-(r.clientTop||0)+d[1],y=h.width,m=h.height,b=bt(n,i,u),_=en(b,l,f,n),S=_.left,w=_.top,x=_.width,E=_.height,O=Zr(b,s,n),C=wt(O,[S,w]),k=[g+C[0]*y/x,v+C[1]*m/E],M=[0,0],D=0;++D<10;){var I=gt(i,n);o=wt(Zr(I,k,n),Zr(I,O,n)),M[0]=o[0],M[1]=o[1];var A=en(bt(n,i,Pt(M,n),u),l,f,n),T=A.left-g,R=A.top-v;if(Math.abs(T)<2&&Math.abs(R)<2)break;k[0]-=T,k[1]-=R}return M.map((function(t){return Math.round(t)}))}(t,a[e+1],k,m,_t(M,S,m));t.matrix=Pt(r,m)}S=_t(S,t.matrix,m)}));var D=!b&&s;_||(_=Rt(D?4:3));var I=Xr(b&&16===_.length?mt(_,4,3):_,D);return{hasFixed:p,rootMatrix:w=ht(w,m,m),beforeMatrix:x,offsetMatrix:E,allMatrix:S,targetMatrix:_,targetTransform:I,transformOrigin:c,targetOrigin:l,is3d:y,offsetContainer:f,offsetRootContainer:v}}function ra(t,e,r,n){void 0===r&&(r=e);var i=0,o=0,a=0,s={},u=cn(t);if(t&&(i=u.offsetWidth,o=u.offsetHeight),t){var c=ea(t,e,r,n),l=rn(c.allMatrix,c.transformOrigin,i,o);s=Fe(Fe({},c),l);var f=rn(c.allMatrix,[50,50],100,100);a=ln([f.pos1,f.pos2],f.direction)}var p=n?4:3;return Fe(Fe(Fe({width:i,height:o,rotation:a},u),{rootMatrix:Rt(p),beforeMatrix:Rt(p),offsetMatrix:Rt(p),allMatrix:Rt(p),targetMatrix:Rt(p),targetTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!n,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null}),s)}function na(t,e,r,n,i){var o=1,a=[0,0],s={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},u={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},c={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},l={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},f=ra(e,r,i,!0);if(e){var p=f.is3d?4:3,d=rn(f.offsetMatrix,St(f.transformOrigin,vt(f.targetMatrix,p)),f.width,f.height);o=d.direction,a=St(d.origin,[d.left-f.left,d.top-f.top]),s=fn(e),c=fn(Gr(n,n,!0).offsetParent||f.offsetRootContainer,!0),l=fn(f.offsetRootContainer),t&&(u=fn(t))}return Fe({targetClientRect:s,containerClientRect:c,moveableClientRect:u,rootContainerClientRect:l,beforeDirection:o,beforeOrigin:a,originalBeforeOrigin:a,target:e},f)}var ia=function(t){function MoveableManager(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=Fe({container:null,gestos:{},renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1},na(null)),e.renderState={},e.enabledAbles=[],e.targetAbles=[],e.controlAbles=[],e.rotation=0,e.scale=[1,1],e.isUnmounted=!1,e.events={mouseEnter:null,mouseLeave:null},e._emitter=new ce,e._prevTarget=null,e._prevDragArea=!1,e._isPropTargetChanged=!1,e._observer=null,e._observerId=0,e.checkUpdateRect=function(){if(!e.isDragging()){var t=e.props.parentMoveable;t?t.checkUpdateRect():(J(e._observerId),e._observerId=$((function(){e.isDragging()||e.updateRect()})))}},e._onPreventClick=function(t){t.stopPropagation(),t.preventDefault()},e}qe(MoveableManager,t);var e=MoveableManager.prototype;return e.render=function(){var t=this.props,e=this.getState(),r=t.parentPosition,n=t.className,i=t.target,o=t.zoom,a=t.cspNonce,s=t.translateZ,u=t.cssStyled,c=t.portalContainer,l=t.groupable;this.checkUpdate(),this.updateRenderPoses();var f=r||[0,0],p=f[0],d=f[1],h=e.left,g=e.top,v=e.target,y=e.direction,m=e.hasFixed,b=t.targets,_=(b&&b.length||i)&&(v||l),S=this.isDragging(),x={};return this.getEnabledAbles().forEach((function(t){x["data-able-".concat(t.name.toLowerCase())]=!0})),_e.createElement(u,Fe({cspNonce:a,ref:w(this,"controlBox"),className:"".concat(Lr("control-box",-1===y?"reverse":"",S?"dragging":"")," ").concat(n)},x,{onClick:this._onPreventClick,portalContainer:c,style:{position:m?"fixed":"absolute",display:_?"block":"none",transform:"translate3d(".concat(h-p,"px, ").concat(g-d,"px, ").concat(s,")"),"--zoom":o,"--zoompx":"".concat(o,"px")}}),this.renderAbles(),this._renderLines())},e.componentDidMount=function(){this.isUnmounted=!1,this.controlBox.getElement();var t=this.props,e=t.parentMoveable,r=t.container,n=t.wrapperMoveable;this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),r||e||n||this.updateRect("",!1,!0),this.updateCheckInput(),this._updateObserver(this.props)},e.componentDidUpdate=function(t){this._updateNativeEvents(),this._updateEvents(),this._updateTargets(),this.updateCheckInput(),this._updateObserver(t)},e.componentWillUnmount=function(){this.isUnmounted=!0,this._emitter.off(),gn(this,"targetGesto"),gn(this,"controlGesto");var t=this.events;for(var e in t){var r=t[e];r&&r.destroy()}},e.getAble=function(t){return X(this.props.ables||[],(function(e){return e.name===t}))},e.getContainer=function(){var t=this.props,e=t.parentMoveable,r=t.wrapperMoveable;return t.container||r&&r.getContainer()||e&&e.getContainer()||this.controlBox.getElement().parentElement},e.isMoveableElement=function(t){var e;return t&&((null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"class"))||"").indexOf(Je)>-1},e.dragStart=function(t){var e=this.targetGesto,r=this.controlGesto;return e&&Xo(this)({inputEvent:t})?e.isFlag()||e.triggerDragStart(t):r&&this.isMoveableElement(t.target)&&(r.isFlag()||r.triggerDragStart(t)),this},e.hitTest=function(t){var e,r=this.state,n=r.target,i=r.pos1,o=r.pos2,a=r.pos3,s=r.pos4,u=r.targetClientRect;if(!n)return 0;if(t instanceof Element){var c=t.getBoundingClientRect();e={left:c.left,top:c.top,width:c.width,height:c.height}}else e=Fe({width:0,height:0},t);var l=e.left,f=e.top,p=e.width,d=e.height,h=te([i,o,s,a],u),g=ue(h,[[l,f],[l+p,f],[l+p,f+d],[l,f+d]]),v=Qt(h);return g&&v?Math.min(100,g/v*100):0},e.isInside=function(t,e){var r=this.state,n=r.target,i=r.pos1,o=r.pos2,a=r.pos3,s=r.pos4,u=r.targetClientRect;return!!n&&re([t,e],te([i,o,s,a],u))},e.updateRect=function(t,e,r){void 0===r&&(r=!0);var n=this.props,i=n.parentMoveable,o=this.state.target||this.props.target,a=this.getContainer(),s=i?i.props.rootContainer:n.rootContainer;this.updateState(na(this.controlBox&&this.controlBox.getElement(),o,a,a,s||a),!i&&r)},e.isDragging=function(){return!!this.targetGesto&&this.targetGesto.isFlag()||!!this.controlGesto&&this.controlGesto.isFlag()},e.updateTarget=function(t){this.updateRect(t,!0)},e.getRect=function(){var t=this.state,e=hn(this.state),r=e[0],n=e[1],i=e[2],o=e[3],a=tn(e),s=t.width,u=t.height,c=a.width,l=a.height,f=a.left,p=a.top,d=[t.left,t.top],h=St(d,t.origin);return{width:c,height:l,left:f,top:p,pos1:r,pos2:n,pos3:i,pos4:o,offsetWidth:s,offsetHeight:u,beforeOrigin:St(d,t.beforeOrigin),origin:h,transformOrigin:t.transformOrigin,rotation:this.getRotation()}},e.getManager=function(){return this},e.getRotation=function(){var t=this.state;return function(t,e,r){var n=nt(t,e)/Math.PI*180;return(n=r>=0?n:180-n)>=0?n:360+n}(t.pos1,t.pos2,t.direction)},e.request=function(t,e,r){void 0===e&&(e={});var n=this.props,i=n.ables,o=n.groupable,a=i.filter((function(e){return e.name===t}))[0];if(this.isDragging()||!a||!a.request)return{request:function(){return this},requestEnd:function(){return this}};var s=this,u=a.request(this),c=r||e.isInstant,l=u.isControl?"controlAbles":"targetAbles",f="".concat(o?"Group":"").concat(u.isControl?"Control":""),p={request:function(e){return Yo(s,l,"drag",f,"",Fe(Fe({},u.request(e)),{requestAble:t,isRequest:!0}),c),this},requestEnd:function(){return Yo(s,l,"drag",f,"End",Fe(Fe({},u.requestEnd()),{requestAble:t,isRequest:!0}),c),this}};return Yo(s,l,"drag",f,"Start",Fe(Fe({},u.requestStart(e)),{requestAble:t,isRequest:!0}),c),c?p.request(e).requestEnd():p},e.destroy=function(){this.componentWillUnmount()},e.updateRenderPoses=function(){var t=this.getState(),e=this.props,r=t.originalBeforeOrigin,n=t.transformOrigin,i=t.allMatrix,o=t.is3d,a=t.pos1,s=t.pos2,u=t.pos3,c=t.pos4,l=t.left,f=t.top,p=e.padding||{},d=p.left,h=void 0===d?0:d,g=p.top,v=void 0===g?0:g,y=p.bottom,m=void 0===y?0:y,b=p.right,_=void 0===b?0:b,S=o?4:3,w=this.controlBox&&e.groupable?r:St(r,[l,f]);t.renderPoses=[St(a,Dn(i,[-h,-v],n,w,S)),St(s,Dn(i,[_,-v],n,w,S)),St(u,Dn(i,[-h,m],n,w,S)),St(c,Dn(i,[_,m],n,w,S))]},e.checkUpdate=function(){this._isPropTargetChanged=!1;var t=this.props,e=t.target,r=t.container,n=t.parentMoveable,i=this.state,o=i.target,a=i.container;if(o||e){this.updateAbles();var s=!En(o,e);if(s||!En(a,r)){var u=r||this.controlBox;u&&this.unsetAbles(),this.updateState({target:e,container:r}),!n&&u&&this.updateRect("End",!1,!1),this._isPropTargetChanged=s}}},e.waitToChangeTarget=function(){return new Promise((function(){}))},e.triggerEvent=function(t,e){this._emitter.trigger(t,e);var r=this.props[t];return r&&r(e)},e.useCSS=function(t,e){var r=this.props.customStyledMap,n=t+e;return r[n]||(r[n]=Ne(t,e)),r[n]},e.getState=function(){var t=this.props.firstRenderState;return t&&!this.controlBox?t:this.state},e.updateSelectors=function(){},e.unsetAbles=function(){var t=this;this.targetAbles.forEach((function(e){e.unset&&e.unset(t)}))},e.updateAbles=function(t,e){void 0===t&&(t=this.props.ables),void 0===e&&(e="");var r=this.props,n=r.triggerAblesSimultaneously,i=t.filter((function(t){return t&&(t.always&&!1!==r[t.name]||r[t.name])})),o="drag".concat(e,"Start"),a="pinch".concat(e,"Start"),s="drag".concat(e,"ControlStart"),u=xn(i,[o,a],n),c=xn(i,[s],n);this.enabledAbles=i,this.targetAbles=u,this.controlAbles=c},e.updateState=function(t,e){if(e){if(this.isUnmounted)return;this.setState(t)}else{var r=this.state;for(var n in t)r[n]=t[n]}},e.getEnabledAbles=function(){var t=this.props;return t.ables.filter((function(e){return e&&t[e.name]}))},e.renderAbles=function(){var t,e,r,n,i=this,o=this.props.triggerAblesSimultaneously,a={createElement:_e.createElement};return this.renderState={},(t=On(xn(this.getEnabledAbles(),["render"],o).map((function(t){return(0,t.render)(i,a)||[]}))).filter((function(t){return t})),e=function(t){return t.key},r=[],n={},t.forEach((function(i,o){var a=e(i,o,t),s=n[a];s||(s=[],n[a]=s,r.push(s)),s.push(i)})),r).map((function(t){return t[0]}))},e.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},e._updateObserver=function(t){var e,r=this.props,n=r.target;if(window.ResizeObserver&&n&&r.useResizeObserver){if(t.target!==n||!this._observer){var i=new ResizeObserver(this.checkUpdateRect);i.observe(n,{box:"border-box"}),this._observer=i}}else null===(e=this._observer)||void 0===e||e.disconnect()},e._updateEvents=function(){var t=this.controlBox.getElement(),e=this.targetAbles.length,r=this.controlAbles.length,n=this.props,i=n.dragTarget||n.target;(!e&&this.targetGesto||this._isTargetChanged(!0))&&(gn(this,"targetGesto"),this.updateState({gesto:null})),r||gn(this,"controlGesto"),i&&e&&!this.targetGesto&&(this.targetGesto=$o(this,i,"")),!this.controlGesto&&r&&(this.controlGesto=Jo(this,t,"controlAbles","Control"))},e._updateTargets=function(){var t=this.props;this._prevTarget=t.dragTarget||t.target,this._prevDragArea=t.dragArea},e._renderLines=function(){var t=this.props,e=t.zoom,r=t.hideDefaultLines,n=t.hideChildMoveableDefaultLines,i=t.parentMoveable;if(r||i&&n)return[];var o=this.getState().renderPoses,a={createElement:_e.createElement};return[[0,1],[1,3],[3,2],[2,0]].map((function(t,r){var n=t[0],i=t[1];return Hi(a,"",o[n],o[i],e,"render-line-".concat(r))}))},e._isTargetChanged=function(t){var e=this.props,r=e.dragTarget||e.target,n=this._prevTarget,i=this._prevDragArea,o=e.dragArea;return!o&&n!==r||(t||o)&&i!==o},e._updateNativeEvents=function(){var t=this,e=this.props.dragArea?this.areaElement:this.state.target,r=this.events,n=Z(r);if(this._isTargetChanged())for(var i in r){var o=r[i];o&&o.destroy(),r[i]=null}if(e){var a=this.enabledAbles;n.forEach((function(n){var i=xn(a,[n]),o=i.length>0,s=r[n];o?(s||(s=new Zo(e,t,n),r[n]=s),s.setAbles(i)):s&&(s.destroy(),r[n]=null)}))}},MoveableManager.defaultProps={target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,parentPosition:null,portalContainer:null,useResizeObserver:!1,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:jr,firstRenderState:null},MoveableManager}(_e.PureComponent),oa={name:"groupable",props:{defaultGroupRotate:Number,defaultGroupOrigin:String,groupable:Boolean,targetGroups:Object,hideChildMoveableDefaultLines:Boolean},events:{},render:function(t,e){var r=t.props.targets||[];t.moveables=[];var n=t.state,i=[n.left,n.top],o=t.props,a=o.zoom||1,s=t.renderGroupRects;return __spreadArray(__spreadArray([],r.map((function(r,n){return e.createElement(ia,{key:"moveable"+n,ref:x(t,"moveables",n),target:r,origin:!1,cssStyled:o.cssStyled,customStyledMap:o.customStyledMap,useResizeObserver:o.useResizeObserver,hideChildMoveableDefaultLines:o.hideChildMoveableDefaultLines,parentMoveable:t,parentPosition:i,zoom:a})})),!0),On(s.map((function(t,r){var n=[t.pos1,t.pos2,t.pos3,t.pos4];return[[0,1],[1,3],[3,2],[2,0]].map((function(t,o){var s=t[0],u=t[1];return Hi(e,"",wt(n[s],i),wt(n[u],i),a,"group-rect-".concat(r,"-").concat(o))}))}))),!0)}},aa=Ue("clickable",{props:{clickable:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(t,e){e.datas.inputTarget=e.inputEvent&&e.inputEvent.target},dragEnd:function(t,e){var r=t.props.target,n=e.inputEvent,i=e.inputTarget,o=!t.isMoveableElement(i)&&t.controlBox.getElement().contains(i);if(n&&i&&!e.isDrag&&!t.isMoveableElement(i)&&!o){var a=r.contains(i);Sn(t,"onClick",mn(t,e,{isDouble:e.isDouble,inputTarget:i,isTarget:r===i,moveableTarget:t.props.target,containsTarget:a}))}},dragGroupEnd:function(t,e){var r=e.inputEvent,n=e.inputTarget;if(r&&n&&!e.isDrag&&!t.isMoveableElement(n)&&e.datas.inputTarget!==n){var i=t.props.targets,o=i.indexOf(n),a=o>-1,s=!1;-1===o&&(s=(o=Y(i,(function(t){return t.contains(n)})))>-1),Sn(t,"onClickGroup",mn(t,e,{isDouble:e.isDouble,targets:i,inputTarget:n,targetIndex:o,isTarget:a,containsTarget:s,moveableTarget:i[o]}))}},dragControlEnd:function(t,e){this.dragEnd(t,e)},dragGroupControlEnd:function(t,e){this.dragEnd(t,e)}});function sa(t){var e=t.originalDatas.draggable;return e||(t.originalDatas.draggable={},e=t.originalDatas.draggable),Fe(Fe({},t),{datas:e})}var ua=Ue("edgeDraggable",{css:[".edge.edgeDraggable.line {\n    cursor: move;\n}"],render:function(t,e){var r=t.props,n=r.edgeDraggable;return n?Wi(e,"edgeDraggable",n,t.getState().renderPoses,r.zoom):[]},dragControlCondition:function(t,e){if(!t.props.edgeDraggable||!e.inputEvent)return!1;var r=e.inputEvent.target;return ut(r,Lr("direction"))&&ut(r,Lr("edge"))&&ut(r,Lr("edgeDraggable"))},dragControlStart:function(t,e){return t.state.snapRenderInfo={request:e.isRequest,snap:!0,center:!0},Xi.dragStart(t,sa(e))},dragControl:function(t,e){return Xi.drag(t,sa(e))},dragControlEnd:function(t,e){return Xi.dragEnd(t,sa(e))},dragGroupControlCondition:function(t,e){if(!t.props.edgeDraggable||!e.inputEvent)return!1;var r=e.inputEvent.target;return ut(r,Lr("direction"))&&ut(r,Lr("line"))},dragGroupControlStart:function(t,e){return Xi.dragGroupStart(t,sa(e))},dragGroupControl:function(t,e){return Xi.dragGroup(t,sa(e))},dragGroupControlEnd:function(t,e){return Xi.dragGroupEnd(t,sa(e))},unset:function(t){return Xi.unset(t)}}),ca={name:"individualGroupable",props:{individualGroupable:Boolean},events:{}},la=[Wo,So,Fi,Nn,Xi,ua,Ji,so,lo,oo,_o,wo,mo,Fo,qo,Ho,oa,ca,aa,yo,Vo],fa=la.reduce((function(t,e){return Fe(Fe({},t),"events"in e?e.events:{})}),{}),pa=la.reduce((function(t,e){return Fe(Fe({},t),e.props)}),{}),da=Rn(fa);Object.keys(da),Object.keys(pa);function ha(t,e){var r=t[0],n=t[1],i=t[2];return(r*e[0]+n*e[1]+i)/Math.sqrt(r*r+n*n)}function ga(t,e){var r=t[0],n=t[1];return-r*e[0]-n*e[1]}function va(t,e){return Math.max.apply(Math,t.map((function(t){var r=t[0],n=t[1],i=t[2],o=t[3];return Math.max(r[e],n[e],i[e],o[e])})))}function ya(t,e){return Math.min.apply(Math,t.map((function(t){var r=t[0],n=t[1],i=t[2],o=t[3];return Math.min(r[e],n[e],i[e],o[e])})))}function ma(t,e){var r=e.map((function(e){if(z(e)){var r=ma(t,e),n=r.length;return n>1?r:1===n?r[0]:null}var i=X(t,(function(t){return t.manager.props.target===e}));return i?(i.finded=!0,i.manager):null})).filter(Boolean);return 1===r.length&&z(r[0])?r[0]:r}var ba=function(t){function MoveableGroup(){var e=null!==t&&t.apply(this,arguments)||this;return e.differ=new $t,e.moveables=[],e.transformOrigin="50% 50%",e.renderGroupRects=[],e}qe(MoveableGroup,t);var e=MoveableGroup.prototype;return e.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},e.updateRect=function(t,e,r){if(void 0===r&&(r=!0),this.controlBox){this.moveables.forEach((function(e){e.updateRect(t,!1,!1)}));var n=this.state,i=this.props,o=this.moveables,a=n.target||i.target,s=o.map((function(t){return{finded:!1,manager:t}})),u=ma(s,this.props.targetGroups||[]);u.push.apply(u,s.filter((function(t){return!t.finded})).map((function(t){return t.manager})));var c=[],l=!e||""!==t&&i.updateGroup,f=function t(e,r,n){var o=e.map((function(e){if(z(e)){var n=t(e,r),i=[n.pos1,n.pos2,n.pos3,n.pos4];return c.push(n),{poses:i,rotation:n.rotation}}return{poses:hn(e.state),rotation:e.getRotation()}})),a=o.map((function(t){return t.rotation})),s=0,u=a[0],f=a.every((function(t){return Math.abs(u-t)<.1}));s=l?f?u:i.defaultGroupRotate||0:!n&&f?u:r;var p=o.map((function(t){return t.poses})),d=function(t,e){var r,n=[0,0],i=[0,0],o=[0,0],a=[0,0],s=0,u=0;if(!t.length)return{pos1:n,pos2:i,pos3:o,pos4:a,minX:0,minY:0,width:s,height:u,rotation:e};var c=at(e,er);if(c%90){var l=c/180*Math.PI,f=Math.tan(l),p=-1/f,d=[nr,ir],h=[[0,0],[0,0]],g=[nr,ir],v=[[0,0],[0,0]];t.forEach((function(t){t.forEach((function(t){var e=ha([-f,1,0],t),r=ha([-p,1,0],t);d[0]>e&&(h[0]=t,d[0]=e),d[1]<e&&(h[1]=t,d[1]=e),g[0]>r&&(v[0]=t,g[0]=r),g[1]<r&&(v[1]=t,g[1]=r)}))}));var y=h[0],m=h[1],b=v[0],_=v[1],S=[-f,1,ga([-f,1],y)],w=[-f,1,ga([-f,1],m)],x=[-p,1,ga([-p,1],b)],E=[-p,1,ga([-p,1],_)];n=(r=[[S,x],[S,E],[w,x],[w,E]].map((function(t){return ie(t[0],t[1])[0]})))[0],i=r[1],o=r[2],a=r[3],s=g[1]-g[0],u=d[1]-d[0]}else{var O,C=ya(t,0),k=ya(t,1),M=va(t,0),D=va(t,1);n=[C,k],i=[M,k],o=[C,D],a=[M,D],s=M-C,u=D-k,c%180&&(n=(O=[o,n,a,i])[0],i=O[1],o=O[2],a=O[3],s=D-k,u=M-C)}c%360>180&&(n=(O=[a,o,i,n])[0],i=O[1],o=O[2],a=O[3]);var I=ee([n,i,o,a]);return{pos1:n,pos2:i,pos3:o,pos4:a,width:s,height:u,minX:I.minX,minY:I.minY,rotation:e}}(p,s);return d}(u,this.rotation,!0);l&&(this.rotation=f.rotation,this.transformOrigin=i.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this.renderGroupRects=c;var p=this.rotation,d=this.scale,h=f.width,g=f.height,v=f.minX,y=f.minY,m="rotate(".concat(p,"deg) scale(").concat(d[0]>=0?1:-1,", ").concat(d[1]>=0?1:-1,")");a.style.cssText+="left:0px;top:0px; transform-origin: ".concat(this.transformOrigin,"; width:").concat(h,"px; height:").concat(g,"px;")+"transform:".concat(m),n.width=h,n.height=g;var b=this.getContainer(),_=na(this.controlBox.getElement(),a,this.controlBox.getElement(),this.getContainer(),this.props.rootContainer||b),S=[_.left,_.top],w=hn(_),x=w[0],E=w[1],O=w[2],C=w[3],k=ee([x,E,O,C]),M=[k.minX,k.minY];_.pos1=wt(x,M),_.pos2=wt(E,M),_.pos3=wt(O,M),_.pos4=wt(C,M),_.left=v-_.left+M[0],_.top=y-_.top+M[1],_.origin=wt(St(S,_.origin),M),_.beforeOrigin=wt(St(S,_.beforeOrigin),M),_.originalBeforeOrigin=St(S,_.originalBeforeOrigin);var D=_.targetClientRect,I=d[0]*d[1]>0?1:-1;D.top+=_.top-n.top,D.left+=_.left-n.left,a.style.transform="translate(".concat(-M[0],"px, ").concat(-M[1],"px) ").concat(m),this.updateState(Fe(Fe({},_),{direction:I,beforeDirection:I}),r)}},e.getRect=function(){return Fe(Fe({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.triggerEvent=function(e,r,n){if(n||e.indexOf("Group")>-1)return t.prototype.triggerEvent.call(this,e,r);this._emitter.trigger(e,r)},e.updateAbles=function(){t.prototype.updateAbles.call(this,__spreadArray(__spreadArray([],this.props.ables,!0),[oa],!1),"Group")},e._updateTargets=function(){t.prototype._updateTargets.call(this),this._prevTarget=this.props.dragTarget||this.areaElement},e._updateEvents=function(){var t=this.state,e=this.props,r=this._prevTarget,n=e.dragTarget||this.areaElement;r!==n&&(gn(this,"targetGesto"),gn(this,"controlGesto"),t.target=null),t.target||(t.target=this.areaElement,this.controlBox.getElement().style.display="block"),t.target&&(this.targetGesto||(this.targetGesto=$o(this,n,"Group")),this.controlGesto||(this.controlGesto=Jo(this,this.controlBox.getElement(),"controlAbles","GroupControl")));var i=!En(t.container,e.container);i&&(t.container=e.container);var o=this.differ.update(e.targets),a=o.added,s=o.changed,u=o.removed,c=a.length||u.length;(i||c||s.length)&&this.updateRect(),this._isPropTargetChanged=!!c},e._updateObserver=function(){},MoveableGroup.defaultProps=Fe(Fe({},ia.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),MoveableGroup}(ia),_a=function(t){function MoveableIndividualGroup(){var e=null!==t&&t.apply(this,arguments)||this;return e.moveables=[],e}qe(MoveableIndividualGroup,t);var e=MoveableIndividualGroup.prototype;return e.render=function(){var t=this,e=this.props,r=e.cspNonce,n=e.cssStyled,i=e.targets;return _e.createElement(n,{cspNonce:r,ref:w(this,"controlBox"),className:Lr("control-box")},i.map((function(e,r){return _e.createElement(ia,Fe({key:"moveable"+r,ref:x(t,"moveables",r)},t.props,{target:e,wrapperMoveable:t}))})))},e.componentDidUpdate=function(){},e.updateRect=function(t,e,r){void 0===r&&(r=!0),this.moveables.forEach((function(n){n.updateRect(t,e,r)}))},e.getRect=function(){return Fe(Fe({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.request=function(){return{request:function(){return this},requestEnd:function(){return this}}},e.dragStart=function(){return this},e.hitTest=function(){return 0},e.isInside=function(){return!1},e.isDragging=function(){return!1},e.updateRenderPoses=function(){},e.checkUpdate=function(){},e.triggerEvent=function(){},e.updateAbles=function(){},e._updateEvents=function(){},e._updateObserver=function(){},MoveableIndividualGroup}(ia);function Sa(t,e){var r=[];return t.forEach((function(t){t&&(L(t)?e[t]&&r.push.apply(r,e[t]):z(t)?r.push.apply(r,Sa(t,e)):r.push(t))})),r}function wa(t,e){var r=[];return t.forEach((function(t){t&&(L(t)?e[t]&&r.push.apply(r,e[t]):z(t)?r.push(wa(t,e)):r.push(t))})),r}function xa(t,e){return t.length!==e.length||t.some((function(t,r){var n=e[r];return!(!t&&!n)&&(t!=n&&(!z(t)||!z(n)||xa(t,n)))}))}var Oa=function(t){function InitialMoveable(){var e=null!==t&&t.apply(this,arguments)||this;return e.refTargets=[],e.selectorMap={},e._differ=new $t,e._elementTargets=[],e._onChangetarget=null,e}qe(InitialMoveable,t);var e,r,n=InitialMoveable.prototype;return InitialMoveable.makeStyled=function(){var t={};this.getTotalAbles().forEach((function(e){var r=e.css;r&&r.forEach((function(e){t[e]=!0}))}));var e=Z(t).join("\n");this.defaultStyled=Ne("div",function(t,e){return e.replace(/([^}{]*){/gm,(function(e,r){return r.replace(/\.([^{,\s\d.]+)/g,"."+t+"$1")+"{"}))}(Je,Ze+e))},InitialMoveable.getTotalAbles=function(){return __spreadArray([So,oa,ca,yo],this.defaultAbles,!0)},n.render=function(){var t=this.constructor;t.defaultStyled||t.makeStyled();var e=this.props,r=e.ables,n=e.props,i=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(e,["ables","props"]),o=this._updateRefs(!0),a=Sa(o,this.selectorMap),s=a.length>1,u=__spreadArray(__spreadArray([],t.getTotalAbles(),!0),r||[],!0),c=Fe(Fe(Fe({},i),n||{}),{ables:u,cssStyled:t.defaultStyled,customStyledMap:t.customStyledMap});if(this._elementTargets=a,s){if(i.individualGroupable)return _e.createElement(_a,Fe({key:"individual-group",ref:w(this,"moveable")},c,{target:null,targets:a}));var l=wa(o,this.selectorMap),f=null,p=this.moveable;if(p&&!p.props.groupable&&!p.props.individualGroupable){var d=p.props.target;d&&a.indexOf(d)>-1&&(f=Fe({},p.state))}return _e.createElement(ba,Fe({key:"group",ref:w(this,"moveable")},c,{target:null,targets:a,targetGroups:l,firstRenderState:f}))}return _e.createElement(ia,Fe({key:"single",ref:w(this,"moveable")},c,{target:a[0]}))},n.componentDidMount=function(){this._updateRefs()},n.componentDidUpdate=function(){var t=this._differ.update(this._elementTargets),e=t.added,r=t.removed;(e.length||r.length)&&this._onChangetarget&&this._onChangetarget(),this._updateRefs()},n.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},n.updateSelectors=function(){this.selectorMap={},this._updateRefs()},n.waitToChangeTarget=function(){var t,e=this;return this._onChangetarget=function(){e._onChangetarget=null,t()},new Promise((function(e){t=e}))},n.getManager=function(){return this.moveable},n._updateRefs=function(t){var e=this.refTargets,r=Pn(this.props.target||this.props.targets),n="undefined"!=typeof document,i=xa(e,r),o=this.selectorMap,a={};return this.refTargets.forEach((function t(e){L(e)?o[e]?a[e]=o[e]:n&&(i=!0,a[e]=[].slice.call(document.querySelectorAll(e))):z(e)&&e.forEach(t)})),this.refTargets=r,this.selectorMap=a,!t&&i&&this.forceUpdate(),r},InitialMoveable.defaultAbles=[],InitialMoveable.customStyledMap={},InitialMoveable.defaultStyled=null,function __decorate(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}([(e=lr,void 0===r&&(r={}),function(t,n){e.forEach((function(e){var i=r[e]||e;i in t||(t[i]=function(){for(var t,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=(t=this[n])[e].apply(t,r);return o===this[n]?this:o})}))})],InitialMoveable.prototype,"moveable",void 0),InitialMoveable}(_e.PureComponent),ka=function(t){function Moveable(){return null!==t&&t.apply(this,arguments)||this}return qe(Moveable,t),Moveable.defaultAbles=la,Moveable}(Oa)},67294:(t,e,r)=>{"use strict";t.exports=r(72408)},76826:t=>{var e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",ß:"ss",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},r=Object.keys(e).join("|"),n=new RegExp(r,"g"),i=new RegExp(r,"");function o(t){return e[t]}var a=function(t){return t.replace(n,o)};t.exports=a,t.exports.has=function(t){return!!t.match(i)},t.exports.remove=a},63594:function(t,e,r){var n,i;!function(o,a){"use strict";void 0===(i="function"==typeof(n=function(){var t={};function Vector(t,e){this.x=t||0,this.y=e||0}function Circle(t,e){this.pos=t||new Vector,this.r=e||0,this.offset=new Vector}function Polygon(t,e){this.pos=t||new Vector,this.angle=0,this.offset=new Vector,this.setPoints(e||[])}function Box(t,e,r){this.pos=t||new Vector,this.w=e||0,this.h=r||0}function Response(){this.a=null,this.b=null,this.overlapN=new Vector,this.overlapV=new Vector,this.clear()}t.Vector=Vector,t.V=Vector,Vector.prototype.copy=Vector.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Vector.prototype.clone=Vector.prototype.clone=function(){return new Vector(this.x,this.y)},Vector.prototype.perp=Vector.prototype.perp=function(){var t=this.x;return this.x=this.y,this.y=-t,this},Vector.prototype.rotate=Vector.prototype.rotate=function(t){var e=this.x,r=this.y;return this.x=e*Math.cos(t)-r*Math.sin(t),this.y=e*Math.sin(t)+r*Math.cos(t),this},Vector.prototype.reverse=Vector.prototype.reverse=function(){return this.x=-this.x,this.y=-this.y,this},Vector.prototype.normalize=Vector.prototype.normalize=function(){var t=this.len();return t>0&&(this.x=this.x/t,this.y=this.y/t),this},Vector.prototype.add=Vector.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Vector.prototype.sub=Vector.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Vector.prototype.scale=Vector.prototype.scale=function(t,e){return this.x*=t,this.y*=void 0!==e?e:t,this},Vector.prototype.project=Vector.prototype.project=function(t){var e=this.dot(t)/t.len2();return this.x=e*t.x,this.y=e*t.y,this},Vector.prototype.projectN=Vector.prototype.projectN=function(t){var e=this.dot(t);return this.x=e*t.x,this.y=e*t.y,this},Vector.prototype.reflect=Vector.prototype.reflect=function(t){var e=this.x,r=this.y;return this.project(t).scale(2),this.x-=e,this.y-=r,this},Vector.prototype.reflectN=Vector.prototype.reflectN=function(t){var e=this.x,r=this.y;return this.projectN(t).scale(2),this.x-=e,this.y-=r,this},Vector.prototype.dot=Vector.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Vector.prototype.len2=Vector.prototype.len2=function(){return this.dot(this)},Vector.prototype.len=Vector.prototype.len=function(){return Math.sqrt(this.len2())},t.Circle=Circle,Circle.prototype.getAABBAsBox=Circle.prototype.getAABBAsBox=function(){var t=this.r;return new Box(this.pos.clone().add(this.offset).sub(new Vector(t,t)),2*t,2*t)},Circle.prototype.getAABB=Circle.prototype.getAABB=function(){return this.getAABBAsBox().toPolygon()},Circle.prototype.setOffset=Circle.prototype.setOffset=function(t){return this.offset=t,this},t.Polygon=Polygon,Polygon.prototype.setPoints=Polygon.prototype.setPoints=function(t){if(!this.points||this.points.length!==t.length){var e,r=this.calcPoints=[],n=this.edges=[],i=this.normals=[];for(e=0;e<t.length;e++){var o=t[e],a=e<t.length-1?t[e+1]:t[0];o===a||o.x!==a.x||o.y!==a.y?(r.push(new Vector),n.push(new Vector),i.push(new Vector)):(t.splice(e,1),e-=1)}}return this.points=t,this._recalc(),this},Polygon.prototype.setAngle=Polygon.prototype.setAngle=function(t){return this.angle=t,this._recalc(),this},Polygon.prototype.setOffset=Polygon.prototype.setOffset=function(t){return this.offset=t,this._recalc(),this},Polygon.prototype.rotate=Polygon.prototype.rotate=function(t){for(var e=this.points,r=e.length,n=0;n<r;n++)e[n].rotate(t);return this._recalc(),this},Polygon.prototype.translate=Polygon.prototype.translate=function(t,e){for(var r=this.points,n=r.length,i=0;i<n;i++)r[i].x+=t,r[i].y+=e;return this._recalc(),this},Polygon.prototype._recalc=function(){var t,e=this.calcPoints,r=this.edges,n=this.normals,i=this.points,o=this.offset,a=this.angle,s=i.length;for(t=0;t<s;t++){var u=e[t].copy(i[t]);u.x+=o.x,u.y+=o.y,0!==a&&u.rotate(a)}for(t=0;t<s;t++){var c=e[t],l=t<s-1?e[t+1]:e[0],f=r[t].copy(l).sub(c);n[t].copy(f).perp().normalize()}return this},Polygon.prototype.getAABBAsBox=Polygon.prototype.getAABBAsBox=function(){for(var t=this.calcPoints,e=t.length,r=t[0].x,n=t[0].y,i=t[0].x,o=t[0].y,a=1;a<e;a++){var s=t[a];s.x<r?r=s.x:s.x>i&&(i=s.x),s.y<n?n=s.y:s.y>o&&(o=s.y)}return new Box(this.pos.clone().add(new Vector(r,n)),i-r,o-n)},Polygon.prototype.getAABB=Polygon.prototype.getAABB=function(){return this.getAABBAsBox().toPolygon()},Polygon.prototype.getCentroid=Polygon.prototype.getCentroid=function(){for(var t=this.calcPoints,e=t.length,r=0,n=0,i=0,o=0;o<e;o++){var a=t[o],s=o===e-1?t[0]:t[o+1],u=a.x*s.y-s.x*a.y;r+=(a.x+s.x)*u,n+=(a.y+s.y)*u,i+=u}return new Vector(r/=i*=3,n/=i)},t.Box=Box,Box.prototype.toPolygon=Box.prototype.toPolygon=function(){var t=this.pos,e=this.w,r=this.h;return new Polygon(new Vector(t.x,t.y),[new Vector,new Vector(e,0),new Vector(e,r),new Vector(0,r)])},t.Response=Response,Response.prototype.clear=Response.prototype.clear=function(){return this.aInB=!0,this.bInA=!0,this.overlap=Number.MAX_VALUE,this};for(var e=[],r=0;r<10;r++)e.push(new Vector);var n=[];for(r=0;r<5;r++)n.push([]);var i=new Response,o=new Box(new Vector,1e-6,1e-6).toPolygon();function a(t,e,r){for(var n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=t.length,a=0;a<o;a++){var s=t[a].dot(e);s<n&&(n=s),s>i&&(i=s)}r[0]=n,r[1]=i}function s(t,r,i,o,s,u){var c=n.pop(),l=n.pop(),f=e.pop().copy(r).sub(t),p=f.dot(s);if(a(i,s,c),a(o,s,l),l[0]+=p,l[1]+=p,c[0]>l[1]||l[0]>c[1])return e.push(f),n.push(c),n.push(l),!0;if(u){var d,h,g=0;if(c[0]<l[0])if(u.aInB=!1,c[1]<l[1])g=c[1]-l[0],u.bInA=!1;else g=(d=c[1]-l[0])<(h=l[1]-c[0])?d:-h;else if(u.bInA=!1,c[1]>l[1])g=c[0]-l[1],u.aInB=!1;else g=(d=c[1]-l[0])<(h=l[1]-c[0])?d:-h;var v=Math.abs(g);v<u.overlap&&(u.overlap=v,u.overlapN.copy(s),g<0&&u.overlapN.reverse())}return e.push(f),n.push(c),n.push(l),!1}function u(t,e){var r=t.len2(),n=e.dot(t);return n<0?c:n>r?f:l}t.isSeparatingAxis=s;var c=-1,l=0,f=1;function p(t,r){var n=e.pop().copy(t).sub(r.pos).sub(r.offset),i=r.r*r.r,o=n.len2();return e.push(n),o<=i}function d(t,e){o.pos.copy(t),i.clear();var r=y(o,e,i);return r&&(r=i.aInB),r}function h(t,r,n){var i=e.pop().copy(r.pos).add(r.offset).sub(t.pos).sub(t.offset),o=t.r+r.r,a=o*o,s=i.len2();if(s>a)return e.push(i),!1;if(n){var u=Math.sqrt(s);n.a=t,n.b=r,n.overlap=o-u,n.overlapN.copy(i.normalize()),n.overlapV.copy(i).scale(n.overlap),n.aInB=t.r<=r.r&&u<=r.r-t.r,n.bInA=r.r<=t.r&&u<=t.r-r.r}return e.push(i),!0}function g(t,r,n){for(var i=e.pop().copy(r.pos).add(r.offset).sub(t.pos),o=r.r,a=o*o,s=t.calcPoints,l=s.length,p=e.pop(),d=e.pop(),h=0;h<l;h++){var g=h===l-1?0:h+1,v=0===h?l-1:h-1,y=0,m=null;p.copy(t.edges[h]),d.copy(i).sub(s[h]),n&&d.len2()>a&&(n.aInB=!1);var b=u(p,d);if(b===c){p.copy(t.edges[v]);var _=e.pop().copy(i).sub(s[v]);if((b=u(p,_))===f){if((w=d.len())>o)return e.push(i),e.push(p),e.push(d),e.push(_),!1;n&&(n.bInA=!1,m=d.normalize(),y=o-w)}e.push(_)}else if(b===f){if(p.copy(t.edges[g]),d.copy(i).sub(s[g]),(b=u(p,d))===c){if((w=d.len())>o)return e.push(i),e.push(p),e.push(d),!1;n&&(n.bInA=!1,m=d.normalize(),y=o-w)}}else{var S=p.perp().normalize(),w=d.dot(S),x=Math.abs(w);if(w>0&&x>o)return e.push(i),e.push(S),e.push(d),!1;n&&(m=S,y=o-w,(w>=0||y<2*o)&&(n.bInA=!1))}m&&n&&Math.abs(y)<Math.abs(n.overlap)&&(n.overlap=y,n.overlapN.copy(m))}return n&&(n.a=t,n.b=r,n.overlapV.copy(n.overlapN).scale(n.overlap)),e.push(i),e.push(p),e.push(d),!0}function v(t,e,r){var n=g(e,t,r);if(n&&r){var i=r.a,o=r.aInB;r.overlapN.reverse(),r.overlapV.reverse(),r.a=r.b,r.b=i,r.aInB=r.bInA,r.bInA=o}return n}function y(t,e,r){for(var n=t.calcPoints,i=n.length,o=e.calcPoints,a=o.length,u=0;u<i;u++)if(s(t.pos,e.pos,n,o,t.normals[u],r))return!1;for(u=0;u<a;u++)if(s(t.pos,e.pos,n,o,e.normals[u],r))return!1;return r&&(r.a=t,r.b=e,r.overlapV.copy(r.overlapN).scale(r.overlap)),!0}return t.pointInCircle=p,t.pointInPolygon=d,t.testCircleCircle=h,t.testPolygonCircle=g,t.testCirclePolygon=v,t.testPolygonPolygon=y,t})?n.call(e,r,e,t):n)||(t.exports=i)}()},24889:function(t,e,r){!function(t,e){"use strict";if(!t.setImmediate){var r,n,i,o,a,s=1,u={},c=!1,l=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){process.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(o="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&d(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(o+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return u[s]=i,r(s),s++},f.clearImmediate=p}function p(t){delete u[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=u[t];if(e){c=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{p(t),c=!1}}}}}("undefined"==typeof self?void 0===r.g?this:r.g:self)},42238:function(t,e,r){var n;!function(i,o){"use strict";var a="function",s="undefined",u="object",c="string",l="model",f="name",p="type",d="vendor",h="version",g="architecture",v="console",y="mobile",m="tablet",b="smarttv",_="wearable",S="embedded",w="Amazon",x="Apple",E="ASUS",O="BlackBerry",C="Browser",k="Chrome",M="Firefox",D="Google",I="Huawei",A="LG",T="Microsoft",R="Motorola",B="Opera",P="Samsung",z="Sony",L="Xiaomi",j="Zebra",N="Facebook",K=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},q=function(t,e){return typeof t===c&&-1!==F(e).indexOf(F(t))},F=function(t){return t.toLowerCase()},U=function(t,e){if(typeof t===c)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e===s?t:t.substring(0,255)},G=function(t,e){for(var r,n,i,s,c,l,f=0;f<e.length&&!c;){var p=e[f],d=e[f+1];for(r=n=0;r<p.length&&!c;)if(c=p[r++].exec(t))for(i=0;i<d.length;i++)l=c[++n],typeof(s=d[i])===u&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;f+=2}},H=function(t,e){for(var r in e)if(typeof e[r]===u&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(q(e[r][n],t))return"?"===r?o:r}else if(q(e[r],t))return"?"===r?o:r;return t},W={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"},V={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,h],[/opios[\/ ]+([\w\.]+)/i],[h,[f,B+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[f,B]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[f,"UC"+C]],[/\bqbcore\/([\w\.]+)/i],[h,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[f,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+C],h],[/\bfocus\/([\w\.]+)/i],[h,[f,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[f,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[f,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[f,"MIUI "+C]],[/fxios\/([-\w\.]+)/i],[h,[f,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+C]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+C],h],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,N],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[f,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[f,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,k+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[f,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[f,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[h,H,{"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],[f,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[f,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[f,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,F]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",F]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[d,P],[p,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[d,P],[p,y]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[d,x],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[d,x],[p,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[d,I],[p,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[l,[d,I],[p,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[d,L],[p,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[d,L],[p,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[d,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[d,"Vivo"],[p,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[d,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[d,R],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[d,R],[p,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[d,A],[p,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[d,A],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[d,"Lenovo"],[p,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[d,"Nokia"],[p,y]],[/(pixel c)\b/i],[l,[d,D],[p,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[d,D],[p,y]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[d,z],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[d,z],[p,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[d,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[d,w],[p,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[d,w],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,d,[p,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[d,O],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[d,E],[p,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[d,E],[p,y]],[/(nexus 9)/i],[l,[d,"HTC"],[p,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[d,[l,/_/g," "],[p,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[d,"Acer"],[p,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[d,"Meizu"],[p,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[d,"Sharp"],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,l,[p,y]],[/(archos) (gamepad2?)/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],[d,l,[p,m]],[/(surface duo)/i],[l,[d,T],[p,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[d,"Fairphone"],[p,y]],[/(u304aa)/i],[l,[d,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[l,[d,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[l,[d,"RCA"],[p,m]],[/\b(venue[\d ]{2,7}) b/i],[l,[d,"Dell"],[p,m]],[/\b(q(?:mv|ta)\w+) b/i],[l,[d,"Verizon"],[p,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[d,"Barnes & Noble"],[p,m]],[/\b(tm\d{3}\w+) b/i],[l,[d,"NuVision"],[p,m]],[/\b(k88) b/i],[l,[d,"ZTE"],[p,m]],[/\b(nx\d{3}j) b/i],[l,[d,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[l,[d,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[l,[d,"Swiss"],[p,m]],[/\b((zeki)?tb.*\b) b/i],[l,[d,"Zeki"],[p,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],l,[p,m]],[/\b(ns-?\w{0,9}) b/i],[l,[d,"Insignia"],[p,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[d,"NextBook"],[p,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],l,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],l,[p,y]],[/\b(ph-1) /i],[l,[d,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[d,"Envizen"],[p,m]],[/\b(trio[-\w\. ]+) b/i],[l,[d,"MachSpeed"],[p,m]],[/\btu_(1491) b/i],[l,[d,"Rotor"],[p,m]],[/(shield[\w ]+) b/i],[l,[d,"Nvidia"],[p,m]],[/(sprint) (\w+)/i],[d,l,[p,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[d,T],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[d,j],[p,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[d,j],[p,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,l,[p,v]],[/droid.+; (shield) bui/i],[l,[d,"Nvidia"],[p,v]],[/(playstation [345portablevi]+)/i],[l,[d,z],[p,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[d,T],[p,v]],[/smart-tv.+(samsung)/i],[d,[p,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[d,P],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,A],[p,b]],[/(apple) ?tv/i],[d,[l,x+" TV"],[p,b]],[/crkey/i],[[l,k+"cast"],[d,D],[p,b]],[/droid.+aft(\w)( bui|\))/i],[l,[d,w],[p,b]],[/\(dtv[\);].+(aquos)/i],[l,[d,"Sharp"],[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,U],[l,U],[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/((pebble))app/i],[d,l,[p,_]],[/droid.+; (glass) \d/i],[l,[d,D],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[l,[d,j],[p,_]],[/(quest( 2)?)/i],[l,[d,N],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[p,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[p,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,m]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[f,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[h,H,W]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[h,H,W]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,h],[/\(bb(10);/i],[h,[f,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[f,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[f,k+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[f,"Chromium OS"],h],[/(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) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,h],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[f,h]]},UAParser=function(t,e){if(typeof t===u&&(e=t,t=o),!(this instanceof UAParser))return new UAParser(t,e).getResult();var r=t||(typeof i!==s&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=e?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(V,e):V;return this.getBrowser=function(){var t,e={};return e[f]=o,e[h]=o,G.call(e,r,n.browser),e.major=typeof(t=e.version)===c?t.replace(/[^\d\.]/g,"").split(".")[0]:o,e},this.getCPU=function(){var t={};return t[g]=o,G.call(t,r,n.cpu),t},this.getDevice=function(){var t={};return t[d]=o,t[l]=o,t[p]=o,G.call(t,r,n.device),t},this.getEngine=function(){var t={};return t[f]=o,t[h]=o,G.call(t,r,n.engine),t},this.getOS=function(){var t={};return t[f]=o,t[h]=o,G.call(t,r,n.os),t},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 r},this.setUA=function(t){return r=typeof t===c&&t.length>255?U(t,255):t,this},this.setUA(r),this};UAParser.VERSION="0.7.31",UAParser.BROWSER=K([f,h,"major"]),UAParser.CPU=K([g]),UAParser.DEVICE=K([l,d,p,v,y,b,m,_,S]),UAParser.ENGINE=UAParser.OS=K([f,h]),typeof e!==s?(t.exports&&(e=t.exports=UAParser),e.UAParser=UAParser):r.amdO?(n=function(){return UAParser}.call(e,r,e,t))===o||(t.exports=n):typeof i!==s&&(i.UAParser=UAParser);var Y=typeof i!==s&&(i.jQuery||i.Zepto);if(Y&&!Y.ua){var X=new UAParser;Y.ua=X.getResult(),Y.ua.get=function(){return X.getUA()},Y.ua.set=function(t){X.setUA(t);var e=X.getResult();for(var r in e)Y.ua[r]=e[r]}}}("object"==typeof window?window:this)},49349:(t,e,r)=>{"use strict";r.d(e,{default:()=>i});var n=r(67294);function i(t,e,r=!1){const[i,o]=(0,n.useReducer)(function(t){return(e,r)=>r&&r.type&&t[r.type]?t[r.type](e,r):e}(e),t),a=(0,n.useMemo)((()=>function(t,e,r){const n=Object.keys(t);return n.reduce(((t,n)=>(t[n]||(t[n]=t=>{const i={type:n,payload:t};e(i),r&&console.log(i)}),t)),{})}(e,o,r)),[e]);return[i,a]}},20477:t=>{"use strict";t.exports=function(t,e,r,n){var i=self||window;try{try{var o;try{o=new i.Blob([t])}catch(e){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(t),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),u=new i[e](s,r);return a.revokeObjectURL(s),u}catch(n){return new i[e]("data:application/javascript,".concat(encodeURIComponent(t)),r)}}catch(t){if(!n)throw Error("Inline worker is not supported");return new i[e](n,r)}}},68672:(t,e,r)=>{"use strict";r.d(e,{default:()=>c});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function a(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function u(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return u(i)}},34199:(t,e,r)=>{"use strict";r.d(e,{default:()=>c});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function a(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function u(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return u(i)}},1114:(t,e,r)=>{"use strict";r.d(e,{default:()=>c});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function a(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function u(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return u(i)}},17137:t=>{"use strict";function Mime(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Mime.prototype.define=function(t,e){for(let r in t){let n=t[r].map((function(t){return t.toLowerCase()}));r=r.toLowerCase();for(let t=0;t<n.length;t++){const i=n[t];if("*"!==i[0]){if(!e&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+r+'".');this._types[i]=r}}if(e||!this._extensions[r]){const t=n[0];this._extensions[r]="*"!==t[0]?t:t.substr(1)}}},Mime.prototype.getType=function(t){let e=(t=String(t)).replace(/^.*[/\\]/,"").toLowerCase(),r=e.replace(/^.*\./,"").toLowerCase(),n=e.length<t.length;return(r.length<e.length-1||!n)&&this._types[r]||null},Mime.prototype.getExtension=function(t){return(t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1)&&this._extensions[t.toLowerCase()]||null},t.exports=Mime},22133:(t,e,r)=>{"use strict";let n=r(17137);t.exports=new n(r(94776))},94776:t=>{t.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},19112:(t,e,r)=>{"use strict";r.d(e,{default:()=>c});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function a(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function u(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return u(i)}},32697:(t,e,r)=>{"use strict";r.d(e,{Map:()=>Te});var n="delete",i=5,o=1<<i,a=o-1,s={};function SetRef(t){t&&(t.value=!0)}function OwnerID(){}function u(t){return void 0===t.size&&(t.size=t.__iterate(l)),t.size}function c(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?u(t)+e:e}function l(){return!0}function f(t,e,r){return(0===t&&!g(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function p(t,e){return h(t,e,0)}function d(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:g(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function g(t){return t<0||0===t&&1/t==-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function y(t){return Boolean(t&&t[v])}var m="@@__IMMUTABLE_KEYED__@@";function b(t){return Boolean(t&&t[m])}var _="@@__IMMUTABLE_INDEXED__@@";function S(t){return Boolean(t&&t[_])}function w(t){return b(t)||S(t)}var x=function Collection(t){return y(t)?t:X(t)},E=function(t){function KeyedCollection(t){return b(t)?t:$(t)}return t&&(KeyedCollection.__proto__=t),KeyedCollection.prototype=Object.create(t&&t.prototype),KeyedCollection.prototype.constructor=KeyedCollection,KeyedCollection}(x),O=function(t){function IndexedCollection(t){return S(t)?t:J(t)}return t&&(IndexedCollection.__proto__=t),IndexedCollection.prototype=Object.create(t&&t.prototype),IndexedCollection.prototype.constructor=IndexedCollection,IndexedCollection}(x),C=function(t){function SetCollection(t){return y(t)&&!w(t)?t:Z(t)}return t&&(SetCollection.__proto__=t),SetCollection.prototype=Object.create(t&&t.prototype),SetCollection.prototype.constructor=SetCollection,SetCollection}(x);x.Keyed=E,x.Indexed=O,x.Set=C;var k="@@__IMMUTABLE_SEQ__@@";function M(t){return Boolean(t&&t[k])}var D="@@__IMMUTABLE_RECORD__@@";function I(t){return Boolean(t&&t[D])}function A(t){return y(t)||I(t)}var T="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[T])}var B=0,P=1,z=2,L="function"==typeof Symbol&&Symbol.iterator,j="@@iterator",N=L||j,K=function Iterator(t){this.next=t};function q(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function F(){return{value:void 0,done:!0}}function U(t){return!!Array.isArray(t)||!!W(t)}function G(t){return t&&"function"==typeof t.next}function H(t){var e=W(t);return e&&e.call(t)}function W(t){var e=t&&(L&&t[L]||t[j]);if("function"==typeof e)return e}K.prototype.toString=function(){return"[Iterator]"},K.KEYS=B,K.VALUES=P,K.ENTRIES=z,K.prototype.inspect=K.prototype.toSource=function(){return this.toString()},K.prototype[N]=function(){return this};var V=Object.prototype.hasOwnProperty;function Y(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var X=function(t){function Seq(t){return null==t?nt():A(t)?t.toSeq():function(t){var e=at(t);if(e)return(n=W(r=t))&&n===r.entries?e.fromEntrySeq():function(t){var e=W(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var r,n;if("object"==typeof t)return new tt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(Seq.__proto__=t),Seq.prototype=Object.create(t&&t.prototype),Seq.prototype.constructor=Seq,Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function __iterate(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},Seq.prototype.__iterator=function __iterator(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new K((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return q(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},Seq}(x),$=function(t){function KeyedSeq(t){return null==t?nt().toKeyedSeq():y(t)?b(t)?t.toSeq():t.fromEntrySeq():I(t)?t.toSeq():it(t)}return t&&(KeyedSeq.__proto__=t),KeyedSeq.prototype=Object.create(t&&t.prototype),KeyedSeq.prototype.constructor=KeyedSeq,KeyedSeq.prototype.toKeyedSeq=function(){return this},KeyedSeq}(X),J=function(t){function IndexedSeq(t){return null==t?nt():y(t)?b(t)?t.entrySeq():t.toIndexedSeq():I(t)?t.toSeq().entrySeq():ot(t)}return t&&(IndexedSeq.__proto__=t),IndexedSeq.prototype=Object.create(t&&t.prototype),IndexedSeq.prototype.constructor=IndexedSeq,IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq}(X),Z=function(t){function SetSeq(t){return(y(t)&&!w(t)?t:J(t)).toSetSeq()}return t&&(SetSeq.__proto__=t),SetSeq.prototype=Object.create(t&&t.prototype),SetSeq.prototype.constructor=SetSeq,SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},SetSeq}(X);X.isSeq=M,X.Keyed=$,X.Set=Z,X.Indexed=J,X.prototype[k]=!0;var Q=function(t){function ArraySeq(t){this._array=t,this.size=t.length}return t&&(ArraySeq.__proto__=t),ArraySeq.prototype=Object.create(t&&t.prototype),ArraySeq.prototype.constructor=ArraySeq,ArraySeq.prototype.get=function(t,e){return this.has(t)?this._array[c(this,t)]:e},ArraySeq.prototype.__iterate=function __iterate(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},ArraySeq.prototype.__iterator=function __iterator(t,e){var r=this._array,n=r.length,i=0;return new K((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return q(t,o,r[o])}))},ArraySeq}(J),tt=function(t){function ObjectSeq(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(ObjectSeq.__proto__=t),ObjectSeq.prototype=Object.create(t&&t.prototype),ObjectSeq.prototype.constructor=ObjectSeq,ObjectSeq.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},ObjectSeq.prototype.has=function(t){return V.call(this._object,t)},ObjectSeq.prototype.__iterate=function __iterate(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},ObjectSeq.prototype.__iterator=function __iterator(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new K((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return q(t,a,r[a])}))},ObjectSeq}($);tt.prototype[T]=!0;var et,rt=function(t){function CollectionSeq(t){this._collection=t,this.size=t.length||t.size}return t&&(CollectionSeq.__proto__=t),CollectionSeq.prototype=Object.create(t&&t.prototype),CollectionSeq.prototype.constructor=CollectionSeq,CollectionSeq.prototype.__iterateUncached=function __iterateUncached(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=H(this._collection),n=0;if(G(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},CollectionSeq.prototype.__iteratorUncached=function __iteratorUncached(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=H(this._collection);if(!G(r))return new K(F);var n=0;return new K((function(){var e=r.next();return e.done?e:q(t,n++,e.value)}))},CollectionSeq}(J);function nt(){return et||(et=new Q([]))}function it(t){var e=at(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new tt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function ot(t){var e=at(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function at(t){return Y(t)?new Q(t):U(t)?new rt(t):void 0}var st="@@__IMMUTABLE_MAP__@@";function ut(t){return Boolean(t&&t[st])}function ct(t){return ut(t)&&R(t)}function lt(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function ft(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(lt(t)&&lt(e)&&t.equals(e))}var pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function dt(t){return t>>>1&1073741824|3221225471&t}var ht=Object.prototype.valueOf;function gt(t){if(null==t)return vt(t);if("function"==typeof t.hashCode)return dt(t.hashCode(t));var e,r=(e=t).valueOf!==ht&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return vt(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return dt(e)}(r);case"string":return r.length>Ct?function(t){var e=Dt[t];void 0===e&&(e=yt(t),Mt===kt&&(Mt=0,Dt={}),Mt++,Dt[t]=e);return e}(r):yt(r);case"object":case"function":return function(t){var e;if(wt&&void 0!==(e=St.get(t)))return e;if(e=t[Ot],void 0!==e)return e;if(!bt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ot]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=_t(),wt)St.set(t,e);else{if(void 0!==mt&&!1===mt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(bt)Object.defineProperty(t,Ot,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ot]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ot]=e}}return e}(r);case"symbol":return function(t){var e=xt[t];if(void 0!==e)return e;return e=_t(),xt[t]=e,e}(r);default:if("function"==typeof r.toString)return yt(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function vt(t){return null===t?1108378658:1108378659}function yt(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return dt(e)}var mt=Object.isExtensible,bt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function _t(){var t=++Et;return 1073741824&Et&&(Et=0),t}var St,wt="function"==typeof WeakMap;wt&&(St=new WeakMap);var xt=Object.create(null),Et=0,Ot="__immutablehash__";"function"==typeof Symbol&&(Ot=Symbol(Ot));var Ct=16,kt=255,Mt=0,Dt={},It=function(t){function ToKeyedSequence(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(ToKeyedSequence.__proto__=t),ToKeyedSequence.prototype=Object.create(t&&t.prototype),ToKeyedSequence.prototype.constructor=ToKeyedSequence,ToKeyedSequence.prototype.get=function(t,e){return this._iter.get(t,e)},ToKeyedSequence.prototype.has=function(t){return this._iter.has(t)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var t=this,e=zt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ToKeyedSequence.prototype.map=function(t,e){var r=this,n=Pt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ToKeyedSequence.prototype.__iterate=function __iterate(t,e){var r=this;return this._iter.__iterate((function(e,n){return t(e,n,r)}),e)},ToKeyedSequence.prototype.__iterator=function __iterator(t,e){return this._iter.__iterator(t,e)},ToKeyedSequence}($);It.prototype[T]=!0;var At=function(t){function ToIndexedSequence(t){this._iter=t,this.size=t.size}return t&&(ToIndexedSequence.__proto__=t),ToIndexedSequence.prototype=Object.create(t&&t.prototype),ToIndexedSequence.prototype.constructor=ToIndexedSequence,ToIndexedSequence.prototype.includes=function(t){return this._iter.includes(t)},ToIndexedSequence.prototype.__iterate=function __iterate(t,e){var r=this,n=0;return e&&u(this),this._iter.__iterate((function(i){return t(i,e?r.size-++n:n++,r)}),e)},ToIndexedSequence.prototype.__iterator=function __iterator(t,e){var r=this,n=this._iter.__iterator(P,e),i=0;return e&&u(this),new K((function(){var o=n.next();return o.done?o:q(t,e?r.size-++i:i++,o.value,o)}))},ToIndexedSequence}(J),Tt=function(t){function ToSetSequence(t){this._iter=t,this.size=t.size}return t&&(ToSetSequence.__proto__=t),ToSetSequence.prototype=Object.create(t&&t.prototype),ToSetSequence.prototype.constructor=ToSetSequence,ToSetSequence.prototype.has=function(t){return this._iter.includes(t)},ToSetSequence.prototype.__iterate=function __iterate(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},ToSetSequence.prototype.__iterator=function __iterator(t,e){var r=this._iter.__iterator(P,e);return new K((function(){var e=r.next();return e.done?e:q(t,e.value,e.value,e)}))},ToSetSequence}(Z),Rt=function(t){function FromEntriesSequence(t){this._iter=t,this.size=t.size}return t&&(FromEntriesSequence.__proto__=t),FromEntriesSequence.prototype=Object.create(t&&t.prototype),FromEntriesSequence.prototype.constructor=FromEntriesSequence,FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function __iterate(t,e){var r=this;return this._iter.__iterate((function(e){if(e){Wt(e);var n=y(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},FromEntriesSequence.prototype.__iterator=function __iterator(t,e){var r=this._iter.__iterator(P,e);return new K((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Wt(n);var i=y(n);return q(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}}))},FromEntriesSequence}($);function Bt(t){var e=Yt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Xt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(e===z){var n=t.__iterator(e,r);return new K((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===P?B:P,r)},e}function Pt(t,e,r){var n=Yt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,s);return o===s?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate((function(t,i,a){return!1!==n(e.call(r,t,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(z,i);return new K((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return q(n,s,e.call(r,a[1],s,t),i)}))},n}function zt(t,e){var r=this,n=Yt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Bt(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=Xt,n.__iterate=function(r,n){var i=this,o=0;return n&&u(t),t.__iterate((function(t,a){return r(t,e?a:n?i.size-++o:o++,i)}),!n)},n.__iterator=function(n,i){var o=0;i&&u(t);var a=t.__iterator(z,!i);return new K((function(){var t=a.next();if(t.done)return t;var s=t.value;return q(n,e?s[0]:i?r.size-++o:o++,s[1],t)}))},n}function Lt(t,e,r,n){var i=Yt(t);return n&&(i.has=function(n){var i=t.get(n,s);return i!==s&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,s);return o!==s&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate((function(t,o,u){if(e.call(r,t,o,u))return s++,i(t,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(z,o),s=0;return new K((function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(e.call(r,l,c,t))return q(i,n?c:s++,l,o)}}))},i}function jt(t,e,r,n){var i=t.size;if(f(e,r,i))return t;var o=p(e,i),a=d(r,i);if(o!=o||a!=a)return jt(t.toSeq().cacheResult(),e,r,n);var s,u=a-o;u==u&&(s=u<0?0:u);var l=Yt(t);return l.size=0===s?s:t.size&&s||void 0,!n&&M(t)&&s>=0&&(l.get=function(e,r){return(e=c(this,e))>=0&&e<s?t.get(e+o,r):r}),l.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,u=!0,c=0;return t.__iterate((function(t,r){if(!u||!(u=a++<o))return c++,!1!==e(t,n?r:c-1,i)&&c!==s})),c},l.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);if(0===s)return new K(F);var i=t.__iterator(e,r),a=0,u=0;return new K((function(){for(;a++<o;)i.next();if(++u>s)return{value:void 0,done:!0};var t=i.next();return n||e===P||t.done?t:q(e,u-1,e===B?void 0:t.value[1],t)}))},l}function Nt(t,e,r,n){var i=Yt(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(z,o),u=!0,c=0;return new K((function(){var t,o,l;do{if((t=s.next()).done)return n||i===P?t:q(i,c++,i===B?void 0:t.value[1],t);var f=t.value;o=f[0],l=f[1],u&&(u=e.call(r,l,o,a))}while(u);return i===z?t:q(i,o,l,t)}))},i}function Kt(t,e,r){var n=Yt(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,c){u.__iterate((function(o,u){return(!e||c<e)&&y(o)?t(o,c+1):(a++,!1===i(o,r?u:a-1,n)&&(s=!0)),!s}),o)}(t,0),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=t.__iterator(n,i),a=[],s=0;return new K((function(){for(;o;){var t=o.next();if(!1===t.done){var u=t.value;if(n===z&&(u=u[1]),e&&!(a.length<e)||!y(u))return r?t:q(n,s++,u,t);a.push(o),o=u.__iterator(n,i)}else o=a.pop()}return{value:void 0,done:!0}}))},n}function qt(t,e,r){e||(e=$t);var n=b(t),i=0,o=t.toSeq().map((function(e,n){return[n,e,i++,r?r(e,n,t):e]})).valueSeq().toArray();return o.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?$(o):S(t)?J(o):Z(o)}function Ft(t,e,r){if(e||(e=$t),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return Ut(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return Ut(e,t,r)?r:t}))}function Ut(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Gt(t,e,r,n){var i=Yt(t),o=new Q(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(P,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=x(t),H(i?t.reverse():t)})),a=0,s=!1;return new K((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:q(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function Ht(t,e){return t===e?t:M(t)?e:t.constructor(e)}function Wt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Vt(t){return b(t)?E:S(t)?O:C}function Yt(t){return Object.create((b(t)?$:S(t)?J:Z).prototype)}function Xt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):X.prototype.cacheResult.call(this)}function $t(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function Jt(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function Zt(t,e){if(!t)throw new Error(e)}function Qt(t){Zt(t!==1/0,"Cannot perform this action with an infinite size.")}function te(t){if(Y(t)&&"string"!=typeof t)return t;if(R(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}At.prototype.cacheResult=It.prototype.cacheResult=Tt.prototype.cacheResult=Rt.prototype.cacheResult=Xt;var ee=Object.prototype.toString;function re(t){if(!t||"object"!=typeof t||"[object Object]"!==ee.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var r=e,n=Object.getPrototypeOf(e);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===e}function ne(t){return"object"==typeof t&&(A(t)||Array.isArray(t)||re(t))}function ie(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function oe(t,e){return A(t)?t.has(e):ne(t)&&V.call(t,e)}function ae(t,e,r){return A(t)?t.get(e,r):oe(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function se(t){if(Array.isArray(t))return Jt(t);var e={};for(var r in t)V.call(t,r)&&(e[r]=t[r]);return e}function ue(t,e){if(!ne(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(A(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!V.call(t,e))return t;var r=se(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function ce(t,e,r){if(!ne(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(A(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(V.call(t,e)&&r===t[e])return t;var n=se(t);return n[e]=r,n}function le(t,e,r,n){n||(n=r,r=void 0);var i=fe(A(t),t,te(e),0,r,n);return i===s?r:i}function fe(t,e,r,n,i,o){var a=e===s;if(n===r.length){var u=a?i:e,c=o(u);return c===u?e:c}if(!a&&!ne(e))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(ie)+"]: "+e);var l=r[n],f=a?s:ae(e,l,s),p=fe(f===s?t:A(f),f,r,n+1,i,o);return p===f?e:p===s?ue(e,l):ce(a?t?Ge():{}:e,l,p)}function pe(t,e,r){return le(t,e,s,(function(){return r}))}function de(t,e){return pe(this,t,e)}function he(t,e){return le(t,e,(function(){return s}))}function ge(t){return he(this,t)}function ve(t,e,r,n){return le(t,[e],r,n)}function ye(t,e,r){return 1===arguments.length?t(this):ve(this,t,e,r)}function me(t,e,r){return le(this,t,e,r)}function be(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Se(this,t)}function _e(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Se(this,e,t)}function Se(t,e,r){for(var n=[],i=0;i<e.length;i++){var o=E(e[i]);0!==o.size&&n.push(o)}return 0===n.length?t:0!==t.toSeq().size||t.__ownerID||1!==n.length?t.withMutations((function(t){for(var e=r?function(e,n){ve(t,n,s,(function(t){return t===s?e:r(t,e,n)}))}:function(e,r){t.set(r,e)},i=0;i<n.length;i++)n[i].forEach(e)})):t.constructor(n[0])}function we(t,e,r){return xe(t,e,function(t){function e(r,n,i){return ne(r)&&ne(n)&&(o=n,a=X(r),s=X(o),S(a)===S(s)&&b(a)===b(s))?xe(r,[n],e):t?t(r,n,i):n;var o,a,s}return e}(r))}function xe(t,e,r){if(!ne(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(A(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),i=t,o=n?O:E,a=n?function(e){i===t&&(i=se(i)),i.push(e)}:function(e,n){var o=V.call(i,n),a=o&&r?r(i[n],e,n):e;o&&a===i[n]||(i===t&&(i=se(i)),i[n]=a)},s=0;s<e.length;s++)o(e[s]).forEach(a);return i}function Ee(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return we(this,t)}function Oe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return we(this,e,t)}function Ce(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return le(this,t,Ge(),(function(t){return xe(t,e)}))}function ke(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return le(this,t,Ge(),(function(t){return we(t,e)}))}function Me(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function De(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)}function Ie(){return this.__ensureOwner()}function Ae(){return this.__altered}var Te=function(t){function Map(e){return null==e?Ge():ut(e)&&!R(e)?e:Ge().withMutations((function(r){var n=t(e);Qt(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(Map.__proto__=t),Map.prototype=Object.create(t&&t.prototype),Map.prototype.constructor=Map,Map.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ge().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Map.prototype.set=function(t,e){return He(this,t,e)},Map.prototype.remove=function(t){return He(this,t,s)},Map.prototype.deleteAll=function(t){var e=x(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ge()},Map.prototype.sort=function(t){return vr(qt(this,t))},Map.prototype.sortBy=function(t,e){return vr(qt(this,e,t))},Map.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){n.forEach((function(i,o){n.set(o,t.call(e,i,o,r))}))}))},Map.prototype.__iterator=function __iterator(t,e){return new Ke(this,t,e)},Map.prototype.__iterate=function __iterate(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},Map.prototype.__ensureOwner=function __ensureOwner(t){return t===this.__ownerID?this:t?Ue(this.size,this._root,t,this.__hash):0===this.size?Ge():(this.__ownerID=t,this.__altered=!1,this)},Map}(E);Te.isMap=ut;var Re=Te.prototype;Re[st]=!0,Re[n]=Re.remove,Re.removeAll=Re.deleteAll,Re.setIn=de,Re.removeIn=Re.deleteIn=ge,Re.update=ye,Re.updateIn=me,Re.merge=Re.concat=be,Re.mergeWith=_e,Re.mergeDeep=Ee,Re.mergeDeepWith=Oe,Re.mergeIn=Ce,Re.mergeDeepIn=ke,Re.withMutations=Me,Re.wasAltered=Ae,Re.asImmutable=Ie,Re["@@transducer/init"]=Re.asMutable=De,Re["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Re["@@transducer/result"]=function(t){return t.asImmutable()};var Be=function ArrayMapNode(t,e){this.ownerID=t,this.entries=e};Be.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ft(r,i[o][0]))return i[o][1];return n},Be.prototype.update=function(t,e,r,n,i,o,a){for(var u=i===s,c=this.entries,l=0,f=c.length;l<f&&!ft(n,c[l][0]);l++);var p=l<f;if(p?c[l][1]===i:u)return this;if(SetRef(a),(u||!p)&&SetRef(o),!u||1!==c.length){if(!p&&!u&&c.length>=Je)return function(t,e,r,n){t||(t=new OwnerID);for(var i=new je(t,gt(r),[r,n]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}(t,c,n,i);var d=t&&t===this.ownerID,h=d?c:Jt(c);return p?u?l===f-1?h.pop():h[l]=h.pop():h[l]=[n,i]:h.push([n,i]),d?(this.entries=h,this):new Be(t,h)}};var Pe=function BitmapIndexedNode(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Pe.prototype.get=function(t,e,r,n){void 0===e&&(e=gt(r));var o=1<<((0===t?e:e>>>t)&a),s=this.bitmap;return 0==(s&o)?n:this.nodes[Xe(s&o-1)].get(t+i,e,r,n)},Pe.prototype.update=function(t,e,r,n,u,c,l){void 0===r&&(r=gt(n));var f=(0===e?r:r>>>e)&a,p=1<<f,d=this.bitmap,h=0!=(d&p);if(!h&&u===s)return this;var g=Xe(d&p-1),v=this.nodes,y=h?v[g]:void 0,m=We(y,t,e+i,r,n,u,c,l);if(m===y)return this;if(!h&&m&&v.length>=Ze)return function(t,e,r,n,i){for(var a=0,s=new Array(o),u=0;0!==r;u++,r>>>=1)s[u]=1&r?e[a++]:void 0;return s[n]=i,new ze(t,a+1,s)}(t,v,d,f,m);if(h&&!m&&2===v.length&&Ve(v[1^g]))return v[1^g];if(h&&m&&1===v.length&&Ve(m))return m;var b=t&&t===this.ownerID,_=h?m?d:d^p:d|p,S=h?m?$e(v,g,m,b):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a<n;a++)a===e&&(o=1),i[a]=t[a+o];return i}(v,g,b):function(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),a=0,s=0;s<i;s++)s===e?(o[s]=r,a=-1):o[s]=t[s+a];return o}(v,g,m,b);return b?(this.bitmap=_,this.nodes=S,this):new Pe(t,_,S)};var ze=function HashArrayMapNode(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};ze.prototype.get=function(t,e,r,n){void 0===e&&(e=gt(r));var o=(0===t?e:e>>>t)&a,s=this.nodes[o];return s?s.get(t+i,e,r,n):n},ze.prototype.update=function(t,e,r,n,o,u,c){void 0===r&&(r=gt(n));var l=(0===e?r:r>>>e)&a,f=o===s,p=this.nodes,d=p[l];if(f&&!d)return this;var h=We(d,t,e+i,r,n,o,u,c);if(h===d)return this;var g=this.count;if(d){if(!h&&--g<Qe)return function(t,e,r,n){for(var i=0,o=0,a=new Array(r),s=0,u=1,c=e.length;s<c;s++,u<<=1){var l=e[s];void 0!==l&&s!==n&&(i|=u,a[o++]=l)}return new Pe(t,i,a)}(t,p,g,l)}else g++;var v=t&&t===this.ownerID,y=$e(p,l,h,v);return v?(this.count=g,this.nodes=y,this):new ze(t,g,y)};var Le=function HashCollisionNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Le.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ft(r,i[o][0]))return i[o][1];return n},Le.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=gt(n));var u=i===s;if(r!==this.keyHash)return u?this:(SetRef(a),SetRef(o),Ye(this,t,e,r,[n,i]));for(var c=this.entries,l=0,f=c.length;l<f&&!ft(n,c[l][0]);l++);var p=l<f;if(p?c[l][1]===i:u)return this;if(SetRef(a),(u||!p)&&SetRef(o),u&&2===f)return new je(t,this.keyHash,c[1^l]);var d=t&&t===this.ownerID,h=d?c:Jt(c);return p?u?l===f-1?h.pop():h[l]=h.pop():h[l]=[n,i]:h.push([n,i]),d?(this.entries=h,this):new Le(t,this.keyHash,h)};var je=function ValueNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};je.prototype.get=function(t,e,r,n){return ft(r,this.entry[0])?this.entry[1]:n},je.prototype.update=function(t,e,r,n,i,o,a){var u=i===s,c=ft(n,this.entry[0]);return(c?i===this.entry[1]:u)?this:(SetRef(a),u?void SetRef(o):c?t&&t===this.ownerID?(this.entry[1]=i,this):new je(t,this.keyHash,[n,i]):(SetRef(o),Ye(this,t,e,gt(n),[n,i])))},Be.prototype.iterate=Le.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},Pe.prototype.iterate=ze.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},je.prototype.iterate=function(t,e){return t(this.entry)};var Ne,Ke=function(t){function MapIterator(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Fe(t._root)}return t&&(MapIterator.__proto__=t),MapIterator.prototype=Object.create(t&&t.prototype),MapIterator.prototype.constructor=MapIterator,MapIterator.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,i=void 0;if(r.entry){if(0===n)return qe(t,r.entry)}else if(r.entries){if(n<=(i=r.entries.length-1))return qe(t,r.entries[this._reverse?i-n:n])}else if(n<=(i=r.nodes.length-1)){var o=r.nodes[this._reverse?i-n:n];if(o){if(o.entry)return qe(t,o.entry);e=this._stack=Fe(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},MapIterator}(K);function qe(t,e){return q(t,e[0],e[1])}function Fe(t,e){return{node:t,index:0,__prev:e}}function Ue(t,e,r,n){var i=Object.create(Re);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ge(){return Ne||(Ne=Ue(0))}function He(t,e,r){var n,i;if(t._root){var o={value:!1},a={value:!1};if(n=We(t._root,t.__ownerID,0,void 0,e,r,o,a),!a.value)return t;i=t.size+(o.value?r===s?-1:1:0)}else{if(r===s)return t;i=1,n=new Be(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?Ue(i,n):Ge()}function We(t,e,r,n,i,o,a,u){return t?t.update(e,r,n,i,o,a,u):o===s?t:(SetRef(u),SetRef(a),new je(e,n,[i,o]))}function Ve(t){return t.constructor===je||t.constructor===Le}function Ye(t,e,r,n,o){if(t.keyHash===n)return new Le(e,n,[t.entry,o]);var s,u=(0===r?t.keyHash:t.keyHash>>>r)&a,c=(0===r?n:n>>>r)&a,l=u===c?[Ye(t,e,r+i,n,o)]:(s=new je(e,n,o),u<c?[t,s]:[s,t]);return new Pe(e,1<<u|1<<c,l)}function Xe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function $e(t,e,r,n){var i=n?t:Jt(t);return i[e]=r,i}var Je=o/4,Ze=o/2,Qe=o/4,tr="@@__IMMUTABLE_LIST__@@";function er(t){return Boolean(t&&t[tr])}var rr=function(t){function List(e){var r=cr();if(null==e)return r;if(er(e))return e;var n=t(e),a=n.size;return 0===a?r:(Qt(a),a>0&&a<o?ur(0,a,i,null,new ir(n.toArray())):r.withMutations((function(t){t.setSize(a),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(List.__proto__=t),List.prototype=Object.create(t&&t.prototype),List.prototype.constructor=List,List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString("List [","]")},List.prototype.get=function(t,e){if((t=c(this,t))>=0&&t<this.size){var r=pr(this,t+=this._origin);return r&&r.array[t&a]}return e},List.prototype.set=function(t,e){return function(t,e,r){if(e=c(t,e),e!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?dr(t,e).set(0,r):dr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=hr(t._capacity)?n=lr(n,t.__ownerID,0,e,r,o):i=lr(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return ur(t._origin,t._capacity,t._level,i,n)}(this,t,e)},List.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},List.prototype.insert=function(t,e){return this.splice(t,0,e)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=i,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):cr()},List.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){dr(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},List.prototype.pop=function(){return dr(this,0,-1)},List.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){dr(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},List.prototype.shift=function(){return dr(this,1)},List.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var i=e[n],o=t("string"!=typeof i&&U(i)?i:[i]);0!==o.size&&r.push(o)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(t){r.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(r[0])},List.prototype.setSize=function(t){return dr(this,0,t)},List.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){for(var i=0;i<r.size;i++)n.set(i,t.call(e,n.get(i),i,r))}))},List.prototype.slice=function(t,e){var r=this.size;return f(t,e,r)?this:dr(this,p(t,r),d(e,r))},List.prototype.__iterator=function __iterator(t,e){var r=e?this.size:0,n=sr(this,e);return new K((function(){var i=n();return i===ar?{value:void 0,done:!0}:q(t,e?--r:r++,i)}))},List.prototype.__iterate=function __iterate(t,e){for(var r,n=e?this.size:0,i=sr(this,e);(r=i())!==ar&&!1!==t(r,e?--n:n++,this););return n},List.prototype.__ensureOwner=function __ensureOwner(t){return t===this.__ownerID?this:t?ur(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?cr():(this.__ownerID=t,this.__altered=!1,this)},List}(O);rr.isList=er;var nr=rr.prototype;nr[tr]=!0,nr[n]=nr.remove,nr.merge=nr.concat,nr.setIn=de,nr.deleteIn=nr.removeIn=ge,nr.update=ye,nr.updateIn=me,nr.mergeIn=Ce,nr.mergeDeepIn=ke,nr.withMutations=Me,nr.wasAltered=Ae,nr.asImmutable=Ie,nr["@@transducer/init"]=nr.asMutable=De,nr["@@transducer/step"]=function(t,e){return t.push(e)},nr["@@transducer/result"]=function(t){return t.asImmutable()};var ir=function VNode(t,e){this.array=t,this.ownerID=e};ir.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&a;if(n>=this.array.length)return new ir([],t);var o,s=0===n;if(e>0){var u=this.array[n];if((o=u&&u.removeBefore(t,e-i,r))===u&&s)return this}if(s&&!o)return this;var c=fr(this,t);if(!s)for(var l=0;l<n;l++)c.array[l]=void 0;return o&&(c.array[n]=o),c},ir.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,o=r-1>>>e&a;if(o>=this.array.length)return this;if(e>0){var s=this.array[o];if((n=s&&s.removeAfter(t,e-i,r))===s&&o===this.array.length-1)return this}var u=fr(this,t);return u.array.splice(o+1),n&&(u.array[o]=n),u};var or,ar={};function sr(t,e){var r=t._origin,n=t._capacity,a=hr(n),s=t._tail;return u(t._root,t._level,0);function u(t,c,l){return 0===c?function(t,i){var u=i===a?s&&s.array:t&&t.array,c=i>r?0:r-i,l=n-i;l>o&&(l=o);return function(){if(c===l)return ar;var t=e?--l:c++;return u&&u[t]}}(t,l):function(t,a,s){var c,l=t&&t.array,f=s>r?0:r-s>>a,p=1+(n-s>>a);p>o&&(p=o);return function(){for(;;){if(c){var t=c();if(t!==ar)return t;c=null}if(f===p)return ar;var r=e?--p:f++;c=u(l&&l[r],a-i,s+(r<<a))}}}(t,c,l)}}function ur(t,e,r,n,i,o,a){var s=Object.create(nr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function cr(){return or||(or=ur(0,0,i))}function lr(t,e,r,n,o,s){var u,c=n>>>r&a,l=t&&c<t.array.length;if(!l&&void 0===o)return t;if(r>0){var f=t&&t.array[c],p=lr(f,e,r-i,n,o,s);return p===f?t:((u=fr(t,e)).array[c]=p,u)}return l&&t.array[c]===o?t:(s&&SetRef(s),u=fr(t,e),void 0===o&&c===u.array.length-1?u.array.pop():u.array[c]=o,u)}function fr(t,e){return e&&t&&e===t.ownerID?t:new ir(t?t.array.slice():[],e)}function pr(t,e){if(e>=hr(t._capacity))return t._tail;if(e<1<<t._level+i){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&a],n-=i;return r}}function dr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new OwnerID,o=t._origin,s=t._capacity,u=o+e,c=void 0===r?s:r<0?s+r:o+r;if(u===o&&c===s)return t;if(u>=c)return t.clear();for(var l=t._level,f=t._root,p=0;u+p<0;)f=new ir(f&&f.array.length?[void 0,f]:[],n),p+=1<<(l+=i);p&&(u+=p,o+=p,c+=p,s+=p);for(var d=hr(s),h=hr(c);h>=1<<l+i;)f=new ir(f&&f.array.length?[f]:[],n),l+=i;var g=t._tail,v=h<d?pr(t,c-1):h>d?new ir([],n):g;if(g&&h>d&&u<s&&g.array.length){for(var y=f=fr(f,n),m=l;m>i;m-=i){var b=d>>>m&a;y=y.array[b]=fr(y.array[b],n)}y.array[d>>>i&a]=g}if(c<s&&(v=v&&v.removeAfter(n,0,c)),u>=h)u-=h,c-=h,l=i,f=null,v=v&&v.removeBefore(n,0,u);else if(u>o||h<d){for(p=0;f;){var _=u>>>l&a;if(_!==h>>>l&a)break;_&&(p+=(1<<l)*_),l-=i,f=f.array[_]}f&&u>o&&(f=f.removeBefore(n,l,u-p)),f&&h<d&&(f=f.removeAfter(n,l,h-p)),p&&(u-=p,c-=p)}return t.__ownerID?(t.size=c-u,t._origin=u,t._capacity=c,t._level=l,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):ur(u,c,l,f,v)}function hr(t){return t<o?0:t-1>>>i<<i}var gr,vr=function(t){function OrderedMap(t){return null==t?mr():ct(t)?t:mr().withMutations((function(e){var r=E(t);Qt(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(OrderedMap.__proto__=t),OrderedMap.prototype=Object.create(t&&t.prototype),OrderedMap.prototype.constructor=OrderedMap,OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString("OrderedMap {","}")},OrderedMap.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):mr()},OrderedMap.prototype.set=function(t,e){return br(this,t,e)},OrderedMap.prototype.remove=function(t){return br(this,t,s)},OrderedMap.prototype.__iterate=function __iterate(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},OrderedMap.prototype.__iterator=function __iterator(t,e){return this._list.fromEntrySeq().__iterator(t,e)},OrderedMap.prototype.__ensureOwner=function __ensureOwner(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?yr(e,r,t,this.__hash):0===this.size?mr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},OrderedMap}(Te);function yr(t,e,r,n){var i=Object.create(vr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function mr(){return gr||(gr=yr(Ge(),cr()))}function br(t,e,r){var n,i,a=t._map,u=t._list,c=a.get(e),l=void 0!==c;if(r===s){if(!l)return t;u.size>=o&&u.size>=2*a.size?(n=(i=u.filter((function(t,e){return void 0!==t&&c!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=a.remove(e),i=c===u.size-1?u.pop():u.set(c,void 0))}else if(l){if(r===u.get(c)[1])return t;n=a,i=u.set(c,[e,r])}else n=a.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t.__altered=!0,t):yr(n,i)}vr.isOrderedMap=ct,vr.prototype[T]=!0,vr.prototype[n]=vr.prototype.remove;var _r="@@__IMMUTABLE_STACK__@@";function Sr(t){return Boolean(t&&t[_r])}var wr=function(t){function Stack(t){return null==t?Cr():Sr(t)?t:Cr().pushAll(t)}return t&&(Stack.__proto__=t),Stack.prototype=Object.create(t&&t.prototype),Stack.prototype.constructor=Stack,Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString("Stack [","]")},Stack.prototype.get=function(t,e){var r=this._head;for(t=c(this,t);r&&t--;)r=r.next;return r?r.value:e},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Or(e,r)},Stack.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Sr(e))return e;Qt(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Or(r,n)},Stack.prototype.pop=function(){return this.slice(1)},Stack.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):Cr()},Stack.prototype.slice=function(e,r){if(f(e,r,this.size))return this;var n=p(e,this.size);if(d(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Or(i,o)},Stack.prototype.__ensureOwner=function __ensureOwner(t){return t===this.__ownerID?this:t?Or(this.size,this._head,t,this.__hash):0===this.size?Cr():(this.__ownerID=t,this.__altered=!1,this)},Stack.prototype.__iterate=function __iterate(t,e){var r=this;if(e)return new Q(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,this);)i=i.next;return n},Stack.prototype.__iterator=function __iterator(t,e){if(e)return new Q(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new K((function(){if(n){var e=n.value;return n=n.next,q(t,r++,e)}return{value:void 0,done:!0}}))},Stack}(O);wr.isStack=Sr;var xr,Er=wr.prototype;function Or(t,e,r,n){var i=Object.create(Er);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Cr(){return xr||(xr=Or(0))}Er[_r]=!0,Er.shift=Er.pop,Er.unshift=Er.push,Er.unshiftAll=Er.pushAll,Er.withMutations=Me,Er.wasAltered=Ae,Er.asImmutable=Ie,Er["@@transducer/init"]=Er.asMutable=De,Er["@@transducer/step"]=function(t,e){return t.unshift(e)},Er["@@transducer/result"]=function(t){return t.asImmutable()};var kr="@@__IMMUTABLE_SET__@@";function Mr(t){return Boolean(t&&t[kr])}function Dr(t){return Mr(t)&&R(t)}function Ir(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||b(t)!==b(e)||S(t)!==S(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!w(t);if(R(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&ft(i[1],t)&&(r||ft(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,u=e.__iterate((function(e,n){if(r?!t.has(e):i?!ft(e,t.get(n,s)):!ft(t.get(n,s),e))return a=!1,!1}));return a&&t.size===u}function Ar(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Tr(t){if(!t||"object"!=typeof t)return t;if(!y(t)){if(!ne(t))return t;t=X(t)}if(b(t)){var e={};return t.__iterate((function(t,r){e[r]=Tr(t)})),e}var r=[];return t.__iterate((function(t){r.push(Tr(t))})),r}var Rr=function(t){function Set(e){return null==e?jr():Mr(e)&&!R(e)?e:jr().withMutations((function(r){var n=t(e);Qt(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(Set.__proto__=t),Set.prototype=Object.create(t&&t.prototype),Set.prototype.constructor=Set,Set.of=function(){return this(arguments)},Set.fromKeys=function(t){return this(E(t).keySeq())},Set.intersect=function(t){return(t=x(t).toArray()).length?Pr.intersect.apply(Set(t.pop()),t):jr()},Set.union=function(t){return(t=x(t).toArray()).length?Pr.union.apply(Set(t.pop()),t):jr()},Set.prototype.toString=function(){return this.__toString("Set {","}")},Set.prototype.has=function(t){return this._map.has(t)},Set.prototype.add=function(t){return zr(this,this._map.set(t,t))},Set.prototype.remove=function(t){return zr(this,this._map.remove(t))},Set.prototype.clear=function(){return zr(this,this._map.clear())},Set.prototype.map=function(t,e){var r=this,n=!1,i=zr(this,this._map.mapEntries((function(i){var o=i[1],a=t.call(e,o,o,r);return a!==o&&(n=!0),[a,a]}),e));return n?i:this},Set.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n<e.length;n++)"string"==typeof e[n]?r.add(e[n]):t(e[n]).forEach((function(t){return r.add(t)}))})):this.constructor(e[0])},Set.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},Set.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},Set.prototype.sort=function(t){return nn(qt(this,t))},Set.prototype.sortBy=function(t,e){return nn(qt(this,e,t))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function __iterate(t,e){var r=this;return this._map.__iterate((function(e){return t(e,e,r)}),e)},Set.prototype.__iterator=function __iterator(t,e){return this._map.__iterator(t,e)},Set.prototype.__ensureOwner=function __ensureOwner(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},Set}(C);Rr.isSet=Mr;var Br,Pr=Rr.prototype;function zr(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Lr(t,e){var r=Object.create(Pr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function jr(){return Br||(Br=Lr(Ge()))}Pr[kr]=!0,Pr[n]=Pr.remove,Pr.merge=Pr.concat=Pr.union,Pr.withMutations=Me,Pr.asImmutable=Ie,Pr["@@transducer/init"]=Pr.asMutable=De,Pr["@@transducer/step"]=function(t,e){return t.add(e)},Pr["@@transducer/result"]=function(t){return t.asImmutable()},Pr.__empty=jr,Pr.__make=Lr;var Nr,Kr=function(t){function Range(t,e,r){if(!(this instanceof Range))return new Range(t,e,r);if(Zt(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(Nr)return Nr;Nr=this}}return t&&(Range.__proto__=t),Range.prototype=Object.create(t&&t.prototype),Range.prototype.constructor=Range,Range.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Range.prototype.get=function(t,e){return this.has(t)?this._start+c(this,t)*this._step:e},Range.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Range.prototype.slice=function(t,e){return f(t,e,this.size)?this:(t=p(t,this.size),(e=d(e,this.size))<=t?new Range(0,0):new Range(this.get(t,this._end),this.get(e,this._end),this._step))},Range.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},Range.prototype.lastIndexOf=function(t){return this.indexOf(t)},Range.prototype.__iterate=function __iterate(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==t(i,e?r-++o:o++,this);)i+=e?-n:n;return o},Range.prototype.__iterator=function __iterator(t,e){var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;return new K((function(){if(o===r)return{value:void 0,done:!0};var a=i;return i+=e?-n:n,q(t,e?r-++o:o++,a)}))},Range.prototype.equals=function(t){return t instanceof Range?this._start===t._start&&this._end===t._end&&this._step===t._step:Ir(this,t)},Range}(J);function qr(t,e,r){for(var n=te(e),i=0;i!==n.length;)if((t=ae(t,n[i++],s))===s)return r;return t}function Fr(t,e){return qr(this,t,e)}function Ur(t,e){return qr(t,e,s)!==s}function Gr(){Qt(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t}x.isIterable=y,x.isKeyed=b,x.isIndexed=S,x.isAssociative=w,x.isOrdered=R,x.Iterator=K,Ar(x,{toArray:function(){Qt(this.size);var t=new Array(this.size||0),e=b(this),r=0;return this.__iterate((function(n,i){t[r++]=e?[i,n]:n})),t},toIndexedSeq:function(){return new At(this)},toJS:function(){return Tr(this)},toKeyedSeq:function(){return new It(this,!0)},toMap:function(){return Te(this.toKeyedSeq())},toObject:Gr,toOrderedMap:function(){return vr(this.toKeyedSeq())},toOrderedSet:function(){return nn(b(this)?this.valueSeq():this)},toSet:function(){return Rr(b(this)?this.valueSeq():this)},toSetSeq:function(){return new Tt(this)},toSeq:function(){return S(this)?this.toIndexedSeq():b(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return wr(b(this)?this.valueSeq():this)},toList:function(){return rr(b(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function __toString(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ht(this,function(t,e){var r=b(t),n=[t].concat(e).map((function(t){return y(t)?r&&(t=E(t)):t=r?it(t):ot(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&b(i)||S(t)&&S(i))return i}var o=new Q(n);return r?o=o.toKeyedSeq():S(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}(this,t))},includes:function(t){return this.some((function(e){return ft(e,t)}))},entries:function(){return this.__iterator(z)},every:function(t,e){Qt(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1})),r},filter:function(t,e){return Ht(this,Lt(this,t,e,!0))},partition:function(t,e){return function(t,e,r){var n=b(t),i=[[],[]];t.__iterate((function(o,a){i[e.call(r,o,a,t)?1:0].push(n?[a,o]:o)}));var o=Vt(t);return i.map((function(e){return Ht(t,o(e))}))}(this,t,e)},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return Qt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Qt(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(B)},map:function(t,e){return Ht(this,Pt(this,t,e))},reduce:function(t,e,r){return Xr(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return Xr(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Ht(this,zt(this,!0))},slice:function(t,e){return Ht(this,jt(this,t,e,!0))},some:function(t,e){return!this.every(Zr(t),e)},sort:function(t){return Ht(this,qt(this,t))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return u(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Te().asMutable();return t.__iterate((function(i,o){n.update(e.call(r,i,o,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return Ir(this,t)},entrySeq:function(){var t=this;if(t._cache)return new Q(t._cache);var e=t.toSeq().map(Jr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Zr(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(l,null,t)},flatMap:function(t,e){return Ht(this,function(t,e,r){var n=Vt(t);return t.toSeq().map((function(i,o){return n(e.call(r,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Ht(this,Kt(this,t,!0))},fromEntrySeq:function(){return new Rt(this)},get:function(t,e){return this.find((function(e,r){return ft(r,t)}),void 0,e)},getIn:Fr,groupBy:function(t,e){return function(t,e,r){var n=b(t),i=(R(t)?vr():Te()).asMutable();t.__iterate((function(o,a){i.update(e.call(r,o,a,t),(function(t){return(t=t||[]).push(n?[a,o]:o),t}))}));var o=Vt(t);return i.map((function(e){return Ht(t,o(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,s)!==s},hasIn:function(t){return Ur(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:x(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:x(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return ft(e,t)}))},keySeq:function(){return this.toSeq().map($r).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Ft(this,t)},maxBy:function(t,e){return Ft(this,e,t)},min:function(t){return Ft(this,t?Qr(t):en)},minBy:function(t,e){return Ft(this,e?Qr(e):en,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Ht(this,Nt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Zr(t),e)},sortBy:function(t,e){return Ht(this,qt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Ht(this,function(t,e,r){var n=Yt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return t.__iterate((function(t,i,s){return e.call(r,t,i,s)&&++a&&n(t,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(z,i),s=!0;return new K((function(){if(!s)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(r,c,u,o)?n===z?t:q(n,u,c,t):(s=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Zr(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=R(t),r=b(t),n=e?1:0;return function(t,e){return e=pt(e,3432918353),e=pt(e<<15|e>>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=pt(e^e>>>16,2246822507),e=pt(e^e>>>13,3266489909),e=dt(e^e>>>16),e}(t.__iterate(r?e?function(t,e){n=31*n+rn(gt(t),gt(e))|0}:function(t,e){n=n+rn(gt(t),gt(e))|0}:e?function(t){n=31*n+gt(t)|0}:function(t){n=n+gt(t)|0}),n)}(this))}});var Hr=x.prototype;Hr[v]=!0,Hr[N]=Hr.values,Hr.toJSON=Hr.toArray,Hr.__toStringMapper=ie,Hr.inspect=Hr.toSource=function(){return this.toString()},Hr.chain=Hr.flatMap,Hr.contains=Hr.includes,Ar(E,{flip:function(){return Ht(this,Bt(this))},mapEntries:function(t,e){var r=this,n=0;return Ht(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Ht(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var Wr=E.prototype;Wr[m]=!0,Wr[N]=Hr.entries,Wr.toJSON=Gr,Wr.__toStringMapper=function(t,e){return ie(e)+": "+ie(t)},Ar(O,{toKeyedSeq:function(){return new It(this,!1)},filter:function(t,e){return Ht(this,Lt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Ht(this,zt(this,!1))},slice:function(t,e){return Ht(this,jt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=p(t,t<0?this.count():this.size);var n=this.slice(0,t);return Ht(this,1===r?n:n.concat(Jt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Ht(this,Kt(this,t,!1))},get:function(t,e){return(t=c(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=c(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Ht(this,function(t,e){var r=Yt(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate((function(t){return(!o||!1!==r(e,o++,i))&&!1!==r(t,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(P,n),a=0;return new K((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?q(r,a++,e):q(r,a++,i.value,i)}))},r}(this,t))},interleave:function(){var t=[this].concat(Jt(arguments)),e=Gt(this.toSeq(),J.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Ht(this,r)},keySeq:function(){return Kr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Ht(this,Nt(this,t,e,!1))},zip:function(){return Ht(this,Gt(this,tn,[this].concat(Jt(arguments))))},zipAll:function(){return Ht(this,Gt(this,tn,[this].concat(Jt(arguments)),!0))},zipWith:function(t){var e=Jt(arguments);return e[0]=this,Ht(this,Gt(this,t,e))}});var Vr=O.prototype;Vr[_]=!0,Vr[T]=!0,Ar(C,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Yr=C.prototype;function Xr(t,e,r,n,i,o){return Qt(t.size),t.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),o),r}function $r(t,e){return e}function Jr(t,e){return[e,t]}function Zr(t){return function(){return!t.apply(this,arguments)}}function Qr(t){return function(){return-t.apply(this,arguments)}}function tn(){return Jt(arguments)}function en(t,e){return t<e?1:t>e?-1:0}function rn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Yr.has=Hr.includes,Yr.contains=Yr.includes,Yr.keys=Yr.values,Ar($,Wr),Ar(J,Vr),Ar(Z,Yr);var nn=function(t){function OrderedSet(t){return null==t?un():Dr(t)?t:un().withMutations((function(e){var r=C(t);Qt(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(OrderedSet.__proto__=t),OrderedSet.prototype=Object.create(t&&t.prototype),OrderedSet.prototype.constructor=OrderedSet,OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(t){return this(E(t).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString("OrderedSet {","}")},OrderedSet}(Rr);nn.isOrderedSet=Dr;var on,an=nn.prototype;function sn(t,e){var r=Object.create(an);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function un(){return on||(on=sn(mr()))}an[T]=!0,an.zip=Vr.zip,an.zipWith=Vr.zipWith,an.zipAll=Vr.zipAll,an.__empty=un,an.__make=sn;var cn=function Record(t,e){var r;!function(t){if(I(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var n=function Record(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var l=s[c];u[l]=c,i[l]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+pn(this)+' with property "'+l+'" since that property name is part of the Record API.'):hn(i,l)}}return this.__ownerID=void 0,this._values=rr().withMutations((function(t){t.setSize(a._keys.length),E(o).forEach((function(e,r){t.set(a._indices[r],e===a._defaultValues[r]?void 0:e)}))})),this},i=n.prototype=Object.create(ln);return i.constructor=n,e&&(n.displayName=e),n};cn.prototype.toString=function(){for(var t,e=pn(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)e+=(n?", ":"")+(t=r[n])+": "+ie(this.get(t));return e+" }"},cn.prototype.equals=function(t){return this===t||I(t)&&dn(this).equals(dn(t))},cn.prototype.hashCode=function(){return dn(this).hashCode()},cn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},cn.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},cn.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return fn(this,r)}return this},cn.prototype.remove=function(t){return this.set(t)},cn.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:fn(this,t)},cn.prototype.wasAltered=function(){return this._values.wasAltered()},cn.prototype.toSeq=function(){return dn(this)},cn.prototype.toJS=function(){return Tr(this)},cn.prototype.entries=function(){return this.__iterator(z)},cn.prototype.__iterator=function __iterator(t,e){return dn(this).__iterator(t,e)},cn.prototype.__iterate=function __iterate(t,e){return dn(this).__iterate(t,e)},cn.prototype.__ensureOwner=function __ensureOwner(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?fn(this,e,t):(this.__ownerID=t,this._values=e,this)},cn.isRecord=I,cn.getDescriptiveName=pn;var ln=cn.prototype;function fn(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function pn(t){return t.constructor.displayName||t.constructor.name||"Record"}function dn(t){return it(t._keys.map((function(e){return[e,t.get(e)]})))}function hn(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Zt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}ln[D]=!0,ln[n]=ln.remove,ln.deleteIn=ln.removeIn=ge,ln.getIn=Fr,ln.hasIn=Hr.hasIn,ln.merge=be,ln.mergeWith=_e,ln.mergeIn=Ce,ln.mergeDeep=Ee,ln.mergeDeepWith=Oe,ln.mergeDeepIn=ke,ln.setIn=de,ln.update=ye,ln.updateIn=me,ln.withMutations=Me,ln.asMutable=De,ln.asImmutable=Ie,ln[N]=ln.entries,ln.toJSON=ln.toObject=Hr.toObject,ln.inspect=ln.toSource=function(){return this.toString()}},55571:(t,e,r)=>{"use strict";r.d(e,{Blurhash:()=>C});var n=r(67294),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],o=t=>{let e=0;for(let r=0;r<t.length;r++){let n=t[r];e=83*e+i.indexOf(n)}return e},a=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},s=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},u=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),c=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},l=t=>{if(!t||t.length<6)throw new c("The blurhash string must be at least 6 characters");let e=o(t[0]),r=Math.floor(e/9)+1,n=e%9+1;if(t.length!==4+2*n*r)throw new c(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*n*r}`)},f=t=>{let e=t>>8&255,r=255&t;return[a(t>>16),a(e),a(r)]},p=(t,e)=>{let r=Math.floor(t/361),n=Math.floor(t/19)%19,i=t%19;return[u((r-9)/9,2)*e,u((n-9)/9,2)*e,u((i-9)/9,2)*e]},d=(t,e,r,n)=>{l(t),n|=1;let i=o(t[0]),a=Math.floor(i/9)+1,u=i%9+1,c=(o(t[1])+1)/166,d=new Array(u*a);for(let e=0;e<d.length;e++)if(0===e){let r=o(t.substring(2,6));d[e]=f(r)}else{let r=o(t.substring(4+2*e,6+2*e));d[e]=p(r,c*n)}let h=4*e,g=new Uint8ClampedArray(h*r);for(let t=0;t<r;t++)for(let n=0;n<e;n++){let i=0,o=0,c=0;for(let s=0;s<a;s++)for(let a=0;a<u;a++){let l=Math.cos(Math.PI*n*a/e)*Math.cos(Math.PI*t*s/r),f=d[a+s*u];i+=f[0]*l,o+=f[1]*l,c+=f[2]*l}let l=s(i),f=s(o),p=s(c);g[4*n+0+t*h]=l,g[4*n+1+t*h]=f,g[4*n+2+t*h]=p,g[4*n+3+t*h]=255}return g},h=Object.defineProperty,g=Object.defineProperties,v=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,_=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))m.call(e,r)&&_(t,r,e[r]);if(y)for(var r of y(e))b.call(e,r)&&_(t,r,e[r]);return t},w=(t,e)=>g(t,v(e)),x=(t,e)=>{var r={};for(var n in t)m.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&y)for(var n of y(t))e.indexOf(n)<0&&b.call(t,n)&&(r[n]=t[n]);return r},E=class extends n.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:n}=this.props;if(this.canvas){let i=d(t,n,e,r),o=this.canvas.getContext("2d"),a=o.createImageData(n,e);a.data.set(i),o.putImageData(a,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:r,width:i}=t,o=x(t,["hash","height","width"]);return n.createElement("canvas",w(S({},o),{height:r,width:i,ref:this.handleRef}))}};E.defaultProps={height:128,width:128};var O={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"},C=class extends n.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:r,width:i,punch:o,resolutionX:a,resolutionY:s,style:u}=t,c=x(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return n.createElement("div",w(S({},c),{style:w(S({display:"inline-block",height:r,width:i},u),{position:"relative"})}),n.createElement(E,{hash:e,height:s,width:a,punch:o,style:O}))}};C.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32}},3961:(t,e,r)=>{"use strict";r.d(e,{default:()=>c});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function a(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function u(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return u(i)}},78720:(t,e,r)=>{"use strict";r.d(e,{useVirtual:()=>v});var n=r(67294);function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}var o,a=["bottom","height","left","right","top","width"],s=new Map,u=function t(){var e=[];s.forEach((function(t,r){var n,i,o=r.getBoundingClientRect();n=o,i=t.rect,void 0===n&&(n={}),void 0===i&&(i={}),a.some((function(t){return n[t]!==i[t]}))&&(t.rect=o,e.push(t))})),e.forEach((function(t){t.callbacks.forEach((function(e){return e(t.rect)}))})),o=window.requestAnimationFrame(t)};var c="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function l(t,e){void 0===e&&(e={width:0,height:0});var r=n.useState(t.current),i=r[0],a=r[1],l=n.useReducer(f,e),p=l[0],d=l[1],h=n.useRef(!1);return c((function(){t.current!==i&&a(t.current)})),c((function(){if(i&&!h.current){h.current=!0;var t=i.getBoundingClientRect();d({rect:t})}}),[i]),n.useEffect((function(){if(i){var t,e,r=(t=i,e=function(t){d({rect:t})},{observe:function(){var r=0===s.size;s.has(t)?s.get(t).callbacks.push(e):s.set(t,{rect:void 0,hasRectChanged:!1,callbacks:[e]}),r&&u()},unobserve:function(){var r=s.get(t);if(r){var n=r.callbacks.indexOf(e);n>=0&&r.callbacks.splice(n,1),r.callbacks.length||s.delete(t),s.size||cancelAnimationFrame(o)}}});return r.observe(),function(){r.unobserve()}}}),[i]),p}function f(t,e){var r=e.rect;return t.height!==r.height||t.width!==r.width?r:t}var p=function(){return 50},d=function(t){return t},h=function(t,e){return t[e?"offsetWidth":"offsetHeight"]},g=function(t){for(var e=Math.max(t.start-t.overscan,0),r=Math.min(t.end+t.overscan,t.size-1),n=[],i=e;i<=r;i++)n.push(i);return n};function v(t){var e,r=t.size,o=void 0===r?0:r,a=t.estimateSize,s=void 0===a?p:a,u=t.overscan,f=void 0===u?1:u,v=t.paddingStart,m=void 0===v?0:v,b=t.paddingEnd,_=void 0===b?0:b,S=t.parentRef,w=t.horizontal,x=t.scrollToFn,E=t.useObserver,O=t.initialRect,C=t.onScrollElement,k=t.scrollOffsetFn,M=t.keyExtractor,D=void 0===M?d:M,I=t.measureSize,A=void 0===I?h:I,T=t.rangeExtractor,R=void 0===T?g:T,B=w?"width":"height",P=w?"scrollLeft":"scrollTop",z=n.useRef({scrollOffset:0,measurements:[]}),L=n.useState(0),j=L[0],N=L[1];z.current.scrollOffset=j;var K=(E||l)(S,O)[B];z.current.outerSize=K;var q=n.useCallback((function(t){S.current&&(S.current[P]=t)}),[S,P]),F=x||q;x=n.useCallback((function(t){F(t,q)}),[q,F]);var U=n.useState({}),G=U[0],H=U[1],W=n.useCallback((function(){return H({})}),[]),V=n.useRef([]),Y=n.useMemo((function(){var t=V.current.length>0?Math.min.apply(Math,V.current):0;V.current=[];for(var e=z.current.measurements.slice(0,t),r=t;r<o;r++){var n=D(r),i=G[n],a=e[r-1]?e[r-1].end:m,u="number"==typeof i?i:s(r),c=a+u;e[r]={index:r,start:a,size:u,end:c,key:n}}return e}),[s,G,m,o,D]),X=((null==(e=Y[o-1])?void 0:e.end)||m)+_;z.current.measurements=Y,z.current.totalSize=X;var $=C?C.current:S.current,J=n.useRef(k);J.current=k,c((function(){if($){var t=function(t){var e=J.current?J.current(t):$[P];N(e)};return t(),$.addEventListener("scroll",t,{capture:!1,passive:!0}),function(){$.removeEventListener("scroll",t)}}N(0)}),[$,P]);var Z=function(t){var e=t.measurements,r=t.outerSize,n=t.scrollOffset,i=e.length-1,o=function(t){return e[t].start},a=y(0,i,o,n),s=a;for(;s<i&&e[s].end<n+r;)s++;return{start:a,end:s}}(z.current),Q=Z.start,tt=Z.end,et=n.useMemo((function(){return R({start:Q,end:tt,overscan:f,size:Y.length})}),[Q,tt,f,Y.length,R]),rt=n.useRef(A);rt.current=A;var nt=n.useMemo((function(){for(var t=[],e=function(e,r){var n=et[e],o=i(i({},Y[n]),{},{measureRef:function(t){if(t){var e=rt.current(t,w);if(e!==o.size){var r=z.current.scrollOffset;o.start<r&&q(r+(e-o.size)),V.current.push(n),H((function(t){var r;return i(i({},t),{},((r={})[o.key]=e,r))}))}}}});t.push(o)},r=0,n=et.length;r<n;r++)e(r);return t}),[et,q,w,Y]),it=n.useRef(!1);c((function(){it.current&&H({}),it.current=!0}),[s]);var ot=n.useCallback((function(t,e){var r=(void 0===e?{}:e).align,n=void 0===r?"start":r,i=z.current,o=i.scrollOffset,a=i.outerSize;"auto"===n&&(n=t<=o?"start":t>=o+a?"end":"start"),"start"===n?x(t):"end"===n?x(t-a):"center"===n&&x(t-a/2)}),[x]),at=n.useCallback((function(t,e){var r=void 0===e?{}:e,n=r.align,a=void 0===n?"auto":n,s=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(r,["align"]),u=z.current,c=u.measurements,l=u.scrollOffset,f=u.outerSize,p=c[Math.max(0,Math.min(t,o-1))];if(p){if("auto"===a)if(p.end>=l+f)a="end";else{if(!(p.start<=l))return;a="start"}var d="center"===a?p.start+p.size/2:"end"===a?p.end:p.start;ot(d,i({align:a},s))}}),[ot,o]),st=n.useCallback((function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];at.apply(void 0,e),requestAnimationFrame((function(){at.apply(void 0,e)}))}),[at]);return{virtualItems:nt,totalSize:X,scrollToOffset:ot,scrollToIndex:st,measure:W}}var y=function(t,e,r,n){for(;t<=e;){var i=(t+e)/2|0,o=r(i);if(o<n)t=i+1;else{if(!(o>n))return i;e=i-1}}return t>0?t-1:0}},50314:(t,e,r)=>{"use strict";function n(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(t){return!!t&&!!t[H]}function o(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===W}(t)||Array.isArray(t)||!!t[G]||!!(null===(e=t.constructor)||void 0===e?void 0:e[G])||p(t)||d(t))}function a(t,e,r){void 0===r&&(r=!1),0===s(t)?(r?Object.keys:V)(t).forEach((function(n){r&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(r,n){return e(n,r,t)}))}function s(t){var e=t[H];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:p(t)?2:d(t)?3:0}function u(t,e){return 2===s(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){return 2===s(t)?t.get(e):t[e]}function l(t,e,r){var n=s(t);2===n?t.set(e,r):3===n?(t.delete(e),t.add(r)):t[e]=r}function f(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function p(t){return K&&t instanceof Map}function d(t){return q&&t instanceof Set}function h(t){return t.o||t.t}function g(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Y(t);delete e[H];for(var r=V(e),n=0;n<r.length;n++){var i=r[n],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function v(t,e){return void 0===e&&(e=!1),m(t)||i(t)||!o(t)||(s(t)>1&&(t.set=t.add=t.clear=t.delete=y),Object.freeze(t),e&&a(t,(function(t,e){return v(e,!0)}),!0)),t}function y(){n(2)}function m(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function b(t){var e=X[t];return e||n(18,t),e}function _(){return j}function S(t,e){e&&(b("Patches"),t.u=[],t.s=[],t.v=e)}function w(t){x(t),t.p.forEach(O),t.p=null}function x(t){t===j&&(j=t.l)}function E(t){return j={p:[],l:j,h:t,m:!0,_:0}}function O(t){var e=t[H];0===e.i||1===e.i?e.j():e.O=!0}function C(t,e){e._=e.p.length;var r=e.p[0],i=void 0!==t&&t!==r;return e.h.g||b("ES5").S(e,t,i),i?(r[H].P&&(w(e),n(4)),o(t)&&(t=k(e,t),e.l||D(e,t)),e.u&&b("Patches").M(r[H].t,t,e.u,e.s)):t=k(e,r,[]),w(e),e.u&&e.v(e.u,e.s),t!==U?t:void 0}function k(t,e,r){if(m(e))return e;var n=e[H];if(!n)return a(e,(function(i,o){return M(t,n,e,i,o,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return D(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=g(n.k):n.o;a(3===n.i?new Set(i):i,(function(e,o){return M(t,n,i,e,o,r)})),D(t,i,!1),r&&t.u&&b("Patches").N(n,r,t.u,t.s)}return n.o}function M(t,e,r,n,a,s){if(i(a)){var c=k(t,a,s&&e&&3!==e.i&&!u(e.R,n)?s.concat(n):void 0);if(l(r,n,c),!i(c))return;t.m=!1}if(o(a)&&!m(a)){if(!t.h.D&&t._<1)return;k(t,a),e&&e.A.l||D(t,a)}}function D(t,e,r){void 0===r&&(r=!1),t.h.D&&t.m&&v(e,r)}function I(t,e){var r=t[H];return(r?h(r):t)[e]}function A(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function T(t){t.P||(t.P=!0,t.l&&T(t.l))}function R(t){t.o||(t.o=g(t.t))}function B(t,e,r){var n=p(e)?b("MapSet").F(e,r):d(e)?b("MapSet").T(e,r):t.g?function(t,e){var r=Array.isArray(t),n={i:r?1:0,A:e?e.A:_(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},i=n,o=$;r&&(i=[n],o=J);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return n.k=u,n.j=s,u}(e,r):b("ES5").J(e,r);return(r?r.A:_()).p.push(n),n}function P(t){return i(t)||n(22,t),function t(e){if(!o(e))return e;var r,n=e[H],i=s(e);if(n){if(!n.P&&(n.i<4||!b("ES5").K(n)))return n.t;n.I=!0,r=z(e,i),n.I=!1}else r=z(e,i);return a(r,(function(e,i){n&&c(n.t,e)===i||l(r,e,t(i))})),3===i?new Set(r):r}(t)}function z(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return g(t)}r.d(e,{current:()=>P,produce:()=>tt});var L,j,N="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),K="undefined"!=typeof Map,q="undefined"!=typeof Set,F="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,U=N?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),G=N?Symbol.for("immer-draftable"):"__$immer_draftable",H=N?Symbol.for("immer-state"):"__$immer_state",W=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),V="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Y=Object.getOwnPropertyDescriptors||function(t){var e={};return V(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},X={},$={get:function(t,e){if(e===H)return t;var r=h(t);if(!u(r,e))return function(t,e,r){var n,i=A(e,r);return i?"value"in i?i.value:null===(n=i.get)||void 0===n?void 0:n.call(t.k):void 0}(t,r,e);var n=r[e];return t.I||!o(n)?n:n===I(t.t,e)?(R(t),t.o[e]=B(t.A.h,n,t)):n},has:function(t,e){return e in h(t)},ownKeys:function(t){return Reflect.ownKeys(h(t))},set:function(t,e,r){var n=A(h(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=I(h(t),e),o=null==i?void 0:i[H];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(f(r,i)&&(void 0!==r||u(t.t,e)))return!0;R(t),T(t)}return t.o[e]===r&&(void 0!==r||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==I(t.t,e)||e in t.t?(t.R[e]=!1,R(t),T(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=h(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:r[e]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){n(12)}},J={};a($,(function(t,e){J[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),J.deleteProperty=function(t,e){return J.set.call(this,t,e,void 0)},J.set=function(t,e,r){return $.set.call(this,t[0],e,r,t[0])};var Z=function(){function t(t){var e=this;this.g=F,this.D=!0,this.produce=function(t,r,i){if("function"==typeof t&&"function"!=typeof r){var a=r;r=t;var s=e;return function(t){var e=this;void 0===t&&(t=a);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return s.produce(t,(function(t){var n;return(n=r).call.apply(n,[e,t].concat(i))}))}}var u;if("function"!=typeof r&&n(6),void 0!==i&&"function"!=typeof i&&n(7),o(t)){var c=E(e),l=B(e,t,void 0),f=!0;try{u=r(l),f=!1}finally{f?w(c):x(c)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(t){return S(c,i),C(t,c)}),(function(t){throw w(c),t})):(S(c,i),C(u,c))}if(!t||"object"!=typeof t){if(void 0===(u=r(t))&&(u=t),u===U&&(u=void 0),e.D&&v(u,!0),i){var p=[],d=[];b("Patches").M(t,u,p,d),i(p,d)}return u}n(21,t)},this.produceWithPatches=function(t,r){if("function"==typeof t)return function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(e){return t.apply(void 0,[e].concat(i))}))};var n,i,o=e.produce(t,r,(function(t,e){n=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,i]})):[o,n,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){o(t)||n(8),i(t)&&(t=P(t));var e=E(this),r=B(this,t,void 0);return r[H].C=!0,x(e),r},e.finishDraft=function(t,e){var r=(t&&t[H]).A;return S(r,e),C(void 0,r)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!F&&n(20),this.g=t},e.applyPatches=function(t,e){var r;for(r=e.length-1;r>=0;r--){var n=e[r];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}r>-1&&(e=e.slice(r+1));var o=b("Patches").$;return i(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),Q=new Z,tt=Q.produce;Q.produceWithPatches.bind(Q),Q.setAutoFreeze.bind(Q),Q.setUseProxies.bind(Q),Q.applyPatches.bind(Q),Q.createDraft.bind(Q),Q.finishDraft.bind(Q)}}]);
Back to Directory File Manager