@yext/visual-editor 0.0.21 → 0.0.22

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.
@@ -200,4 +200,4 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var k=me(I,Z,D,Y,K+"."+Z
200
200
  background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
201
201
  background: linear-gradient(to top, #000, rgba(0,0,0,0));
202
202
  }
203
- `),d.createElement("div",{style:u.white,className:"saturation-white"},d.createElement("div",{style:u.black,className:"saturation-black"}),d.createElement("div",{style:u.pointer},this.props.pointer?d.createElement(this.props.pointer,this.props):d.createElement("div",{style:u.circle}))))}}]),t}(d.PureComponent||d.Component);function EN(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var CN=qp(Object.keys,Object),TN=Object.prototype,$N=TN.hasOwnProperty;function _N(e){if(!ms(e))return CN(e);var t=[];for(var r in Object(e))$N.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ss(e){return cn(e)?th(e):_N(e)}function AN(e,t){return e&&Yp(e,t,Ss)}function PN(e,t){return function(r,n){if(r==null)return r;if(!cn(r))return e(r,n);for(var a=r.length,o=-1,i=Object(r);++o<a&&n(i[o],o,i)!==!1;);return r}}var oh=PN(AN);function ON(e){return typeof e=="function"?e:Xa}function RN(e,t){var r=Je(e)?EN:oh;return r(e,ON(t))}function Aa(e){"@babel/helpers - typeof";return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}var kN=/^\s+/,jN=/\s+$/;function H(e,t){if(e=e||"",t=t||{},e instanceof H)return e;if(!(this instanceof H))return new H(e,t);var r=NN(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.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=r.ok}H.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 t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,a,o,i,s;return r=t.r/255,n=t.g/255,a=t.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*i+.0722*s},setAlpha:function(t){return this._a=ih(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Gc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Gc(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=Vc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Vc(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return Uc(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return LN(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(Ee(this._r,255)*100)+"%",g:Math.round(Ee(this._g,255)*100)+"%",b:Math.round(Ee(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ee(this._r,255)*100)+"%, "+Math.round(Ee(this._g,255)*100)+"%, "+Math.round(Ee(this._b,255)*100)+"%)":"rgba("+Math.round(Ee(this._r,255)*100)+"%, "+Math.round(Ee(this._g,255)*100)+"%, "+Math.round(Ee(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:XN[Uc(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Yc(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=H(t);n="#"+Yc(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!r&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(zN,arguments)},brighten:function(){return this._applyModification(WN,arguments)},darken:function(){return this._applyModification(VN,arguments)},desaturate:function(){return this._applyModification(IN,arguments)},saturate:function(){return this._applyModification(BN,arguments)},greyscale:function(){return this._applyModification(HN,arguments)},spin:function(){return this._applyModification(GN,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(KN,arguments)},complement:function(){return this._applyCombination(UN,arguments)},monochromatic:function(){return this._applyCombination(qN,arguments)},splitcomplement:function(){return this._applyCombination(YN,arguments)},triad:function(){return this._applyCombination(Kc,[3])},tetrad:function(){return this._applyCombination(Kc,[4])}};H.fromRatio=function(e,t){if(Aa(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Sn(e[n]));e=r}return H(e,t)};function NN(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,o=null,i=!1,s=!1;return typeof e=="string"&&(e=eF(e)),Aa(e)=="object"&&(At(e.r)&&At(e.g)&&At(e.b)?(t=FN(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):At(e.h)&&At(e.s)&&At(e.v)?(n=Sn(e.s),a=Sn(e.v),t=MN(e.h,n,a),i=!0,s="hsv"):At(e.h)&&At(e.s)&&At(e.l)&&(n=Sn(e.s),o=Sn(e.l),t=DN(e.h,n,o),i=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ih(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function FN(e,t,r){return{r:Ee(e,255)*255,g:Ee(t,255)*255,b:Ee(r,255)*255}}function Vc(e,t,r){e=Ee(e,255),t=Ee(t,255),r=Ee(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o,i,s=(n+a)/2;if(n==a)o=i=0;else{var l=n-a;switch(i=s>.5?l/(2-n-a):l/(n+a),n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:i,l:s}}function DN(e,t,r){var n,a,o;e=Ee(e,360),t=Ee(t,100),r=Ee(r,100);function i(c,u,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?c+(u-c)*6*p:p<1/2?u:p<2/3?c+(u-c)*(2/3-p)*6:c}if(t===0)n=a=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=i(l,s,e+1/3),a=i(l,s,e),o=i(l,s,e-1/3)}return{r:n*255,g:a*255,b:o*255}}function Gc(e,t,r){e=Ee(e,255),t=Ee(t,255),r=Ee(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o,i,s=n,l=n-a;if(i=n===0?0:l/n,n==a)o=0;else{switch(n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:i,v:s}}function MN(e,t,r){e=Ee(e,360)*6,t=Ee(t,100),r=Ee(r,100);var n=Math.floor(e),a=e-n,o=r*(1-t),i=r*(1-a*t),s=r*(1-(1-a)*t),l=n%6,c=[r,i,o,o,s,r][l],u=[s,r,r,i,o,o][l],p=[o,o,s,r,r,i][l];return{r:c*255,g:u*255,b:p*255}}function Uc(e,t,r,n){var a=[st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16))];return n&&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 LN(e,t,r,n,a){var o=[st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16)),st(sh(n))];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 Yc(e,t,r,n){var a=[st(sh(n)),st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16))];return a.join("")}H.equals=function(e,t){return!e||!t?!1:H(e).toRgbString()==H(t).toRgbString()};H.random=function(){return H.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function IN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.s-=t/100,r.s=Qa(r.s),H(r)}function BN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.s+=t/100,r.s=Qa(r.s),H(r)}function HN(e){return H(e).desaturate(100)}function zN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.l+=t/100,r.l=Qa(r.l),H(r)}function WN(e,t){t=t===0?0:t||10;var r=H(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),H(r)}function VN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.l-=t/100,r.l=Qa(r.l),H(r)}function GN(e,t){var r=H(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,H(r)}function UN(e){var t=H(e).toHsl();return t.h=(t.h+180)%360,H(t)}function Kc(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=H(e).toHsl(),n=[H(e)],a=360/t,o=1;o<t;o++)n.push(H({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function YN(e){var t=H(e).toHsl(),r=t.h;return[H(e),H({h:(r+72)%360,s:t.s,l:t.l}),H({h:(r+216)%360,s:t.s,l:t.l})]}function KN(e,t,r){t=t||6,r=r||30;var n=H(e).toHsl(),a=360/r,o=[H(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,o.push(H(n));return o}function qN(e,t){t=t||6;for(var r=H(e).toHsv(),n=r.h,a=r.s,o=r.v,i=[],s=1/t;t--;)i.push(H({h:n,s:a,v:o})),o=(o+s)%1;return i}H.mix=function(e,t,r){r=r===0?0:r||50;var n=H(e).toRgb(),a=H(t).toRgb(),o=r/100,i={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return H(i)};H.readability=function(e,t){var r=H(e),n=H(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};H.isReadable=function(e,t,r){var n=H.readability(e,t),a,o;switch(o=!1,a=tF(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};H.mostReadable=function(e,t,r){var n=null,a=0,o,i,s,l;r=r||{},i=r.includeFallbackColors,s=r.level,l=r.size;for(var c=0;c<t.length;c++)o=H.readability(e,t[c]),o>a&&(a=o,n=H(t[c]));return H.isReadable(e,n,{level:s,size:l})||!i?n:(r.includeFallbackColors=!1,H.mostReadable(e,["#fff","#000"],r))};var li=H.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"},XN=H.hexNames=JN(li);function JN(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function ih(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ee(e,t){ZN(e)&&(e="100%");var r=QN(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Qa(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function ZN(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function QN(e){return typeof e=="string"&&e.indexOf("%")!=-1}function st(e){return e.length==1?"0"+e:""+e}function Sn(e){return e<=1&&(e=e*100+"%"),e}function sh(e){return Math.round(parseFloat(e)*255).toString(16)}function qc(e){return Ye(e)/255}var ot=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),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 At(e){return!!ot.CSS_UNIT.exec(e)}function eF(e){e=e.replace(kN,"").replace(jN,"").toLowerCase();var t=!1;if(li[e])e=li[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ot.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ot.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ot.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ot.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ot.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ot.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ot.hex8.exec(e))?{r:Ye(r[1]),g:Ye(r[2]),b:Ye(r[3]),a:qc(r[4]),format:t?"name":"hex8"}:(r=ot.hex6.exec(e))?{r:Ye(r[1]),g:Ye(r[2]),b:Ye(r[3]),format:t?"name":"hex"}:(r=ot.hex4.exec(e))?{r:Ye(r[1]+""+r[1]),g:Ye(r[2]+""+r[2]),b:Ye(r[3]+""+r[3]),a:qc(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=ot.hex3.exec(e))?{r:Ye(r[1]+""+r[1]),g:Ye(r[2]+""+r[2]),b:Ye(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function tF(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var Xc=function(t){var r=["r","g","b","a","h","s","l","v"],n=0,a=0;return RN(r,function(o){if(t[o]&&(n+=1,isNaN(t[o])||(a+=1),o==="s"||o==="l")){var i=/^\d+%$/;i.test(t[o])&&(a+=1)}}),n===a?t:!1},En=function(t,r){var n=t.hex?H(t.hex):H(t),a=n.toHsl(),o=n.toHsv(),i=n.toRgb(),s=n.toHex();a.s===0&&(a.h=r||0,o.h=r||0);var l=s==="000000"&&i.a===0;return{hsl:a,hex:l?"transparent":"#"+s,rgb:i,hsv:o,oldHue:t.h||r||a.h,source:t.source}},qt=function(t){if(t==="transparent")return!0;var r=String(t).charAt(0)==="#"?1:0;return t.length!==4+r&&t.length<7+r&&H(t).isValid()},Es=function(t){if(!t)return"#fff";var r=En(t);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},Do=function(t,r){var n=t.replace("°","");return H(r+" ("+n+")")._ok},yn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rF=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function nF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function oF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Ge=function(t){var r=function(n){oF(a,n);function a(o){nF(this,a);var i=aF(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return i.handleChange=function(s,l){var c=Xc(s);if(c){var u=En(s,s.h||i.state.oldHue);i.setState(u),i.props.onChangeComplete&&i.debounce(i.props.onChangeComplete,u,l),i.props.onChange&&i.props.onChange(u,l)}},i.handleSwatchHover=function(s,l){var c=Xc(s);if(c){var u=En(s,s.h||i.state.oldHue);i.props.onSwatchHover&&i.props.onSwatchHover(u,l)}},i.state=yn({},En(o.color,0)),i.debounce=ah(function(s,l,c){s(l,c)},100),i}return rF(a,[{key:"render",value:function(){var i={};return this.props.onSwatchHover&&(i.onSwatchHover=this.handleSwatchHover),d.createElement(t,yn({},this.props,this.state,{onChange:this.handleChange},i))}}],[{key:"getDerivedStateFromProps",value:function(i,s){return yn({},En(i.color,s.oldHue))}}]),a}(d.PureComponent||d.Component);return r.propTypes=yn({},t.propTypes),r.defaultProps=yn({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},iF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sF=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function lF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function cF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var uF=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){cF(a,n);function a(){var o,i,s,l;lF(this,a);for(var c=arguments.length,u=Array(c),p=0;p<c;p++)u[p]=arguments[p];return l=(i=(s=Jc(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(u))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},i),Jc(s,l)}return sF(a,[{key:"render",value:function(){return d.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},d.createElement(t,iF({},this.props,this.state)))}}]),a}(d.Component)},Zc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dF=13,fF=function(t){var r=t.color,n=t.style,a=t.onClick,o=a===void 0?function(){}:a,i=t.onHover,s=t.title,l=s===void 0?r:s,c=t.children,u=t.focus,p=t.focusStyle,g=p===void 0?{}:p,f=r==="transparent",b=ee({default:{swatch:Zc({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?g:{})}}),v=function(T){return o(r,T)},m=function(T){return T.keyCode===dF&&o(r,T)},x=function(T){return i(r,T)},S={};return i&&(S.onMouseOver=x),d.createElement("div",Zc({style:b.swatch,onClick:v,title:l,tabIndex:0,onKeyDown:m},S),c,f&&d.createElement(sn,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ur=uF(fF);var pF=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},hF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lh=function(t){var r=t.rgb,n=t.hsl,a=t.width,o=t.height,i=t.onChange,s=t.direction,l=t.style,c=t.renderers,u=t.pointer,p=t.className,g=p===void 0?"":p,f=ee({default:{picker:{position:"relative",width:a,height:o},alpha:{radius:"2px",style:l}}});return d.createElement("div",{style:f.picker,className:"alpha-picker "+g},d.createElement(hs,hF({},f.alpha,{rgb:r,hsl:n,pointer:u,renderers:c,onChange:i,direction:s})))};lh.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:pF};Ge(lh);function ch(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var gF="__lodash_hash_undefined__";function vF(e){return this.__data__.set(e,gF),this}function bF(e){return this.__data__.has(e)}function Pa(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Dt;++t<r;)this.add(e[t])}Pa.prototype.add=Pa.prototype.push=vF;Pa.prototype.has=bF;function mF(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function yF(e,t){return e.has(t)}var xF=1,wF=2;function uh(e,t,r,n,a,o){var i=r&xF,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var p=-1,g=!0,f=r&wF?new Pa:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var b=e[p],v=t[p];if(n)var m=i?n(v,b,p,t,e,o):n(b,v,p,e,t,o);if(m!==void 0){if(m)continue;g=!1;break}if(f){if(!mF(t,function(x,S){if(!yF(f,S)&&(b===x||a(b,x,r,n,o)))return f.push(S)})){g=!1;break}}else if(!(b===v||a(b,v,r,n,o))){g=!1;break}}return o.delete(e),o.delete(t),g}function SF(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function EF(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var CF=1,TF=2,$F="[object Boolean]",_F="[object Date]",AF="[object Error]",PF="[object Map]",OF="[object Number]",RF="[object RegExp]",kF="[object Set]",jF="[object String]",NF="[object Symbol]",FF="[object ArrayBuffer]",DF="[object DataView]",Qc=Ut?Ut.prototype:void 0,Mo=Qc?Qc.valueOf:void 0;function MF(e,t,r,n,a,o,i){switch(r){case DF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case FF:return!(e.byteLength!=t.byteLength||!o(new Ta(e),new Ta(t)));case $F:case _F:case OF:return Hn(+e,+t);case AF:return e.name==t.name&&e.message==t.message;case RF:case jF:return e==t+"";case PF:var s=SF;case kF:var l=n&CF;if(s||(s=EF),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;n|=TF,i.set(e,t);var u=uh(s(e),s(t),n,a,o,i);return i.delete(e),u;case NF:if(Mo)return Mo.call(e)==Mo.call(t)}return!1}function LF(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function IF(e,t,r){var n=t(e);return Je(e)?n:LF(n,r(e))}function BF(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function HF(){return[]}var zF=Object.prototype,WF=zF.propertyIsEnumerable,eu=Object.getOwnPropertySymbols,VF=eu?function(e){return e==null?[]:(e=Object(e),BF(eu(e),function(t){return WF.call(e,t)}))}:HF;function tu(e){return IF(e,Ss,VF)}var GF=1,UF=Object.prototype,YF=UF.hasOwnProperty;function KF(e,t,r,n,a,o){var i=r&GF,s=tu(e),l=s.length,c=tu(t),u=c.length;if(l!=u&&!i)return!1;for(var p=l;p--;){var g=s[p];if(!(i?g in t:YF.call(t,g)))return!1}var f=o.get(e),b=o.get(t);if(f&&b)return f==t&&b==e;var v=!0;o.set(e,t),o.set(t,e);for(var m=i;++p<l;){g=s[p];var x=e[g],S=t[g];if(n)var C=i?n(S,x,g,t,e,o):n(x,S,g,e,t,o);if(!(C===void 0?x===S||a(x,S,r,n,o):C)){v=!1;break}m||(m=g=="constructor")}if(v&&!m){var T=e.constructor,E=t.constructor;T!=E&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof E=="function"&&E instanceof E)&&(v=!1)}return o.delete(e),o.delete(t),v}var ci=cr(ft,"DataView"),ui=cr(ft,"Promise"),di=cr(ft,"Set"),fi=cr(ft,"WeakMap"),ru="[object Map]",qF="[object Object]",nu="[object Promise]",au="[object Set]",ou="[object WeakMap]",iu="[object DataView]",XF=lr(ci),JF=lr(On),ZF=lr(ui),QF=lr(di),eD=lr(fi),Ht=sr;(ci&&Ht(new ci(new ArrayBuffer(1)))!=iu||On&&Ht(new On)!=ru||ui&&Ht(ui.resolve())!=nu||di&&Ht(new di)!=au||fi&&Ht(new fi)!=ou)&&(Ht=function(e){var t=sr(e),r=t==qF?e.constructor:void 0,n=r?lr(r):"";if(n)switch(n){case XF:return iu;case JF:return ru;case ZF:return nu;case QF:return au;case eD:return ou}return t});var tD=1,su="[object Arguments]",lu="[object Array]",oa="[object Object]",rD=Object.prototype,cu=rD.hasOwnProperty;function nD(e,t,r,n,a,o){var i=Je(e),s=Je(t),l=i?lu:Ht(e),c=s?lu:Ht(t);l=l==su?oa:l,c=c==su?oa:c;var u=l==oa,p=c==oa,g=l==c;if(g&&_a(e)){if(!_a(t))return!1;i=!0,u=!1}if(g&&!u)return o||(o=new mt),i||xs(e)?uh(e,t,r,n,a,o):MF(e,t,l,r,n,a,o);if(!(r&tD)){var f=u&&cu.call(e,"__wrapped__"),b=p&&cu.call(t,"__wrapped__");if(f||b){var v=f?e.value():e,m=b?t.value():t;return o||(o=new mt),a(v,m,r,n,o)}}return g?(o||(o=new mt),KF(e,t,r,n,a,o)):!1}function Cs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Yt(e)&&!Yt(t)?e!==e&&t!==t:nD(e,t,r,n,Cs,a)}var aD=1,oD=2;function iD(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var i=r[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){i=r[a];var s=i[0],l=e[s],c=i[1];if(i[2]){if(l===void 0&&!(s in e))return!1}else{var u=new mt,p;if(!(p===void 0?Cs(c,l,aD|oD,n,u):p))return!1}}return!0}function dh(e){return e===e&&!nt(e)}function sD(e){for(var t=Ss(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,dh(a)]}return t}function fh(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function lD(e){var t=sD(e);return t.length==1&&t[0][2]?fh(t[0][0],t[0][1]):function(r){return r===e||iD(r,e,t)}}var cD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uD=/^\w*$/;function Ts(e,t){if(Je(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ja(e)?!0:uD.test(e)||!cD.test(e)||t!=null&&e in Object(t)}var dD="Expected a function";function $s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dD);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new($s.Cache||Dt),r}$s.Cache=Dt;var fD=500;function pD(e){var t=$s(e,function(n){return r.size===fD&&r.clear(),n}),r=t.cache;return t}var hD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gD=/\\(\\)?/g,vD=pD(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(hD,function(r,n,a,o){t.push(a?o.replace(gD,"$1"):n||r)}),t}),bD=1/0,uu=Ut?Ut.prototype:void 0,du=uu?uu.toString:void 0;function ph(e){if(typeof e=="string")return e;if(Je(e))return ch(e,ph)+"";if(Ja(e))return du?du.call(e):"";var t=e+"";return t=="0"&&1/e==-bD?"-0":t}function mD(e){return e==null?"":ph(e)}function hh(e,t){return Je(e)?e:Ts(e,t)?[e]:vD(mD(e))}var yD=1/0;function eo(e){if(typeof e=="string"||Ja(e))return e;var t=e+"";return t=="0"&&1/e==-yD?"-0":t}function gh(e,t){t=hh(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[eo(t[r++])];return r&&r==n?e:void 0}function xD(e,t,r){var n=e==null?void 0:gh(e,t);return n===void 0?r:n}function wD(e,t){return e!=null&&t in Object(e)}function SD(e,t,r){t=hh(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var i=eo(t[n]);if(!(o=e!=null&&r(e,i)))break;e=e[i]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&ys(a)&&ws(i,a)&&(Je(e)||$a(e)))}function ED(e,t){return e!=null&&SD(e,t,wD)}var CD=1,TD=2;function $D(e,t){return Ts(e)&&dh(t)?fh(eo(e),t):function(r){var n=xD(r,e);return n===void 0&&n===t?ED(r,e):Cs(t,n,CD|TD)}}function _D(e){return function(t){return t==null?void 0:t[e]}}function AD(e){return function(t){return gh(t,e)}}function PD(e){return Ts(e)?_D(eo(e)):AD(e)}function OD(e){return typeof e=="function"?e:e==null?Xa:typeof e=="object"?Je(e)?$D(e[0],e[1]):lD(e):PD(e)}function RD(e,t){var r=-1,n=cn(e)?Array(e.length):[];return oh(e,function(a,o,i){n[++r]=t(a,o,i)}),n}function dr(e,t){var r=Je(e)?ch:RD;return r(e,OD(t))}var kD=function(t){var r=t.colors,n=t.onClick,a=t.onSwatchHover,o=ee({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return d.createElement("div",{style:o.swatches},dr(r,function(i){return d.createElement(ur,{key:i,color:i,style:o.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+i}})}),d.createElement("div",{style:o.clear}))},_s=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,o=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=a==="transparent",f=function(m,x){qt(m)&&r({hex:m,source:"hex"},x)},b=ee(Ve({default:{card:{width:i,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Es(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":s==="hide"});return d.createElement("div",{style:b.card,className:"block-picker "+p},d.createElement("div",{style:b.triangle}),d.createElement("div",{style:b.head},g&&d.createElement(sn,{borderRadius:"6px 6px 0 0"}),d.createElement("div",{style:b.label},a)),d.createElement("div",{style:b.body},d.createElement(kD,{colors:o,onClick:f,onSwatchHover:n}),d.createElement(se,{style:{input:b.input},value:a,onChange:f})))};_s.propTypes={width:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.string),triangle:R.oneOf(["top","hide"]),styles:R.object};_s.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Ge(_s);var Cr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Tr={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},$r={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},_r={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Ar={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Pr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Or={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Rr={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},kr={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Cn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},jr={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Nr={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Fr={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Dr={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Mr={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Lr={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ir={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Br={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},vh=function(t){var r=t.color,n=t.onClick,a=t.onSwatchHover,o=t.hover,i=t.active,s=t.circleSize,l=t.circleSpacing,c=ee({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:o,active:i});return d.createElement("div",{style:c.swatch},d.createElement(ur,{style:c.Swatch,color:r,onClick:n,onHover:a,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+r}}))};vh.defaultProps={circleSize:28,circleSpacing:14};const jD=ps(vh);var As=function(t){var r=t.width,n=t.onChange,a=t.onSwatchHover,o=t.colors,i=t.hex,s=t.circleSize,l=t.styles,c=l===void 0?{}:l,u=t.circleSpacing,p=t.className,g=p===void 0?"":p,f=ee(Ve({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-u,marginBottom:-u}}},c)),b=function(m,x){return n({hex:m,source:"hex"},x)};return d.createElement("div",{style:f.card,className:"circle-picker "+g},dr(o,function(v){return d.createElement(jD,{key:v,color:v,onClick:b,onSwatchHover:a,active:i===v.toLowerCase(),circleSize:s,circleSpacing:u})}))};As.propTypes={width:R.oneOfType([R.string,R.number]),circleSize:R.number,circleSpacing:R.number,styles:R.object};As.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Cr[500],Tr[500],$r[500],_r[500],Ar[500],Pr[500],Or[500],Rr[500],kr[500],Cn[500],jr[500],Nr[500],Fr[500],Dr[500],Mr[500],Lr[500],Ir[500],Br[500]],styles:{}};Ge(As);function fu(e){return e===void 0}var bh={};Object.defineProperty(bh,"__esModule",{value:!0});var pu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ND=d,hu=FD(ND);function FD(e){return e&&e.__esModule?e:{default:e}}function DD(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var ia=24,MD=bh.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?ia:n,o=e.height,i=o===void 0?ia:o,s=e.style,l=s===void 0?{}:s,c=DD(e,["fill","width","height","style"]);return hu.default.createElement("svg",pu({viewBox:"0 0 "+ia+" "+ia,style:pu({fill:r,width:a,height:i},l)},c),hu.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},LD=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function ID(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function HD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var mh=function(e){HD(t,e);function t(r){ID(this,t);var n=BD(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,o){a.hex?qt(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},o):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},o):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},o)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(fu(a.s)?n.props.hsl.s:a.s),l:Number(fu(a.l)?n.props.hsl.l:a.l),source:"hsl"},o))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return LD(t,[{key:"render",value:function(){var n=this,a=ee({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),d.createElement("div",{style:a.alpha},d.createElement(se,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:a.alpha},d.createElement(se,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),d.createElement("div",{style:a.wrap,className:"flexbox-fix"},o,d.createElement("div",{style:a.toggle},d.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},d.createElement(MD,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),t}(d.Component);mh.defaultProps={view:"hex"};var gu=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},zD=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return d.createElement("div",{style:t.picker})},Ps=function(t){var r=t.width,n=t.onChange,a=t.disableAlpha,o=t.rgb,i=t.hsl,s=t.hsv,l=t.hex,c=t.renderers,u=t.styles,p=u===void 0?{}:u,g=t.className,f=g===void 0?"":g,b=t.defaultView,v=ee(Ve({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:a});return d.createElement("div",{style:v.picker,className:"chrome-picker "+f},d.createElement("div",{style:v.saturation},d.createElement(Za,{style:v.Saturation,hsl:i,hsv:s,pointer:zD,onChange:n})),d.createElement("div",{style:v.body},d.createElement("div",{style:v.controls,className:"flexbox-fix"},d.createElement("div",{style:v.color},d.createElement("div",{style:v.swatch},d.createElement("div",{style:v.active}),d.createElement(sn,{renderers:c}))),d.createElement("div",{style:v.toggles},d.createElement("div",{style:v.hue},d.createElement(ln,{style:v.Hue,hsl:i,pointer:gu,onChange:n})),d.createElement("div",{style:v.alpha},d.createElement(hs,{style:v.Alpha,rgb:o,hsl:i,pointer:gu,renderers:c,onChange:n})))),d.createElement(mh,{rgb:o,hsl:i,hex:l,view:b,onChange:n,disableAlpha:a})))};Ps.propTypes={width:R.oneOfType([R.string,R.number]),disableAlpha:R.bool,styles:R.object,defaultView:R.oneOf(["hex","rgb","hsl"])};Ps.defaultProps={width:225,disableAlpha:!1,styles:{}};Ge(Ps);var WD=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=t.active,s=ee({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Es(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:i,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(ur,{style:s.color,color:r,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:s.dot}))},VD=function(t){var r=t.hex,n=t.rgb,a=t.onChange,o=ee({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),i=function(l,c){l.r||l.g||l.b?a({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},c):a({hex:l.hex,source:"hex"},c)};return d.createElement("div",{style:o.fields,className:"flexbox-fix"},d.createElement("div",{style:o.active}),d.createElement(se,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:r,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:i}))},Os=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.colors,o=t.hex,i=t.rgb,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(Ve({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),g=function(b,v){b.hex?qt(b.hex)&&r({hex:b.hex,source:"hex"},v):r(b,v)};return d.createElement(zn,{style:p.Compact,styles:l},d.createElement("div",{style:p.compact,className:"compact-picker "+u},d.createElement("div",null,dr(a,function(f){return d.createElement(WD,{key:f,color:f,active:f.toLowerCase()===o,onClick:g,onSwatchHover:n})}),d.createElement("div",{style:p.clear})),d.createElement(VD,{hex:o,rgb:i,onChange:g})))};Os.propTypes={colors:R.arrayOf(R.string),styles:R.object};Os.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ge(Os);var GD=function(t){var r=t.hover,n=t.color,a=t.onClick,o=t.onSwatchHover,i={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=ee({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:i}},{hover:r});return d.createElement("div",{style:s.swatch},d.createElement(ur,{color:n,onClick:a,onHover:o,focusStyle:i}))};const UD=ps(GD);var Rs=function(t){var r=t.width,n=t.colors,a=t.onChange,o=t.onSwatchHover,i=t.triangle,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(Ve({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right","bottom-left-triangle":i==="bottom-left","bottom-right-triangle":i==="bottom-right"}),g=function(b,v){return a({hex:b,source:"hex"},v)};return d.createElement("div",{style:p.card,className:"github-picker "+u},d.createElement("div",{style:p.triangleShadow}),d.createElement("div",{style:p.triangle}),dr(n,function(f){return d.createElement(UD,{color:f,key:f,onClick:g,onSwatchHover:o})}))};Rs.propTypes={width:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.string),triangle:R.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:R.object};Rs.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ge(Rs);var YD=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},KD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks=function(t){var r=t.width,n=t.height,a=t.onChange,o=t.hsl,i=t.direction,s=t.pointer,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},c)),f=function(v){return a({a:1,h:v.h,l:.5,s:1})};return d.createElement("div",{style:g.picker,className:"hue-picker "+p},d.createElement(ln,KD({},g.hue,{hsl:o,pointer:s,onChange:f,direction:i})))};ks.propTypes={styles:R.object};ks.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:YD,styles:{}};Ge(ks);var qD=function(t){var r=t.onChange,n=t.hex,a=t.rgb,o=t.styles,i=o===void 0?{}:o,s=t.className,l=s===void 0?"":s,c=ee(Ve({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},i)),u=function(g,f){g.hex?qt(g.hex)&&r({hex:g.hex,source:"hex"},f):(g.r||g.g||g.b)&&r({r:g.r||a.r,g:g.g||a.g,b:g.b||a.b,source:"rgb"},f)};return d.createElement(zn,{styles:i},d.createElement("div",{style:c.material,className:"material-picker "+l},d.createElement(se,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:u}),d.createElement("div",{style:c.split,className:"flexbox-fix"},d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:a.r,onChange:u})),d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:a.g,onChange:u})),d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:a.b,onChange:u})))))};Ge(qD);var XD=function(t){var r=t.onChange,n=t.rgb,a=t.hsv,o=t.hex,i=ee({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(c,u){c["#"]?qt(c["#"])&&r({hex:c["#"],source:"hex"},u):c.r||c.g||c.b?r({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,source:"rgb"},u):(c.h||c.s||c.v)&&r({h:c.h||a.h,s:c.s||a.s,v:c.v||a.v,source:"hsv"},u)};return d.createElement("div",{style:i.fields},d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"h",value:Math.round(a.h),onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(se,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"#",value:o.replace("#",""),onChange:s}),d.createElement("div",{style:i.fieldSymbols},d.createElement("div",{style:i.symbol},"°"),d.createElement("div",{style:i.symbol},"%"),d.createElement("div",{style:i.symbol},"%")))},JD=function(t){var r=t.hsl,n=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return d.createElement("div",{style:n.picker})},ZD=function(){var t=ee({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return d.createElement("div",{style:t.pointer},d.createElement("div",{style:t.left},d.createElement("div",{style:t.leftInside})),d.createElement("div",{style:t.right},d.createElement("div",{style:t.rightInside})))},vu=function(t){var r=t.onClick,n=t.label,a=t.children,o=t.active,i=ee({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return d.createElement("div",{style:i.button,onClick:r},n||a)},QD=function(t){var r=t.rgb,n=t.currentColor,a=ee({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return d.createElement("div",null,d.createElement("div",{style:a.label},"new"),d.createElement("div",{style:a.swatches},d.createElement("div",{style:a.new}),d.createElement("div",{style:a.current})),d.createElement("div",{style:a.label},"current"))},e5=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function t5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function n5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var js=function(e){n5(t,e);function t(r){t5(this,t);var n=r5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:r.hex},n}return e5(t,[{key:"render",value:function(){var n=this.props,a=n.styles,o=a===void 0?{}:a,i=n.className,s=i===void 0?"":i,l=ee(Ve({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return d.createElement("div",{style:l.picker,className:"photoshop-picker "+s},d.createElement("div",{style:l.head},this.props.header),d.createElement("div",{style:l.body,className:"flexbox-fix"},d.createElement("div",{style:l.saturation},d.createElement(Za,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:JD,onChange:this.props.onChange})),d.createElement("div",{style:l.hue},d.createElement(ln,{direction:"vertical",hsl:this.props.hsl,pointer:ZD,onChange:this.props.onChange})),d.createElement("div",{style:l.controls},d.createElement("div",{style:l.top,className:"flexbox-fix"},d.createElement("div",{style:l.previews},d.createElement(QD,{rgb:this.props.rgb,currentColor:this.state.currentColor})),d.createElement("div",{style:l.actions},d.createElement(vu,{label:"OK",onClick:this.props.onAccept,active:!0}),d.createElement(vu,{label:"Cancel",onClick:this.props.onCancel}),d.createElement(XD,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(d.Component);js.propTypes={header:R.string,styles:R.object};js.defaultProps={header:"Color Picker",styles:{}};Ge(js);var a5=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,o=t.hex,i=t.disableAlpha,s=ee({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:i}),l=function(u,p){u.hex?qt(u.hex)&&r({hex:u.hex,source:"hex"},p):u.r||u.g||u.b?r({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,a:n.a,source:"rgb"},p):u.a&&(u.a<0?u.a=0:u.a>100&&(u.a=100),u.a/=100,r({h:a.h,s:a.s,l:a.l,a:u.a,source:"rgb"},p))};return d.createElement("div",{style:s.fields,className:"flexbox-fix"},d.createElement("div",{style:s.double},d.createElement(se,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.alpha},d.createElement(se,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},o5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yh=function(t){var r=t.colors,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=ee({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),s=function(c,u){a({hex:c,source:"hex"},u)};return d.createElement("div",{style:i.colors,className:"flexbox-fix"},r.map(function(l){var c=typeof l=="string"?{color:l}:l,u=""+c.color+(c.title||"");return d.createElement("div",{key:u,style:i.swatchWrap},d.createElement(ur,o5({},c,{style:i.swatch,onClick:s,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+c.color}})))}))};yh.propTypes={colors:R.arrayOf(R.oneOfType([R.string,R.shape({color:R.string,title:R.string})])).isRequired};var i5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ns=function(t){var r=t.width,n=t.rgb,a=t.hex,o=t.hsv,i=t.hsl,s=t.onChange,l=t.onSwatchHover,c=t.disableAlpha,u=t.presetColors,p=t.renderers,g=t.styles,f=g===void 0?{}:g,b=t.className,v=b===void 0?"":b,m=ee(Ve({default:i5({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},f),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},f),{disableAlpha:c});return d.createElement("div",{style:m.picker,className:"sketch-picker "+v},d.createElement("div",{style:m.saturation},d.createElement(Za,{style:m.Saturation,hsl:i,hsv:o,onChange:s})),d.createElement("div",{style:m.controls,className:"flexbox-fix"},d.createElement("div",{style:m.sliders},d.createElement("div",{style:m.hue},d.createElement(ln,{style:m.Hue,hsl:i,onChange:s})),d.createElement("div",{style:m.alpha},d.createElement(hs,{style:m.Alpha,rgb:n,hsl:i,renderers:p,onChange:s}))),d.createElement("div",{style:m.color},d.createElement(sn,null),d.createElement("div",{style:m.activeColor}))),d.createElement(a5,{rgb:n,hsl:i,hex:a,onChange:s,disableAlpha:c}),d.createElement(yh,{colors:u,onClick:s,onSwatchHover:l}))};Ns.propTypes={disableAlpha:R.bool,width:R.oneOfType([R.string,R.number]),styles:R.object};Ns.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const s5=Ge(Ns);var xn=function(t){var r=t.hsl,n=t.offset,a=t.onClick,o=a===void 0?function(){}:a,i=t.active,s=t.first,l=t.last,c=ee({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:i,first:s,last:l}),u=function(g){return o({h:r.h,s:.5,l:n,source:"hsl"},g)};return d.createElement("div",{style:c.swatch,onClick:u})},l5=function(t){var r=t.onClick,n=t.hsl,a=ee({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return d.createElement("div",{style:a.swatches},d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<o&&Math.abs(n.s-.5)<o,onClick:r,first:!0})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<o&&Math.abs(n.s-.5)<o,onClick:r,last:!0})),d.createElement("div",{style:a.clear}))},c5=function(){var t=ee({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},Fs=function(t){var r=t.hsl,n=t.onChange,a=t.pointer,o=t.styles,i=o===void 0?{}:o,s=t.className,l=s===void 0?"":s,c=ee(Ve({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},i));return d.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},d.createElement("div",{style:c.hue},d.createElement(ln,{style:c.Hue,hsl:r,pointer:a,onChange:n})),d.createElement("div",{style:c.swatches},d.createElement(l5,{hsl:r,onClick:n})))};Fs.propTypes={styles:R.object};Fs.defaultProps={pointer:c5,styles:{}};Ge(Fs);var xh={};Object.defineProperty(xh,"__esModule",{value:!0});var bu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u5=d,mu=d5(u5);function d5(e){return e&&e.__esModule?e:{default:e}}function f5(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var sa=24,p5=xh.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?sa:n,o=e.height,i=o===void 0?sa:o,s=e.style,l=s===void 0?{}:s,c=f5(e,["fill","width","height","style"]);return mu.default.createElement("svg",bu({viewBox:"0 0 "+sa+" "+sa,style:bu({fill:r,width:a,height:i},l)},c),mu.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},h5=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=t.first,s=t.last,l=t.active,c=ee({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:Es(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:i,last:s,active:l,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(ur,{color:r,style:c.color,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:c.check},d.createElement(p5,null)))},g5=function(t){var r=t.onClick,n=t.onSwatchHover,a=t.group,o=t.active,i=ee({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return d.createElement("div",{style:i.group},dr(a,function(s,l){return d.createElement(h5,{key:s,color:s,active:s.toLowerCase()===o,first:l===0,last:l===a.length-1,onClick:r,onSwatchHover:n})}))},Ds=function(t){var r=t.width,n=t.height,a=t.onChange,o=t.onSwatchHover,i=t.colors,s=t.hex,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),f=function(v,m){return a({hex:v,source:"hex"},m)};return d.createElement("div",{style:g.picker,className:"swatches-picker "+p},d.createElement(zn,null,d.createElement("div",{style:g.overflow},d.createElement("div",{style:g.body},dr(i,function(b){return d.createElement(g5,{key:b.toString(),group:b,active:s,onClick:f,onSwatchHover:o})}),d.createElement("div",{style:g.clear})))))};Ds.propTypes={width:R.oneOfType([R.string,R.number]),height:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.arrayOf(R.string)),styles:R.object};Ds.defaultProps={width:320,height:240,colors:[[Cr[900],Cr[700],Cr[500],Cr[300],Cr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[$r[900],$r[700],$r[500],$r[300],$r[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Ar[900],Ar[700],Ar[500],Ar[300],Ar[100]],[Pr[900],Pr[700],Pr[500],Pr[300],Pr[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],["#194D33",Cn[700],Cn[500],Cn[300],Cn[100]],[jr[900],jr[700],jr[500],jr[300],jr[100]],[Nr[900],Nr[700],Nr[500],Nr[300],Nr[100]],[Fr[900],Fr[700],Fr[500],Fr[300],Fr[100]],[Dr[900],Dr[700],Dr[500],Dr[300],Dr[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],[Lr[900],Lr[700],Lr[500],Lr[300],Lr[100]],[Ir[900],Ir[700],Ir[500],Ir[300],Ir[100]],[Br[900],Br[700],Br[500],Br[300],Br[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ge(Ds);var Ms=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,o=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{card:{width:i,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),f=function(v,m){qt(v)&&r({hex:v,source:"hex"},m)};return d.createElement("div",{style:g.card,className:"twitter-picker "+p},d.createElement("div",{style:g.triangleShadow}),d.createElement("div",{style:g.triangle}),d.createElement("div",{style:g.body},dr(o,function(b,v){return d.createElement(ur,{key:v,color:b,hex:b,style:g.swatch,onClick:f,onHover:n,focusStyle:{boxShadow:"0 0 4px "+b}})}),d.createElement("div",{style:g.hash},"#"),d.createElement(se,{label:null,style:{input:g.input},value:a.replace("#",""),onChange:f}),d.createElement("div",{style:g.clear})))};Ms.propTypes={width:R.oneOfType([R.string,R.number]),triangle:R.oneOf(["hide","top-left","top-right"]),colors:R.arrayOf(R.string),styles:R.object};Ms.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Ge(Ms);var Ls=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return d.createElement("div",{style:r.picker})};Ls.propTypes={hsl:R.shape({h:R.number,s:R.number,l:R.number,a:R.number})};Ls.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Is=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return d.createElement("div",{style:r.picker})};Is.propTypes={hsl:R.shape({h:R.number,s:R.number,l:R.number,a:R.number})};Is.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var v5=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,o=t.hex,i=t.hsv,s=function(f,b){if(f.hex)qt(f.hex)&&r({hex:f.hex,source:"hex"},b);else if(f.rgb){var v=f.rgb.split(",");Do(f.rgb,"rgb")&&r({r:v[0],g:v[1],b:v[2],a:1,source:"rgb"},b)}else if(f.hsv){var m=f.hsv.split(",");Do(f.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),r({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},b))}else if(f.hsl){var x=f.hsl.split(",");Do(f.hsl,"hsl")&&(x[2]=x[2].replace("%",""),x[1]=x[1].replace("%",""),x[0]=x[0].replace("°",""),p[1]==1?p[1]=.01:p[2]==1&&(p[2]=.01),r({h:Number(x[0]),s:Number(x[1]),v:Number(x[2]),source:"hsl"},b))}},l=ee({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,u=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",p=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.v*100)+"%";return d.createElement("div",{style:l.wrap,className:"flexbox-fix"},d.createElement("div",{style:l.fields},d.createElement("div",{style:l.double},d.createElement(se,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:s})),d.createElement("div",{style:l.column},d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:s})),d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"hsv",value:p,onChange:s})),d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"hsl",value:u,onChange:s})))))},Bs=function(t){var r=t.width,n=t.onChange,a=t.rgb,o=t.hsl,i=t.hsv,s=t.hex,l=t.header,c=t.styles,u=c===void 0?{}:c,p=t.className,g=p===void 0?"":p,f=ee(Ve({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return d.createElement("div",{style:f.picker,className:"google-picker "+g},d.createElement("div",{style:f.head},l),d.createElement("div",{style:f.swatch}),d.createElement("div",{style:f.saturation},d.createElement(Za,{hsl:o,hsv:i,pointer:Ls,onChange:n})),d.createElement("div",{style:f.body},d.createElement("div",{style:f.controls,className:"flexbox-fix"},d.createElement("div",{style:f.hue},d.createElement(ln,{style:f.Hue,hsl:o,radius:"4px",pointer:Is,onChange:n}))),d.createElement(v5,{rgb:a,hsl:o,hex:s,hsv:i,onChange:n})))};Bs.propTypes={width:R.oneOfType([R.string,R.number]),styles:R.object,header:R.string};Bs.defaultProps={width:652,styles:{},header:"Color picker"};Ge(Bs);const b5=({field:e,value:t,onChange:r})=>{const[n,a]=d.useState(!1),o=m5(t);return h.jsx(h.Fragment,{children:h.jsxs(Te.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[h.jsx("div",{style:o.swatch,onClick:()=>a(i=>!i),children:h.jsx("div",{style:o.color})}),n&&h.jsxs("div",{style:o.popover,children:[h.jsx("div",{style:o.cover,onClick:()=>a(!1)}),h.jsx(s5,{disableAlpha:!0,color:t,onChange:i=>{r(i.hex)}})]})]})})},m5=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),y5=({label:e,onChange:t,value:r,options:n})=>{var c;const[a,o]=d.useState(!1),i=()=>{o(!a)},s=u=>{t(u),o(!1)},l=((c=n.find(u=>u.value===r))==null?void 0:c.label)??"Choose a font";return h.jsx(Te.FieldLabel,{label:e,icon:h.jsx(zi,{size:16}),children:h.jsxs("div",{style:{position:"relative"},children:[h.jsx("button",{onClick:i,className:"font-select",style:{fontFamily:r},children:l}),a&&h.jsx("div",{className:"font-select-dropdown",children:n.map(u=>h.jsx("button",{value:u.value,onClick:p=>{p.preventDefault(),s(u.value)},style:{fontFamily:u.value,backgroundColor:u.value===r?"var(--puck-color-grey-09)":""},className:"font-select-option",children:u.label},u.value))})]})})},x5=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([r,n])=>{if("type"in n){const a=yu(n,n.plugin);a&&(t.objectFields[r]=a)}else{const a={label:n.label,type:"object",objectFields:{}};for(const o in n.styles)a.objectFields[o]=yu(n.styles[o],n.plugin);t.objectFields[r]=a}}),t},yu=(e,t)=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return t==="fontFamily"?{label:e.label,type:"custom",options:e.options,render:d.useCallback(({onChange:r,value:n})=>y5({label:e.label,options:typeof e.options=="function"?e.options():e.options,value:n,onChange:r}),[])}:{label:e.label,type:"select",options:typeof e.options=="function"?e.options():e.options};case"color":return{label:e.label,type:"custom",render:b5}}},w5=(e,t,r="")=>{const n={};return Object.entries(t.styles).forEach(([a,o])=>{if("type"in o){const i=e==null?void 0:e[`--${o.plugin}-${r}-${a}`];n[a]=xu(o,i)}else{const i={};for(const s in o.styles){const l=o.styles[s],c=e==null?void 0:e[`--${o.plugin}-${r}-${a}-${s}`];i[s]=xu(l,c)}n[a]=i}}),n},xu=(e,t)=>{if(t)if(e.type==="number"){const r=Number.parseInt(t);return isNaN(r)?e.default:r}else return t;else return e.default},S5=e=>{var l,c;const{themeConfig:t,themeHistoriesRef:r,onThemeChange:n}=e;if(!r.current)return;if(!t)return h.jsx("div",{children:h.jsx(Zo,{children:h.jsx(Qo,{children:"Please contact your developer to set up theme management."})})});const[a,o]=d.useState(Object.keys(t).reduce((u,p)=>({...u,[p]:!0}),{})),i=u=>{o(p=>({...p,[u]:!p[u]}))},s=(c=r.current)==null?void 0:c.histories[(l=r.current)==null?void 0:l.index].data;return h.jsxs("div",{children:[h.jsx(Zo,{children:h.jsx(Qo,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([u,p])=>{const g=x5(p),f=w5(s,p,u),b=a[u];return h.jsxs("div",{className:"theme-field",children:[h.jsxs("button",{className:"ve-flex ve-items-center ve-w-full ve-justify-between",onClick:()=>i(u),children:[`${g.label??""}`,h.jsx("div",{children:b?h.jsx(zi,{size:12}):h.jsx(Km,{size:12})})]}),!b&&h.jsx(Te.AutoField,{field:g,onChange:v=>n(u,p,v),value:f})]},u)})]})},E5=e=>{var c,u;const{isDevMode:t,setThemeHistories:r,onPublishTheme:n,themeConfig:a,themeHistories:o,clearThemeHistory:i,puckInitialHistory:s}=e,{history:{setHistories:l}}=Te.usePuck();return d.useEffect(()=>{l((s==null?void 0:s.histories)||[])},[s]),d.useEffect(()=>{const p=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");p&&(p.style.display="none");const g=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");g&&(g.style.display="none")},[]),h.jsxs("header",{className:"puck-header",children:[h.jsxs("div",{className:"header-left",children:[h.jsx(Gd,{}),h.jsx(Qd,{})]}),h.jsx("div",{className:"header-center"}),h.jsxs("div",{className:"actions",children:[h.jsx(rp,{disabled:((c=o==null?void 0:o.histories)==null?void 0:c.length)===1,onClearLocalChanges:()=>{var p,g,f,b,v,m;i(),a&&_n((g=(p=o==null?void 0:o.histories)==null?void 0:p[0])==null?void 0:g.data,a),r({histories:[{id:((b=(f=o==null?void 0:o.histories)==null?void 0:f[0])==null?void 0:b.id)??"",data:((m=(v=o==null?void 0:o.histories)==null?void 0:v[0])==null?void 0:m.data)??{}}],index:0})}}),!t&&h.jsx(Pt,{variant:"secondary",disabled:((u=o==null?void 0:o.histories)==null?void 0:u.length)===1,onClick:async()=>{await n()},children:"Publish"})]})]})},Lo=new ze,C5=({puckConfig:e,puckInitialHistory:t,isLoading:r,templateMetadata:n,publishTheme:a,themeConfig:o,saveThemeSaveState:i,themeHistories:s,setThemeHistories:l,clearThemeHistory:c,sendDevThemeSaveStateData:u,buildThemeLocalStorageKey:p})=>{const[g,f]=d.useState(!1),b=d.useRef(s);d.useEffect(()=>{b.current=s},[s]);const v=async()=>{if(Lo.logFunc("saveThemeData"),!s)return;const C=s.histories[s.index];a({payload:{saveThemeData:JSON.stringify(C.data)}}),c(),l({histories:[C],index:0})},m=(C,T,E)=>{var j,G,U,te;if(!b.current||!o)return;const _={...(j=b.current.histories[b.current.index])==null?void 0:j.data,...vg(E,C,T)},P={histories:[...b.current.histories,{id:mi.v4(),data:_}],index:b.current.histories.length};window.localStorage.setItem(p(),JSON.stringify(P.histories)),n.isDevMode&&!n.devOverride?(Lo.logFunc("sendDevThemeSaveStateData"),u({payload:{devThemeSaveStateData:JSON.stringify((G=P.histories[P.index])==null?void 0:G.data)}})):(Lo.logFunc("saveTheme"),i({payload:{history:JSON.stringify((U=P.histories[P.index])==null?void 0:U.data),hash:(te=P.histories[P.index])==null?void 0:te.id}})),_n(_,o),l(P)},x=async()=>{if(!r&&!g){f(!0);return}},S=d.useCallback(()=>h.jsx(S5,{themeHistoriesRef:b,themeConfig:o,onThemeChange:m}),[]);return h.jsx(Hd,{children:h.jsx(Te.Puck,{config:e,data:{},initialHistory:t,onChange:x,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>h.jsx(E5,{themeConfig:o,themeHistories:s,onPublishTheme:v,isDevMode:n.isDevMode,setThemeHistories:l,clearThemeHistory:c,puckInitialHistory:t}),actionBar:()=>h.jsx(h.Fragment,{}),components:()=>h.jsx(h.Fragment,{}),fields:S}})})},T5=()=>{const{sendToParent:e}=it("saveThemeSaveState",Pe),{sendToParent:t}=it("deleteThemeSaveState",Pe),{sendToParent:r}=it("publishTheme",Pe);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishTheme:r}},$5=new ze,_5=()=>{const{iFrameLoaded:e}=ar();d.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,r]=d.useState(void 0),[n,a]=d.useState(!1);return zt("getThemeSaveState",Pe,(o,i)=>{let s;i!=null&&i.history&&(s={hash:i.hash,history:ha(i.history)}),$5.logData("THEME_SAVE_STATE",s),r(s),a(!0),o({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:n}},Ie=new ze,A5=e=>{const{puckConfig:t,templateMetadata:r,layoutData:n,themeData:a,themeConfig:o}=e,{sendDevLayoutSaveStateData:i,sendDevThemeSaveStateData:s}=ar(),{saveThemeSaveState:l,publishTheme:c,deleteThemeSaveState:u}=T5(),{themeSaveState:p,themeSaveStateFetched:g}=_5(),{buildThemeLocalStorageKey:f,clearThemeLocalStorage:b}=ap(r),{buildVisualConfigLocalStorageKey:v}=np(r),[m,x]=d.useState(),[S,C]=d.useState(!1),[T,E]=d.useState(),[_,P]=d.useState(!1),j=d.useCallback(()=>{if(!r)return;Ie.logFunc("loadPuckInitialHistory");const V=window.localStorage.getItem(v());if(r.isDevMode&&V){const W=JSON.parse(V),oe=W.length-1;if(oe>=0){Ie.log("Theme Dev Mode - Using layout data from local storage"),x({histories:W.map(J=>({id:J.id,state:{data:{...J.state.data}}})),index:oe,appendData:!1});const z=m==null?void 0:m.histories[m.histories.length-1].state.data;i({payload:{devSaveStateData:JSON.stringify(z)}})}C(!0);return}n&&x({histories:[{id:"root",state:{data:n}}],appendData:!1}),C(!0)},[x,C,n]),G=d.useCallback(()=>{if(!r)return;if(Ie.logFunc("loadThemeHistory"),Ie.logData("THEME_DATA",a),Ie.logData("THEME_SAVE_STATE",p),r.isDevMode&&!r.devOverride){const oe=window.localStorage.getItem(f());if(oe){Ie.log("Theme Dev Mode - Using theme localStorage");const z=JSON.parse(oe),J=z.length-1;E({histories:z,index:J}),P(!0);return}Ie.log("Theme Dev Mode - No localStorage. Using theme data from Content"),a&&E({histories:[{id:"root",data:a}],index:0}),P(!0);return}if(!p){b(),Ie.log("Theme Prod Mode - No saveState. Using theme data from Content"),a&&E({histories:[{id:"root",data:a}],index:0}),P(!0);return}const V=window.localStorage.getItem(f());if(!V){Ie.log("Theme Prod Mode - No localStorage. Using themeSaveState"),E({histories:a?[{id:"root",data:a},{id:p.hash,data:p.history.data}]:[{id:p.hash,data:p.history.data}],index:a?1:0}),P(!0);return}const W=JSON.parse(V).findIndex(oe=>oe.id===(p==null?void 0:p.hash));if(W!==-1){Ie.log("Theme Prod Mode - Using localStorage theme data"),E({histories:JSON.parse(V),index:W}),P(!0);return}b()},[E,P,b,f]);d.useEffect(()=>{var V;Ie.logData("THEME_HISTORIES",T),T&&o&&_n((V=T.histories[T.index])==null?void 0:V.data,o)},[T,o]),d.useEffect(()=>{g&&(j(),G())},[r,g,n]),d.useEffect(()=>{m&&Ie.logData("PUCK_INITIAL_HISTORY",m)},[m]);const U=()=>{Ie.logFunc("clearHistory"),b(),u()};d.useEffect(()=>{var W;if(!_)return;const V=(W=T==null?void 0:T.histories[T.index])==null?void 0:W.data;Ie.logFunc("sendDevThemeSaveStateData useEffect"),s({payload:{devThemeSaveStateData:JSON.stringify(V)}})},[_,T,r]);const te=!S||!_||!g,B=60+(S+_+g)*13.33;return te?h.jsx(Ai,{progress:B}):h.jsx(C5,{puckConfig:t,puckInitialHistory:m,isLoading:te,templateMetadata:r,publishTheme:c,themeConfig:o,saveThemeSaveState:l,themeHistories:T,setThemeHistories:E,clearThemeHistory:U,sendDevThemeSaveStateData:s,buildThemeLocalStorageKey:f})},P5=new ze,O5=({document:e,componentRegistry:t,themeConfig:r})=>{e&&P5.logData("DOCUMENT",e);const[n,a]=d.useState(void 0),[o,i]=d.useState(void 0),[s,l]=d.useState(!1),{templateMetadata:c,puckConfig:u,layoutData:p,layoutDataFetched:g,themeData:f,themeDataFetched:b}=Zv(t),{pushPageSets:v}=ar();Jv(),d.useEffect(()=>{if(typeof window<"u"){const S=window.location.ancestorOrigins;S.length===0||!S[0].includes("pagescdn")&&!S[0].includes("yext.com")&&!S[0].includes("localhost")?window.location.assign("/404.html"):l(!0)}},[]),d.useEffect(()=>{if(c!=null&&c.isDevMode)try{a(pageSets),i(siteStream)}catch{console.warn("pageSets are not defined")}},[c==null?void 0:c.isDevMode]),d.useEffect(()=>{typeof window<"u"&&(c!=null&&c.isDevMode)&&n&&v({payload:{...n,siteStream:o}})},[c==null?void 0:c.isDevMode,n]);const m=!u||!c||!e||!g||!b,x=60*((!!u+!!c+!!e+g+b)/5);return h.jsxs(h.Fragment,{children:[m?s&&h.jsx(Ai,{progress:x}):c.isThemeMode?h.jsx(A5,{puckConfig:u,templateMetadata:c,layoutData:p,themeData:f,themeConfig:r}):h.jsx(Ky,{puckConfig:u,templateMetadata:c,layoutData:p,themeData:f,themeConfig:r}),h.jsx(Xv,{closeButton:!0,richColors:!0})]})},R5=["uid","meta","slug"],k5=[],wh=e=>Sh(e,""),Sh=(e,t)=>{var a,o,i;const r=t?`${t}.${e.name}`:e.name;if(k5.includes(Eh(e)))return[{name:r,schemaField:e}];if(e.definition.isList)return[{name:r,schemaField:e}];const n=[{name:r,schemaField:e}];if((a=e.children)!=null&&a.fields&&((i=(o=e.children)==null?void 0:o.fields)==null?void 0:i.length)>0)for(const s of e.children.fields)n.push(...Sh(s,r));return n},Eh=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function j5(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const N5=e=>e.reduce((t,r)=>{const n=wh(r);for(const a of n){const o=Eh(a.schemaField);o&&(t=j5(t,o,a.name))}return t},new Map),F5=e=>{let r=Du().filter(a=>!R5.includes(a.name));if(e!=null&&e.allowList){const a=r.map(o=>o.name);e.allowList.forEach(o=>{a.includes(o)||console.warn(`The entity field filter allowList included ${o}, which does not exist in the stream.`)}),r=r.filter(o=>e.allowList.includes(o.name))}e!=null&&e.disallowList&&(r=r.filter(a=>!e.disallowList.includes(a.name)));let n=[];for(const a of r){const o=wh(a);for(const i of o)n.push({...i.schemaField,name:i.name})}if(e!=null&&e.types){const a=N5(n),o=[];e.types.forEach(i=>{o.push(...n.filter(s=>{var l;return(l=a.get(i))==null?void 0:l.includes(s.name)}))}),n=o}return n=n.filter(a=>!!a.definition.isList==!!(e!=null&&e.includeListsOnly)),n};function D5(e){const t=e+"CollectionProvider",[r,n]=Oa(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:b,children:v}=f,m=d.useRef(null),x=d.useRef(new Map).current;return h.jsx(a,{scope:b,itemMap:x,collectionRef:m,children:v})};i.displayName=t;const s=e+"CollectionSlot",l=d.forwardRef((f,b)=>{const{scope:v,children:m}=f,x=o(s,v),S=Re(b,x.collectionRef);return h.jsx(Qt,{ref:S,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",p=d.forwardRef((f,b)=>{const{scope:v,children:m,...x}=f,S=d.useRef(null),C=Re(b,S),T=o(c,v);return d.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>void T.itemMap.delete(S))),h.jsx(Qt,{[u]:"",ref:C,children:m})});p.displayName=c;function g(f){const b=o(e+"CollectionConsumer",f);return d.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const x=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((T,E)=>x.indexOf(T.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},g,n]}var M5=y.createContext(void 0);function Ch(e){const t=y.useContext(M5);return e||t||"ltr"}var Io="rovingFocusGroup.onEntryFocus",L5={bubbles:!1,cancelable:!0},to="RovingFocusGroup",[pi,Th,I5]=D5(to),[B5,$h]=Oa(to,[I5]),[H5,z5]=B5(to),_h=y.forwardRef((e,t)=>h.jsx(pi.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(pi.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(W5,{...e,ref:t})})}));_h.displayName=to;var W5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...p}=e,g=y.useRef(null),f=Re(t,g),b=Ch(o),[v=null,m]=jn({prop:i,defaultProp:s,onChange:l}),[x,S]=y.useState(!1),C=Ot(c),T=Th(r),E=y.useRef(!1),[_,P]=y.useState(0);return y.useEffect(()=>{const j=g.current;if(j)return j.addEventListener(Io,C),()=>j.removeEventListener(Io,C)},[C]),h.jsx(H5,{scope:r,orientation:n,dir:b,loop:a,currentTabStopId:v,onItemFocus:y.useCallback(j=>m(j),[m]),onItemShiftTab:y.useCallback(()=>S(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>P(j=>j-1),[]),children:h.jsx(Ce.div,{tabIndex:x||_===0?-1:0,"data-orientation":n,...p,ref:f,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{E.current=!0}),onFocus:Se(e.onFocus,j=>{const G=!E.current;if(j.target===j.currentTarget&&G&&!x){const U=new CustomEvent(Io,L5);if(j.currentTarget.dispatchEvent(U),!U.defaultPrevented){const te=T().filter(z=>z.focusable),B=te.find(z=>z.active),V=te.find(z=>z.id===v),oe=[B,V,...te].filter(Boolean).map(z=>z.ref.current);Oh(oe,u)}}E.current=!1}),onBlur:Se(e.onBlur,()=>S(!1))})})}),Ah="RovingFocusGroupItem",Ph=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:o,...i}=e,s=Tn(),l=o||s,c=z5(Ah,r),u=c.currentTabStopId===l,p=Th(r),{onFocusableItemAdd:g,onFocusableItemRemove:f}=c;return y.useEffect(()=>{if(n)return g(),()=>f()},[n,g,f]),h.jsx(pi.ItemSlot,{scope:r,id:l,focusable:n,active:a,children:h.jsx(Ce.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:Se(e.onMouseDown,b=>{n?c.onItemFocus(l):b.preventDefault()}),onFocus:Se(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const v=U5(b,c.orientation,c.dir);if(v!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=p().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=c.loop?Y5(x,S+1):x.slice(S+1)}setTimeout(()=>Oh(x))}})})})});Ph.displayName=Ah;var V5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function G5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function U5(e,t,r){const n=G5(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return V5[n]}function Oh(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Y5(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var K5=_h,q5=Ph,Hs="Radio",[X5,Rh]=qr(Hs),[J5,Z5]=X5(Hs),kh=y.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:o,disabled:i,value:s="on",onCheck:l,form:c,...u}=e,[p,g]=y.useState(null),f=Re(t,m=>g(m)),b=y.useRef(!1),v=p?c||!!p.closest("form"):!0;return h.jsxs(J5,{scope:r,checked:a,disabled:i,children:[h.jsx(Ce.button,{type:"button",role:"radio","aria-checked":a,"data-state":Fh(a),"data-disabled":i?"":void 0,disabled:i,value:s,...u,ref:f,onClick:Se(e.onClick,m=>{a||l==null||l(),v&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),v&&h.jsx(Q5,{control:p,bubbles:!b.current,name:n,value:s,checked:a,required:o,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});kh.displayName=Hs;var jh="RadioIndicator",Nh=y.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,o=Z5(jh,r);return h.jsx(Zr,{present:n||o.checked,children:h.jsx(Ce.span,{"data-state":Fh(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t})})});Nh.displayName=jh;var Q5=e=>{const{control:t,checked:r,bubbles:n=!0,...a}=e,o=y.useRef(null),i=Ud(r),s=Mi(t);return y.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&p){const g=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(g)}},[i,r,n]),h.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Fh(e){return e?"checked":"unchecked"}var eM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zs="RadioGroup",[tM,FL]=qr(zs,[$h,Rh]),Dh=$h(),Mh=Rh(),[rM,nM]=tM(zs),Lh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:o,required:i=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:p,...g}=e,f=Dh(r),b=Ch(c),[v,m]=jn({prop:o,defaultProp:a,onChange:p});return h.jsx(rM,{scope:r,name:n,required:i,disabled:s,value:v,onValueChange:m,children:h.jsx(K5,{asChild:!0,...f,orientation:l,dir:b,loop:u,children:h.jsx(Ce.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:b,...g,ref:t})})})});Lh.displayName=zs;var Ih="RadioGroupItem",Bh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,o=nM(Ih,r),i=o.disabled||n,s=Dh(r),l=Mh(r),c=y.useRef(null),u=Re(t,c),p=o.value===a.value,g=y.useRef(!1);return y.useEffect(()=>{const f=v=>{eM.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",b)}},[]),h.jsx(q5,{asChild:!0,...s,focusable:!i,active:p,children:h.jsx(kh,{disabled:i,required:o.required,checked:p,...l,...a,name:o.name,ref:u,onCheck:()=>o.onValueChange(a.value),onKeyDown:Se(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Se(a.onFocus,()=>{var f;g.current&&((f=c.current)==null||f.click())})})})});Bh.displayName=Ih;var aM="RadioGroupIndicator",Hh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=Mh(r);return h.jsx(Nh,{...a,...n,ref:t})});Hh.displayName=aM;var zh=Lh,Wh=Bh,oM=Hh;const Vh=y.forwardRef(({className:e,...t},r)=>h.jsx(zh,{className:Oe("ve-grid ve-gap-2",e),...t,ref:r}));Vh.displayName=zh.displayName;const hi=y.forwardRef(({className:e,...t},r)=>h.jsx(Wh,{ref:r,className:Oe("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:h.jsx(oM,{className:"ve-flex ve-items-center ve-justify-center",children:h.jsx(qm,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));hi.displayName=Wh.displayName;var iM="Label",Gh=y.forwardRef((e,t)=>h.jsx(Ce.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Gh.displayName=iM;var Uh=Gh;const sM=Ne("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),gi=y.forwardRef(({className:e,...t},r)=>h.jsx(Uh,{ref:r,className:Oe(sM(),e),...t}));gi.displayName=Uh.displayName;function Ws(e){const t=[];return e.fields.forEach(r=>{t.push(lM(e,r))}),h.jsx(h.Fragment,{children:t})}function lM(e,t){return h.jsx(Te.FieldLabel,{label:t.label,className:"ve-inline-block ve-pt-4",children:h.jsx(Te.AutoField,{field:{type:t.fieldType},value:e.value[t.field],onChange:r=>{e.onChange({...e.value,[t.field]:r})}})},`constant-${t.field}-label`)}const cM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Alternate Text",field:"alternateText",fieldType:"text"},{label:"URL",field:"url",fieldType:"text"},{label:"Height",field:"height",fieldType:"number"},{label:"Width",field:"width",fieldType:"number"}]})},wu={type:"text"},uM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Line 1",field:"line1",fieldType:"text"},{label:"Line 2",field:"line2",fieldType:"text"},{label:"Line 3",field:"line3",fieldType:"text"},{label:"City",field:"city",fieldType:"text"},{label:"State/Region",field:"region",fieldType:"text"},{label:"Sublocality",field:"sublocality",fieldType:"text"},{label:"Postal Code",field:"postalCode",fieldType:"text"},{label:"Country Code",field:"countryCode",fieldType:"text"}]})},Su="#969696",dM={type:"custom",render:({onChange:e,value:t})=>{const[r,n]=d.useState(t),a=(s,l)=>{const c=[...r];c[s]=l,n(c),e(c)},o=s=>{const l=r.filter((c,u)=>u!==s);n(l),e(l)},i=()=>{n([...r,""])};return h.jsxs("div",{children:[r.map((s,l)=>h.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[h.jsx(Te.AutoField,{field:{type:"text"},value:s,onChange:c=>a(l,c)}),h.jsx("span",{style:{color:Su},children:h.jsx(Te.IconButton,{onClick:()=>o(l),variant:"secondary",title:"Delete",disabled:r.length===1,children:h.jsx(r0,{})})})]},l)),h.jsx("span",{style:{color:Su,width:"auto"},children:h.jsx(Te.Button,{onClick:i,variant:"secondary",icon:h.jsx(Qm,{}),fullWidth:!0,children:h.jsx(h.Fragment,{})})})]})}},fM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Label",field:"label",fieldType:"text"},{label:"Link",field:"link",fieldType:"text"}]})},vi=new ze,pM={"type.string":wu,"type.phone":wu,"type.image":cM,"type.address":uM,"type.cta":fM},hM=(e,t)=>{if(t)return dM;const r=pM[e];if(!r){vi.log(`No constant configuration for ${e}`);return}return r},gM=(e,t)=>{let r;for(const n of e){const a=hM(n,t);if(!a){vi.log(`No mapped configuration for ${n}`);return}if(r||(r=a),r!==a){vi.log(`Could not resolve configuration for ${n}`);return}}return r},be=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const a=o=>{n({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:o})};return h.jsxs(h.Fragment,{children:[h.jsx(vM,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?h.jsx(bM,{onChange:n,value:r,filter:e.filter}):h.jsx(mM,{onChange:n,value:r,filter:e.filter,label:t.label})]})}}),vM=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>h.jsx("div",{className:"ve-mb-2 ve-w-full",children:h.jsxs(Vh,{defaultValue:(e==null?void 0:e.toString())??"false",children:[h.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[h.jsx(hi,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),h.jsx(gi,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),h.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[h.jsx(hi,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),h.jsx(gi,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),bM=({filter:e,onChange:t,value:r})=>{const n=gM(e.types,!!e.includeListsOnly);return h.jsx(Te.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:n&&h.jsx(Te.AutoField,{onChange:a=>t({field:(r==null?void 0:r.field)??"",constantValue:a,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:n})})},mM=({filter:e,onChange:t,value:r,label:n})=>{const a=F5(e);return h.jsx(Te.FieldLabel,{label:n??"Entity Field",className:"ve-mt-2.5",children:h.jsx(Te.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...a.map(o=>({label:o.name,value:o.name}))]},onChange:o=>{t({field:o,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})},yM=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:r,value:n})=>h.jsxs(Te.FieldLabel,{label:e,children:[h.jsx(Te.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:a=>r(a==="default"?"default":t),value:n==="default"?"default":"custom"}),n!=="default"&&h.jsx(Te.AutoField,{field:{type:"number"},value:n,onChange:r})]})}),xM=[{label:"Default",value:"default",px:""},{label:"XS",value:"xs",px:"12"},{label:"SM",value:"sm",px:"14"},{label:"Base",value:"base",px:"16"},{label:"LG",value:"lg",px:"18"},{label:"XL",value:"xl",px:"20"},{label:"2XL",value:"2xl",px:"24"},{label:"3XL",value:"3xl",px:"30"},{label:"4XL",value:"4xl",px:"36"},{label:"5XL",value:"5xl",px:"48"},{label:"6XL",value:"6xl",px:"60"},{label:"7XL",value:"7xl",px:"72"},{label:"8XL",value:"8xl",px:"96"},{label:"9XL",value:"9xl",px:"128"}],Eu=e=>{if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}if(e.endsWith("%")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)/100*t}throw new Error("Unknown font size unit")},wM=(e,t)=>{var n,a;const r=(a=(n=e==null?void 0:e.theme)==null?void 0:n.extend)==null?void 0:a.fontSize[t];return typeof r=="string"?Eu(r):Array.isArray(r)&&r.length>0?Eu(r[0]):0},SM=(e,t)=>e.map(r=>{const n=wM(t,r.value),a=n?n.toString():r.px;return{label:r.label+(r.px?` (${a}px)`:""),value:r.value}}),Be=e=>({type:"custom",render:({value:t,onChange:r})=>{const n=Mu();return h.jsx(Te.FieldLabel,{label:e??"Font Size",icon:h.jsx(zi,{size:16}),children:h.jsx(Te.AutoField,{value:t,onChange:r,field:{type:"select",options:SM(xM,n)}})})}}),Yh=Ne("components font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"}}),fr=y.forwardRef(({className:e,fontSize:t,fontWeight:r,color:n,textTransform:a,...o},i)=>h.jsx("p",{className:ke(Yh({fontSize:t,fontWeight:r,color:n,textTransform:a,className:e}),e),ref:i,...o,children:o.children}));fr.displayName="Body";const Kh=Ne("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius font-body-fontFamily font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-button-backgroundColor text-button-textColor border-2 border-button-backgroundColor hover:border-button-textColor focus:border-button-textColor active:bg-button-textColor active:text-button-backgroundColor active:border-button-backgroundColor",link:"text-button-textColor underline-offset-4 underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",small:"h-9 px-3",large:"h-11 px-8",icon:"h-10 w-10"},fontSize:{default:"text-button-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},borderRadius:{default:"",none:"rounded-none",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default"}}),ro=y.forwardRef(({className:e,variant:t,size:r,borderRadius:n,asChild:a=!1,fontSize:o,...i},s)=>{const l=a?Qt:"button";return h.jsx(l,{className:ke(Kh({variant:t,size:r,borderRadius:n,fontSize:o}),e),ref:s,...i})});ro.displayName="Button";const Wn=({label:e,link:t,variant:r,size:n,borderRadius:a,className:o,fontSize:i="default"})=>h.jsx(ro,{asChild:!0,className:o,variant:r,size:n,borderRadius:a,fontSize:i,children:h.jsx(He.Link,{href:t??"",children:e})});Wn.displayName="CTA";const qh=Ne("components",{variants:{level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color font-heading1-fontFamily",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color font-heading2-fontFamily",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color font-heading3-fontFamily",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color font-heading4-fontFamily",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color font-heading5-fontFamily",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color font-heading6-fontFamily"},fontSize:{default:"",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{default:"",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",color:"primary",weight:"default",transform:"none"}}),Yr=y.forwardRef(({className:e,level:t=1,color:r,weight:n,transform:a,fontSize:o,...i},s)=>{const l=`h${t}`;return h.jsx(l,{id:"tag",className:ke(qh({fontSize:o,color:r,weight:n,transform:a,level:t}),e),ref:s,...i,children:i.children})});Yr.displayName="Heading";const Xh=Ne("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),pr=y.forwardRef(({className:e,padding:t,maxWidth:r,...n},a)=>h.jsx("div",{className:"components bg-main",children:h.jsx("div",{className:ke(Xh({padding:t,maxWidth:r}),e),ref:a,...n,children:n.children})}));pr.displayName="Section";const EM={address:be({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},CM=({alignment:e,padding:t,address:r,getDirectionsProvider:n})=>{const a=je(),o=ve(a,r),i=He.getDirections(o,void 0,void 0,{provider:n});return h.jsx(pr,{className:`flex flex-col justify-center components ${e} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:o&&h.jsx("div",{children:h.jsxs(We,{displayName:"Address",fieldId:r.constantValueEnabled?"constant value":"address",children:[h.jsx(He.Address,{address:o,lines:[["line1"],["line2","city","region","postalCode"]]}),i&&h.jsx(He.Link,{cta:{link:i,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},TM={fields:EM,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>h.jsx(CM,{...e})},Cu={text:be({label:"Entity Field",filter:{types:["type.string"]}}),textAlignment:{label:"Text Alignment",type:"radio",options:[{label:"Left",value:"justify-start"},{label:"Center",value:"justify-center"},{label:"Right",value:"justify-end"}]},fontSize:Be(),textColor:{label:"Text Color",type:"radio",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},backgroundColor:{label:"Background Color",type:"radio",options:[{label:"Background",value:"bg-palette-background"},{label:"Primary",value:"bg-palette-primary"},{label:"Secondary",value:"bg-palette-secondary"},{label:"Accent",value:"bg-palette-accent"},{label:"Text",value:"bg-palette-text"}]}},$M=({text:e,textAlignment:t,fontSize:r,fontWeight:n,textColor:a,backgroundColor:o})=>{const i=je(),s=ve(i,e);return h.jsx("div",{className:`Banner ${o} components px-4 md:px-20 py-6`,children:h.jsx("div",{className:`flex ${t} items-center`,children:h.jsx(fr,{color:a,fontWeight:n,fontSize:r,children:s})})})},_M={fields:Cu,defaultProps:{text:{field:"",constantValue:"Banner Text",constantValueEnabled:!0},textAlignment:"justify-center",fontSize:"default",fontWeight:"default",textColor:"default",backgroundColor:"bg-palette-background"},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Cu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx($M,{...e})},Jh=y.forwardRef(({text:e,...t},r)=>{const n=je();return h.jsx(We,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(fr,{ref:r,...t,children:ve(n,e)})})});Jh.displayName="BodyText";const Tu={text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},AM={label:"Body Text",fields:Tu,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Tu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(Jh,{...e})},PM="https://placehold.co/640x360",Vs=Ne("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),OM={image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},RM=({image:e,size:t,aspectRatio:r,rounded:n})=>{const a=je(),o=ve(a,e);return o?h.jsx(We,{displayName:"Image",fieldId:e.field,children:h.jsx("div",{className:ke(Vs({size:t,aspectRatio:r,rounded:n}),"overflow-hidden"),children:h.jsx(He.Image,{image:o,className:"w-full h-full object-cover"})})}):null},kM={label:"Image",fields:OM,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:PM},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>h.jsx(RM,{...e})},jM="https://placehold.co/640x360",NM={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},heading:{type:"object",label:"Title",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},subheading:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},body:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Be()}}},FM=({orientation:e,heading:t,subheading:r,body:n,image:a,cta:o})=>{const i=je(),s=ve(i,a.image),l=ve(i,o.entityField);return s?h.jsx(pr,{className:"components",children:h.jsxs("div",{className:ke("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[s&&h.jsx(We,{displayName:"Image",fieldId:a.image.field,children:h.jsx("div",{className:ke(Vs({size:a.size,rounded:a.rounded,aspectRatio:a.aspectRatio}),"overflow-hidden"),children:h.jsx(He.Image,{image:s,className:"w-full h-full object-cover"})})}),h.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&h.jsx(Yr,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:ve(i,t.text)}),(r==null?void 0:r.text)&&h.jsx(Yr,{fontSize:r.fontSize,color:r.color,transform:r.transform,children:ve(i,r.text)}),(n==null?void 0:n.text)&&h.jsx(fr,{fontSize:n.fontSize,textTransform:n.transform,color:n.color,children:ve(i,n.text)}),l&&h.jsx(Wn,{variant:o.variant,label:l.name,link:l.link??"#",fontSize:o.fontSize})]})]})}):null},DM={label:"Card",fields:NM,defaultProps:{orientation:"left",heading:{text:{field:"",constantValue:"Heading",constantValueEnabled:!0},fontSize:"3xl",color:"default",transform:"none"},subheading:{text:{field:"",constantValue:"SubHeading",constantValueEnabled:!0},fontSize:"xl",color:"default",transform:"none"},body:{text:{field:"",constantValue:"Body",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:jM},constantValueEnabled:!0},size:"full",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>h.jsx(FM,{...e})},MM={entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Be(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},LM=({entityField:e,variant:t,className:r,fontSize:n,size:a,borderRadius:o})=>{const i=je(),s=ve(i,e);return h.jsx(We,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(Wn,{label:s==null?void 0:s.label,link:(s==null?void 0:s.link)||"#",variant:t,className:r,fontSize:n,size:a,borderRadius:o})})},IM={label:"Call to Action",fields:MM,defaultProps:{entityField:{field:"",constantValue:{name:"Call to Action"}},variant:"primary",fontSize:"default",borderRadius:"default",size:"default"},render:e=>h.jsx(LM,{...e})},BM="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",HM=Ne("list-inside font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),$u={list:be({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},zM=({list:e,fontSize:t,fontWeight:r,color:n,includeHyperlink:a,listLength:o})=>{const i=je();let s=ve(i,e);return s?Array.isArray(s)||(s=[s]):s=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],h.jsx(We,{displayName:"Email List",fieldId:e.field,children:h.jsx("ul",{className:ke("components",HM({fontSize:t,fontWeight:r,color:n}),`${a?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:s.slice(0,Math.min(s.length,o)).map((l,c)=>h.jsxs("li",{className:"mb-2 flex items-center",children:[h.jsx("img",{className:"mr-2",src:BM}),h.jsx("span",{children:a?h.jsx("a",{href:l,children:l}):l})]},c))})})},WM={label:"Emails",fields:$u,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...$u,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(zM,{...e})},VM=Ne("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),Zh=y.forwardRef(({className:e,direction:t,alignment:r,justification:n,spacing:a,renderDropZone:o,...i},s)=>h.jsx("div",{className:ke(VM({direction:t,alignment:r,justification:n,spacing:a}),e),ref:s,...i,children:o({zone:"flex-container"})}));Zh.displayName="FlexContainer";const GM={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},UM={label:"Flex Container",fields:GM,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:r,spacing:n,className:a,puck:{renderDropZone:o}})=>h.jsx(Zh,{renderDropZone:o,direction:e,alignment:t,justification:r,className:a,spacing:n})},YM=Ne("",{variants:{backgroundColor:{default:"bg-footer-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),KM={copyright:{type:"object",label:"Copyright Text",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}}},links:{type:"array",label:"Links",arrayFields:{cta:be({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},qM={fields:KM,defaultProps:{copyright:{text:{field:"",constantValue:"Copyright Text",constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}}]},label:"Footer",render:e=>h.jsx(XM,{...e}),resolveFields:async(e,{fields:t})=>{const r=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...t,copyright:{...t.copyright,objectFields:{...t.copyright.objectFields,fontWeight:{label:"Font Weight",type:"select",options:r}}}}},resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const r=[],n=a=>{if(!a||r.includes(a)){const o=mi.v4();return r.push(o),a}return a};return{props:{...e,links:e.links.map(a=>({...a,id:n(a.id)}))}}}},XM=e=>{const t=je(),{links:r,backgroundColor:n,copyright:a}=e,o=r==null?void 0:r.map(s=>{const l=ve(t,s.cta);if(l)return{id:s.id,...l}}).filter(s=>s!==void 0),i=ve(t,a.text);return h.jsxs("footer",{className:ke("w-full bg-white components",YM({backgroundColor:n})),children:[h.jsx("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 pt-4 pb-3",children:h.jsx("div",{className:"flex items-center justify-end space-x-4",children:h.jsx("ul",{className:"flex space-x-8",children:o==null?void 0:o.map((s,l)=>h.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:h.jsx(He.Link,{cta:s,eventName:`link${l}`})},s.id??l))})})}),h.jsx("div",{className:"mx-auto max-w-6xl px-4 pt-3 pb-4",children:h.jsx(fr,{fontSize:a.fontSize,textTransform:a.textTransform,fontWeight:a.fontWeight,color:a.color,children:i})})]})},JM={coordinate:be({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Be(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},ZM=({variant:e,size:t,borderRadius:r,coordinate:n,getDirectionsProvider:a,fontSize:o})=>{const i=je(),s=ve(i,n);s||console.warn("yextDisplayCoordinate is not present in the stream");const l=He.getDirections(void 0,void 0,void 0,{provider:a},s);return h.jsx(ro,{asChild:!0,variant:e,size:t,fontSize:o,borderRadius:r,children:h.jsx(He.Link,{href:l??"#",children:"Get Directions"})})},QM={fields:JM,defaultProps:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>h.jsx(ZM,{...e})},eL=[{label:"0",value:"py-0"},{label:"0.5",value:"py-0.5"},{label:"1",value:"py-1"},{label:"1.5",value:"py-1.5"},{label:"2",value:"py-2"},{label:"2.5",value:"py-2.5"},{label:"3",value:"py-3"},{label:"3.5",value:"py-3.5"},{label:"4",value:"py-4"},{label:"5",value:"py-5"},{label:"6",value:"py-6"},{label:"7",value:"py-7"},{label:"8",value:"py-8"},{label:"9",value:"py-9"},{label:"10",value:"py-10"},{label:"11",value:"py-11"},{label:"12",value:"py-12"},{label:"14",value:"py-14"},{label:"16",value:"py-16"},{label:"20",value:"py-20"},{label:"24",value:"py-24"}],tL=Ne("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),rL=Ne("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),nL=Ne("flex flex-col gap-y-grid-verticalSpacing",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"}},defaultVariants:{verticalAlignment:"start"}}),Qh=y.forwardRef(({className:e,distribution:t,columns:r,horizontalSpacing:n,verticalPadding:a,maxContentWidth:o,renderDropZone:i,backgroundColor:s,...l},c)=>h.jsx(pr,{className:ke(tL({maxContentWidth:o,backgroundColor:s}),a),padding:"none",children:h.jsx("div",{className:ke(rL({horizontalSpacing:n}),e),ref:c,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${r.length}, 1fr)`},...l,children:r.map(({span:u,verticalAlignment:p},g)=>h.jsx("div",{className:ke(nL({verticalAlignment:p})),style:{gridColumn:u&&t==="manual"?`span ${Math.max(Math.min(u,12),1)}`:""},children:i({zone:`column-${g}`})},g))})}));Qh.displayName="GridSection";const aL={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]}}},verticalPadding:{label:"Vertical Padding",type:"select",options:eL},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},oL={label:"Grid Section",fields:aL,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start"},{verticalAlignment:"start"}],verticalPadding:"default",backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:r,maxContentWidth:n,horizontalSpacing:a,verticalPadding:o,puck:{renderDropZone:i}})=>h.jsx(Qh,{renderDropZone:i,columns:e,distribution:t,backgroundColor:r,maxContentWidth:n,horizontalSpacing:a,verticalPadding:o})},iL="https://placehold.co/50",sL=Ne("",{variants:{backgroundColor:{default:"bg-header-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),lL={logo:{type:"object",label:"Logo",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}})}},links:{type:"array",label:"Links",arrayFields:{cta:be({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},cL={fields:lL,defaultProps:{logo:{image:{field:"",constantValue:{height:50,width:50,url:iL},constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}]},label:"Header",render:e=>h.jsx(uL,{...e}),resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const r=[],n=a=>{if(!a||r.includes(a)){const o=mi.v4();return r.push(o),a}return a};return{props:{...e,links:e.links.map(a=>({...a,id:n(a.id)}))}}}},uL=e=>{const t=je(),{logo:r,links:n,backgroundColor:a}=e,o=ve(t,r.image),i=n==null?void 0:n.map(s=>{const l=ve(t,s.cta);if(l)return{id:s.id,...l}}).filter(s=>s!==void 0);return h.jsx("header",{className:ke("w-full bg-white components",sL({backgroundColor:a})),children:h.jsxs("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 py-6",children:[o&&h.jsx(He.Image,{image:o,className:"w-full h-full object-cover"}),h.jsx("div",{className:"flex items-center justify-end space-x-4",children:h.jsx("ul",{className:"flex space-x-8",children:i==null?void 0:i.map((s,l)=>h.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:h.jsx(He.Link,{cta:s,eventName:`link${l}`})},s.id??l))})})]})})},eg=y.forwardRef(({text:e,...t},r)=>{const n=je();return h.jsx(We,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(Yr,{ref:r,...t,children:ve(n,e)})})});eg.displayName="HeadingText";const _u={text:be({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},dL={label:"Heading Text",fields:_u,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},resolveFields:async e=>{const t=await Kt({fontCssVariable:`--fontFamily-heading${e.props.level}-fontFamily`});return{..._u,weight:{label:"Font Weight",type:"select",options:t}}},render:e=>h.jsx(eg,{...e})},fL={hours:be({label:"Hours",filter:{types:["type.hours"]}}),startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},pL=({hours:e,startOfWeek:t,collapseDays:r,showAdditionalHoursText:n,alignment:a,padding:o})=>{const i=je(),s=ve(i,e),{additionalHoursText:l}=i;return h.jsx(pr,{className:`flex flex-col justify-center components ${a} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:h.jsxs("div",{children:[s&&h.jsx(We,{displayName:"Hours",fieldId:"hours",children:h.jsx(He.HoursTable,{hours:s,startOfWeek:t,collapseDays:r})}),l&&n&&h.jsx(We,{displayName:"Hours Text",fieldId:"additionalHoursText",children:h.jsx("div",{className:"mt-4",children:l})})]})})},hL={fields:fL,defaultProps:{hours:{field:"hours",constantValue:{}},startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Table",render:e=>h.jsx(pL,{...e})},gL={hours:be({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},vL=({hours:e,className:t,showCurrentStatus:r,timeFormat:n,showDayNames:a,dayOfWeekFormat:o})=>{const i=je(),s=ve(i,e);return s?h.jsx(We,{displayName:"Hours",fieldId:e.field,children:h.jsx(He.HoursStatus,{hours:s,className:ke("components font-semibold mb-2 font-body-fontFamily",t),currentTemplate:r?void 0:()=>h.jsx(h.Fragment,{}),separatorTemplate:r?void 0:()=>h.jsx(h.Fragment,{}),dayOfWeekTemplate:a?void 0:()=>h.jsx(h.Fragment,{}),dayOptions:{weekday:o},timeOptions:{hour12:n==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},bL={label:"Hours Status",fields:gL,defaultProps:{hours:{field:"hours",constantValue:{}},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>h.jsx(vL,{...e})},mL=Ne("components flex gap-2 items-center text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontWeight:"default",color:"default"}}),yL=(e,t="domestic")=>{const n=(""+e).replace(/\D/g,"").match(/^(?:\+?(\d{1,3}))?(\d{3})(\d{3})(\d{4})$/);if(n){const a=n[1]?`+${n[1]} `:"";return t==="international"?`${a}(${n[2]}) ${n[3]}-${n[4]}`:`(${n[2]}) ${n[3]}-${n[4]}`}return e},Au={phone:be({label:"Entity Field",filter:{types:["type.phone"]}}),format:{label:"Format",type:"radio",options:[{label:"Domestic",value:"domestic"},{label:"International",value:"international"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},xL=({phone:e,format:t,fontWeight:r,color:n})=>{const a=je(),o=ve(a,e);if(o)return h.jsx(We,{displayName:"Phone",fieldId:e.field,children:h.jsxs("p",{className:mL({fontWeight:r,color:n}),children:[h.jsx(Zm,{className:"w-4 h-4"}),yL(o,t)]})})},wL={label:"Phone",fields:Au,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Au,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(xL,{...e})},SL="https://placehold.co/640x360",EL={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},title:{type:"object",label:"Title",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},description:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Be()}}},CL=({orientation:e,title:t,description:r,image:n,cta:a})=>{const o=je(),i=ve(o,n.image),s=ve(o,a.entityField);return i?h.jsx(pr,{className:"components",children:h.jsxs("div",{className:ke("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[i&&h.jsx(We,{displayName:"Image",fieldId:n.image.field,children:h.jsx("div",{className:ke(Vs({size:n.size,rounded:n.rounded,aspectRatio:n.aspectRatio}),"overflow-hidden"),children:h.jsx(He.Image,{image:i,className:"w-full h-full object-cover"})})}),h.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&h.jsx(Yr,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:ve(o,t.text)}),(r==null?void 0:r.text)&&h.jsx(fr,{fontSize:r.fontSize,textTransform:r.transform,color:r.color,children:ve(o,r.text)}),s&&h.jsx(Wn,{variant:a.variant,label:s.name,link:s.link??"#",fontSize:a.fontSize})]})]})}):null},TL={label:"Promo",fields:EL,defaultProps:{orientation:"left",title:{text:{field:"",constantValue:"Title",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},description:{text:{field:"",constantValue:"Description",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:SL},constantValueEnabled:!0},size:"medium",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>h.jsx(CL,{...e})},$L=Ne("list-disc components list-inside text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),Pu={list:be({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},_L=({list:e,padding:t,fontWeight:r,color:n,textTransform:a})=>{const o=je();let i=ve(o,e);return i?Array.isArray(i)||(i=[i]):i=["Sample text 1","Sample text 2","Sample text 3"],h.jsx(We,{displayName:"Text List",fieldId:e.field,children:h.jsx("ul",{className:$L({padding:t,fontWeight:r,color:n,textTransform:a}),children:i.map((s,l)=>h.jsx("li",{className:"mb-2",children:s},l))})})},AL={label:"Text List",fields:Pu,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Pu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(_L,{...e})};exports.Address=TM;exports.Banner=_M;exports.Body=fr;exports.BodyText=AM;exports.Button=ro;exports.CTA=Wn;exports.CTAWrapper=IM;exports.Card=DM;exports.DocumentContext=yi;exports.Editor=O5;exports.Emails=WM;exports.EntityField=We;exports.FlexContainer=UM;exports.FontSizeSelector=Be;exports.Footer=qM;exports.GetDirections=QM;exports.GridSection=oL;exports.Header=cL;exports.Heading=Yr;exports.HeadingText=dL;exports.HoursStatus=bL;exports.HoursTable=hL;exports.ImageWrapper=kM;exports.NumberFieldWithDefaultOption=yM;exports.Phone=wL;exports.Promo=TL;exports.Section=pr;exports.TailwindConfigContext=xi;exports.TextList=AL;exports.VisualEditorProvider=sv;exports.YextEntityFieldSelector=be;exports.applyTheme=wg;exports.bodyVariants=Yh;exports.buttonVariants=Kh;exports.constructFontSelectOptions=bg;exports.defaultFonts=wi;exports.getFontWeightOptions=xg;exports.getFontWeightOverrideOptions=Kt;exports.headingVariants=qh;exports.resolveYextEntityField=ve;exports.sectionVariants=Xh;exports.themeMangerCn=ke;exports.themeMangerTwMergeConfiguration=qu;exports.themeResolver=Eg;exports.useDocument=je;exports.useEntityFields=Du;exports.usePlatformBridgeDocument=fg;exports.usePlatformBridgeEntityFields=pg;exports.useTailwindConfig=Mu;
203
+ `),d.createElement("div",{style:u.white,className:"saturation-white"},d.createElement("div",{style:u.black,className:"saturation-black"}),d.createElement("div",{style:u.pointer},this.props.pointer?d.createElement(this.props.pointer,this.props):d.createElement("div",{style:u.circle}))))}}]),t}(d.PureComponent||d.Component);function EN(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var CN=qp(Object.keys,Object),TN=Object.prototype,$N=TN.hasOwnProperty;function _N(e){if(!ms(e))return CN(e);var t=[];for(var r in Object(e))$N.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ss(e){return cn(e)?th(e):_N(e)}function AN(e,t){return e&&Yp(e,t,Ss)}function PN(e,t){return function(r,n){if(r==null)return r;if(!cn(r))return e(r,n);for(var a=r.length,o=-1,i=Object(r);++o<a&&n(i[o],o,i)!==!1;);return r}}var oh=PN(AN);function ON(e){return typeof e=="function"?e:Xa}function RN(e,t){var r=Je(e)?EN:oh;return r(e,ON(t))}function Aa(e){"@babel/helpers - typeof";return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}var kN=/^\s+/,jN=/\s+$/;function H(e,t){if(e=e||"",t=t||{},e instanceof H)return e;if(!(this instanceof H))return new H(e,t);var r=NN(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.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=r.ok}H.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 t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,a,o,i,s;return r=t.r/255,n=t.g/255,a=t.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*i+.0722*s},setAlpha:function(t){return this._a=ih(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Gc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Gc(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=Vc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Vc(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return Uc(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return LN(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(Ee(this._r,255)*100)+"%",g:Math.round(Ee(this._g,255)*100)+"%",b:Math.round(Ee(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ee(this._r,255)*100)+"%, "+Math.round(Ee(this._g,255)*100)+"%, "+Math.round(Ee(this._b,255)*100)+"%)":"rgba("+Math.round(Ee(this._r,255)*100)+"%, "+Math.round(Ee(this._g,255)*100)+"%, "+Math.round(Ee(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:XN[Uc(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Yc(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=H(t);n="#"+Yc(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!r&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(zN,arguments)},brighten:function(){return this._applyModification(WN,arguments)},darken:function(){return this._applyModification(VN,arguments)},desaturate:function(){return this._applyModification(IN,arguments)},saturate:function(){return this._applyModification(BN,arguments)},greyscale:function(){return this._applyModification(HN,arguments)},spin:function(){return this._applyModification(GN,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(KN,arguments)},complement:function(){return this._applyCombination(UN,arguments)},monochromatic:function(){return this._applyCombination(qN,arguments)},splitcomplement:function(){return this._applyCombination(YN,arguments)},triad:function(){return this._applyCombination(Kc,[3])},tetrad:function(){return this._applyCombination(Kc,[4])}};H.fromRatio=function(e,t){if(Aa(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Sn(e[n]));e=r}return H(e,t)};function NN(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,o=null,i=!1,s=!1;return typeof e=="string"&&(e=eF(e)),Aa(e)=="object"&&(At(e.r)&&At(e.g)&&At(e.b)?(t=FN(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):At(e.h)&&At(e.s)&&At(e.v)?(n=Sn(e.s),a=Sn(e.v),t=MN(e.h,n,a),i=!0,s="hsv"):At(e.h)&&At(e.s)&&At(e.l)&&(n=Sn(e.s),o=Sn(e.l),t=DN(e.h,n,o),i=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ih(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function FN(e,t,r){return{r:Ee(e,255)*255,g:Ee(t,255)*255,b:Ee(r,255)*255}}function Vc(e,t,r){e=Ee(e,255),t=Ee(t,255),r=Ee(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o,i,s=(n+a)/2;if(n==a)o=i=0;else{var l=n-a;switch(i=s>.5?l/(2-n-a):l/(n+a),n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:i,l:s}}function DN(e,t,r){var n,a,o;e=Ee(e,360),t=Ee(t,100),r=Ee(r,100);function i(c,u,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?c+(u-c)*6*p:p<1/2?u:p<2/3?c+(u-c)*(2/3-p)*6:c}if(t===0)n=a=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=i(l,s,e+1/3),a=i(l,s,e),o=i(l,s,e-1/3)}return{r:n*255,g:a*255,b:o*255}}function Gc(e,t,r){e=Ee(e,255),t=Ee(t,255),r=Ee(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o,i,s=n,l=n-a;if(i=n===0?0:l/n,n==a)o=0;else{switch(n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:i,v:s}}function MN(e,t,r){e=Ee(e,360)*6,t=Ee(t,100),r=Ee(r,100);var n=Math.floor(e),a=e-n,o=r*(1-t),i=r*(1-a*t),s=r*(1-(1-a)*t),l=n%6,c=[r,i,o,o,s,r][l],u=[s,r,r,i,o,o][l],p=[o,o,s,r,r,i][l];return{r:c*255,g:u*255,b:p*255}}function Uc(e,t,r,n){var a=[st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16))];return n&&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 LN(e,t,r,n,a){var o=[st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16)),st(sh(n))];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 Yc(e,t,r,n){var a=[st(sh(n)),st(Math.round(e).toString(16)),st(Math.round(t).toString(16)),st(Math.round(r).toString(16))];return a.join("")}H.equals=function(e,t){return!e||!t?!1:H(e).toRgbString()==H(t).toRgbString()};H.random=function(){return H.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function IN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.s-=t/100,r.s=Qa(r.s),H(r)}function BN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.s+=t/100,r.s=Qa(r.s),H(r)}function HN(e){return H(e).desaturate(100)}function zN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.l+=t/100,r.l=Qa(r.l),H(r)}function WN(e,t){t=t===0?0:t||10;var r=H(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),H(r)}function VN(e,t){t=t===0?0:t||10;var r=H(e).toHsl();return r.l-=t/100,r.l=Qa(r.l),H(r)}function GN(e,t){var r=H(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,H(r)}function UN(e){var t=H(e).toHsl();return t.h=(t.h+180)%360,H(t)}function Kc(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=H(e).toHsl(),n=[H(e)],a=360/t,o=1;o<t;o++)n.push(H({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function YN(e){var t=H(e).toHsl(),r=t.h;return[H(e),H({h:(r+72)%360,s:t.s,l:t.l}),H({h:(r+216)%360,s:t.s,l:t.l})]}function KN(e,t,r){t=t||6,r=r||30;var n=H(e).toHsl(),a=360/r,o=[H(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,o.push(H(n));return o}function qN(e,t){t=t||6;for(var r=H(e).toHsv(),n=r.h,a=r.s,o=r.v,i=[],s=1/t;t--;)i.push(H({h:n,s:a,v:o})),o=(o+s)%1;return i}H.mix=function(e,t,r){r=r===0?0:r||50;var n=H(e).toRgb(),a=H(t).toRgb(),o=r/100,i={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return H(i)};H.readability=function(e,t){var r=H(e),n=H(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};H.isReadable=function(e,t,r){var n=H.readability(e,t),a,o;switch(o=!1,a=tF(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};H.mostReadable=function(e,t,r){var n=null,a=0,o,i,s,l;r=r||{},i=r.includeFallbackColors,s=r.level,l=r.size;for(var c=0;c<t.length;c++)o=H.readability(e,t[c]),o>a&&(a=o,n=H(t[c]));return H.isReadable(e,n,{level:s,size:l})||!i?n:(r.includeFallbackColors=!1,H.mostReadable(e,["#fff","#000"],r))};var li=H.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"},XN=H.hexNames=JN(li);function JN(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function ih(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ee(e,t){ZN(e)&&(e="100%");var r=QN(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Qa(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function ZN(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function QN(e){return typeof e=="string"&&e.indexOf("%")!=-1}function st(e){return e.length==1?"0"+e:""+e}function Sn(e){return e<=1&&(e=e*100+"%"),e}function sh(e){return Math.round(parseFloat(e)*255).toString(16)}function qc(e){return Ye(e)/255}var ot=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),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 At(e){return!!ot.CSS_UNIT.exec(e)}function eF(e){e=e.replace(kN,"").replace(jN,"").toLowerCase();var t=!1;if(li[e])e=li[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ot.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ot.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ot.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ot.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ot.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ot.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ot.hex8.exec(e))?{r:Ye(r[1]),g:Ye(r[2]),b:Ye(r[3]),a:qc(r[4]),format:t?"name":"hex8"}:(r=ot.hex6.exec(e))?{r:Ye(r[1]),g:Ye(r[2]),b:Ye(r[3]),format:t?"name":"hex"}:(r=ot.hex4.exec(e))?{r:Ye(r[1]+""+r[1]),g:Ye(r[2]+""+r[2]),b:Ye(r[3]+""+r[3]),a:qc(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=ot.hex3.exec(e))?{r:Ye(r[1]+""+r[1]),g:Ye(r[2]+""+r[2]),b:Ye(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function tF(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var Xc=function(t){var r=["r","g","b","a","h","s","l","v"],n=0,a=0;return RN(r,function(o){if(t[o]&&(n+=1,isNaN(t[o])||(a+=1),o==="s"||o==="l")){var i=/^\d+%$/;i.test(t[o])&&(a+=1)}}),n===a?t:!1},En=function(t,r){var n=t.hex?H(t.hex):H(t),a=n.toHsl(),o=n.toHsv(),i=n.toRgb(),s=n.toHex();a.s===0&&(a.h=r||0,o.h=r||0);var l=s==="000000"&&i.a===0;return{hsl:a,hex:l?"transparent":"#"+s,rgb:i,hsv:o,oldHue:t.h||r||a.h,source:t.source}},qt=function(t){if(t==="transparent")return!0;var r=String(t).charAt(0)==="#"?1:0;return t.length!==4+r&&t.length<7+r&&H(t).isValid()},Es=function(t){if(!t)return"#fff";var r=En(t);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},Do=function(t,r){var n=t.replace("°","");return H(r+" ("+n+")")._ok},yn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rF=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function nF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function oF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Ge=function(t){var r=function(n){oF(a,n);function a(o){nF(this,a);var i=aF(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return i.handleChange=function(s,l){var c=Xc(s);if(c){var u=En(s,s.h||i.state.oldHue);i.setState(u),i.props.onChangeComplete&&i.debounce(i.props.onChangeComplete,u,l),i.props.onChange&&i.props.onChange(u,l)}},i.handleSwatchHover=function(s,l){var c=Xc(s);if(c){var u=En(s,s.h||i.state.oldHue);i.props.onSwatchHover&&i.props.onSwatchHover(u,l)}},i.state=yn({},En(o.color,0)),i.debounce=ah(function(s,l,c){s(l,c)},100),i}return rF(a,[{key:"render",value:function(){var i={};return this.props.onSwatchHover&&(i.onSwatchHover=this.handleSwatchHover),d.createElement(t,yn({},this.props,this.state,{onChange:this.handleChange},i))}}],[{key:"getDerivedStateFromProps",value:function(i,s){return yn({},En(i.color,s.oldHue))}}]),a}(d.PureComponent||d.Component);return r.propTypes=yn({},t.propTypes),r.defaultProps=yn({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},iF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sF=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function lF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function cF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var uF=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){cF(a,n);function a(){var o,i,s,l;lF(this,a);for(var c=arguments.length,u=Array(c),p=0;p<c;p++)u[p]=arguments[p];return l=(i=(s=Jc(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(u))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},i),Jc(s,l)}return sF(a,[{key:"render",value:function(){return d.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},d.createElement(t,iF({},this.props,this.state)))}}]),a}(d.Component)},Zc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dF=13,fF=function(t){var r=t.color,n=t.style,a=t.onClick,o=a===void 0?function(){}:a,i=t.onHover,s=t.title,l=s===void 0?r:s,c=t.children,u=t.focus,p=t.focusStyle,g=p===void 0?{}:p,f=r==="transparent",b=ee({default:{swatch:Zc({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?g:{})}}),v=function(T){return o(r,T)},m=function(T){return T.keyCode===dF&&o(r,T)},x=function(T){return i(r,T)},S={};return i&&(S.onMouseOver=x),d.createElement("div",Zc({style:b.swatch,onClick:v,title:l,tabIndex:0,onKeyDown:m},S),c,f&&d.createElement(sn,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ur=uF(fF);var pF=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},hF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lh=function(t){var r=t.rgb,n=t.hsl,a=t.width,o=t.height,i=t.onChange,s=t.direction,l=t.style,c=t.renderers,u=t.pointer,p=t.className,g=p===void 0?"":p,f=ee({default:{picker:{position:"relative",width:a,height:o},alpha:{radius:"2px",style:l}}});return d.createElement("div",{style:f.picker,className:"alpha-picker "+g},d.createElement(hs,hF({},f.alpha,{rgb:r,hsl:n,pointer:u,renderers:c,onChange:i,direction:s})))};lh.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:pF};Ge(lh);function ch(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var gF="__lodash_hash_undefined__";function vF(e){return this.__data__.set(e,gF),this}function bF(e){return this.__data__.has(e)}function Pa(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Dt;++t<r;)this.add(e[t])}Pa.prototype.add=Pa.prototype.push=vF;Pa.prototype.has=bF;function mF(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function yF(e,t){return e.has(t)}var xF=1,wF=2;function uh(e,t,r,n,a,o){var i=r&xF,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var p=-1,g=!0,f=r&wF?new Pa:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var b=e[p],v=t[p];if(n)var m=i?n(v,b,p,t,e,o):n(b,v,p,e,t,o);if(m!==void 0){if(m)continue;g=!1;break}if(f){if(!mF(t,function(x,S){if(!yF(f,S)&&(b===x||a(b,x,r,n,o)))return f.push(S)})){g=!1;break}}else if(!(b===v||a(b,v,r,n,o))){g=!1;break}}return o.delete(e),o.delete(t),g}function SF(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function EF(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var CF=1,TF=2,$F="[object Boolean]",_F="[object Date]",AF="[object Error]",PF="[object Map]",OF="[object Number]",RF="[object RegExp]",kF="[object Set]",jF="[object String]",NF="[object Symbol]",FF="[object ArrayBuffer]",DF="[object DataView]",Qc=Ut?Ut.prototype:void 0,Mo=Qc?Qc.valueOf:void 0;function MF(e,t,r,n,a,o,i){switch(r){case DF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case FF:return!(e.byteLength!=t.byteLength||!o(new Ta(e),new Ta(t)));case $F:case _F:case OF:return Hn(+e,+t);case AF:return e.name==t.name&&e.message==t.message;case RF:case jF:return e==t+"";case PF:var s=SF;case kF:var l=n&CF;if(s||(s=EF),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;n|=TF,i.set(e,t);var u=uh(s(e),s(t),n,a,o,i);return i.delete(e),u;case NF:if(Mo)return Mo.call(e)==Mo.call(t)}return!1}function LF(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function IF(e,t,r){var n=t(e);return Je(e)?n:LF(n,r(e))}function BF(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function HF(){return[]}var zF=Object.prototype,WF=zF.propertyIsEnumerable,eu=Object.getOwnPropertySymbols,VF=eu?function(e){return e==null?[]:(e=Object(e),BF(eu(e),function(t){return WF.call(e,t)}))}:HF;function tu(e){return IF(e,Ss,VF)}var GF=1,UF=Object.prototype,YF=UF.hasOwnProperty;function KF(e,t,r,n,a,o){var i=r&GF,s=tu(e),l=s.length,c=tu(t),u=c.length;if(l!=u&&!i)return!1;for(var p=l;p--;){var g=s[p];if(!(i?g in t:YF.call(t,g)))return!1}var f=o.get(e),b=o.get(t);if(f&&b)return f==t&&b==e;var v=!0;o.set(e,t),o.set(t,e);for(var m=i;++p<l;){g=s[p];var x=e[g],S=t[g];if(n)var C=i?n(S,x,g,t,e,o):n(x,S,g,e,t,o);if(!(C===void 0?x===S||a(x,S,r,n,o):C)){v=!1;break}m||(m=g=="constructor")}if(v&&!m){var T=e.constructor,E=t.constructor;T!=E&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof E=="function"&&E instanceof E)&&(v=!1)}return o.delete(e),o.delete(t),v}var ci=cr(ft,"DataView"),ui=cr(ft,"Promise"),di=cr(ft,"Set"),fi=cr(ft,"WeakMap"),ru="[object Map]",qF="[object Object]",nu="[object Promise]",au="[object Set]",ou="[object WeakMap]",iu="[object DataView]",XF=lr(ci),JF=lr(On),ZF=lr(ui),QF=lr(di),eD=lr(fi),Ht=sr;(ci&&Ht(new ci(new ArrayBuffer(1)))!=iu||On&&Ht(new On)!=ru||ui&&Ht(ui.resolve())!=nu||di&&Ht(new di)!=au||fi&&Ht(new fi)!=ou)&&(Ht=function(e){var t=sr(e),r=t==qF?e.constructor:void 0,n=r?lr(r):"";if(n)switch(n){case XF:return iu;case JF:return ru;case ZF:return nu;case QF:return au;case eD:return ou}return t});var tD=1,su="[object Arguments]",lu="[object Array]",oa="[object Object]",rD=Object.prototype,cu=rD.hasOwnProperty;function nD(e,t,r,n,a,o){var i=Je(e),s=Je(t),l=i?lu:Ht(e),c=s?lu:Ht(t);l=l==su?oa:l,c=c==su?oa:c;var u=l==oa,p=c==oa,g=l==c;if(g&&_a(e)){if(!_a(t))return!1;i=!0,u=!1}if(g&&!u)return o||(o=new mt),i||xs(e)?uh(e,t,r,n,a,o):MF(e,t,l,r,n,a,o);if(!(r&tD)){var f=u&&cu.call(e,"__wrapped__"),b=p&&cu.call(t,"__wrapped__");if(f||b){var v=f?e.value():e,m=b?t.value():t;return o||(o=new mt),a(v,m,r,n,o)}}return g?(o||(o=new mt),KF(e,t,r,n,a,o)):!1}function Cs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Yt(e)&&!Yt(t)?e!==e&&t!==t:nD(e,t,r,n,Cs,a)}var aD=1,oD=2;function iD(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var i=r[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){i=r[a];var s=i[0],l=e[s],c=i[1];if(i[2]){if(l===void 0&&!(s in e))return!1}else{var u=new mt,p;if(!(p===void 0?Cs(c,l,aD|oD,n,u):p))return!1}}return!0}function dh(e){return e===e&&!nt(e)}function sD(e){for(var t=Ss(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,dh(a)]}return t}function fh(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function lD(e){var t=sD(e);return t.length==1&&t[0][2]?fh(t[0][0],t[0][1]):function(r){return r===e||iD(r,e,t)}}var cD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uD=/^\w*$/;function Ts(e,t){if(Je(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ja(e)?!0:uD.test(e)||!cD.test(e)||t!=null&&e in Object(t)}var dD="Expected a function";function $s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dD);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new($s.Cache||Dt),r}$s.Cache=Dt;var fD=500;function pD(e){var t=$s(e,function(n){return r.size===fD&&r.clear(),n}),r=t.cache;return t}var hD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gD=/\\(\\)?/g,vD=pD(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(hD,function(r,n,a,o){t.push(a?o.replace(gD,"$1"):n||r)}),t}),bD=1/0,uu=Ut?Ut.prototype:void 0,du=uu?uu.toString:void 0;function ph(e){if(typeof e=="string")return e;if(Je(e))return ch(e,ph)+"";if(Ja(e))return du?du.call(e):"";var t=e+"";return t=="0"&&1/e==-bD?"-0":t}function mD(e){return e==null?"":ph(e)}function hh(e,t){return Je(e)?e:Ts(e,t)?[e]:vD(mD(e))}var yD=1/0;function eo(e){if(typeof e=="string"||Ja(e))return e;var t=e+"";return t=="0"&&1/e==-yD?"-0":t}function gh(e,t){t=hh(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[eo(t[r++])];return r&&r==n?e:void 0}function xD(e,t,r){var n=e==null?void 0:gh(e,t);return n===void 0?r:n}function wD(e,t){return e!=null&&t in Object(e)}function SD(e,t,r){t=hh(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var i=eo(t[n]);if(!(o=e!=null&&r(e,i)))break;e=e[i]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&ys(a)&&ws(i,a)&&(Je(e)||$a(e)))}function ED(e,t){return e!=null&&SD(e,t,wD)}var CD=1,TD=2;function $D(e,t){return Ts(e)&&dh(t)?fh(eo(e),t):function(r){var n=xD(r,e);return n===void 0&&n===t?ED(r,e):Cs(t,n,CD|TD)}}function _D(e){return function(t){return t==null?void 0:t[e]}}function AD(e){return function(t){return gh(t,e)}}function PD(e){return Ts(e)?_D(eo(e)):AD(e)}function OD(e){return typeof e=="function"?e:e==null?Xa:typeof e=="object"?Je(e)?$D(e[0],e[1]):lD(e):PD(e)}function RD(e,t){var r=-1,n=cn(e)?Array(e.length):[];return oh(e,function(a,o,i){n[++r]=t(a,o,i)}),n}function dr(e,t){var r=Je(e)?ch:RD;return r(e,OD(t))}var kD=function(t){var r=t.colors,n=t.onClick,a=t.onSwatchHover,o=ee({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return d.createElement("div",{style:o.swatches},dr(r,function(i){return d.createElement(ur,{key:i,color:i,style:o.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+i}})}),d.createElement("div",{style:o.clear}))},_s=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,o=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=a==="transparent",f=function(m,x){qt(m)&&r({hex:m,source:"hex"},x)},b=ee(Ve({default:{card:{width:i,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Es(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":s==="hide"});return d.createElement("div",{style:b.card,className:"block-picker "+p},d.createElement("div",{style:b.triangle}),d.createElement("div",{style:b.head},g&&d.createElement(sn,{borderRadius:"6px 6px 0 0"}),d.createElement("div",{style:b.label},a)),d.createElement("div",{style:b.body},d.createElement(kD,{colors:o,onClick:f,onSwatchHover:n}),d.createElement(se,{style:{input:b.input},value:a,onChange:f})))};_s.propTypes={width:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.string),triangle:R.oneOf(["top","hide"]),styles:R.object};_s.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Ge(_s);var Cr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Tr={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},$r={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},_r={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Ar={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Pr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Or={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Rr={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},kr={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Cn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},jr={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Nr={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Fr={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Dr={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Mr={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Lr={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ir={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Br={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},vh=function(t){var r=t.color,n=t.onClick,a=t.onSwatchHover,o=t.hover,i=t.active,s=t.circleSize,l=t.circleSpacing,c=ee({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:o,active:i});return d.createElement("div",{style:c.swatch},d.createElement(ur,{style:c.Swatch,color:r,onClick:n,onHover:a,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+r}}))};vh.defaultProps={circleSize:28,circleSpacing:14};const jD=ps(vh);var As=function(t){var r=t.width,n=t.onChange,a=t.onSwatchHover,o=t.colors,i=t.hex,s=t.circleSize,l=t.styles,c=l===void 0?{}:l,u=t.circleSpacing,p=t.className,g=p===void 0?"":p,f=ee(Ve({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-u,marginBottom:-u}}},c)),b=function(m,x){return n({hex:m,source:"hex"},x)};return d.createElement("div",{style:f.card,className:"circle-picker "+g},dr(o,function(v){return d.createElement(jD,{key:v,color:v,onClick:b,onSwatchHover:a,active:i===v.toLowerCase(),circleSize:s,circleSpacing:u})}))};As.propTypes={width:R.oneOfType([R.string,R.number]),circleSize:R.number,circleSpacing:R.number,styles:R.object};As.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Cr[500],Tr[500],$r[500],_r[500],Ar[500],Pr[500],Or[500],Rr[500],kr[500],Cn[500],jr[500],Nr[500],Fr[500],Dr[500],Mr[500],Lr[500],Ir[500],Br[500]],styles:{}};Ge(As);function fu(e){return e===void 0}var bh={};Object.defineProperty(bh,"__esModule",{value:!0});var pu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ND=d,hu=FD(ND);function FD(e){return e&&e.__esModule?e:{default:e}}function DD(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var ia=24,MD=bh.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?ia:n,o=e.height,i=o===void 0?ia:o,s=e.style,l=s===void 0?{}:s,c=DD(e,["fill","width","height","style"]);return hu.default.createElement("svg",pu({viewBox:"0 0 "+ia+" "+ia,style:pu({fill:r,width:a,height:i},l)},c),hu.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},LD=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function ID(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function HD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var mh=function(e){HD(t,e);function t(r){ID(this,t);var n=BD(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,o){a.hex?qt(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},o):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},o):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},o)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(fu(a.s)?n.props.hsl.s:a.s),l:Number(fu(a.l)?n.props.hsl.l:a.l),source:"hsl"},o))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return LD(t,[{key:"render",value:function(){var n=this,a=ee({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),d.createElement("div",{style:a.alpha},d.createElement(se,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:a.field},d.createElement(se,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:a.alpha},d.createElement(se,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),d.createElement("div",{style:a.wrap,className:"flexbox-fix"},o,d.createElement("div",{style:a.toggle},d.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},d.createElement(MD,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),t}(d.Component);mh.defaultProps={view:"hex"};var gu=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},zD=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return d.createElement("div",{style:t.picker})},Ps=function(t){var r=t.width,n=t.onChange,a=t.disableAlpha,o=t.rgb,i=t.hsl,s=t.hsv,l=t.hex,c=t.renderers,u=t.styles,p=u===void 0?{}:u,g=t.className,f=g===void 0?"":g,b=t.defaultView,v=ee(Ve({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:a});return d.createElement("div",{style:v.picker,className:"chrome-picker "+f},d.createElement("div",{style:v.saturation},d.createElement(Za,{style:v.Saturation,hsl:i,hsv:s,pointer:zD,onChange:n})),d.createElement("div",{style:v.body},d.createElement("div",{style:v.controls,className:"flexbox-fix"},d.createElement("div",{style:v.color},d.createElement("div",{style:v.swatch},d.createElement("div",{style:v.active}),d.createElement(sn,{renderers:c}))),d.createElement("div",{style:v.toggles},d.createElement("div",{style:v.hue},d.createElement(ln,{style:v.Hue,hsl:i,pointer:gu,onChange:n})),d.createElement("div",{style:v.alpha},d.createElement(hs,{style:v.Alpha,rgb:o,hsl:i,pointer:gu,renderers:c,onChange:n})))),d.createElement(mh,{rgb:o,hsl:i,hex:l,view:b,onChange:n,disableAlpha:a})))};Ps.propTypes={width:R.oneOfType([R.string,R.number]),disableAlpha:R.bool,styles:R.object,defaultView:R.oneOf(["hex","rgb","hsl"])};Ps.defaultProps={width:225,disableAlpha:!1,styles:{}};Ge(Ps);var WD=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=t.active,s=ee({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Es(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:i,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(ur,{style:s.color,color:r,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:s.dot}))},VD=function(t){var r=t.hex,n=t.rgb,a=t.onChange,o=ee({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),i=function(l,c){l.r||l.g||l.b?a({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},c):a({hex:l.hex,source:"hex"},c)};return d.createElement("div",{style:o.fields,className:"flexbox-fix"},d.createElement("div",{style:o.active}),d.createElement(se,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:r,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:i}),d.createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:i}))},Os=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.colors,o=t.hex,i=t.rgb,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(Ve({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),g=function(b,v){b.hex?qt(b.hex)&&r({hex:b.hex,source:"hex"},v):r(b,v)};return d.createElement(zn,{style:p.Compact,styles:l},d.createElement("div",{style:p.compact,className:"compact-picker "+u},d.createElement("div",null,dr(a,function(f){return d.createElement(WD,{key:f,color:f,active:f.toLowerCase()===o,onClick:g,onSwatchHover:n})}),d.createElement("div",{style:p.clear})),d.createElement(VD,{hex:o,rgb:i,onChange:g})))};Os.propTypes={colors:R.arrayOf(R.string),styles:R.object};Os.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ge(Os);var GD=function(t){var r=t.hover,n=t.color,a=t.onClick,o=t.onSwatchHover,i={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=ee({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:i}},{hover:r});return d.createElement("div",{style:s.swatch},d.createElement(ur,{color:n,onClick:a,onHover:o,focusStyle:i}))};const UD=ps(GD);var Rs=function(t){var r=t.width,n=t.colors,a=t.onChange,o=t.onSwatchHover,i=t.triangle,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(Ve({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right","bottom-left-triangle":i==="bottom-left","bottom-right-triangle":i==="bottom-right"}),g=function(b,v){return a({hex:b,source:"hex"},v)};return d.createElement("div",{style:p.card,className:"github-picker "+u},d.createElement("div",{style:p.triangleShadow}),d.createElement("div",{style:p.triangle}),dr(n,function(f){return d.createElement(UD,{color:f,key:f,onClick:g,onSwatchHover:o})}))};Rs.propTypes={width:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.string),triangle:R.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:R.object};Rs.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ge(Rs);var YD=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},KD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks=function(t){var r=t.width,n=t.height,a=t.onChange,o=t.hsl,i=t.direction,s=t.pointer,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},c)),f=function(v){return a({a:1,h:v.h,l:.5,s:1})};return d.createElement("div",{style:g.picker,className:"hue-picker "+p},d.createElement(ln,KD({},g.hue,{hsl:o,pointer:s,onChange:f,direction:i})))};ks.propTypes={styles:R.object};ks.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:YD,styles:{}};Ge(ks);var qD=function(t){var r=t.onChange,n=t.hex,a=t.rgb,o=t.styles,i=o===void 0?{}:o,s=t.className,l=s===void 0?"":s,c=ee(Ve({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},i)),u=function(g,f){g.hex?qt(g.hex)&&r({hex:g.hex,source:"hex"},f):(g.r||g.g||g.b)&&r({r:g.r||a.r,g:g.g||a.g,b:g.b||a.b,source:"rgb"},f)};return d.createElement(zn,{styles:i},d.createElement("div",{style:c.material,className:"material-picker "+l},d.createElement(se,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:u}),d.createElement("div",{style:c.split,className:"flexbox-fix"},d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:a.r,onChange:u})),d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:a.g,onChange:u})),d.createElement("div",{style:c.third},d.createElement(se,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:a.b,onChange:u})))))};Ge(qD);var XD=function(t){var r=t.onChange,n=t.rgb,a=t.hsv,o=t.hex,i=ee({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(c,u){c["#"]?qt(c["#"])&&r({hex:c["#"],source:"hex"},u):c.r||c.g||c.b?r({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,source:"rgb"},u):(c.h||c.s||c.v)&&r({h:c.h||a.h,s:c.s||a.s,v:c.v||a.v,source:"hsv"},u)};return d.createElement("div",{style:i.fields},d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"h",value:Math.round(a.h),onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),d.createElement(se,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(se,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"#",value:o.replace("#",""),onChange:s}),d.createElement("div",{style:i.fieldSymbols},d.createElement("div",{style:i.symbol},"°"),d.createElement("div",{style:i.symbol},"%"),d.createElement("div",{style:i.symbol},"%")))},JD=function(t){var r=t.hsl,n=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return d.createElement("div",{style:n.picker})},ZD=function(){var t=ee({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return d.createElement("div",{style:t.pointer},d.createElement("div",{style:t.left},d.createElement("div",{style:t.leftInside})),d.createElement("div",{style:t.right},d.createElement("div",{style:t.rightInside})))},vu=function(t){var r=t.onClick,n=t.label,a=t.children,o=t.active,i=ee({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return d.createElement("div",{style:i.button,onClick:r},n||a)},QD=function(t){var r=t.rgb,n=t.currentColor,a=ee({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return d.createElement("div",null,d.createElement("div",{style:a.label},"new"),d.createElement("div",{style:a.swatches},d.createElement("div",{style:a.new}),d.createElement("div",{style:a.current})),d.createElement("div",{style:a.label},"current"))},e5=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function t5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function n5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var js=function(e){n5(t,e);function t(r){t5(this,t);var n=r5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:r.hex},n}return e5(t,[{key:"render",value:function(){var n=this.props,a=n.styles,o=a===void 0?{}:a,i=n.className,s=i===void 0?"":i,l=ee(Ve({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return d.createElement("div",{style:l.picker,className:"photoshop-picker "+s},d.createElement("div",{style:l.head},this.props.header),d.createElement("div",{style:l.body,className:"flexbox-fix"},d.createElement("div",{style:l.saturation},d.createElement(Za,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:JD,onChange:this.props.onChange})),d.createElement("div",{style:l.hue},d.createElement(ln,{direction:"vertical",hsl:this.props.hsl,pointer:ZD,onChange:this.props.onChange})),d.createElement("div",{style:l.controls},d.createElement("div",{style:l.top,className:"flexbox-fix"},d.createElement("div",{style:l.previews},d.createElement(QD,{rgb:this.props.rgb,currentColor:this.state.currentColor})),d.createElement("div",{style:l.actions},d.createElement(vu,{label:"OK",onClick:this.props.onAccept,active:!0}),d.createElement(vu,{label:"Cancel",onClick:this.props.onCancel}),d.createElement(XD,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(d.Component);js.propTypes={header:R.string,styles:R.object};js.defaultProps={header:"Color Picker",styles:{}};Ge(js);var a5=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,o=t.hex,i=t.disableAlpha,s=ee({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:i}),l=function(u,p){u.hex?qt(u.hex)&&r({hex:u.hex,source:"hex"},p):u.r||u.g||u.b?r({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,a:n.a,source:"rgb"},p):u.a&&(u.a<0?u.a=0:u.a>100&&(u.a=100),u.a/=100,r({h:a.h,s:a.s,l:a.l,a:u.a,source:"rgb"},p))};return d.createElement("div",{style:s.fields,className:"flexbox-fix"},d.createElement("div",{style:s.double},d.createElement(se,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(se,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.alpha},d.createElement(se,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},o5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yh=function(t){var r=t.colors,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=ee({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),s=function(c,u){a({hex:c,source:"hex"},u)};return d.createElement("div",{style:i.colors,className:"flexbox-fix"},r.map(function(l){var c=typeof l=="string"?{color:l}:l,u=""+c.color+(c.title||"");return d.createElement("div",{key:u,style:i.swatchWrap},d.createElement(ur,o5({},c,{style:i.swatch,onClick:s,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+c.color}})))}))};yh.propTypes={colors:R.arrayOf(R.oneOfType([R.string,R.shape({color:R.string,title:R.string})])).isRequired};var i5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ns=function(t){var r=t.width,n=t.rgb,a=t.hex,o=t.hsv,i=t.hsl,s=t.onChange,l=t.onSwatchHover,c=t.disableAlpha,u=t.presetColors,p=t.renderers,g=t.styles,f=g===void 0?{}:g,b=t.className,v=b===void 0?"":b,m=ee(Ve({default:i5({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},f),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},f),{disableAlpha:c});return d.createElement("div",{style:m.picker,className:"sketch-picker "+v},d.createElement("div",{style:m.saturation},d.createElement(Za,{style:m.Saturation,hsl:i,hsv:o,onChange:s})),d.createElement("div",{style:m.controls,className:"flexbox-fix"},d.createElement("div",{style:m.sliders},d.createElement("div",{style:m.hue},d.createElement(ln,{style:m.Hue,hsl:i,onChange:s})),d.createElement("div",{style:m.alpha},d.createElement(hs,{style:m.Alpha,rgb:n,hsl:i,renderers:p,onChange:s}))),d.createElement("div",{style:m.color},d.createElement(sn,null),d.createElement("div",{style:m.activeColor}))),d.createElement(a5,{rgb:n,hsl:i,hex:a,onChange:s,disableAlpha:c}),d.createElement(yh,{colors:u,onClick:s,onSwatchHover:l}))};Ns.propTypes={disableAlpha:R.bool,width:R.oneOfType([R.string,R.number]),styles:R.object};Ns.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const s5=Ge(Ns);var xn=function(t){var r=t.hsl,n=t.offset,a=t.onClick,o=a===void 0?function(){}:a,i=t.active,s=t.first,l=t.last,c=ee({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:i,first:s,last:l}),u=function(g){return o({h:r.h,s:.5,l:n,source:"hsl"},g)};return d.createElement("div",{style:c.swatch,onClick:u})},l5=function(t){var r=t.onClick,n=t.hsl,a=ee({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return d.createElement("div",{style:a.swatches},d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<o&&Math.abs(n.s-.5)<o,onClick:r,first:!0})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<o&&Math.abs(n.s-.5)<o,onClick:r})),d.createElement("div",{style:a.swatch},d.createElement(xn,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<o&&Math.abs(n.s-.5)<o,onClick:r,last:!0})),d.createElement("div",{style:a.clear}))},c5=function(){var t=ee({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},Fs=function(t){var r=t.hsl,n=t.onChange,a=t.pointer,o=t.styles,i=o===void 0?{}:o,s=t.className,l=s===void 0?"":s,c=ee(Ve({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},i));return d.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},d.createElement("div",{style:c.hue},d.createElement(ln,{style:c.Hue,hsl:r,pointer:a,onChange:n})),d.createElement("div",{style:c.swatches},d.createElement(l5,{hsl:r,onClick:n})))};Fs.propTypes={styles:R.object};Fs.defaultProps={pointer:c5,styles:{}};Ge(Fs);var xh={};Object.defineProperty(xh,"__esModule",{value:!0});var bu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u5=d,mu=d5(u5);function d5(e){return e&&e.__esModule?e:{default:e}}function f5(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var sa=24,p5=xh.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?sa:n,o=e.height,i=o===void 0?sa:o,s=e.style,l=s===void 0?{}:s,c=f5(e,["fill","width","height","style"]);return mu.default.createElement("svg",bu({viewBox:"0 0 "+sa+" "+sa,style:bu({fill:r,width:a,height:i},l)},c),mu.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},h5=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,o=t.onSwatchHover,i=t.first,s=t.last,l=t.active,c=ee({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:Es(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:i,last:s,active:l,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(ur,{color:r,style:c.color,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:c.check},d.createElement(p5,null)))},g5=function(t){var r=t.onClick,n=t.onSwatchHover,a=t.group,o=t.active,i=ee({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return d.createElement("div",{style:i.group},dr(a,function(s,l){return d.createElement(h5,{key:s,color:s,active:s.toLowerCase()===o,first:l===0,last:l===a.length-1,onClick:r,onSwatchHover:n})}))},Ds=function(t){var r=t.width,n=t.height,a=t.onChange,o=t.onSwatchHover,i=t.colors,s=t.hex,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),f=function(v,m){return a({hex:v,source:"hex"},m)};return d.createElement("div",{style:g.picker,className:"swatches-picker "+p},d.createElement(zn,null,d.createElement("div",{style:g.overflow},d.createElement("div",{style:g.body},dr(i,function(b){return d.createElement(g5,{key:b.toString(),group:b,active:s,onClick:f,onSwatchHover:o})}),d.createElement("div",{style:g.clear})))))};Ds.propTypes={width:R.oneOfType([R.string,R.number]),height:R.oneOfType([R.string,R.number]),colors:R.arrayOf(R.arrayOf(R.string)),styles:R.object};Ds.defaultProps={width:320,height:240,colors:[[Cr[900],Cr[700],Cr[500],Cr[300],Cr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[$r[900],$r[700],$r[500],$r[300],$r[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Ar[900],Ar[700],Ar[500],Ar[300],Ar[100]],[Pr[900],Pr[700],Pr[500],Pr[300],Pr[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],["#194D33",Cn[700],Cn[500],Cn[300],Cn[100]],[jr[900],jr[700],jr[500],jr[300],jr[100]],[Nr[900],Nr[700],Nr[500],Nr[300],Nr[100]],[Fr[900],Fr[700],Fr[500],Fr[300],Fr[100]],[Dr[900],Dr[700],Dr[500],Dr[300],Dr[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],[Lr[900],Lr[700],Lr[500],Lr[300],Lr[100]],[Ir[900],Ir[700],Ir[500],Ir[300],Ir[100]],[Br[900],Br[700],Br[500],Br[300],Br[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ge(Ds);var Ms=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,o=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,g=ee(Ve({default:{card:{width:i,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),f=function(v,m){qt(v)&&r({hex:v,source:"hex"},m)};return d.createElement("div",{style:g.card,className:"twitter-picker "+p},d.createElement("div",{style:g.triangleShadow}),d.createElement("div",{style:g.triangle}),d.createElement("div",{style:g.body},dr(o,function(b,v){return d.createElement(ur,{key:v,color:b,hex:b,style:g.swatch,onClick:f,onHover:n,focusStyle:{boxShadow:"0 0 4px "+b}})}),d.createElement("div",{style:g.hash},"#"),d.createElement(se,{label:null,style:{input:g.input},value:a.replace("#",""),onChange:f}),d.createElement("div",{style:g.clear})))};Ms.propTypes={width:R.oneOfType([R.string,R.number]),triangle:R.oneOf(["hide","top-left","top-right"]),colors:R.arrayOf(R.string),styles:R.object};Ms.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Ge(Ms);var Ls=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return d.createElement("div",{style:r.picker})};Ls.propTypes={hsl:R.shape({h:R.number,s:R.number,l:R.number,a:R.number})};Ls.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Is=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return d.createElement("div",{style:r.picker})};Is.propTypes={hsl:R.shape({h:R.number,s:R.number,l:R.number,a:R.number})};Is.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var v5=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,o=t.hex,i=t.hsv,s=function(f,b){if(f.hex)qt(f.hex)&&r({hex:f.hex,source:"hex"},b);else if(f.rgb){var v=f.rgb.split(",");Do(f.rgb,"rgb")&&r({r:v[0],g:v[1],b:v[2],a:1,source:"rgb"},b)}else if(f.hsv){var m=f.hsv.split(",");Do(f.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),r({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},b))}else if(f.hsl){var x=f.hsl.split(",");Do(f.hsl,"hsl")&&(x[2]=x[2].replace("%",""),x[1]=x[1].replace("%",""),x[0]=x[0].replace("°",""),p[1]==1?p[1]=.01:p[2]==1&&(p[2]=.01),r({h:Number(x[0]),s:Number(x[1]),v:Number(x[2]),source:"hsl"},b))}},l=ee({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,u=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",p=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.v*100)+"%";return d.createElement("div",{style:l.wrap,className:"flexbox-fix"},d.createElement("div",{style:l.fields},d.createElement("div",{style:l.double},d.createElement(se,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:s})),d.createElement("div",{style:l.column},d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:s})),d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"hsv",value:p,onChange:s})),d.createElement("div",{style:l.single},d.createElement(se,{style:{input:l.input2,label:l.label2},label:"hsl",value:u,onChange:s})))))},Bs=function(t){var r=t.width,n=t.onChange,a=t.rgb,o=t.hsl,i=t.hsv,s=t.hex,l=t.header,c=t.styles,u=c===void 0?{}:c,p=t.className,g=p===void 0?"":p,f=ee(Ve({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return d.createElement("div",{style:f.picker,className:"google-picker "+g},d.createElement("div",{style:f.head},l),d.createElement("div",{style:f.swatch}),d.createElement("div",{style:f.saturation},d.createElement(Za,{hsl:o,hsv:i,pointer:Ls,onChange:n})),d.createElement("div",{style:f.body},d.createElement("div",{style:f.controls,className:"flexbox-fix"},d.createElement("div",{style:f.hue},d.createElement(ln,{style:f.Hue,hsl:o,radius:"4px",pointer:Is,onChange:n}))),d.createElement(v5,{rgb:a,hsl:o,hex:s,hsv:i,onChange:n})))};Bs.propTypes={width:R.oneOfType([R.string,R.number]),styles:R.object,header:R.string};Bs.defaultProps={width:652,styles:{},header:"Color picker"};Ge(Bs);const b5=({field:e,value:t,onChange:r})=>{const[n,a]=d.useState(!1),o=m5(t);return h.jsx(h.Fragment,{children:h.jsxs(Te.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[h.jsx("div",{style:o.swatch,onClick:()=>a(i=>!i),children:h.jsx("div",{style:o.color})}),n&&h.jsxs("div",{style:o.popover,children:[h.jsx("div",{style:o.cover,onClick:()=>a(!1)}),h.jsx(s5,{disableAlpha:!0,color:t,onChange:i=>{r(i.hex)}})]})]})})},m5=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),y5=({label:e,onChange:t,value:r,options:n})=>{var c;const[a,o]=d.useState(!1),i=()=>{o(!a)},s=u=>{t(u),o(!1)},l=((c=n.find(u=>u.value===r))==null?void 0:c.label)??"Choose a font";return h.jsx(Te.FieldLabel,{label:e,icon:h.jsx(zi,{size:16}),children:h.jsxs("div",{style:{position:"relative"},children:[h.jsx("button",{onClick:i,className:"font-select",style:{fontFamily:r},children:l}),a&&h.jsx("div",{className:"font-select-dropdown",children:n.map(u=>h.jsx("button",{value:u.value,onClick:p=>{p.preventDefault(),s(u.value)},style:{fontFamily:u.value,backgroundColor:u.value===r?"var(--puck-color-grey-09)":""},className:"font-select-option",children:u.label},u.value))})]})})},x5=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([r,n])=>{if("type"in n){const a=yu(n,n.plugin);a&&(t.objectFields[r]=a)}else{const a={label:n.label,type:"object",objectFields:{}};for(const o in n.styles)a.objectFields[o]=yu(n.styles[o],n.plugin);t.objectFields[r]=a}}),t},yu=(e,t)=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return t==="fontFamily"?{label:e.label,type:"custom",options:e.options,render:d.useCallback(({onChange:r,value:n})=>y5({label:e.label,options:typeof e.options=="function"?e.options():e.options,value:n,onChange:r}),[])}:{label:e.label,type:"select",options:typeof e.options=="function"?e.options():e.options};case"color":return{label:e.label,type:"custom",render:b5}}},w5=(e,t,r="")=>{const n={};return Object.entries(t.styles).forEach(([a,o])=>{if("type"in o){const i=e==null?void 0:e[`--${o.plugin}-${r}-${a}`];n[a]=xu(o,i)}else{const i={};for(const s in o.styles){const l=o.styles[s],c=e==null?void 0:e[`--${o.plugin}-${r}-${a}-${s}`];i[s]=xu(l,c)}n[a]=i}}),n},xu=(e,t)=>{if(t)if(e.type==="number"){const r=Number.parseInt(t);return isNaN(r)?e.default:r}else return t;else return e.default},S5=e=>{var l,c;const{themeConfig:t,themeHistoriesRef:r,onThemeChange:n}=e;if(!r.current)return;if(!t)return h.jsx("div",{children:h.jsx(Zo,{children:h.jsx(Qo,{children:"Please contact your developer to set up theme management."})})});const[a,o]=d.useState(Object.keys(t).reduce((u,p)=>({...u,[p]:!0}),{})),i=u=>{o(p=>({...p,[u]:!p[u]}))},s=(c=r.current)==null?void 0:c.histories[(l=r.current)==null?void 0:l.index].data;return h.jsxs("div",{children:[h.jsx(Zo,{children:h.jsx(Qo,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([u,p])=>{const g=x5(p),f=w5(s,p,u),b=a[u];return h.jsxs("div",{className:"theme-field",children:[h.jsxs("button",{className:"ve-flex ve-items-center ve-w-full ve-justify-between",onClick:()=>i(u),children:[`${g.label??""}`,h.jsx("div",{children:b?h.jsx(zi,{size:12}):h.jsx(Km,{size:12})})]}),!b&&h.jsx(Te.AutoField,{field:g,onChange:v=>n(u,p,v),value:f})]},u)})]})},E5=e=>{var c,u;const{isDevMode:t,setThemeHistories:r,onPublishTheme:n,themeConfig:a,themeHistories:o,clearThemeHistory:i,puckInitialHistory:s}=e,{history:{setHistories:l}}=Te.usePuck();return d.useEffect(()=>{l((s==null?void 0:s.histories)||[])},[s]),d.useEffect(()=>{const p=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");p&&(p.style.display="none");const g=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");g&&(g.style.display="none")},[]),h.jsxs("header",{className:"puck-header",children:[h.jsxs("div",{className:"header-left",children:[h.jsx(Gd,{}),h.jsx(Qd,{})]}),h.jsx("div",{className:"header-center"}),h.jsxs("div",{className:"actions",children:[h.jsx(rp,{disabled:((c=o==null?void 0:o.histories)==null?void 0:c.length)===1,onClearLocalChanges:()=>{var p,g,f,b,v,m;i(),a&&_n((g=(p=o==null?void 0:o.histories)==null?void 0:p[0])==null?void 0:g.data,a),r({histories:[{id:((b=(f=o==null?void 0:o.histories)==null?void 0:f[0])==null?void 0:b.id)??"",data:((m=(v=o==null?void 0:o.histories)==null?void 0:v[0])==null?void 0:m.data)??{}}],index:0})}}),!t&&h.jsx(Pt,{variant:"secondary",disabled:((u=o==null?void 0:o.histories)==null?void 0:u.length)===1,onClick:async()=>{await n()},children:"Publish"})]})]})},Lo=new ze,C5=({puckConfig:e,puckInitialHistory:t,isLoading:r,templateMetadata:n,publishTheme:a,themeConfig:o,saveThemeSaveState:i,themeHistories:s,setThemeHistories:l,clearThemeHistory:c,sendDevThemeSaveStateData:u,buildThemeLocalStorageKey:p})=>{const[g,f]=d.useState(!1),b=d.useRef(s);d.useEffect(()=>{b.current=s},[s]);const v=async()=>{if(Lo.logFunc("saveThemeData"),!s)return;const C=s.histories[s.index];a({payload:{saveThemeData:JSON.stringify(C.data)}}),c(),l({histories:[C],index:0})},m=(C,T,E)=>{var j,G,U,te;if(!b.current||!o)return;const _={...(j=b.current.histories[b.current.index])==null?void 0:j.data,...vg(E,C,T)},P={histories:[...b.current.histories,{id:mi.v4(),data:_}],index:b.current.histories.length};window.localStorage.setItem(p(),JSON.stringify(P.histories)),n.isDevMode&&!n.devOverride?(Lo.logFunc("sendDevThemeSaveStateData"),u({payload:{devThemeSaveStateData:JSON.stringify((G=P.histories[P.index])==null?void 0:G.data)}})):(Lo.logFunc("saveTheme"),i({payload:{history:JSON.stringify((U=P.histories[P.index])==null?void 0:U.data),hash:(te=P.histories[P.index])==null?void 0:te.id}})),_n(_,o),l(P)},x=async()=>{if(!r&&!g){f(!0);return}},S=d.useCallback(()=>h.jsx(S5,{themeHistoriesRef:b,themeConfig:o,onThemeChange:m}),[]);return h.jsx(Hd,{children:h.jsx(Te.Puck,{config:e,data:{},initialHistory:t,onChange:x,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>h.jsx(E5,{themeConfig:o,themeHistories:s,onPublishTheme:v,isDevMode:n.isDevMode,setThemeHistories:l,clearThemeHistory:c,puckInitialHistory:t}),actionBar:()=>h.jsx(h.Fragment,{}),components:()=>h.jsx(h.Fragment,{}),fields:S}})})},T5=()=>{const{sendToParent:e}=it("saveThemeSaveState",Pe),{sendToParent:t}=it("deleteThemeSaveState",Pe),{sendToParent:r}=it("publishTheme",Pe);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishTheme:r}},$5=new ze,_5=()=>{const{iFrameLoaded:e}=ar();d.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,r]=d.useState(void 0),[n,a]=d.useState(!1);return zt("getThemeSaveState",Pe,(o,i)=>{let s;i!=null&&i.history&&(s={hash:i.hash,history:ha(i.history)}),$5.logData("THEME_SAVE_STATE",s),r(s),a(!0),o({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:n}},Ie=new ze,A5=e=>{const{puckConfig:t,templateMetadata:r,layoutData:n,themeData:a,themeConfig:o}=e,{sendDevLayoutSaveStateData:i,sendDevThemeSaveStateData:s}=ar(),{saveThemeSaveState:l,publishTheme:c,deleteThemeSaveState:u}=T5(),{themeSaveState:p,themeSaveStateFetched:g}=_5(),{buildThemeLocalStorageKey:f,clearThemeLocalStorage:b}=ap(r),{buildVisualConfigLocalStorageKey:v}=np(r),[m,x]=d.useState(),[S,C]=d.useState(!1),[T,E]=d.useState(),[_,P]=d.useState(!1),j=d.useCallback(()=>{if(!r)return;Ie.logFunc("loadPuckInitialHistory");const V=window.localStorage.getItem(v());if(r.isDevMode&&V){const W=JSON.parse(V),oe=W.length-1;if(oe>=0){Ie.log("Theme Dev Mode - Using layout data from local storage"),x({histories:W.map(J=>({id:J.id,state:{data:{...J.state.data}}})),index:oe,appendData:!1});const z=m==null?void 0:m.histories[m.histories.length-1].state.data;i({payload:{devSaveStateData:JSON.stringify(z)}})}C(!0);return}n&&x({histories:[{id:"root",state:{data:n}}],appendData:!1}),C(!0)},[x,C,n]),G=d.useCallback(()=>{if(!r)return;if(Ie.logFunc("loadThemeHistory"),Ie.logData("THEME_DATA",a),Ie.logData("THEME_SAVE_STATE",p),r.isDevMode&&!r.devOverride){const oe=window.localStorage.getItem(f());if(oe){Ie.log("Theme Dev Mode - Using theme localStorage");const z=JSON.parse(oe),J=z.length-1;E({histories:z,index:J}),P(!0);return}Ie.log("Theme Dev Mode - No localStorage. Using theme data from Content"),a&&E({histories:[{id:"root",data:a}],index:0}),P(!0);return}if(!p){b(),Ie.log("Theme Prod Mode - No saveState. Using theme data from Content"),a&&E({histories:[{id:"root",data:a}],index:0}),P(!0);return}const V=window.localStorage.getItem(f());if(!V){Ie.log("Theme Prod Mode - No localStorage. Using themeSaveState"),E({histories:a?[{id:"root",data:a},{id:p.hash,data:p.history.data}]:[{id:p.hash,data:p.history.data}],index:a?1:0}),P(!0);return}const W=JSON.parse(V).findIndex(oe=>oe.id===(p==null?void 0:p.hash));if(W!==-1){Ie.log("Theme Prod Mode - Using localStorage theme data"),E({histories:JSON.parse(V),index:W}),P(!0);return}b()},[E,P,b,f]);d.useEffect(()=>{var V;Ie.logData("THEME_HISTORIES",T),T&&o&&_n((V=T.histories[T.index])==null?void 0:V.data,o)},[T,o]),d.useEffect(()=>{g&&(j(),G())},[r,g,n]),d.useEffect(()=>{m&&Ie.logData("PUCK_INITIAL_HISTORY",m)},[m]);const U=()=>{Ie.logFunc("clearHistory"),b(),u()};d.useEffect(()=>{var W;if(!_)return;const V=(W=T==null?void 0:T.histories[T.index])==null?void 0:W.data;Ie.logFunc("sendDevThemeSaveStateData useEffect"),s({payload:{devThemeSaveStateData:JSON.stringify(V)}})},[_,T,r]);const te=!S||!_||!g,B=60+(S+_+g)*13.33;return te?h.jsx(Ai,{progress:B}):h.jsx(C5,{puckConfig:t,puckInitialHistory:m,isLoading:te,templateMetadata:r,publishTheme:c,themeConfig:o,saveThemeSaveState:l,themeHistories:T,setThemeHistories:E,clearThemeHistory:U,sendDevThemeSaveStateData:s,buildThemeLocalStorageKey:f})},P5=new ze,O5=({document:e,componentRegistry:t,themeConfig:r})=>{e&&P5.logData("DOCUMENT",e);const[n,a]=d.useState(void 0),[o,i]=d.useState(void 0),[s,l]=d.useState(!1),{templateMetadata:c,puckConfig:u,layoutData:p,layoutDataFetched:g,themeData:f,themeDataFetched:b}=Zv(t),{pushPageSets:v}=ar();Jv(),d.useEffect(()=>{if(typeof window<"u"){const S=window.location.ancestorOrigins;S.length===0||!S[0].includes("pagescdn")&&!S[0].includes("yext.com")&&!S[0].includes("localhost")?window.location.assign("/404.html"):l(!0)}},[]),d.useEffect(()=>{if(c!=null&&c.isDevMode)try{a(pageSets),i(siteStream)}catch{console.warn("pageSets are not defined")}},[c==null?void 0:c.isDevMode]),d.useEffect(()=>{typeof window<"u"&&(c!=null&&c.isDevMode)&&n&&v({payload:{...n,siteStream:o}})},[c==null?void 0:c.isDevMode,n]);const m=!u||!c||!e||!g||!b,x=60*((!!u+!!c+!!e+g+b)/5);return h.jsxs(h.Fragment,{children:[m?s&&h.jsx(Ai,{progress:x}):c.isThemeMode?h.jsx(A5,{puckConfig:u,templateMetadata:c,layoutData:p,themeData:f,themeConfig:r}):h.jsx(Ky,{puckConfig:u,templateMetadata:c,layoutData:p,themeData:f,themeConfig:r}),h.jsx(Xv,{closeButton:!0,richColors:!0})]})},R5=["uid","meta","slug"],k5=[],wh=e=>Sh(e,""),Sh=(e,t)=>{var a,o,i;const r=t?`${t}.${e.name}`:e.name;if(k5.includes(Eh(e)))return[{name:r,schemaField:e}];if(e.definition.isList)return[{name:r,schemaField:e}];const n=[{name:r,schemaField:e}];if((a=e.children)!=null&&a.fields&&((i=(o=e.children)==null?void 0:o.fields)==null?void 0:i.length)>0)for(const s of e.children.fields)n.push(...Sh(s,r));return n},Eh=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function j5(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const N5=e=>e.reduce((t,r)=>{const n=wh(r);for(const a of n){const o=Eh(a.schemaField);o&&(t=j5(t,o,a.name))}return t},new Map),F5=e=>{let r=Du().filter(a=>!R5.includes(a.name));if(e!=null&&e.allowList){const a=r.map(o=>o.name);e.allowList.forEach(o=>{a.includes(o)||console.warn(`The entity field filter allowList included ${o}, which does not exist in the stream.`)}),r=r.filter(o=>e.allowList.includes(o.name))}e!=null&&e.disallowList&&(r=r.filter(a=>!e.disallowList.includes(a.name)));let n=[];for(const a of r){const o=wh(a);for(const i of o)n.push({...i.schemaField,name:i.name})}if(e!=null&&e.types){const a=N5(n),o=[];e.types.forEach(i=>{o.push(...n.filter(s=>{var l;return(l=a.get(i))==null?void 0:l.includes(s.name)}))}),n=o}return n=n.filter(a=>!!a.definition.isList==!!(e!=null&&e.includeListsOnly)),n};function D5(e){const t=e+"CollectionProvider",[r,n]=Oa(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:b,children:v}=f,m=d.useRef(null),x=d.useRef(new Map).current;return h.jsx(a,{scope:b,itemMap:x,collectionRef:m,children:v})};i.displayName=t;const s=e+"CollectionSlot",l=d.forwardRef((f,b)=>{const{scope:v,children:m}=f,x=o(s,v),S=Re(b,x.collectionRef);return h.jsx(Qt,{ref:S,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",p=d.forwardRef((f,b)=>{const{scope:v,children:m,...x}=f,S=d.useRef(null),C=Re(b,S),T=o(c,v);return d.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>void T.itemMap.delete(S))),h.jsx(Qt,{[u]:"",ref:C,children:m})});p.displayName=c;function g(f){const b=o(e+"CollectionConsumer",f);return d.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const x=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((T,E)=>x.indexOf(T.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},g,n]}var M5=y.createContext(void 0);function Ch(e){const t=y.useContext(M5);return e||t||"ltr"}var Io="rovingFocusGroup.onEntryFocus",L5={bubbles:!1,cancelable:!0},to="RovingFocusGroup",[pi,Th,I5]=D5(to),[B5,$h]=Oa(to,[I5]),[H5,z5]=B5(to),_h=y.forwardRef((e,t)=>h.jsx(pi.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(pi.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(W5,{...e,ref:t})})}));_h.displayName=to;var W5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...p}=e,g=y.useRef(null),f=Re(t,g),b=Ch(o),[v=null,m]=jn({prop:i,defaultProp:s,onChange:l}),[x,S]=y.useState(!1),C=Ot(c),T=Th(r),E=y.useRef(!1),[_,P]=y.useState(0);return y.useEffect(()=>{const j=g.current;if(j)return j.addEventListener(Io,C),()=>j.removeEventListener(Io,C)},[C]),h.jsx(H5,{scope:r,orientation:n,dir:b,loop:a,currentTabStopId:v,onItemFocus:y.useCallback(j=>m(j),[m]),onItemShiftTab:y.useCallback(()=>S(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>P(j=>j-1),[]),children:h.jsx(Ce.div,{tabIndex:x||_===0?-1:0,"data-orientation":n,...p,ref:f,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{E.current=!0}),onFocus:Se(e.onFocus,j=>{const G=!E.current;if(j.target===j.currentTarget&&G&&!x){const U=new CustomEvent(Io,L5);if(j.currentTarget.dispatchEvent(U),!U.defaultPrevented){const te=T().filter(z=>z.focusable),B=te.find(z=>z.active),V=te.find(z=>z.id===v),oe=[B,V,...te].filter(Boolean).map(z=>z.ref.current);Oh(oe,u)}}E.current=!1}),onBlur:Se(e.onBlur,()=>S(!1))})})}),Ah="RovingFocusGroupItem",Ph=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:o,...i}=e,s=Tn(),l=o||s,c=z5(Ah,r),u=c.currentTabStopId===l,p=Th(r),{onFocusableItemAdd:g,onFocusableItemRemove:f}=c;return y.useEffect(()=>{if(n)return g(),()=>f()},[n,g,f]),h.jsx(pi.ItemSlot,{scope:r,id:l,focusable:n,active:a,children:h.jsx(Ce.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:Se(e.onMouseDown,b=>{n?c.onItemFocus(l):b.preventDefault()}),onFocus:Se(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const v=U5(b,c.orientation,c.dir);if(v!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=p().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=c.loop?Y5(x,S+1):x.slice(S+1)}setTimeout(()=>Oh(x))}})})})});Ph.displayName=Ah;var V5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function G5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function U5(e,t,r){const n=G5(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return V5[n]}function Oh(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Y5(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var K5=_h,q5=Ph,Hs="Radio",[X5,Rh]=qr(Hs),[J5,Z5]=X5(Hs),kh=y.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:o,disabled:i,value:s="on",onCheck:l,form:c,...u}=e,[p,g]=y.useState(null),f=Re(t,m=>g(m)),b=y.useRef(!1),v=p?c||!!p.closest("form"):!0;return h.jsxs(J5,{scope:r,checked:a,disabled:i,children:[h.jsx(Ce.button,{type:"button",role:"radio","aria-checked":a,"data-state":Fh(a),"data-disabled":i?"":void 0,disabled:i,value:s,...u,ref:f,onClick:Se(e.onClick,m=>{a||l==null||l(),v&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),v&&h.jsx(Q5,{control:p,bubbles:!b.current,name:n,value:s,checked:a,required:o,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});kh.displayName=Hs;var jh="RadioIndicator",Nh=y.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,o=Z5(jh,r);return h.jsx(Zr,{present:n||o.checked,children:h.jsx(Ce.span,{"data-state":Fh(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t})})});Nh.displayName=jh;var Q5=e=>{const{control:t,checked:r,bubbles:n=!0,...a}=e,o=y.useRef(null),i=Ud(r),s=Mi(t);return y.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&p){const g=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(g)}},[i,r,n]),h.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Fh(e){return e?"checked":"unchecked"}var eM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zs="RadioGroup",[tM,FL]=qr(zs,[$h,Rh]),Dh=$h(),Mh=Rh(),[rM,nM]=tM(zs),Lh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:o,required:i=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:p,...g}=e,f=Dh(r),b=Ch(c),[v,m]=jn({prop:o,defaultProp:a,onChange:p});return h.jsx(rM,{scope:r,name:n,required:i,disabled:s,value:v,onValueChange:m,children:h.jsx(K5,{asChild:!0,...f,orientation:l,dir:b,loop:u,children:h.jsx(Ce.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:b,...g,ref:t})})})});Lh.displayName=zs;var Ih="RadioGroupItem",Bh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,o=nM(Ih,r),i=o.disabled||n,s=Dh(r),l=Mh(r),c=y.useRef(null),u=Re(t,c),p=o.value===a.value,g=y.useRef(!1);return y.useEffect(()=>{const f=v=>{eM.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",b)}},[]),h.jsx(q5,{asChild:!0,...s,focusable:!i,active:p,children:h.jsx(kh,{disabled:i,required:o.required,checked:p,...l,...a,name:o.name,ref:u,onCheck:()=>o.onValueChange(a.value),onKeyDown:Se(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Se(a.onFocus,()=>{var f;g.current&&((f=c.current)==null||f.click())})})})});Bh.displayName=Ih;var aM="RadioGroupIndicator",Hh=y.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=Mh(r);return h.jsx(Nh,{...a,...n,ref:t})});Hh.displayName=aM;var zh=Lh,Wh=Bh,oM=Hh;const Vh=y.forwardRef(({className:e,...t},r)=>h.jsx(zh,{className:Oe("ve-grid ve-gap-2",e),...t,ref:r}));Vh.displayName=zh.displayName;const hi=y.forwardRef(({className:e,...t},r)=>h.jsx(Wh,{ref:r,className:Oe("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:h.jsx(oM,{className:"ve-flex ve-items-center ve-justify-center",children:h.jsx(qm,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));hi.displayName=Wh.displayName;var iM="Label",Gh=y.forwardRef((e,t)=>h.jsx(Ce.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Gh.displayName=iM;var Uh=Gh;const sM=Ne("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),gi=y.forwardRef(({className:e,...t},r)=>h.jsx(Uh,{ref:r,className:Oe(sM(),e),...t}));gi.displayName=Uh.displayName;function Ws(e){const t=[];return e.fields.forEach(r=>{t.push(lM(e,r))}),h.jsx(h.Fragment,{children:t})}function lM(e,t){return h.jsx(Te.FieldLabel,{label:t.label,className:"ve-inline-block ve-pt-4",children:h.jsx(Te.AutoField,{field:{type:t.fieldType},value:e.value[t.field],onChange:r=>{e.onChange({...e.value,[t.field]:r})}})},`constant-${t.field}-label`)}const cM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Alternate Text",field:"alternateText",fieldType:"text"},{label:"URL",field:"url",fieldType:"text"},{label:"Height",field:"height",fieldType:"number"},{label:"Width",field:"width",fieldType:"number"}]})},wu={type:"text"},uM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Line 1",field:"line1",fieldType:"text"},{label:"Line 2",field:"line2",fieldType:"text"},{label:"Line 3",field:"line3",fieldType:"text"},{label:"City",field:"city",fieldType:"text"},{label:"State/Region",field:"region",fieldType:"text"},{label:"Sublocality",field:"sublocality",fieldType:"text"},{label:"Postal Code",field:"postalCode",fieldType:"text"},{label:"Country Code",field:"countryCode",fieldType:"text"}]})},Su="#969696",dM={type:"custom",render:({onChange:e,value:t})=>{const[r,n]=d.useState(t),a=(s,l)=>{const c=[...r];c[s]=l,n(c),e(c)},o=s=>{const l=r.filter((c,u)=>u!==s);n(l),e(l)},i=()=>{n([...r,""])};return h.jsxs("div",{children:[r.map((s,l)=>h.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[h.jsx(Te.AutoField,{field:{type:"text"},value:s,onChange:c=>a(l,c)}),h.jsx("span",{style:{color:Su},children:h.jsx(Te.IconButton,{onClick:()=>o(l),variant:"secondary",title:"Delete",disabled:r.length===1,children:h.jsx(r0,{})})})]},l)),h.jsx("span",{style:{color:Su,width:"auto"},children:h.jsx(Te.Button,{onClick:i,variant:"secondary",icon:h.jsx(Qm,{}),fullWidth:!0,children:h.jsx(h.Fragment,{})})})]})}},fM={type:"custom",render:({onChange:e,value:t})=>Ws({onChange:e,value:t,fields:[{label:"Label",field:"label",fieldType:"text"},{label:"Link",field:"link",fieldType:"text"}]})},vi=new ze,pM={"type.string":wu,"type.phone":wu,"type.image":cM,"type.address":uM,"type.cta":fM},hM=(e,t)=>{if(t)return dM;const r=pM[e];if(!r){vi.log(`No constant configuration for ${e}`);return}return r},gM=(e,t)=>{let r;for(const n of e){const a=hM(n,t);if(!a){vi.log(`No mapped configuration for ${n}`);return}if(r||(r=a),r!==a){vi.log(`Could not resolve configuration for ${n}`);return}}return r},be=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const a=o=>{n({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:o})};return h.jsxs(h.Fragment,{children:[h.jsx(vM,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?h.jsx(bM,{onChange:n,value:r,filter:e.filter}):h.jsx(mM,{onChange:n,value:r,filter:e.filter,label:t.label})]})}}),vM=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>h.jsx("div",{className:"ve-mb-2 ve-w-full",children:h.jsxs(Vh,{defaultValue:(e==null?void 0:e.toString())??"false",children:[h.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[h.jsx(hi,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),h.jsx(gi,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),h.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[h.jsx(hi,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),h.jsx(gi,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),bM=({filter:e,onChange:t,value:r})=>{const n=gM(e.types,!!e.includeListsOnly);return h.jsx(Te.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:n&&h.jsx(Te.AutoField,{onChange:a=>t({field:(r==null?void 0:r.field)??"",constantValue:a,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:n})})},mM=({filter:e,onChange:t,value:r,label:n})=>{const a=F5(e);return h.jsx(Te.FieldLabel,{label:n??"Entity Field",className:"ve-mt-2.5",children:h.jsx(Te.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...a.map(o=>({label:o.name,value:o.name}))]},onChange:o=>{t({field:o,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})},yM=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:r,value:n})=>h.jsxs(Te.FieldLabel,{label:e,children:[h.jsx(Te.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:a=>r(a==="default"?"default":t),value:n==="default"?"default":"custom"}),n!=="default"&&h.jsx(Te.AutoField,{field:{type:"number"},value:n,onChange:r})]})}),xM=[{label:"Default",value:"default",px:""},{label:"XS",value:"xs",px:"12"},{label:"SM",value:"sm",px:"14"},{label:"Base",value:"base",px:"16"},{label:"LG",value:"lg",px:"18"},{label:"XL",value:"xl",px:"20"},{label:"2XL",value:"2xl",px:"24"},{label:"3XL",value:"3xl",px:"30"},{label:"4XL",value:"4xl",px:"36"},{label:"5XL",value:"5xl",px:"48"},{label:"6XL",value:"6xl",px:"60"},{label:"7XL",value:"7xl",px:"72"},{label:"8XL",value:"8xl",px:"96"},{label:"9XL",value:"9xl",px:"128"}],Eu=e=>{if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}if(e.endsWith("%")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)/100*t}throw new Error("Unknown font size unit")},wM=(e,t)=>{var n,a;const r=(a=(n=e==null?void 0:e.theme)==null?void 0:n.extend)==null?void 0:a.fontSize[t];return typeof r=="string"?Eu(r):Array.isArray(r)&&r.length>0?Eu(r[0]):0},SM=(e,t)=>e.map(r=>{const n=wM(t,r.value),a=n?n.toString():r.px;return{label:r.label+(r.px?` (${a}px)`:""),value:r.value}}),Be=e=>({type:"custom",render:({value:t,onChange:r})=>{const n=Mu();return h.jsx(Te.FieldLabel,{label:e??"Font Size",icon:h.jsx(zi,{size:16}),children:h.jsx(Te.AutoField,{value:t,onChange:r,field:{type:"select",options:SM(xM,n)}})})}}),Yh=Ne("components font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"}}),fr=y.forwardRef(({className:e,fontSize:t,fontWeight:r,color:n,textTransform:a,...o},i)=>h.jsx("p",{className:ke(Yh({fontSize:t,fontWeight:r,color:n,textTransform:a,className:e}),e),ref:i,...o,children:o.children}));fr.displayName="Body";const Kh=Ne("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius font-body-fontFamily font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-button-backgroundColor text-button-textColor border-2 border-button-backgroundColor hover:border-button-textColor focus:border-button-textColor active:bg-button-textColor active:text-button-backgroundColor active:border-button-backgroundColor",link:"text-button-textColor underline-offset-4 underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",small:"h-9 px-3",large:"h-11 px-8",icon:"h-10 w-10"},fontSize:{default:"text-button-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},borderRadius:{default:"",none:"rounded-none",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default"}}),ro=y.forwardRef(({className:e,variant:t,size:r,borderRadius:n,asChild:a=!1,fontSize:o,...i},s)=>{const l=a?Qt:"button";return h.jsx(l,{className:ke(Kh({variant:t,size:r,borderRadius:n,fontSize:o}),e),ref:s,...i})});ro.displayName="Button";const Wn=({label:e,link:t,variant:r,size:n,borderRadius:a,className:o,fontSize:i="default"})=>h.jsx(ro,{asChild:!0,className:o,variant:r,size:n,borderRadius:a,fontSize:i,children:h.jsx(He.Link,{href:t??"",children:e})});Wn.displayName="CTA";const qh=Ne("components",{variants:{level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color font-heading1-fontFamily",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color font-heading2-fontFamily",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color font-heading3-fontFamily",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color font-heading4-fontFamily",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color font-heading5-fontFamily",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color font-heading6-fontFamily"},fontSize:{default:"",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{default:"",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",color:"primary",weight:"default",transform:"none"}}),Yr=y.forwardRef(({className:e,level:t=1,color:r,weight:n,transform:a,fontSize:o,...i},s)=>{const l=`h${t}`;return h.jsx(l,{id:"tag",className:ke(qh({fontSize:o,color:r,weight:n,transform:a,level:t}),e),ref:s,...i,children:i.children})});Yr.displayName="Heading";const Xh=Ne("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),pr=y.forwardRef(({className:e,padding:t,maxWidth:r,...n},a)=>h.jsx("div",{className:"components bg-main",children:h.jsx("div",{className:ke(Xh({padding:t,maxWidth:r}),e),ref:a,...n,children:n.children})}));pr.displayName="Section";const EM={address:be({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},CM=({alignment:e,padding:t,address:r,getDirectionsProvider:n})=>{const a=je(),o=ve(a,r),i=He.getDirections(o,void 0,void 0,{provider:n});return h.jsx(pr,{className:`flex flex-col justify-center components ${e} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:o&&h.jsx("div",{children:h.jsxs(We,{displayName:"Address",fieldId:r.constantValueEnabled?"constant value":"address",children:[h.jsx(He.Address,{address:o,lines:[["line1"],["line2","city","region","postalCode"]]}),i&&h.jsx(He.Link,{cta:{link:i,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},TM={fields:EM,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>h.jsx(CM,{...e})},Cu={text:be({label:"Entity Field",filter:{types:["type.string"]}}),textAlignment:{label:"Text Alignment",type:"radio",options:[{label:"Left",value:"justify-start"},{label:"Center",value:"justify-center"},{label:"Right",value:"justify-end"}]},fontSize:Be(),textColor:{label:"Text Color",type:"radio",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},backgroundColor:{label:"Background Color",type:"radio",options:[{label:"Background",value:"bg-palette-background"},{label:"Primary",value:"bg-palette-primary"},{label:"Secondary",value:"bg-palette-secondary"},{label:"Accent",value:"bg-palette-accent"},{label:"Text",value:"bg-palette-text"}]}},$M=({text:e,textAlignment:t,fontSize:r,fontWeight:n,textColor:a,backgroundColor:o})=>{const i=je(),s=ve(i,e);return h.jsx("div",{className:`Banner ${o} components px-4 md:px-20 py-6`,children:h.jsx("div",{className:`flex ${t} items-center`,children:h.jsx(fr,{color:a,fontWeight:n,fontSize:r,children:s})})})},_M={fields:Cu,defaultProps:{text:{field:"",constantValue:"Banner Text",constantValueEnabled:!0},textAlignment:"justify-center",fontSize:"default",fontWeight:"default",textColor:"default",backgroundColor:"bg-palette-background"},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Cu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx($M,{...e})},Jh=y.forwardRef(({text:e,...t},r)=>{const n=je();return h.jsx(We,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(fr,{ref:r,...t,children:ve(n,e)})})});Jh.displayName="BodyText";const Tu={text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},AM={label:"Body Text",fields:Tu,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Tu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(Jh,{...e})},PM="https://placehold.co/640x360",Vs=Ne("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),OM={image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},RM=({image:e,size:t,aspectRatio:r,rounded:n})=>{const a=je(),o=ve(a,e);return o?h.jsx(We,{displayName:"Image",fieldId:e.field,children:h.jsx("div",{className:ke(Vs({size:t,aspectRatio:r,rounded:n}),"overflow-hidden"),children:h.jsx(He.Image,{image:o,className:"w-full h-full object-cover"})})}):null},kM={label:"Image",fields:OM,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:PM},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>h.jsx(RM,{...e})},jM="https://placehold.co/640x360",NM={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},heading:{type:"object",label:"Title",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},subheading:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},body:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Be()}}},FM=({orientation:e,heading:t,subheading:r,body:n,image:a,cta:o})=>{const i=je(),s=ve(i,a.image),l=ve(i,o.entityField);return s?h.jsx(pr,{className:"components",children:h.jsxs("div",{className:ke("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[s&&h.jsx(We,{displayName:"Image",fieldId:a.image.field,children:h.jsx("div",{className:ke(Vs({size:a.size,rounded:a.rounded,aspectRatio:a.aspectRatio}),"overflow-hidden"),children:h.jsx(He.Image,{image:s,className:"w-full h-full object-cover"})})}),h.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&h.jsx(Yr,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:ve(i,t.text)}),(r==null?void 0:r.text)&&h.jsx(Yr,{fontSize:r.fontSize,color:r.color,transform:r.transform,children:ve(i,r.text)}),(n==null?void 0:n.text)&&h.jsx(fr,{fontSize:n.fontSize,textTransform:n.transform,color:n.color,children:ve(i,n.text)}),l&&h.jsx(Wn,{variant:o.variant,label:l.name,link:l.link??"#",fontSize:o.fontSize})]})]})}):null},DM={label:"Card",fields:NM,defaultProps:{orientation:"left",heading:{text:{field:"",constantValue:"Heading",constantValueEnabled:!0},fontSize:"3xl",color:"default",transform:"none"},subheading:{text:{field:"",constantValue:"SubHeading",constantValueEnabled:!0},fontSize:"xl",color:"default",transform:"none"},body:{text:{field:"",constantValue:"Body",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:jM},constantValueEnabled:!0},size:"full",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>h.jsx(FM,{...e})},MM={entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Be(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},LM=({entityField:e,variant:t,className:r,fontSize:n,size:a,borderRadius:o})=>{const i=je(),s=ve(i,e);return h.jsx(We,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(Wn,{label:s==null?void 0:s.label,link:(s==null?void 0:s.link)||"#",variant:t,className:r,fontSize:n,size:a,borderRadius:o})})},IM={label:"Call to Action",fields:MM,defaultProps:{entityField:{field:"",constantValue:{name:"Call to Action"}},variant:"primary",fontSize:"default",borderRadius:"default",size:"default"},render:e=>h.jsx(LM,{...e})},BM="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",HM=Ne("list-inside font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),$u={list:be({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},zM=({list:e,fontSize:t,fontWeight:r,color:n,includeHyperlink:a,listLength:o})=>{const i=je();let s=ve(i,e);return s?Array.isArray(s)||(s=[s]):s=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],h.jsx(We,{displayName:"Email List",fieldId:e.field,children:h.jsx("ul",{className:ke("components",HM({fontSize:t,fontWeight:r,color:n}),`${a?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:s.slice(0,Math.min(s.length,o)).map((l,c)=>h.jsxs("li",{className:"mb-2 flex items-center",children:[h.jsx("img",{className:"mr-2",src:BM}),h.jsx("span",{children:a?h.jsx("a",{href:l,children:l}):l})]},c))})})},WM={label:"Emails",fields:$u,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...$u,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(zM,{...e})},VM=Ne("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),Zh=y.forwardRef(({className:e,direction:t,alignment:r,justification:n,spacing:a,renderDropZone:o,...i},s)=>h.jsx("div",{className:ke(VM({direction:t,alignment:r,justification:n,spacing:a}),e),ref:s,...i,children:o({zone:"flex-container"})}));Zh.displayName="FlexContainer";const GM={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},UM={label:"Flex Container",fields:GM,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:r,spacing:n,className:a,puck:{renderDropZone:o}})=>h.jsx(Zh,{renderDropZone:o,direction:e,alignment:t,justification:r,className:a,spacing:n})},YM=Ne("",{variants:{backgroundColor:{default:"bg-footer-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),KM={copyright:{type:"object",label:"Copyright Text",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}}},links:{type:"array",label:"Links",arrayFields:{cta:be({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},qM={fields:KM,defaultProps:{copyright:{text:{field:"",constantValue:"Copyright Text",constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}}]},label:"Footer",render:e=>h.jsx(XM,{...e}),resolveFields:async(e,{fields:t})=>{const r=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...t,copyright:{...t.copyright,objectFields:{...t.copyright.objectFields,fontWeight:{label:"Font Weight",type:"select",options:r}}}}},resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const r=[],n=a=>{if(!a||r.includes(a)){const o=mi.v4();return r.push(o),a}return a};return{props:{...e,links:e.links.map(a=>({...a,id:n(a.id)}))}}}},XM=e=>{const t=je(),{links:r,backgroundColor:n,copyright:a}=e,o=r==null?void 0:r.map(s=>{const l=ve(t,s.cta);if(l)return{id:s.id,...l}}).filter(s=>s!==void 0),i=ve(t,a.text);return h.jsxs("footer",{className:ke("w-full bg-white components",YM({backgroundColor:n})),children:[h.jsx("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 pt-4 pb-3",children:h.jsx("div",{className:"flex items-center justify-end space-x-4",children:h.jsx("ul",{className:"flex space-x-8",children:o==null?void 0:o.map((s,l)=>h.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:s.link&&h.jsx(He.Link,{cta:s,eventName:`footer-link-${s.label}`})},s.id??l))})})}),h.jsx("div",{className:"mx-auto max-w-6xl px-4 pt-3 pb-4",children:h.jsx(fr,{fontSize:a.fontSize,textTransform:a.textTransform,fontWeight:a.fontWeight,color:a.color,children:i})})]})},JM={coordinate:be({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Be(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},ZM=({variant:e,size:t,borderRadius:r,coordinate:n,getDirectionsProvider:a,fontSize:o})=>{const i=je(),s=ve(i,n);s||console.warn("yextDisplayCoordinate is not present in the stream");const l=He.getDirections(void 0,void 0,void 0,{provider:a},s);return h.jsx(ro,{asChild:!0,variant:e,size:t,fontSize:o,borderRadius:r,children:h.jsx(He.Link,{href:l??"#",children:"Get Directions"})})},QM={fields:JM,defaultProps:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>h.jsx(ZM,{...e})},eL=[{label:"0",value:"py-0"},{label:"0.5",value:"py-0.5"},{label:"1",value:"py-1"},{label:"1.5",value:"py-1.5"},{label:"2",value:"py-2"},{label:"2.5",value:"py-2.5"},{label:"3",value:"py-3"},{label:"3.5",value:"py-3.5"},{label:"4",value:"py-4"},{label:"5",value:"py-5"},{label:"6",value:"py-6"},{label:"7",value:"py-7"},{label:"8",value:"py-8"},{label:"9",value:"py-9"},{label:"10",value:"py-10"},{label:"11",value:"py-11"},{label:"12",value:"py-12"},{label:"14",value:"py-14"},{label:"16",value:"py-16"},{label:"20",value:"py-20"},{label:"24",value:"py-24"}],tL=Ne("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),rL=Ne("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),nL=Ne("flex flex-col gap-y-grid-verticalSpacing",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"}},defaultVariants:{verticalAlignment:"start"}}),Qh=y.forwardRef(({className:e,distribution:t,columns:r,horizontalSpacing:n,verticalPadding:a,maxContentWidth:o,renderDropZone:i,backgroundColor:s,...l},c)=>h.jsx(pr,{className:ke(tL({maxContentWidth:o,backgroundColor:s}),a),padding:"none",children:h.jsx("div",{className:ke(rL({horizontalSpacing:n}),e),ref:c,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${r.length}, 1fr)`},...l,children:r.map(({span:u,verticalAlignment:p},g)=>h.jsx("div",{className:ke(nL({verticalAlignment:p})),style:{gridColumn:u&&t==="manual"?`span ${Math.max(Math.min(u,12),1)}`:""},children:i({zone:`column-${g}`})},g))})}));Qh.displayName="GridSection";const aL={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]}}},verticalPadding:{label:"Vertical Padding",type:"select",options:eL},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},oL={label:"Grid Section",fields:aL,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start"},{verticalAlignment:"start"}],verticalPadding:"default",backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:r,maxContentWidth:n,horizontalSpacing:a,verticalPadding:o,puck:{renderDropZone:i}})=>h.jsx(Qh,{renderDropZone:i,columns:e,distribution:t,backgroundColor:r,maxContentWidth:n,horizontalSpacing:a,verticalPadding:o})},iL="https://placehold.co/50",sL=Ne("",{variants:{backgroundColor:{default:"bg-header-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),lL={logo:{type:"object",label:"Logo",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}})}},links:{type:"array",label:"Links",arrayFields:{cta:be({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},cL={fields:lL,defaultProps:{logo:{image:{field:"",constantValue:{height:50,width:50,url:iL},constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}]},label:"Header",render:e=>h.jsx(uL,{...e}),resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const r=[],n=a=>{if(!a||r.includes(a)){const o=mi.v4();return r.push(o),a}return a};return{props:{...e,links:e.links.map(a=>({...a,id:n(a.id)}))}}}},uL=e=>{const t=je(),{logo:r,links:n,backgroundColor:a}=e,o=ve(t,r.image),i=n==null?void 0:n.map(s=>{const l=ve(t,s.cta);if(l)return{id:s.id,...l}}).filter(s=>s!==void 0);return h.jsx("header",{className:ke("w-full bg-white components",sL({backgroundColor:a})),children:h.jsxs("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 py-6",children:[o&&h.jsx(He.Image,{image:o,className:"w-full h-full object-cover"}),h.jsx("div",{className:"flex items-center justify-end space-x-4",children:h.jsx("ul",{className:"flex space-x-8",children:i==null?void 0:i.map((s,l)=>h.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:s.link&&h.jsx(He.Link,{cta:s,eventName:`header-link-${s.label}`})},s.id??l))})})]})})},eg=y.forwardRef(({text:e,...t},r)=>{const n=je();return h.jsx(We,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:h.jsx(Yr,{ref:r,...t,children:ve(n,e)})})});eg.displayName="HeadingText";const _u={text:be({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},dL={label:"Heading Text",fields:_u,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},resolveFields:async e=>{const t=await Kt({fontCssVariable:`--fontFamily-heading${e.props.level}-fontFamily`});return{..._u,weight:{label:"Font Weight",type:"select",options:t}}},render:e=>h.jsx(eg,{...e})},fL={hours:be({label:"Hours",filter:{types:["type.hours"]}}),startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},pL=({hours:e,startOfWeek:t,collapseDays:r,showAdditionalHoursText:n,alignment:a,padding:o})=>{const i=je(),s=ve(i,e),{additionalHoursText:l}=i;return h.jsx(pr,{className:`flex flex-col justify-center components ${a} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:h.jsxs("div",{children:[s&&h.jsx(We,{displayName:"Hours",fieldId:"hours",children:h.jsx(He.HoursTable,{hours:s,startOfWeek:t,collapseDays:r})}),l&&n&&h.jsx(We,{displayName:"Hours Text",fieldId:"additionalHoursText",children:h.jsx("div",{className:"mt-4",children:l})})]})})},hL={fields:fL,defaultProps:{hours:{field:"hours",constantValue:{}},startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Table",render:e=>h.jsx(pL,{...e})},gL={hours:be({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},vL=({hours:e,className:t,showCurrentStatus:r,timeFormat:n,showDayNames:a,dayOfWeekFormat:o})=>{const i=je(),s=ve(i,e);return s?h.jsx(We,{displayName:"Hours",fieldId:e.field,children:h.jsx(He.HoursStatus,{hours:s,className:ke("components font-semibold mb-2 font-body-fontFamily",t),currentTemplate:r?void 0:()=>h.jsx(h.Fragment,{}),separatorTemplate:r?void 0:()=>h.jsx(h.Fragment,{}),dayOfWeekTemplate:a?void 0:()=>h.jsx(h.Fragment,{}),dayOptions:{weekday:o},timeOptions:{hour12:n==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},bL={label:"Hours Status",fields:gL,defaultProps:{hours:{field:"hours",constantValue:{}},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>h.jsx(vL,{...e})},mL=Ne("components flex gap-2 items-center text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontWeight:"default",color:"default"}}),yL=(e,t="domestic")=>{const n=(""+e).replace(/\D/g,"").match(/^(?:\+?(\d{1,3}))?(\d{3})(\d{3})(\d{4})$/);if(n){const a=n[1]?`+${n[1]} `:"";return t==="international"?`${a}(${n[2]}) ${n[3]}-${n[4]}`:`(${n[2]}) ${n[3]}-${n[4]}`}return e},Au={phone:be({label:"Entity Field",filter:{types:["type.phone"]}}),format:{label:"Format",type:"radio",options:[{label:"Domestic",value:"domestic"},{label:"International",value:"international"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},xL=({phone:e,format:t,fontWeight:r,color:n})=>{const a=je(),o=ve(a,e);if(o)return h.jsx(We,{displayName:"Phone",fieldId:e.field,children:h.jsxs("p",{className:mL({fontWeight:r,color:n}),children:[h.jsx(Zm,{className:"w-4 h-4"}),yL(o,t)]})})},wL={label:"Phone",fields:Au,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Au,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(xL,{...e})},SL="https://placehold.co/640x360",EL={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},title:{type:"object",label:"Title",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},description:{type:"object",label:"Description",objectFields:{text:be({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Be(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:be({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:be({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Be()}}},CL=({orientation:e,title:t,description:r,image:n,cta:a})=>{const o=je(),i=ve(o,n.image),s=ve(o,a.entityField);return i?h.jsx(pr,{className:"components",children:h.jsxs("div",{className:ke("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[i&&h.jsx(We,{displayName:"Image",fieldId:n.image.field,children:h.jsx("div",{className:ke(Vs({size:n.size,rounded:n.rounded,aspectRatio:n.aspectRatio}),"overflow-hidden"),children:h.jsx(He.Image,{image:i,className:"w-full h-full object-cover"})})}),h.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&h.jsx(Yr,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:ve(o,t.text)}),(r==null?void 0:r.text)&&h.jsx(fr,{fontSize:r.fontSize,textTransform:r.transform,color:r.color,children:ve(o,r.text)}),s&&h.jsx(Wn,{variant:a.variant,label:s.name,link:s.link??"#",fontSize:a.fontSize})]})]})}):null},TL={label:"Promo",fields:EL,defaultProps:{orientation:"left",title:{text:{field:"",constantValue:"Title",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},description:{text:{field:"",constantValue:"Description",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:SL},constantValueEnabled:!0},size:"medium",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>h.jsx(CL,{...e})},$L=Ne("list-disc components list-inside text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),Pu={list:be({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},_L=({list:e,padding:t,fontWeight:r,color:n,textTransform:a})=>{const o=je();let i=ve(o,e);return i?Array.isArray(i)||(i=[i]):i=["Sample text 1","Sample text 2","Sample text 3"],h.jsx(We,{displayName:"Text List",fieldId:e.field,children:h.jsx("ul",{className:$L({padding:t,fontWeight:r,color:n,textTransform:a}),children:i.map((s,l)=>h.jsx("li",{className:"mb-2",children:s},l))})})},AL={label:"Text List",fields:Pu,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},resolveFields:async()=>{const e=await Kt({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Pu,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>h.jsx(_L,{...e})};exports.Address=TM;exports.Banner=_M;exports.Body=fr;exports.BodyText=AM;exports.Button=ro;exports.CTA=Wn;exports.CTAWrapper=IM;exports.Card=DM;exports.DocumentContext=yi;exports.Editor=O5;exports.Emails=WM;exports.EntityField=We;exports.FlexContainer=UM;exports.FontSizeSelector=Be;exports.Footer=qM;exports.GetDirections=QM;exports.GridSection=oL;exports.Header=cL;exports.Heading=Yr;exports.HeadingText=dL;exports.HoursStatus=bL;exports.HoursTable=hL;exports.ImageWrapper=kM;exports.NumberFieldWithDefaultOption=yM;exports.Phone=wL;exports.Promo=TL;exports.Section=pr;exports.TailwindConfigContext=xi;exports.TextList=AL;exports.VisualEditorProvider=sv;exports.YextEntityFieldSelector=be;exports.applyTheme=wg;exports.bodyVariants=Yh;exports.buttonVariants=Kh;exports.constructFontSelectOptions=bg;exports.defaultFonts=wi;exports.getFontWeightOptions=xg;exports.getFontWeightOverrideOptions=Kt;exports.headingVariants=qh;exports.resolveYextEntityField=ve;exports.sectionVariants=Xh;exports.themeMangerCn=ke;exports.themeMangerTwMergeConfiguration=qu;exports.themeResolver=Eg;exports.useDocument=je;exports.useEntityFields=Du;exports.usePlatformBridgeDocument=fg;exports.usePlatformBridgeEntityFields=pg;exports.useTailwindConfig=Mu;
@@ -18706,7 +18706,7 @@ const XM = {
18706
18706
  "li",
18707
18707
  {
18708
18708
  className: "cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",
18709
- children: /* @__PURE__ */ p.jsx(Mn, { cta: s, eventName: `link${l}` })
18709
+ children: s.link && /* @__PURE__ */ p.jsx(Mn, { cta: s, eventName: `footer-link-${s.label}` })
18710
18710
  },
18711
18711
  s.id ?? l
18712
18712
  )) }) }) }),
@@ -19183,7 +19183,7 @@ const iL = {
19183
19183
  "li",
19184
19184
  {
19185
19185
  className: "cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",
19186
- children: /* @__PURE__ */ p.jsx(Mn, { cta: s, eventName: `link${l}` })
19186
+ children: s.link && /* @__PURE__ */ p.jsx(Mn, { cta: s, eventName: `header-link-${s.label}` })
19187
19187
  },
19188
19188
  s.id ?? l
19189
19189
  )) }) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yext/visual-editor",
3
3
  "description": "Component library for Yext Pages Visual Editor",
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "type": "module",
6
6
  "author": "sumo@yext.com",
7
7
  "types": "dist/index.d.ts",