HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/refonte2023/wordpress/wp-content/plugins/give/build/formBuilderRegistrars.js
!function(){var e={4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)r.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},5573:function(e){"use strict";var t=/["'&<>]/;e.exports=function(e){var n,r=""+e,o=t.exec(r);if(!o)return r;var i="",a=0,l=0;for(a=o.index;a<r.length;a++){switch(r.charCodeAt(a)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}l!==a&&(i+=r.substring(l,a)),l=a+1,i+=n}return l!==a?i+r.substring(l,a):i}},8679:function(e,t,n){"use strict";var r=n(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var l=s(t),v=s(n),g=0;g<a.length;++g){var m=a[g];if(!(i[m]||r&&r[m]||v&&v[m]||l&&l[m])){var y=f(n,m);try{u(t,m,y)}catch(e){}}}}return t}},6103:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case v:case s:return e;default:return t}}case o:return t}}}function x(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=v,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||w(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===l||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===_||e.$$typeof===m)},t.typeOf=w},1296:function(e,t,n){"use strict";e.exports=n(6103)},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),o=n(401),i=n(7667),a=n(1327),l=n(1866);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},8407:function(e,t,n){var r=n(7040),o=n(4125),i=n(2117),a=n(7518),l=n(4705);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},7071:function(e,t,n){var r=n(852)(n(5639),"Map");e.exports=r},3369:function(e,t,n){var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),l=n(5265);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},3818:function(e,t,n){var r=n(852)(n(5639),"Promise");e.exports=r},8525:function(e,t,n){var r=n(852)(n(5639),"Set");e.exports=r},8668:function(e,t,n){var r=n(3369),o=n(619),i=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},6384:function(e,t,n){var r=n(8407),o=n(7465),i=n(3779),a=n(7599),l=n(4758),s=n(4309);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=l,u.prototype.set=s,e.exports=u},2139:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852)(n(5639),"WeakMap");e.exports=r},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},4636:function(e,t,n){var r=n(2545),o=n(5694),i=n(1469),a=n(4144),l=n(5776),s=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),d=!n&&!c&&a(e),f=!n&&!c&&!d&&s(e),p=n||c||d||f,h=p?r(e.length,String):[],v=h.length;for(var g in e)!t&&!u.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||l(g,v))||h.push(g);return h}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},8866:function(e,t,n){var r=n(2488),o=n(1469);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4239:function(e,t,n){var r=n(2139),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},9454:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),o=n(7005);e.exports=function e(t,n,i,a,l){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,l))}},2492:function(e,t,n){var r=n(6384),o=n(7114),i=n(8351),a=n(6096),l=n(4160),s=n(1469),u=n(4144),c=n(6719),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,m){var y=s(e),b=s(t),_=y?f:l(e),w=b?f:l(t),x=(_=_==d?p:_)==p,E=(w=w==d?p:w)==p,O=_==w;if(O&&u(e)){if(!u(t))return!1;y=!0,x=!1}if(O&&!x)return m||(m=new r),y||c(e)?o(e,t,n,v,g,m):i(e,t,_,n,v,g,m);if(!(1&n)){var C=x&&h.call(e,"__wrapped__"),k=E&&h.call(t,"__wrapped__");if(C||k){var N=C?e.value():e,A=k?t.value():t;return m||(m=new r),g(N,A,n,v,m)}}return!!O&&(m||(m=new r),a(e,t,n,v,g,m))}},8458:function(e,t,n){var r=n(3560),o=n(5346),i=n(3218),a=n(346),l=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,d=u.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:l).test(a(e))}},8749:function(e,t,n){var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},280:function(e,t,n){var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,a,l,s){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=-1,v=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],y=t[h];if(a)var b=u?a(y,m,h,t,e,s):a(m,y,h,e,t,s);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(m===e||l(m,e,n,a,s)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!l(m,y,n,a,s)){v=!1;break}}return s.delete(e),s.delete(t),v}},8351:function(e,t,n){var r=n(2139),o=n(1149),i=n(7813),a=n(7114),l=n(8776),s=n(1814),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=l;case"[object Set]":var h=1&r;if(p||(p=s),e.size!=t.size&&!h)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var g=a(p(e),p(t),r,u,d,f);return f.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,l){var s=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!s)return!1;for(var d=c;d--;){var f=u[d];if(!(s?f in t:o.call(t,f)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var v=!0;l.set(e,t),l.set(t,e);for(var g=s;++d<c;){var m=e[f=u[d]],y=t[f];if(i)var b=s?i(y,m,f,t,e,l):i(m,y,f,e,t,l);if(!(void 0===b?m===y||a(m,y,n,i,l):b)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(v=!1)}return l.delete(e),l.delete(t),v}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),o=n(9551),i=n(3674);e.exports=function(e){return r(e,i,o)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:function(e,t,n){var r=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},9607:function(e,t,n){var r=n(2139),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},9551:function(e,t,n){var r=n(4963),o=n(479),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=l},4160:function(e,t,n){var r=n(8552),o=n(7071),i=n(3818),a=n(8525),l=n(577),s=n(4239),u=n(346),c="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",v=u(r),g=u(o),m=u(i),y=u(a),b=u(l),_=s;(r&&_(new r(new ArrayBuffer(1)))!=h||o&&_(new o)!=c||i&&_(i.resolve())!=d||a&&_(new a)!=f||l&&_(new l)!=p)&&(_=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case v:return h;case g:return c;case m:return d;case y:return f;case b:return p}return t}),e.exports=_},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},4e3:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(4e3),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},6095:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),a=n(45),l=n(46),s=n(47),u=n(48),c=n(49),d=n(12),f=n(32),p=n(33),h=n(31),v=n(1),g={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:a.default,Block:s.default,Inline:l.default,Text:c.default,Attributor:{Attribute:d.default,Class:f.default,Style:p.default,Store:h.default}};t.default=g},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return o(t,e),t}(Error);t.ParchmentError=i;var a,l={},s={},u={},c={};function d(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=c[e]||l[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=c.block:e&a.LEVEL&a.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=s[r[o]])break;n=n||u[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(a=t.Scope||(t.Scope={})),t.create=function(e,t){var n=d(e);if(null==n)throw new i("Unable to create "+e+" blot");var r=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(o,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=d,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map((function(t){return e(t)}));var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?l[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=u[e]&&null!=r.className||(u[e]=r)})))),r}},function(e,t,n){var r=n(51),o=n(11),i=n(3),a=n(20),l=String.fromCharCode(0),s=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};s.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},s.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},s.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},s.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},s.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},s.prototype.filter=function(e){return this.ops.filter(e)},s.prototype.forEach=function(e){this.ops.forEach(e)},s.prototype.map=function(e){return this.ops.map(e)},s.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},s.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},s.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},s.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},s.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),o=0;o<t&&r.hasNext();){var i;o<e?i=r.next(e-o):(i=r.next(t-o),n.push(i)),o+=a.length(i)}return new s(n)},s.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var l=i.retain;"insert"===t.peekType()&&t.peekLength()<=l;)l-=t.peekLength(),r.push(t.next());i.retain-l>0&&n.next(i.retain-l)}for(var u=new s(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),f=n.next(c);if("number"==typeof f.retain){var p={};"number"==typeof d.retain?p.retain=c:p.insert=d.insert;var h=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(h&&(p.attributes=h),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var v=new s(t.rest());return u.concat(v).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&u.push(f)}return u.chop()},s.prototype.concat=function(e){var t=new s(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},s.prototype.diff=function(e,t){if(this.ops===e.ops)return new s;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new s,u=r(n[0],n[1],t),c=a.iterator(this.ops),d=a.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),t);var l=c.next(n),s=d.next(n);o(l.insert,s.insert)?i.retain(n,a.attributes.diff(l.attributes,s.attributes)):i.push(s).delete(n)}t-=n}})),i.chop()},s.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=a.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(t,l)-l:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&e(r,{},o)},s.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),l=n.next(i),u=r.next(i);if(l.delete)continue;u.delete?o.push(u):o.retain(i,a.attributes.transform(l.attributes,u.attributes,t))}else o.retain(a.length(n.next()));return o.chop()},s.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<e||!t)&&(e+=o),r+=o):e-=Math.min(o,e-r)}return e},e.exports=s},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},l=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},s=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(o=u(t,n))&&(h&&o&&(l(o)||(i=a(o)))?(i?(i=!1,c=r&&a(r)?r:[]):c=r&&l(r)?r:{},s(d,{name:n,newValue:e(h,c,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=d(n(3)),a=d(n(2)),l=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,[{key:"attach",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new l.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=l.default.query(e,l.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=l.default.create(g.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(l.default.Embed);v.scope=l.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return h(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(l.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),m(t))}),new a.default).insert("\n",m(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,i){n<=0||(l.default.query(r,l.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,i):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,i),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var i=n.split("\n"),a=i.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var l=this;i.reduce((function(e,t){return(l=l.split(e,!0)).insertAt(0,t),t.length}),e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(l.default.Block);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:m(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,l.default.Embed,c.default],t.bubbleFormats=m,t.BlockEmbed=v,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var a=g(n(2)),l=g(n(14)),s=g(n(8)),u=g(n(9)),c=g(n(0)),d=n(15),f=g(d),p=g(n(3)),h=g(n(10)),v=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,h.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=_(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;w.call(n,(function(){return n.editor.update(null,t,o)}),e)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var o=e.attrName||e.blotName;"string"==typeof o?this.register("formats/"+o,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,i=x(e,t,n),a=o(i,4);return e=a[0],t=a[1],n=a[3],w.call(this,(function(){return r.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return w.call(this,(function(){var r=n.getSelection(!0),o=new a.default;if(null==r)return o;if(c.default.query(e,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,m({},e,t));else{if(0===r.length)return n.selection.format(e,t),o;o=n.editor.formatText(r.index,r.length,m({},e,t))}return n.setSelection(r,s.default.sources.SILENT),o}),r)}},{key:"formatLine",value:function(e,t,n,r,i){var a,l=this,s=x(e,t,n,r,i),u=o(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],w.call(this,(function(){return l.editor.formatLine(e,t,a)}),i,e,0)}},{key:"formatText",value:function(e,t,n,r,i){var a,l=this,s=x(e,t,n,r,i),u=o(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],w.call(this,(function(){return l.editor.formatText(e,t,a)}),i,e,0)}},{key:"getBounds",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t="number"==typeof e?this.selection.getBounds(e,n):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:t.bottom-r.top,height:t.height,left:t.left-r.left,right:t.right-r.left,top:t.top-r.top,width:t.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=x(e,t),r=o(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=x(e,t),r=o(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return w.call(this,(function(){return o.editor.insertEmbed(t,n,r)}),i,t)}},{key:"insertText",value:function(e,t,n,r,i){var a,l=this,s=x(e,0,n,r,i),u=o(s,4);return e=u[0],a=u[2],i=u[3],w.call(this,(function(){return l.editor.insertText(e,t,a)}),i,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,i=x(e,t,n),a=o(i,4);return e=a[0],t=a[1],n=a[3],w.call(this,(function(){return r.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return w.call(this,(function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),o=t.editor.applyDelta(e),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),o.delete(1)),r.compose(o)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=x(t,n,r),a=o(i,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new d.Range(t,n),r),r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return w.call(this,(function(){return e=new a.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function _(e,t){if((t=(0,p.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=v.default;var n=(0,p.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,p.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function w(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new a.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,l=e();if(null!=o&&(!0===n&&(n=o.index),null==r?o=E(o,l,t):0!==r&&(o=E(o,n,r,t)),this.setSelection(o,s.default.sources.SILENT)),l.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,l,i,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return l}function x(e,t,n,o,i){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=o,o=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=o,o=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(a=n,i=o):"string"==typeof n&&(null!=o?a[n]=o:i=n),[e,t,a,i=i||s.default.sources.API]}function E(e,t,n,r){if(null==e)return null;var i=void 0,l=void 0;if(t instanceof a.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==s.default.sources.USER)})),c=o(u,2);i=c[0],l=c[1]}else{var f=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&r===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),p=o(f,2);i=p[0],l=p[1]}return new d.Range(i,l-i)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=s.default.events,b.sources=s.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":v.default},t.expandConfig=_,t.overload=x,t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=l(n(7)),a=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,i){if(t.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var l=this.isolate(e,n);i&&l.wrap(r,i)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i)}},{key:"optimize",value:function(e){if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),o=t.order.indexOf(n);return r>=0||o>=0?r-o:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);s.allowedChildren=[s,a.default.Embed,i.default],s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var l=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(e){document.addEventListener(e,(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)}))}))}));var s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",l.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){l.log.apply(l,arguments),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach((function(t){var r=t.node,o=t.handler;(e.target===r||r.contains(e.target))&&o.apply(void 0,[e].concat(n))}))}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(i.default);s.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},s.sources={API:"api",SILENT:"silent",USER:"user"},t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(e){if(r.indexOf(e)<=r.indexOf(o)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(t=console)[e].apply(t,i)}}function a(e){return r.reduce((function(t,n){return t[n]=i.bind(console,n,e),t}),{})}i.level=a.level=function(e){o=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,o=n(52),i=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var u,c;if(l(e)||l(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(s(e)){if(!s(t))return!1;if(e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var d=o(e),f=o(t)}catch(e){return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),u=d.length-1;u>=0;u--)if(d[u]!=f[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function l(e){return null==e}function s(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=d(n(2)),l=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),t}(u.default);v.blotName="code",v.tagName="CODE";var g=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),o(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce((function(t,n){return t.insert(n).insert("\n",e.formats())}),new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var o=this.descendant(c.default,this.length()-1),a=r(o,1)[0];null!=a&&a.deleteAt(a.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,o){if(0!==n&&null!=l.default.query(r,l.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var a=this.newlineIndex(e,!0)+1,s=i-a+1,u=this.isolate(a,s),c=u.next;u.format(r,o),c instanceof t&&c.formatAt(0,e-a+n-s,r,o)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var o=this.descendant(c.default,e),i=r(o,2),a=i[0],l=i[1];a.insertAt(l,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=l.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof l.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",t.Code=v,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=m(n(2)),l=m(n(20)),s=m(n(0)),u=m(n(13)),c=m(n(24)),d=n(4),f=m(d),p=m(n(16)),h=m(n(21)),v=m(n(11)),g=m(n(3));function m(e){return e&&e.__esModule?e:{default:e}}var y=/^[ -~]*$/,b=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,h.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,h.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)}),new a.default)}(e)).reduce((function(e,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var p=a.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),e>=i&&!p.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,p);var h=t.scroll.line(e),v=o(h,2),m=v[0],y=v[1],b=(0,g.default)({},(0,d.bubbleFormats)(m));if(m instanceof f.default){var _=m.descendant(s.default.Leaf,y),w=o(_,1)[0];b=(0,g.default)(b,(0,d.bubbleFormats)(w))}c=l.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return e;t.scroll.insertAt(e,x,a.insert[x])}i+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(e,Math.max(t,1)),a=t;i.forEach((function(t){var i=t.length();if(t instanceof u.default){var l=e-t.offset(n.scroll),s=t.newlineIndex(l+a)-l+1;t.formatAt(l,s,o,r[o])}else t.format(o,r[o]);a-=i}))}})),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(o){n.scroll.formatAt(e,t,o,r[o])})),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=o(e,1)[0];t instanceof f.default?n.push(t):t instanceof s.default.Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(s.default.Leaf,e,t));var i=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,d.bubbleFormats)(n),t)}return t}));return g.default.apply(g.default,i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach((function(o){n.scroll.formatAt(e,t.length,o,r[o])})),this.update((new a.default).retain(e).insert(t,(0,h.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===f.default.blotName&&!(e.children.length>1)&&e.children.head instanceof p.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),i=o(r,2),l=i[0],s=i[1],c=0,d=new a.default;null!=l&&(c=l instanceof u.default?l.newlineIndex(s)-s+1:l.length()-s,d=l.delta().slice(s,s+c-1).insert("\n"));var f=this.getContents(e,t+c).diff((new a.default).insert(n).concat(d)),p=(new a.default).retain(e).concat(f);return this.applyDelta(p)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&s.default.find(t[0].target)){var o=s.default.find(t[0].target),i=(0,d.bubbleFormats)(o),l=o.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),p=(new a.default).insert(o.value());e=(new a.default).retain(l).concat(f.diff(p,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,v.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(0)),a=u(n(21)),l=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=(0,u(n(10)).default)("quill:selection"),p=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var r=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&r.update(s.default.sources.SILENT)})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}}))}})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,o=n.startNode,i=n.startOffset,a=n.endNode,l=n.endOffset;r.setNativeRange(o,i,a,l)}})),this.update(s.default.sources.SILENT)}return o(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(s.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var o=void 0,i=this.scroll.leaf(e),a=r(i,2),l=a[0],s=a[1];if(null==l)return null;var u=l.position(s,!0),c=r(u,2);o=c[0],s=c[1];var d=document.createRange();if(t>0){d.setStart(o,s);var f=this.scroll.leaf(e+t),p=r(f,2);if(l=p[0],s=p[1],null==l)return null;var h=l.position(s,!0),v=r(h,2);return o=v[0],s=v[1],d.setEnd(o,s),d.getBoundingClientRect()}var g="left",m=void 0;return o instanceof Text?(s<o.data.length?(d.setStart(o,s),d.setEnd(o,s+1)):(d.setStart(o,s-1),d.setEnd(o,s),g="right"),m=d.getBoundingClientRect()):(m=l.domNode.getBoundingClientRect(),s>0&&(g="right")),{bottom:m.top+m.height,height:m.height,left:m[g],right:m[g],top:m.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var o=n.map((function(e){var n=r(e,2),o=n[0],a=n[1],l=i.default.find(o,!0),s=l.offset(t.scroll);return 0===a?s:l instanceof i.default.Container?s+l.length():s+l.index(o,a)})),a=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),l=Math.min.apply(Math,[a].concat(c(o)));return new p(l,a-l)}},{key:"normalizeNative",value:function(e){if(!v(this.root,e.startContainer)||!e.collapsed&&!v(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],o=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var a,l=t.scroll.leaf(e),s=r(l,2),u=s[0],c=s[1],d=u.position(c,0!==n),f=r(d,2);a=f[0],c=f[1],o.push(a,c)})),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,o)),a=r(i,1)[0],l=a;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,o));l=r(s,1)[0]}if(null!=a&&null!=l){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||o||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(e,t),l.setEnd(n,r),i.removeAllRanges(),i.addRange(l)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),f.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[s.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(f)),e!==s.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),e}();function v(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=p,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);a.blotName="break",a.tagName="BR",t.default=a},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),a=n(30),l=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return o(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach((function(e){e.attach()}))},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof l.ParchmentError)return;throw e}}))},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(function(e,t,n){e.deleteAt(t,n)}))},t.prototype.descendant=function(e,n){var r=this.children.find(n),o=r[0],i=r[1];return null==e.blotName&&e(o)||null!=e.blotName&&o instanceof e?[o,i]:o instanceof t?o.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&o.push(n),n instanceof t&&(o=o.concat(n.descendants(e,r,i))),i-=a})),o},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,(function(e,t,o){e.formatAt(t,o,n,r)}))},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),o=r[0],i=r[1];if(o)o.insertAt(i,t,n);else{var a=null==n?l.create("text",t):l.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(t){return e instanceof t})))throw new l.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce((function(e,t){return e+t.length()}),0)},t.prototype.moveChildren=function(e,t){this.children.forEach((function(n){e.insertBefore(n,t)}))},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),o=r[0],i=r[1],a=[[this,e]];return o instanceof t?a.concat(o.path(i,n)):(null!=o&&a.push([o,i]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),(function(e,r,o){e=e.split(r,t),n.appendChild(e)})),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],o=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),o.push.apply(o,e.removedNodes))})),o.forEach((function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=l.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}})),r.filter((function(e){return e.parentNode==n.domNode})).sort((function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(e){var t=null;null!=e.nextSibling&&(t=l.find(e.nextSibling));var r=u(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))}))},t}(a.default);function u(e){var t=l.find(e);if(null==t)try{t=l.create(e)}catch(n){t=l.create(l.Scope.INLINE),[].slice.call(e.childNodes).forEach((function(e){t.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(31),l=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return o(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===r.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,r){var o=e.prototype.wrap.call(this,n,r);return o instanceof t&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},t}(l.default);t.default=u},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){var r=n(11),o=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=o(!0,{},t);for(var i in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)void 0!==e[i]&&void 0===t[i]&&(r[i]=e[i]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,o){return r(e[o],t[o])||(n[o]=void 0===t[o]?null:t[o]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce((function(n,r){return void 0===e[r]&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=i.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var o={};return t.attributes&&(o.attributes=t.attributes),"number"==typeof t.retain?o.retain=e:"string"==typeof t.insert?o.insert=t.insert.substr(n,e):o.insert=t.insert,o}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=i},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){r=function(){}}function o(i,l,s,u,c){"object"==typeof l&&(s=l.depth,u=l.prototype,c=l.includeNonEnumerable,l=l.circular);var d=[],f=[],p="undefined"!=typeof Buffer;return void 0===l&&(l=!0),void 0===s&&(s=1/0),function i(s,h){if(null===s)return null;if(0===h)return s;var v,g;if("object"!=typeof s)return s;if(e(s,t))v=new t;else if(e(s,n))v=new n;else if(e(s,r))v=new r((function(e,t){s.then((function(t){e(i(t,h-1))}),(function(e){t(i(e,h-1))}))}));else if(o.__isArray(s))v=[];else if(o.__isRegExp(s))v=new RegExp(s.source,a(s)),s.lastIndex&&(v.lastIndex=s.lastIndex);else if(o.__isDate(s))v=new Date(s.getTime());else{if(p&&Buffer.isBuffer(s))return v=Buffer.allocUnsafe?Buffer.allocUnsafe(s.length):new Buffer(s.length),s.copy(v),v;e(s,Error)?v=Object.create(s):void 0===u?(g=Object.getPrototypeOf(s),v=Object.create(g)):(v=Object.create(u),g=u)}if(l){var m=d.indexOf(s);if(-1!=m)return f[m];d.push(s),f.push(v)}for(var y in e(s,t)&&s.forEach((function(e,t){var n=i(t,h-1),r=i(e,h-1);v.set(n,r)})),e(s,n)&&s.forEach((function(e){var t=i(e,h-1);v.add(t)})),s){var b;g&&(b=Object.getOwnPropertyDescriptor(g,y)),b&&null==b.set||(v[y]=i(s[y],h-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(y=0;y<_.length;y++){var w=_[y];(!(E=Object.getOwnPropertyDescriptor(s,w))||E.enumerable||c)&&(v[w]=i(s[w],h-1),E.enumerable||Object.defineProperty(v,w,{enumerable:!1}))}}if(c){var x=Object.getOwnPropertyNames(s);for(y=0;y<x.length;y++){var E,O=x[y];(E=Object.getOwnPropertyDescriptor(s,O))&&E.enumerable||(v[O]=i(s[O],h-1),Object.defineProperty(v,O,{enumerable:!1}))}}return v}(i,s)}function i(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return o.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},o.__objToStr=i,o.__isDate=function(e){return"object"==typeof e&&"[object Date]"===i(e)},o.__isArray=function(e){return"object"==typeof e&&"[object Array]"===i(e)},o.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===i(e)},o.__getRegExpFlags=a,o}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=p(n(0)),l=p(n(8)),s=n(4),u=p(s),c=p(n(16)),d=p(n(13)),f=p(n(25));function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return e instanceof u.default||e instanceof s.BlockEmbed}var v=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var o=this.line(e),a=r(o,2),l=a[0],u=a[1],f=this.line(e+n),p=r(f,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=p&&l!==p&&u>0){if(l instanceof s.BlockEmbed||p instanceof s.BlockEmbed)return void this.optimize();if(l instanceof d.default){var h=l.newlineIndex(l.length(),!0);if(h>-1&&(l=l.split(h+1))===p)return void this.optimize()}else if(p instanceof d.default){var v=p.newlineIndex(0);v>-1&&p.split(v+1)}var g=p.children.head instanceof c.default?null:p.children.head;l.moveChildren(p,g),l.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var o=a.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var l=a.default.create(n,r);this.appendChild(l)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(h,e)}},{key:"lines",value:function(){return function e(t,n,r){var o=[],i=r;return t.children.forEachAt(n,r,(function(t,n,r){h(t)?o.push(t):t instanceof a.default.Container&&(o=o.concat(e(t,n,i))),i-=r})),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[u.default,s.BlockEmbed,f.default],t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=v(n(21)),l=v(n(11)),s=v(n(3)),u=v(n(2)),c=v(n(20)),d=v(n(0)),f=v(n(5)),p=v(n(10)),h=v(n(9));function v(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=(0,p.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])})),r.addBinding({key:t.keys.ENTER,shiftKey:null},O),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0},x)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},E),r.addBinding({key:t.keys.DELETE},{collapsed:!1},E),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"match",value:function(e,t){return t=N(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),i(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=N(e);if(null==r||null==r.key)return m.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,s.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,a=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=e.quill.getLine(s.index),c=o(u,2),f=c[0],p=c[1],h=e.quill.getLeaf(s.index),v=o(h,2),g=v[0],m=v[1],y=0===s.length?[g,m]:e.quill.getLeaf(s.index+s.length),b=o(y,2),_=b[0],w=b[1],x=g instanceof d.default.Text?g.value().slice(0,m):"",E=_ instanceof d.default.Text?_.value().slice(w):"",O={collapsed:0===s.length,empty:0===s.length&&f.length()<=1,format:e.quill.getFormat(s),offset:p,prefix:x,suffix:E};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==O.collapsed)return!1;if(null!=t.empty&&t.empty!==O.empty)return!1;if(null!=t.offset&&t.offset!==O.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==O.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=O.format[e]:!1===t.format[e]?null==O.format[e]:(0,l.default)(t.format[e],O.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(O.prefix)||null!=t.suffix&&!t.suffix.test(O.suffix)||!0===t.handler.call(e,s,O))}))&&n.preventDefault()}}}}))}}]),t}(h.default);function _(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof d.default.Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),1))})),n}function w(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=o(n,1)[0],i={};if(0===t.offset){var a=this.quill.getLine(e.index-1),l=o(a,1)[0];if(null!=l&&l.length()>1){var s=r.formats(),u=this.quill.getFormat(e.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,f.default.sources.USER),this.quill.focus()}}function x(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},i=0,a=this.quill.getLine(e.index),l=o(a,1)[0];if(t.offset>=l.length()-1){var s=this.quill.getLine(e.index+1),u=o(s,1)[0];if(u){var d=l.formats(),p=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(d,p)||{},i=u.length()}}this.quill.deleteText(e.index,n,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+i-1,n,r,f.default.sources.USER)}}function E(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),o=t[t.length-1].formats();n=c.default.attributes.diff(o,r)||{}}this.quill.deleteText(e,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,f.default.sources.USER),this.quill.setSelection(e.index,f.default.sources.SILENT),this.quill.focus()}function O(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],f.default.sources.USER))}))}function C(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),r=t.index,i=t.length,a=this.quill.scroll.descendant(n,r),l=o(a,2),s=l[0],u=l[1];if(null!=s){var c=this.quill.getIndex(s),p=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),v=s.domNode.textContent.slice(p,h).split("\n");u=0,v.forEach((function(t,o){e?(s.insertAt(p+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=t.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(r,i,f.default.sources.SILENT)}}}}function k(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],f.default.sources.USER)}}}function N(e){if("string"==typeof e||"number"==typeof e)return N({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:k("bold"),italic:k("italic"),underline:k("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,f.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),r=n[0],i=n[1],a=(0,s.default)({},r.formats(),{list:"checked"}),l=(new u.default).retain(e.index).insert("\n",a).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=o(n,2),i=r[0],a=r[1],l=(new u.default).retain(e.index).insert("\n",t.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),i=o(r,2),a=i[0],l=i[1];if(l>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-l).delete(n+1).retain(a.length()-2-l).retain(1,{list:s});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),r=n[0],i=n[1],a=(new u.default).retain(e.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var o=this,a=0;null!=o&&o.statics.scope!==i.default.Scope.BLOCK_BLOT;)a+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(a,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var s=[e,n.start.offset,n.end.offset];r=s[0],o=s[1],l=s[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(i.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([o,l].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),2);return o=c[0],l=c[1],{startNode:r,startOffset:o,endNode:r,endOffset:l}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(i.default.Embed);s.blotName="cursor",s.className="ql-cursor",s.tagName="span",s.CONTENTS="\ufeff",t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),o=n(4),i=a(o);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);l.allowedChildren=[i.default,o.BlockEmbed,l],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"value",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(a.default.Attributor.Style),s=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),u=new l("color","color",{scope:a.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=s,t.ColorStyle=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=a,t.sanitize=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=l(n(23)),a=l(n(107));function l(e){return e&&e.__esModule?e:{default:e}}var s=0;function u(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(e){switch(e.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return o(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",(function(){t.selectItem(n,!0)})),n.addEventListener("keydown",(function(e){switch(e.keyCode){case i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.default.keys.ESCAPE:t.escape(),e.preventDefault()}})),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+s,s+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)})),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach((function(t){e.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout((function(){return e.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=m(n(0)),o=m(n(5)),i=n(4),a=m(i),l=m(n(16)),s=m(n(25)),u=m(n(24)),c=m(n(35)),d=m(n(6)),f=m(n(22)),p=m(n(7)),h=m(n(55)),v=m(n(42)),g=m(n(23));function m(e){return e&&e.__esModule?e:{default:e}}o.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":p.default,"modules/clipboard":h.default,"modules/history":v.default,"modules/keyboard":g.default}),r.default.register(a.default,l.default,u.default,d.default,f.default,p.default),t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,o){var i=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);i.wrap(a),a.format(n,o)}},e.prototype.insertAt=function(e,t,n){var o=null==n?r.create("text",t):r.create(t,n),i=this.split(e);this.parent.insertBefore(o,i)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),a=n(1),l=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=o.default.keys(this.domNode),l=i.default.keys(this.domNode);t.concat(n).concat(l).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});function i(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach((function(t){null==e.modules[t]&&e.addModule(t)}))}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();o.DEFAULTS={modules:{}},o.themes={default:o},t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var s="\ufeff",u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(e){n.contentNode.appendChild(e)})),n.leftGuard=document.createTextNode(s),n.rightGuard=document.createTextNode(s),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(s).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var o=this.prev.length();this.prev.insertAt(o,r),t={startNode:this.prev.domNode,startOffset:o+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=s,t}},{key:"update",value:function(e,t){var n=this;e.forEach((function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}}))}}]),t}(i.default.Embed);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new o.default.Attributor.Attribute("align","align",i),l=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);t.AlignAttribute=a,t.AlignClass=l,t.AlignStyle=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},i=n(26),a=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new i.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},a=new o.default.Attributor.Attribute("direction","dir",i),l=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=a,t.DirectionClass=l,t.DirectionStyle=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},l={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},s=new a.default.Attributor.Class("font","ql-font",l),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"value",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(a.default.Attributor.Style),c=new u("font","font-family",l);t.FontStyle=c,t.FontClass=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},i=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=a},function(e,t,n){"use strict";e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=a(n(0)),i=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,(function(e,t,n,o){e!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==i.default.sources.USER?r.transform(t):r.record(t,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],i.default.sources.USER),this.ignoreChange=!1;var r=s(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),e=o.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function s(e){var t=e.reduce((function(e,t){return e+(t.delete||0)}),0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=o.default.query(e,o.default.Scope.BLOCK)})))}(e)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=h(n(3)),a=h(n(2)),l=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),d=h(n(60)),f=h(n(28)),p=h(n(61));function h(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],w=["1","2","3",!1],x=["small",!1,"large","huge"],E=function(e){function t(e,n){v(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,(function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(e){e.container.contains(n.target)||e.close()}))})),r}return m(t,e),r(t,[{key:"addModule",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach((function(e){(e.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}))}))}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map((function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&C(e,y),new d.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&C(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?C(e,_):e.classList.contains("ql-header")?C(e,w):e.classList.contains("ql-size")&&C(e,x)),new f.default(e)})),this.quill.on(l.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(e){e.update()}))}))}}]),t}(u.default);E.DEFAULTS=(0,i.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),l.default.sources.USER),e.quill.setSelection(r.index+1,l.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var O=function(e){function t(e,n){v(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return m(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.default.match(t,"escape")&&(e.cancel(),t.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,l.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var o=this.quill.getSelection(!0);if(null!=o){var i=o.index+o.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",l.default.sources.USER),this.quill.setSelection(i+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(p.default);function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=O,t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(e<o||t&&e===o&&(null==n.next||0!==n.next.length()))return[n,e];e-=o}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,o=this.find(e),i=o[0],a=e-o[1],l=this.iterator(i);(r=l())&&a<e+t;){var s=r.length();e>a?n(r,e-a,Math.min(t,a+s-e)):n(r,0,Math.min(s,e+t-a)),a+=s}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),a=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,l),n.attach(),n}return o(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,o){this.update(),e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)t.push(o.pop());for(var l=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&l(e.parent))},s=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof i.default&&e.children.forEach(s),e.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(l(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);l(t,!1),t instanceof i.default&&t.children.forEach((function(e){l(e,!1)}))}))):"attributes"===e.type&&l(t.prev)),l(t))})),this.children.forEach(s),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)t.push(o.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,o){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof t&&o.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,o){null!=a.query(r,a.Scope.BLOCK)?this.format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var o=this.split(t),i=a.create(n,r);o.parent.insertBefore(i,o)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,o){0===t&&n===this.length()?this.format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return o(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:o.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(t=n[i],e.call(o,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,r=1,o=0;function i(e,t,c){if(e==t)return e?[[o,e]]:[];(c<0||e.length<c)&&(c=null);var f=l(e,t),p=e.substring(0,f);f=s(e=e.substring(f),t=t.substring(f));var h=e.substring(e.length-f),v=function(e,t){var u;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,d=e.length>t.length?t:e,f=c.indexOf(d);if(-1!=f)return u=[[r,c.substring(0,f)],[o,d],[r,c.substring(f+d.length)]],e.length>t.length&&(u[0][0]=u[2][0]=n),u;if(1==d.length)return[[n,e],[r,t]];var p=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function o(e,t,n){for(var r,o,i,a,u=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(u,c+1));){var f=l(e.substring(n),t.substring(c)),p=s(e.substring(0,n),t.substring(0,c));d.length<p+f&&(d=t.substring(c-p,c)+t.substring(c,c+f),r=e.substring(0,n-p),o=e.substring(n+f),i=t.substring(0,c-p),a=t.substring(c+f))}return 2*d.length>=e.length?[r,o,i,a,d]:null}var i,a,u,c,d,f=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));return f||p?(i=p?f&&f[4].length>p[4].length?f:p:f,e.length>t.length?(a=i[0],u=i[1],c=i[2],d=i[3]):(c=i[0],d=i[1],a=i[2],u=i[3]),[a,u,c,d,i[4]]):null}(e,t);if(p){var h=p[0],v=p[1],g=p[2],m=p[3],y=p[4],b=i(h,g),_=i(v,m);return b.concat([[o,y]],_)}return function(e,t){for(var o=e.length,i=t.length,l=Math.ceil((o+i)/2),s=l,u=2*l,c=new Array(u),d=new Array(u),f=0;f<u;f++)c[f]=-1,d[f]=-1;c[s+1]=0,d[s+1]=0;for(var p=o-i,h=p%2!=0,v=0,g=0,m=0,y=0,b=0;b<l;b++){for(var _=-b+v;_<=b-g;_+=2){for(var w=s+_,x=(N=_==-b||_!=b&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-_;N<o&&x<i&&e.charAt(N)==t.charAt(x);)N++,x++;if(c[w]=N,N>o)g+=2;else if(x>i)v+=2;else if(h&&(C=s+p-_)>=0&&C<u&&-1!=d[C]&&N>=(O=o-d[C]))return a(e,t,N,x)}for(var E=-b+m;E<=b-y;E+=2){for(var O,C=s+E,k=(O=E==-b||E!=b&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-E;O<o&&k<i&&e.charAt(o-O-1)==t.charAt(i-k-1);)O++,k++;if(d[C]=O,O>o)y+=2;else if(k>i)m+=2;else if(!h){var N;if((w=s+p-E)>=0&&w<u&&-1!=c[w]&&(x=s+(N=c[w])-w,N>=(O=o-O)))return a(e,t,N,x)}}}return[[n,e],[r,t]]}(e,t)}(e=e.substring(0,e.length-f),t=t.substring(0,t.length-f));return p&&v.unshift([o,p]),h&&v.push([o,h]),u(v),null!=c&&(v=function(e,t){var r=function(e,t){if(0===t)return[o,e];for(var r=0,i=0;i<e.length;i++){var a=e[i];if(a[0]===n||a[0]===o){var l=r+a[1].length;if(t===l)return[i+1,e];if(t<l){e=e.slice();var s=t-r,u=[a[0],a[1].slice(0,s)],c=[a[0],a[1].slice(s)];return e.splice(i,1,u,c),[i+1,e]}r=l}}throw new Error("cursor_pos is out of bounds!")}(e,t),i=r[1],a=r[0],l=i[a],s=i[a+1];if(null==l)return e;if(l[0]!==o)return e;if(null!=s&&l[1]+s[1]===s[1]+l[1])return i.splice(a,2,s,l),d(i,a,2);if(null!=s&&0===s[1].indexOf(l[1])){i.splice(a,2,[s[0],l[1]],[0,l[1]]);var u=s[1].slice(l[1].length);return u.length>0&&i.splice(a+2,0,[s[0],u]),d(i,a,3)}return e}(v,c)),function(e){for(var t=!1,i=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=2;a<e.length;a+=1)e[a-2][0]===o&&((l=e[a-2][1]).charCodeAt(l.length-1)>=55296&&l.charCodeAt(l.length-1)<=56319)&&e[a-1][0]===n&&i(e[a-1][1])&&e[a][0]===r&&i(e[a][1])&&(t=!0,e[a-1][1]=e[a-2][1].slice(-1)+e[a-1][1],e[a][1]=e[a-2][1].slice(-1)+e[a][1],e[a-2][1]=e[a-2][1].slice(0,-1));var l;if(!t)return e;var s=[];for(a=0;a<e.length;a+=1)e[a][1].length>0&&s.push(e[a]);return s}(v)}function a(e,t,n,r){var o=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=i(o,a),c=i(l,s);return u.concat(c)}function l(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(i,o)==t.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function s(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(e.length-o,e.length-i)==t.substring(t.length-o,t.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function u(e){e.push([o,""]);for(var t,i=0,a=0,c=0,d="",f="";i<e.length;)switch(e[i][0]){case r:c++,f+=e[i][1],i++;break;case n:a++,d+=e[i][1],i++;break;case o:a+c>1?(0!==a&&0!==c&&(0!==(t=l(f,d))&&(i-a-c>0&&e[i-a-c-1][0]==o?e[i-a-c-1][1]+=f.substring(0,t):(e.splice(0,0,[o,f.substring(0,t)]),i++),f=f.substring(t),d=d.substring(t)),0!==(t=s(f,d))&&(e[i][1]=f.substring(f.length-t)+e[i][1],f=f.substring(0,f.length-t),d=d.substring(0,d.length-t))),0===a?e.splice(i-c,a+c,[r,f]):0===c?e.splice(i-a,a+c,[n,d]):e.splice(i-a-c,a+c,[n,d],[r,f]),i=i-a-c+(a?1:0)+(c?1:0)+1):0!==i&&e[i-1][0]==o?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,c=0,a=0,d="",f=""}""===e[e.length-1][1]&&e.pop();var p=!1;for(i=1;i<e.length-1;)e[i-1][0]==o&&e[i+1][0]==o&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),p=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),p=!0)),i++;p&&u(e)}var c=i;function d(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var o=e[r],i=e[r+1];o[0]===i[1]&&e.splice(r,2,[o[0],o[1]+i[1]])}return e}c.INSERT=r,c.DELETE=n,c.EQUAL=o,e.exports=c},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:o).supported=r,t.unsupported=o},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function o(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,t,o=[];if(0===this._eventsCount)return o;for(t in e=this._events)n.call(e,t)&&o.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e,t){var n=r?r+e:e,o=this._events[n];if(t)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var i=0,a=o.length,l=new Array(a);i<a;i++)l[i]=o[i].fn;return l},a.prototype.emit=function(e,t,n,o,i,a){var l=r?r+e:e;if(!this._events[l])return!1;var s,u,c=this._events[l],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,o),!0;case 5:return c.fn.call(c.context,t,n,o,i),!0;case 6:return c.fn.call(c.context,t,n,o,i,a),!0}for(u=1,s=new Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var f,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,o);break;default:if(!s)for(f=1,s=new Array(d-1);f<d;f++)s[f-1]=arguments[f];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,n){var o=new i(t,n||this),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):(this._events[a]=o,this._eventsCount++),this},a.prototype.once=function(e,t,n){var o=new i(t,n||this,!0),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):(this._events[a]=o,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new o:delete this._events[a],this;var l=this._events[a];if(l.fn)l.fn!==t||i&&!l.once||n&&l.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[a]);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==t||i&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new o:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new o:delete this._events[t])):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,void 0!==e&&(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=b(n(3)),l=b(n(2)),s=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),f=n(36),p=n(37),h=b(n(13)),v=n(26),g=n(38),m=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=(0,c.default)("quill:clipboard"),x="__ql-matcher",E=[[Node.TEXT_NODE,q],[Node.TEXT_NODE,D],["br",function(e,t){return S(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===A(e).fontStyle&&(n.italic=!0),r.fontWeight&&(A(e).fontWeight.startsWith("bold")||parseInt(A(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=N(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new l.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!S(t,"\n"))return t;for(var r=-1,o=e.parentNode;!o.classList.contains("ql-clipboard");)"list"===(s.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?t:t.compose((new l.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",function(){return new l.default}]],O=[f.AlignAttribute,g.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),C=[f.AlignStyle,p.BackgroundStyle,v.ColorStyle,g.DirectionStyle,m.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),k=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],E.concat(r.options.matchers).forEach((function(e){var t=o(e,2),i=t[0],a=t[1];(n.matchVisual||a!==R)&&r.addMatcher(i,a)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new l.default).insert(n,_({},h.default.blotName,t[h.default.blotName]))}var r=this.prepareMatching(),i=o(r,2),a=i[0],s=i[1],u=T(this.container,a,s);return S(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new l.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new l.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new l.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=o,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(r){var i=o(r,2),a=i[0],l=i[1];switch(a){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:t.push(l);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[x]=e[x]||[],e[x].push(l)}))}})),[t,n]}}]),t}(d.default);function N(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return N(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},_({},t,n),r.attributes))}),new l.default)}function A(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function S(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var o=e.ops[r];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*t.length)===t}function P(e){if(0===e.childNodes.length)return!1;var t=A(e);return["block","list-item"].indexOf(t.display)>-1}function T(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new l.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,o){var i=T(o,t,n);return o.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(o,e)}),i),i=(o[x]||[]).reduce((function(e,t){return t(o,e)}),i)),r.concat(i)}),new l.default):new l.default}function L(e,t,n){return N(n,e,!0)}function j(e,t){var n=s.default.Attributor.Attribute.keys(e),r=s.default.Attributor.Class.keys(e),o=s.default.Attributor.Style.keys(e),i={};return n.concat(r).concat(o).forEach((function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null==(n=O[t])||n.attrName!==t&&n.keyName!==t||(i[n.attrName]=n.value(e)||void 0),null==(n=C[t])||n.attrName!==t&&n.keyName!==t||(n=C[t],i[n.attrName]=n.value(e)||void 0))})),Object.keys(i).length>0&&(t=N(t,i)),t}function I(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var r={},o=n.value(e);null!=o&&(r[n.blotName]=o,t=(new l.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=N(t,n.blotName,n.formats(e)));return t}function D(e,t){return S(t,"\n")||(P(e)||t.length()>0&&e.nextSibling&&P(e.nextSibling))&&t.insert("\n"),t}function R(e,t){if(P(e)&&null!=e.nextElementSibling&&!S(t,"\n\n")){var n=e.offsetHeight+parseFloat(A(e).marginTop)+parseFloat(A(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function q(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!A(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&P(e.parentNode)||null!=e.previousSibling&&P(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&P(e.parentNode)||null!=e.nextSibling&&P(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}k.DEFAULTS={matchers:[],matchVisual:!0},t.default=k,t.matchAttributor=j,t.matchBlot=I,t.matchNewline=D,t.matchSpacing=R,t.matchText=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="bold",a.tagName=["STRONG","B"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=c(n(2)),a=c(n(0)),l=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=(0,s.default)("quill:toolbar"),p=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o,i=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var a=document.createElement("div");v(a,i.options.container),e.container.parentNode.insertBefore(a,e.container),i.container=a}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(e){i.addHandler(e,i.options.handlers[e])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(e){i.attach(e)})),i.quill.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.SELECTION_CHANGE&&i.update(t)})),i.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){var e=i.quill.selection.getRange(),t=r(e,1)[0];i.update(t)})),i):(o=f.error("Container required for toolbar",i.options),d(i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,(function(e){return 0===e.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,e);if(null==a.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,e)}var o="SELECT"===e.tagName?"change":"click";e.addEventListener(o,(function(o){var s=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),o.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),d=r(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,s);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(s=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(d.index).delete(d.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,s)),l.default.sources.USER)}else t.quill.format(n,s,l.default.sources.USER);t.update(d)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var o=r(n,2),i=o[0],a=o[1];if("SELECT"===a.tagName){var l=void 0;if(null==e)l=null;else if(null==t[i])l=a.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),l=a.querySelector('option[value="'+s+'"]')}null==l?(a.value="",a.selectedIndex=-1):l.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=t[i]===a.getAttribute("value")||null!=t[i]&&t[i].toString()===a.getAttribute("value")||null==t[i]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=t[i])}))}}]),t}(u.default);function h(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function v(e,t){Array.isArray(t[0])||(t=[t]),t.forEach((function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((function(e){if("string"==typeof e)h(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)})),e.appendChild(r)}(n,t,r):h(n,t,r)}})),e.appendChild(n)}))}p.DEFAULTS={},p.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,l.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",l.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",e,l.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var o="+1"===e?1:-1;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",r+o,l.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,l.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",e,l.default.sources.USER)}}},t.default=p,t.addControls=v},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"buildItem",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),o=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=t+i+"px"),o.left<r.left&&(i=r.left-o.left,this.root.style.left=t+i+"px"),o.bottom>r.bottom){var a=o.bottom-o.top,l=e.bottom-e.top+a;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=f(n(3)),a=f(n(8)),l=n(43),s=f(l),u=f(n(27)),c=n(15),d=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],m=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return v(t,e),o(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),d.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(t,n){e.handlers.link.call(e,!n.format.link)}))}}]),t}(s.default);m.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){p(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return v(t,e),o(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,a.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===a.default.sources.USER){var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(_n=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.quill.scroll.descendant(u.default,t.index),2),i=o[0],l=o[1];if(null!=i){e.linkRange=new c.Range(t.index-l,i.length());var s=u.default.formats(i.domNode);return e.preview.textContent=s,e.preview.setAttribute("href",s),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}}))}},{key:"show",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(l.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=D(n(29)),o=n(36),i=n(38),a=n(64),l=D(n(65)),s=D(n(66)),u=n(67),c=D(u),d=n(37),f=n(26),p=n(39),h=n(40),v=D(n(56)),g=D(n(68)),m=D(n(27)),y=D(n(69)),b=D(n(70)),_=D(n(71)),w=D(n(72)),x=D(n(73)),E=n(13),O=D(E),C=D(n(74)),k=D(n(75)),N=D(n(57)),A=D(n(41)),S=D(n(28)),P=D(n(59)),T=D(n(60)),L=D(n(61)),j=D(n(108)),I=D(n(62));function D(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),r.default.register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":l.default,"formats/code-block":O.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":v.default,"formats/code":E.Code,"formats/italic":g.default,"formats/link":m.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":k.default,"modules/toolbar":N.default,"themes/bubble":j.default,"themes/snow":I.default,"ui/icons":A.default,"ui/picker":S.default,"ui/icon-picker":T.default,"ui/color-picker":P.default,"ui/tooltip":L.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(a.default.Attributor.Class),s=new l("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="blockquote",o.tagName="blockquote",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="header",i.tagName=["H1","H2","H3","H4","H5","H6"],t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=s(n(0)),a=s(n(4)),l=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"format",value:function(e,n){e!==p.blotName||n?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:o(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);f.blotName="list-item",f.tagName="LI";var p=function(e){function t(e){u(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),o=i.default.find(t.target);"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return d(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof f)o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(l.default);p.blotName="list",p.scope=i.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[f],t.ListItem=f,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(56))&&r.__esModule?r:{default:r}).default);o.blotName="italic",o.tagName=["EM","I"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="script",a.tagName=["SUB","SUP"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);o.blotName="strike",o.tagName="S",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);o.blotName="underline",o.tagName="U",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=(r=n(0))&&r.__esModule?r:{default:r},l=n(27),s=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(4),l=(r=n(27))&&r.__esModule?r:{default:r},s=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=s(n(35)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(i.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var p=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(f,!0)}}]),t}(l.default);t.FormulaBlot=f,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=s(n(0)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(s(n(13)).default);f.className="ql-syntax";var p=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){r.highlight(),o=null}),r.options.interval)})),r.highlight(),r}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(p,!0),a.default.register(f,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(l.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=f,t.CodeToken=p,t.default=h},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=d(n(3)),a=d(n(8)),l=n(43),s=d(l),u=n(15),c=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){f(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return h(t,e),o(t,[{key:"extendToolbar",value:function(e){this.tooltip=new m(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);g.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var m=function(e){function t(e,n){f(this,t);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t,n,o){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&o===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(t.index,t.length);if(1===i.length)r.position(r.quill.getBounds(t));else{var l=i[i.length-1],s=r.quill.getIndex(l),c=Math.min(l.length()-1,t.index+t.length-s),d=r.quill.getBounds(new u.Range(s,c));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return h(t,e),o(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);m.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=m,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},9921:function(e,t){"use strict";var n=60103,r=60106,o=60107,i=60108,a=60114,l=60109,s=60110,u=60112,c=60113,d=60120,f=60115,p=60116;if("function"==typeof Symbol&&Symbol.for){var h=Symbol.for;n=h("react.element"),r=h("react.portal"),o=h("react.fragment"),i=h("react.strict_mode"),a=h("react.profiler"),l=h("react.provider"),s=h("react.context"),u=h("react.forward_ref"),c=h("react.suspense"),d=h("react.suspense_list"),f=h("react.memo"),p=h("react.lazy"),h("react.block"),h("react.server.block"),h("react.fundamental"),h("react.debug_trace_mode"),h("react.legacy_hidden")}t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case p:case f:case l:return e;default:return t}}case r:return t}}}(e)===s}},9864:function(e,t,n){"use strict";e.exports=n(9921)},1167:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=l(n(9196)),u=l(n(1850)),c=l(n(8446)),d=l(n(6095)),f=function(e){function t(t){var n=e.call(this,t)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(e,t,r,o){var i,a,l,s;"text-change"===e?null===(a=(i=n).onEditorChangeText)||void 0===a||a.call(i,n.editor.root.innerHTML,t,o,n.unprivilegedEditor):"selection-change"===e&&(null===(s=(l=n).onEditorChangeSelection)||void 0===s||s.call(l,t,o,n.unprivilegedEditor))};var r=n.isControlled()?t.value:t.defaultValue;return n.value=null!=r?r:"",n}return o(t,e),t.prototype.validateProps=function(e){var t;if(s.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(s.default.Children.count(e.children)&&"textarea"===(null===(t=s.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n,r=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),i=null!=(n=e.value)?n:"";this.isEqualValue(i,o)||this.setEditorContents(this.editor,i)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),a(this.cleanProps,this.dirtyProps).some((function(t){return!c.default(e[t],r.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!c.default(e[n],t.props[n])}))},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var r=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,a=(r=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var l=this.editor;l.setContents(r),p((function(){return n.setEditorSelection(l,a)}))}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new d.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?c.default(e.ops,t.ops):c.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),p((function(){return n.setEditorSelection(e,r)}))},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=u.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,r=t.preserveWhitespace,o={key:this.state.generation,ref:function(t){e.editingArea=t}};return s.default.Children.count(n)?s.default.cloneElement(s.default.Children.only(n),o):r?s.default.createElement("pre",i({},o)):s.default.createElement("div",i({},o))},t.prototype.render=function(){var e;return s.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!=e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,r){var o,i;if(this.editor){var a=this.isDelta(this.value)?r.getContents():r.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(i=(o=this.props).onChange)||void 0===i||i.call(o,e,t,n,r))}},t.prototype.onEditorChangeSelection=function(e,t,n){var r,o,i,a,l,s;if(this.editor){var u=this.getEditorSelection(),d=!u&&e,f=u&&!e;c.default(e,u)||(this.selection=e,null===(o=(r=this.props).onChangeSelection)||void 0===o||o.call(r,e,t,n),d?null===(a=(i=this.props).onFocus)||void 0===a||a.call(i,e,t,n):f&&(null===(s=(l=this.props).onBlur)||void 0===s||s.call(l,u,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=d.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(s.default.Component);function p(e){Promise.resolve().then(e)}e.exports=f},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=window.wp.element,t=function({icon:t,size:n=24,...r}){return(0,e.cloneElement)(t,{width:n,height:n,...r})},r=window.wp.i18n,o=window.wp.blockEditor,i=window.wp.components,a=window.wp.data;function l(){return window.giveStorageData}function s(){return window.givewp.form.blocks}function u({rootClientId:t}){return(0,e.createElement)(o.Inserter,{position:"bottom center",rootClientId:t,__experimentalIsQuick:!0,className:"give-section__empty-block-inserter",renderToggle:({onToggle:t,disabled:n,isOpen:o})=>{const a=(0,r._x)("Add block","Generic label for block inserter button","give");return(0,e.createElement)(i.Tooltip,{text:a},(0,e.createElement)(i.Button,{className:"block-editor-button-block-appender",onClick:t,"aria-haspopup":"true","aria-expanded":o,disabled:n,label:a},(0,r.__)("Drag a block here or click to add a block","give")))},isAppender:!0})}const c=[{name:"givewp/section",settings:{title:(0,r.__)("Section","give"),category:"section",description:(0,r.__)("A section groups form fields and content together.","give"),icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M5 3H3V5H5V3ZM9 3H7V5H9V3ZM7 19H9V21H7V19ZM5 7H3V9H5V7ZM19 7H21V9H19V7ZM5 11H3V13H5V11ZM19 11H21V13H19V11ZM5 15H3V17H5V15ZM19 15H21V17H19V15ZM5 19H3V21H5V19ZM11 3H13V5H11V3ZM13 19H11V21H13V19ZM15 3H17V5H15V3ZM17 19H15V21H17V19ZM19 3H21V5H19V3ZM21 19H19V21H21V19Z",fill:"currentColor"}))}),supports:{html:!1,givewp:{conditionalLogic:!0}},attributes:{title:{type:"string",source:"attribute",selector:"h1",default:(0,r.__)("Section Title","give")},description:{type:"string",source:"attribute",selector:"p",default:(0,r.__)("Section Description","give")},allowedBlocks:{default:!0},innerBlocksTemplate:{default:[]}},edit:function(t){const{attributes:{title:n,description:l},setAttributes:c,clientId:d}=t,f=(0,a.useSelect)((e=>{const{getBlockOrder:t}=e(o.store);return t(d).length>0}),[d]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"block-editor-block-list__layout-section"},(0,e.createElement)("header",{style:{display:"flex",flexDirection:"column",gap:"8px"}},n.length>0&&(0,e.createElement)(o.RichText,{tagName:"h2",value:n,onChange:e=>c({title:e}),style:{margin:"0",fontSize:"22px",fontWeight:700},allowedFormats:[]}),l.length>0&&(0,e.createElement)(o.RichText,{tagName:"p",value:l,onChange:e=>c({description:e}),style:{fontSize:"16px",fontWeight:500},allowedFormats:[]})),(0,e.createElement)(o.InnerBlocks,{allowedBlocks:s().getAll().filter((e=>"givewp/section"!==e.name)).map((e=>e.name)),template:t.attributes.innerBlocksTemplate,renderAppender:f?o.InnerBlocks.DefaultBlockAppender:()=>(0,e.createElement)("div",{className:"give-section__empty-block-inserter"},(0,e.createElement)(u,{rootClientId:d})),prioritizedInserterBlocks:["givewp/text","givewp/paragraph","givewp-form-field-manager/dropdown","givewp-form-field-manager/phone","givewp-form-field-manager/radio","givewp-form-field-manager/html"]})),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Attributes","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:"Title",value:n,onChange:e=>c({title:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextareaControl,{label:"Description",value:l,onChange:e=>c({description:e})})))))},save:function(){return null}}}];c.map((({name:e})=>e));var d=c;const f=[{name:"givewp/paragraph",settings:{title:(0,r.__)("Paragraph","give"),description:"Place a styled paragraph in your form.",category:"content",supports:{html:!1,multiple:!0,givewp:{conditionalLogic:!0}},attributes:{content:{type:"string",source:"attribute",selector:"p",default:""}},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("line",{x1:"14.917",y1:"20",x2:"14.917",y2:"4.88889",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("line",{x1:"10.4727",y1:"20",x2:"10.4727",y2:"4.88889",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("line",{x1:"18.333",y1:"4.75",x2:"9.44412",y2:"4.75",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("path",{d:"M9.13889 8.88889V12.96C7.21109 12.6071 5.75 10.9186 5.75 8.88889C5.75 6.85914 7.21109 5.17065 9.13889 4.81778V8.88889Z",fill:"#1E1E1E",stroke:"#1E1E1E",strokeWidth:"1.5"}))}),edit:function({attributes:t,setAttributes:n}){const{content:a}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.RichText,{tagName:"p",value:a,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>n({content:e}),placeholder:(0,r.__)("Enter some text","give")}),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Attributes","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextareaControl,{label:(0,r.__)("Content","give"),value:a,onChange:e=>n({content:e})})))))},save:function(){return null}}}];f.map((e=>e.name));var p=f,h=window.lodash,v=n.n(h);function g({label:t,setAttributes:n,onBlur:o=h.noop}){return(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label","give"),value:t,onChange:e=>n({label:e}),onBlur:o})}function m({placeholder:t,setAttributes:n}){return(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder","give"),value:t,onChange:e=>n({placeholder:e})})}function y({isRequired:t,setAttributes:n}){return(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Required","give"),checked:t,onChange:()=>n({isRequired:!t})})}const b=({title:t,children:n})=>(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:t,initialOpen:!0},n));function _({attributes:t,setAttributes:n,onLabelTextControlBlur:o=h.noop,showLabel:a=!0,showPlaceholder:l=!0,showRequired:s=!0}){const{label:u,placeholder:c,isRequired:d,options:f}=t,p=d?"give-is-required":"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",null,void 0===f?(0,e.createElement)(i.TextControl,{label:u,placeholder:c,required:d,className:p,readOnly:!0,onChange:null,value:c}):(0,e.createElement)("select",null,f.map((t=>(0,e.createElement)("option",{key:t.value,value:t.value},t.label))))),(0,e.createElement)(b,{title:(0,r.__)("Field Settings","give")},a&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(g,{label:u,setAttributes:n,onBlur:o})),l&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(m,{placeholder:c,setAttributes:n})),s&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(y,{isRequired:d,setAttributes:n}))))}const w={title:(0,r.__)("Field","give"),category:"input",supports:{html:!1,multiple:!0},attributes:{fieldName:{type:"string",source:"attribute"},label:{type:"string",source:"attribute",default:(0,r.__)("Text Field","give")},placeholder:{type:"string",source:"attribute",default:""},isRequired:{type:"boolean",source:"attribute",default:!1},options:{type:"array"}},edit:_,save:function(){return null}};var x=w;const{fieldName:E,label:O,placeholder:C,isRequired:k,options:N}=w.attributes;var A=n(4184),S=n.n(A);const P={...x,title:(0,r.__)("Text Field","give"),category:"custom",description:(0,r.__)("A custom text field that donors can use.","give"),supports:{givewp:{fieldSettings:{label:{default:(0,r.__)("Text field","give")},description:!0,placeholder:!0,defaultValue:!0,emailTag:!0},conditionalLogic:!0}},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M10.8449 6.89062L7.05176 16.5H9.1684L9.89932 14.6484H14.1006L14.8316 16.5H16.9482L13.155 6.89062H10.8449ZM10.6765 12.6797L12 9.32658L13.3235 12.6797H10.6765Z",fill:"#000C00"}),(0,e.createElement)(i.Path,{d:"M18 2.625H6V0.75H0.75V6H2.625V18H0.75V23.25H6V21.375H18V23.25H23.25V18H21.375V6H23.25V0.75H18V2.625ZM2.25 4.5V2.25H4.5V4.5H2.25ZM4.5 21.75H2.25V19.5H4.5V21.75ZM18 19.875H6V18H4.125V6H6V4.125H18V6H19.875V18H18V19.875ZM21.75 19.5V21.75H19.5V19.5H21.75ZM19.5 2.25H21.75V4.5H19.5V2.25Z",fill:"#000C00"}))}),edit:function({attributes:t}){const{label:n,isRequired:r,description:o,placeholder:i,defaultValue:a}=t;return(0,e.createElement)("div",{className:S()({"give-is-required":r})},(0,e.createElement)("span",{className:"components-input-control__label give-text-block__label"},n),o&&(0,e.createElement)("p",{className:"give-text-block__description"},o),(0,e.createElement)("input",{type:"text",placeholder:i,readOnly:!0,onChange:null,value:a}))}};var T={name:"givewp/text",settings:P},L={name:"givewp/company",settings:{...x,title:(0,r.__)("Company","give"),description:(0,r.__)("Donors can input their company name","give"),supports:{multiple:!1},attributes:{label:{default:(0,r.__)("Company Name","give")}},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M18 2H6C4.897 2 4 2.897 4 4V21C4 21.2652 4.10536 21.5196 4.29289 21.7071C4.48043 21.8946 4.73478 22 5 22H19C19.2652 22 19.5196 21.8946 19.7071 21.7071C19.8946 21.5196 20 21.2652 20 21V4C20 2.897 19.103 2 18 2ZM18 20H6V4H18V20Z",fill:"currentColor"}),(0,e.createElement)(i.Path,{d:"M8 6H11V8H8V6ZM13 6H16V8H13V6ZM8 10H11V12H8V10ZM13 10.031H16V12H13V10.031ZM8 14H11V16H8V14ZM13 14H16V16H13V14Z",fill:"currentColor"}))})}},j=n(9196),I=n.n(j);const D=({honorifics:t})=>{var n;const[o,a]=(0,j.useState)(null!==(n=t[0])&&void 0!==n?n:""),l=t.map((e=>({label:R(e),value:q(e)})));return(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Title","give"),options:l,value:o,onChange:a})},R=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),q=(e="")=>e.trim().toLowerCase();var M={name:"givewp/donor-name",settings:{...x,title:(0,r.__)("Donor Name","give"),description:(0,r.__)("Collects the donor name with display options.","give"),supports:{multiple:!1},attributes:{showHonorific:{type:"boolean",default:!0},honorifics:{type:"array",default:["Mr","Ms","Mrs"]},firstNameLabel:{type:"string",source:"attribute",default:(0,r.__)("First name","give")},firstNamePlaceholder:{type:"string",source:"attribute",default:(0,r.__)("First name","give")},lastNameLabel:{type:"string",source:"attribute",default:(0,r.__)("Last name","give")},lastNamePlaceholder:{type:"string",source:"attribute",default:(0,r.__)("Last name","give")},requireLastName:{type:"boolean",default:!1}},edit:function({attributes:{showHonorific:t,honorifics:n,firstNameLabel:a,firstNamePlaceholder:l,lastNameLabel:s,lastNamePlaceholder:u,requireLastName:c},setAttributes:d}){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{style:{display:"grid",gridTemplateColumns:t?"1fr 2fr 2fr":"1fr 1fr",gap:"15px"}},!!t&&(0,e.createElement)(D,{honorifics:n}),(0,e.createElement)(i.TextControl,{label:a,placeholder:l,required:!0,className:"give-is-required",readOnly:!0,value:l,onChange:null}),(0,e.createElement)(i.TextControl,{label:s,placeholder:u,required:c,className:c?"give-is-required":"",value:u,onChange:null,readOnly:!0})),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Name Title Prefix","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"10px"}},(0,e.createElement)("div",null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Show Name Title Prefix","give"),checked:t,onChange:()=>d({showHonorific:!t}),help:(0,r.__)("Do you want to add a name title prefix dropdown field before the donor's first name field? This will display a dropdown with options such as Mrs, Miss, Ms, Sir, and Dr for the donor to choose from.","give")})),!!t&&(0,e.createElement)(i.FormTokenField,{tokenizeOnSpace:!0,label:(0,r.__)("Title Prefixes","give"),value:n,suggestions:["Mr","Ms","Mrs"],onChange:e=>d({honorifics:e}),displayTransform:R,saveTransform:q})))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("First Name","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:a,onChange:e=>d({firstNameLabel:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:l,onChange:e=>d({firstNamePlaceholder:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Last Name","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:s,onChange:e=>d({lastNameLabel:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:u,onChange:e=>d({lastNamePlaceholder:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Required","give"),checked:c,onChange:()=>d({requireLastName:!c}),help:(0,r.__)("Do you want to force the Last Name field to be required?","give")})))))},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M14.2736 13.4026C14.1721 13.3682 13.5308 13.0689 13.9315 11.8076H13.9258C14.9704 10.6936 15.7686 8.90101 15.7686 7.13619C15.7686 4.42256 14.026 3 12.0006 3C9.97402 3 8.24093 4.4219 8.24093 7.13619C8.24093 8.90827 9.03473 10.7081 10.0857 11.8195C10.4954 12.9321 9.76281 13.3451 9.60966 13.4032C7.48861 14.1974 5 15.6451 5 17.0743V17.6101C5 19.5573 8.64613 20 12.0204 20C15.3998 20 19 19.5573 19 17.6101V17.0743C19 15.6022 16.4993 14.1657 14.2736 13.4026Z",fill:"currentColor"}))})}},B={name:"givewp/email",settings:{...x,title:(0,r.__)("Email","give"),description:(0,r.__)("The required email field for donors to enter their email address.","give"),supports:{multiple:!1},attributes:{...x.attributes,label:{default:(0,r.__)("Email Address")}},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6ZM20 6L12 11L4 6H20ZM20 18H4V8L12 13L20 8V18Z",fill:"currentColor"}))}),edit:t=>(0,e.createElement)(_,{showRequired:!1,...t})}};const H=({label:t,icon:n})=>(0,e.createElement)("div",{style:{backgroundColor:"var(--givewp-gray-20)",padding:"16px",display:"flex",justifyContent:"space-between"}},t," ",n);var V={name:"givewp/payment-gateways",settings:{...x,title:(0,r.__)("Payment Gateways","give"),description:(0,r.__)("Display payment gateway options for donors to process their donation.","give"),supports:{multiple:!1},attributes:{},edit:function(t){const{gateways:n}=l();return(0,e.createElement)("div",{style:{fontSize:"16px",padding:"24px",textAlign:"center",border:"1px dashed var(--givewp-gray-100)",borderRadius:"5px",backgroundColor:"var(--givewp-gray-10)"}},(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"}},n.filter((e=>e.enabled)).map((t=>(0,e.createElement)(H,{key:t.id,label:t.label,icon:(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.21293 14.6663H6.78626C6.63422 14.6664 6.48673 14.6144 6.36827 14.5191C6.2498 14.4238 6.16747 14.2909 6.13493 14.1423L5.8636 12.8863C5.50164 12.7277 5.15842 12.5294 4.84026 12.295L3.6156 12.685C3.47064 12.7312 3.31423 12.7265 3.17234 12.6715C3.03046 12.6166 2.91163 12.5148 2.8356 12.383L1.6196 10.2823C1.54436 10.1504 1.51612 9.99689 1.53949 9.84684C1.56287 9.69679 1.63647 9.55912 1.74826 9.45634L2.69826 8.58967C2.65506 8.19708 2.65506 7.80093 2.69826 7.40834L1.74826 6.54367C1.63631 6.44086 1.56261 6.30306 1.53923 6.15286C1.51585 6.00267 1.54419 5.84899 1.6196 5.71701L2.83293 3.61501C2.90896 3.48322 3.02779 3.3814 3.16968 3.32647C3.31156 3.27153 3.46797 3.26678 3.61293 3.31301L4.8376 3.70301C5.00026 3.58301 5.1696 3.47101 5.34426 3.36967C5.51293 3.27501 5.68626 3.18901 5.8636 3.11234L6.1356 1.85767C6.16798 1.70914 6.25015 1.57613 6.36849 1.48071C6.48684 1.38528 6.63424 1.33317 6.78626 1.33301H9.21293C9.36495 1.33317 9.51236 1.38528 9.6307 1.48071C9.74904 1.57613 9.83122 1.70914 9.8636 1.85767L10.1383 3.11301C10.4998 3.27252 10.8429 3.47079 11.1616 3.70434L12.3869 3.31434C12.5318 3.26829 12.6881 3.27312 12.8298 3.32805C12.9715 3.38298 13.0903 3.48469 13.1663 3.61634L14.3796 5.71834C14.5343 5.98967 14.4809 6.33301 14.2509 6.54434L13.3009 7.41101C13.3441 7.8036 13.3441 8.19975 13.3009 8.59234L14.2509 9.45901C14.4809 9.67101 14.5343 10.0137 14.3796 10.285L13.1663 12.387C13.0902 12.5188 12.9714 12.6206 12.8295 12.6755C12.6876 12.7305 12.5312 12.7352 12.3863 12.689L11.1616 12.299C10.8437 12.5332 10.5007 12.7313 10.1389 12.8897L9.8636 14.1423C9.83108 14.2908 9.74885 14.4236 9.63052 14.5189C9.51219 14.6142 9.36486 14.6662 9.21293 14.6663ZM7.99693 5.33301C7.28969 5.33301 6.61141 5.61396 6.11131 6.11406C5.61122 6.61415 5.33026 7.29243 5.33026 7.99967C5.33026 8.70692 5.61122 9.38519 6.11131 9.88529C6.61141 10.3854 7.28969 10.6663 7.99693 10.6663C8.70418 10.6663 9.38245 10.3854 9.88255 9.88529C10.3826 9.38519 10.6636 8.70692 10.6636 7.99967C10.6636 7.29243 10.3826 6.61415 9.88255 6.11406C9.38245 5.61396 8.70418 5.33301 7.99693 5.33301Z",fill:"#1E1E1E"}))})))))},icon:function(){return(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M11.3158 4L17.0774 5.824C17.2381 5.87483 17.3785 5.97639 17.4782 6.11383C17.5779 6.25128 17.6317 6.41742 17.6316 6.588V8H19.2105C19.4199 8 19.6207 8.08429 19.7688 8.23431C19.9168 8.38434 20 8.58783 20 8.8V10.4H9.73684V8.8C9.73684 8.58783 9.82002 8.38434 9.96807 8.23431C10.1161 8.08429 10.3169 8 10.5263 8H16.0526V7.176L11.3158 5.6752L6.57895 7.176V13.0992C6.57883 13.589 6.68967 14.0723 6.90292 14.5118C7.11617 14.9513 7.42614 15.3354 7.80895 15.6344L7.95816 15.7432L11.3158 18.064L14.3016 16H10.5263C10.3169 16 10.1161 15.9157 9.96807 15.7657C9.82002 15.6157 9.73684 15.4122 9.73684 15.2V12H20V15.2C20 15.4122 19.9168 15.6157 19.7688 15.7657C19.6207 15.9157 19.4199 16 19.2105 16L16.6684 16.0008C16.3629 16.4088 15.9918 16.7688 15.5632 17.0648L11.3158 20L7.06842 17.0656C6.43094 16.6252 5.90928 16.0336 5.54879 15.3423C5.18831 14.6511 4.99992 13.881 5 13.0992V6.588C5.0001 6.41755 5.05391 6.25159 5.1536 6.11431C5.25329 5.97702 5.39365 5.87559 5.55421 5.8248L11.3158 4Z",fill:"currentColor"}))})}}};const F=({label:t})=>(0,e.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},(0,e.createElement)("div",null,t),(0,e.createElement)("div",{style:{height:"20px",width:"120px",backgroundColor:"var(--givewp-gray-30)"}}));var U={name:"givewp/donation-summary",settings:{...x,title:(0,r.__)("Donation Summary","give"),description:(0,r.__)("Shows a donation summary in real-time for donors to review before donating.","give"),supports:{multiple:!1},attributes:{},edit:function(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{style:{padding:"30px 20px",display:"flex",fontSize:"16px",gap:"16px",flexDirection:"column",border:"1px dashed var(--givewp-gray-100)",borderRadius:"5px",backgroundColor:"var(--givewp-gray-10)"}},(0,e.createElement)(F,{label:(0,r.__)("Payment Amount","give")}),(0,e.createElement)(F,{label:(0,r.__)("Giving Frequency","give")}),(0,e.createElement)(F,{label:(0,e.createElement)("strong",null,(0,r.__)("Donation Total","give"))})))},icon:()=>(0,e.createElement)(i.Icon,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M9.75 10.6521H12C12.2387 10.6521 12.4676 10.5573 12.6364 10.3885C12.8052 10.2198 12.9 9.99088 12.9 9.75223C12.9 9.51359 12.8052 9.28471 12.6364 9.11597C12.4676 8.94722 12.2387 8.85241 12 8.85241H11.1V8.4025C11.1 8.16386 11.0052 7.93498 10.8364 7.76623C10.6676 7.59748 10.4387 7.50268 10.2 7.50268C9.96131 7.50268 9.73239 7.59748 9.56361 7.76623C9.39483 7.93498 9.30001 8.16386 9.30001 8.4025V8.89741C8.75319 9.00842 8.26713 9.31861 7.9362 9.76777C7.60526 10.2169 7.45306 10.773 7.50914 11.328C7.56521 11.8831 7.82557 12.3975 8.23966 12.7714C8.65374 13.1453 9.19203 13.3521 9.75 13.3515H10.65C10.7694 13.3515 10.8838 13.3989 10.9682 13.4833C11.0526 13.5677 11.1 13.6821 11.1 13.8014C11.1 13.9208 11.0526 14.0352 10.9682 14.1196C10.8838 14.2039 10.7694 14.2513 10.65 14.2513H8.40001C8.16131 14.2513 7.93239 14.3461 7.76361 14.5149C7.59483 14.6836 7.50001 14.9125 7.50001 15.1512C7.50001 15.3898 7.59483 15.6187 7.76361 15.7874C7.93239 15.9562 8.16131 16.051 8.40001 16.051H9.30001V16.5009C9.30001 16.7395 9.39483 16.9684 9.56361 17.1372C9.73239 17.3059 9.96131 17.4007 10.2 17.4007C10.4387 17.4007 10.6676 17.3059 10.8364 17.1372C11.0052 16.9684 11.1 16.7395 11.1 16.5009V16.006C11.6468 15.895 12.1329 15.5848 12.4638 15.1356C12.7947 14.6865 12.9469 14.1304 12.8909 13.5754C12.8348 13.0203 12.5744 12.5059 12.1604 12.132C11.7463 11.7581 11.208 11.5513 10.65 11.5519H9.75C9.63066 11.5519 9.5162 11.5045 9.43181 11.4201C9.34742 11.3357 9.30001 11.2213 9.30001 11.102C9.30001 10.9826 9.34742 10.8682 9.43181 10.7838C9.5162 10.6995 9.63066 10.6521 9.75 10.6521ZM20.1 12.0018H17.4V3.9034C17.4006 3.74484 17.3593 3.58893 17.2803 3.45146C17.2013 3.31399 17.0873 3.19983 16.95 3.12055C16.8132 3.04158 16.658 3 16.5 3C16.342 3 16.1868 3.04158 16.05 3.12055L13.35 4.66825L10.65 3.12055C10.5132 3.04158 10.358 3 10.2 3C10.042 3 9.88682 3.04158 9.75 3.12055L7.05001 4.66825L4.35001 3.12055C4.21319 3.04158 4.05799 3 3.90001 3C3.74202 3 3.58682 3.04158 3.45001 3.12055C3.31266 3.19983 3.19871 3.31399 3.11969 3.45146C3.04066 3.58893 2.99938 3.74484 3.00001 3.9034V18.3005C3.00001 19.0165 3.28447 19.7031 3.79082 20.2093C4.29717 20.7156 4.98392 21 5.70001 21H18.3C19.0161 21 19.7028 20.7156 20.2092 20.2093C20.7155 19.7031 21 19.0165 21 18.3005V12.9016C21 12.663 20.9052 12.4341 20.7364 12.2653C20.5676 12.0966 20.3387 12.0018 20.1 12.0018ZM5.70001 19.2004C5.46131 19.2004 5.23239 19.1056 5.06361 18.9368C4.89483 18.7681 4.80001 18.5392 4.80001 18.3005V5.46009L6.60001 6.48588C6.73891 6.55842 6.8933 6.5963 7.05001 6.5963C7.20672 6.5963 7.3611 6.55842 7.50001 6.48588L10.2 4.93819L12.9 6.48588C13.0389 6.55842 13.1933 6.5963 13.35 6.5963C13.5067 6.5963 13.6611 6.55842 13.8 6.48588L15.6 5.46009V18.3005C15.6024 18.6075 15.6572 18.9118 15.762 19.2004H5.70001ZM19.2 18.3005C19.2 18.5392 19.1052 18.7681 18.9364 18.9368C18.7676 19.1056 18.5387 19.2004 18.3 19.2004C18.0613 19.2004 17.8324 19.1056 17.6636 18.9368C17.4948 18.7681 17.4 18.5392 17.4 18.3005V13.8014H19.2V18.3005Z",fill:"currentColor"}))})}},G=({children:t})=>(0,e.createElement)("div",{className:"give-donation-block__levels"},t),z=({selected:t,children:n})=>{const r=S()({"give-donation-block__level":!0,"give-donation-block__level--selected":t});return(0,e.createElement)("div",{className:r},n)},W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},W.apply(this,arguments)};function Z(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||t)}var K=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},$={k:1e3,m:1e6,b:1e9},Y=function(e){var t=e.value,n=e.groupSeparator,r=void 0===n?",":n,o=e.decimalSeparator,i=void 0===o?".":o,a=e.allowDecimals,l=void 0===a||a,s=e.decimalsLimit,u=void 0===s?2:s,c=e.allowNegativeValue,d=void 0===c||c,f=e.disableAbbreviations,p=void 0!==f&&f,h=e.prefix,v=void 0===h?"":h,g=e.transformRawValue,m=(void 0===g?function(e){return e}:g)(t);if("-"===m)return m;var y=p?[]:["k","m","b"],b=new RegExp("((^|\\D)-\\d)|(-"+K(v)+")").test(m),_=RegExp("(\\d+)-?"+K(v)).exec(t)||[],w=_[0],x=_[1],E=function(e,t){void 0===t&&(t=",");var n=new RegExp(K(t),"g");return e.replace(n,"")}(v?w?m.replace(w,"").concat(x):m.replace(v,""):m,r),O=function(e,t){var n=K(t.join("")),r=new RegExp("[^\\d"+n+"]","gi");return e.replace(r,"")}(E,Z([r,i],y)),C=O;if(!p){if(y.some((function(e){return e===O.toLowerCase().replace(i,"")})))return"";var k=function(e,t){void 0===t&&(t=".");var n=new RegExp("(\\d+("+K(t)+"\\d*)?)([kmb])$","i"),r=e.match(n);if(r){var o=r[1],i=r[3],a=$[i.toLowerCase()];return Number(o.replace(t,"."))*a}}(O,i);k&&(C=String(k))}var N=b&&d?"-":"";if(i&&C.includes(i)){var A=O.split(i),S=A[0],P=A[1],T=u&&P?P.slice(0,u):P;return""+N+S+(l?""+i+T:"")}return""+N+C},X=function(e,t){var n=t.groupSeparator,r=void 0===n?",":n,o=t.decimalSeparator,i=void 0===o?".":o,a=new RegExp("\\d([^"+K(r)+K(i)+"0-9]+)"),l=e.match(a);return l?l[1]:void 0},Q=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,o=e.decimalScale,i=e.prefix,a=void 0===i?"":i,l=e.suffix,s=void 0===l?"":l;if(""===t||void 0===t)return"";if("-"===t)return"-";var u=new RegExp("^\\d?-"+(a?K(a)+"?":"")+"\\d").test(t),c="."!==n?J(t,n,u):t,d={minimumFractionDigits:o||0,maximumFractionDigits:20},f=(r?new Intl.NumberFormat(r.locale,r.currency?W(W({},d),{style:"currency",currency:r.currency}):d):new Intl.NumberFormat(void 0,d)).formatToParts(Number(c)),p=ee(f,e),h=X(p,W({},e)),v=t.slice(-1)===n?n:"",g=(c.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return void 0===o&&g&&n&&(p=p.includes(n)?p.replace(RegExp("(\\d+)("+K(n)+")(\\d+)","g"),"$1$2"+g):h&&!s?p.replace(h,""+n+g+h):""+p+n+g),s&&v?""+p+v+s:h&&v?p.replace(h,""+v+h):h&&s?p.replace(h,""+v+s):[p,v,s].join("")},J=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(K(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},ee=function(e,t){var n=t.prefix,r=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,a=t.disableGroupSeparators,l=void 0!==a&&a;return e.reduce((function(e,t,a){var s=t.type,u=t.value;return 0===a&&n?"minusSign"===s?[u,n]:"currency"===s?Z(Z([],e),[n]):[n,u]:"currency"===s?n?e:Z(Z([],e),[u]):"group"===s?l?e:Z(Z([],e),[void 0!==r?r:u]):"decimal"===s?void 0!==i&&0===i?e:Z(Z([],e),[void 0!==o?o:u]):Z(Z([],e),"fraction"===s?[void 0!==i?u.slice(0,i):u]:[u])}),[""]).join("")},te={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},ne=function(e){return RegExp(/\d/,"gi").test(e)},re=(0,j.forwardRef)((function(e,t){var n=e.allowDecimals,r=void 0===n||n,o=e.allowNegativeValue,i=void 0===o||o,a=e.id,l=e.name,s=e.className,u=e.customInput,c=e.decimalsLimit,d=e.defaultValue,f=e.disabled,p=void 0!==f&&f,h=e.maxLength,v=e.value,g=e.onValueChange,m=e.fixedDecimalLength,y=e.placeholder,b=e.decimalScale,_=e.prefix,w=e.suffix,x=e.intlConfig,E=e.step,O=e.min,C=e.max,k=e.disableGroupSeparators,N=void 0!==k&&k,A=e.disableAbbreviations,S=void 0!==A&&A,P=e.decimalSeparator,T=e.groupSeparator,L=e.onChange,D=e.onFocus,R=e.onBlur,q=e.onKeyDown,M=e.onKeyUp,B=e.transformRawValue,H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(P&&ne(P))throw new Error("decimalSeparator cannot be a number");if(T&&ne(T))throw new Error("groupSeparator cannot be a number");var V=(0,j.useMemo)((function(){return function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce((function(e,t,n){return"currency"===t.type?W(W({},e),0===n?{currencySymbol:t.value,prefix:t.value}:{currencySymbol:t.value,suffix:t.value}):"group"===t.type?W(W({},e),{groupSeparator:t.value}):"decimal"===t.type?W(W({},e),{decimalSeparator:t.value}):e}),te)}(x)}),[x]),F=P||V.decimalSeparator||"",U=T||V.groupSeparator||"";if(F&&U&&F===U&&!1===N)throw new Error("decimalSeparator cannot be the same as groupSeparator");var G={decimalSeparator:F,groupSeparator:U,disableGroupSeparators:N,intlConfig:x,prefix:_||V.prefix,suffix:w},z={decimalSeparator:F,groupSeparator:U,allowDecimals:r,decimalsLimit:c||m||2,allowNegativeValue:i,disableAbbreviations:S,prefix:_||V.prefix,transformRawValue:B},Z=null!=d?Q(W(W({},G),{decimalScale:b,value:String(d)})):null!=v?Q(W(W({},G),{decimalScale:b,value:String(v)})):"",K=(0,j.useState)(Z),$=K[0],J=K[1],ee=(0,j.useState)(!1),re=ee[0],oe=ee[1],ie=(0,j.useState)(0),ae=ie[0],le=ie[1],se=(0,j.useState)(0),ue=se[0],ce=se[1],de=(0,j.useState)(null),fe=de[0],pe=de[1],he=(0,j.useRef)(null);(0,j.useImperativeHandle)(t,(function(){return he.current}));var ve=function(e,t){oe(!0);var n=function(e){var t=e.selectionStart,n=e.value,r=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,a=t,l=n;if(o&&a){var s=n.split("");return"Backspace"===r&&o[a]===i&&(s.splice(a-1,1),a-=1),"Delete"===r&&o[a]===i&&(s.splice(a,1),a+=1),{modifiedValue:l=s.join(""),cursorPosition:a}}return{modifiedValue:l,cursorPosition:t}}({selectionStart:t,value:e,lastKeyStroke:fe,stateValue:$,groupSeparator:U}),r=n.modifiedValue,o=n.cursorPosition,i=Y(W({value:r},z));if(!(h&&i.replace(/-/g,"").length>h)){if(""===i||"-"===i||i===F)return g&&g(void 0,l,{float:null,formatted:"",value:""}),J(i),void le(1);var a=F?i.replace(F,"."):i,s=parseFloat(a),u=Q(W({value:i},G));if(null!=o){var c=o+(u.length-e.length);c=c<=0?_?_.length:0:c,le(c),ce(ue+1)}J(u),g&&g(i,l,{float:s,formatted:u,value:i})}};(0,j.useEffect)((function(){re&&"-"!==$&&he.current&&document.activeElement===he.current&&he.current.setSelectionRange(ae,ae)}),[$,ae,he,re,ue]);var ge=W({type:"text",inputMode:"decimal",id:a,name:l,className:s,onChange:function(e){var t=e.target,n=t.value,r=t.selectionStart;ve(n,r),L&&L(e)},onBlur:function(e){var t=e.target.value,n=Y(W({value:t},z));if("-"===n||n===F||!n)return J(""),void(R&&R(e));var r=function(e,t,n){if(n&&e.length>1){if(e.includes(t)){var r=e.split(t),o=r[0];if((i=r[1]).length>n)return""+o+t+i.slice(0,n)}var i,a=e.length>n?new RegExp("(\\d+)(\\d{"+n+"})"):new RegExp("(\\d)(\\d+)"),l=e.match(a);if(l)return""+(o=l[1])+t+l[2]}return e}(n,F,m),o=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),o=r[0],i=r[1];if(0===n)return o;var a=i||"";if(a.length<n)for(;a.length<n;)a+="0";else a=a.slice(0,n);return""+o+t+a}(r,F,void 0!==b?b:m),i=parseFloat(o.replace(F,".")),a=Q(W(W({},G),{value:o}));g&&g(o,l,{float:i,formatted:a,value:o}),J(a),R&&R(e)},onFocus:function(e){return D&&D(e),$?$.length:0},onKeyDown:function(e){var t=e.key;if(pe(t),E&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),le($.length);var n=parseFloat(null!=v?String(v).replace(F,"."):Y(W({value:$},z)))||0,r="ArrowUp"===t?n+E:n-E;if(void 0!==O&&r<O)return;if(void 0!==C&&r>C)return;var o=String(E).includes(".")?Number(String(E).split(".")[1].length):void 0;ve(String(o?r.toFixed(o):r).replace(".",F))}q&&q(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==$){var r=X($,{groupSeparator:U,decimalSeparator:F});if(r&&n&&n>$.length-r.length&&he.current){var o=$.length-r.length;he.current.setSelectionRange(o,o)}}M&&M(e)},placeholder:y,disabled:p,value:null==v||"-"===$||F&&$===F?$:Q(W(W({},G),{decimalScale:re?void 0:b,value:String(v)})),ref:he},H);if(u){var me=u;return I().createElement(me,W({},ge))}return I().createElement("input",W({},ge))}));re.displayName="CurrencyInput";var oe=re,ie=window.wp.compose;const ae=e=>{const{currency:t="USD"}=l();return Q({value:e,intlConfig:{locale:window.navigator.language,currency:t}})},le=({label:t,help:n,hideLabelFromVision:r,value:o,onValueChange:a,...s})=>{const[u,c]=(0,e.useState)(o),{currency:d="USD"}=l(),f=(0,ie.useInstanceId)(i.BaseControl,"wp-components-base-control");return(0,e.createElement)(i.BaseControl,{label:t,help:n,id:f,hideLabelFromVision:r},(0,e.createElement)(oe,{id:f,value:u,onValueChange:e=>{c(e),a(function(e){if(!e)return e;const t=new Intl.NumberFormat(window.navigator.language).formatToParts(1234.56);let n,r;for(const e of t)"group"===e.type?n=e.value:"decimal"===e.type&&(r=e.value);return e.replaceAll(n,"").replace(r,".")}(e))},className:"components-text-control__input",allowDecimals:!0,allowNegativeValue:!1,maxLength:9,intlConfig:{locale:window.navigator.language,currency:d},...s}))};var se={"one-time":{singular:(0,r.__)("one-time","give"),plural:(0,r.__)("one-time","give"),adjective:(0,r.__)("Once","give")},day:{singular:(0,r.__)("day","give"),plural:(0,r.__)("days","give"),adjective:(0,r.__)("Daily","give")},week:{singular:(0,r.__)("week","give"),plural:(0,r.__)("weeks","give"),adjective:(0,r.__)("Weekly","give")},month:{singular:(0,r.__)("month","give"),plural:(0,r.__)("months","give"),adjective:(0,r.__)("Monthly","give")},quarter:{singular:(0,r.__)("quarter","give"),plural:(0,r.__)("quarters","give"),adjective:(0,r.__)("Quarterly","give")},year:{singular:(0,r.__)("year","give"),plural:(0,r.__)("years","give"),adjective:(0,r.__)("Yearly","give")}},ue=()=>(0,e.createElement)("div",{style:{fontSize:"12px",fontWeight:"500",display:"flex",flexDirection:"column",gap:"12px",padding:"12px 16px 19px",borderRadius:"5px",boxShadow:"0 2px 2px 0 rgba(221, 221, 221, 0.25)",border:"solid 0.5px var(--givewp-primary-700)"}},(0,e.createElement)("div",{style:{}},(0,r.__)("Provide donors the option of making flexible recurring donations.","give")),(0,e.createElement)("div",{style:{display:"flex",justifyContent:"space-around"}},(0,e.createElement)(i.Button,{href:"https://givewp.com/addons/recurring-donations",target:"_blank",rel:"noopener noreferrer",variant:"primary",style:{backgroundColor:"var(--givewp-primary-500)",padding:"4px 8px",height:"auto"}},"Upgrade your plan"),(0,e.createElement)(i.Button,{href:"https://givewp.com/addons/recurring-donations",target:"_blank",rel:"noopener noreferrer",variant:"link",style:{color:"var(--givewp-gray-100)"}},"Read more")));function ce(){return(0,e.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor"},(0,e.createElement)(i.Path,{d:"M10 6.25C10.1658 6.25 10.3247 6.31585 10.4419 6.43306C10.5592 6.55027 10.625 6.70924 10.625 6.875V9.375H13.125C13.2908 9.375 13.4497 9.44085 13.5669 9.55806C13.6842 9.67527 13.75 9.83424 13.75 10C13.75 10.1658 13.6842 10.3247 13.5669 10.4419C13.4497 10.5592 13.2908 10.625 13.125 10.625H10.625V13.125C10.625 13.2908 10.5592 13.4497 10.4419 13.5669C10.3247 13.6842 10.1658 13.75 10 13.75C9.83424 13.75 9.67527 13.6842 9.55806 13.5669C9.44085 13.4497 9.375 13.2908 9.375 13.125V10.625H6.875C6.70924 10.625 6.55027 10.5592 6.43306 10.4419C6.31585 10.3247 6.25 10.1658 6.25 10C6.25 9.83424 6.31585 9.67527 6.43306 9.55806C6.55027 9.44085 6.70924 9.375 6.875 9.375H9.375V6.875C9.375 6.70924 9.44085 6.55027 9.55806 6.43306C9.67527 6.31585 9.83424 6.25 10 6.25Z"}),(0,e.createElement)(i.Path,{d:"M2.5 10C2.5 9.01509 2.69399 8.03982 3.0709 7.12987C3.44781 6.21993 4.00026 5.39314 4.6967 4.6967C5.39314 4.00026 6.21993 3.44781 7.12987 3.0709C8.03982 2.69399 9.01509 2.5 10 2.5C10.9849 2.5 11.9602 2.69399 12.8701 3.0709C13.7801 3.44781 14.6069 4.00026 15.3033 4.6967C15.9997 5.39314 16.5522 6.21993 16.9291 7.12987C17.306 8.03982 17.5 9.01509 17.5 10C17.5 11.9891 16.7098 13.8968 15.3033 15.3033C13.8968 16.7098 11.9891 17.5 10 17.5C8.01088 17.5 6.10322 16.7098 4.6967 15.3033C3.29018 13.8968 2.5 11.9891 2.5 10ZM10 3.75C8.3424 3.75 6.75269 4.40848 5.58058 5.58058C4.40848 6.75269 3.75 8.3424 3.75 10C3.75 11.6576 4.40848 13.2473 5.58058 14.4194C6.75269 15.5915 8.3424 16.25 10 16.25C11.6576 16.25 13.2473 15.5915 14.4194 14.4194C15.5915 13.2473 16.25 11.6576 16.25 10C16.25 8.3424 15.5915 6.75269 14.4194 5.58058C13.2473 4.40848 11.6576 3.75 10 3.75Z"}))}function de(){return(0,e.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor"},(0,e.createElement)(i.Path,{d:"M6.875 9.375C6.70924 9.375 6.55027 9.44085 6.43306 9.55806C6.31585 9.67527 6.25 9.83424 6.25 10C6.25 10.1658 6.31585 10.3247 6.43306 10.4419C6.55027 10.5592 6.70924 10.625 6.875 10.625H13.125C13.2908 10.625 13.4497 10.5592 13.5669 10.4419C13.6842 10.3247 13.75 10.1658 13.75 10C13.75 9.83424 13.6842 9.67527 13.5669 9.55806C13.4497 9.44085 13.2908 9.375 13.125 9.375H6.875ZM10 2.5C9.01509 2.5 8.03982 2.69399 7.12987 3.0709C6.21993 3.44781 5.39314 4.00026 4.6967 4.6967C4.00026 5.39314 3.44781 6.21993 3.0709 7.12987C2.69399 8.03982 2.5 9.01509 2.5 10C2.5 10.9849 2.69399 11.9602 3.0709 12.8701C3.44781 13.7801 4.00026 14.6069 4.6967 15.3033C5.39314 15.9997 6.21993 16.5522 7.12987 16.9291C8.03982 17.306 9.01509 17.5 10 17.5C11.9891 17.5 13.8968 16.7098 15.3033 15.3033C16.7098 13.8968 17.5 11.9891 17.5 10C17.5 8.01088 16.7098 6.10322 15.3033 4.6967C13.8968 3.29018 11.9891 2.5 10 2.5ZM3.75 10C3.75 8.3424 4.40848 6.75269 5.58058 5.58058C6.75269 4.40848 8.3424 3.75 10 3.75C11.6576 3.75 13.2473 4.40848 14.4194 5.58058C15.5915 6.75269 16.25 8.3424 16.25 10C16.25 11.6576 15.5915 13.2473 14.4194 14.4194C13.2473 15.5915 11.6576 16.25 10 16.25C8.3424 16.25 6.75269 15.5915 5.58058 14.4194C4.40848 13.2473 3.75 11.6576 3.75 10Z"}))}function fe(){return(0,e.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},(0,e.createElement)(i.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.33301 5.66667C1.33301 5.29848 1.63148 5 1.99967 5H13.9997C14.3679 5 14.6663 5.29848 14.6663 5.66667C14.6663 6.03486 14.3679 6.33333 13.9997 6.33333H1.99967C1.63148 6.33333 1.33301 6.03486 1.33301 5.66667Z"}),(0,e.createElement)(i.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.33301 10.3333C1.33301 9.96514 1.63148 9.66667 1.99967 9.66667H13.9997C14.3679 9.66667 14.6663 9.96514 14.6663 10.3333C14.6663 10.7015 14.3679 11 13.9997 11H1.99967C1.63148 11 1.33301 10.7015 1.33301 10.3333Z"}))}function pe({handleAddOption:t}){return(0,e.createElement)("div",{className:"givewp-options-header"},(0,e.createElement)(i.BaseControl.VisualLabel,{className:"givewp-options-header--label"},(0,r.__)("Options","give")),(0,e.createElement)(i.Button,{icon:ce,className:"givewp-options-header--button",onClick:t}))}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}function ve(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ye(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===me(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var xe="function"==typeof Symbol&&Symbol.observable||"@@observable",Ee=function(){return Math.random().toString(36).substring(7).split("").join(".")},Oe={INIT:"@@redux/INIT"+Ee(),REPLACE:"@@redux/REPLACE"+Ee(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ee()}};function Ce(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(we(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(we(1));return n(Ce)(e,t)}if("function"!=typeof e)throw new Error(we(2));var o=e,i=t,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)throw new Error(we(3));return i}function d(e){if("function"!=typeof e)throw new Error(we(4));if(s)throw new Error(we(5));var t=!0;return u(),l.push(e),function(){if(t){if(s)throw new Error(we(6));t=!1,u();var n=l.indexOf(e);l.splice(n,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(we(7));if(void 0===e.type)throw new Error(we(8));if(s)throw new Error(we(9));try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}return f({type:Oe.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(we(10));o=e,f({type:Oe.REPLACE})}})[xe]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(we(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[xe]=function(){return this},e},r}function ke(e,t){return function(){return t(e.apply(this,arguments))}}function Ne(e,t){if("function"==typeof e)return ke(e,t);if("object"!=typeof e||null===e)throw new Error(we(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=ke(o,t))}return n}function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var Se=I().createContext(null),Pe=function(e){e()},Te=function(){return Pe},Le={notify:function(){},get:function(){return[]}};function je(e,t){var n,r=Le;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=Te(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Le)},getListeners:function(){return r}};return a}var Ie="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?j.useLayoutEffect:j.useEffect,De=function(e){var t=e.store,n=e.context,r=e.children,o=(0,j.useMemo)((function(){var e=je(t);return{store:t,subscription:e}}),[t]),i=(0,j.useMemo)((function(){return t.getState()}),[t]);Ie((function(){var e=o.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,i]);var a=n||Se;return I().createElement(a.Provider,{value:o},r)};function Re(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var qe=n(8679),Me=n.n(qe),Be=n(9864),He=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ve=["reactReduxForwardedRef"],Fe=[],Ue=[null,null];function Ge(e,t){var n=e[1];return[t.payload,n+1]}function ze(e,t,n){Ie((function(){return e.apply(void 0,t)}),n)}function We(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function Ze(e,t,n,r,o,i,a,l,s,u){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||s():(i.current=e,l.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=f,n.trySubscribe(),f(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var Ke=function(){return[null,0]};function $e(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=void 0===i?"connectAdvanced":i,l=n.renderCountProp,s=void 0===l?void 0:l,u=n.shouldHandleStateChanges,c=void 0===u||u,d=n.storeKey,f=void 0===d?"store":d,p=(n.withRef,n.forwardRef),h=void 0!==p&&p,v=n.context,g=void 0===v?Se:v,m=Re(n,He),y=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),i=ge({},m,{getDisplayName:o,methodName:a,renderCountProp:s,shouldHandleStateChanges:c,storeKey:f,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=m.pure,u=l?j.useMemo:function(e){return e()};function d(n){var r=(0,j.useMemo)((function(){var e=n.reactReduxForwardedRef,t=Re(n,Ve);return[n.context,e,t]}),[n]),o=r[0],a=r[1],l=r[2],s=(0,j.useMemo)((function(){return o&&o.Consumer&&(0,Be.isContextConsumer)(I().createElement(o.Consumer,null))?o:y}),[o,y]),d=(0,j.useContext)(s),f=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var p=f?n.store:d.store,h=(0,j.useMemo)((function(){return function(t){return e(t.dispatch,i)}(p)}),[p]),v=(0,j.useMemo)((function(){if(!c)return Ue;var e=je(p,f?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,f,d]),g=v[0],m=v[1],b=(0,j.useMemo)((function(){return f?d:ge({},d,{subscription:g})}),[f,d,g]),_=(0,j.useReducer)(Ge,Fe,Ke),w=_[0][0],x=_[1];if(w&&w.error)throw w.error;var E=(0,j.useRef)(),O=(0,j.useRef)(l),C=(0,j.useRef)(),k=(0,j.useRef)(!1),N=u((function(){return C.current&&l===O.current?C.current:h(p.getState(),l)}),[p,w,l]);ze(We,[O,E,k,l,N,C,m]),ze(Ze,[c,p,g,h,O,E,k,C,m,x],[p,g,h]);var A=(0,j.useMemo)((function(){return I().createElement(t,ge({},N,{ref:a}))}),[a,t,N]);return(0,j.useMemo)((function(){return c?I().createElement(s.Provider,{value:b},A):A}),[s,A,b])}var p=l?I().memo(d):d;if(p.WrappedComponent=t,p.displayName=d.displayName=r,h){var v=I().forwardRef((function(e,t){return I().createElement(p,ge({},e,{reactReduxForwardedRef:t}))}));return v.displayName=r,v.WrappedComponent=t,Me()(v,t)}return Me()(p,t)}}function Ye(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Xe(e,t){if(Ye(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Ye(e[n[o]],t[n[o]]))return!1;return!0}function Qe(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Je(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function et(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Je(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Je(o),o=r(t,n)),o},r}}var tt=[function(e){return"function"==typeof e?et(e):void 0},function(e){return e?void 0:Qe((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?Qe((function(t){return function(e,t){var n={},r=function(r){var o=e[r];"function"==typeof o&&(n[r]=function(){return t(o.apply(void 0,arguments))})};for(var o in e)r(o);return n}(e,t)})):void 0}],nt=[function(e){return"function"==typeof e?et(e):void 0},function(e){return e?void 0:Qe((function(){return{}}))}];function rt(e,t,n){return ge({},n,e,t)}var ot=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,l){var s=e(t,n,l);return a?o&&i(s,r)||(r=s):(a=!0,r=s),r}}}(e):void 0},function(e){return e?void 0:function(){return rt}}],it=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function at(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function lt(e,t,n,r,o){var i,a,l,s,u,c=o.areStatesEqual,d=o.areOwnPropsEqual,f=o.areStatePropsEqual,p=!1;return function(o,h){return p?function(o,p){var h,v,g=!d(p,a),m=!c(o,i,p,a);return i=o,a=p,g&&m?(l=e(i,a),t.dependsOnOwnProps&&(s=t(r,a)),u=n(l,s,a)):g?(e.dependsOnOwnProps&&(l=e(i,a)),t.dependsOnOwnProps&&(s=t(r,a)),u=n(l,s,a)):m?(h=e(i,a),v=!f(h,l),l=h,v&&(u=n(l,s,a)),u):u}(o,h):(l=e(i=o,a=h),s=t(r,a),u=n(l,s,a),p=!0,u)}}function st(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Re(t,it),a=n(e,i),l=r(e,i),s=o(e,i);return(i.pure?lt:at)(a,l,s,e,i)}var ut=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ct(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function dt(e,t){return e===t}function ft(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?$e:n,o=t.mapStateToPropsFactories,i=void 0===o?nt:o,a=t.mapDispatchToPropsFactories,l=void 0===a?tt:a,s=t.mergePropsFactories,u=void 0===s?ot:s,c=t.selectorFactory,d=void 0===c?st:c;return function(e,t,n,o){void 0===o&&(o={});var a=o,s=a.pure,c=void 0===s||s,f=a.areStatesEqual,p=void 0===f?dt:f,h=a.areOwnPropsEqual,v=void 0===h?Xe:h,g=a.areStatePropsEqual,m=void 0===g?Xe:g,y=a.areMergedPropsEqual,b=void 0===y?Xe:y,_=Re(a,ut),w=ct(e,i,"mapStateToProps"),x=ct(t,l,"mapDispatchToProps"),E=ct(n,u,"mergeProps");return r(d,ge({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:x,initMergeProps:E,pure:c,areStatesEqual:p,areOwnPropsEqual:v,areStatePropsEqual:m,areMergedPropsEqual:b},_))}}var pt,ht=ft(),vt=n(1850),gt=n.n(vt);function mt(e,t){var n=(0,j.useState)((function(){return{inputs:t,result:e()}}))[0],r=(0,j.useRef)(!0),o=(0,j.useRef)(n),i=r.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return(0,j.useEffect)((function(){r.current=!1,o.current=i}),[i]),i.result}pt=vt.unstable_batchedUpdates,Pe=pt;var yt=mt,bt=function(e,t){return mt((function(){return e}),t)},_t=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},wt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},xt=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Et={top:0,right:0,bottom:0,left:0},Ot=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Et:n,o=e.border,i=void 0===o?Et:o,a=e.padding,l=void 0===a?Et:a,s=_t(wt(t,r)),u=_t(xt(t,i)),c=_t(xt(u,l));return{marginBox:s,borderBox:_t(t),paddingBox:u,contentBox:c,margin:r,border:i,padding:l}},Ct=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),n},kt=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,l=e.padding,s=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Ot({borderBox:s,border:i,margin:a,padding:l})},Nt=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),kt(e,t)},At=function(e,t){var n={top:Ct(t.marginTop),right:Ct(t.marginRight),bottom:Ct(t.marginBottom),left:Ct(t.marginLeft)},r={top:Ct(t.paddingTop),right:Ct(t.paddingRight),bottom:Ct(t.paddingBottom),left:Ct(t.paddingLeft)},o={top:Ct(t.borderTopWidth),right:Ct(t.borderRightWidth),bottom:Ct(t.borderBottomWidth),left:Ct(t.borderLeftWidth)};return Ot({borderBox:e,margin:n,padding:r,border:o})},St=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return At(t,n)},Pt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Tt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||Pt(r)&&Pt(o)))return!1;var r,o;return!0}var Lt=function(e,t){var n;void 0===t&&(t=Tt);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}},jt=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function It(e,t){}function Dt(){}function Rt(e,t,n){var r=t.map((function(t){var r,o,i=(r=n,o=t.options,ge({},r,{},o));return e.addEventListener(t.eventName,t.fn,i),function(){e.removeEventListener(t.eventName,t.fn,i)}}));return function(){r.forEach((function(e){e()}))}}It.bind(null,"warn"),It.bind(null,"error");var qt=!0,Mt="Invariant failed";function Bt(e){this.message=e}function Ht(e,t){if(!e)throw new Bt(qt?Mt:Mt+": "+(t||""))}Bt.prototype.toString=function(){return this.message};var Vt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=Dt,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof Bt&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}ve(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Rt(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof Bt))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(I().Component),Ft=function(e){return e+1},Ut=function(e,t){var n=e.droppableId===t.droppableId,r=Ft(e.index),o=Ft(t.index);return n?"\n      You have moved the item from position "+r+"\n      to position "+o+"\n    ":"\n    You have moved the item from position "+r+"\n    in list "+e.droppableId+"\n    to list "+t.droppableId+"\n    in position "+o+"\n  "},Gt=function(e,t,n){return t.droppableId===n.droppableId?"\n      The item "+e+"\n      has been combined with "+n.draggableId:"\n      The item "+e+"\n      in list "+t.droppableId+"\n      has been combined with "+n.draggableId+"\n      in list "+n.droppableId+"\n    "},zt=function(e){return"\n  The item has returned to its starting position\n  of "+Ft(e.index)+"\n"},Wt={dragHandleUsageInstructions:"\n  Press space bar to start a drag.\n  When dragging you can use the arrow keys to move the item around and escape to cancel.\n  Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:function(e){return"\n  You have lifted an item in position "+Ft(e.source.index)+"\n"},onDragUpdate:function(e){var t=e.destination;if(t)return Ut(e.source,t);var n=e.combine;return n?Gt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:function(e){if("CANCEL"===e.reason)return"\n      Movement cancelled.\n      "+zt(e.source)+"\n    ";var t=e.destination,n=e.combine;return t?"\n      You have dropped the item.\n      "+Ut(e.source,t)+"\n    ":n?"\n      You have dropped the item.\n      "+Gt(e.draggableId,e.source,n)+"\n    ":"\n    The item has been dropped while not over a drop area.\n    "+zt(e.source)+"\n  "}},Zt={x:0,y:0},Kt=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},$t=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Yt=function(e,t){return e.x===t.x&&e.y===t.y},Xt=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Qt=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Jt=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},en=function(e,t){return Math.min.apply(Math,t.map((function(t){return Jt(e,t)})))},tn=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},nn=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},rn=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},on=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=_t({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):_t(e)},an=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t){return t?nn(e,t.scroll.diff.displacement):e}(t.marginBox,o),a=function(e,t,n){var r;return n&&n.increasedBy?ge({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(i,r,n);return{page:t,withPlaceholder:n,active:on(a,o)}},ln=function(e,t){e.frame||Ht(!1);var n=e.frame,r=$t(t,n.scroll.initial),o=Xt(r),i=ge({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}});return ge({},e,{frame:i,subject:an({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i})})};function sn(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function un(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function cn(e,t){if(e.find)return e.find(t);var n=un(e,t);return-1!==n?e[n]:void 0}function dn(e){return Array.prototype.slice.call(e)}var fn=Lt((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),pn=Lt((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),hn=Lt((function(e){return sn(e)})),vn=Lt((function(e){return sn(e)})),gn=Lt((function(e,t){var n=vn(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return n}));function mn(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function yn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var bn=Lt((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),wn=function(e,t){return e.descriptor.droppableId===t.descriptor.id},xn={point:Zt,value:0},En={invisible:{},visible:{},all:[]},On={displaced:En,displacedBy:xn,at:null},Cn=function(e,t){return function(n){return e<=n&&n<=t}},kn=function(e){var t=Cn(e.top,e.bottom),n=Cn(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;var a=r.top<e.top&&r.bottom>e.bottom,l=r.left<e.left&&r.right>e.right;return!(!a||!l)||a&&i||l&&o}},Nn=function(e){var t=Cn(e.top,e.bottom),n=Cn(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},An={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Sn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Pn=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Zt;return nn(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,i)&&function(e,t,n){return n(t)(e)}(a,r,i)},Tn=function(e){return Pn(ge({},e,{isVisibleThroughFrameFn:kn}))},Ln=function(e){return Pn(ge({},e,{isVisibleThroughFrameFn:Nn}))},jn=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate};function In(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var l=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return _t(wt(n,r))}(t,r),s=t.descriptor.id;if(e.all.push(s),!Tn({target:l,destination:n,viewport:o,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var u={draggableId:s,shouldAnimate:jn(s,a,i)};return e.visible[s]=u,e}),{all:[],visible:{},invisible:{}})}function Dn(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:En,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function Rn(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,u=wn(t,r);if(null==l)return Dn({insideDestination:n,inHomeList:u,displacedBy:i,destination:r});var c=cn(n,(function(e){return e.descriptor.index===l}));if(!c)return Dn({insideDestination:n,inHomeList:u,displacedBy:i,destination:r});var d=bn(t,n),f=n.indexOf(c);return{displaced:In({afterDragging:d.slice(f),destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:s}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function qn(e,t){return Boolean(t.effected[e])}var Mn=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Bn=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},Hn=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Qt(t.line,n.marginBox[t.end]+Mn(t,r),Bn(t,n.marginBox,r))},Vn=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Qt(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Bn(t,n.marginBox,r))},Fn=function(e,t){var n=e.frame;return n?Kt(t,n.scroll.diff.displacement):t},Un=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,a=n.page.borderBox.center,l=t.at;return r&&l?"REORDER"===l.type?function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=gn(o.descriptor.id,r),l=n.page,s=o.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Qt(t.line,n.contentBox[t.start]+Mn(t,r),Bn(t,n.contentBox,r))}({axis:s,moveInto:o.page,isMoving:l});var u=t.displaced,c=t.displacedBy,d=u.all[0];if(d){var f=r[d];if(qn(d,i))return Vn({axis:s,moveRelativeTo:f.page,isMoving:l});var p=kt(f.page,c.point);return Vn({axis:s,moveRelativeTo:p,isMoving:l})}var h=a[a.length-1];if(h.descriptor.id===n.descriptor.id)return l.borderBox.center;if(qn(h.descriptor.id,i)){var v=kt(h.page,Xt(i.displacedBy.point));return Hn({axis:s,moveRelativeTo:v,isMoving:l})}return Hn({axis:s,moveRelativeTo:h.page,isMoving:l})}({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=yn(n);o||Ht(!1);var i=o.draggableId,a=r[i].page.borderBox.center,l=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return qn(r,n)?i?Zt:Xt(o.point):i?o.point:Zt}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return Kt(a,l)}({impact:t,draggables:o,afterCritical:i}):a}(e),n=e.droppable;return n?Fn(n,t):t},Gn=function(e,t){var n=$t(t,e.scroll.initial),r=Xt(n);return{frame:_t({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function zn(e,t){return e.map((function(e){return t[e]}))}var Wn=function(e){var t,n,r=e.pageBorderBoxCenter,o=e.draggable,i=(t=e.viewport,n=r,Kt(t.scroll.diff.displacement,n)),a=$t(i,o.page.borderBox.center);return Kt(o.client.borderBox.center,a)},Zn=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=void 0!==a&&a,s=$t(r,t.page.borderBox.center),u={target:nn(t.page.borderBox,s),destination:n,withDroppableDisplacement:i,viewport:o};return l?function(e){return Pn(ge({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=Cn(e.top,e.bottom),r=Cn(e.left,e.right);return function(e){return t===An?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):Ln(u)},Kn=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var c=gn(r.descriptor.id,o),d=wn(n,r),f=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!mn(i))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return ge({},i,{at:t})}var l=i.displaced.all,s=l.length?l[0]:null;if(t)return s?a(s):null;var u=bn(n,o);if(!s)return u.length?a(u[u.length-1].descriptor.id):null;var c=un(u,(function(e){return e.descriptor.id===s}));-1===c&&Ht(!1);var d=c-1;return d<0?null:a(u[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:c,previousImpact:i})||function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,u=e.afterCritical,c=l.at;if(c||Ht(!1),"REORDER"===c.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return a<l||a>(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a});return null==d?null:Rn({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var f=function(e){var t=e.isMovingForward,n=e.draggables,r=e.combine,o=e.afterCritical;if(!e.destination.isCombineEnabled)return null;var i=r.draggableId,a=n[i].descriptor.index;return qn(i,o)?t?a:a-1:t?a+1:a}({isMovingForward:t,destination:i,displaced:l.displaced,draggables:o,combine:c.combine,afterCritical:u});return null==f?null:Rn({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:f})}({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:c,previousImpact:i,viewport:a,afterCritical:u});if(!f)return null;var p=Un({impact:f,draggable:n,droppable:r,draggables:o,afterCritical:u});if(Zn({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Wn({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:f,scrollJumpRequest:null};var h=$t(p,l),v=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,a=Gn(n,Kt(n.scroll.current,i)),l=r.frame?ln(r,Kt(r.frame.scroll.current,i)):r,s=t.displaced,u=In({afterDragging:zn(s.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),c=In({afterDragging:zn(s.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},f={},p=[s,u,c];return s.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,p);t?f[e]=t:d[e]=!0})),ge({},t,{displaced:{all:s.all,invisible:d,visible:f}})}({impact:f,viewport:a,destination:r,draggables:o,maxScrollChange:h});return{clientSelection:s,impact:v,scrollJumpRequest:h}},$n=function(e){var t=e.subject.active;return t||Ht(!1),t},Yn=function(e,t){var n=e.page.borderBox.center;return qn(e.descriptor.id,t)?$t(n,t.displacedBy.point):n},Xn=function(e,t){var n=e.page.borderBox;return qn(e.descriptor.id,t)?nn(n,Xt(t.displacedBy.point)):n},Qn=Lt((function(e,t){var n=t[e.line];return{value:n,point:Qt(e.line,n)}})),Jn=function(e,t){return ge({},e,{scroll:ge({},e.scroll,{max:t})})},er=function(e,t,n){var r=e.frame;wn(t,e)&&Ht(!1),e.subject.withPlaceholder&&Ht(!1);var o=Qn(e.axis,t.displaceBy).point,i=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return Qt(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],i=gn(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-o;return i<=0?null:Qt(r.line,i)}(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r)return ge({},e,{subject:an({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame})});var l=i?Kt(r.scroll.max,i):r.scroll.max,s=Jn(r,l);return ge({},e,{subject:an({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:s}),frame:s})},tr=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},nr=function(e){var t=e.state,n=e.type,r=function(e,t){var n=tr(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),o=Boolean(r),i=t.dimensions.droppables[t.critical.droppable.id],a=r||i,l=a.axis.direction,s="vertical"===l&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===l&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(s&&!o)return null;var u="MOVE_DOWN"===n||"MOVE_RIGHT"===n,c=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,f=t.dimensions,p=f.draggables,h=f.droppables;return s?Kn({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,u=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=Cn(a[l.start],a[l.end]),u=hn(o).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return kn(i.frame)($n(e))})).filter((function(e){var n=$n(e);return t?a[l.crossAxisEnd]<n[l.crossAxisEnd]:n[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var t=$n(e),n=Cn(t[l.start],t[l.end]);return s(t[l.start])||s(t[l.end])||n(a[l.start])||n(a[l.end])})).sort((function(e,n){var r=$n(e)[l.crossAxisStart],o=$n(n)[l.crossAxisStart];return t?r-o:o-r})).filter((function(e,t,n){return $n(e)[l.crossAxisStart]===$n(n[0])[l.crossAxisStart]}));if(!u.length)return null;if(1===u.length)return u[0];var c=u.filter((function(e){return Cn($n(e)[l.start],$n(e)[l.end])(n[l.line])}));return 1===c.length?c[0]:c.length>1?c.sort((function(e,t){return $n(e)[l.start]-$n(t)[l.start]}))[0]:u.sort((function(e,t){var r=en(n,rn($n(e))),o=en(n,rn($n(t)));return r!==o?r-o:$n(e)[l.start]-$n(t)[l.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:l});if(!u)return null;var c=gn(u.descriptor.id,i),d=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.afterCritical,i=e.insideDestination.filter((function(e){return Ln({target:Xn(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=Jt(t,Fn(r,Yn(e,o))),a=Jt(t,Fn(r,Yn(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index}));return i[0]||null}({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:c,afterCritical:s}),f=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var u={displaced:En,displacedBy:xn,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},c=Un({impact:u,draggable:o,droppable:a,draggables:i,afterCritical:s}),d=wn(o,a)?a:er(a,o,i);return Zn({draggable:o,destination:d,newPageBorderBoxCenter:c,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?u:null}var f,p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),h=(f=n.descriptor.index,n.descriptor.id===o.descriptor.id||p?f:f+1);return Rn({draggable:o,insideDestination:r,destination:a,viewport:l,displacedBy:Qn(a.axis,o.displaceBy),last:En,index:h})}({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:i,moveRelativeTo:d,insideDestination:c,viewport:l,afterCritical:s});if(!f)return null;var p=Un({impact:f,draggable:r,droppable:u,draggables:i,afterCritical:s});return{clientSelection:Wn({pageBorderBoxCenter:p,draggable:r,viewport:l}),impact:f,scrollJumpRequest:null}}({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,isOver:a,draggables:p,droppables:h,viewport:t.viewport,afterCritical:t.afterCritical})};function rr(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function or(e){var t=Cn(e.top,e.bottom),n=Cn(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}var ir=function(e,t){return _t(nn(e,t))};function ar(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var lr=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,l=e.afterCritical,s=ir(n.page.borderBox,t),u=function(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=hn(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,o=e.subject.active;if(!o)return!1;if(r=o,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(or(o)(t.center))return!0;var i=e.axis,a=o.center[i.crossAxisLine],l=t[i.crossAxisStart],s=t[i.crossAxisEnd],u=Cn(o[i.crossAxisStart],o[i.crossAxisEnd]),c=u(l),d=u(s);return!c&&!d||(c?l<a:s>a)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.candidates,r=e.draggable.page.borderBox.center,o=n.map((function(e){var n=e.axis,o=Qt(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Jt(r,o)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}({pageBorderBox:s,draggable:n,droppables:o});if(!u)return On;var c=o[u],d=gn(c.descriptor.id,r),f=function(e,t){var n=e.frame;return n?ir(t,n.scroll.diff.value):t}(c,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,s=Qn(o.axis,t.displaceBy),u=s.value,c=n[l.start],d=n[l.end],f=cn(bn(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[l.size]/4,i=qn(t,a),s=ar({displaced:r.displaced,id:t});return i?s?d>n[l.start]+o&&d<n[l.end]-o:c>n[l.start]-u+o&&c<n[l.end]-u-o:s?d>n[l.start]+u+o&&d<n[l.end]+u-o:c>n[l.start]+o&&c<n[l.end]-o}));return f?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:f.descriptor.id,droppableId:o.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:f,draggable:n,previousImpact:i,destination:c,insideDestination:d,afterCritical:l})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,u=Qn(r.axis,n.displaceBy),c=u.value,d=t[s.start],f=t[s.end],p=function(e){var t=e.draggable,n=e.closest;return n?e.inHomeList&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:cn(bn(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=qn(t,l),o=ar({displaced:i,id:t});return r?o?f<=n:d<n-c:o?f<=n+c:d<n})),inHomeList:wn(n,r)});return Rn({draggable:n,insideDestination:o,destination:r,viewport:a,last:i,displacedBy:u,index:p})}({pageBorderBoxWithDroppableScroll:f,draggable:n,destination:c,insideDestination:d,last:i.displaced,viewport:a,afterCritical:l})},sr=function(e,t){var n;return ge({},e,((n={})[t.descriptor.id]=t,n))},ur=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,a=e.scrollJumpRequest,l=o||t.viewport,s=r||t.dimensions,u=n||t.current.client.selection,c=$t(u,t.initial.client.selection),d={offset:c,selection:u,borderBoxCenter:Kt(t.initial.client.borderBoxCenter,c)},f={selection:Kt(d.selection,l.scroll.current),borderBoxCenter:Kt(d.borderBoxCenter,l.scroll.current),offset:Kt(d.offset,l.scroll.diff.value)},p={client:d,page:f};if("COLLECTING"===t.phase)return ge({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:p});var h=s.draggables[t.critical.draggable.id],v=i||lr({pageOffset:f.offset,draggable:h,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.impact,i=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=tr(t),i=tr(n);if(!o)return r;if(o===i)return r;var a=r[o];if(!a.subject.withPlaceholder)return r;var l=function(e){var t=e.subject.withPlaceholder;t||Ht(!1);var n=e.frame;if(!n)return ge({},e,{subject:an({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var r=t.oldFrameMaxScroll;r||Ht(!1);var o=Jn(n,r);return ge({},e,{subject:an({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null}),frame:o})}(a);return sr(r,l)}({previousImpact:e.previousImpact,impact:o,droppables:r}),a=tr(o);if(!a)return i;var l=r[a];if(wn(t,l))return i;if(l.subject.withPlaceholder)return i;var s=er(l,t,n);return sr(i,s)}({draggable:h,impact:v,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables});return ge({},t,{current:p,dimensions:{draggables:s.draggables,droppables:g},impact:v,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})},cr=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,a=t.displaced,l=function(e,t){return e.map((function(e){return t[e]}))}(a.all,r);return ge({},t,{displaced:In({afterDragging:l,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:a})})},dr=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,a=e.afterCritical,l=Un({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:a});return Wn({pageBorderBoxCenter:l,draggable:n,viewport:i})},fr=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&Ht(!1);var o=t.impact,i=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,u=l[t.critical.draggable.id],c=tr(o);c||Ht(!1);var d=s[c],f=cr({impact:o,viewport:i,destination:d,draggables:l}),p=dr({impact:f,draggable:u,droppable:d,draggables:l,viewport:i,afterCritical:t.afterCritical});return ur({impact:f,clientSelection:p,state:t,dimensions:a,viewport:i})},pr=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=Qn(n.axis,t.displaceBy),a=gn(n.descriptor.id,r),l=a.indexOf(t);-1===l&&Ht(!1);var s,u=a.slice(l+1),c=u.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:c};return{impact:{displaced:In({afterDragging:u,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(s=t.descriptor,{index:s.index,droppableId:s.droppableId})}},afterCritical:d}},hr=function(e){return"SNAP"===e.movementMode},vr=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:sr(e.droppables,t)}}(e.dimensions,t);return!hr(e)||n?ur({state:e,dimensions:r}):fr({state:e,dimensions:r})};function gr(e){return e.isDragging&&"SNAP"===e.movementMode?ge({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var mr={phase:"IDLE",completed:null,shouldFlush:!1},yr=function(e,t){if(void 0===e&&(e=mr),"FLUSH"===t.type)return ge({},mr,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Ht(!1);var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],c={selection:o,borderBoxCenter:s.client.borderBox.center,offset:Zt},d={client:c,page:{selection:Kt(c.selection,i.scroll.initial),borderBoxCenter:Kt(c.selection,i.scroll.initial),offset:Kt(c.selection,i.scroll.diff.value)}},f=hn(a.droppables).every((function(e){return!e.isFixedOnPage})),p=pr({draggable:s,home:u,draggables:a.draggables,viewport:i}),h=p.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:f,impact:h,afterCritical:p.afterCritical,onLiftImpact:h,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Ht(!1),ge({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ht(!1),function(e){var t=e.state,n=e.published,r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return ln(n,e.scroll)})),o=ge({},t.dimensions.droppables,{},fn(r)),i=pn(function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=function(e){var t=e.frame;return t||Ht(!1),t}(n[t]),a=i.scroll.diff.value,l=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=kt(t.client,n),i=Nt(o,r);return ge({},t,{placeholder:ge({},t.placeholder,{client:o}),client:o,page:i})}({draggable:e,offset:Kt(o,a),initialWindowScroll:r.scroll.initial});return l}))}({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=ge({},t.dimensions.draggables,{},i);n.removals.forEach((function(e){delete a[e]}));var l={droppables:o,draggables:a},s=tr(t.impact),u=s?l.droppables[s]:null,c=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],f=pr({draggable:c,home:d,draggables:a,viewport:t.viewport}),p=f.impact,h=f.afterCritical,v=u&&u.isCombineEnabled?t.impact:p,g=lr({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:v,viewport:t.viewport,afterCritical:h}),m=ge({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:p,dimensions:l,afterCritical:h,forceShouldAnimate:!1});return"COLLECTING"===t.phase?m:ge({phase:"DROP_PENDING"},m,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;rr(e)||Ht(!1);var v=t.payload.client;return Yt(v,e.current.client.selection)?e:ur({state:e,clientSelection:v,impact:hr(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return gr(e);if("COLLECTING"===e.phase)return gr(e);rr(e)||Ht(!1);var g=t.payload,m=g.id,y=g.newScroll,b=e.dimensions.droppables[m];if(!b)return e;var _=ln(b,y);return vr(e,_,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;rr(e)||Ht(!1);var w=t.payload,x=w.id,E=w.isEnabled,O=e.dimensions.droppables[x];O||Ht(!1),O.isEnabled===E&&Ht(!1);var C=ge({},O,{isEnabled:E});return vr(e,C,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;rr(e)||Ht(!1);var k=t.payload,N=k.id,A=k.isCombineEnabled,S=e.dimensions.droppables[N];S||Ht(!1),S.isCombineEnabled===A&&Ht(!1);var P=ge({},S,{isCombineEnabled:A});return vr(e,P,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;rr(e)||Ht(!1),e.isWindowScrollAllowed||Ht(!1);var T=t.payload.newScroll;if(Yt(e.viewport.scroll.current,T))return gr(e);var L=Gn(e.viewport,T);return hr(e)?fr({state:e,viewport:L}):ur({state:e,viewport:L})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!rr(e))return e;var j=t.payload.maxScroll;if(Yt(j,e.viewport.scroll.max))return e;var I=ge({},e.viewport,{scroll:ge({},e.viewport.scroll,{max:j})});return ge({phase:"DRAGGING"},e,{viewport:I})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Ht(!1);var D=nr({state:e,type:t.type});return D?ur({state:e,impact:D.impact,clientSelection:D.clientSelection,scrollJumpRequest:D.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var R=t.payload.reason;return"COLLECTING"!==e.phase&&Ht(!1),ge({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:R})}if("DROP_ANIMATE"===t.type){var q=t.payload,M=q.completed,B=q.dropDuration,H=q.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Ht(!1),{phase:"DROP_ANIMATING",completed:M,dropDuration:B,newHomeClientOffset:H,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},br=function(e){return{type:"LIFT",payload:e}},_r=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},wr=function(){return{type:"COLLECTION_STARTING",payload:null}},xr=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},Er=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Or=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Cr=function(e){return{type:"MOVE",payload:e}},kr=function(){return{type:"MOVE_UP",payload:null}},Nr=function(){return{type:"MOVE_DOWN",payload:null}},Ar=function(){return{type:"MOVE_RIGHT",payload:null}},Sr=function(){return{type:"MOVE_LEFT",payload:null}},Pr=function(){return{type:"FLUSH",payload:null}},Tr=function(e){return{type:"DROP_COMPLETE",payload:e}},Lr=function(e){return{type:"DROP",payload:e}},jr="cubic-bezier(.2,1,.1,1)",Ir=0,Dr=.7,Rr=.75,qr="0.2s cubic-bezier(0.2, 0, 0, 1)",Mr={fluid:"opacity "+qr,snap:"transform "+qr+", opacity "+qr,drop:function(e){var t=e+"s "+jr;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+qr,placeholder:"height "+qr+", width "+qr+", margin "+qr},Br=function(e){return Yt(e,Zt)?null:"translate("+e.x+"px, "+e.y+"px)"},Hr=Br,Vr=function(e,t){var n=Br(e);return n?t?n+" scale("+Rr+")":n:null},Fr=.33,Ur=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var o=t(),i=r.payload.reason;if("COLLECTING"!==o.phase){if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&Ht(!1),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Ht(!1);var a=o.critical,l=o.dimensions,s=l.draggables[o.critical.draggable.id],u=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:ge({},r,{displaced:En}),didDropInsideDroppable:!0}:{impact:cr({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),c=u.impact,d=u.didDropInsideDroppable,f=d?mn(c):null,p=d?yn(c):null,h={index:a.draggable.index,droppableId:a.droppable.id},v={draggableId:s.descriptor.id,type:s.descriptor.type,source:h,reason:i,mode:o.movementMode,destination:f,combine:p},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,a=r.draggables,l=r.droppables,s=tr(t),u=s?l[s]:null,c=l[n.descriptor.droppableId],d=dr({impact:t,draggable:n,draggables:a,afterCritical:i,droppable:u||c,viewport:o});return $t(d,n.client.borderBox.center)}({impact:c,draggable:s,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),m={critical:o.critical,afterCritical:o.afterCritical,result:v,impact:c};if(!Yt(o.current.client.offset,g)||Boolean(v.combine)){var y=function(e){var t=e.reason,n=Jt(e.current,e.destination);if(n<=0)return Fr;if(n>=1500)return.55;var r=Fr+n/1500*.22000000000000003;return Number(("CANCEL"===t?.6*r:r).toFixed(2))}({current:o.current.client.offset,destination:g,reason:i});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:g,dropDuration:y,completed:m}})}else n(Tr({completed:m}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},Gr=function(){return{x:window.pageXOffset,y:window.pageYOffset}};var zr=function(e){var t=function(e){var t=e.onWindowScroll,n=jt((function(){t(Gr())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=Dt;function i(){return o!==Dt}return{start:function(){i()&&Ht(!1),o=Rt(window,[r])},stop:function(){i()||Ht(!1),n.cancel(),o(),o=Dt},isActive:i}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Wr=function(e,t){t()},Zr=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Kr=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},$r=function(e,t){var n=function(e,t){var n,r=(n=[],{add:function(e){var t=setTimeout((function(){return function(e){var t=un(n,(function(t){return t.timerId===e}));-1===t&&Ht(!1),n.splice(t,1)[0].callback()}(t)})),r={timerId:t,callback:e};n.push(r)},flush:function(){if(n.length){var e=[].concat(n);n.length=0,e.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}),o=null,i=function(n){o||Ht(!1),o=null,Wr(0,(function(){return Kr(e().onDragEnd,n,t,Wt.onDragEnd)}))};return{beforeCapture:function(t,n){o&&Ht(!1),Wr(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){o&&Ht(!1),Wr(0,(function(){var r=e().onBeforeDragStart;r&&r(Zr(t,n))}))},start:function(n,i){o&&Ht(!1);var a=Zr(n,i);o={mode:i,lastCritical:n,lastLocation:a.source,lastCombine:null},r.add((function(){Wr(0,(function(){return Kr(e().onDragStart,a,t,Wt.onDragStart)}))}))},update:function(n,i){var a=mn(i),l=yn(i);o||Ht(!1);var s=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(n,o.lastCritical);s&&(o.lastCritical=n);var u,c,d=(c=a,!(null==(u=o.lastLocation)&&null==c||null!=u&&null!=c&&u.droppableId===c.droppableId&&u.index===c.index));d&&(o.lastLocation=a);var f=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(o.lastCombine,l);if(f&&(o.lastCombine=l),s||d||f){var p=ge({},Zr(n,o.mode),{combine:l,destination:a});r.add((function(){Wr(0,(function(){return Kr(e().onDragUpdate,p,t,Wt.onDragUpdate)}))}))}},flush:function(){o||Ht(!1),r.flush()},drop:i,abort:function(){if(o){var e=ge({},Zr(o.lastCritical,o.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},Yr=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&Ht(!1),e.dispatch(Tr({completed:r.completed}))}else t(n)}}},Xr=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=Rt(window,[i])}))}}}},Qr=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Lr({reason:r.reason})))}}}},Jr=Ae,eo=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,a=e.announce,l=e.autoScroller;return Ce(yr,Jr(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(we(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=Ae.apply(void 0,i)(n.dispatch),_e(_e({},n),{},{dispatch:r})}}}((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,l=i.clientSelection,s=i.movementMode,u=n();"DROP_ANIMATING"===u.phase&&r(Tr({completed:u.completed})),"IDLE"!==n().phase&&Ht(!1),r(Pr()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:s}});var c={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},d=e.startPublishing(c),f=d.critical,p=d.dimensions,h=d.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:f,dimensions:p,clientSelection:l,movementMode:s,viewport:h}})}else t(o)}}}}(n),Ur,Yr,Xr,Qr,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var o=t.getState();return"DRAGGING"!==o.phase&&Ht(!1),void e.start(o)}n(r),e.scroll(t.getState())}}}}(l),zr,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),$r(i,a))))},to=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=$t({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},no=function(){var e=document.documentElement;return e||Ht(!1),e},ro=function(){var e=no();return to({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function oo(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var io,ao,lo=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame((function(){o=null;var e=r,i=e.additions,a=e.removals,l=e.modified,s=Object.keys(i).map((function(e){return t.draggable.getById(e).getDimension(Zt)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),u=Object.keys(l).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),c={additions:s,removals:Object.keys(a),modified:u};r={additions:{},removals:{},modified:{}},n.publish(c)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],i()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],i()},stop:function(){o&&(cancelAnimationFrame(o),o=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(t){n||Ht(!1);var o=n.critical.draggable;"ADDITION"===t.type&&oo(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&oo(e,o,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,o){e.droppable.exists(r)||Ht(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:function(r,o){n&&(e.droppable.exists(r)||Ht(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,o){n&&(e.droppable.exists(r)||Ht(!1),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:function(t){n&&Ht(!1);var r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},l=e.subscribe(o);return n={critical:a,unsubscribe:l},function(e){var t,n,r,o,i,a,l,s=e.critical,u=e.scrollOptions,c=e.registry,d=(t=Gr(),n=ro(),r=t.y,o=t.x,a=(i=no()).clientWidth,l=i.clientHeight,{frame:_t({top:r,left:o,right:o+a,bottom:r+l}),scroll:{initial:t,current:t,max:n,diff:{value:Zt,displacement:Zt}}}),f=d.scroll.current,p=s.droppable,h=c.droppable.getAllByType(p.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(f,u)})),v=c.draggable.getAllByType(s.draggable.type).map((function(e){return e.getDimension(f)}));return{dimensions:{draggables:pn(v),droppables:fn(h)},critical:s,viewport:d}}({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},so=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},uo=function(e){window.scrollBy(e.x,e.y)},co=Lt((function(e){return hn(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),fo=function(e){return Math.pow(e,2)},po=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?0:(r-t)/o},ho=360,vo=1200,go=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return 28;if(e===t.startScrollingFrom)return 1;var n=po({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=28*fo(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=vo,o=Date.now()-n;if(o>=vo)return e;if(o<ho)return 1;var i=po({startOfRange:ho,endOfRange:r,current:o}),a=e*fo(i);return Math.ceil(a)}(i,r),1):i},mo=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:.25*e[t.size],maxScrollValueAt:.05*e[t.size]}}(t,o);return n[o.end]<n[o.start]?go({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i}):-1*go({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i})},yo=tn((function(e){return 0===e?0:e})),bo=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=mo({container:n,distanceToEdges:a,dragStartTime:t,axis:An,shouldUseTimeDampening:i}),s=mo({container:n,distanceToEdges:a,dragStartTime:t,axis:Sn,shouldUseTimeDampening:i}),u=yo({x:s,y:l});if(Yt(u,Zt))return null;var c=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:u});return c?Yt(c,Zt)?null:c:null},_o=tn((function(e){return 0===e?0:e>0?1:-1})),wo=(io=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,o=Kt(t,r),i={x:io(o.x,n.x),y:io(o.y,n.y)};return Yt(i,Zt)?null:i}),xo=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=_o(r),a=wo({max:o,current:n,change:i});return!a||0!==i.x&&0===a.x||0!==i.y&&0===a.y},Eo=function(e,t){return xo({current:e.scroll.current,max:e.scroll.max,change:t})},Oo=function(e,t){var n=e.frame;return!!n&&xo({current:n.scroll.current,max:n.scroll.max,change:t})},Co=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.shouldUseTimeDampening,i=bo({dragStartTime:e.dragStartTime,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return i&&Eo(t,i)?i:null}({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r});if(s)return void o(s)}var u=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}var i=function(e,t){var n=cn(co(t),(function(t){return t.frame||Ht(!1),or(t.frame.pageMarginBox)(e)}));return n}(t,r);return i}({center:a,destination:tr(t.impact),droppables:t.dimensions.droppables});if(u){var c=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=bo({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return l&&Oo(t,l)?l:null}({dragStartTime:n,droppable:u,subject:l,center:a,shouldUseTimeDampening:r});c&&i(u.descriptor.id,c)}},ko=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow;return function(e){var o=e.scrollJumpRequest;if(o){var i=tr(e.impact);i||Ht(!1);var a=function(e,t){if(!Oo(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Oo(e,t)?wo({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=$t(t,r);return n(e.descriptor.id,o),$t(t,o)}(e.dimensions.droppables[i],o);if(a){var l=e.viewport,s=function(e,t,n){if(!e)return n;if(!Eo(t,n))return n;var o=function(e,t){if(!Eo(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return wo({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=$t(n,o);return r(i),$t(n,i)}(e.isWindowScrollAllowed,l,a);s&&function(e,n){var r=Kt(e.current.client.selection,n);t({client:r})}(e,s)}}}},No=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollDroppable,n=jt(e.scrollWindow),r=jt(t),o=null,i=function(e){o||Ht(!1);var t=o,i=t.shouldUseTimeDampening,a=t.dragStartTime;Co({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:a,shouldUseTimeDampening:i})};return{start:function(e){o&&Ht(!1);var t=Date.now(),n=!1,r=function(){n=!0};Co({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},n&&i(e)},stop:function(){o&&(n.cancel(),r.cancel(),o=null)},scroll:i}}({scrollWindow:n,scrollDroppable:t}),i=ko({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}},Ao="data-rbd",So={base:ao=Ao+"-drag-handle",draggableId:ao+"-draggable-id",contextId:ao+"-context-id"},Po=function(){var e=Ao+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),To=function(){var e=Ao+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Lo={contextId:Ao+"-scroll-container-context-id"},jo=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Io=function(e){var t,n,r,o=(t=e,function(e){return"["+e+'="'+t+'"]'}),i=(n="\n      cursor: -webkit-grab;\n      cursor: grab;\n    ",{selector:o(So.contextId),styles:{always:"\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n      transition: "+Mr.outOfTheWay+";\n    ",{selector:o(Po.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),i,{selector:o(To.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      "}}];return{always:jo(a,"always"),resting:jo(a,"resting"),dragging:jo(a,"dragging"),dropAnimating:jo(a,"dropAnimating"),userCancel:jo(a,"userCancel")}},Do="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?j.useLayoutEffect:j.useEffect,Ro=function(){var e=document.querySelector("head");return e||Ht(!1),e},qo=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t},Mo=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Bo(e){return e instanceof Mo(e).HTMLElement}function Ho(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||Ht(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return sn(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||Ht(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return sn(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Vo=I().createContext(null),Fo=function(){var e=document.body;return e||Ht(!1),e},Uo={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Go=function(e){return"rbd-announcement-"+e},zo=0,Wo={separator:"::"};function Zo(e,t){return void 0===t&&(t=Wo),yt((function(){return""+e+t.separator+zo++}),[t.separator,e])}var Ko=I().createContext(null);function $o(e){var t=(0,j.useRef)(e);return(0,j.useEffect)((function(){t.current=e})),t}var Yo,Xo,Qo=((Yo={})[13]=!0,Yo[9]=!0,Yo),Jo=function(e){Qo[e.keyCode]&&e.preventDefault()},ei=function(){var e="visibilitychange";return"undefined"==typeof document?e:cn([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),ti={type:"IDLE"};function ni(){}var ri=((Xo={})[34]=!0,Xo[33]=!0,Xo[36]=!0,Xo[35]=!0,Xo);var oi={type:"IDLE"},ii={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function ai(e,t){if(null==t)return!1;if(Boolean(ii[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&ai(e,t.parentElement)}function li(e,t){var n=t.target;return!!Bo(n)&&ai(e,n)}var si=function(e){return _t(e.getBoundingClientRect()).center},ui=function(){var e="matches";return"undefined"==typeof document?e:cn([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function ci(e,t){return null==e?null:e[ui](t)?e:ci(e.parentElement,t)}function di(e,t){return e.closest?e.closest(t):ci(e,t)}function fi(e){e.preventDefault()}function pi(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function hi(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!!i&&!!i.options.isEnabled&&!!so(n.getState(),o)}var vi=[function(e){var t=(0,j.useRef)(ti),n=(0,j.useRef)(Dt),r=yt((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,a,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),u(o,i)}}}}}}),[e]),o=yt((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),i=bt((function(){n.current=Rt(window,[o,r],{passive:!1,capture:!0})}),[o,r]),a=bt((function(){"IDLE"!==t.current.type&&(t.current=ti,n.current(),i())}),[i]),l=bt((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),s=bt((function(){var e=function(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(0===t){var a={x:n,y:i},l=r();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);if("PENDING"!==l.type&&Ht(!1),s=l.point,u=a,Math.abs(u.x-s.x)>=5||Math.abs(u.y-s.y)>=5){var s,u;e.preventDefault();var c=l.actions.fluidLift(a);o({type:"DRAGGING",actions:c})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Jo(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&Ht(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:ei,fn:t}]}({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Rt(window,e,{capture:!0,passive:!1})}),[l,a]),u=bt((function(e,n){"IDLE"!==t.current.type&&Ht(!1),t.current={type:"PENDING",point:n,actions:e},s()}),[s]);Do((function(){return i(),function(){n.current()}}),[i])},function(e){var t=(0,j.useRef)(ni),n=yt((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var o=e.findClosestDraggableId(n);if(o){var i=e.tryGetLock(o,s,{sourceEvent:n});if(i){n.preventDefault();var a=!0,l=i.snapLift();t.current(),t.current=Rt(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(ri[r.keyCode]?r.preventDefault():Jo(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ei,fn:n}]}(l,s),{capture:!0,passive:!1})}}}function s(){a||Ht(!1),a=!1,t.current(),r()}}}}),[e]),r=bt((function(){t.current=Rt(window,[n],{passive:!1,capture:!0})}),[n]);Do((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,j.useRef)(oi),n=(0,j.useRef)(Dt),r=bt((function(){return t.current}),[]),o=bt((function(e){t.current=e}),[]),i=yt((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,l,{sourceEvent:t});if(o){var i=t.touches[0],a={x:i.clientX,y:i.clientY};n.current(),d(o,a)}}}}}}),[e]),a=bt((function(){n.current=Rt(window,[i],{capture:!0,passive:!1})}),[i]),l=bt((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(oi),n.current(),a())}),[a,o]),s=bt((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),u=bt((function(){var e={capture:!0,passive:!1},t={cancel:s,completed:l,getPhase:r},o=Rt(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&Ht(!1);var o=e.touches[0];if(o&&o.force>=.15){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:ei,fn:t}]}(t),e),i=Rt(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:ei,fn:t}]}(t),e);n.current=function(){o(),i()}}),[s,r,l]),c=bt((function(){var e=r();"PENDING"!==e.type&&Ht(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),d=bt((function(e,t){"IDLE"!==r().type&&Ht(!1);var n=setTimeout(c,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,r,o,c]);Do((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(oi))}}),[r,a,o]),Do((function(){return Rt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function gi(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?vi:[],o||[]),l=(0,j.useState)((function(){return function(){var e=null;function t(){e||Ht(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Ht(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],s=bt((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);Do((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();s(e,t),e=t}))}),[l,n,s]),Do((function(){return l.tryAbandon}),[l.tryAbandon]);for(var u=bt((function(e){return hi({lockAPI:l,registry:r,store:n,draggableId:e})}),[l,r,n]),c=bt((function(e,o,i){return function(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent;if(!hi({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var s=o.draggable.getById(i),u=function(e,t){var n="["+Po.contextId+'="'+e+'"]',r=cn(dn(document.querySelectorAll(n)),(function(e){return e.getAttribute(Po.id)===t}));return r&&Bo(r)?r:null}(n,s.descriptor.id);if(!u)return null;if(l&&!s.options.canDragInteractiveElements&&li(u,l))return null;var c=t.claim(a||Dt),d="PRE_DRAG";function f(){return s.options.shouldRespectForcePress}function p(){return t.isActive(c)}var h=function(e,t){pi({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function v(e){function n(){t.release(),d="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=Rt(window,[{eventName:"click",fn:fi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(Lr({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&Ht(!1)),r.dispatch(br(e.liftActionArgs)),d="DRAGGING",ge({isActive:function(){return pi({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}return{isActive:function(){return pi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:function(e){var t=jt((function(e){h((function(){return Cr({client:e})}))}));return ge({},v({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return h(kr)},moveRight:function(){return h(Ar)},moveDown:function(){return h(Nr)},moveLeft:function(){return h(Sr)}};return v({liftActionArgs:{id:i,clientSelection:si(u),movementMode:"SNAP"},cleanup:Dt,actions:e})},abort:function(){pi({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&t.release()}}}({lockAPI:l,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,l,r,n]),d=bt((function(e){return function(e,t){var n=function(e,t){var n,r=t.target;if(!((n=r)instanceof Mo(n).Element))return null;var o=function(e){return"["+So.contextId+'="'+e+'"]'}(e),i=di(r,o);return i&&Bo(i)?i:null}(e,t);return n?n.getAttribute(So.draggableId):null}(t,e)}),[t]),f=bt((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),p=bt((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch(Pr()))}),[l,n]),h=bt(l.isClaimed,[l]),v=yt((function(){return{canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:h}}),[u,c,d,f,p,h]),g=0;g<a.length;g++)a[g](v)}var mi=function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function yi(e){return e.current||Ht(!1),e.current}function bi(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,a=(0,j.useRef)(null),l=$o(e),s=bt((function(){return mi(l.current)}),[l]),u=function(e){var t=yt((function(){return Go(e)}),[e]),n=(0,j.useRef)(null);return(0,j.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),ge(e.style,Uo),Fo().appendChild(e),function(){setTimeout((function(){var t=Fo();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),bt((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),c=function(e){var t=e.contextId,n=e.text,r=Zo("hidden-text",{separator:"-"}),o=yt((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e}),[r,t]);return(0,j.useEffect)((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",Fo().appendChild(e),function(){var t=Fo();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:i}),d=function(e,t){var n=yt((function(){return Io(e)}),[e]),r=(0,j.useRef)(null),o=(0,j.useRef)(null),i=bt(Lt((function(e){var t=o.current;t||Ht(!1),t.textContent=e})),[]),a=bt((function(e){var t=r.current;t||Ht(!1),t.textContent=e}),[]);Do((function(){(r.current||o.current)&&Ht(!1);var l=qo(t),s=qo(t);return r.current=l,o.current=s,l.setAttribute(Ao+"-always",e),s.setAttribute(Ao+"-dynamic",e),Ro().appendChild(l),Ro().appendChild(s),a(n.always),i(n.resting),function(){var e=function(e){var t=e.current;t||Ht(!1),Ro().removeChild(t),e.current=null};e(r),e(o)}}),[t,a,i,n.always,n.resting,e]);var l=bt((function(){return i(n.dragging)}),[i,n.dragging]),s=bt((function(e){i("DROP"!==e?n.userCancel:n.dropAnimating)}),[i,n.dropAnimating,n.userCancel]),u=bt((function(){o.current&&i(n.resting)}),[i,n.resting]);return yt((function(){return{dragging:l,dropping:s,resting:u}}),[l,s,u])}(t,o),f=bt((function(e){yi(a).dispatch(e)}),[]),p=yt((function(){return Ne({publishWhileDragging:_r,updateDroppableScroll:xr,updateDroppableIsEnabled:Er,updateDroppableIsCombineEnabled:Or,collectionStarting:wr},f)}),[f]),h=function(){var e=yt(Ho,[]);return(0,j.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),v=yt((function(){return lo(h,p)}),[h,p]),g=yt((function(){return No(ge({scrollWindow:uo,scrollDroppable:v.scrollDroppable},Ne({move:Cr},f)))}),[v.scrollDroppable,f]),m=function(e){var t=(0,j.useRef)({}),n=(0,j.useRef)(null),r=(0,j.useRef)(null),o=(0,j.useRef)(!1),i=bt((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=bt((function(t){var n=function(e,t){var n="["+So.contextId+'="'+e+'"]',r=dn(document.querySelectorAll(n));if(!r.length)return null;var o=cn(r,(function(e){return e.getAttribute(So.draggableId)===t}));return o&&Bo(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=bt((function(e,t){n.current===e&&(n.current=t)}),[]),s=bt((function(){r.current||o.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),u=bt((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(So.draggableId)===e&&(n.current=e)}),[]);return Do((function(){return o.current=!0,function(){o.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),yt((function(){return{register:i,tryRecordFocus:u,tryRestoreFocusRecorded:s,tryShiftRecord:l}}),[i,u,s,l])}(t),y=yt((function(){return eo({announce:u,autoScroller:g,dimensionMarshal:v,focusMarshal:m,getResponders:s,styleMarshal:d})}),[u,g,v,m,s,d]);a.current=y;var b=bt((function(){var e=yi(a);"IDLE"!==e.getState().phase&&e.dispatch(Pr())}),[]),_=bt((function(){var e=yi(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(yt((function(){return{isDragging:_,tryAbort:b}}),[_,b]));var w=bt((function(e){return so(yi(a).getState(),e)}),[]),x=bt((function(){return rr(yi(a).getState())}),[]),E=yt((function(){return{marshal:v,focus:m,contextId:t,canLift:w,isMovementAllowed:x,dragHandleUsageInstructionsId:c,registry:h}}),[t,v,c,m,w,x,h]);return gi({contextId:t,store:y,registry:h,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,j.useEffect)((function(){return b}),[b]),I().createElement(Ko.Provider,{value:E},I().createElement(De,{context:Vo,store:y},e.children))}var _i=0;function wi(e){var t=yt((function(){return""+_i++}),[]),n=e.dragHandleUsageInstructions||Wt.dragHandleUsageInstructions;return I().createElement(Vt,null,(function(r){return I().createElement(bi,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var xi=function(e){return function(t){return e===t}},Ei=xi("scroll"),Oi=xi("auto"),Ci=(xi("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),ki=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Ci(n,Ei)||Ci(n,Oi)}(t)?t:e(t.parentElement)},Ni=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Ai=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},Si={passive:!1},Pi={passive:!0},Ti=function(e){return e.shouldPublishImmediately?Si:Pi};function Li(e){var t=(0,j.useContext)(e);return t||Ht(!1),t}var ji=function(e){return e&&e.env.closestScrollable||null};function Ii(){}var Di={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Ri=I().memo((function(e){var t=(0,j.useRef)(null),n=bt((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,o=e.onTransitionEnd,i=e.onClose,a=e.contextId,l=(0,j.useState)("open"===e.animate),s=l[0],u=l[1];(0,j.useEffect)((function(){return s?"open"!==r?(n(),u(!1),Ii):t.current?Ii:(t.current=setTimeout((function(){t.current=null,u(!1)})),n):Ii}),[r,s,n]);var c=bt((function(e){"height"===e.propertyName&&(o(),"close"===r&&i())}),[r,i,o]),d=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=function(e){var t=e.placeholder;return e.isAnimatingOpenOnMount||"close"===e.animate?Di:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Mr.placeholder:null}}({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return I().createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})})),qi=I().createContext(null),Mi=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return ve(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(I().PureComponent),Bi=5e3,Hi=4500,Vi=function(e,t){return t?Mr.drop(t.duration):e?Mr.snap:Mr.fluid},Fi=function(e,t){return e?t?Ir:Dr:null};function Ui(e){e.preventDefault()}var Gi=function(e,t){return e===t},zi=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function Wi(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Zi={mapped:{type:"SECONDARY",offset:Zt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Wi(null)}},Ki=ht((function(){var e,t,n,r=(e=Lt((function(e,t){return{x:e,y:t}})),t=Lt((function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=Lt((function(e,n,r,o,i,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:l,snapshot:t(n,o,i,a,null)}}})),function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var i=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],l=tr(r.impact),s=(c=r.impact).at&&"COMBINE"===c.at.type?c.at.combine.draggableId:null,u=r.forceShouldAnimate;return n(e(i.x,i.y),r.movementMode,a,o.isClone,l,s,u)}var c;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==o.draggableId)return null;var f=o.isClone,p=r.dimensions.draggables[o.draggableId],h=d.result,v=h.mode,g=zi(h),m=function(e){return e.combine?e.combine.draggableId:null}(h),y={duration:r.dropDuration,curve:jr,moveTo:r.newHomeClientOffset,opacity:m?Ir:null,scale:m?Rr:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:p,dropping:y,draggingOver:g,combineWith:m,mode:v,forceShouldAnimate:null,snapshot:t(v,f,g,m,y)}}}return null}),o=function(){var e=Lt((function(e,t){return{x:e,y:t}})),t=Lt(Wi),n=Lt((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(Zt,e,!0):null},o=function(t,o,i,a){var l=i.displaced.visible[t],s=Boolean(a.inVirtualList&&a.effected[t]),u=yn(i),c=u&&u.draggableId===t?o:null;if(!l){if(!s)return r(c);if(i.displaced.invisible[t])return null;var d=Xt(a.displacedBy.point),f=e(d.x,d.y);return n(f,c,!0)}if(s)return r(c);var p=i.displacedBy.point,h=e(p.x,p.y);return n(h,c,l.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||o(e,t)||Zi}}),{dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:Vo,pure:!0,areStatePropsEqual:Gi})((function(e){var t=(0,j.useRef)(null),n=bt((function(e){t.current=e}),[]),r=bt((function(){return t.current}),[]),o=Li(Ko),i=o.contextId,a=o.dragHandleUsageInstructionsId,l=o.registry,s=Li(qi),u=s.type,c=s.droppableId,d=yt((function(){return{id:e.draggableId,index:e.index,type:u,droppableId:c}}),[e.draggableId,e.index,u,c]),f=e.children,p=e.draggableId,h=e.isEnabled,v=e.shouldRespectForcePress,g=e.canDragInteractiveElements,m=e.isClone,y=e.mapped,b=e.dropAnimationFinished;m||function(e){var t=Zo("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=yt((function(){return{canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:l}}),[i,l,a]),u=bt((function(e){var t=o();return t||Ht(!1),function(e,t,n){void 0===n&&(n=Zt);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=At(o,r),a=Nt(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,o]),c=yt((function(){return{uniqueId:t,descriptor:n,options:s,getDimension:u}}),[n,u,s,t]),d=(0,j.useRef)(c),f=(0,j.useRef)(!0);Do((function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}}),[r.draggable]),Do((function(){if(f.current)f.current=!1;else{var e=d.current;d.current=c,r.draggable.update(c,e)}}),[c,r.draggable])}(yt((function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:v,isEnabled:h}}),[d,l,r,g,v,h]));var _=yt((function(){return h?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":p,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:Ui}:null}),[i,a,p,h]),w=bt((function(e){"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&b()}),[b,y]),x=yt((function(){var e=function(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,o=e.dropping,i=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(o),s=l?Vr(n,i):Hr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Vi(a,o),transform:s,opacity:Fi(i,l),zIndex:l?Hi:Bi,pointerEvents:"none"}}(e):{transform:Hr((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}(y),t="DRAGGING"===y.type&&y.dropping?w:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":p,style:e,onTransitionEnd:t},dragHandleProps:_}}),[i,_,p,y,w,n]),E=yt((function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}}),[d.droppableId,d.id,d.index,d.type]);return f(x,y.snapshot,E)}));function $i(e){return Li(qi).isUsingCloneFor!==e.draggableId||e.isClone?I().createElement(Ki,e):null}function Yi(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return I().createElement($i,ge({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var Xi=function(e,t){return e===t.droppable.type},Qi=function(e,t){return t.draggables[e.draggable.id]},Ji={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Ht(!1),document.body}},ea=ht((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=ge({},e,{shouldAnimatePlaceholder:!1}),n=Lt((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=Lt((function(r,o,i,a,l,s){var u=l.descriptor.id;if(l.descriptor.droppableId===r){var c=s?{render:s,dragging:n(l.descriptor)}:null,d={isDraggingOver:i,draggingOverWith:i?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:c}}if(!o)return t;if(!a)return e;var f={isDraggingOver:i,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}}));return function(n,o){var i=o.droppableId,a=o.type,l=!o.isDropDisabled,s=o.renderClone;if(n.isDragging){var u=n.critical;if(!Xi(a,u))return t;var c=Qi(u,n.dimensions),d=tr(n.impact)===i;return r(i,l,d,d,c,s)}if("DROP_ANIMATING"===n.phase){var f=n.completed;if(!Xi(a,f.critical))return t;var p=Qi(f.critical,n.dimensions);return r(i,l,zi(f.result)===i,tr(f.impact)===i,p,s)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var h=n.completed;if(!Xi(a,h.critical))return t;var v=tr(h.impact)===i,g=Boolean(h.impact.at&&"COMBINE"===h.impact.at.type),m=h.critical.droppable.id===i;return v?g?e:t:m?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:Vo,pure:!0,areStatePropsEqual:Gi})((function(e){var t=(0,j.useContext)(Ko);t||Ht(!1);var n=t.contextId,r=t.isMovementAllowed,o=(0,j.useRef)(null),i=(0,j.useRef)(null),a=e.children,l=e.droppableId,s=e.type,u=e.mode,c=e.direction,d=e.ignoreContainerClipping,f=e.isDropDisabled,p=e.isCombineEnabled,h=e.snapshot,v=e.useClone,g=e.updateViewportMaxScroll,m=e.getContainerForClone,y=bt((function(){return o.current}),[]),b=bt((function(e){o.current=e}),[]),_=(bt((function(){return i.current}),[]),bt((function(e){i.current=e}),[])),w=bt((function(){r()&&g({maxScroll:ro()})}),[r,g]);!function(e){var t=(0,j.useRef)(null),n=Li(Ko),r=Zo("droppable"),o=n.registry,i=n.marshal,a=$o(e),l=yt((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),s=(0,j.useRef)(l),u=yt((function(){return Lt((function(e,n){t.current||Ht(!1);var r={x:e,y:n};i.updateDroppableScroll(l.id,r)}))}),[l.id,i]),c=bt((function(){var e=t.current;return e&&e.env.closestScrollable?Ni(e.env.closestScrollable):Zt}),[]),d=bt((function(){var e=c();u(e.x,e.y)}),[c,u]),f=yt((function(){return jt(d)}),[d]),p=bt((function(){var e=t.current,n=ji(e);e&&n||Ht(!1),e.scrollOptions.shouldPublishImmediately?d():f()}),[f,d]),h=bt((function(e,r){t.current&&Ht(!1);var o=a.current,i=o.getDroppableRef();i||Ht(!1);var s=function(e){return{closestScrollable:ki(e),isFixedOnPage:Ai(e)}}(i),u={ref:i,descriptor:l,env:s,scrollOptions:r};t.current=u;var c=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,u=r.closestScrollable,c=function(e,t){var n=St(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=wt({top:r,right:a,bottom:i,left:o},n.border);return Ot({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})}(t,u),d=Nt(c,o),f=function(){if(!u)return null;var e=St(u),t={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:e,page:Nt(e,o),scroll:Ni(u),scrollSize:t,shouldClipSubject:s}}(),p=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,l=e.page,s=e.closest,u=function(){if(!s)return null;var e=s.scrollSize,t=s.client,n=to({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:Zt,displacement:Zt}}}}(),c="vertical"===i?An:Sn;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:n,client:a,page:l,frame:u,subject:an({page:l,withPlaceholder:null,axis:c,frame:u})}}({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:i,client:c,page:d,closest:f});return p}({ref:i,descriptor:l,env:s,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),d=s.closestScrollable;return d&&(d.setAttribute(Lo.contextId,n.contextId),d.addEventListener("scroll",p,Ti(u.scrollOptions))),c}),[n.contextId,l,p,a]),v=bt((function(){var e=t.current,n=ji(e);return e&&n||Ht(!1),Ni(n)}),[]),g=bt((function(){var e=t.current;e||Ht(!1);var n=ji(e);t.current=null,n&&(f.cancel(),n.removeAttribute(Lo.contextId),n.removeEventListener("scroll",p,Ti(e.scrollOptions)))}),[p,f]),m=bt((function(e){var n=t.current;n||Ht(!1);var r=ji(n);r||Ht(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),y=yt((function(){return{getDimensionAndWatchScroll:h,getScrollWhileDragging:v,dragStopped:g,scroll:m}}),[g,h,v,m]),b=yt((function(){return{uniqueId:r,descriptor:l,callbacks:y}}),[y,l,r]);Do((function(){return s.current=b.descriptor,o.droppable.register(b),function(){t.current&&g(),o.droppable.unregister(b)}}),[y,l,g,b,i,o.droppable]),Do((function(){t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)}),[e.isDropDisabled,i]),Do((function(){t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,i])}({droppableId:l,type:s,mode:u,direction:c,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:y});var x=I().createElement(Mi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,o=e.animate;return I().createElement(Ri,{placeholder:r,onClose:t,innerRef:_,animate:o,contextId:n,onTransitionEnd:w})})),E=yt((function(){return{innerRef:b,placeholder:x,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}}),[n,l,x,b]),O=v?v.dragging.draggableId:null,C=yt((function(){return{droppableId:l,type:s,isUsingCloneFor:O}}),[l,O,s]);return I().createElement(qi.Provider,{value:C},a(E,h),function(){if(!v)return null;var e=v.dragging,t=v.render,n=I().createElement($i,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return gt().createPortal(n,m())}())}));function ta({currency:t,provided:n,option:o,showValues:a,multiple:l,defaultTooltip:s,handleUpdateOptionLabel:u,handleUpdateOptionValue:c,handleUpdateOptionChecked:d,handleRemoveOption:f}){return(0,e.createElement)("div",{className:"givewp-options-list--item",ref:n.innerRef,...n.draggableProps},(0,e.createElement)("span",{className:"givewp-options-list--item--draggable",...n.dragHandleProps},(0,e.createElement)(i.Icon,{icon:fe})),(0,e.createElement)(i.Tooltip,{text:s||(0,r.__)("Default","give"),position:"top",placement:"top",delay:500},(0,e.createElement)("div",null,(0,e.createElement)("input",{type:l?"checkbox":"radio",checked:o.checked,className:"givewp-options-list--item--checked",onClick:()=>d(!o.checked)}))),(0,e.createElement)("div",{className:S()("givewp-options-list--item--inputs",{"givewp-options-list--item--inputs--open":a})},t?(0,e.createElement)(le,{label:(0,r.__)("Donation amount level","give"),hideLabelFromVision:!0,value:o.value,onValueChange:e=>{u(e),c(e)}}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("input",{type:"text",value:o.label,placeholder:(0,r.__)("Label","give"),onChange:e=>u(e.target.value)}),a&&(0,e.createElement)("input",{type:"text",value:o.value,placeholder:(0,r.__)("Value","give"),onChange:e=>c(e.target.value)}))),(0,e.createElement)(i.Button,{icon:de,className:"givewp-options-list--item--button",onClick:()=>f()}))}function na({currency:t,options:n,showValues:r,multiple:o,setOptions:i,defaultControlsTooltip:a}){const l=e=>()=>{n[e].label="",n[e].value="",i(n.filter(((t,n)=>n!==e)))},s=e=>t=>{const r=[...n];r[e].label=t,i(r)},u=e=>t=>{const r=[...n];r[e].value=t,i(r)},c=(e,t)=>r=>{const o=[...n];t||o.forEach(((t,n)=>{n!==e&&(t.checked=!1)})),o[e].checked=r,i(o)};return(0,e.createElement)(wi,{onDragEnd:e=>{if(!e.destination)return;const t=[...n],[r]=t.splice(e.source.index,1);t.splice(e.destination.index,0,r),i(t)}},(0,e.createElement)(ea,{droppableId:"options"},(i=>(0,e.createElement)("div",{...i.droppableProps,ref:i.innerRef},n.map(((n,i)=>(0,e.createElement)(Yi,{key:i,draggableId:`option-${i}`,index:i},(d=>(0,e.createElement)(ta,{currency:t,provided:d,option:n,index:i,showValues:r,multiple:o,defaultTooltip:a,handleRemoveOption:l(i),handleUpdateOptionLabel:s(i),handleUpdateOptionValue:u(i),handleUpdateOptionChecked:c(i,o)}))))),i.placeholder))))}function ra({currency:t,multiple:n,options:o,setOptions:a,defaultControlsTooltip:l}){const[s,u]=(0,e.useState)(!1);return(0,e.createElement)(e.Fragment,null,!t&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Show values","give"),checked:s,onChange:()=>u(!s)})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.BaseControl,{id:"give"},(0,e.createElement)(pe,{handleAddOption:()=>{a([...o,{label:"",value:"",checked:!1}])}}),(0,e.createElement)(na,{currency:t,options:o,showValues:s,multiple:n,setOptions:a,defaultControlsTooltip:l}))))}ea.defaultProps=Ji;const oa=(e,t)=>Object.keys(se).indexOf(e)-Object.keys(se).indexOf(t),ia=[{label:(0,r.__)("Daily","give"),value:"day"},{label:(0,r.__)("Weekly","give"),value:"week"},{label:(0,r.__)("Monthly","give"),value:"month"},{label:(0,r.__)("Quarterly","give"),value:"quarter"},{label:(0,r.__)("Yearly","give"),value:"year"}],aa=[{label:(0,r.__)("Every","give"),value:"1"},{label:(0,r.__)("Every 2nd","give"),value:"2"},{label:(0,r.__)("Every 3rd","give"),value:"3"},{label:(0,r.__)("Every 4th","give"),value:"4"},{label:(0,r.__)("Every 5th","give"),value:"5"},{label:(0,r.__)("Every 6th","give"),value:"6"}],la=[{label:(0,r.__)("Ongoing","give"),value:"0"}].concat([...Array(25).keys()].slice(2).map((e=>({label:(0,r.sprintf)((0,r.__)("%d donations","give"),e),value:e.toString()}))));var sa=({attributes:t,setAttributes:n})=>{const{label:a=(0,r.__)("Donation Amount","give"),levels:s,defaultLevel:u,priceOption:c,setPrice:d,customAmount:f,customAmountMin:p,customAmountMax:h,recurringEnabled:v,recurringBillingInterval:g,recurringBillingPeriodOptions:m,recurringLengthOfTime:y,recurringOptInDefaultBillingPeriod:b,recurringEnableOneTimeDonations:_=!0}=t,w=m.length>1||_;(0,j.useEffect)((()=>{("one-time"!==b||_)&&["one-time"].concat(m).includes(b)||n({recurringOptInDefaultBillingPeriod:m[0]})}),[m,_]);const x=(0,e.useCallback)((e=>{const t=Array.from(new Set(m.concat([e])));t.sort(oa),n({recurringBillingPeriodOptions:t})}),[m]),E=(0,e.useCallback)((e=>{const t=m.filter((t=>t!==e));m.length>1&&(t.sort(oa),n({recurringBillingPeriodOptions:t}))}),[m]),{gateways:O,recurringAddonData:C,gatewaySettingsUrl:k}=l(),N=O.filter((e=>e.enabled)),A=O.filter((e=>e.supportsSubscriptions)),S=N.some((e=>e.supportsSubscriptions)),P=S&&v,[T,L]=(0,e.useState)(s.map((e=>({label:ae(e.toString()),value:e.toString(),checked:u===e})))),I=(0,e.useCallback)((e=>(_&&(e=["one-time"].concat(e)),e.map((e=>({label:se[e].singular.toLowerCase().replace(/\w/,(e=>e.toUpperCase())),value:e}))))),[m,_]);return(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Field Settings","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label","give"),value:a,onChange:e=>n({label:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Donation Options","give"),initialOpen:!0},(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Donation Option","give"),onChange:e=>n({priceOption:e}),value:c,options:[{label:(0,r.__)("Multi-level Donation","give"),value:"multi"},{label:(0,r.__)("Fixed Donation","give"),value:"set"}],help:"multi"===c?(0,r.__)("Set multiple price donations for this form.","give"):(0,r.__)("The donation amount is fixed to the following amount:","give")}),"set"===c&&(0,e.createElement)(le,{label:(0,r.__)("Set Donation","give"),value:d,onBlur:()=>!d&&n({setPrice:25}),onValueChange:e=>n({setPrice:e?parseInt(e):0})})),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Custom Amount","give"),initialOpen:!1},(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Custom Amount","give"),checked:f,onChange:()=>n({customAmount:!f})}),!!f&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(le,{label:(0,r.__)("Minimum","give"),value:p,onValueChange:e=>n({customAmountMin:e}),help:(0,r.__)("Sets the minimum donation amount for all gateways.","give")}),(0,e.createElement)(le,{label:(0,r.__)("Maximum","give"),value:h,onValueChange:e=>n({customAmountMax:e}),help:(0,r.__)("Sets the maximum donation amount for all gateways. Leave empty for no maximum amount.","give")}))),"multi"===c&&(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Donation Levels","give"),initialOpen:!1},(0,e.createElement)(ra,{currency:!0,multiple:!1,options:T,setOptions:e=>{if(e.length>1&&""===e[e.length-1].value){const t=e.filter((e=>Number(e.value)>0)).map((e=>Number(e.value)));e[e.length-1].value=String(2*Math.max(...t))}else 1===e.length&&""===e[0].value&&(e[0].value="10");const t=e.filter((e=>e.checked));t&&1===t.length?n({defaultLevel:Number(t[0].value)}):e.length>0&&(e[0].checked=!0),L(e);const r=e.filter((e=>e.value)).map((e=>Number(e.value)));n({levels:r})},defaultControlsTooltip:(0,r.__)("Default Level","give")})),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Recurring Donations","give"),initialOpen:!1},!S&&(C.isInstalled?(0,e.createElement)("div",{style:{fontSize:"13px",lineHeight:"1.3em",display:"flex",flexDirection:"column",gap:"12px",padding:"6px 12px 12px 0"}},(0,e.createElement)("div",null,(0,r.__)("None of the payment gateways currently enabled support Recurring Donations. To collect recurring donations, enable one of the following payment gateways:","give")),(0,e.createElement)("ul",{style:{listStyleType:"inherit",marginLeft:"12px"}},A.map((t=>(0,e.createElement)("li",{key:t.id},t.label)))),(0,e.createElement)("a",{href:k,target:"_blank",rel:"noreferrer noopener"},"Go to Payment Gateway Settings")):(0,e.createElement)(ue,null)),S&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Enable recurring donation","give"),checked:v,onChange:()=>n({recurringEnabled:!v})}))),!!P&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Enable one-time donation","give"),checked:_,onChange:()=>{n({recurringEnableOneTimeDonations:!_})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.BaseControl,{id:"recurringBillingPeriodOptions",label:(0,r.__)("Frequency","give")},(0,e.createElement)("div",{style:{width:"100%",display:"grid",gridTemplateColumns:"1fr 1fr"}},ia.map((t=>(0,e.createElement)(i.CheckboxControl,{key:t.value,label:t.label,checked:m.includes(t.value),onChange:e=>e?x(t.value):E(t.value),disabled:1===m.length&&m.includes(t.value),__nextHasNoMarginBottom:!0})))))),w&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Default Frequency","give"),value:null!=b?b:_?"one-time":m[0],options:I(m),onChange:e=>n({recurringOptInDefaultBillingPeriod:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Interval","give"),options:aa,value:g,onChange:e=>n({recurringBillingInterval:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Number of Donations","give"),options:la,value:y,onChange:e=>n({recurringLengthOfTime:e})})))))};const ua={day:{singular:(0,r.__)("day","give"),plural:(0,r.__)("days","give"),adjective:(0,r.__)("daily","give")},week:{singular:(0,r.__)("week","give"),plural:(0,r.__)("weeks","give"),adjective:(0,r.__)("weekly","give")},month:{singular:(0,r.__)("month","give"),plural:(0,r.__)("months","give"),adjective:(0,r.__)("monthly","give")},quarter:{singular:(0,r.__)("quarter","give"),plural:(0,r.__)("quarters","give"),adjective:(0,r.__)("quarterly","give")},year:{singular:(0,r.__)("year","give"),plural:(0,r.__)("years","give"),adjective:(0,r.__)("yearly","give")}};class ca{constructor(e){if(!fa(e))throw new Error(`Invalid subscription period: ${e}`);this.period=e}label(){const e=ua[this.period];return new da(e)}}class da{shouldCapitalize=!1;constructor(e){this.periodLabel=e}capitalize(){return this.shouldCapitalize=!0,this}singular(){return this.format(this.periodLabel.singular)}plural(){return this.format(this.periodLabel.plural)}adjective(){return this.format(this.periodLabel.adjective)}get(e){return e>1?`${e} ${this.format(this.periodLabel.plural)}`:this.format(this.periodLabel.singular)}format(e){return this.shouldCapitalize?e.toLowerCase().replace(/\w/,(e=>e.toUpperCase())):e}}const fa=e=>e in ua;function pa({amount:t}){return(0,e.createInterpolateElement)((0,r.__)("This donation is <amount/>","give"),{amount:(0,e.createElement)("strong",null,t)})}function ha({isFixedAmount:t,fixedAmount:n,period:o,frequency:i,installments:a}){const l=new ca(o),s=a?(0,r.__)("This donation <amount /> every <period /> for <count /> <donations />.","give"):(0,r.__)("This donation <amount /> every <period />.","give");return(0,e.createInterpolateElement)(s,{amount:t?(0,e.createElement)("span",null,(0,r.__)("is","give")," ",(0,e.createElement)("strong",null,n)):(0,e.createElement)("span",null,(0,r.__)("repeats","give")),period:(0,e.createElement)("strong",null,l.label().get(i)),count:(0,e.createElement)("strong",null,a),donations:(0,e.createElement)("strong",null,(0,r.__)("donations","give"))})}var va=({children:t})=>(0,e.createElement)("div",{style:{backgroundColor:"var(--givewp-gray-20)",padding:"12px 16px",borderRadius:"5px"}},t);const ga=({levels:t,defaultLevel:n})=>(0,e.createElement)(G,null,t.map(((t,r)=>{const o=ae(t.toString());return(0,e.createElement)(z,{selected:t===n,key:r},o)}))),ma=({amount:t})=>(0,e.createElement)(le,{value:t,label:(0,r.__)("Custom amount","give"),hideLabelFromVision:!0}),ya=({amount:t})=>(0,e.createElement)(va,null,(0,e.createElement)(pa,{amount:t})),ba=({options:t,defaultSelected:n})=>(0,e.createElement)(i.RadioControl,{className:"give-billing-period-control",label:(0,r.__)("Billing Period","give"),hideLabelFromVision:!0,selected:null!=n?n:t[0],options:t.map((e=>({label:"one-time"===e?(0,r.__)("One Time","give"):se[e].adjective,value:e}))),onChange:e=>null});var _a=JSON.parse('[{"clientId":"8371d4c7-0e8d-4aff-a1a1-b4520f008132","name":"givewp/section","isValid":true,"attributes":{"title":"How much would you like to donate today?","description":"All donations directly impact our organization and help us further our mission."},"innerBlocks":[{"clientId":"bddaa0ea-29bf-4143-b62d-aae3396e9b0f","name":"givewp/donation-amount","isValid":true,"attributes":{"label":"Donation Amount","levels":[10,25,50,100,250,500],"defaultLevel":10,"priceOption":"multi","setPrice":25,"customAmount":true,"customAmountMin":1,"recurringBillingPeriodOptions":["month"],"recurringBillingInterval":1,"recurringEnabled":false,"recurringLengthOfTime":"0","recurringOptInDefaultBillingPeriod":"month","recurringEnableOneTimeDonations":true},"innerBlocks":[]}]},{"clientId":"2d74bf4b-4b82-4bea-aed7-431801709351","name":"givewp/section","isValid":true,"attributes":{"title":"Who\'s Giving Today?","description":"We\'ll never share this information with anyone."},"innerBlocks":[{"clientId":"1dc9cc78-698b-443a-8679-572d0667b7d8","name":"givewp/donor-name","isValid":true,"attributes":{"showHonorific":false,"honorifics":["Mr","Ms","Mrs"],"firstNameLabel":"First name","firstNamePlaceholder":"First name","lastNameLabel":"Last name","lastNamePlaceholder":"Last name","requireLastName":false},"innerBlocks":[]},{"clientId":"6f0af86f-703d-400d-9cf9-322d5691307b","name":"givewp/email","isValid":true,"attributes":{"label":"Email Address","isRequired":true},"innerBlocks":[]}]},{"clientId":"52596cc5-ab49-433e-b8e9-23fb4871fb5c","name":"givewp/section","isValid":true,"attributes":{"title":"Payment Details","description":"How would you like to pay for your donation?"},"innerBlocks":[{"name":"givewp/donation-summary","clientId":"b7114360-8542-4043-8296-26d2ae995d24","isValid":true,"attributes":[],"innerBlocks":[]},{"clientId":"145d8b8a-1870-4516-b0d5-fa7848578819","name":"givewp/payment-gateways","isValid":true,"attributes":{},"innerBlocks":[]}]}]');const{recurringBillingInterval:wa,recurringBillingPeriodOptions:xa,recurringLengthOfTime:Ea,recurringEnabled:Oa,recurringEnableOneTimeDonations:Ca,customAmountMin:ka,customAmount:Na,setPrice:Aa,priceOption:Sa,levels:Pa,defaultLevel:Ta}=(La="givewp/donation-amount",_a.flatMap((({innerBlocks:e})=>e)).find((({name:e})=>e===La))?.attributes);var La,ja={name:"givewp/donation-amount",settings:{...x,title:(0,r.__)("Donation Amount and Levels","give"),description:(0,r.__)("The interface for donors to specify the amount they want to donate.","give"),supports:{multiple:!1,html:!1},attributes:{label:{type:"string",source:"attribute",default:(0,r.__)("Donation Amount","give")},levels:{type:"array",default:Pa},defaultLevel:{type:"number",default:Ta},priceOption:{type:"string",default:Sa},setPrice:{type:"number",default:Aa},customAmount:{type:"boolean",default:Na},customAmountMin:{type:"number",default:ka},customAmountMax:{type:"number"},recurringEnabled:{type:"boolean",default:Oa},recurringBillingInterval:{type:"number",default:wa},recurringBillingPeriodOptions:{type:"array",default:xa},recurringLengthOfTime:{type:"string",default:Ea},recurringEnableOneTimeDonations:{type:"boolean",default:Ca}},edit:({attributes:t,setAttributes:n})=>{const{label:o=(0,r.__)("Donation Amount","give"),levels:a,defaultLevel:s,priceOption:u,setPrice:c,customAmount:d,recurringEnabled:f,recurringBillingInterval:p,recurringBillingPeriodOptions:h,recurringLengthOfTime:v,recurringOptInDefaultBillingPeriod:g,recurringEnableOneTimeDonations:m}=t,{gateways:y}=l(),b=y.some((e=>e.enabled&&e.supportsSubscriptions))&&f,_="multi"===u,w="set"===u,x=b&&(h.length>1||m),E=w&&!d,O=b&&(E||b&&!x||Number(v)>0||Number(p)>1),C=E&&!O,k=ae(c.toString());return(0,e.createElement)(i.BaseControl,{id:"amount-field",label:o},(0,e.createElement)("div",{className:"give-donation-block"},x&&(0,e.createElement)(ba,{options:m?["one-time"].concat(h):h,defaultSelected:g}),_&&(0,e.createElement)(ga,{levels:a,defaultLevel:s}),d&&(0,e.createElement)(ma,{amount:c}),O&&(0,e.createElement)(va,null,(0,e.createElement)(ha,{isFixedAmount:w,fixedAmount:k,period:h[0],frequency:parseInt(p),installments:parseInt(v)})),C&&(0,e.createElement)(ya,{amount:k}),(0,e.createElement)(sa,{attributes:t,setAttributes:n})))},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M11.5789 4.44118H20M4 7.52941L7.36842 4M7.36842 4V19M11.5789 8.85294H18.3158M11.5789 13.2647H16.6316M11.5789 17.6765H14.9474",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))})}},Ia=window.wp.primitives,Da=(0,e.createElement)(Ia.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Ia.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),Ra={name:"givewp/login",settings:{...x,icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M7.86239 -7.48537e-05L14.2413 -2.60971e-05C15.0462 -3.88525e-05 15.7106 -4.93415e-05 16.2518 0.044168C16.8139 0.0900932 17.3306 0.188658 17.8159 0.435948C18.5686 0.819441 19.1805 1.43136 19.564 2.18401C19.8113 2.66935 19.9099 3.18605 19.9558 3.74815C20 4.28934 20 4.95369 20 5.75865V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.8159C19.1805 18.5686 18.5686 19.1805 17.8159 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20L7.8624 20C7.06701 20.0005 6.47635 20.0008 5.9647 19.8637C4.58433 19.4938 3.50614 18.4156 3.13627 17.0353C2.99917 16.5236 2.99949 15.9329 2.99993 15.1376L2.99997 15C2.99997 14.4477 3.44769 14 3.99997 14C4.55226 14 4.99997 14.4477 4.99997 15C4.99997 15.9943 5.00856 16.2953 5.06812 16.5176C5.25306 17.2078 5.79215 17.7469 6.48234 17.9318C6.70461 17.9914 7.00562 18 7.99997 18H14.2C15.0566 18 15.6388 17.9992 16.0889 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5902 17.5902 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.0889C17.9992 15.6388 18 15.0566 18 14.2V5.79997C18 4.94339 17.9992 4.3611 17.9624 3.91101C17.9266 3.4726 17.8617 3.24839 17.782 3.09199C17.5902 2.71567 17.2843 2.40971 16.908 2.21796C16.7516 2.13827 16.5274 2.07335 16.0889 2.03753C15.6388 2.00075 15.0566 1.99997 14.2 1.99997H7.99997C7.00562 1.99997 6.70461 2.00856 6.48234 2.06812C5.79215 2.25306 5.25306 2.79215 5.06812 3.48234C5.00856 3.70461 4.99997 4.00562 4.99997 4.99997C4.99997 5.55226 4.55226 5.99997 3.99997 5.99997C3.44769 5.99997 2.99997 5.55226 2.99997 4.99997L2.99993 4.86239C2.99949 4.06701 2.99917 3.47635 3.13627 2.9647C3.50614 1.58433 4.58433 0.50614 5.9647 0.136271C6.47635 -0.00082539 7.06701 -0.000505557 7.86239 -7.48537e-05Z",fill:"currentColor"}),(0,e.createElement)(i.Path,{d:"M9.29289 5.29289C9.68342 4.90237 10.3166 4.90237 10.7071 5.29289L14.7071 9.29289C15.0976 9.68342 15.0976 10.3166 14.7071 10.7071L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L11.5858 11H1C0.447715 11 0 10.5523 0 10C0 9.44771 0.447715 9 1 9H11.5858L9.29289 6.70711C8.90237 6.31658 8.90237 5.68342 9.29289 5.29289Z",fill:"currentColor"}))}),title:(0,r.__)("User Login","give"),description:(0,r.__)("...","give"),supports:{multiple:!1},attributes:{required:{type:"boolean",default:!1},loginRedirect:{type:"boolean",default:!1},loginNotice:{type:"string",default:(0,r.__)("Already have an account? Log in.","givewp")},loginConfirmation:{type:"string",default:(0,r.__)("Thank you for your continued support.","give")}},edit:({attributes:n,setAttributes:a})=>{const{required:l,loginRedirect:s,loginNotice:u,loginConfirmation:c}=n;return(0,e.createElement)(e.Fragment,null,!!l&&(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"}},(0,e.createElement)("div",{style:{display:"flex",flexDirection:"row",gap:"15px"}},(0,e.createElement)(i.TextControl,{label:(0,r.__)("Login","givewp"),onChange:()=>null,value:"",placeholder:(0,r.__)("Username or Email Address","givewp")}),(0,e.createElement)(i.TextControl,{type:"password",label:(0,r.__)("Password","givewp"),onChange:()=>null,value:"password123"})),(0,e.createElement)("div",{style:{display:"flex",flexDirection:"row-reverse",gap:"15px",justifyContent:"space-between"}},(0,e.createElement)(i.Button,{variant:"primary"},(0,r.__)("Log In","givewp")),(0,e.createElement)(i.Button,{variant:"link"},(0,r.__)("Reset Password","givewp")))),!l&&(0,e.createElement)("div",{style:{display:"flex",flexDirection:"row-reverse"}},(0,e.createElement)(i.Button,{variant:"link",icon:s?(0,e.createElement)(t,{icon:Da}):void 0,style:{flexDirection:"row-reverse"}},u)),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Settings","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Require donor login","give"),checked:l,onChange:()=>a({required:!l})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Redirect to login page","give"),checked:s,onChange:e=>a({loginRedirect:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Login Notice","give"),value:u,onChange:e=>a({loginNotice:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Login Confirmation","give"),value:c,onChange:e=>a({loginConfirmation:e})})))))}}};const qa=({countryList:t,countryLabel:n})=>{var r;const[o,a]=(0,j.useState)(null!==(r=t[0])&&void 0!==r?r:""),l=t.map((e=>({label:e.label,value:e.value,disabled:"none"===e.label||""===e.label})));return(0,e.createElement)(i.SelectControl,{label:n,required:!0,className:"give-is-required",options:l,value:o,onChange:a})};var Ma={name:"givewp/billing-address",settings:{...x,title:(0,r.__)("Billing Address","give"),description:(0,r.__)("Collects the donor billing address with display options.","give"),supports:{multiple:!1},attributes:{groupLabel:{type:"string",source:"attribute",selector:"p",default:"Billing Address"},country:{type:"array",source:"attribute",default:[{value:"sample",label:(0,r.__)("A full country list will be displayed here...","give")}]},countryLabel:{type:"string",source:"attribute",default:(0,r.__)("Country","give")},address1Label:{type:"string",source:"attribute",default:(0,r.__)("Address Line 1","give")},address1Placeholder:{type:"string",source:"attribute",default:(0,r.__)("Address Line 1","give")},address2Label:{type:"string",source:"attribute",default:(0,r.__)("Address Line 2","give")},address2Placeholder:{type:"string",source:"attribute",default:(0,r.__)("Address Line 2","give")},requireAddress2:{type:"boolean",default:!1},cityLabel:{type:"string",source:"attribute",default:(0,r.__)("City","give")},cityPlaceholder:{type:"string",source:"attribute",default:(0,r.__)("City","give")},stateLabel:{type:"string",source:"attribute",default:(0,r.__)("State/Province/Country","give")},statePlaceholder:{type:"string",source:"attribute",default:(0,r.__)("This changes by country selection...","give")},zipLabel:{type:"string",source:"attribute",default:(0,r.__)("Zip/Postal Code","give")},zipPlaceholder:{type:"string",source:"attribute",default:(0,r.__)("Zip/Postal Code","give")}},edit:function({attributes:{groupLabel:t,country:n,countryLabel:a,address1Label:l,address1Placeholder:s,address2Label:u,address2Placeholder:c,requireAddress2:d,cityLabel:f,cityPlaceholder:p,stateLabel:h,statePlaceholder:v,zipLabel:g,zipPlaceholder:m},setAttributes:y}){return(0,e.createElement)(e.Fragment,null,t.length>0&&(0,e.createElement)("div",{style:{gridArea:"groupLabel",marginTop:"-1.5rem"}},(0,e.createElement)(o.RichText,{tagName:"p",value:t,onChange:e=>y({groupLabel:e}),style:{width:"100%",fontSize:"1.1rem",fontWeight:500},allowedFormats:[],className:"give-billing-address-block__group-label"})),(0,e.createElement)("div",{style:{display:"grid",gridTemplateAreas:'\n                    "country country"\n                    "address1 address1"\n                    "address2 address2"\n                    "city state"\n                    "zip zip"\n                    ',gridAutoColumns:"1fr",gap:"1rem"}},(0,e.createElement)("div",{style:{gridArea:"country"}},(0,e.createElement)(qa,{countryList:n,countryLabel:a})),(0,e.createElement)("div",{style:{gridArea:"address1"}},(0,e.createElement)(i.TextControl,{label:l,placeholder:s,required:!0,className:"give-is-required",readOnly:!0,value:s,onChange:null})),(0,e.createElement)("div",{style:{gridArea:"address2"}},(0,e.createElement)(i.TextControl,{label:u,placeholder:c,required:d,className:d?"give-is-required":"",value:c,onChange:null,readOnly:!0})),(0,e.createElement)("div",{style:{gridArea:"city"}},(0,e.createElement)(i.TextControl,{label:f,placeholder:p,required:!0,className:"give-is-required",readOnly:!0,value:p,onChange:null})),(0,e.createElement)("div",{style:{gridArea:"state"}},(0,e.createElement)(i.TextControl,{label:h,placeholder:v,required:!0,className:"give-is-required",value:v,onChange:null,readOnly:!0})),(0,e.createElement)("div",{style:{gridArea:"zip"}},(0,e.createElement)(i.TextControl,{label:g,placeholder:m,required:!0,className:"give-is-required",value:m,onChange:null,readOnly:!0}))),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Group","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:"Label",value:t,onChange:e=>y({groupLabel:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Country","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:a,onChange:e=>y({countryLabel:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Address 1","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:l,onChange:e=>y({address1Label:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:s,onChange:e=>y({address1Placeholder:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Address 2","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:u,onChange:e=>y({address2Label:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:c,onChange:e=>y({address2Placeholder:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.ToggleControl,{label:(0,r.__)("Required","give"),checked:d,onChange:()=>y({requireAddress2:!d}),help:(0,r.__)("Do you want to force the Address Line 2 field to be required?","give")}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("City","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:f,onChange:e=>y({cityLabel:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:p,onChange:e=>y({cityPlaceholder:e})}))),(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Zip","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Label"),value:g,onChange:e=>y({zipLabel:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Placeholder"),value:m,onChange:e=>y({zipPlaceholder:e})})))))},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M12.9166 11.3247C13.5076 10.8719 13.942 10.2452 14.1585 9.5328C14.3751 8.82039 14.3629 8.05804 14.1239 7.35287C13.8848 6.6477 13.4308 6.03517 12.8256 5.60135C12.2205 5.16752 11.4946 4.93422 10.75 4.93422C10.0054 4.93422 9.27953 5.16752 8.67437 5.60135C8.06922 6.03517 7.6152 6.6477 7.37613 7.35287C7.13705 8.05804 7.12494 8.82039 7.34149 9.5328C7.55804 10.2452 7.99237 10.8719 8.58344 11.3247C7.47438 11.7389 6.50807 12.4637 5.8 13.4125C5.71049 13.5318 5.67206 13.6819 5.69315 13.8295C5.71425 13.9772 5.79315 14.1105 5.9125 14.2C6.03185 14.2895 6.18186 14.3279 6.32955 14.3068C6.47723 14.2857 6.61049 14.2068 6.7 14.0875C7.17156 13.4588 7.78303 12.9484 8.48598 12.597C9.18894 12.2455 9.96407 12.0625 10.75 12.0625C11.5359 12.0625 12.3111 12.2455 13.014 12.597C13.717 12.9484 14.3284 13.4588 14.8 14.0875C14.8895 14.2068 15.0228 14.2857 15.1705 14.3068C15.3181 14.3279 15.4682 14.2895 15.5875 14.2C15.7068 14.1105 15.7857 13.9772 15.8068 13.8295C15.8279 13.6819 15.7895 13.5318 15.7 13.4125C14.9919 12.4637 14.0256 11.7389 12.9166 11.3247ZM8.3125 8.5C8.3125 8.01791 8.45546 7.54664 8.72329 7.1458C8.99113 6.74495 9.37181 6.43253 9.81721 6.24804C10.2626 6.06356 10.7527 6.01528 11.2255 6.10934C11.6984 6.20339 12.1327 6.43554 12.4736 6.77643C12.8145 7.11732 13.0466 7.55164 13.1407 8.02447C13.2347 8.4973 13.1864 8.9874 13.002 9.43279C12.8175 9.87819 12.505 10.2589 12.1042 10.5267C11.7034 10.7945 11.2321 10.9375 10.75 10.9375C10.1035 10.9375 9.48355 10.6807 9.02643 10.2236C8.56931 9.76645 8.3125 9.14647 8.3125 8.5ZM17.5 0.4375H4C3.6519 0.4375 3.31806 0.575781 3.07192 0.821922C2.82578 1.06806 2.6875 1.4019 2.6875 1.75V4.1875H1C0.850816 4.1875 0.707742 4.24676 0.602252 4.35225C0.496763 4.45774 0.4375 4.60082 0.4375 4.75C0.4375 4.89918 0.496763 5.04226 0.602252 5.14775C0.707742 5.25324 0.850816 5.3125 1 5.3125H2.6875V9.4375H1C0.850816 9.4375 0.707742 9.49676 0.602252 9.60225C0.496763 9.70774 0.4375 9.85082 0.4375 10C0.4375 10.1492 0.496763 10.2923 0.602252 10.3977C0.707742 10.5032 0.850816 10.5625 1 10.5625H2.6875V14.6875H1C0.850816 14.6875 0.707742 14.7468 0.602252 14.8523C0.496763 14.9577 0.4375 15.1008 0.4375 15.25C0.4375 15.3992 0.496763 15.5423 0.602252 15.6477C0.707742 15.7532 0.850816 15.8125 1 15.8125H2.6875V18.25C2.6875 18.5981 2.82578 18.9319 3.07192 19.1781C3.31806 19.4242 3.6519 19.5625 4 19.5625H17.5C17.8481 19.5625 18.1819 19.4242 18.4281 19.1781C18.6742 18.9319 18.8125 18.5981 18.8125 18.25V1.75C18.8125 1.4019 18.6742 1.06806 18.4281 0.821922C18.1819 0.575781 17.8481 0.4375 17.5 0.4375ZM17.6875 18.25C17.6875 18.2997 17.6677 18.3474 17.6326 18.3826C17.5974 18.4177 17.5497 18.4375 17.5 18.4375H4C3.95027 18.4375 3.90258 18.4177 3.86742 18.3826C3.83225 18.3474 3.8125 18.2997 3.8125 18.25V1.75C3.8125 1.70027 3.83225 1.65258 3.86742 1.61742C3.90258 1.58225 3.95027 1.5625 4 1.5625H17.5C17.5497 1.5625 17.5974 1.58225 17.6326 1.61742C17.6677 1.65258 17.6875 1.70027 17.6875 1.75V18.25Z",fill:"currentColor"}))})}};const Ba={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function Ha(e){return t=>{Ba[t]={...e,...Ba[t]}}}["address","main","div","figure","p","pre"].forEach(Ha({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Ha({content:8,type:73})),["p","pre"].forEach(Ha({content:8,type:65})),["s","small","span","del","ins"].forEach(Ha({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(Ha({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(Ha({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(Ha({type:89}));const Va=Object.freeze(Ba),Fa=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ua=Object.keys(Va).filter((e=>"canvas"!==e&&"iframe"!==e)),Ga=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),za=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Wa(){return Wa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wa.apply(this,arguments)}function Za({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){const i=o;return r?I().createElement(i,Wa({className:t},e)):I().createElement(i,Wa({className:t},e),n)}class Ka{attribute(e,t){return t}node(e,t){return t}}var $a=n(5573),Ya=n.n($a);function Xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qa=/(url|image|image-set)\(/i;class Ja extends Ka{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(Qa)&&delete t[e]})),t}}const el=/^<(!doctype|(html|head|body)(\s|>))/i,tl=/^(aria-|data-|\w+:)/iu,nl=/{{{(\w+)\/?}}}/;function rl(){if("undefined"!=typeof window&&"undefined"!=typeof document)return document.implementation.createHTMLDocument("Interweave")}class ol{constructor(e,t={},n=[],r=[]){var o;Xa(this,"allowed",void 0),Xa(this,"banned",void 0),Xa(this,"blocked",void 0),Xa(this,"container",void 0),Xa(this,"content",[]),Xa(this,"props",void 0),Xa(this,"matchers",void 0),Xa(this,"filters",void 0),Xa(this,"keyIndex",void 0),this.props=t,this.matchers=n,this.filters=[...r,new Ja],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:Ua),this.banned=new Set(Fa),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t),t)}applyNodeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t),t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,a=null;return this.matchers.forEach((e=>{const l=e.asTag().toLowerCase(),s=this.getTagConfig(l);if(r[e.inverseName]||!this.isTagAllowed(l))return;if(!this.canRenderChild(t,s))return;let u="";for(;o&&(a=e.match(o));){const{index:t,length:l,match:s,valid:c,void:d,...f}=a,p=e.propName+String(i);t>0&&(u+=o.slice(0,t)),c?(u+=d?`{{{${p}/}}}`:`{{{${p}}}}${s}{{{/${p}}}}`,this.keyIndex+=1,i+=1,n[p]={children:s,matcher:e,props:{...r,...f,key:this.keyIndex}}):u+=s,e.greedy?(o=u+o.slice(t+l),u=""):o=o.slice(t+(l||s.length))}e.greedy||(o=u+o)})),0===i?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName)&&!e.void&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&Boolean(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const r=(void 0!==n.g&&n.g.INTERWEAVE_SSR_POLYFILL||rl)();if(!r)return;const o=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",i="body"===o||"fragment"===o?r.body:r.createElement(o);return e.match(el)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Ya()(e):e)),i}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes?([...e.attributes].forEach((o=>{const{name:i,value:a}=o,l=i.toLowerCase(),s=Ga[l]||Ga[i];if(!this.isSafe(e))return;if(!l.match(tl)&&(!t&&(!s||2===s)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u="style"===l?this.extractStyleAttribute(e):a;4===s?u=!0:3===s?u=Number.parseFloat(String(u)):5!==s&&(u=String(u)),n[za[l]||l]=this.applyAttributeFilters(l,u),r+=1})),0===r?null:n):null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach((n=>{const r=e.style[n];"string"!=typeof r&&"number"!=typeof r||(t[n.replace(/-([a-z])/g,((e,t)=>String(t).toUpperCase()))]=r)})),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Va[e]?{...t,...Va[e],tagName:e}:t}isSafe(e){if("undefined"!=typeof HTMLAnchorElement&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:a}=this.props;let l=[],s="";return[...e.childNodes].forEach((e=>{if(1===e.nodeType){const c=e.nodeName.toLowerCase(),d=this.getTagConfig(c);s&&(l.push(s),s="");const f=this.applyNodeFilters(c,e);if(!f)return;let p;if(i&&(!a||this.isTagAllowed(c))){this.keyIndex+=1;const e=this.keyIndex;p=this.parseNode(f,d);const t=i(f,p,d);if(null===t)return;if(void 0!==t)return void l.push(I().cloneElement(t,{key:e}));this.keyIndex=e-1}if(this.banned.has(c))return;if(n||r&&"br"!==c||!this.isTagAllowed(c)||!o&&!this.canRenderChild(t,d))l=[...l,...this.parseNode(f,d.tagName?d:t)];else{var u;this.keyIndex+=1;const e=this.extractAttributes(f),t={tagName:c};e&&(t.attributes=e),d.void&&(t.selfClose=d.void),l.push(I().createElement(Za,{...t,key:this.keyIndex},null!==(u=p)&&void 0!==u?u:this.parseNode(f,d)))}}else if(3===e.nodeType){const o=n&&!r?e.textContent:this.applyMatchers(e.textContent||"",t);Array.isArray(o)?l=[...l,...o]:s+=o}})),s&&l.push(s),l}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(nl);){const[e,i]=o,a=o.index,l=e.includes("/");a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:s,matcher:u,props:c}=t[i];let d;if(l)d=e.length,n.push(u.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${i}}}}`));d=o.index+o[0].length,n.push(u.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(d)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}}function il(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:a,parsedContent:l,tagName:s,noWrap:u}=e,c=null!==(t=null!=o?o:s)&&void 0!==t?t:"span",d="fragment"===c||u;let f;if(l)f=l;else{const t=new ol(null!=i?i:"",e).parse();t.length>0&&(f=t)}return f||(f=a),d?I().createElement(I().Fragment,null,f):I().createElement(Za,{attributes:n,className:r,tagName:c},f)}function al({href:t}){return(0,e.createElement)("p",{style:{color:"#595959",fontStyle:"SF Pro Text",fontSize:"0.75rem",lineHeight:"140%",fontWeight:400}},(0,r.__)(" Go to the settings to change the "),(0,e.createElement)("a",{href:t},(0,r.__)("global options.")))}function ll(){return(0,e.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},(0,e.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.069 2.251H8.25a.75.75 0 1 1 0 1.5H5.1c-.642 0-1.08 0-1.417.028-.329.027-.497.076-.614.136a1.5 1.5 0 0 0-.656.655c-.06.117-.108.286-.135.614-.027.338-.028.775-.028 1.417v6.3c0 .643 0 1.08.028 1.417.027.329.076.497.135.614a1.5 1.5 0 0 0 .656.656c.117.06.285.108.614.135.338.028.775.028 1.417.028h6.3c.642 0 1.08 0 1.417-.028.329-.027.497-.076.614-.135a1.5 1.5 0 0 0 .655-.656c.06-.117.109-.285.136-.614.027-.338.028-.774.028-1.417v-3.15a.75.75 0 0 1 1.5 0v3.181c0 .604 0 1.102-.033 1.508-.035.422-.109.81-.294 1.173a3 3 0 0 1-1.311 1.311c-.364.186-.752.26-1.173.294-.406.033-.904.033-1.508.033H5.069c-.604 0-1.102 0-1.508-.033-.421-.034-.809-.108-1.173-.294a3 3 0 0 1-1.311-1.31c-.185-.365-.26-.752-.294-1.174-.033-.406-.033-.904-.033-1.508V6.57c0-.604 0-1.102.033-1.508.035-.421.109-.809.294-1.173a3 3 0 0 1 1.311-1.31c.364-.186.752-.26 1.173-.295.406-.033.904-.033 1.508-.033z",fill:"#737373"}),(0,e.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.345 1.346a2.34 2.34 0 1 1 3.31 3.31L9.483 11.83l-.044.044c-.215.216-.406.406-.635.547-.201.123-.42.214-.65.269-.261.063-.53.063-.836.062H6a.75.75 0 0 1-.75-.75v-1.318c0-.305 0-.574.062-.836.055-.23.146-.449.27-.65.14-.23.33-.42.546-.635l.045-.044 7.172-7.172z",fill:"#737373"}))}function sl({id:t,help:n,heading:r,buttonCaption:o,children:a,onButtonClick:l,isButtonActive:s}){return(0,e.createElement)(i.BaseControl,{id:t,help:n},(0,e.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},(0,e.createElement)("span",null,r),(0,e.createElement)(i.Button,{className:S()("givewp-control-popover-setting-button",{"givewp-control-popover-setting-button--active":s,"givewp-control-popover-setting-button--has-caption":""!==o}),onClick:l,icon:o?null:ll,children:o||null})),a)}var ul=n(1167),cl=n.n(ul);function dl({onChange:t,value:n,className:o}){let i;v().noConflict();const a=(0,e.useRef)(),l=e=>{e.preventDefault(),e.stopPropagation(),i||(i=window.wp.media({title:(0,r.__)("Add or upload file","givewp"),button:{text:(0,r.__)("Use this media","givewp")},multiple:!1}),i.on("select",(function(){var e,t=i.state().get("selection").first().toJSON();const n=a.current.getEditor(),r=null!==(e=n.getSelection()?.index)&&void 0!==e?e:0;n.insertEmbed(r,"image",t.url),n.setSelection(r+1)}))),i.open()};(0,e.useEffect)((()=>{const e=document.querySelector(".ql-wpmedia");if(e)return e.addEventListener("click",l),()=>{e.removeEventListener("click",l)}}),[]);const s=S()("text-editor givewp-ql-text-editor",o);return(0,e.createElement)("div",{className:s},(0,e.createElement)(fl,null,(0,e.createElement)("button",{id:"ql-wpmedia",className:"ql-wpmedia",onClick:l},(0,e.createElement)(pl,null))),(0,e.createElement)(cl(),{style:{height:"16rem",borderRadius:"2px"},ref:a,theme:"snow",value:n,onChange:t,modules:{toolbar:{container:"#toolbar"}},formats:["header","bold","italic","underline","strike","blockquote","list","bullet","indent","link","image"],bounds:".givewp-ql-text-editor"}))}const fl=({children:t})=>(0,e.createElement)("div",{id:"toolbar"},(0,e.createElement)("select",{className:"ql-header",defaultValue:"",onChange:e=>e.persist()},(0,e.createElement)("option",{value:"1"}),(0,e.createElement)("option",{value:"2"}),(0,e.createElement)("option",{selected:!0})),(0,e.createElement)("button",{className:"ql-bold"}),(0,e.createElement)("button",{className:"ql-italic"}),(0,e.createElement)("button",{className:"ql-blockquote"}),(0,e.createElement)("button",{className:"ql-underline"}),(0,e.createElement)("button",{className:"ql-link"}),t),pl=()=>(0,e.createElement)("svg",{viewBox:"0 0 18 18"},(0,e.createElement)("rect",{className:"ql-stroke",height:"10",width:"12",x:"3",y:"4"}),(0,e.createElement)("circle",{className:"ql-fill",cx:"6",cy:"7",r:"1"}),(0,e.createElement)("polyline",{className:"ql-even ql-fill",points:"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"}));var hl=(0,e.createElement)(Ia.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Ia.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function vl({title:t,visible:n,onClose:o,children:a}){return(0,e.useEffect)((()=>o),[]),n?(0,e.createElement)(i.Popover,{className:"givewp-styled-popover-content-settings",placement:"left-end",variant:"unstyled",focusOnMount:!1},(0,e.createElement)("div",{className:"givewp-styled-popover-content-settings__header"},(0,e.createElement)("h1",null,t),(0,e.createElement)(i.Button,{onClick:o,icon:hl,label:(0,r.__)("Close","give")})),(0,e.createElement)("div",{className:"givewp-styled-popover-content-settings__content"},a)):null}const gl="showModalTerms",ml="showFormTerms",yl="showLinkTerms";function bl({label:t,linkText:n,isFormDisplay:r,agreementText:o}){return(0,e.createElement)("div",{className:"givewp-terms-and-conditions"},(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container",style:{display:r?"block":"inline-flex"}},(0,e.createElement)(i.CheckboxControl,{label:t,onChange:null,disabled:!0}),r&&(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container__form-display"},(0,e.createElement)(il,{content:o})),!r&&(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container__link-display"},n)))}var _l={name:"givewp/terms-and-conditions",settings:{...x,title:(0,r.__)("Terms and conditions","give"),description:(0,r.__)("Donors can accept the terms and conditions","give"),supports:{multiple:!1,html:!1},attributes:{useGlobalSettings:{type:"boolean",source:"attribute",default:"true"},checkboxLabel:{type:"string",source:"attribute",default:(0,r.__)("I agree to the Terms and conditions.","give")},displayType:{type:"string",source:"attribute",default:"showFormTerms"},linkText:{type:"string",source:"attribute",default:(0,r.__)("Show terms","give")},linkUrl:{type:"string",source:"attribute",default:""},agreementText:{type:"string",default:(0,r.__)("<p>Acceptance of any contribution, gift or grant is at the discretion of the GiveWP. The GiveWP will not accept any gift unless it can be used or expended consistently with the purpose and mission of the GiveWP. No irrevocable gift, whether outright or life-income in character, will be accepted if under any reasonable set of circumstances the gift would jeopardize the donor’s financial security.The GiveWP will refrain from providing advice about the tax or other treatment of gifts and will encourage donors to seek guidance from their own professional advisers to assist them in the process of making their donation.</p>","give")},modalHeading:{type:"string",source:"attribute",default:(0,r.__)("Do you consent to the following","give")},modalAcceptanceText:{type:"string",source:"attribute",default:(0,r.__)("Accept","give")}},edit:function({attributes:{checkboxLabel:t,displayType:n,linkText:a,useGlobalSettings:s,linkUrl:u,agreementText:c,modalHeading:d,modalAcceptanceText:f},setAttributes:p}){const[h,v]=(0,e.useState)(!1),g=l().termsAndConditions;s&&(t=g.checkboxLabel,c=g.agreementText);const m=n===gl,y=n===ml,b=n===yl;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bl,{label:t,linkText:a,isFormDisplay:y,agreementText:c}),(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(i.PanelBody,{title:(0,r.__)("Field Options","give"),initialOpen:!0},(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.SelectControl,{label:(0,r.__)("TERMS AND CONDITIONS","give"),onChange:()=>p({useGlobalSettings:!s}),value:s,options:[{label:(0,r.__)("Global","give"),value:"true"},{label:(0,r.__)("Customize","give"),value:"false"}]})),s?(0,e.createElement)(al,{href:"/wp-admin/edit.php?post_type=give_forms&page=give-settings&tab=display&section=term-and-conditions"}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Checkbox Label","give"),value:t,onChange:e=>p({checkboxLabel:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Display Type","give"),onChange:e=>p({displayType:e}),value:n,options:[{label:(0,r.__)("Show terms in modal","give"),value:gl},{label:(0,r.__)("Show terms in form","give"),value:ml},{label:(0,r.__)("Link to terms","give"),value:yl}]})),b&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Link Text","give"),value:a,onChange:e=>p({linkText:e})})),b&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("URL","give"),value:u,onChange:e=>p({linkUrl:e})})),!b&&(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(sl,{id:"terms-and-conditions",help:(0,r.__)("This is the actual text which the user will have to agree to in order to make a donation.","give"),heading:(0,r.__)("Agreement Text","give"),onButtonClick:()=>v(!h),isButtonActive:h},(0,e.createElement)(vl,{title:(0,r.__)("Agreement Text","give"),visible:h,onClose:()=>v(!1)},(0,e.createElement)(dl,{className:"givewp-popover-content-settings__editor",value:c,onChange:e=>p({agreementText:e})})))),m&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Modal Heading","give"),value:d,onChange:e=>p({modalHeading:e})})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,r.__)("Modal Accept Button","give"),value:f,onChange:e=>p({modalAcceptanceText:e})})))))))},icon:function(){return(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8292 6.34164L17.4317 6.64288L18.0571 6.39271L18.5 6.21555V18.7845L18.0571 18.6073L17.4317 18.3571L16.8292 18.6584L15.3849 19.3805L12.9743 18.577L12.5 18.4189L12.0257 18.577L9.61509 19.3805L8.17082 18.6584L7.56834 18.3571L6.94291 18.6073L6.5 18.7845V6.21555L6.94291 6.39271L7.56834 6.64288L8.17082 6.34164L9.61509 5.6195L12.0257 6.42302L12.5 6.58114L12.9743 6.42302L15.3849 5.6195L16.8292 6.34164ZM20 4L18.5 4.6L17.5 5L15.5 4L12.5 5L9.5 4L7.5 5L6.5 4.6L5 4V5V5.61555V19.3844V20V21L6.5 20.4L7.5 20L9.5 21L12.5 20L15.5 21L17.5 20L18.5 20.4L20 21V20V19.3844V5.61555V5V4ZM16.5 10.25V8.75H8.5V10.25H16.5ZM16.5 13.25V11.75H8.5V13.25H16.5ZM8.5 16.25V14.75H16.5V16.25H8.5Z",fill:"currentColor"}))})}}},wl=(0,e.createElement)(Ia.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Ia.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"}));const xl=({label:t,helpText:n})=>(0,e.createElement)(e.Fragment,null,t,(0,e.createElement)("div",{className:"components-base-control__help"},(0,e.createElement)("small",{style:{fontStyle:"normal",color:"#757575"}},n))),El={fieldSettings:{label:{default:(0,r.__)("Comment","give")},description:{default:(0,r.__)("Would you like to add a comment to this donation?","give")},metaKey:!1,placeholder:!1,required:!1,storeAsDonorMeta:!1,displayInAdmin:!1,displayInReceipt:!1,defaultValue:!1,emailTag:!1}},Ol={title:(0,r.__)("Donor Comments","give"),description:(0,r.__)("Do you want to provide donors the ability to add a comment to their donation? The comment will display publicly on the donor wall if they do not select to give anonymously.","give"),category:"input",supports:{html:!1,multiple:!1,givewp:El},icon:wl,edit:function({attributes:t}){const{label:n,description:r}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",null,(0,e.createElement)(i.TextareaControl,{style:{backgroundColor:"#fff"},readOnly:!0,label:(0,e.createElement)(xl,{label:n,helpText:r}),value:"",onChange:()=>null})))},save:()=>null};var Cl={name:"givewp/donor-comments",settings:Ol};const kl={fieldSettings:{label:{default:(0,r.__)("Make this an anonymous donation.","give")},description:{default:(0,r.__)("Would you like to prevent your name, image, and comment from being displayed publicly?","give")},metaKey:!1,placeholder:!1,required:!1,storeAsDonorMeta:!1,displayInAdmin:!1,displayInReceipt:!1,defaultValue:!1,emailTag:!1}},Nl={title:(0,r.__)("Anonymous Donation","give"),description:(0,r.__)("Do you want to provide donors the ability mark themselves anonymous while giving? This will prevent their information from appearing publicly on your website but you will still receive their information for your records in the admin panel.","give"),category:"input",supports:{html:!1,multiple:!1,givewp:kl},icon:()=>(0,e.createElement)(t,{icon:(0,e.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(i.Path,{d:"M10.8449 6.89062L7.05176 16.5H9.1684L9.89932 14.6484H14.1006L14.8316 16.5H16.9482L13.155 6.89062H10.8449ZM10.6765 12.6797L12 9.32658L13.3235 12.6797H10.6765Z",fill:"#000C00"}),(0,e.createElement)(i.Path,{d:"M18 2.625H6V0.75H0.75V6H2.625V18H0.75V23.25H6V21.375H18V23.25H23.25V18H21.375V6H23.25V0.75H18V2.625ZM2.25 4.5V2.25H4.5V4.5H2.25ZM4.5 21.75H2.25V19.5H4.5V21.75ZM18 19.875H6V18H4.125V6H6V4.125H18V6H19.875V18H18V19.875ZM21.75 19.5V21.75H19.5V19.5H21.75ZM19.5 2.25H21.75V4.5H19.5V2.25Z",fill:"#000C00"}))}),edit:function({attributes:t}){const{label:n,description:r}=t;return(0,e.createElement)("div",{className:"givewp-fields-anonymous-donations"},(0,e.createElement)(i.CheckboxControl,{checked:!1,label:n,readOnly:!0,onChange:null,help:r}))},save:()=>null};var Al=[T,L,M,B,V,U,ja,Ra,Ma,_l,Cl,{name:"givewp/anonymous",settings:Nl}];window.givewp||(window.givewp={form:{}}),window.givewp.form.blocks=new class{blocks=[];get(e){return this.blocks.find((({name:t})=>t===e))}getAll(){return this.blocks}register(e,t){if(this.get(e))throw new Error(`Block "${e}" is already registered.`);this.blocks.push({name:e,settings:t})}},[...d,...p,...Al].forEach((({name:e,settings:t})=>{s().register(e,t)}))}()}();