@openlettermarketing/olc-react-sdk 1.6.6 → 1.6.7-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -557,7 +557,7 @@ var r=n(96540);var a="function"==typeof Object.is?Object.is:function(e,t){return
557
557
  Copyright (c) 2018 Jed Watson.
558
558
  Licensed under the MIT License (MIT), see
559
559
  http://jedwatson.github.io/classnames
560
- */!function(){var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},6535:function(e){e.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=/^\s+/,n=/\s+$/;function r(e,t){if(t=t||{},(e=e||"")instanceof r)return e;if(!(this instanceof r))return new r(e,t);var n=a(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function a(t){var n={r:0,g:0,b:0},r=1,a=null,i=null,c=null,u=!1,d=!1;return"string"==typeof t&&(t=U(t)),"object"==e(t)&&(j(t.r)&&j(t.g)&&j(t.b)?(n=o(t.r,t.g,t.b),u=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):j(t.h)&&j(t.s)&&j(t.v)?(a=P(t.s),i=P(t.v),n=s(t.h,a,i),u=!0,d="hsv"):j(t.h)&&j(t.s)&&j(t.l)&&(a=P(t.s),c=P(t.l),n=l(t.h,a,c),u=!0,d="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=H(r),{ok:u,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function o(e,t,n){return{r:255*R(e,255),g:255*R(t,255),b:255*R(n,255)}}function i(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,a,o=Math.max(e,t,n),i=Math.min(e,t,n),l=(o+i)/2;if(o==i)r=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,l}}function l(e,t,n){var r,a,o;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=a=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=i(c,l,e+1/3),a=i(c,l,e),o=i(c,l,e-1/3)}return{r:255*r,g:255*a,b:255*o}}function c(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,a,o=Math.max(e,t,n),i=Math.min(e,t,n),l=o,c=o-i;if(a=0===o?0:c/o,o==i)r=0;else{switch(o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,v:l}}function s(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=Math.floor(e),a=e-r,o=n*(1-t),i=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,i,o,o,l,n][c],g:255*[l,n,n,i,o,o][c],b:255*[o,o,l,n,n,i][c]}}function u(e,t,n,r){var a=[O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function d(e,t,n,r,a){var o=[O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16)),O(D(r))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function f(e,t,n,r){return[O(D(r)),O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s-=t/100,n.s=x(n.s),r(n)}function h(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s+=t/100,n.s=x(n.s),r(n)}function C(e){return r(e).desaturate(100)}function A(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l+=t/100,n.l=x(n.l),r(n)}function m(e,t){t=0===t?0:t||10;var n=r(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),r(n)}function v(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l-=t/100,n.l=x(n.l),r(n)}function g(e,t){var n=r(e).toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,r(n)}function y(e){var t=r(e).toHsl();return t.h=(t.h+180)%360,r(t)}function b(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=r(e).toHsl(),a=[r(e)],o=360/t,i=1;i<t;i++)a.push(r({h:(n.h+i*o)%360,s:n.s,l:n.l}));return a}function L(e){var t=r(e).toHsl(),n=t.h;return[r(e),r({h:(n+72)%360,s:t.s,l:t.l}),r({h:(n+216)%360,s:t.s,l:t.l})]}function E(e,t,n){t=t||6,n=n||30;var a=r(e).toHsl(),o=360/n,i=[r(e)];for(a.h=(a.h-(o*t>>1)+720)%360;--t;)a.h=(a.h+o)%360,i.push(r(a));return i}function w(e,t){t=t||6;for(var n=r(e).toHsv(),a=n.h,o=n.s,i=n.v,l=[],c=1/t;t--;)l.push(r({h:a,s:o,v:i})),i=(i+c)%1;return l}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=H(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=c(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return d(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*R(this._r,255))+"%",g:Math.round(100*R(this._g,255))+"%",b:Math.round(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%)":"rgba("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=r(e);n="#"+f(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},r.fromRatio=function(t,n){if("object"==e(t)){var a={};for(var o in t)t.hasOwnProperty(o)&&(a[o]="a"===o?t[o]:P(t[o]));t=a}return r(t,n)},r.equals=function(e,t){return!(!e||!t)&&r(e).toRgbString()==r(t).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(e,t,n){n=0===n?0:n||50;var a=r(e).toRgb(),o=r(t).toRgb(),i=n/100;return r({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},r.readability=function(e,t){var n=r(e),a=r(t);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)},r.isReadable=function(e,t,n){var a,o,i=r.readability(e,t);switch(o=!1,(a=q(n)).level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},r.mostReadable=function(e,t,n){var a,o,i,l,c=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,l=n.size;for(var u=0;u<t.length;u++)(a=r.readability(e,t[u]))>s&&(s=a,c=r(t[u]));return r.isReadable(e,c,{level:i,size:l})||!o?c:(n.includeFallbackColors=!1,r.mostReadable(e,["#fff","#000"],n))};var z=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=r.hexNames=S(z);function S(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function H(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){T(e)&&(e="100%");var n=N(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function x(e){return Math.min(1,Math.max(0,e))}function V(e){return parseInt(e,16)}function T(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)}function N(e){return"string"==typeof e&&-1!=e.indexOf("%")}function O(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function D(e){return Math.round(255*parseFloat(e)).toString(16)}function k(e){return V(e)/255}var B,I,F,G=(I="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",F="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+I),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+I),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+I),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(e){return!!G.CSS_UNIT.exec(e)}function U(e){e=e.replace(t,"").replace(n,"").toLowerCase();var r,a=!1;if(z[e])e=z[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(r=G.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=G.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=G.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=G.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=G.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=G.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=G.hex8.exec(e))?{r:V(r[1]),g:V(r[2]),b:V(r[3]),a:k(r[4]),format:a?"name":"hex8"}:(r=G.hex6.exec(e))?{r:V(r[1]),g:V(r[2]),b:V(r[3]),format:a?"name":"hex"}:(r=G.hex4.exec(e))?{r:V(r[1]+""+r[1]),g:V(r[2]+""+r[2]),b:V(r[3]+""+r[3]),a:k(r[4]+""+r[4]),format:a?"name":"hex8"}:!!(r=G.hex3.exec(e))&&{r:V(r[1]+""+r[1]),g:V(r[2]+""+r[2]),b:V(r[3]+""+r[3]),format:a?"name":"hex"}}function q(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}return r}()},9417:(e,t,n)=>{function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},58168:(e,t,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},77387:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(63662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},98587:(e,t,n)=>{function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},63662:(e,t,n)=>{function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},29318:(e,t,n)=>{n.d(t,{Af:()=>g,y3:()=>b});var r,a,o=n(96540),i=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&f(e,n,t[n]);if(s)for(var n of s(t))d.call(t,n)&&f(e,n,t[n]);return e},h=(e,t)=>l(e,c(t));"undefined"==typeof window||!(null==(r=window.document)?void 0:r.createElement)&&"ReactNative"!==(null==(a=window.navigator)?void 0:a.product)?o.useEffect:o.useLayoutEffect;function C(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=C(r,t,n);if(e)return e;r=t?null:r.sibling}}function A(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const m=console.error;console.error=function(){const e=[...arguments].join("");if(!(null==e?void 0:e.startsWith("Warning:"))||!e.includes("useContext"))return m.apply(this,arguments);console.error=m};const v=A(o.createContext(null));class g extends o.Component{render(){return o.createElement(v.Provider,{value:this._reactInternals},this.props.children)}}function y(){const e=o.useContext(v);if(null===e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=o.useId(),n=o.useMemo((()=>{for(const n of[e,null==e?void 0:e.alternate]){if(!n)continue;const e=C(n,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}));if(e)return e}}),[e,t]);return n}function b(){const e=function(){const e=y(),[t]=o.useState((()=>new Map));t.clear();let n=e;for(;n;){if(n.type&&"object"==typeof n.type){const e=void 0===n.type._context&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==v&&!t.has(e)&&t.set(e,o.useContext(A(e)))}n=n.return}return t}();return o.useMemo((()=>Array.from(e.keys()).reduce(((t,n)=>r=>o.createElement(t,null,o.createElement(n.Provider,h(p({},r),{value:e.get(n)})))),(e=>o.createElement(g,p({},e))))),[e])}},43561:(e,t,n)=>{n.r(t),n.d(t,{customAlphabet:()=>i,customRandom:()=>o,nanoid:()=>l,random:()=>a,urlAlphabet:()=>r});let r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",a=e=>crypto.getRandomValues(new Uint8Array(e)),o=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*r*t/e.length);return(o=t)=>{let i="";for(;;){let t=n(a),l=a;for(;l--;)if(i+=e[t[l]&r]||"",i.length===o)return i}}},i=(e,t=21)=>o(e,t,a),l=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},14993:(e,t,n)=>{n.d(t,{BE:()=>W,Es:()=>R,Ht:()=>te,PP:()=>F,Tk:()=>G,Tn:()=>c,X3:()=>S,ZH:()=>o,aw:()=>ee,b0:()=>l,bZ:()=>h,bu:()=>D,dO:()=>M,iX:()=>K,lK:()=>T,lg:()=>O,mF:()=>k,mf:()=>H,q9:()=>Y,qm:()=>$,qv:()=>i,r9:()=>y,rL:()=>s,sb:()=>j,uv:()=>J});var r=n(96540);const a=()=>{},o=a(),i=Object,l=e=>e===o,c=e=>"function"==typeof e,s=(e,t)=>({...e,...t}),u=e=>c(e.then),d=new WeakMap;let f=0;const p=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let a,o;if(i(e)!==e||r||n==RegExp)a=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(a=d.get(e),a)return a;if(a=++f+"~",d.set(e,a),n==Array){for(a="@",o=0;o<e.length;o++)a+=p(e[o])+",";d.set(e,a)}if(n==i){a="#";const t=i.keys(e).sort();for(;!l(o=t.pop());)l(e[o])||(a+=o+":"+p(e[o])+",");d.set(e,a)}}return a},h=new WeakMap,C={},A={},m="undefined",v=typeof window!=m,g=typeof document!=m,y=(e,t)=>{const n=h.get(e);return[()=>!l(t)&&e.get(t)||C,r=>{if(!l(t)){const a=e.get(t);t in A||(A[t]=a),n[5](t,s(a,r),a||C)}},n[6],()=>!l(t)&&t in A?A[t]:!l(t)&&e.get(t)||C]};let b=!0;const[L,E]=v&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],w={isOnline:()=>b,isVisible:()=>{const e=g&&document.visibilityState;return l(e)||"hidden"!==e}},z={initFocus:e=>(g&&document.addEventListener("visibilitychange",e),L("focus",e),()=>{g&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{const t=()=>{b=!0,e()},n=()=>{b=!1};return L("online",t),L("offline",n),()=>{E("online",t),E("offline",n)}}},M=!r.useId,S=!v||"Deno"in window,H=e=>v&&typeof window.requestAnimationFrame!=m?window.requestAnimationFrame(e):setTimeout(e,1),R=S?r.useEffect:r.useLayoutEffect,x="undefined"!=typeof navigator&&navigator.connection,V=!S&&x&&(["slow-2g","2g"].includes(x.effectiveType)||x.saveData),T=e=>{if(c(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?p(e):"",t]};let N=0;const O=()=>++N,P=2;var D={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:P,RECONNECT_EVENT:1};async function k(...e){const[t,n,r,a]=e,i=s({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{});let d=i.populateCache;const f=i.rollbackOnError;let p=i.optimisticData;const C=i.throwOnError;if(c(n)){const e=n,r=[],a=t.keys();for(const n of a)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(A))}return A(n);async function A(n){const[a]=T(n);if(!a)return;const[s,A]=y(t,a),[m,v,g,b]=h.get(t),L=()=>{const e=m[a];return(c(i.revalidate)?i.revalidate(s().data,n):!1!==i.revalidate)&&(delete g[a],delete b[a],e&&e[0])?e[0](P).then((()=>s().data)):s().data};if(e.length<3)return L();let E,w=r;const z=O();v[a]=[z,0];const M=!l(p),S=s(),H=S.data,R=S._c,x=l(R)?H:R;if(M&&(p=c(p)?p(x,H):p,A({data:p,_c:x})),c(w))try{w=w(x)}catch(e){E=e}if(w&&u(w)){if(w=await w.catch((e=>{E=e})),z!==v[a][0]){if(E)throw E;return w}E&&M&&(e=>"function"==typeof f?f(e):!1!==f)(E)&&(d=!0,A({data:x,_c:o}))}if(d&&!E)if(c(d)){const e=d(w,x);A({data:e,error:o,_c:o})}else A({data:w,error:o,_c:o});if(v[a][1]=O(),Promise.resolve(L()).then((()=>{A({_c:o})})),!E)return w;if(C)throw E}}const B=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},I=(e,t)=>{if(!h.has(e)){const n=s(z,t),r={},i=k.bind(o,e);let l=a;const c={},u=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,r)=>{e.set(t,n);const a=c[t];if(a)for(const e of a)e(n,r)},f=()=>{if(!h.has(e)&&(h.set(e,[r,{},{},{},i,d,u]),!S)){const t=n.initFocus(setTimeout.bind(o,B.bind(o,r,0))),a=n.initReconnect(setTimeout.bind(o,B.bind(o,r,1)));l=()=>{t&&t(),a&&a(),h.delete(e)}}};return f(),[e,i,f,l]}return[e,h.get(e)[4]]},[F,G]=I(new Map),j=s({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(e,t,n,r,a)=>{const o=n.errorRetryCount,i=a.retryCount,c=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!l(o)&&i>o||setTimeout(r,c,a)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:V?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:V?5e3:3e3,compare:(e,t)=>p(e)==p(t),isPaused:()=>!1,cache:F,mutate:G,fallback:{}},w),U=(e,t)=>{const n=s(e,t);if(t){const{use:r,fallback:a}=e,{use:o,fallback:i}=t;r&&o&&(n.use=r.concat(o)),a&&i&&(n.fallback=s(a,i))}return n},q=(0,r.createContext)({}),W=e=>{const{value:t}=e,n=(0,r.useContext)(q),a=c(t),i=(0,r.useMemo)((()=>a?t(n):t),[a,n,t]),l=(0,r.useMemo)((()=>a?i:U(n,i)),[a,n,i]),u=i&&i.provider,d=(0,r.useRef)(o);u&&!d.current&&(d.current=I(u(l.cache||F),i));const f=d.current;return f&&(l.cache=f[0],l.mutate=f[1]),R((()=>{if(f)return f[2]&&f[2](),f[3]}),[]),(0,r.createElement)(q.Provider,s(e,{value:l}))},Y="$inf$",Q=v&&window.__SWR_DEVTOOLS_USE__,Z=Q?window.__SWR_DEVTOOLS_USE__:[],X=e=>c(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],K=()=>s(j,(0,r.useContext)(q)),J=(e,t)=>{const[n,r]=T(e),[,,,a]=h.get(F);if(a[n])return a[n];const o=t(r);return a[n]=o,o},_=Z.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=T(t),[,,,a]=h.get(F);if(r.startsWith(Y))return n(...e);const o=a[r];return l(o)?n(...e):(delete a[r],o)}),r))),$=e=>function(...t){const n=K(),[r,a,o]=X(t),i=U(n,o);let l=e;const{use:c}=i,s=(c||[]).concat(_);for(let e=s.length;e--;)l=s[e](l);return l(r,a||i.fetcher||null,i)},ee=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},te=(e,t)=>(...n)=>{const[r,a,o]=X(n),i=(o.use||[]).concat(t);return e(r,a,{...o,use:i})};Q&&(window.__SWR_DEVTOOLS_REACT__=r)},31635:(e,t,n)=>{n.d(t,{C6:()=>a,Cl:()=>o,Tt:()=>i,YH:()=>c,fX:()=>s,sH:()=>l});var 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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(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 a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function l(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}Object.create;function s(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=n,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.b=document.baseURI||self.location.href,a.nc=void 0;var o={};a.d(o,{A:()=>uv});var i,l=a(96540),c=a.t(l,2),s=a(5338),u=a(40961),d=a.t(u,2);
560
+ */!function(){var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},6535:function(e){e.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=/^\s+/,n=/\s+$/;function r(e,t){if(t=t||{},(e=e||"")instanceof r)return e;if(!(this instanceof r))return new r(e,t);var n=a(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function a(t){var n={r:0,g:0,b:0},r=1,a=null,i=null,c=null,u=!1,d=!1;return"string"==typeof t&&(t=U(t)),"object"==e(t)&&(j(t.r)&&j(t.g)&&j(t.b)?(n=o(t.r,t.g,t.b),u=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):j(t.h)&&j(t.s)&&j(t.v)?(a=P(t.s),i=P(t.v),n=s(t.h,a,i),u=!0,d="hsv"):j(t.h)&&j(t.s)&&j(t.l)&&(a=P(t.s),c=P(t.l),n=l(t.h,a,c),u=!0,d="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=H(r),{ok:u,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function o(e,t,n){return{r:255*R(e,255),g:255*R(t,255),b:255*R(n,255)}}function i(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,a,o=Math.max(e,t,n),i=Math.min(e,t,n),l=(o+i)/2;if(o==i)r=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,l}}function l(e,t,n){var r,a,o;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=a=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=i(c,l,e+1/3),a=i(c,l,e),o=i(c,l,e-1/3)}return{r:255*r,g:255*a,b:255*o}}function c(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,a,o=Math.max(e,t,n),i=Math.min(e,t,n),l=o,c=o-i;if(a=0===o?0:c/o,o==i)r=0;else{switch(o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,v:l}}function s(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=Math.floor(e),a=e-r,o=n*(1-t),i=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,i,o,o,l,n][c],g:255*[l,n,n,i,o,o][c],b:255*[o,o,l,n,n,i][c]}}function u(e,t,n,r){var a=[O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function d(e,t,n,r,a){var o=[O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16)),O(D(r))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function f(e,t,n,r){return[O(D(r)),O(Math.round(e).toString(16)),O(Math.round(t).toString(16)),O(Math.round(n).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s-=t/100,n.s=x(n.s),r(n)}function h(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s+=t/100,n.s=x(n.s),r(n)}function C(e){return r(e).desaturate(100)}function A(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l+=t/100,n.l=x(n.l),r(n)}function m(e,t){t=0===t?0:t||10;var n=r(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),r(n)}function v(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l-=t/100,n.l=x(n.l),r(n)}function g(e,t){var n=r(e).toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,r(n)}function y(e){var t=r(e).toHsl();return t.h=(t.h+180)%360,r(t)}function b(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=r(e).toHsl(),a=[r(e)],o=360/t,i=1;i<t;i++)a.push(r({h:(n.h+i*o)%360,s:n.s,l:n.l}));return a}function L(e){var t=r(e).toHsl(),n=t.h;return[r(e),r({h:(n+72)%360,s:t.s,l:t.l}),r({h:(n+216)%360,s:t.s,l:t.l})]}function E(e,t,n){t=t||6,n=n||30;var a=r(e).toHsl(),o=360/n,i=[r(e)];for(a.h=(a.h-(o*t>>1)+720)%360;--t;)a.h=(a.h+o)%360,i.push(r(a));return i}function w(e,t){t=t||6;for(var n=r(e).toHsv(),a=n.h,o=n.s,i=n.v,l=[],c=1/t;t--;)l.push(r({h:a,s:o,v:i})),i=(i+c)%1;return l}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=H(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=c(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return d(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*R(this._r,255))+"%",g:Math.round(100*R(this._g,255))+"%",b:Math.round(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%)":"rgba("+Math.round(100*R(this._r,255))+"%, "+Math.round(100*R(this._g,255))+"%, "+Math.round(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=r(e);n="#"+f(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},r.fromRatio=function(t,n){if("object"==e(t)){var a={};for(var o in t)t.hasOwnProperty(o)&&(a[o]="a"===o?t[o]:P(t[o]));t=a}return r(t,n)},r.equals=function(e,t){return!(!e||!t)&&r(e).toRgbString()==r(t).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(e,t,n){n=0===n?0:n||50;var a=r(e).toRgb(),o=r(t).toRgb(),i=n/100;return r({r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a})},r.readability=function(e,t){var n=r(e),a=r(t);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)},r.isReadable=function(e,t,n){var a,o,i=r.readability(e,t);switch(o=!1,(a=q(n)).level+a.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},r.mostReadable=function(e,t,n){var a,o,i,l,c=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,l=n.size;for(var u=0;u<t.length;u++)(a=r.readability(e,t[u]))>s&&(s=a,c=r(t[u]));return r.isReadable(e,c,{level:i,size:l})||!o?c:(n.includeFallbackColors=!1,r.mostReadable(e,["#fff","#000"],n))};var z=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=r.hexNames=S(z);function S(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function H(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){T(e)&&(e="100%");var n=N(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function x(e){return Math.min(1,Math.max(0,e))}function V(e){return parseInt(e,16)}function T(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)}function N(e){return"string"==typeof e&&-1!=e.indexOf("%")}function O(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function D(e){return Math.round(255*parseFloat(e)).toString(16)}function k(e){return V(e)/255}var B,I,F,G=(I="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",F="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+I),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+I),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+I),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(e){return!!G.CSS_UNIT.exec(e)}function U(e){e=e.replace(t,"").replace(n,"").toLowerCase();var r,a=!1;if(z[e])e=z[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(r=G.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=G.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=G.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=G.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=G.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=G.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=G.hex8.exec(e))?{r:V(r[1]),g:V(r[2]),b:V(r[3]),a:k(r[4]),format:a?"name":"hex8"}:(r=G.hex6.exec(e))?{r:V(r[1]),g:V(r[2]),b:V(r[3]),format:a?"name":"hex"}:(r=G.hex4.exec(e))?{r:V(r[1]+""+r[1]),g:V(r[2]+""+r[2]),b:V(r[3]+""+r[3]),a:k(r[4]+""+r[4]),format:a?"name":"hex8"}:!!(r=G.hex3.exec(e))&&{r:V(r[1]+""+r[1]),g:V(r[2]+""+r[2]),b:V(r[3]+""+r[3]),format:a?"name":"hex"}}function q(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}return r}()},9417:(e,t,n)=>{function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},58168:(e,t,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},77387:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(63662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},98587:(e,t,n)=>{function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},63662:(e,t,n)=>{function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},29318:(e,t,n)=>{n.d(t,{Af:()=>g,y3:()=>b});var r,a,o=n(96540),i=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&f(e,n,t[n]);if(s)for(var n of s(t))d.call(t,n)&&f(e,n,t[n]);return e},h=(e,t)=>l(e,c(t));"undefined"==typeof window||!(null==(r=window.document)?void 0:r.createElement)&&"ReactNative"!==(null==(a=window.navigator)?void 0:a.product)?o.useEffect:o.useLayoutEffect;function C(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=C(r,t,n);if(e)return e;r=t?null:r.sibling}}function A(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const m=console.error;console.error=function(){const e=[...arguments].join("");if(!(null==e?void 0:e.startsWith("Warning:"))||!e.includes("useContext"))return m.apply(this,arguments);console.error=m};const v=A(o.createContext(null));class g extends o.Component{render(){return o.createElement(v.Provider,{value:this._reactInternals},this.props.children)}}function y(){const e=o.useContext(v);if(null===e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=o.useId(),n=o.useMemo((()=>{for(const n of[e,null==e?void 0:e.alternate]){if(!n)continue;const e=C(n,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}));if(e)return e}}),[e,t]);return n}function b(){const e=function(){const e=y(),[t]=o.useState((()=>new Map));t.clear();let n=e;for(;n;){if(n.type&&"object"==typeof n.type){const e=void 0===n.type._context&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==v&&!t.has(e)&&t.set(e,o.useContext(A(e)))}n=n.return}return t}();return o.useMemo((()=>Array.from(e.keys()).reduce(((t,n)=>r=>o.createElement(t,null,o.createElement(n.Provider,h(p({},r),{value:e.get(n)})))),(e=>o.createElement(g,p({},e))))),[e])}},43561:(e,t,n)=>{n.r(t),n.d(t,{customAlphabet:()=>i,customRandom:()=>o,nanoid:()=>l,random:()=>a,urlAlphabet:()=>r});let r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",a=e=>crypto.getRandomValues(new Uint8Array(e)),o=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*r*t/e.length);return(o=t)=>{let i="";for(;;){let t=n(a),l=a;for(;l--;)if(i+=e[t[l]&r]||"",i.length===o)return i}}},i=(e,t=21)=>o(e,t,a),l=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},14993:(e,t,n)=>{n.d(t,{BE:()=>W,Es:()=>R,Ht:()=>te,PP:()=>F,Tk:()=>G,Tn:()=>c,X3:()=>S,ZH:()=>o,aw:()=>ee,b0:()=>l,bZ:()=>h,bu:()=>D,dO:()=>M,iX:()=>K,lK:()=>T,lg:()=>O,mF:()=>k,mf:()=>H,q9:()=>Y,qm:()=>$,qv:()=>i,r9:()=>y,rL:()=>s,sb:()=>j,uv:()=>J});var r=n(96540);const a=()=>{},o=a(),i=Object,l=e=>e===o,c=e=>"function"==typeof e,s=(e,t)=>({...e,...t}),u=e=>c(e.then),d=new WeakMap;let f=0;const p=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let a,o;if(i(e)!==e||r||n==RegExp)a=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(a=d.get(e),a)return a;if(a=++f+"~",d.set(e,a),n==Array){for(a="@",o=0;o<e.length;o++)a+=p(e[o])+",";d.set(e,a)}if(n==i){a="#";const t=i.keys(e).sort();for(;!l(o=t.pop());)l(e[o])||(a+=o+":"+p(e[o])+",");d.set(e,a)}}return a},h=new WeakMap,C={},A={},m="undefined",v=typeof window!=m,g=typeof document!=m,y=(e,t)=>{const n=h.get(e);return[()=>!l(t)&&e.get(t)||C,r=>{if(!l(t)){const a=e.get(t);t in A||(A[t]=a),n[5](t,s(a,r),a||C)}},n[6],()=>!l(t)&&t in A?A[t]:!l(t)&&e.get(t)||C]};let b=!0;const[L,E]=v&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],w={isOnline:()=>b,isVisible:()=>{const e=g&&document.visibilityState;return l(e)||"hidden"!==e}},z={initFocus:e=>(g&&document.addEventListener("visibilitychange",e),L("focus",e),()=>{g&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{const t=()=>{b=!0,e()},n=()=>{b=!1};return L("online",t),L("offline",n),()=>{E("online",t),E("offline",n)}}},M=!r.useId,S=!v||"Deno"in window,H=e=>v&&typeof window.requestAnimationFrame!=m?window.requestAnimationFrame(e):setTimeout(e,1),R=S?r.useEffect:r.useLayoutEffect,x="undefined"!=typeof navigator&&navigator.connection,V=!S&&x&&(["slow-2g","2g"].includes(x.effectiveType)||x.saveData),T=e=>{if(c(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?p(e):"",t]};let N=0;const O=()=>++N,P=2;var D={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:P,RECONNECT_EVENT:1};async function k(...e){const[t,n,r,a]=e,i=s({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{});let d=i.populateCache;const f=i.rollbackOnError;let p=i.optimisticData;const C=i.throwOnError;if(c(n)){const e=n,r=[],a=t.keys();for(const n of a)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(A))}return A(n);async function A(n){const[a]=T(n);if(!a)return;const[s,A]=y(t,a),[m,v,g,b]=h.get(t),L=()=>{const e=m[a];return(c(i.revalidate)?i.revalidate(s().data,n):!1!==i.revalidate)&&(delete g[a],delete b[a],e&&e[0])?e[0](P).then((()=>s().data)):s().data};if(e.length<3)return L();let E,w=r;const z=O();v[a]=[z,0];const M=!l(p),S=s(),H=S.data,R=S._c,x=l(R)?H:R;if(M&&(p=c(p)?p(x,H):p,A({data:p,_c:x})),c(w))try{w=w(x)}catch(e){E=e}if(w&&u(w)){if(w=await w.catch((e=>{E=e})),z!==v[a][0]){if(E)throw E;return w}E&&M&&(e=>"function"==typeof f?f(e):!1!==f)(E)&&(d=!0,A({data:x,_c:o}))}if(d&&!E)if(c(d)){const e=d(w,x);A({data:e,error:o,_c:o})}else A({data:w,error:o,_c:o});if(v[a][1]=O(),Promise.resolve(L()).then((()=>{A({_c:o})})),!E)return w;if(C)throw E}}const B=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},I=(e,t)=>{if(!h.has(e)){const n=s(z,t),r={},i=k.bind(o,e);let l=a;const c={},u=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,r)=>{e.set(t,n);const a=c[t];if(a)for(const e of a)e(n,r)},f=()=>{if(!h.has(e)&&(h.set(e,[r,{},{},{},i,d,u]),!S)){const t=n.initFocus(setTimeout.bind(o,B.bind(o,r,0))),a=n.initReconnect(setTimeout.bind(o,B.bind(o,r,1)));l=()=>{t&&t(),a&&a(),h.delete(e)}}};return f(),[e,i,f,l]}return[e,h.get(e)[4]]},[F,G]=I(new Map),j=s({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(e,t,n,r,a)=>{const o=n.errorRetryCount,i=a.retryCount,c=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!l(o)&&i>o||setTimeout(r,c,a)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:V?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:V?5e3:3e3,compare:(e,t)=>p(e)==p(t),isPaused:()=>!1,cache:F,mutate:G,fallback:{}},w),U=(e,t)=>{const n=s(e,t);if(t){const{use:r,fallback:a}=e,{use:o,fallback:i}=t;r&&o&&(n.use=r.concat(o)),a&&i&&(n.fallback=s(a,i))}return n},q=(0,r.createContext)({}),W=e=>{const{value:t}=e,n=(0,r.useContext)(q),a=c(t),i=(0,r.useMemo)((()=>a?t(n):t),[a,n,t]),l=(0,r.useMemo)((()=>a?i:U(n,i)),[a,n,i]),u=i&&i.provider,d=(0,r.useRef)(o);u&&!d.current&&(d.current=I(u(l.cache||F),i));const f=d.current;return f&&(l.cache=f[0],l.mutate=f[1]),R((()=>{if(f)return f[2]&&f[2](),f[3]}),[]),(0,r.createElement)(q.Provider,s(e,{value:l}))},Y="$inf$",Q=v&&window.__SWR_DEVTOOLS_USE__,Z=Q?window.__SWR_DEVTOOLS_USE__:[],X=e=>c(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],K=()=>s(j,(0,r.useContext)(q)),J=(e,t)=>{const[n,r]=T(e),[,,,a]=h.get(F);if(a[n])return a[n];const o=t(r);return a[n]=o,o},_=Z.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=T(t),[,,,a]=h.get(F);if(r.startsWith(Y))return n(...e);const o=a[r];return l(o)?n(...e):(delete a[r],o)}),r))),$=e=>function(...t){const n=K(),[r,a,o]=X(t),i=U(n,o);let l=e;const{use:c}=i,s=(c||[]).concat(_);for(let e=s.length;e--;)l=s[e](l);return l(r,a||i.fetcher||null,i)},ee=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},te=(e,t)=>(...n)=>{const[r,a,o]=X(n),i=(o.use||[]).concat(t);return e(r,a,{...o,use:i})};Q&&(window.__SWR_DEVTOOLS_REACT__=r)},31635:(e,t,n)=>{n.d(t,{C6:()=>a,Cl:()=>o,Tt:()=>i,YH:()=>c,fX:()=>s,sH:()=>l});var 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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(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 a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function l(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}Object.create;function s(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=n,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.b=document.baseURI||self.location.href,a.nc=void 0;var o={};a.d(o,{A:()=>pv});var i,l=a(96540),c=a.t(l,2),s=a(5338),u=a(40961),d=a.t(u,2);
561
561
  /**
562
562
  * @remix-run/router v1.19.1
563
563
  *
@@ -597,5 +597,5 @@ function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t
597
597
  * @copyright ReactTooltip Team
598
598
  * @license MIT
599
599
  */
600
- const oA="react-tooltip-core-styles",iA="react-tooltip-base-styles",lA={core:!1,base:!1};function cA({css:e,id:t=iA,type:n="base",ref:r}){var a,o;if(!e||"undefined"==typeof document||lA[n])return;if("core"===n&&"undefined"!=typeof process&&(null===(a=null===process||void 0===process?void 0:process.env)||void 0===a?void 0:a.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==n&&"undefined"!=typeof process&&(null===(o=null===process||void 0===process?void 0:process.env)||void 0===o?void 0:o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===n&&(t=oA),r||(r={});const{insertAt:i}=r;if(document.getElementById(t))return;const l=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.id=t,c.type="text/css","top"===i&&l.firstChild?l.insertBefore(c,l.firstChild):l.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.appendChild(document.createTextNode(e)),lA[n]=!0}const sA=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:a=10,strategy:o="absolute",middlewares:i=[Ju(Number(a)),$u({fallbackAxisSideDirection:"start"}),_u({padding:5})],border:l})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=i;return n?(c.push(ed({element:n,padding:5})),td(e,t,{placement:r,strategy:o,middleware:c}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var a,o;const i={left:`${e}px`,top:`${t}px`,border:l},{x:c,y:s}=null!==(a=r.arrow)&&void 0!==a?a:{x:0,y:0},u=null!==(o={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==o?o:"bottom",d=l&&{borderBottom:l,borderRight:l};let f=0;if(l){const e=`${l}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):td(e,t,{placement:"bottom",strategy:o,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})))},uA=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),dA=(e,t,n)=>{let r=null;const a=function(...a){const o=()=>{r=null,n||e.apply(this,a)};n&&!r&&(e.apply(this,a),r=setTimeout(o,t)),n||(r&&clearTimeout(r),r=setTimeout(o,t))};return a.cancel=()=>{r&&(clearTimeout(r),r=null)},a},fA=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,pA=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>pA(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!fA(e)||!fA(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>pA(e[n],t[n])))},hA=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},CA=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(hA(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},AA="undefined"!=typeof window?l.useLayoutEffect:l.useEffect,mA=e=>{e.current&&(clearTimeout(e.current),e.current=null)},vA="DEFAULT_TOOLTIP_ID",gA={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},yA=(0,l.createContext)({getTooltipData:()=>gA});function bA(e=vA){return(0,l.useContext)(yA).getTooltipData(e)}var LA={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},EA={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const wA=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:a="dark",anchorId:o,anchorSelect:i,place:c="top",offset:s=10,events:u=["hover"],openOnClick:d=!1,positionStrategy:f="absolute",middlewares:p,wrapper:h,delayShow:C=0,delayHide:A=0,float:m=!1,hidden:v=!1,noArrow:g=!1,clickable:y=!1,closeOnEsc:b=!1,closeOnScroll:L=!1,closeOnResize:E=!1,openEvents:w,closeEvents:z,globalCloseEvents:M,imperativeModeOnly:S,style:H,position:R,afterShow:x,afterHide:V,disableTooltip:T,content:N,contentWrapperRef:O,isOpen:P,defaultIsOpen:D=!1,setIsOpen:k,activeAnchor:B,setActiveAnchor:I,border:F,opacity:G,arrowColor:j,role:U="tooltip"})=>{var q;const W=(0,l.useRef)(null),Y=(0,l.useRef)(null),Q=(0,l.useRef)(null),Z=(0,l.useRef)(null),X=(0,l.useRef)(null),[K,J]=(0,l.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:c}),[_,$]=(0,l.useState)(!1),[ee,te]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(null),ae=(0,l.useRef)(!1),oe=(0,l.useRef)(null),{anchorRefs:ie,setActiveAnchor:le}=bA(t),ce=(0,l.useRef)(!1),[se,ue]=(0,l.useState)([]),de=(0,l.useRef)(!1),fe=d||u.includes("click"),pe=fe||(null==w?void 0:w.click)||(null==w?void 0:w.dblclick)||(null==w?void 0:w.mousedown),he=w?{...w}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!w&&fe&&Object.assign(he,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=z?{...z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!z&&fe&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const Ae=M?{...M}:{escape:b||!1,scroll:L||!1,resize:E||!1,clickOutsideAnchor:pe||!1};S&&(Object.assign(he,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ae,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),AA((()=>(de.current=!0,()=>{de.current=!1})),[]);const me=e=>{de.current&&(e&&te(!0),setTimeout((()=>{de.current&&(null==k||k(e),void 0===P&&$(e))}),10))};(0,l.useEffect)((()=>{if(void 0===P)return()=>null;P&&te(!0);const e=setTimeout((()=>{$(P)}),10);return()=>{clearTimeout(e)}}),[P]),(0,l.useEffect)((()=>{if(_!==ae.current)if(mA(X),ae.current=_,_)null==x||x();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,n,r]=t;return Number(n)*("ms"===r?1:1e3)})();X.current=setTimeout((()=>{te(!1),re(null),null==V||V()}),e+25)}}),[_]);const ve=e=>{J((t=>pA(t,e)?t:e))},ge=(e=C)=>{mA(Q),ee?me(!0):Q.current=setTimeout((()=>{me(!0)}),e)},ye=(e=A)=>{mA(Z),Z.current=setTimeout((()=>{ce.current||me(!1)}),e)},be=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return I(null),void le({current:null});C?ge():me(!0),I(n),le({current:n}),mA(Z)},Le=()=>{y?ye(A||100):A?ye():me(!1),mA(Q)},Ee=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};sA({place:null!==(n=null==ne?void 0:ne.place)&&void 0!==n?n:c,offset:s,elementReference:r,tooltipReference:W.current,tooltipArrowReference:Y.current,strategy:f,middlewares:p,border:F}).then((e=>{ve(e)}))},we=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Ee(n),oe.current=n},ze=e=>{var t;if(!_)return;const n=e.target;n.isConnected&&((null===(t=W.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${o}']`),...se].some((e=>null==e?void 0:e.contains(n)))||(me(!1),mA(Q)))},Me=dA(be,50,!0),Se=dA(Le,50,!0),He=e=>{Se.cancel(),Me(e)},Re=()=>{Me.cancel(),Se()},xe=(0,l.useCallback)((()=>{var e,t;const n=null!==(e=null==ne?void 0:ne.position)&&void 0!==e?e:R;n?Ee(n):m?oe.current&&Ee(oe.current):(null==B?void 0:B.isConnected)&&sA({place:null!==(t=null==ne?void 0:ne.place)&&void 0!==t?t:c,offset:s,elementReference:B,tooltipReference:W.current,tooltipArrowReference:Y.current,strategy:f,middlewares:p,border:F}).then((e=>{de.current&&ve(e)}))}),[_,B,N,H,c,null==ne?void 0:ne.place,s,f,R,null==ne?void 0:ne.position,m]);(0,l.useEffect)((()=>{var e,t;const n=new Set(ie);se.forEach((e=>{(null==T?void 0:T(e))||n.add({current:e})}));const r=document.querySelector(`[id='${o}']`);r&&!(null==T?void 0:T(r))&&n.add({current:r});const a=()=>{me(!1)},i=CA(B),l=CA(W.current);Ae.scroll&&(window.addEventListener("scroll",a),null==i||i.addEventListener("scroll",a),null==l||l.addEventListener("scroll",a));let c=null;Ae.resize?window.addEventListener("resize",a):B&&W.current&&(c=Ku(B,W.current,xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const s=e=>{"Escape"===e.key&&me(!1)};Ae.escape&&window.addEventListener("keydown",s),Ae.clickOutsideAnchor&&window.addEventListener("click",ze);const u=[],d=e=>{_&&(null==e?void 0:e.target)===B||be(e)},f=e=>{_&&(null==e?void 0:e.target)===B&&Le()},p=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(he).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:He}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ce).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:Re}):h.includes(e)&&u.push({event:e,listener:f}))})),m&&u.push({event:"pointermove",listener:we});const C=()=>{ce.current=!0},A=()=>{ce.current=!1,Le()};return y&&!pe&&(null===(e=W.current)||void 0===e||e.addEventListener("mouseenter",C),null===(t=W.current)||void 0===t||t.addEventListener("mouseleave",A)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Ae.scroll&&(window.removeEventListener("scroll",a),null==i||i.removeEventListener("scroll",a),null==l||l.removeEventListener("scroll",a)),Ae.resize?window.removeEventListener("resize",a):null==c||c(),Ae.clickOutsideAnchor&&window.removeEventListener("click",ze),Ae.escape&&window.removeEventListener("keydown",s),y&&!pe&&(null===(e=W.current)||void 0===e||e.removeEventListener("mouseenter",C),null===(t=W.current)||void 0===t||t.removeEventListener("mouseleave",A)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[B,xe,ee,ie,se,w,z,M,fe,C,A]),(0,l.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ne?void 0:ne.anchorSelect)&&void 0!==e?e:i)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const a=new MutationObserver((e=>{const n=[],a=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&a.push(e.target)),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{a.push(...t.filter((e=>e.matches(r)))),a.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(te(!1),me(!1),I(null),mA(Q),mA(Z),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||a.length)&&ue((e=>[...e.filter((e=>!a.includes(e))),...n]))}));return a.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{a.disconnect()}}),[t,i,null==ne?void 0:ne.anchorSelect,B]),(0,l.useEffect)((()=>{xe()}),[xe]),(0,l.useEffect)((()=>{if(!(null==O?void 0:O.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>xe()))}));return e.observe(O.current),()=>{e.disconnect()}}),[N,null==O?void 0:O.current]),(0,l.useEffect)((()=>{var e;const t=document.querySelector(`[id='${o}']`),n=[...se,t];B&&n.includes(B)||I(null!==(e=se[0])&&void 0!==e?e:t)}),[o,se,B]),(0,l.useEffect)((()=>(D&&me(!0),()=>{mA(Q),mA(Z)})),[]),(0,l.useEffect)((()=>{var e;let n=null!==(e=null==ne?void 0:ne.anchorSelect)&&void 0!==e?e:i;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ue(e)}catch(e){ue([])}}),[t,i,null==ne?void 0:ne.anchorSelect]),(0,l.useEffect)((()=>{Q.current&&(mA(Q),ge(C))}),[C]);const Ve=null!==(q=null==ne?void 0:ne.content)&&void 0!==q?q:N,Te=_&&Object.keys(K.tooltipStyles).length>0;return(0,l.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}re(null!=e?e:null),(null==e?void 0:e.delay)?ge(e.delay):me(!0)},close:e=>{(null==e?void 0:e.delay)?ye(e.delay):me(!1)},activeAnchor:B,place:K.place,isOpen:Boolean(ee&&!v&&Ve&&Te)}))),ee&&!v&&Ve?l.createElement(h,{id:t,role:U,className:aA("react-tooltip",LA.tooltip,EA.tooltip,EA[a],n,`react-tooltip__place-${K.place}`,LA[Te?"show":"closing"],Te?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&LA.fixed,y&&LA.clickable),onTransitionEnd:e=>{mA(X),_||"opacity"!==e.propertyName||(te(!1),re(null),null==V||V())},style:{...H,...K.tooltipStyles,opacity:void 0!==G&&Te?G:void 0},ref:W},Ve,l.createElement(h,{className:aA("react-tooltip-arrow",LA.arrow,EA.arrow,r,g&&LA.noArrow),style:{...K.tooltipArrowStyles,background:j?`linear-gradient(to right bottom, transparent 50%, ${j} 50%)`:void 0},ref:Y})):null},zA=({content:e})=>l.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),MA=l.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:a,render:o,className:i,classNameArrow:c,variant:s="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:C=!1,positionStrategy:A="absolute",middlewares:m,delayShow:v=0,delayHide:g=0,float:y=!1,hidden:b=!1,noArrow:L=!1,clickable:E=!1,closeOnEsc:w=!1,closeOnScroll:z=!1,closeOnResize:M=!1,openEvents:S,closeEvents:H,globalCloseEvents:R,imperativeModeOnly:x=!1,style:V,position:T,isOpen:N,defaultIsOpen:O=!1,disableStyleInjection:P=!1,border:D,opacity:k,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:G,disableTooltip:j,role:U="tooltip"},q)=>{const[W,Y]=(0,l.useState)(r),[Q,Z]=(0,l.useState)(a),[X,K]=(0,l.useState)(u),[J,_]=(0,l.useState)(s),[$,ee]=(0,l.useState)(d),[te,ne]=(0,l.useState)(v),[re,ae]=(0,l.useState)(g),[oe,ie]=(0,l.useState)(y),[le,ce]=(0,l.useState)(b),[se,ue]=(0,l.useState)(f),[de,fe]=(0,l.useState)(h),[pe,he]=(0,l.useState)(A),[Ce,Ae]=(0,l.useState)(null),[me,ve]=(0,l.useState)(null),ge=(0,l.useRef)(P),{anchorRefs:ye,activeAnchor:be}=bA(e),Le=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Ee=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:u)},content:e=>{Y(null!=e?e:r)},html:e=>{Z(null!=e?e:a)},variant:e=>{var t;_(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:A)},"delay-show":e=>{ne(null===e?v:Number(e))},"delay-hide":e=>{ae(null===e?g:Number(e))},float:e=>{ie(null===e?y:"true"===e)},hidden:e=>{ce(null===e?b:"true"===e)},"class-name":e=>{Ae(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,l.useEffect)((()=>{Y(r)}),[r]),(0,l.useEffect)((()=>{Z(a)}),[a]),(0,l.useEffect)((()=>{K(u)}),[u]),(0,l.useEffect)((()=>{_(s)}),[s]),(0,l.useEffect)((()=>{ee(d)}),[d]),(0,l.useEffect)((()=>{ne(v)}),[v]),(0,l.useEffect)((()=>{ae(g)}),[g]),(0,l.useEffect)((()=>{ie(y)}),[y]),(0,l.useEffect)((()=>{ce(b)}),[b]),(0,l.useEffect)((()=>{he(A)}),[A]),(0,l.useEffect)((()=>{ge.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[P]),(0,l.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}))}),[]),(0,l.useEffect)((()=>{var r;const a=new Set(ye);let o=n;if(!o&&e&&(o=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),o)try{document.querySelectorAll(o).forEach((e=>{a.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&a.add({current:i}),!a.size)return()=>null;const l=null!==(r=null!=me?me:i)&&void 0!==r?r:be.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Le(l);Ee(n)}))})),s={attributes:!0,childList:!1,subtree:!1};if(l){const e=Le(l);Ee(e),c.observe(l,s)}return()=>{c.disconnect()}}),[ye,be,me,t,n]),(0,l.useEffect)((()=>{(null==V?void 0:V.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!uA("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==V?void 0:V.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),k&&!uA("opacity",`${k}`)&&console.warn(`[react-tooltip] "${k}" is not a valid \`opacity\`.`)}),[]);let we=p;const ze=(0,l.useRef)(null);if(o){const e=o({content:(null==me?void 0:me.getAttribute("data-tooltip-content"))||W||null,activeAnchor:me});we=e?l.createElement("div",{ref:ze,className:"react-tooltip-content-wrapper"},e):null}else W&&(we=W);Q&&(we=l.createElement(zA,{content:Q}));const Me={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:aA(i,Ce),classNameArrow:c,content:we,contentWrapperRef:ze,place:X,variant:J,offset:$,wrapper:se,events:de,openOnClick:C,positionStrategy:pe,middlewares:m,delayShow:te,delayHide:re,float:oe,hidden:le,noArrow:L,clickable:E,closeOnEsc:w,closeOnScroll:z,closeOnResize:M,openEvents:S,closeEvents:H,globalCloseEvents:R,imperativeModeOnly:x,style:V,position:T,isOpen:N,defaultIsOpen:O,border:D,opacity:k,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:G,disableTooltip:j,activeAnchor:me,setActiveAnchor:e=>ve(e),role:U};return l.createElement(wA,{...Me})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||cA({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||cA({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));var SA=a(27455),HA={};HA.styleTagTransform=pc(),HA.setAttributes=sc(),HA.insert=lc().bind(null,"head"),HA.domAPI=oc(),HA.insertStyleElement=dc();rc()(SA.A,HA);SA.A&&SA.A.locals&&SA.A.locals;var RA=a(99197),xA={};xA.styleTagTransform=pc(),xA.setAttributes=sc(),xA.insert=lc().bind(null,"head"),xA.domAPI=oc(),xA.insertStyleElement=dc();rc()(RA.A,xA);RA.A&&RA.A.locals&&RA.A.locals;const VA=function(e){var t=e.anchorSelect,n=e.place,r=e.title;return l.createElement(MA,{className:"basic-tooltip",anchorSelect:t,place:n},r)};const TA=function(e){var t=e.className,n=void 0===t?{}:t,r=e.fill;return l.createElement("svg",{width:"12",className:n,height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{clipPath:"url(#clip0_1555_2219)"},l.createElement("path",{d:"M6.80169 8.45472C6.67902 8.46615 6.55586 8.43847 6.44987 8.37562C6.37243 8.29612 6.33531 8.18575 6.34897 8.07562C6.35183 7.98393 6.36278 7.89266 6.38169 7.8029C6.4 7.69991 6.42364 7.59796 6.45259 7.49744L6.77441 6.39015C6.8076 6.28087 6.82954 6.16846 6.83987 6.05469C6.83987 5.93197 6.85623 5.84741 6.85623 5.79833C6.86307 5.57959 6.76968 5.36969 6.60259 5.22833C6.39707 5.07055 6.14113 4.993 5.88259 5.01015C5.69732 5.01294 5.51347 5.04327 5.33713 5.10015C5.1444 5.16015 4.94167 5.23197 4.72895 5.31562L4.63623 5.67561C4.69895 5.65379 4.77533 5.62926 4.86259 5.60197C4.94584 5.57732 5.03214 5.56445 5.11895 5.56379C5.24073 5.5506 5.36331 5.58051 5.46531 5.64833C5.53459 5.731 5.5671 5.83839 5.55531 5.94562C5.555 6.03733 5.54495 6.12876 5.52531 6.21833C5.50621 6.3138 5.48167 6.41469 5.45167 6.52105L5.12713 7.63377C5.10097 7.7372 5.08004 7.84187 5.06441 7.94741C5.05166 8.03776 5.04529 8.12889 5.04531 8.22013C5.04397 8.44037 5.14468 8.64883 5.31803 8.78467C5.52672 8.94491 5.78631 9.02434 6.04893 9.00831C6.23385 9.01211 6.41814 8.98539 6.59439 8.92921C6.74893 8.87647 6.9553 8.80103 7.21349 8.70285L7.30077 8.35921C7.23083 8.38822 7.15881 8.41192 7.08531 8.43011C6.99236 8.45134 6.89692 8.45959 6.80169 8.45472Z",fill:r}),l.createElement("path",{d:"M7.14277 3.20479C6.99434 3.06848 6.79878 2.99514 6.59731 3.00025C6.39596 2.9957 6.20059 3.06897 6.05185 3.20479C5.77923 3.43987 5.74878 3.85145 5.98388 4.1241C6.00484 4.14841 6.02755 4.17112 6.05185 4.19207C6.36244 4.46988 6.83218 4.46988 7.14275 4.19207C7.41537 3.95467 7.44394 3.54123 7.20655 3.26861C7.18681 3.2459 7.16548 3.22457 7.14277 3.20479Z",fill:r}),l.createElement("path",{d:"M6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0ZM6 11.4545C2.98753 11.4545 0.545461 9.01247 0.545461 6C0.545461 2.98753 2.98753 0.545461 6 0.545461C9.01247 0.545461 11.4545 2.98753 11.4545 6C11.4545 9.01247 9.01247 11.4545 6 11.4545Z",fill:r})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1555_2219"},l.createElement("rect",{width:"12",height:"12",fill:"white"}))))};const NA=function(e){var t=e.className,n=void 0===t?{}:t;return l.createElement("svg",{width:"19",className:n,height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M3.5 15.025H3.975V15.5C3.975 16.1697 4.24103 16.8119 4.71456 17.2854C5.18809 17.759 5.83033 18.025 6.5 18.025H15.5C16.1697 18.025 16.8119 17.759 17.2854 17.2854C17.759 16.8119 18.025 16.1697 18.025 15.5V6.5C18.025 5.83033 17.759 5.18809 17.2854 4.71456C16.8119 4.24103 16.1697 3.975 15.5 3.975H15.025V3.5C15.025 2.83033 14.759 2.18808 14.2854 1.71456C13.8119 1.24103 13.1697 0.975 12.5 0.975H3.5C2.83033 0.975 2.18808 1.24103 1.71456 1.71456C1.24103 2.18808 0.975 2.83033 0.975 3.5V12.5C0.975 13.1697 1.24103 13.8119 1.71456 14.2854C2.18808 14.759 2.83033 15.025 3.5 15.025ZM15.5 5.025C15.8912 5.025 16.2664 5.1804 16.543 5.45702C16.8196 5.73363 16.975 6.10881 16.975 6.5V15.5C16.975 15.8912 16.8196 16.2664 16.543 16.543C16.2664 16.8196 15.8912 16.975 15.5 16.975H6.5C6.10881 16.975 5.73363 16.8196 5.45702 16.543C5.1804 16.2664 5.025 15.8912 5.025 15.5V15.025H12.5C13.1697 15.025 13.8119 14.759 14.2854 14.2854C14.759 13.8119 15.025 13.1697 15.025 12.5V5.025H15.5ZM2.025 3.5C2.025 3.10881 2.1804 2.73363 2.45702 2.45702C2.73363 2.1804 3.10881 2.025 3.5 2.025H12.5C12.8912 2.025 13.2664 2.1804 13.543 2.45702C13.8196 2.73363 13.975 3.10881 13.975 3.5V12.5C13.975 12.8912 13.8196 13.2664 13.543 13.543C13.2664 13.8196 12.8912 13.975 12.5 13.975H3.5C3.10881 13.975 2.73363 13.8196 2.45702 13.543C2.1804 13.2664 2.025 12.8912 2.025 12.5V3.5Z",fill:"",stroke:"",strokeWidth:"0.05"}))};const OA=function(e){var t=e.fill;return l.createElement("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M20.3047 5.21094H18.5078C18.0116 5.21094 17.6094 5.61317 17.6094 6.10938C17.6094 6.60558 18.0116 7.00781 18.5078 7.00781H20.3047C20.8001 7.00781 21.2031 7.41085 21.2031 7.90625V15.0938C21.2031 15.5891 20.8001 15.9922 20.3047 15.9922H18.5078C18.0116 15.9922 17.6094 16.3944 17.6094 16.8906C17.6094 17.3868 18.0116 17.7891 18.5078 17.7891H20.3047C21.7909 17.7891 23 16.5799 23 15.0938V7.90625C23 6.42005 21.7909 5.21094 20.3047 5.21094Z",fill:t}),l.createElement("path",{d:"M4.49219 10.6016H5.39062V13.2969C5.39062 13.7931 5.79286 14.1953 6.28906 14.1953C6.78527 14.1953 7.1875 13.7931 7.1875 13.2969V10.6016H8.08594C8.58214 10.6016 8.98438 10.1993 8.98438 9.70312C8.98438 9.20692 8.58214 8.80469 8.08594 8.80469H4.49219C3.99598 8.80469 3.59375 9.20692 3.59375 9.70312C3.59375 10.1993 3.99598 10.6016 4.49219 10.6016Z",fill:t}),l.createElement("path",{d:"M2.69531 17.7891H14.0156V19.5859H13.1172C12.621 19.5859 12.2188 19.9882 12.2188 20.4844C12.2188 20.9806 12.621 21.3828 13.1172 21.3828H16.7109C17.2071 21.3828 17.6094 20.9806 17.6094 20.4844C17.6094 19.9882 17.2071 19.5859 16.7109 19.5859H15.8125V3.41406H16.7109C17.2071 3.41406 17.6094 3.01183 17.6094 2.51562C17.6094 2.01942 17.2071 1.61719 16.7109 1.61719H13.1172C12.621 1.61719 12.2188 2.01942 12.2188 2.51562C12.2188 3.01183 12.621 3.41406 13.1172 3.41406H14.0156V5.21094H2.69531C1.20912 5.21094 0 6.42005 0 7.90625V15.0938C0 16.5799 1.20912 17.7891 2.69531 17.7891ZM1.79688 7.90625C1.79688 7.41085 2.19991 7.00781 2.69531 7.00781H14.0156V15.9922H2.69531C2.19991 15.9922 1.79688 15.5891 1.79688 15.0938V7.90625Z",fill:t}))};var PA=a(17528),DA={};DA.styleTagTransform=pc(),DA.setAttributes=sc(),DA.insert=lc().bind(null,"head"),DA.domAPI=oc(),DA.insertStyleElement=dc();rc()(PA.A,DA);PA.A&&PA.A.locals&&PA.A.locals;function kA(e){return kA="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},kA(e)}function BA(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */BA=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==kA(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(kA(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function IA(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function FA(e){return function(e){if(Array.isArray(e))return UA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||jA(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jA(e,t){if(e){if("string"==typeof e)return UA(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UA(e,t):void 0}}function UA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qA(){return qA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qA.apply(null,arguments)}var WA={backgroundColor:"transparent"},YA={name:"Fields",Tab:(0,mC.observer)((function(e){return l.createElement(AC.SectionTab,qA({name:"Fields"},e),l.createElement(OA,{fill:"var(--text-color)"}))})),Panel:(0,mC.observer)((function(e){e.store;var t,n,r,a=e.onGetCustomFields,o=e.allowSenderFields,i=e.excludedFields,c=e.allowPropertyFields,s=GA((0,l.useState)(!1),2),u=(s[0],s[1]),d=lt(),f=Ke((function(e){return e.customFields.customFields})),p=Ke((function(e){return e.customFields.defaultDynamicFields})),h=Ke((function(e){return e.templates.defaultSenderFields})),C=Ke((function(e){return e.templates.defaultPropertyFields})),A=c?[].concat(FA(p),FA(C)):p,m=Ke((function(e){return e.templates.product})),v=null==m?void 0:m.productType,g=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){IA(o,r,a,i,l,"next",e)}function l(e){IA(o,r,a,i,l,"throw",e)}i(void 0)}))}}(BA().mark((function e(){var t;return BA().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=5;break}return e.next=3,a();case 3:(null==(t=e.sent)?void 0:t.length)>=0&&d({type:hr,payload:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){g()}),[]);var y=function(e){if("Real Penned Letter"===v){var t=e.replace(/{{/g,"((").replace(/}}/g,"))");Wr(t),d(sh("".concat(t," Copied")))}else Wr(e),d(sh("".concat(e," Copied")))};return l.createElement("div",{className:"dynamic-content"},l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Contact Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"infoIcon"}),l.createElement(VA,{anchorSelect:".infoIcon",place:"bottom",title:"Merge fields allow you to personalize your mailer with contact information."}))),null==A||null===(t=A.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===t?void 0:t.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_contact"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))})),o&&l.createElement(l.Fragment,null,l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Sender Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"sender"}),l.createElement(VA,{anchorSelect:".sender",place:"bottom",title:"You can add sender fields to your template."}))),null==h||null===(n=h.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===n?void 0:n.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_sender"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))}))),l.createElement(VA,{anchorSelect:".copy",place:"bottom",title:"Copy"}),a&&(null==f?void 0:f.length)>0&&l.createElement(l.Fragment,null,l.createElement("hr",{className:"divider"}),l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Custom Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"custom"}),l.createElement(VA,{anchorSelect:".custom",place:"bottom",title:"You can add custom fields to your template."})),l.createElement(gc,{onClick:function(){u((function(e){return!e}))}})),null==f||null===(r=f.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===r?void 0:r.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_custom"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))}))))}))};const QA=YA;var ZA=a(59195),XA=a(79642);function KA(e){return KA="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},KA(e)}function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JA(Object(n),!0).forEach((function(t){$A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $A(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=KA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=KA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==KA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(e){return function(e){if(Array.isArray(e))return lm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||im(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tm(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=im(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function nm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==KA(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(KA(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function rm(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function am(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){rm(o,r,a,i,l,"next",e)}function l(e){rm(o,r,a,i,l,"throw",e)}i(void 0)}))}}function om(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||im(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function im(e,t){if(e){if("string"==typeof e)return lm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lm(e,t):void 0}}function lm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var cm=(0,mC.observer)((function(e){var t=e.store,n=om((0,l.useState)([]),2),r=n[0],a=n[1],o=om((0,l.useState)(!1),2),i=o[0],c=o[1],s=om((0,l.useState)(!1),2),u=s[0],d=s[1],f=lt(),p=Ke((function(e){return e.templates.uploadedImages})),h=function(){var e=am(nm().mark((function e(){return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p&&(d(!0),a(p),d(!1));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){return e&&Fr.includes(null==e?void 0:e.type)?!(e.size>=52e5)||(f(uh(xa.CUSTOM_UPLOAD_SECTION.SIZE_VALIDATION)),!1):(f(uh(xa.CUSTOM_UPLOAD_SECTION.TYPE_VALIDATION)),!1)},A=function(){var e=am(nm().mark((function e(t){var n,o,i,l,s,u,d;return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=t.target,o=tm(n.files),e.prev=3,o.s();case 5:if((i=o.n()).done){e.next=21;break}if(l=i.value,s=Xr(l),C(l)){e.next=12;break}return n.value=null,e.abrupt("return");case 12:return c(!0),e.next=15,ya(l);case 15:u=e.sent,d=[].concat(em(r),[{url:u,type:s}]),a(d),f({type:lr,payload:d});case 19:e.next=5;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(3),o.e(e.t0);case 26:return e.prev=26,o.f(),e.finish(26);case 29:c(!1),n.value=null,e.next=36;break;case 33:return e.prev=33,e.t1=e.catch(0),e.abrupt("return",e.t1);case 36:return e.prev=36,c(!1),e.finish(36);case 39:case"end":return e.stop()}}),e,null,[[0,33,36,39],[3,23,26,29]])})));return function(t){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){h()}),[]),l.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column"}},l.createElement("div",{style:{height:"40px",paddingTop:"5px"}},xa.CUSTOM_UPLOAD_SECTION.HEADING),l.createElement("div",{style:{height:"35px"}},l.createElement("strong",null,xa.CUSTOM_UPLOAD_SECTION.ACCEPTED_FORMATS)),l.createElement("div",{style:{height:"35px",paddingBottom:"15px"}},l.createElement("strong",null,xa.CUSTOM_UPLOAD_SECTION.MAX_SIZE)),l.createElement("div",{style:{marginBottom:"20px"}},l.createElement("label",{htmlFor:"input-file"},l.createElement(XA.$,{icon:"upload",style:{width:"100%",backgroundColor:"#f6f7f9",boxShadow:"inset 0 0 0 1px #11141833,0 1px 2px #1114181a",color:"#1c2127"},onClick:function(){var e;null===(e=document.querySelector("#input-file"))||void 0===e||e.click()},loading:i,intent:"primary"},xa.CUSTOM_UPLOAD_SECTION.UPLOAD_BTN_TEXT),l.createElement("input",{type:"file",id:"input-file",style:{display:"none"},onChange:A,multiple:!0}))),l.createElement(AC.ImagesGrid,{images:r,getPreview:function(e){return null==e?void 0:e.url},crossOrigin:void 0,isLoading:u,onSelect:function(){var e=am(nm().mark((function e(n,r,a){var o,i,l,c,s,u,d,f,p,h;return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==n?void 0:n.url,l=null==n?void 0:n.type,e.next=4,(0,ZA.getImageSize)(i);case 4:if(c=e.sent,s=c.width,u=c.height,!a||"svg"!==a.type||!a.contentEditable||"image"!==l){e.next=10;break}return a.set({maskSrc:i}),e.abrupt("return");case 10:if(!a||"image"!==a.type||!a.contentEditable||"image"!=l){e.next=14;break}return d=(0,ZA.getCrop)(a,{width:s,height:u}),a.set(_A({src:i},d)),e.abrupt("return");case 14:f=Math.min(t.width/s,t.height/u,1),s*=f,u*=f,p=((null==r?void 0:r.x)||t.width/2)-s/2,h=((null==r?void 0:r.y)||t.height/2)-u/2,null===(o=t.activePage)||void 0===o||o.addElement({type:l,src:i,x:p,y:h,width:s,height:u});case 20:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()}))}));AC.UploadSection.Panel=cm;const sm=cm;const um=function(){return l.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},l.createElement("title",null,"ic_fluent_apps_add_in_24_filled"),l.createElement("desc",null,"Created with Sketch."),l.createElement("g",{id:"🔍-Product-Icons",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l.createElement("g",{id:"ic_fluent_apps_add_in_24_filled",fill:"#212121",fillRule:"nonzero"},l.createElement("path",{d:"M10.5,3 C11.8807119,3 13,4.11928813 13,5.5 L13,11 L18.5,11 C19.8807119,11 21,12.1192881 21,13.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L10.5,3 Z M11,13 L5,13 L5,18.5 C5,18.7761424 5.22385763,19 5.5,19 L11,19 L11,13 Z M18.5,13 L13,13 L13,19 L18.5,19 C18.7761424,19 19,18.7761424 19,18.5 L19,13.5 C19,13.2238576 18.7761424,13 18.5,13 Z M10.5,5 L5.5,5 C5.22385763,5 5,5.22385763 5,5.5 L5,11 L11,11 L11,5.5 C11,5.22385763 10.7761424,5 10.5,5 Z M17.8833789,2.00672773 L18,2 C18.5128358,2 18.9355072,2.38604019 18.9932723,2.88337887 L19,3 L19,5 L21,5 C21.5128358,5 21.9355072,5.38604019 21.9932723,5.88337887 L22,6 C22,6.51283584 21.6139598,6.93550716 21.1166211,6.99327227 L21,7 L19,7 L19,9 C19,9.51283584 18.6139598,9.93550716 18.1166211,9.99327227 L18,10 C17.4871642,10 17.0644928,9.61395981 17.0067277,9.11662113 L17,9 L17,7 L15,7 C14.4871642,7 14.0644928,6.61395981 14.0067277,6.11662113 L14,6 C14,5.48716416 14.3860402,5.06449284 14.8833789,5.00672773 L15,5 L17,5 L17,3 C17,2.48716416 17.3860402,2.06449284 17.8833789,2.00672773 L18,2 L17.8833789,2.00672773 Z",id:"🎨-Color"}))))};const dm=function(){return l.createElement("svg",{width:"685",height:"497",viewBox:"0 0 685 497",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("circle",{cx:"285.5",cy:"146.5",r:"56",stroke:"black",strokeWidth:"23"}),l.createElement("rect",{x:"12.5",y:"12.5",width:"660",height:"472",rx:"28.5",stroke:"black",strokeWidth:"25"}),l.createElement("path",{d:"M13 316L126.663 218.694C138.981 208.149 157.344 208.878 168.787 220.366L275.5 327.5M275.5 327.5L124 482M275.5 327.5L467.765 137.481C479.819 125.568 499.206 125.542 511.29 137.424L668 291.5",stroke:"black",strokeWidth:"24"}))};const fm=function(){return l.createElement("svg",{width:"247",height:"244",viewBox:"0 0 247 244",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},l.createElement("path",{d:"M96.5 82.3859V64.1552C96.5 62.5745 94.7528 61.6186 93.4216 62.4708L2.92164 120.41C2.34739 120.778 2 121.412 2 122.094V138.41C2 139.977 3.72032 140.935 5.0527 140.11L95.5527 84.0864C96.1416 83.7218 96.5 83.0785 96.5 82.3859Z",fill:"black",stroke:"black",strokeWidth:"3"}),l.createElement("rect",{x:"18",y:"86",width:"19",height:"155",rx:"2",fill:"black"}),l.createElement("rect",{x:"168",y:"153",width:"19",height:"88",rx:"2",fill:"black"}),l.createElement("rect",{x:"74",y:"153",width:"57",height:"91",fill:"black"}),l.createElement("rect",{x:"18",y:"225",width:"169",height:"19",rx:"2",fill:"black"}),l.createElement("rect",{x:"79",width:"168",height:"168",fill:"url(#pattern0_85_1450)"}),l.createElement("defs",null,l.createElement("pattern",{id:"pattern0_85_1450",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},l.createElement("use",{xlinkHref:"#image0_85_1450",transform:"scale(0.0104167)"})),l.createElement("image",{id:"image0_85_1450",width:"96",height:"96",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFJUlEQVR4nO2dXWhdRRCAP6VKK4lCFIuKtD4E/0CrVlIQfTCgYFMFqxR8qIrFRkEtNCAKkoCCkkr9BRHqU6u+iYXWB32xoCAiSEK1FVuqBkGkqTZgtTa9KwsTkEvu3b33ntmz52Q+mJeQ3Z2duWfP7uzsHjAMwzAMwzAMwzAMwzCMPFgGDAFbgElgLzANHAVOAKdFTsjfpuV/JqXMkNRhdMBqYAzYD8wBrkeZk7rGpG5jEfrlF3sAaBRg9FbSkDZ8W33mCbgQeBaYVTR6KzkJvAIMLEVHrAAmChpiihiiJkSnJcEwcDgDw7sm8S/x9dR8nN+TgaFdQPaIrrXiOuBgBsZ1kfIDsIaa8ADwt4KRRpvaWVtw/V7njVScR4EzSr/SUWUHeJkHnqCiPK88TIwmcMCCPEfF2KpsfJfYAV6epiLcJ49u3RxwFniQzFmj9MJ1GTjASd9uJFP6Zfqm1fl/JdLpX+w3LBLlvBR4HfhK+Qk8nGscSWuRNQ+8DazsQJergDeBf5R08n3NivVKHZ0BbulxSPxeSbdswhYrJI5SdAe/Ay4vQL+LgG8U9DuaSwBvQqFzfwKDBep4CfCLgp6+76UyoBRS3lqRYXKu7P2EcYVO/QYsj2h7BHgV2Ak8ApwfUeZTBX29DUqbdmrsZL0R0fYLi5T7PMIJGxT0nS1rWrpFoTMuYrXpjfxHi7J+470d5wLHFXT2tkjOASUHDAbavatN2SMRen+koLN/+pKyWjF7YSDQ9jOB8n4R1o7tCjp7W6wiIWNKxncRiVSTgfL3BMpvUtLbOzYZnyg6oL9H528OlL9TSe99JGKZcjrJlYH2rw+U/1lWvq3kkJLec6nSIIcUje+A2yJ00Irv9CreNpWdfroOxtLHMjB2adPRHcqd2B+pxzblPNJuxE8Q1NmbYOtvMFIXv7L9PQPDL4i3jTrTCTryQQf6XCYzEJeBTJGAn0ra843ZfHkXOFWiA46RgFSp5PPAk13od4U4QishrJ34OJM6pxN36rUud558PurXiXX1tqmdA5xkItzeha7nRYQuKueAMk6zOJHPgJsy2TgqbQhK9RJ2LaQhjvBT0HM60HtXXV7CKaahLlKm5cRNDMsT6D5Vh4WY6+KJ2CG7XZQUik66ENMORbgu5X156bbDRyt/rXooQjsY53oQv1kf4sOqB+O0w9GuB5mNSGnZVvVwtNaGzAzweBt5MbKeOwL631/1DRmtLcljgTaviazn4UA9w1XfktTalD8ZkWTbKMAB6+qwKa+RltIALgi0G5OFHVoX3F2HtBStxKzhQJsvB8r/FZFV8VAdErO0pqMTgTYHAmnmfo0SYrIuqYkaybkHI+I7N7fI74xJzvV8WZfkXK0o40hEuxfLjtlOkc0Rq2DP1bLnXIv0dK0DGt9Gng/ohvfqdkBD64jSLgU9NyjM3Er99Wsf0nupQB1vbXOmoFs5ovikZnNM9a0COrlJpqe1PaaqfVD7Rxk+YuL9/+daxXyh3WRIn/JVBTNyy+GIJGMtNhSuk1tNvliKVxUgF1mkuqyjmXcStHlK7qnImnsTXVeT2gFn5fq1SpDiwqbUDniKiqF9ZVlKB1TuyrIUl/alcMB8F0nC2bFR6cWs7YBaXFu5gF3cmgFVubp4d87z/CIYVjwq6nqQ2l/e3bxqHc/o+vrxnAJrZXzA4XgJhl/SH3Bops8+YZIPqyTHpsiP+OyTOpOnjtTtM1YfSw5+q89YTcn/2GesDMMwDMMwDMMwDMMwDHLjP0UDH7djTjxQAAAAAElFTkSuQmCC"})))};var pm=a(70490),hm={};hm.styleTagTransform=pc(),hm.setAttributes=sc(),hm.insert=lc().bind(null,"head"),hm.domAPI=oc(),hm.insertStyleElement=dc();rc()(pm.A,hm);pm.A&&pm.A.locals&&pm.A.locals;function Cm(){return Cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(null,arguments)}var Am={name:"CustomAddOns",Tab:(0,mC.observer)((function(e){return l.createElement(AC.SectionTab,Cm({name:"Add On's"},e,{iconSize:20}),l.createElement(um,null))})),Panel:(0,mC.observer)((function(e){var t=e.store,n=lt(),r=(Qr()?Pr:Dr)+"/default_images/dummyGSV.png",a=function(e,a,o){var i;e.preventDefault();var l,c=t.activePage.toJSON();null!=c&&null!==(i=c.children)&&void 0!==i&&i.length&&c.children.find((function(e){return e.id==="gsv-image_".concat(t.activePage.id)}))?n(uh(xa.GSV_RESTRICT_ONE_PER_PAGE)):"gsv"===o?null===(l=t.activePage)||void 0===l||l.addElement({id:"gsv-image_".concat(t.activePage.id),type:"image",src:r,width:287,height:188,contentEditable:!1,keepRatio:!0,opacity:1,custom:{elementType:a}}):"epo"===o&&t.activePage.addElement({type:"text",x:100,y:100,text:a,width:150,contentEditable:!1})};return l.createElement("div",{className:"dynamic-content"},l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Optional Add-On's")," ",l.createElement(TA,{fill:"var(--primary-color)",className:"infoIcon"}),l.createElement(VA,{anchorSelect:".infoIcon",place:"bottom",title:"Google Street View is a technology featured in Google Maps and Google Earth that provides interactive panoramas from positions along many streets in the world."}))),l.createElement("div",{className:"addonBox",onClick:function(e){return a(e,"GOOGLE_STREET_VIEW","gsv")}},l.createElement(dm,null),l.createElement(Ac,null,"Street View Property Image"),l.createElement(Ac,null,"+$0.02 per mail piece")),l.createElement("div",{className:"hidden-important addonBox",onClick:function(e){return a(e,"{{EST.PROP.OFFER}}","epo")}},l.createElement(fm,null),l.createElement(Ac,null,"Estimated Property Offer"),l.createElement(Ac,null,"+$0.02 per mail piece")))}))};const mm=Am;var vm=a(87583),gm=a(93120);const ym=function(){return l.createElement("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",version:"1.1",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{fill:"#000000",d:"M5 1h-4v4h4v-4zM6 0v0 6h-6v-6h6zM2 2h2v2h-2zM15 1h-4v4h4v-4zM16 0v0 6h-6v-6h6zM12 2h2v2h-2zM5 11h-4v4h4v-4zM6 10v0 6h-6v-6h6zM2 12h2v2h-2zM7 0h1v1h-1zM8 1h1v1h-1zM7 2h1v1h-1zM8 3h1v1h-1zM7 4h1v1h-1zM8 5h1v1h-1zM7 6h1v1h-1zM7 8h1v1h-1zM8 9h1v1h-1zM7 10h1v1h-1zM8 11h1v1h-1zM7 12h1v1h-1zM8 13h1v1h-1zM7 14h1v1h-1zM8 15h1v1h-1zM15 8h1v1h-1zM1 8h1v1h-1zM2 7h1v1h-1zM0 7h1v1h-1zM4 7h1v1h-1zM5 8h1v1h-1zM6 7h1v1h-1zM9 8h1v1h-1zM10 7h1v1h-1zM11 8h1v1h-1zM12 7h1v1h-1zM13 8h1v1h-1zM14 7h1v1h-1zM15 10h1v1h-1zM9 10h1v1h-1zM10 9h1v1h-1zM11 10h1v1h-1zM13 10h1v1h-1zM14 9h1v1h-1zM15 12h1v1h-1zM9 12h1v1h-1zM10 11h1v1h-1zM12 11h1v1h-1zM13 12h1v1h-1zM14 11h1v1h-1zM15 14h1v1h-1zM10 13h1v1h-1zM11 14h1v1h-1zM12 13h1v1h-1zM13 14h1v1h-1zM10 15h1v1h-1zM12 15h1v1h-1zM14 15h1v1h-1z"}))};function bm(e){return bm="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},bm(e)}function Lm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Lm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==bm(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(bm(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function Em(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function wm(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Em(o,r,a,i,l,"next",e)}function l(e){Em(o,r,a,i,l,"throw",e)}i(void 0)}))}}function zm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(null,arguments)}var Hm={name:"QR-Section",Tab:function(e){return l.createElement(AC.SectionTab,Sm({name:"QR"},e,{iconSize:20}),l.createElement(ym,null))},Panel:(0,mC.observer)((function(e){var t=e.store,n=zm((0,l.useState)(""),2),r=n[0],a=n[1],o=t.selectedElements[0],i="qr"===(null==o?void 0:o.name),c=lt(),s=function(){t.selectElements([]),a("")},u=function(e){return new Promise((function(t){vm.toString(e||"no-data",{type:"svg",color:{dark:"#000000",light:"#0000"}},(function(e,n){t(gm.svgToURL(n))}))}))},d=function(){var e=wm(Lm().mark((function e(){var n,a;return Lm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=13;break}if(!Zr(r)){e.next=10;break}return n=Math.random().toString(36).substring(2,7),e.next=5,u(r);case 5:a=e.sent,t.activePage.addElement({id:"qr-".concat(n),type:"svg",name:"qr",x:50,y:50,width:100,height:100,keepRatio:!0,src:a,custom:{value:r}}),s(),e.next=11;break;case 10:c(uh(xa.QR_SECTION.INVALID_URL));case 11:e.next=14;break;case 13:c(uh(xa.QR_SECTION.EMPTY_QR));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),f=function(){var e=wm(Lm().mark((function e(){return Lm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("qr"!==(null==o?void 0:o.name)||!r){e.next=10;break}if(!Zr(r)){e.next=7;break}return e.next=4,u(r).then((function(e){o.set({src:e,custom:{value:r}})}));case 4:s(),e.next=8;break;case 7:c(uh(xa.QR_SECTION.INVALID_URL));case 8:e.next=11;break;case 10:c(uh(xa.QR_SECTION.EMPTY_QR));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){"qr"===(null==o?void 0:o.name)?a(null==o?void 0:o.custom.value):a("")}),[i,o]),l.createElement("div",null,l.createElement(Gp,{type:"text",onChange:function(e){a(e.target.value)},placeholder:xa.QR_SECTION.QR_PLACEHOLDER,value:r}),l.createElement(XA.$,{onClick:i?f:d,style:{width:"100%",padding:"5px",marginTop:"10px",backgroundColor:"#f6f7f9",boxShadow:"inset 0 0 0 1px #11141833,0 1px 2px #1114181a",color:"#1c2127"}},i?xa.QR_SECTION.UPDATE_BUTTON:xa.QR_SECTION.SUBMIT_BUTTON))}))};const Rm=Hm;function xm(e){return xm="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},xm(e)}function Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vm.apply(null,arguments)}function Tm(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 Nm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(n),!0).forEach((function(t){Om(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Om(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=xm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pm(e){return function(e){if(Array.isArray(e))return Dm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Dm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dm(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const km=function(e){var t="Real Penned Letter"===e.currentTemplateType?AC.DEFAULT_SECTIONS.filter((function(e){return""===e.name})):AC.DEFAULT_SECTIONS.filter((function(e){return!["photos","size","templates"].includes(e.name)}));return l.createElement(ah.SidePanelWrap,null,l.createElement(AC.SidePanel,{store:e.store,sections:[].concat(Pm("Real Penned Letter"!==e.currentTemplateType?[Nm(Nm(Nm({},rA),sm),{},{Panel:function(t){return l.createElement(rA.Panel,Vm({},t,{platformName:e.platformName,templateGalleryModal:e.templateGalleryModal,onGetTemplates:e.onGetTemplates,onGetOneTemplate:e.onGetOneTemplate,selectedSection:e.selectedSection}))}})]:[]),Pm(t),[Nm(Nm(Nm({},QA),sm),{},{Panel:function(t){return l.createElement(QA.Panel,Vm({},t,{onGetCustomFields:e.onGetCustomFields,allowSenderFields:e.allowSenderFields,excludedFields:e.excludedFields,allowPropertyFields:e.allowPropertyFields}))}})],Pm("Real Penned Letter"!==e.currentTemplateType?[Nm(Nm({},Rm),{},{Panel:function(e){return l.createElement(Rm.Panel,e)}}),Nm(Nm({},mm),{},{Panel:function(e){return l.createElement(mm.Panel,e)}})]:[])),defaultSection:"text"}))};var Bm=a(22995),Im={};Im.styleTagTransform=pc(),Im.setAttributes=sc(),Im.insert=lc().bind(null,"head"),Im.domAPI=oc(),Im.insertStyleElement=dc();rc()(Bm.A,Im);Bm.A&&Bm.A.locals&&Bm.A.locals;function Fm(e){return Fm="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},Fm(e)}function Gm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Gm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==Fm(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Fm(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function jm(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Um(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){jm(o,r,a,i,l,"next",e)}function l(e){jm(o,r,a,i,l,"throw",e)}i(void 0)}))}}function qm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Ym=function(e){var t=e.store,n=e.onReturnAndNavigate,r=e.platformName,a=e.templateGalleryModal,o=e.createTemplateRoute,i=e.olcTemplate,c=e.allowSenderFields,s=e.excludedFields,u=e.allowPropertyFields,d=e.onGetOneTemplate,f=e.onGetCustomFields,p=e.onGetTemplates,h=e.onSubmit,C=qm((0,l.useState)(!1),2),A=C[0],m=C[1],v=qm((0,l.useState)(1),2),g=v[0],y=v[1],b=qm((0,l.useState)("text"),2),L=b[0],E=b[1],w=ie().id,z=lt(),M=oe(),S=(Ke((function(e){return e.templates.template})),Ke((function(e){return e.templates.product}))),H=Ke((function(e){return e.templates.envelopeType})),R=null==S?void 0:S.productType;(0,l.useEffect)((function(){i&&N()}),[i]),(0,l.useEffect)((function(){var e=function(){document.hidden&&y((function(e){return e+1}))},n=function(e){e.target instanceof Element&&e.target.closest(".polotno-side-tabs-container")&&"Templates"!==(null==t?void 0:t.openedSidePanel)&&E(null==t?void 0:t.openedSidePanel)};return document.addEventListener("click",n),document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e),document.removeEventListener("click",n)}}),[]),(0,l.useEffect)((function(){S||i||w||M(o||"/create-template")}),[]),(0,l.useEffect)((function(){if(S||w&&d){if((0,ch.O3)(vh),w&&d)try{d(w).then((function(e){var n;e?(z({type:ar,payload:{data:e}}),Va(null==e||null===(n=e.product)||void 0===n?void 0:n.id,t),z({type:or,payload:!0})):(z(uh("Unable to load the Template")),setTimeout((function(){M(o||"/create-template")}),1e3))}))}catch(e){return e}finally{z({type:or,payload:!1})}else 0!==t.pages.length||i||V();x();var e=t.on("change",(function(){A||m(!0)}));return function(){t.history.clear(),t.clear(),e()}}}),[]),(0,l.useEffect)((function(){w||i||!S||0!==t.pages.length||V()}),[S]),(0,l.useEffect)((function(){var e=function(e){var t="Are you sure you want to leave?";return e.returnValue=t,t};return A&&(window.removeEventListener("beforeunload",e),window.addEventListener("beforeunload",e)),function(){window.removeEventListener("beforeunload",e)}}),[A]);var x=function(){var e=Um(Gm().mark((function e(){var t;return Gm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=5;break}return e.next=3,f();case 3:null!=(t=e.sent)&&t.length&&z({type:hr,payload:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=function(){var e=Um(Gm().mark((function e(){var n,r;return Gm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:S&&(t.addPage(),r=null==S||null===(n=S.selectedSize)||void 0===n?void 0:n.split("x"),t.setUnit({unit:"in",dpi:kr}),t.setSize(+r[1]*kr,+r[0]*kr),Br.includes(S.productType)&&(t.addPage(),t.selectPage(t.pages[0].id)),qa(t,S,H),Ah(S.id,t),"Real Penned Letter"===R&&T(),t.history.clear()),m(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=Um(Gm().mark((function e(){var n,r,a;return Gm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.addFont({fontFamily:"lexi Regular",url:gh}),mh(t),e.next=5,fetch(gh);case 5:return n=e.sent,e.next=8,n.blob();case 8:r=e.sent,(a=new FileReader).onloadend=function(){t.addFont({fontFamily:"lexi Regular",url:a.result})},a.readAsDataURL(r),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.error("Error loading the font file:",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=Um(Gm().mark((function e(){var n,r,a,o,l,c,s,u;return Gm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=i)){e.next=19;break}return z({type:ar,payload:{data:n}}),(l=document.querySelector(".polotno-workspace-container"))&&l.classList.add("show-loader"),c=null==n||null===(r=n.product)||void 0===r?void 0:r.paperSize.split("x"),t.setUnit({unit:"in",dpi:96}),t.setSize(+c[1]*kr,+c[0]*kr),e.next=10,Fa(null==n?void 0:n.templateUrl);case 10:return s=e.sent,"Real Penned Letter"===(null==n||null===(a=n.product)||void 0===a?void 0:a.productType)&&(u=JSON.stringify(s).replace(/{{/g,"((").replace(/}}/g,"))"),s=JSON.parse(u)),t.loadJSON(s),e.next=15,t.waitLoading();case 15:m(!1),Va(null==n||null===(o=n.product)||void 0===o?void 0:o.id,t),z({type:or,payload:!1}),l&&l.classList.add("hide-loader");case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return l.createElement(l.Fragment,null,l.createElement(Ac,{className:"hideTemplateBuilder"},Ha),l.createElement("div",{className:"polotno-container"},g>0&&l.createElement("div",{className:"builder-wrapper"},l.createElement(CC,{store:t,isStoreUpdated:A,olcTemplate:i,onReturnAndNavigate:n,onSubmit:h}),l.createElement(ah.PolotnoContainer,{style:{width:"100vw",height:"90vh",position:"relative"}},l.createElement(km,{store:t,currentTemplateType:R,platformName:r,templateGalleryModal:a,allowSenderFields:c,allowPropertyFields:u,excludedFields:s,onGetTemplates:p,onGetOneTemplate:d,onGetCustomFields:f,selectedSection:L}),l.createElement(ah.WorkspaceWrap,null,"Real Penned Letter"!==R&&l.createElement(oh.Toolbar,{store:t,downloadButtonEnabled:!1}),"Real Penned Letter"!==R?l.createElement(lh.Workspace,{store:t,pageControlsEnabled:!1}):l.createElement(lh.Workspace,{store:t,pageControlsEnabled:!1,components:{Tooltip:function(){return null}}}),l.createElement(ih.ZoomButtons,{store:t}))),l.createElement(Mp,null))))};var Qm,Zm;function Xm(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Km(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _m=function(e){return(0,Or.createStore)({key:e,showCredit:!1})};const $m=function(e){var t,n=e.secretKey,r=e.platformName,a=e.templateGalleryModal,o=e.createTemplateRoute,i=e.templateBuilderRoute,c=e.olcTemplate,s=e.allowSenderFields,u=e.excludedFields,d=e.allowPropertyFields,f=e.styles,p=e.onReturnAndNavigate,h=e.onGetOneTemplate,C=e.onGetCustomFields,A=e.onGetTemplates,m=e.onSubmit,v=Km((0,l.useState)(_m(n)),2),g=v[0],y=v[1],b=null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.pathname;(0,l.useEffect)((function(){if(b===o||"/create-template"===b){var e=_m(n);y(e)}}),[b]);var L=f&&Object.keys(f).length?ql(Qm||(Qm=Xm(["\n :root {\n ","\n }\n "])),f?Object.entries(f.root).map((function(e){var t=Km(e,2),n=t[0],r=t[1];return"".concat(n,": ").concat(r,";")})).join(" "):""):ql(Zm||(Zm=Xm(["<></>"])));return l.createElement("div",{className:"builder-wrapper"},l.createElement(Mp,null),l.createElement(L,null),l.createElement(Le,null,l.createElement(ye,{path:o||"/create-template",element:l.createElement(rh,{createTemplateRoute:o,templateBuilderRoute:i,onReturnAndNavigate:p})}),l.createElement(ye,{path:i||"/template-builder/:id?",element:l.createElement(Ym,{store:g,olcTemplate:c,platformName:r,templateGalleryModal:a,allowSenderFields:s,excludedFields:u,allowPropertyFields:d,createTemplateRoute:o,onReturnAndNavigate:p,onGetOneTemplate:h,onGetTemplates:A,onGetCustomFields:C,onSubmit:m})})))};var ev=a(10002),tv={};tv.styleTagTransform=pc(),tv.setAttributes=sc(),tv.insert=lc().bind(null,"head"),tv.domAPI=oc(),tv.insertStyleElement=dc();rc()(ev.A,tv);ev.A&&ev.A.locals&&ev.A.locals;var nv=a(75487),rv={};rv.styleTagTransform=pc(),rv.setAttributes=sc(),rv.insert=lc().bind(null,"head"),rv.domAPI=oc(),rv.insertStyleElement=dc();rc()(nv.A,rv);nv.A&&nv.A.locals&&nv.A.locals;var av=a(88498),ov={};ov.styleTagTransform=pc(),ov.setAttributes=sc(),ov.insert=lc().bind(null,"head"),ov.domAPI=oc(),ov.insertStyleElement=dc();rc()(av.A,ov);av.A&&av.A.locals&&av.A.locals;var iv=a(60137),lv={};lv.styleTagTransform=pc(),lv.setAttributes=sc(),lv.insert=lc().bind(null,"head"),lv.domAPI=oc(),lv.insertStyleElement=dc();rc()(iv.A,lv);iv.A&&iv.A.locals&&iv.A.locals;var cv=a(72804),sv={};sv.styleTagTransform=pc(),sv.setAttributes=sc(),sv.insert=lc().bind(null,"head"),sv.domAPI=oc(),sv.insertStyleElement=dc();rc()(cv.A,sv);cv.A&&cv.A.locals&&cv.A.locals;const uv=function(e){var t=e.container,n=e.secretKey,r=e.publicApiKey,a=e.platformName,o=e.templateGalleryModal,i=void 0===o||o,c=e.createTemplateRoute,u=e.templateBuilderRoute,d=e.olcTemplate,f=e.sandbox,p=e.allowSenderFields,h=e.allowPropertyFields,C=e.excludedFields,A=e.onReturnAndNavigate,m=e.onGetOneTemplate,v=e.onGetTemplates,g=e.onGetCustomFields,y=e.onSubmit,b=e.styles;if(!t)throw new Error("Root element not found");if(!n)throw new Error("secretKey not found");if(!r)throw new Error("publicApiKey not found");f&&function(e){qr=e}(f),Yr(r);var L=s.createRoot(t);return L.render(l.createElement(l.Fragment,null,l.createElement(rt,{store:Nr},l.createElement(xe,null,l.createElement($m,{secretKey:n,styles:b,olcTemplate:d,platformName:a,templateGalleryModal:i,createTemplateRoute:c,templateBuilderRoute:u,allowSenderFields:p,allowPropertyFields:h,excludedFields:C,onReturnAndNavigate:A,onGetOneTemplate:m,onGetTemplates:v,onGetCustomFields:g,onSubmit:y}))))),{destroy:function(){console.log("React template builder destroyed"),L.unmount()}}};var dv=o.A;export{dv as default};
600
+ const oA="react-tooltip-core-styles",iA="react-tooltip-base-styles",lA={core:!1,base:!1};function cA({css:e,id:t=iA,type:n="base",ref:r}){var a,o;if(!e||"undefined"==typeof document||lA[n])return;if("core"===n&&"undefined"!=typeof process&&(null===(a=null===process||void 0===process?void 0:process.env)||void 0===a?void 0:a.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==n&&"undefined"!=typeof process&&(null===(o=null===process||void 0===process?void 0:process.env)||void 0===o?void 0:o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===n&&(t=oA),r||(r={});const{insertAt:i}=r;if(document.getElementById(t))return;const l=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.id=t,c.type="text/css","top"===i&&l.firstChild?l.insertBefore(c,l.firstChild):l.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.appendChild(document.createTextNode(e)),lA[n]=!0}const sA=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:a=10,strategy:o="absolute",middlewares:i=[Ju(Number(a)),$u({fallbackAxisSideDirection:"start"}),_u({padding:5})],border:l})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=i;return n?(c.push(ed({element:n,padding:5})),td(e,t,{placement:r,strategy:o,middleware:c}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var a,o;const i={left:`${e}px`,top:`${t}px`,border:l},{x:c,y:s}=null!==(a=r.arrow)&&void 0!==a?a:{x:0,y:0},u=null!==(o={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==o?o:"bottom",d=l&&{borderBottom:l,borderRight:l};let f=0;if(l){const e=`${l}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):td(e,t,{placement:"bottom",strategy:o,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})))},uA=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),dA=(e,t,n)=>{let r=null;const a=function(...a){const o=()=>{r=null,n||e.apply(this,a)};n&&!r&&(e.apply(this,a),r=setTimeout(o,t)),n||(r&&clearTimeout(r),r=setTimeout(o,t))};return a.cancel=()=>{r&&(clearTimeout(r),r=null)},a},fA=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,pA=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>pA(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!fA(e)||!fA(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>pA(e[n],t[n])))},hA=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},CA=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(hA(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},AA="undefined"!=typeof window?l.useLayoutEffect:l.useEffect,mA=e=>{e.current&&(clearTimeout(e.current),e.current=null)},vA="DEFAULT_TOOLTIP_ID",gA={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},yA=(0,l.createContext)({getTooltipData:()=>gA});function bA(e=vA){return(0,l.useContext)(yA).getTooltipData(e)}var LA={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},EA={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const wA=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:a="dark",anchorId:o,anchorSelect:i,place:c="top",offset:s=10,events:u=["hover"],openOnClick:d=!1,positionStrategy:f="absolute",middlewares:p,wrapper:h,delayShow:C=0,delayHide:A=0,float:m=!1,hidden:v=!1,noArrow:g=!1,clickable:y=!1,closeOnEsc:b=!1,closeOnScroll:L=!1,closeOnResize:E=!1,openEvents:w,closeEvents:z,globalCloseEvents:M,imperativeModeOnly:S,style:H,position:R,afterShow:x,afterHide:V,disableTooltip:T,content:N,contentWrapperRef:O,isOpen:P,defaultIsOpen:D=!1,setIsOpen:k,activeAnchor:B,setActiveAnchor:I,border:F,opacity:G,arrowColor:j,role:U="tooltip"})=>{var q;const W=(0,l.useRef)(null),Y=(0,l.useRef)(null),Q=(0,l.useRef)(null),Z=(0,l.useRef)(null),X=(0,l.useRef)(null),[K,J]=(0,l.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:c}),[_,$]=(0,l.useState)(!1),[ee,te]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(null),ae=(0,l.useRef)(!1),oe=(0,l.useRef)(null),{anchorRefs:ie,setActiveAnchor:le}=bA(t),ce=(0,l.useRef)(!1),[se,ue]=(0,l.useState)([]),de=(0,l.useRef)(!1),fe=d||u.includes("click"),pe=fe||(null==w?void 0:w.click)||(null==w?void 0:w.dblclick)||(null==w?void 0:w.mousedown),he=w?{...w}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!w&&fe&&Object.assign(he,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=z?{...z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!z&&fe&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const Ae=M?{...M}:{escape:b||!1,scroll:L||!1,resize:E||!1,clickOutsideAnchor:pe||!1};S&&(Object.assign(he,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ae,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),AA((()=>(de.current=!0,()=>{de.current=!1})),[]);const me=e=>{de.current&&(e&&te(!0),setTimeout((()=>{de.current&&(null==k||k(e),void 0===P&&$(e))}),10))};(0,l.useEffect)((()=>{if(void 0===P)return()=>null;P&&te(!0);const e=setTimeout((()=>{$(P)}),10);return()=>{clearTimeout(e)}}),[P]),(0,l.useEffect)((()=>{if(_!==ae.current)if(mA(X),ae.current=_,_)null==x||x();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,n,r]=t;return Number(n)*("ms"===r?1:1e3)})();X.current=setTimeout((()=>{te(!1),re(null),null==V||V()}),e+25)}}),[_]);const ve=e=>{J((t=>pA(t,e)?t:e))},ge=(e=C)=>{mA(Q),ee?me(!0):Q.current=setTimeout((()=>{me(!0)}),e)},ye=(e=A)=>{mA(Z),Z.current=setTimeout((()=>{ce.current||me(!1)}),e)},be=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return I(null),void le({current:null});C?ge():me(!0),I(n),le({current:n}),mA(Z)},Le=()=>{y?ye(A||100):A?ye():me(!1),mA(Q)},Ee=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};sA({place:null!==(n=null==ne?void 0:ne.place)&&void 0!==n?n:c,offset:s,elementReference:r,tooltipReference:W.current,tooltipArrowReference:Y.current,strategy:f,middlewares:p,border:F}).then((e=>{ve(e)}))},we=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Ee(n),oe.current=n},ze=e=>{var t;if(!_)return;const n=e.target;n.isConnected&&((null===(t=W.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${o}']`),...se].some((e=>null==e?void 0:e.contains(n)))||(me(!1),mA(Q)))},Me=dA(be,50,!0),Se=dA(Le,50,!0),He=e=>{Se.cancel(),Me(e)},Re=()=>{Me.cancel(),Se()},xe=(0,l.useCallback)((()=>{var e,t;const n=null!==(e=null==ne?void 0:ne.position)&&void 0!==e?e:R;n?Ee(n):m?oe.current&&Ee(oe.current):(null==B?void 0:B.isConnected)&&sA({place:null!==(t=null==ne?void 0:ne.place)&&void 0!==t?t:c,offset:s,elementReference:B,tooltipReference:W.current,tooltipArrowReference:Y.current,strategy:f,middlewares:p,border:F}).then((e=>{de.current&&ve(e)}))}),[_,B,N,H,c,null==ne?void 0:ne.place,s,f,R,null==ne?void 0:ne.position,m]);(0,l.useEffect)((()=>{var e,t;const n=new Set(ie);se.forEach((e=>{(null==T?void 0:T(e))||n.add({current:e})}));const r=document.querySelector(`[id='${o}']`);r&&!(null==T?void 0:T(r))&&n.add({current:r});const a=()=>{me(!1)},i=CA(B),l=CA(W.current);Ae.scroll&&(window.addEventListener("scroll",a),null==i||i.addEventListener("scroll",a),null==l||l.addEventListener("scroll",a));let c=null;Ae.resize?window.addEventListener("resize",a):B&&W.current&&(c=Ku(B,W.current,xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const s=e=>{"Escape"===e.key&&me(!1)};Ae.escape&&window.addEventListener("keydown",s),Ae.clickOutsideAnchor&&window.addEventListener("click",ze);const u=[],d=e=>{_&&(null==e?void 0:e.target)===B||be(e)},f=e=>{_&&(null==e?void 0:e.target)===B&&Le()},p=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(he).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:He}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ce).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:Re}):h.includes(e)&&u.push({event:e,listener:f}))})),m&&u.push({event:"pointermove",listener:we});const C=()=>{ce.current=!0},A=()=>{ce.current=!1,Le()};return y&&!pe&&(null===(e=W.current)||void 0===e||e.addEventListener("mouseenter",C),null===(t=W.current)||void 0===t||t.addEventListener("mouseleave",A)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Ae.scroll&&(window.removeEventListener("scroll",a),null==i||i.removeEventListener("scroll",a),null==l||l.removeEventListener("scroll",a)),Ae.resize?window.removeEventListener("resize",a):null==c||c(),Ae.clickOutsideAnchor&&window.removeEventListener("click",ze),Ae.escape&&window.removeEventListener("keydown",s),y&&!pe&&(null===(e=W.current)||void 0===e||e.removeEventListener("mouseenter",C),null===(t=W.current)||void 0===t||t.removeEventListener("mouseleave",A)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[B,xe,ee,ie,se,w,z,M,fe,C,A]),(0,l.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ne?void 0:ne.anchorSelect)&&void 0!==e?e:i)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const a=new MutationObserver((e=>{const n=[],a=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&a.push(e.target)),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{a.push(...t.filter((e=>e.matches(r)))),a.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(te(!1),me(!1),I(null),mA(Q),mA(Z),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||a.length)&&ue((e=>[...e.filter((e=>!a.includes(e))),...n]))}));return a.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{a.disconnect()}}),[t,i,null==ne?void 0:ne.anchorSelect,B]),(0,l.useEffect)((()=>{xe()}),[xe]),(0,l.useEffect)((()=>{if(!(null==O?void 0:O.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>xe()))}));return e.observe(O.current),()=>{e.disconnect()}}),[N,null==O?void 0:O.current]),(0,l.useEffect)((()=>{var e;const t=document.querySelector(`[id='${o}']`),n=[...se,t];B&&n.includes(B)||I(null!==(e=se[0])&&void 0!==e?e:t)}),[o,se,B]),(0,l.useEffect)((()=>(D&&me(!0),()=>{mA(Q),mA(Z)})),[]),(0,l.useEffect)((()=>{var e;let n=null!==(e=null==ne?void 0:ne.anchorSelect)&&void 0!==e?e:i;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ue(e)}catch(e){ue([])}}),[t,i,null==ne?void 0:ne.anchorSelect]),(0,l.useEffect)((()=>{Q.current&&(mA(Q),ge(C))}),[C]);const Ve=null!==(q=null==ne?void 0:ne.content)&&void 0!==q?q:N,Te=_&&Object.keys(K.tooltipStyles).length>0;return(0,l.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}re(null!=e?e:null),(null==e?void 0:e.delay)?ge(e.delay):me(!0)},close:e=>{(null==e?void 0:e.delay)?ye(e.delay):me(!1)},activeAnchor:B,place:K.place,isOpen:Boolean(ee&&!v&&Ve&&Te)}))),ee&&!v&&Ve?l.createElement(h,{id:t,role:U,className:aA("react-tooltip",LA.tooltip,EA.tooltip,EA[a],n,`react-tooltip__place-${K.place}`,LA[Te?"show":"closing"],Te?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&LA.fixed,y&&LA.clickable),onTransitionEnd:e=>{mA(X),_||"opacity"!==e.propertyName||(te(!1),re(null),null==V||V())},style:{...H,...K.tooltipStyles,opacity:void 0!==G&&Te?G:void 0},ref:W},Ve,l.createElement(h,{className:aA("react-tooltip-arrow",LA.arrow,EA.arrow,r,g&&LA.noArrow),style:{...K.tooltipArrowStyles,background:j?`linear-gradient(to right bottom, transparent 50%, ${j} 50%)`:void 0},ref:Y})):null},zA=({content:e})=>l.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),MA=l.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:a,render:o,className:i,classNameArrow:c,variant:s="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:C=!1,positionStrategy:A="absolute",middlewares:m,delayShow:v=0,delayHide:g=0,float:y=!1,hidden:b=!1,noArrow:L=!1,clickable:E=!1,closeOnEsc:w=!1,closeOnScroll:z=!1,closeOnResize:M=!1,openEvents:S,closeEvents:H,globalCloseEvents:R,imperativeModeOnly:x=!1,style:V,position:T,isOpen:N,defaultIsOpen:O=!1,disableStyleInjection:P=!1,border:D,opacity:k,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:G,disableTooltip:j,role:U="tooltip"},q)=>{const[W,Y]=(0,l.useState)(r),[Q,Z]=(0,l.useState)(a),[X,K]=(0,l.useState)(u),[J,_]=(0,l.useState)(s),[$,ee]=(0,l.useState)(d),[te,ne]=(0,l.useState)(v),[re,ae]=(0,l.useState)(g),[oe,ie]=(0,l.useState)(y),[le,ce]=(0,l.useState)(b),[se,ue]=(0,l.useState)(f),[de,fe]=(0,l.useState)(h),[pe,he]=(0,l.useState)(A),[Ce,Ae]=(0,l.useState)(null),[me,ve]=(0,l.useState)(null),ge=(0,l.useRef)(P),{anchorRefs:ye,activeAnchor:be}=bA(e),Le=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Ee=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:u)},content:e=>{Y(null!=e?e:r)},html:e=>{Z(null!=e?e:a)},variant:e=>{var t;_(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:A)},"delay-show":e=>{ne(null===e?v:Number(e))},"delay-hide":e=>{ae(null===e?g:Number(e))},float:e=>{ie(null===e?y:"true"===e)},hidden:e=>{ce(null===e?b:"true"===e)},"class-name":e=>{Ae(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,l.useEffect)((()=>{Y(r)}),[r]),(0,l.useEffect)((()=>{Z(a)}),[a]),(0,l.useEffect)((()=>{K(u)}),[u]),(0,l.useEffect)((()=>{_(s)}),[s]),(0,l.useEffect)((()=>{ee(d)}),[d]),(0,l.useEffect)((()=>{ne(v)}),[v]),(0,l.useEffect)((()=>{ae(g)}),[g]),(0,l.useEffect)((()=>{ie(y)}),[y]),(0,l.useEffect)((()=>{ce(b)}),[b]),(0,l.useEffect)((()=>{he(A)}),[A]),(0,l.useEffect)((()=>{ge.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[P]),(0,l.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}))}),[]),(0,l.useEffect)((()=>{var r;const a=new Set(ye);let o=n;if(!o&&e&&(o=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),o)try{document.querySelectorAll(o).forEach((e=>{a.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&a.add({current:i}),!a.size)return()=>null;const l=null!==(r=null!=me?me:i)&&void 0!==r?r:be.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Le(l);Ee(n)}))})),s={attributes:!0,childList:!1,subtree:!1};if(l){const e=Le(l);Ee(e),c.observe(l,s)}return()=>{c.disconnect()}}),[ye,be,me,t,n]),(0,l.useEffect)((()=>{(null==V?void 0:V.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!uA("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==V?void 0:V.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),k&&!uA("opacity",`${k}`)&&console.warn(`[react-tooltip] "${k}" is not a valid \`opacity\`.`)}),[]);let we=p;const ze=(0,l.useRef)(null);if(o){const e=o({content:(null==me?void 0:me.getAttribute("data-tooltip-content"))||W||null,activeAnchor:me});we=e?l.createElement("div",{ref:ze,className:"react-tooltip-content-wrapper"},e):null}else W&&(we=W);Q&&(we=l.createElement(zA,{content:Q}));const Me={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:aA(i,Ce),classNameArrow:c,content:we,contentWrapperRef:ze,place:X,variant:J,offset:$,wrapper:se,events:de,openOnClick:C,positionStrategy:pe,middlewares:m,delayShow:te,delayHide:re,float:oe,hidden:le,noArrow:L,clickable:E,closeOnEsc:w,closeOnScroll:z,closeOnResize:M,openEvents:S,closeEvents:H,globalCloseEvents:R,imperativeModeOnly:x,style:V,position:T,isOpen:N,defaultIsOpen:O,border:D,opacity:k,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:G,disableTooltip:j,activeAnchor:me,setActiveAnchor:e=>ve(e),role:U};return l.createElement(wA,{...Me})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||cA({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||cA({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));var SA=a(27455),HA={};HA.styleTagTransform=pc(),HA.setAttributes=sc(),HA.insert=lc().bind(null,"head"),HA.domAPI=oc(),HA.insertStyleElement=dc();rc()(SA.A,HA);SA.A&&SA.A.locals&&SA.A.locals;var RA=a(99197),xA={};xA.styleTagTransform=pc(),xA.setAttributes=sc(),xA.insert=lc().bind(null,"head"),xA.domAPI=oc(),xA.insertStyleElement=dc();rc()(RA.A,xA);RA.A&&RA.A.locals&&RA.A.locals;const VA=function(e){var t=e.anchorSelect,n=e.place,r=e.title;return l.createElement(MA,{className:"basic-tooltip",anchorSelect:t,place:n},r)};const TA=function(e){var t=e.className,n=void 0===t?{}:t,r=e.fill;return l.createElement("svg",{width:"12",className:n,height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{clipPath:"url(#clip0_1555_2219)"},l.createElement("path",{d:"M6.80169 8.45472C6.67902 8.46615 6.55586 8.43847 6.44987 8.37562C6.37243 8.29612 6.33531 8.18575 6.34897 8.07562C6.35183 7.98393 6.36278 7.89266 6.38169 7.8029C6.4 7.69991 6.42364 7.59796 6.45259 7.49744L6.77441 6.39015C6.8076 6.28087 6.82954 6.16846 6.83987 6.05469C6.83987 5.93197 6.85623 5.84741 6.85623 5.79833C6.86307 5.57959 6.76968 5.36969 6.60259 5.22833C6.39707 5.07055 6.14113 4.993 5.88259 5.01015C5.69732 5.01294 5.51347 5.04327 5.33713 5.10015C5.1444 5.16015 4.94167 5.23197 4.72895 5.31562L4.63623 5.67561C4.69895 5.65379 4.77533 5.62926 4.86259 5.60197C4.94584 5.57732 5.03214 5.56445 5.11895 5.56379C5.24073 5.5506 5.36331 5.58051 5.46531 5.64833C5.53459 5.731 5.5671 5.83839 5.55531 5.94562C5.555 6.03733 5.54495 6.12876 5.52531 6.21833C5.50621 6.3138 5.48167 6.41469 5.45167 6.52105L5.12713 7.63377C5.10097 7.7372 5.08004 7.84187 5.06441 7.94741C5.05166 8.03776 5.04529 8.12889 5.04531 8.22013C5.04397 8.44037 5.14468 8.64883 5.31803 8.78467C5.52672 8.94491 5.78631 9.02434 6.04893 9.00831C6.23385 9.01211 6.41814 8.98539 6.59439 8.92921C6.74893 8.87647 6.9553 8.80103 7.21349 8.70285L7.30077 8.35921C7.23083 8.38822 7.15881 8.41192 7.08531 8.43011C6.99236 8.45134 6.89692 8.45959 6.80169 8.45472Z",fill:r}),l.createElement("path",{d:"M7.14277 3.20479C6.99434 3.06848 6.79878 2.99514 6.59731 3.00025C6.39596 2.9957 6.20059 3.06897 6.05185 3.20479C5.77923 3.43987 5.74878 3.85145 5.98388 4.1241C6.00484 4.14841 6.02755 4.17112 6.05185 4.19207C6.36244 4.46988 6.83218 4.46988 7.14275 4.19207C7.41537 3.95467 7.44394 3.54123 7.20655 3.26861C7.18681 3.2459 7.16548 3.22457 7.14277 3.20479Z",fill:r}),l.createElement("path",{d:"M6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0ZM6 11.4545C2.98753 11.4545 0.545461 9.01247 0.545461 6C0.545461 2.98753 2.98753 0.545461 6 0.545461C9.01247 0.545461 11.4545 2.98753 11.4545 6C11.4545 9.01247 9.01247 11.4545 6 11.4545Z",fill:r})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1555_2219"},l.createElement("rect",{width:"12",height:"12",fill:"white"}))))};const NA=function(e){var t=e.className,n=void 0===t?{}:t;return l.createElement("svg",{width:"19",className:n,height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M3.5 15.025H3.975V15.5C3.975 16.1697 4.24103 16.8119 4.71456 17.2854C5.18809 17.759 5.83033 18.025 6.5 18.025H15.5C16.1697 18.025 16.8119 17.759 17.2854 17.2854C17.759 16.8119 18.025 16.1697 18.025 15.5V6.5C18.025 5.83033 17.759 5.18809 17.2854 4.71456C16.8119 4.24103 16.1697 3.975 15.5 3.975H15.025V3.5C15.025 2.83033 14.759 2.18808 14.2854 1.71456C13.8119 1.24103 13.1697 0.975 12.5 0.975H3.5C2.83033 0.975 2.18808 1.24103 1.71456 1.71456C1.24103 2.18808 0.975 2.83033 0.975 3.5V12.5C0.975 13.1697 1.24103 13.8119 1.71456 14.2854C2.18808 14.759 2.83033 15.025 3.5 15.025ZM15.5 5.025C15.8912 5.025 16.2664 5.1804 16.543 5.45702C16.8196 5.73363 16.975 6.10881 16.975 6.5V15.5C16.975 15.8912 16.8196 16.2664 16.543 16.543C16.2664 16.8196 15.8912 16.975 15.5 16.975H6.5C6.10881 16.975 5.73363 16.8196 5.45702 16.543C5.1804 16.2664 5.025 15.8912 5.025 15.5V15.025H12.5C13.1697 15.025 13.8119 14.759 14.2854 14.2854C14.759 13.8119 15.025 13.1697 15.025 12.5V5.025H15.5ZM2.025 3.5C2.025 3.10881 2.1804 2.73363 2.45702 2.45702C2.73363 2.1804 3.10881 2.025 3.5 2.025H12.5C12.8912 2.025 13.2664 2.1804 13.543 2.45702C13.8196 2.73363 13.975 3.10881 13.975 3.5V12.5C13.975 12.8912 13.8196 13.2664 13.543 13.543C13.2664 13.8196 12.8912 13.975 12.5 13.975H3.5C3.10881 13.975 2.73363 13.8196 2.45702 13.543C2.1804 13.2664 2.025 12.8912 2.025 12.5V3.5Z",fill:"",stroke:"",strokeWidth:"0.05"}))};const OA=function(e){var t=e.fill;return l.createElement("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M20.3047 5.21094H18.5078C18.0116 5.21094 17.6094 5.61317 17.6094 6.10938C17.6094 6.60558 18.0116 7.00781 18.5078 7.00781H20.3047C20.8001 7.00781 21.2031 7.41085 21.2031 7.90625V15.0938C21.2031 15.5891 20.8001 15.9922 20.3047 15.9922H18.5078C18.0116 15.9922 17.6094 16.3944 17.6094 16.8906C17.6094 17.3868 18.0116 17.7891 18.5078 17.7891H20.3047C21.7909 17.7891 23 16.5799 23 15.0938V7.90625C23 6.42005 21.7909 5.21094 20.3047 5.21094Z",fill:t}),l.createElement("path",{d:"M4.49219 10.6016H5.39062V13.2969C5.39062 13.7931 5.79286 14.1953 6.28906 14.1953C6.78527 14.1953 7.1875 13.7931 7.1875 13.2969V10.6016H8.08594C8.58214 10.6016 8.98438 10.1993 8.98438 9.70312C8.98438 9.20692 8.58214 8.80469 8.08594 8.80469H4.49219C3.99598 8.80469 3.59375 9.20692 3.59375 9.70312C3.59375 10.1993 3.99598 10.6016 4.49219 10.6016Z",fill:t}),l.createElement("path",{d:"M2.69531 17.7891H14.0156V19.5859H13.1172C12.621 19.5859 12.2188 19.9882 12.2188 20.4844C12.2188 20.9806 12.621 21.3828 13.1172 21.3828H16.7109C17.2071 21.3828 17.6094 20.9806 17.6094 20.4844C17.6094 19.9882 17.2071 19.5859 16.7109 19.5859H15.8125V3.41406H16.7109C17.2071 3.41406 17.6094 3.01183 17.6094 2.51562C17.6094 2.01942 17.2071 1.61719 16.7109 1.61719H13.1172C12.621 1.61719 12.2188 2.01942 12.2188 2.51562C12.2188 3.01183 12.621 3.41406 13.1172 3.41406H14.0156V5.21094H2.69531C1.20912 5.21094 0 6.42005 0 7.90625V15.0938C0 16.5799 1.20912 17.7891 2.69531 17.7891ZM1.79688 7.90625C1.79688 7.41085 2.19991 7.00781 2.69531 7.00781H14.0156V15.9922H2.69531C2.19991 15.9922 1.79688 15.5891 1.79688 15.0938V7.90625Z",fill:t}))};var PA=a(17528),DA={};DA.styleTagTransform=pc(),DA.setAttributes=sc(),DA.insert=lc().bind(null,"head"),DA.domAPI=oc(),DA.insertStyleElement=dc();rc()(PA.A,DA);PA.A&&PA.A.locals&&PA.A.locals;function kA(e){return kA="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},kA(e)}function BA(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */BA=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==kA(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(kA(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function IA(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function FA(e){return function(e){if(Array.isArray(e))return UA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||jA(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jA(e,t){if(e){if("string"==typeof e)return UA(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UA(e,t):void 0}}function UA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qA(){return qA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qA.apply(null,arguments)}var WA={backgroundColor:"transparent"},YA={name:"Fields",Tab:(0,mC.observer)((function(e){return l.createElement(AC.SectionTab,qA({name:"Fields"},e),l.createElement(OA,{fill:"var(--text-color)"}))})),Panel:(0,mC.observer)((function(e){e.store;var t,n,r,a=e.onGetCustomFields,o=e.allowSenderFields,i=e.excludedFields,c=e.allowPropertyFields,s=GA((0,l.useState)(!1),2),u=(s[0],s[1]),d=lt(),f=Ke((function(e){return e.customFields.customFields})),p=Ke((function(e){return e.customFields.defaultDynamicFields})),h=Ke((function(e){return e.templates.defaultSenderFields})),C=Ke((function(e){return e.templates.defaultPropertyFields})),A=c?[].concat(FA(p),FA(C)):p,m=Ke((function(e){return e.templates.product})),v=null==m?void 0:m.productType,g=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){IA(o,r,a,i,l,"next",e)}function l(e){IA(o,r,a,i,l,"throw",e)}i(void 0)}))}}(BA().mark((function e(){var t;return BA().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=5;break}return e.next=3,a();case 3:(null==(t=e.sent)?void 0:t.length)>=0&&d({type:hr,payload:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){g()}),[]);var y=function(e){if("Real Penned Letter"===v){var t=e.replace(/{{/g,"((").replace(/}}/g,"))");Wr(t),d(sh("".concat(t," Copied")))}else Wr(e),d(sh("".concat(e," Copied")))};return l.createElement("div",{className:"dynamic-content"},l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Contact Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"infoIcon"}),l.createElement(VA,{anchorSelect:".infoIcon",place:"bottom",title:"Merge fields allow you to personalize your mailer with contact information."}))),null==A||null===(t=A.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===t?void 0:t.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_contact"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))})),o&&l.createElement(l.Fragment,null,l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Sender Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"sender"}),l.createElement(VA,{anchorSelect:".sender",place:"bottom",title:"You can add sender fields to your template."}))),null==h||null===(n=h.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===n?void 0:n.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_sender"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))}))),l.createElement(VA,{anchorSelect:".copy",place:"bottom",title:"Copy"}),a&&(null==f?void 0:f.length)>0&&l.createElement(l.Fragment,null,l.createElement("hr",{className:"divider"}),l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Custom Fields"),l.createElement(TA,{fill:"var(--primary-color)",className:"custom"}),l.createElement(VA,{anchorSelect:".custom",place:"bottom",title:"You can add custom fields to your template."})),l.createElement(gc,{onClick:function(){u((function(e){return!e}))}})),null==f||null===(r=f.filter((function(e){var t=e.key;return!(null!=i&&i.includes(t))})))||void 0===r?void 0:r.map((function(e,t){var n=e.key,r=e.value;return l.createElement("div",{style:{display:"flex",alignItems:"center"},key:t+"_custom"},l.createElement("span",{className:"contact-element",onClick:function(){return y(n)}},r),l.createElement(gc,{style:WA,onClick:function(){return y(n)},backdrop:!1},l.createElement(NA,{className:"copy"})))}))))}))};const QA=YA;var ZA=a(59195),XA=a(79642);function KA(e){return KA="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},KA(e)}function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JA(Object(n),!0).forEach((function(t){$A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $A(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=KA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=KA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==KA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(e){return function(e){if(Array.isArray(e))return lm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||im(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tm(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=im(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function nm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==KA(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(KA(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function rm(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function am(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){rm(o,r,a,i,l,"next",e)}function l(e){rm(o,r,a,i,l,"throw",e)}i(void 0)}))}}function om(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||im(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function im(e,t){if(e){if("string"==typeof e)return lm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lm(e,t):void 0}}function lm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var cm=(0,mC.observer)((function(e){var t=e.store,n=om((0,l.useState)([]),2),r=n[0],a=n[1],o=om((0,l.useState)(!1),2),i=o[0],c=o[1],s=om((0,l.useState)(!1),2),u=s[0],d=s[1],f=lt(),p=Ke((function(e){return e.templates.uploadedImages})),h=function(){var e=am(nm().mark((function e(){return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p&&(d(!0),a(p),d(!1));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){return e&&Fr.includes(null==e?void 0:e.type)?!(e.size>=52e5)||(f(uh(xa.CUSTOM_UPLOAD_SECTION.SIZE_VALIDATION)),!1):(f(uh(xa.CUSTOM_UPLOAD_SECTION.TYPE_VALIDATION)),!1)},A=function(){var e=am(nm().mark((function e(t){var n,o,i,l,s,u,d;return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=t.target,o=tm(n.files),e.prev=3,o.s();case 5:if((i=o.n()).done){e.next=21;break}if(l=i.value,s=Xr(l),C(l)){e.next=12;break}return n.value=null,e.abrupt("return");case 12:return c(!0),e.next=15,ya(l);case 15:u=e.sent,d=[].concat(em(r),[{url:u,type:s}]),a(d),f({type:lr,payload:d});case 19:e.next=5;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(3),o.e(e.t0);case 26:return e.prev=26,o.f(),e.finish(26);case 29:c(!1),n.value=null,e.next=36;break;case 33:return e.prev=33,e.t1=e.catch(0),e.abrupt("return",e.t1);case 36:return e.prev=36,c(!1),e.finish(36);case 39:case"end":return e.stop()}}),e,null,[[0,33,36,39],[3,23,26,29]])})));return function(t){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){h()}),[]),l.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column"}},l.createElement("div",{style:{height:"40px",paddingTop:"5px"}},xa.CUSTOM_UPLOAD_SECTION.HEADING),l.createElement("div",{style:{height:"35px"}},l.createElement("strong",null,xa.CUSTOM_UPLOAD_SECTION.ACCEPTED_FORMATS)),l.createElement("div",{style:{height:"35px",paddingBottom:"15px"}},l.createElement("strong",null,xa.CUSTOM_UPLOAD_SECTION.MAX_SIZE)),l.createElement("div",{style:{marginBottom:"20px"}},l.createElement("label",{htmlFor:"input-file"},l.createElement(XA.$,{icon:"upload",style:{width:"100%",backgroundColor:"#f6f7f9",boxShadow:"inset 0 0 0 1px #11141833,0 1px 2px #1114181a",color:"#1c2127"},onClick:function(){var e;null===(e=document.querySelector("#input-file"))||void 0===e||e.click()},loading:i,intent:"primary"},xa.CUSTOM_UPLOAD_SECTION.UPLOAD_BTN_TEXT),l.createElement("input",{type:"file",id:"input-file",style:{display:"none"},onChange:A,multiple:!0}))),l.createElement(AC.ImagesGrid,{images:r,getPreview:function(e){return null==e?void 0:e.url},crossOrigin:void 0,isLoading:u,onSelect:function(){var e=am(nm().mark((function e(n,r,a){var o,i,l,c,s,u,d,f,p,h;return nm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==n?void 0:n.url,l=null==n?void 0:n.type,e.next=4,(0,ZA.getImageSize)(i);case 4:if(c=e.sent,s=c.width,u=c.height,!a||"svg"!==a.type||!a.contentEditable||"image"!==l){e.next=10;break}return a.set({maskSrc:i}),e.abrupt("return");case 10:if(!a||"image"!==a.type||!a.contentEditable||"image"!=l){e.next=14;break}return d=(0,ZA.getCrop)(a,{width:s,height:u}),a.set(_A({src:i},d)),e.abrupt("return");case 14:f=Math.min(t.width/s,t.height/u,1),s*=f,u*=f,p=((null==r?void 0:r.x)||t.width/2)-s/2,h=((null==r?void 0:r.y)||t.height/2)-u/2,null===(o=t.activePage)||void 0===o||o.addElement({type:l,src:i,x:p,y:h,width:s,height:u});case 20:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()}))}));AC.UploadSection.Panel=cm;const sm=cm;const um=function(){return l.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},l.createElement("title",null,"ic_fluent_apps_add_in_24_filled"),l.createElement("desc",null,"Created with Sketch."),l.createElement("g",{id:"🔍-Product-Icons",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l.createElement("g",{id:"ic_fluent_apps_add_in_24_filled",fill:"#212121",fillRule:"nonzero"},l.createElement("path",{d:"M10.5,3 C11.8807119,3 13,4.11928813 13,5.5 L13,11 L18.5,11 C19.8807119,11 21,12.1192881 21,13.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L10.5,3 Z M11,13 L5,13 L5,18.5 C5,18.7761424 5.22385763,19 5.5,19 L11,19 L11,13 Z M18.5,13 L13,13 L13,19 L18.5,19 C18.7761424,19 19,18.7761424 19,18.5 L19,13.5 C19,13.2238576 18.7761424,13 18.5,13 Z M10.5,5 L5.5,5 C5.22385763,5 5,5.22385763 5,5.5 L5,11 L11,11 L11,5.5 C11,5.22385763 10.7761424,5 10.5,5 Z M17.8833789,2.00672773 L18,2 C18.5128358,2 18.9355072,2.38604019 18.9932723,2.88337887 L19,3 L19,5 L21,5 C21.5128358,5 21.9355072,5.38604019 21.9932723,5.88337887 L22,6 C22,6.51283584 21.6139598,6.93550716 21.1166211,6.99327227 L21,7 L19,7 L19,9 C19,9.51283584 18.6139598,9.93550716 18.1166211,9.99327227 L18,10 C17.4871642,10 17.0644928,9.61395981 17.0067277,9.11662113 L17,9 L17,7 L15,7 C14.4871642,7 14.0644928,6.61395981 14.0067277,6.11662113 L14,6 C14,5.48716416 14.3860402,5.06449284 14.8833789,5.00672773 L15,5 L17,5 L17,3 C17,2.48716416 17.3860402,2.06449284 17.8833789,2.00672773 L18,2 L17.8833789,2.00672773 Z",id:"🎨-Color"}))))};const dm=function(){return l.createElement("svg",{width:"685",height:"497",viewBox:"0 0 685 497",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("circle",{cx:"285.5",cy:"146.5",r:"56",stroke:"black",strokeWidth:"23"}),l.createElement("rect",{x:"12.5",y:"12.5",width:"660",height:"472",rx:"28.5",stroke:"black",strokeWidth:"25"}),l.createElement("path",{d:"M13 316L126.663 218.694C138.981 208.149 157.344 208.878 168.787 220.366L275.5 327.5M275.5 327.5L124 482M275.5 327.5L467.765 137.481C479.819 125.568 499.206 125.542 511.29 137.424L668 291.5",stroke:"black",strokeWidth:"24"}))};const fm=function(){return l.createElement("svg",{width:"247",height:"244",viewBox:"0 0 247 244",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},l.createElement("path",{d:"M96.5 82.3859V64.1552C96.5 62.5745 94.7528 61.6186 93.4216 62.4708L2.92164 120.41C2.34739 120.778 2 121.412 2 122.094V138.41C2 139.977 3.72032 140.935 5.0527 140.11L95.5527 84.0864C96.1416 83.7218 96.5 83.0785 96.5 82.3859Z",fill:"black",stroke:"black",strokeWidth:"3"}),l.createElement("rect",{x:"18",y:"86",width:"19",height:"155",rx:"2",fill:"black"}),l.createElement("rect",{x:"168",y:"153",width:"19",height:"88",rx:"2",fill:"black"}),l.createElement("rect",{x:"74",y:"153",width:"57",height:"91",fill:"black"}),l.createElement("rect",{x:"18",y:"225",width:"169",height:"19",rx:"2",fill:"black"}),l.createElement("rect",{x:"79",width:"168",height:"168",fill:"url(#pattern0_85_1450)"}),l.createElement("defs",null,l.createElement("pattern",{id:"pattern0_85_1450",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},l.createElement("use",{xlinkHref:"#image0_85_1450",transform:"scale(0.0104167)"})),l.createElement("image",{id:"image0_85_1450",width:"96",height:"96",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFJUlEQVR4nO2dXWhdRRCAP6VKK4lCFIuKtD4E/0CrVlIQfTCgYFMFqxR8qIrFRkEtNCAKkoCCkkr9BRHqU6u+iYXWB32xoCAiSEK1FVuqBkGkqTZgtTa9KwsTkEvu3b33ntmz52Q+mJeQ3Z2duWfP7uzsHjAMwzAMwzAMwzAMwzCMPFgGDAFbgElgLzANHAVOAKdFTsjfpuV/JqXMkNRhdMBqYAzYD8wBrkeZk7rGpG5jEfrlF3sAaBRg9FbSkDZ8W33mCbgQeBaYVTR6KzkJvAIMLEVHrAAmChpiihiiJkSnJcEwcDgDw7sm8S/x9dR8nN+TgaFdQPaIrrXiOuBgBsZ1kfIDsIaa8ADwt4KRRpvaWVtw/V7njVScR4EzSr/SUWUHeJkHnqCiPK88TIwmcMCCPEfF2KpsfJfYAV6epiLcJ49u3RxwFniQzFmj9MJ1GTjASd9uJFP6Zfqm1fl/JdLpX+w3LBLlvBR4HfhK+Qk8nGscSWuRNQ+8DazsQJergDeBf5R08n3NivVKHZ0BbulxSPxeSbdswhYrJI5SdAe/Ay4vQL+LgG8U9DuaSwBvQqFzfwKDBep4CfCLgp6+76UyoBRS3lqRYXKu7P2EcYVO/QYsj2h7BHgV2Ak8ApwfUeZTBX29DUqbdmrsZL0R0fYLi5T7PMIJGxT0nS1rWrpFoTMuYrXpjfxHi7J+470d5wLHFXT2tkjOASUHDAbavatN2SMRen+koLN/+pKyWjF7YSDQ9jOB8n4R1o7tCjp7W6wiIWNKxncRiVSTgfL3BMpvUtLbOzYZnyg6oL9H528OlL9TSe99JGKZcjrJlYH2rw+U/1lWvq3kkJLec6nSIIcUje+A2yJ00Irv9CreNpWdfroOxtLHMjB2adPRHcqd2B+pxzblPNJuxE8Q1NmbYOtvMFIXv7L9PQPDL4i3jTrTCTryQQf6XCYzEJeBTJGAn0ra843ZfHkXOFWiA46RgFSp5PPAk13od4U4QishrJ34OJM6pxN36rUud558PurXiXX1tqmdA5xkItzeha7nRYQuKueAMk6zOJHPgJsy2TgqbQhK9RJ2LaQhjvBT0HM60HtXXV7CKaahLlKm5cRNDMsT6D5Vh4WY6+KJ2CG7XZQUik66ENMORbgu5X156bbDRyt/rXooQjsY53oQv1kf4sOqB+O0w9GuB5mNSGnZVvVwtNaGzAzweBt5MbKeOwL631/1DRmtLcljgTaviazn4UA9w1XfktTalD8ZkWTbKMAB6+qwKa+RltIALgi0G5OFHVoX3F2HtBStxKzhQJsvB8r/FZFV8VAdErO0pqMTgTYHAmnmfo0SYrIuqYkaybkHI+I7N7fI74xJzvV8WZfkXK0o40hEuxfLjtlOkc0Rq2DP1bLnXIv0dK0DGt9Gng/ohvfqdkBD64jSLgU9NyjM3Er99Wsf0nupQB1vbXOmoFs5ovikZnNM9a0COrlJpqe1PaaqfVD7Rxk+YuL9/+daxXyh3WRIn/JVBTNyy+GIJGMtNhSuk1tNvliKVxUgF1mkuqyjmXcStHlK7qnImnsTXVeT2gFn5fq1SpDiwqbUDniKiqF9ZVlKB1TuyrIUl/alcMB8F0nC2bFR6cWs7YBaXFu5gF3cmgFVubp4d87z/CIYVjwq6nqQ2l/e3bxqHc/o+vrxnAJrZXzA4XgJhl/SH3Bops8+YZIPqyTHpsiP+OyTOpOnjtTtM1YfSw5+q89YTcn/2GesDMMwDMMwDMMwDMMwDHLjP0UDH7djTjxQAAAAAElFTkSuQmCC"})))};var pm=a(70490),hm={};hm.styleTagTransform=pc(),hm.setAttributes=sc(),hm.insert=lc().bind(null,"head"),hm.domAPI=oc(),hm.insertStyleElement=dc();rc()(pm.A,hm);pm.A&&pm.A.locals&&pm.A.locals;function Cm(){return Cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(null,arguments)}var Am={name:"CustomAddOns",Tab:(0,mC.observer)((function(e){return l.createElement(AC.SectionTab,Cm({name:"Add On's"},e,{iconSize:20}),l.createElement(um,null))})),Panel:(0,mC.observer)((function(e){var t=e.store,n=lt(),r=(Qr()?Pr:Dr)+"/default_images/dummyGSV.png",a=function(e,a,o){var i;e.preventDefault();var l,c=t.activePage.toJSON();null!=c&&null!==(i=c.children)&&void 0!==i&&i.length&&c.children.find((function(e){return e.id==="gsv-image_".concat(t.activePage.id)}))?n(uh(xa.GSV_RESTRICT_ONE_PER_PAGE)):"gsv"===o?null===(l=t.activePage)||void 0===l||l.addElement({id:"gsv-image_".concat(t.activePage.id),type:"image",src:r,width:287,height:188,contentEditable:!1,keepRatio:!0,opacity:1,custom:{elementType:a}}):"epo"===o&&t.activePage.addElement({type:"text",x:100,y:100,text:a,width:150,contentEditable:!1})};return l.createElement("div",{className:"dynamic-content"},l.createElement("div",{className:"dynamic-content__top"},l.createElement("div",null,l.createElement("span",{className:"title"},"Optional Add-On's")," ",l.createElement(TA,{fill:"var(--primary-color)",className:"infoIcon"}),l.createElement(VA,{anchorSelect:".infoIcon",place:"bottom",title:"Google Street View is a technology featured in Google Maps and Google Earth that provides interactive panoramas from positions along many streets in the world."}))),l.createElement("div",{className:"addonBox",onClick:function(e){return a(e,"GOOGLE_STREET_VIEW","gsv")}},l.createElement(dm,null),l.createElement(Ac,null,"Street View Property Image"),l.createElement(Ac,null,"+$0.02 per mail piece")),l.createElement("div",{className:"hidden-important addonBox",onClick:function(e){return a(e,"{{EST.PROP.OFFER}}","epo")}},l.createElement(fm,null),l.createElement(Ac,null,"Estimated Property Offer"),l.createElement(Ac,null,"+$0.02 per mail piece")))}))};const mm=Am;var vm=a(87583),gm=a(93120);const ym=function(){return l.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{fill:"#000000",d:"M5 1h-4v4h4v-4zM6 0v0 6h-6v-6h6zM2 2h2v2h-2zM15 1h-4v4h4v-4zM16 0v0 6h-6v-6h6zM12 2h2v2h-2zM5 11h-4v4h4v-4zM6 10v0 6h-6v-6h6zM2 12h2v2h-2zM7 0h1v1h-1zM8 1h1v1h-1zM7 2h1v1h-1zM8 3h1v1h-1zM7 4h1v1h-1zM8 5h1v1h-1zM7 6h1v1h-1zM7 8h1v1h-1zM8 9h1v1h-1zM7 10h1v1h-1zM8 11h1v1h-1zM7 12h1v1h-1zM8 13h1v1h-1zM7 14h1v1h-1zM8 15h1v1h-1zM15 8h1v1h-1zM1 8h1v1h-1zM2 7h1v1h-1zM0 7h1v1h-1zM4 7h1v1h-1zM5 8h1v1h-1zM6 7h1v1h-1zM9 8h1v1h-1zM10 7h1v1h-1zM11 8h1v1h-1zM12 7h1v1h-1zM13 8h1v1h-1zM14 7h1v1h-1zM15 10h1v1h-1zM9 10h1v1h-1zM10 9h1v1h-1zM11 10h1v1h-1zM13 10h1v1h-1zM14 9h1v1h-1zM15 12h1v1h-1zM9 12h1v1h-1zM10 11h1v1h-1zM12 11h1v1h-1zM13 12h1v1h-1zM14 11h1v1h-1zM15 14h1v1h-1zM10 13h1v1h-1zM11 14h1v1h-1zM12 13h1v1h-1zM13 14h1v1h-1zM10 15h1v1h-1zM12 15h1v1h-1zM14 15h1v1h-1z"}))};function bm(e){return bm="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},bm(e)}function Lm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Lm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==bm(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(bm(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function Em(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function wm(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Em(o,r,a,i,l,"next",e)}function l(e){Em(o,r,a,i,l,"throw",e)}i(void 0)}))}}function zm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(null,arguments)}var Hm={name:"QR-Section",Tab:function(e){return l.createElement(AC.SectionTab,Sm({name:"QR"},e,{iconSize:20}),l.createElement(ym,null))},Panel:(0,mC.observer)((function(e){var t=e.store,n=zm((0,l.useState)(""),2),r=n[0],a=n[1],o=t.selectedElements[0],i="qr"===(null==o?void 0:o.name),c=lt(),s=function(){t.selectElements([]),a("")},u=function(e){return new Promise((function(t){vm.toString(e||"no-data",{type:"svg",color:{dark:"#000000",light:"#0000"}},(function(e,n){t(gm.svgToURL(n))}))}))},d=function(){var e=wm(Lm().mark((function e(){var n,a;return Lm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=13;break}if(!Zr(r)){e.next=10;break}return n=Math.random().toString(36).substring(2,7),e.next=5,u(r);case 5:a=e.sent,t.activePage.addElement({id:"qr-".concat(n),type:"svg",name:"qr",x:50,y:50,width:100,height:100,keepRatio:!0,src:a,custom:{value:r}}),s(),e.next=11;break;case 10:c(uh(xa.QR_SECTION.INVALID_URL));case 11:e.next=14;break;case 13:c(uh(xa.QR_SECTION.EMPTY_QR));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),f=function(){var e=wm(Lm().mark((function e(){return Lm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("qr"!==(null==o?void 0:o.name)||!r){e.next=10;break}if(!Zr(r)){e.next=7;break}return e.next=4,u(r).then((function(e){o.set({src:e,custom:{value:r}})}));case 4:s(),e.next=8;break;case 7:c(uh(xa.QR_SECTION.INVALID_URL));case 8:e.next=11;break;case 10:c(uh(xa.QR_SECTION.EMPTY_QR));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){"qr"===(null==o?void 0:o.name)?a(null==o?void 0:o.custom.value):a("")}),[i,o]),l.createElement("div",null,l.createElement(Gp,{type:"text",onChange:function(e){a(e.target.value)},placeholder:xa.QR_SECTION.QR_PLACEHOLDER,value:r}),l.createElement(XA.$,{onClick:i?f:d,style:{width:"100%",padding:"5px",marginTop:"10px",backgroundColor:"#f6f7f9",boxShadow:"inset 0 0 0 1px #11141833,0 1px 2px #1114181a",color:"#1c2127"}},i?xa.QR_SECTION.UPDATE_BUTTON:xa.QR_SECTION.SUBMIT_BUTTON))}))};const Rm=Hm;function xm(e){return xm="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},xm(e)}function Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vm.apply(null,arguments)}function Tm(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 Nm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(n),!0).forEach((function(t){Om(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Om(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=xm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pm(e){return function(e){if(Array.isArray(e))return Dm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Dm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dm(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const km=function(e){var t="Real Penned Letter"===e.currentTemplateType?AC.DEFAULT_SECTIONS.filter((function(e){return""===e.name})):AC.DEFAULT_SECTIONS.filter((function(e){return!["photos","size","templates"].includes(e.name)}));return l.createElement(ah.SidePanelWrap,null,l.createElement(AC.SidePanel,{store:e.store,sections:[].concat(Pm("Real Penned Letter"!==e.currentTemplateType?[Nm(Nm(Nm({},rA),sm),{},{Panel:function(t){return l.createElement(rA.Panel,Vm({},t,{platformName:e.platformName,templateGalleryModal:e.templateGalleryModal,onGetTemplates:e.onGetTemplates,onGetOneTemplate:e.onGetOneTemplate,selectedSection:e.selectedSection}))}})]:[]),Pm(t),[Nm(Nm(Nm({},QA),sm),{},{Panel:function(t){return l.createElement(QA.Panel,Vm({},t,{onGetCustomFields:e.onGetCustomFields,allowSenderFields:e.allowSenderFields,excludedFields:e.excludedFields,allowPropertyFields:e.allowPropertyFields}))}})],Pm("Real Penned Letter"!==e.currentTemplateType?[Nm(Nm({},Rm),{},{Panel:function(e){return l.createElement(Rm.Panel,e)}}),Nm(Nm({},mm),{},{Panel:function(e){return l.createElement(mm.Panel,e)}})]:[])),defaultSection:"text"}))};var Bm=a(22995),Im={};Im.styleTagTransform=pc(),Im.setAttributes=sc(),Im.insert=lc().bind(null,"head"),Im.domAPI=oc(),Im.insertStyleElement=dc();rc()(Bm.A,Im);Bm.A&&Bm.A.locals&&Bm.A.locals;function Fm(e){return Fm="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},Fm(e)}function Gm(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 jm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gm(Object(n),!0).forEach((function(t){Um(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Um(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Fm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Fm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qm(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new x(r||[]);return a(i,"_invoke",{value:M(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",C="completed",A={};function m(){}function v(){}function g(){}var y={};s(y,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(V([])));L&&L!==n&&r.call(L,i)&&(y=L);var E=g.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function z(e,t){function n(a,o,i,l){var c=d(e[a],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==Fm(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function M(t,n,r){var a=f;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===C){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var c=S(l,r);if(c){if(c===A)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=C,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?C:p,s.arg===A)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=C,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),A;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,A;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,A):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function H(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(H,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Fm(t)+" is not iterable")}return v.prototype=g,a(E,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},w(z.prototype),s(z.prototype,l,(function(){return this})),t.AsyncIterator=z,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new z(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),A}},t}function Wm(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Ym(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Wm(o,r,a,i,l,"next",e)}function l(e){Wm(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Qm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Zm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Xm=function(e){var t=e.store,n=e.platformName,r=e.templateGalleryModal,a=e.createTemplateRoute,o=e.designerTemplateQuery,i=e.olcTemplate,c=e.allowSenderFields,s=e.excludedFields,u=e.allowPropertyFields,d=e.onReturnAndNavigate,f=e.onGetOneTemplate,p=e.onGetCustomFields,h=e.onGetTemplates,C=e.onSubmit,A=Qm((0,l.useState)(!1),2),m=A[0],v=A[1],g=Qm((0,l.useState)(1),2),y=g[0],b=g[1],L=Qm((0,l.useState)("text"),2),E=L[0],w=L[1],z=ie().id,M=lt(),S=oe(),H=(Ke((function(e){return e.templates.template})),Ke((function(e){return e.templates.product}))),R=Ke((function(e){return e.templates.envelopeType})),x=Ke((function(e){return e.templates.products})),V=null==H?void 0:H.productType;(0,l.useEffect)((function(){i&&D()}),[i]),(0,l.useEffect)((function(){o&&P()}),[o]),(0,l.useEffect)((function(){var e=function(){document.hidden&&b((function(e){return e+1}))},n=function(e){e.target instanceof Element&&e.target.closest(".polotno-side-tabs-container")&&"Templates"!==(null==t?void 0:t.openedSidePanel)&&w(null==t?void 0:t.openedSidePanel)};return document.addEventListener("click",n),document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e),document.removeEventListener("click",n)}}),[]),(0,l.useEffect)((function(){H||i||z||o||S(a||"/create-template")}),[]),(0,l.useEffect)((function(){if(H||z&&f){if((0,ch.O3)(vh),z&&f)try{f(z).then((function(e){var n;e?(M({type:ar,payload:{data:e}}),Va(null==e||null===(n=e.product)||void 0===n?void 0:n.id,t),M({type:or,payload:!0})):(M(uh("Unable to load the Template")),setTimeout((function(){S(a||"/create-template")}),1e3))}))}catch(e){return e}finally{M({type:or,payload:!1})}else 0!==t.pages.length||i||N();T();var e=t.on("change",(function(){m||v(!0)}));return function(){t.history.clear(),t.clear(),e()}}}),[]),(0,l.useEffect)((function(){z||i||!H||0!==t.pages.length||N()}),[H]),(0,l.useEffect)((function(){var e=function(e){var t="Are you sure you want to leave?";return e.returnValue=t,t};return m&&(window.removeEventListener("beforeunload",e),window.addEventListener("beforeunload",e)),function(){window.removeEventListener("beforeunload",e)}}),[m]);var T=function(){var e=Ym(qm().mark((function e(){var t;return qm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=5;break}return e.next=3,p();case 3:null!=(t=e.sent)&&t.length&&M({type:hr,payload:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=Ym(qm().mark((function e(){var n,r;return qm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H&&(t.addPage(),r=null==H||null===(n=H.selectedSize)||void 0===n?void 0:n.split("x"),t.setUnit({unit:"in",dpi:kr}),t.setSize(+r[1]*kr,+r[0]*kr),Br.includes(H.productType)&&(t.addPage(),t.selectPage(t.pages[0].id)),qa(t,H,R),Ah(H.id,t),"Real Penned Letter"===V&&O(),t.history.clear()),v(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=Ym(qm().mark((function e(){var n,r,a;return qm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.addFont({fontFamily:"lexi Regular",url:gh}),mh(t),e.next=5,fetch(gh);case 5:return n=e.sent,e.next=8,n.blob();case 8:r=e.sent,(a=new FileReader).onloadend=function(){t.addFont({fontFamily:"lexi Regular",url:a.result})},a.readAsDataURL(r),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.error("Error loading the font file:",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Ym(qm().mark((function e(){var t,n;return qm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==o||!o.title||null==o||!o.product){e.next=7;break}if(t=x.flatMap((function(e){return e.size.map((function(t){return jm({id:t.id||e.id,title:e.title,productType:e.productType,size:[{id:t.id||e.id,size:t.size}]},void 0!==e.windowed&&{windowed:e.windowed})}))})),n=t.find((function(e){var t;return e.id===(null==o||null===(t=o.product)||void 0===t?void 0:t.id)})),!n){e.next=7;break}return M(Ea("title",null==o?void 0:o.title)),M(La(n)),e.abrupt("return");case 7:d?d():S(a||"/");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=Ym(qm().mark((function e(){var n,r,a,o,l,c,s,u;return qm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=i)){e.next=19;break}return M({type:ar,payload:{data:n}}),(l=document.querySelector(".polotno-workspace-container"))&&l.classList.add("show-loader"),c=null==n||null===(r=n.product)||void 0===r?void 0:r.paperSize.split("x"),t.setUnit({unit:"in",dpi:96}),t.setSize(+c[1]*kr,+c[0]*kr),e.next=10,Fa(null==n?void 0:n.templateUrl);case 10:return s=e.sent,"Real Penned Letter"===(null==n||null===(a=n.product)||void 0===a?void 0:a.productType)&&(u=JSON.stringify(s).replace(/{{/g,"((").replace(/}}/g,"))"),s=JSON.parse(u)),t.loadJSON(s),e.next=15,t.waitLoading();case 15:v(!1),Va(null==n||null===(o=n.product)||void 0===o?void 0:o.id,t),M({type:or,payload:!1}),l&&l.classList.add("hide-loader");case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return l.createElement(l.Fragment,null,l.createElement(Ac,{className:"hideTemplateBuilder"},Ha),l.createElement("div",{className:"polotno-container"},y>0&&l.createElement("div",{className:"builder-wrapper"},l.createElement(CC,{store:t,isStoreUpdated:m,olcTemplate:i,onReturnAndNavigate:d,onSubmit:C}),l.createElement(ah.PolotnoContainer,{style:{width:"100vw",height:"90vh",position:"relative"}},l.createElement(km,{store:t,currentTemplateType:V,platformName:n,templateGalleryModal:r,allowSenderFields:c,allowPropertyFields:u,excludedFields:s,onGetTemplates:h,onGetOneTemplate:f,onGetCustomFields:p,selectedSection:E}),l.createElement(ah.WorkspaceWrap,null,"Real Penned Letter"!==V&&l.createElement(oh.Toolbar,{store:t,downloadButtonEnabled:!1}),"Real Penned Letter"!==V?l.createElement(lh.Workspace,{store:t,pageControlsEnabled:!1}):l.createElement(lh.Workspace,{store:t,pageControlsEnabled:!1,components:{Tooltip:function(){return null}}}),l.createElement(ih.ZoomButtons,{store:t}))),l.createElement(Mp,null))))};var Km,Jm;function _m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function $m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ev(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ev(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ev(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tv=function(e){return(0,Or.createStore)({key:e,showCredit:!1})};const nv=function(e){var t,n=e.secretKey,r=e.platformName,a=e.templateGalleryModal,o=e.createTemplateRoute,i=e.templateBuilderRoute,c=e.olcTemplate,s=e.designerTemplateQuery,u=e.allowSenderFields,d=e.excludedFields,f=e.allowPropertyFields,p=e.styles,h=e.onReturnAndNavigate,C=e.onGetOneTemplate,A=e.onGetCustomFields,m=e.onGetTemplates,v=e.onSubmit,g=$m((0,l.useState)(tv(n)),2),y=g[0],b=g[1],L=null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.pathname;(0,l.useEffect)((function(){if(L===o||"/create-template"===L){var e=tv(n);b(e)}}),[L]);var E=p&&Object.keys(p).length?ql(Km||(Km=_m(["\n :root {\n ","\n }\n "])),p?Object.entries(p.root).map((function(e){var t=$m(e,2),n=t[0],r=t[1];return"".concat(n,": ").concat(r,";")})).join(" "):""):ql(Jm||(Jm=_m(["<></>"])));return l.createElement("div",{className:"builder-wrapper"},l.createElement(Mp,null),l.createElement(E,null),l.createElement(Le,null,l.createElement(ye,{path:o||"/create-template",element:l.createElement(rh,{createTemplateRoute:o,templateBuilderRoute:i,onReturnAndNavigate:h})}),l.createElement(ye,{path:i||"/template-builder/:id?",element:l.createElement(Xm,{store:y,olcTemplate:c,designerTemplateQuery:s,platformName:r,templateGalleryModal:a,allowSenderFields:u,excludedFields:d,allowPropertyFields:f,createTemplateRoute:o,onReturnAndNavigate:h,onGetOneTemplate:C,onGetTemplates:m,onGetCustomFields:A,onSubmit:v})})))};var rv=a(10002),av={};av.styleTagTransform=pc(),av.setAttributes=sc(),av.insert=lc().bind(null,"head"),av.domAPI=oc(),av.insertStyleElement=dc();rc()(rv.A,av);rv.A&&rv.A.locals&&rv.A.locals;var ov=a(75487),iv={};iv.styleTagTransform=pc(),iv.setAttributes=sc(),iv.insert=lc().bind(null,"head"),iv.domAPI=oc(),iv.insertStyleElement=dc();rc()(ov.A,iv);ov.A&&ov.A.locals&&ov.A.locals;var lv=a(88498),cv={};cv.styleTagTransform=pc(),cv.setAttributes=sc(),cv.insert=lc().bind(null,"head"),cv.domAPI=oc(),cv.insertStyleElement=dc();rc()(lv.A,cv);lv.A&&lv.A.locals&&lv.A.locals;var sv=a(60137),uv={};uv.styleTagTransform=pc(),uv.setAttributes=sc(),uv.insert=lc().bind(null,"head"),uv.domAPI=oc(),uv.insertStyleElement=dc();rc()(sv.A,uv);sv.A&&sv.A.locals&&sv.A.locals;var dv=a(72804),fv={};fv.styleTagTransform=pc(),fv.setAttributes=sc(),fv.insert=lc().bind(null,"head"),fv.domAPI=oc(),fv.insertStyleElement=dc();rc()(dv.A,fv);dv.A&&dv.A.locals&&dv.A.locals;const pv=function(e){var t=e.container,n=e.secretKey,r=e.publicApiKey,a=e.platformName,o=e.templateGalleryModal,i=void 0===o||o,c=e.createTemplateRoute,u=e.templateBuilderRoute,d=e.olcTemplate,f=e.designerTemplateQuery,p=e.sandbox,h=e.allowSenderFields,C=e.allowPropertyFields,A=e.excludedFields,m=e.onReturnAndNavigate,v=e.onGetOneTemplate,g=e.onGetTemplates,y=e.onGetCustomFields,b=e.onSubmit,L=e.styles;if(!t)throw new Error("Root element not found");if(!n)throw new Error("secretKey not found");if(!r)throw new Error("publicApiKey not found");p&&function(e){qr=e}(p),Yr(r);var E=s.createRoot(t);return E.render(l.createElement(l.Fragment,null,l.createElement(rt,{store:Nr},l.createElement(xe,null,l.createElement(nv,{secretKey:n,styles:L,olcTemplate:d,designerTemplateQuery:f,platformName:a,templateGalleryModal:i,createTemplateRoute:c,templateBuilderRoute:u,allowSenderFields:h,allowPropertyFields:C,excludedFields:A,onReturnAndNavigate:m,onGetOneTemplate:v,onGetTemplates:g,onGetCustomFields:y,onSubmit:b}))))),{destroy:function(){console.log("React template builder destroyed"),E.unmount()}}};var hv=o.A;export{hv as default};
601
601
  //# sourceMappingURL=index.js.map