@plasmicapp/react-web
Advanced tools
Comparing version 0.2.97 to 0.2.98
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("classnames")),r=require("react"),n=e(r),i=require("react-dom"),a=e(i),o=require("@react-aria/ssr"),s=require("@react-aria/focus"),l=require("@react-aria/checkbox"),u=require("@react-aria/visually-hidden"),c=require("@react-stately/toggle"),p=require("@react-aria/menu"),d=require("@react-stately/tree"),f=require("@react-stately/collections"),v=require("@react-aria/separator"),m=require("@react-stately/menu"),h=require("@react-aria/interactions"),y=require("@react-aria/select"),g=require("@react-aria/listbox"),b=require("@react-stately/select"),w=require("@react-aria/switch"),P=require("@react-aria/overlays");function S(){return(S=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}).apply(this,arguments)}function x(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function V(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return E(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function C(e){return null!=e}function O(e){if(0===Object.keys(e).length)return e;for(var t={},r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var s=o[a];s in e&&(t[s]=e[s])}return t}function M(e){if(0===Object.keys(e).length)return e;for(var t={},r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var a=0,o=Object.keys(e);a<o.length;a++){var s=o[a];n.includes(s)||(t[s]=e[s])}return t}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0!==t.length)return function(e){for(var r,n=e,i=V(t);!(r=i()).done;)n=(0,r.value)(n);return n}}function k(e,t){for(var r,n={},i=V(e);!(r=i()).done;){var a=r.value,o=t(a);o in n?n[o].push(a):n[o]=[a]}return n}function A(e,t){var r={};for(var n in e)r[n]=t(e[n]);return r}var T="undefined"!=typeof window,F=Symbol("NONE"),R=T?n.useLayoutEffect:n.useEffect;function j(e,t,r){return Array.isArray(r)?n.createElement.apply(n,[e,t].concat(r)):r||"children"in t?n.createElement(e,t,r):n.createElement(e,t)}function W(e){return n.isValidElement(t=e)||function(e){return"string"==typeof e||"number"==typeof e}(t)?[e]:Array.isArray(e)?e.flatMap(W):[];var t}function D(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(r.every((function(e){return 0===Object.keys(e).length})))return e;for(var i=S({},e),a=0,o=r;a<o.length;a++)for(var s=o[a],l=0,u=Object.keys(s);l<u.length;l++){var c=u[l];i[c]=q(c,i[c],s[c])}return i}function _(e,t){e&&("function"==typeof e?e(t):Object.isFrozen(e)||(e.current=t))}function N(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r,n=V(t);!(r=n()).done;)_(r.value,e)}}function q(e,r,n){return r===F||n===F?null:null==r?n:null==n?r:"className"===e?t(r,n):"style"===e?S({},r,n):"ref"===e?N(r,n):typeof r!=typeof n?n:e.startsWith("on")&&"function"==typeof r?function(){var e;return"function"==typeof r&&(e=r.apply(void 0,arguments)),"function"==typeof n&&(e=n.apply(void 0,arguments)),e}:n}function H(e,t,r,n){var i=t.children,a=x(t,["children"]),o=L(i,null!=r&&r);return j(e,S({ref:n},a),o)}function K(e,t){var r=e.as,n=e.hasGap;return H(null!=r?r:"div",x(e,["as","hasGap"]),n,t)}var U=function(e){return r.forwardRef((function(t,r){var n=t.hasGap,i=x(t,["hasGap"]);return H(e,i,n,r)}))},z=Object.assign(r.forwardRef(K),{div:U("div"),a:U("a"),button:U("button"),h1:U("h1"),h2:U("h2"),h3:U("h3"),h4:U("h4"),h5:U("h5"),h6:U("h6"),label:U("label"),form:U("form"),section:U("section"),head:U("head"),main:U("main"),nav:U("nav")});function L(e,t){var n=t?"__wab_flex-container":"__wab_passthrough";return e?Array.isArray(e)?r.createElement.apply(r,["div",{className:n}].concat(e)):r.createElement("div",{className:n},e):null}function G(e,t,r,i){if(!e||0===Object.keys(e).length)return j(t,r,r.children);var a=Q(e),o=J(r,a.props);if("render"===a.type)return a.render(o,t);var s=t;"as"===a.type&&a.as&&(t===z?o.as=a.as:s=a.as);var l=o.children;a.wrapChildren&&(l=a.wrapChildren(function(e){return Array.isArray(e)?1===e.length?e[0]:n.createElement.apply(n,[n.Fragment,{}].concat(e)):e}(l))),i&&(l=L(l,!0));var u=j(s,o,l);return a.wrap&&(u=a.wrap(u)),u}var B=new Map;function Y(e,t){var r,n=t["data-plasmic-override"],i=t["data-plasmic-wrap-flex-child"],a=null!=(r=t["data-plasmic-trigger-props"])?r:[];delete t["data-plasmic-override"],delete t["data-plasmic-wrap-flex-child"],delete t["data-plasmic-trigger-props"];for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return G(n,e,D.apply(void 0,[t,0===s.length?{}:{children:1===s.length?s[0]:s}].concat(a)),i)}var $=Symbol("UNSET");function J(e,t){if(!t)return e;for(var r=S({},e),n=0,i=Object.keys(t);n<i.length;n++){var a=i[n],o=e[a],s=t[a];s===$?delete r[a]:(null!=s||"className"===a||"style"===a||a.startsWith("on")&&"function"==typeof o||(s=F),r[a]=q(a,o,s))}return r}function Q(e){if(!e)return{type:"default",props:{}};if(function(e){return"string"==typeof e||"number"==typeof e||n.isValidElement(e)}(e))return{type:"default",props:{children:e}};if("object"==typeof e)return"as"in e?S({},e,{props:e.props||{},type:"as"}):"render"in e?S({},e,{type:"render"}):"props"in e?S({},e,{props:e.props||{},type:"default"}):(t=Object.keys(e),r=["wrap","wrapChildren"],t.every((function(e){return r.includes(e)}))?S({},e,{props:{},type:"default"}):{type:"default",props:e});if("function"==typeof e)return{type:"render",render:e};var t,r;throw new Error("Unexpected override: "+e)}function X(e,t){if(!t)return e;for(var r={},n=0,i=Array.from(new Set([].concat(Object.keys(e),Object.keys(t))));n<i.length;n++){var a=i[n];r[a]=Z(e[a],t[a])}return r}function Z(e,t){var r,n;if(!e)return t;if(!t)return e;var i=Q(e),a=Q(t),o=I.apply(void 0,[i.wrap,a.wrap].filter(C)),s=I.apply(void 0,[i.wrapChildren,a.wrapChildren].filter(C)),l=J(null!=(r=i.props)?r:{},a.props);if("render"===a.type)return{render:a.render,props:l,wrap:o,wrapChildren:s};if("render"===i.type)return{render:i.render,props:l,wrap:o,wrapChildren:s};var u=null!=(n="as"===a.type?a.as:void 0)?n:"as"===i.type?i.as:void 0;return S({props:l,wrap:o,wrapChildren:s},u?{as:u}:{})}var ee=[640,750,828,1080,1200,1920,2048,3840],te=[].concat([16,32,48,64,96,128,256,384],ee),re=n.forwardRef((function(e,r){var i=e.src,a=e.className,o=e.displayWidth,s=e.displayHeight,l=e.displayMinWidth,u=e.displayMinHeight,c=e.displayMaxWidth,p=e.displayMaxHeight,d=e.quality,f=e.loader,v=e.imgRef,m=e.style,h=e.loading,y=x(e,["src","className","displayWidth","displayHeight","displayMinWidth","displayMinHeight","displayMaxWidth","displayMaxHeight","quality","loader","imgRef","style","loading"]),g=Object.assign({},y,{loading:null!=h?h:"lazy"}),b="string"!=typeof i&&i?i:{fullWidth:void 0,fullHeight:void 0,aspectRatio:void 0},w=b.fullWidth,P=b.fullHeight,E=b.aspectRatio,V=i?"string"==typeof i?i:i.src:"";if(null==P||null==w)return n.createElement("img",Object.assign({src:V,className:a,style:m},g,{loading:h,ref:N(v,r)}));!ie(V)||null!=s&&"auto"!==s||null!=o&&"auto"!==o||(o="100%"),w&&P&&(!o||"auto"===o)&&oe(s)&&(ie(V)||(o=oe(s)*w/P));var C=w,M=P;E&&isFinite(E)&&ie(V)&&(C=ne,M=Math.round(C/E));var I=function(e,t,r){var n=null==r?void 0:r.minWidth,i=oe(e),a=oe(n);if(null!=i&&(!n||null!=a))return{widthDescs:[{width:ae(Math.max(i,null!=a?a:0),t),desc:"1x"},{width:ae(2*Math.max(i,null!=a?a:0),t),desc:"2x"}],sizes:void 0};var o=ee.filter((function(e){return!t||e<t}));return t&&0===o.length?{widthDescs:[{width:ae(t,t),desc:"1x"}],sizes:void 0}:{widthDescs:o.map((function(e){return{width:ae(e,t),desc:e+"w"}})),sizes:"100vw"}}(o,w,{minWidth:l}),k=I.sizes,A=I.widthDescs,T=function(e){return null==e?void 0:"plasmic"===e?se:e}(f),F='<svg width="'+C+'" height="'+M+'" xmlns="http://www.w3.org/2000/svg" version="1.1"/>',R="undefined"==typeof window?Buffer.from(F).toString("base64"):window.btoa(F),j=S({},m||{}),W=O(m||{},"objectFit","objectPosition");return null!=o&&"auto"!==o?(W.width="100%",j.width=o,j.minWidth=l,j.maxWidth=c):(W.width=o,j.width="auto",l&&(W.minWidth="100%",j.minWidth=l),null!=c&&"none"!==c&&(W.maxWidth="100%",j.maxWidth=c)),null!=s&&"auto"!==s?(W.height="100%",j.height=s,j.minHeight=u,j.maxHeight=p):(W.height=s,j.height="auto",u&&(W.minHeight="100%",j.minHeight=u),null!=p&&"none"!==p&&(W.maxHeight="100%",j.maxHeight=p)),n.createElement("div",{className:t(a,"__wab_img-wrapper"),ref:r,style:j},n.createElement("img",{alt:"","aria-hidden":!0,className:"__wab_img-spacer-svg",src:"data:image/svg+xml;base64,"+R,style:W}),function(e){var t=e.imageLoader,r=e.widthDescs,i=e.src,a=e.quality,o=e.style,s=e.className,l=e.sizes,u=e.imgProps,c=e.ref;return n.createElement("picture",{className:"__wab_picture"},t&&t.supportsUrl(i)&&n.createElement("source",{type:"image/webp",srcSet:r.map((function(e){return t.transformUrl({src:i,quality:a,width:e.width,format:"webp"})+" "+e.desc})).join(", ")}),n.createElement("img",Object.assign({},u,{ref:c,className:s,decoding:"async",src:t&&t.supportsUrl(i)?t.transformUrl({src:i,quality:a,width:r[r.length-1].width}):i,srcSet:t&&t.supportsUrl(i)?r.map((function(e){return t.transformUrl({src:i,quality:a,width:e.width})+" "+e.desc})).join(", "):void 0,sizes:t&&t.supportsUrl(i)?l:void 0,style:S({},o?O(o,"objectFit","objectPosition"):{},{width:0,height:0})})))}({imageLoader:T,widthDescs:A,sizes:k,src:V,quality:d,ref:v,style:m?O(m,"objectFit","objectPosition"):void 0,imgProps:g,className:"__wab_img"}))})),ne=1e4;function ie(e){return e.endsWith(".svg")||e.startsWith("data:image/svg")}function ae(e,t){var r,n=null!=(r=te.findIndex((function(t){return t>=e})))?r:te.length-1,i=te[n];if(!(i>=t||n+1<te.length&&t<=te[n+1]))return i}function oe(e){if(null!=e&&""!=e){if("number"==typeof e)return e;var t=function(e){var t=e.match(/^\s*(-?(?:\d+\.\d*|\d*\.\d+|\d+))\s*([a-z]*|%)\s*(?:\/\*.*)?$/i);if(null!=t)return{num:+t[1],units:t[2]}}(e);return!t||t.units&&"px"!==t.units?void 0:t.num}}var se={supportsUrl:function(e){return e.startsWith("https://img.plasmic.app")&&!ie(e)},transformUrl:function(e){var t,r=[e.width?"w="+e.width:void 0,"q="+(null!=(t=e.quality)?t:75),e.format?"f="+e.format:void 0].filter((function(e){return!!e}));return e.src+"?"+r.join("&")}},le=n.forwardRef((function(e,t){if("nextjs"===e.platform&&e.href){var r=["href","replace","scroll","shallow","passHref","prefetch","locale"];return n.createElement(e.component,O.apply(void 0,[e].concat(r)),n.createElement("a",Object.assign({},M.apply(void 0,[e,"component","platform"].concat(r)),{ref:t})))}return"gatsby"===e.platform&&/^\/(?!\/)/.test(e.href)?n.createElement(e.component,S({},M(e,"component","platform","href"),{to:e.href,ref:t})):n.createElement("a",Object.assign({},M(e,"component","platform"),{ref:t}))}));function ue(e){var t=e.as,n=e.defaultContents,i=e.value,a=x(e,["as","defaultContents","value"]),o=void 0===i?n:i;if(!o||Array.isArray(o)&&0===o.length)return null;var s=function e(t){return r.isValidElement(t)&&t.type===r.Fragment?e(t.props.children):"string"==typeof t?t:Array.isArray(t)&&1===t.length&&"string"==typeof t[0]?t[0]:void 0}(o);return s&&(o=r.createElement("div",{className:"__wab_slot-string-wrapper"},s)),0===Object.keys(a).filter((function(e){return!!a[e]})).length?r.createElement(r.Fragment,null,o):r.createElement(t||"div",D({className:"__wab_slot"},a),o)}var ce=[],pe={};function de(){return T?Object.entries(pe).filter((function(e){return window.matchMedia(e[1]).matches})).map((function(e){return e[0]})):[]}var fe=void 0;T&&window.addEventListener("resize",(function(){var e=de();fe&&e.join("")===fe.join("")||(fe=e,a.unstable_batchedUpdates((function(){return ce.forEach((function(e){return e()}))})))}));var ve=n.createContext(void 0);function me(e){var t={},r=0;return{str:function e(i){if(!i)return"";if("number"==typeof i||"boolean"==typeof i||"string"==typeof i)return i.toString();if("object"!=typeof i)return"";if(Array.isArray(i)||null!=(a=i)&&"function"==typeof a[Symbol.iterator])return Array.from(i).map((function(t){return e(t)})).filter((function(e){return!!e})).join("");var a,o=ye(i,"props")&&ye(i.props,"children")&&i.props.children||ye(i,"children")&&i.children||[],s=""+n.Children.toArray(o).map((function(t){return e(t)})).filter((function(e){return!!e})).join("");if(n.isValidElement(i)&&i.type===n.Fragment)return s;var l=r+1;return r++,t[l]=n.isValidElement(i)?n.cloneElement(i,{key:l,children:void 0}):i,"<"+l+">"+s+"</"+l+">"}(e),components:t,componentsCount:r}}var he=!1;function ye(e,t){return"object"==typeof e&&null!==e&&t in e}var ge=r.createContext(void 0),be=o.useIsSSR;function we(){r.useContext(ge)}var Pe={useHover:function(){var e=r.useState(!1),t=e[1];return[e[0],{onMouseEnter:function(){return t(!0)},onMouseLeave:function(){return t(!1)}}]},useFocused:function(e){var t=s.useFocusRing({within:!1,isTextInput:e.isTextInput});return[t.isFocused,t.focusProps]},useFocusVisible:function(e){var t=s.useFocusRing({within:!1,isTextInput:e.isTextInput});return[t.isFocusVisible,t.focusProps]},useFocusedWithin:function(e){var t=s.useFocusRing({within:!0,isTextInput:e.isTextInput});return[t.isFocused,t.focusProps]},useFocusVisibleWithin:function(e){var t=s.useFocusRing({within:!0,isTextInput:e.isTextInput});return[t.isFocusVisible,t.focusProps]},usePressed:function(){var e=r.useState(!1),t=e[1];return[e[0],{onMouseDown:function(){return t(!0)},onMouseUp:function(){return t(!1)}}]}},Se=t,xe=!0;function Ee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter((function(e){return!!e.def})),i=k(n,(function(e){return e.def.group}));return A(i,(function(e){return Object.fromEntries(e.map((function(e){return[e.def.variant,!!e.active]})))}))}function Ve(e){if(r.isValidElement(e)){var t=e.type;return t.__plumeType||(null==t.getPlumeType?void 0:t.getPlumeType(e.props))}}function Ce(e){return O(e,"className","style")}function Oe(e,t){return{plasmicProps:{variants:O.apply(void 0,[t].concat(e.internalVariantProps)),args:O.apply(void 0,[t].concat(e.internalArgProps)),overrides:{}}}}var Me=/^(data-.*)$/;function Ie(e,t){var r=t.itemPlumeType,i=t.sectionPlumeType,a=t.invalidChildError,o=t.requireItemValue;return n.useMemo((function(){return function(e,t){if(!e)return{items:[],disabledKeys:[]};var r=t.itemPlumeType,i=t.sectionPlumeType,a=t.invalidChildError,o=0,s=0,l=[];return{items:function e(u){return W(u).flatMap((function(u){if(n.isValidElement(u)){if(u.type===n.Fragment)return e(u.props.children);var c,p=Ve(u);if(p===r){var d=Te(u=function(e){if(Re(e,"value"))return o++,e;if(t.requireItemValue&&xe)throw new Error('Must specify a "value" prop for '+function(e){if("string"==typeof e.type)return e.type;var t,r,n,i,a=e.type;return null!=(t=null!=(r=null!=(n=a.displayName)?n:a.name)?r:null==(i=a.render)?void 0:i.name)?t:"Component"}(e));return je(e,{value:""+o++})}(u));return Fe(u,"isDisabled")&&d&&l.push(d),[u]}if(p===i)return[je(u,{key:null!=(c=u.key)?c:"section-"+s++,children:e(Fe(u,"children"))})]}if(xe)throw new Error(null!=a?a:"Unexpected child");return[]}))}(e),disabledKeys:l}}(e,{itemPlumeType:r,sectionPlumeType:i,invalidChildError:a,requireItemValue:o})}),[e,r,i,a,o])}function ke(e){return je(e.rendered,{_node:e,key:e.key})}function Ae(e,t){if(Ve(e)===t.itemPlumeType){var r,i=e,a=Fe(i,"children");return n.createElement(f.Item,{key:Te(i),textValue:null!=(r=Fe(i,"textValue"))?r:(o=a,"string"==typeof o?a:Re(i,"value")?Fe(i,"value"):i.key),"aria-label":Fe(i,"aria-label")},i)}var o,s=e;return n.createElement(f.Section,{title:s,"aria-label":Fe(s,"aria-label"),items:Fe(s,"children")},(function(e){return Ae(e,t)}))}function Te(e){var t;return null!=(t=Fe(e,"value"))?t:e.key}function Fe(e,t){return"componentProps"in e.props?e.props.componentProps[t]:e.props[t]}function Re(e,t){return"componentProps"in e.props?t in e.props.componentProps:t in e.props}function je(e,t){return n.cloneElement(e,e.type.getPlumeType?S({componentProps:S({},e.props.componentProps,t)},t.key?{key:t.key}:{}):t)}var We=r.createContext(void 0),De=r.createContext(void 0),_e={itemPlumeType:"menu-item",sectionPlumeType:"menu-group"};function Ne(e,t){var n=e.triggerRef,i=e.isDisabled,a=e.placement,o=e.menuMatchTriggerWidth,s=e.menuWidth,l=e.menu,u=p.useMenuTrigger({type:"menu",isDisabled:i},t,n),c=u.menuProps;return{triggerProps:h.usePress(S({},u.menuTriggerProps,{isDisabled:i})).pressProps,makeMenu:function(){var e="function"==typeof l?l():l;if(!e)return null;if("menu"!==Ve(e)){if(xe)throw new Error("Must use an instance of the Menu component.");return null}return r.cloneElement(e,D(e.props,c))},triggerContext:r.useMemo((function(){var e;return{triggerRef:n,state:t,autoFocus:null==(e=t.focusStrategy)||e,placement:a,overlayMatchTriggerWidth:o,overlayMinTriggerWidth:!0,overlayWidth:s}}),[n,t,a,o,s])}}var qe=r.createContext(void 0),He={itemPlumeType:"select-option",sectionPlumeType:"select-option-group"};function Ke(e){var t=e.state,n=e.menuProps,i=e.children,a=r.useRef(null),o=g.useListBox(S({},n,{isVirtualized:!1,autoFocus:t.focusStrategy||!0,disallowEmptySelection:!0}),t,a);return r.cloneElement(i,D(i.props,o.listBoxProps,{style:{outline:"none"},ref:a}))}exports.DropdownMenu=function(e){var t=e.isOpen,n=e.defaultOpen,i=e.onOpenChange,a=e.children,o=e.placement,s=e.menu,l=r.useRef(null),u=m.useMenuTriggerState({isOpen:t,defaultOpen:n,onOpenChange:i,shouldFlip:!0}),c=Ne({triggerRef:l,placement:o,menu:s},u),p=c.makeMenu;return r.createElement(We.Provider,{value:c.triggerContext},r.cloneElement(a,D(a.props,c.triggerProps,{ref:l})),u.isOpen&&p())},exports.PlasmicIcon=function(e){var t=e.PlasmicIconType,n=x(e,["PlasmicIconType"]);return r.createElement(t,Object.assign({},n))},exports.PlasmicImg=re,exports.PlasmicLink=le,exports.PlasmicRootProvider=function(e){var t=e.platform,n=e.children,i=r.useMemo((function(){return{platform:t}}),[t]);return r.createElement(ge.Provider,{value:i},r.createElement(o.SSRProvider,null,r.createElement(ve.Provider,{value:e.translator},n)))},exports.PlasmicSlot=function(e){return ue(e)},exports.Stack=z,exports.Trans=function(e){var t=e.children,r=n.useContext(ve);if(!r)return he||(console.warn("Using Plasmic Translation but no translation function has been provided"),he=!0),t;var i=me(t);return r(i.str,i.componentsCount>0?{components:i.components}:void 0)},exports.classNames=Se,exports.createPlasmicElementProxy=function(e,t){null==t&&(t={});var r=t["data-plasmic-name"],n=t["data-plasmic-root"],i=t["data-plasmic-for-node"];delete t["data-plasmic-name"],delete t["data-plasmic-root"],delete t["data-plasmic-for-node"];for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var l=Y.apply(void 0,[e,t].concat(o));if(r&&B.set(r,l),n){var u,c=i?null!=(u=B.get(i))?u:null:l;return B.clear(),c}return l},exports.createUseScreenVariants=function(e,t){return Object.assign(pe,t),fe=void 0,function(){var t=r.useState()[1],n=r.useRef(fe||[]);return R((function(){var e=function(){fe&&n.current.join("")!==fe.join("")&&(n.current=fe,t({}))};return ce.push(e),void 0===fe&&(fe=de()),e(),function(){ce.splice(ce.indexOf(e),1)}}),[]),e?fe||[]:fe?fe[fe.length-1]:void 0}},exports.deriveRenderOpts=function(e,t){var r,n,i,a,o,s=t.name,l=t.descendantNames,u=t.internalVariantPropNames,c=t.internalArgPropNames,p=["variants","args","overrides"],d=(r=M.apply(void 0,[O.apply(void 0,[e].concat(u))].concat(p)),n=e.variants,r&&n?S({},r,n):r||n||{}),f=(i=M.apply(void 0,[O.apply(void 0,[e].concat(c))].concat(p)),a=e.args,i&&a?S({},i,a):i||a||{}),v=X(M.apply(void 0,[O.apply(void 0,[e].concat(l))].concat(c,u,p)),e.overrides),m=M.apply(void 0,[e,"variants","args","overrides"].concat(l,u,c));return Object.keys(m).length>0&&(v=X(v,((o={})[s]={props:m},o))),{variants:d,args:f,overrides:v}},exports.ensureGlobalVariants=function(e){return Object.entries(e).filter((function(e){return"PLEASE_RENDER_INSIDE_PROVIDER"===e[1]})).forEach((function(t){e[t[0]]=void 0})),e},exports.genTranslatableString=me,exports.getDataProps=function(e){return function(e,t){for(var r={},n=0,i=Object.entries(e);n<i.length;n++){var a=i[n][0];Me.test(a)&&(r[a]=e[a])}return r}(e)},exports.hasVariant=function(e,t,r){if(null==e)return!1;var n=e[t];return null!=n&&(!0===n?r===t:!1!==n&&(Array.isArray(n)?n.includes(r):"string"==typeof n?n===r:void 0!==n[r]&&!1!==n[r]))},exports.makeFragment=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.createElement.apply(r,[r.Fragment,{}].concat(t))},exports.omit=M,exports.pick=O,exports.renderPlasmicSlot=ue,exports.setPlumeStrictMode=function(e){xe=e},exports.useButton=function(e,t,r,n){var i,a,o,s;void 0===n&&(n=null);var l=t.link,u=t.isDisabled,c=t.startIcon,p=t.endIcon,d=t.showStartIcon,f=t.showEndIcon,v=t.children,m=x(t,["link","isDisabled","startIcon","endIcon","showStartIcon","showEndIcon","children"]);return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:r.showStartIconVariant,active:d},{def:r.showEndIconVariant,active:f},{def:r.isDisabledVariant,active:u})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),r.startIconSlot&&((i={})[r.startIconSlot]=c,i),r.endIconSlot&&((a={})[r.endIconSlot]=p,a),((o={})[r.contentSlot]=v,o)),overrides:((s={})[r.root]={as:l?"a":"button",props:S({},M.apply(void 0,[m].concat(e.internalArgProps,e.internalVariantProps)),{ref:n,disabled:u},!!l&&{href:l})},s)}}},exports.useCheckbox=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=t.children,p=t.isDisabled,d=t.isIndeterminate;we();var f=r.useRef(null),v=r.useRef(null),m=function(e){var t=S({},e,{isSelected:e.isChecked,defaultSelected:e.defaultChecked});return delete t.isChecked,delete t.defaultChecked,t}(t),h=c.useToggleState(m),y=l.useCheckbox(m,h,f).inputProps,g=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:p},{def:n.isCheckedVariant,active:h.isSelected},{def:n.isIndeterminateVariant,active:d},{def:n.noLabelVariant,active:!s})),b=((a={})[n.root]={as:"label",props:D(Ce(t),{ref:v}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(u.VisuallyHidden,{isFocusable:!0},r.createElement("input",Object.assign({},y,{ref:f}))),e)}},a),w=S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.labelSlot?((o={})[n.labelSlot]=s,o):{}),P=r.useMemo((function(){return{setChecked:function(e){return h.setSelected(e)}}}),[h]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return v.current},focus:function(){var e;return null==(e=f.current)?void 0:e.focus()},blur:function(){var e;return null==(e=f.current)?void 0:e.blur()},setChecked:function(e){return P.setChecked(e)}}}),[v,f,P]),{plasmicProps:{variants:g,overrides:b,args:w},state:P}},exports.useIsSSR=be,exports.useMenu=function(e,t,n,i){var a,o;void 0===i&&(i=null),we();var s=function(e){var t=e.children,n=x(e,["children"]),i=Ie(t,S({},_e,{invalidChildError:"Can only use Menu.Item and Menu.Group as children to Menu",requireItemValue:!1})),a=i.items,o=i.disabledKeys;return{ariaProps:S({},n,{children:r.useCallback((function(e){return Ae(e,_e)}),[]),items:a,disabledKeys:o})}}(t).ariaProps,l=r.useContext(We),u=r.useRef(null),c=d.useTreeState(s),f=r.useRef(null),v=p.useMenu(S({},s,{autoFocus:null==l?void 0:l.autoFocus}),c,f).menuProps,m=r.useMemo((function(){return{state:c,menuProps:t}}),[c,t]),h=S({},O.apply(void 0,[t].concat(e.internalVariantProps))),y=((a={})[n.root]={props:D(Ce(t),{ref:u})},a[n.itemsContainer]={as:"ul",props:D(v,{ref:f,style:S({},{outline:"none"})})},a),g=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.itemsSlot]=r.createElement(De.Provider,{value:m},Array.from(c.collection).map((function(e){return ke(e)}))),o)),b=r.useMemo((function(){return{getFocusedValue:function(){return c.selectionManager.focusedKey},setFocusedValue:function(e){return c.selectionManager.setFocusedKey(e)}}}),[c]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return u.current},getFocusedValue:function(){return b.getFocusedValue()},setFocusedValue:function(e){return b.setFocusedValue(e)}}}),[u,b]),{plasmicProps:{variants:h,args:g,overrides:y},state:b}},exports.useMenuButton=function(e,t,n,i){var a,o;void 0===i&&(i=null);var l=t.placement,u=t.isOpen,c=t.defaultOpen,p=t.onOpenChange,d=t.isDisabled,f=t.menu,v=t.autoFocus,h=t.menuMatchTriggerWidth,y=t.menuWidth;we();var g=r.useRef(null),b=r.useRef(null),w=m.useMenuTriggerState({isOpen:u,defaultOpen:c,onOpenChange:p,shouldFlip:!0}),P=Ne({isDisabled:d,triggerRef:b,placement:l,menuMatchTriggerWidth:h,menuWidth:y,menu:f},w),x=P.triggerProps,E=P.makeMenu,V=P.triggerContext,C=s.useFocusable(t,b).focusableProps,M=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isOpenVariant,active:w.isOpen},{def:n.isDisabledVariant,active:d})),I=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((a={})[n.menuSlot]=w.isOpen?E():void 0,a)),k=((o={})[n.root]={wrapChildren:function(e){return r.createElement(We.Provider,{value:V},e)},props:{ref:g}},o[n.trigger]={props:D(x,C,Ce(t),O(t,"title"),{ref:b,autoFocus:v,disabled:!!d,type:"button"})},o),A=r.useMemo((function(){return{open:function(){return w.open()},close:function(){return w.close()},isOpen:function(){return w.isOpen}}}),[w]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return g.current},getTrigger:function(){return b.current},focus:function(){return b.current&&b.current.focus()},blur:function(){return b.current&&b.current.blur()},open:A.open,close:A.close,isOpen:A.isOpen}}),[g,b,A]),{plasmicProps:{variants:M,args:I,overrides:k},state:A}},exports.useMenuGroup=function(e,t,n){var i,a,o=r.useContext(De),s=t._node;if(!o||!s){if(xe)throw new Error("You can only use a Menu.Group within a Menu component.");return Oe(e,t)}var l=p.useMenuSection({heading:t.title,"aria-label":t["aria-label"]}),u=l.headingProps,c=l.groupProps,d=v.useSeparator({elementType:"li"}).separatorProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.noTitleVariant,active:!t.title},{def:n.isFirstVariant,active:o.state.collection.getFirstKey()===s.key})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.titleSlot]=t.title,i[n.itemsSlot]=Array.from(s.childNodes).map((function(e){return ke(e)})),i)),overrides:((a={})[n.root]={props:Ce(t)},a[n.separator]={props:S({},d),as:"li"},a[n.titleContainer]=S({props:S({role:"presentation"},u)},!t.title&&{render:function(){return null}}),a[n.itemsContainer]={props:S({},c),as:"ul"},a)}}},exports.useMenuItem=function(e,t,n){var i,a,o=r.useContext(De),s=r.useContext(We);if(!o){if(xe)throw new Error("You can only use a Menu.Item within a Menu component.");return Oe(e,t)}var l=t.children,u=t.onAction,c=o.state,d=o.menuProps,f=t._node,v=c.disabledKeys.has(f.key),m=c.selectionManager.isFocused&&c.selectionManager.focusedKey===f.key,h=r.useRef(null),y=p.useMenuItem(D({onAction:u},{onAction:d.onAction,onClose:null==s?void 0:s.state.close},{isDisabled:v,"aria-label":f&&f["aria-label"],key:f.key,isVirtualized:!1,closeOnSelect:!0}),c,h),g=y.menuItemProps,b=y.labelProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:v},{def:n.isHighlightedVariant,active:m})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.labelSlot]=l,i)),overrides:((a={})[n.root]={as:"li",props:D(g,{ref:h,style:{outline:"none"}})},a[n.labelContainer]={props:S({},b)},a)}}},exports.useSelect=function(e,t,n,i){var a,o;void 0===i&&(i=null),we();var s=function(e){var t=e.value,n=e.defaultValue,i=e.children,a=e.onChange,o=x(e,["value","defaultValue","children","onChange","placement","menuMatchTriggerWidth","menuWidth"]),s=Ie(i,S({},He,{invalidChildError:"Can only use Select.Option and Select.OptionGroup as children to Select",requireItemValue:!0})),l=s.items,u=s.disabledKeys;return{ariaProps:S({},o,{children:r.useCallback((function(e){return Ae(e,He)}),[]),onSelectionChange:r.useMemo((function(){return a?function(e){return a(null==e||"null"===e?null:e)}:void 0}),[a]),items:l,disabledKeys:u,defaultSelectedKey:n},"value"in e&&{selectedKey:null!=t?t:null})}}(t).ariaProps,l=t.placement,u=b.useSelectState(s),c=r.useRef(null),p=r.useRef(null),d=t.isDisabled,f=t.name,v=t.menuWidth,m=t.menuMatchTriggerWidth,g=t.autoFocus,w=t.placeholder,P=t.selectedContent,E=y.useSelect(s,u,c),V=E.menuProps,C=h.usePress(S({},E.triggerProps,{isDisabled:d})).pressProps,M=u.selectedItem?null!=P?P:Fe(u.selectedItem.value,"children"):null,I=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isOpenVariant,active:u.isOpen},{def:n.placeholderVariant,active:!u.selectedItem},{def:n.isDisabledVariant,active:d})),k=r.useMemo((function(){return{triggerRef:c,state:u,placement:l,overlayMatchTriggerWidth:m,overlayMinTriggerWidth:!0,overlayWidth:v}}),[c,u,l,m,v]),A=((a={})[n.root]={props:D(Ce(t),{ref:p}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(y.HiddenSelect,{state:u,triggerRef:c,name:f,isDisabled:d}),e)}},a[n.trigger]={props:D(C,{ref:c,autoFocus:g,disabled:!!d,type:"button"})},a[n.overlay]={wrap:function(e){return r.createElement(We.Provider,{value:k},e)}},a[n.optionsContainer]={wrap:function(e){return r.createElement(Ke,{state:u,menuProps:V},e)}},a),T=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.triggerContentSlot]=M,o[n.placeholderSlot]=w,o[n.optionsSlot]=r.createElement(qe.Provider,{value:u},Array.from(u.collection).map((function(e){return ke(e)}))),o)),F=r.useMemo((function(){return{open:function(){return u.open()},close:function(){return u.close()},isOpen:function(){return u.isOpen},getSelectedValue:function(){return u.selectedKey?""+u.selectedKey:null},setSelectedValue:function(e){return u.setSelectedKey(e)}}}),[u]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return p.current},getTrigger:function(){return c.current},focus:function(){var e;return null==(e=c.current)?void 0:e.focus()},blur:function(){var e;return null==(e=c.current)?void 0:e.blur()},open:function(){return F.open()},close:function(){return F.close()},isOpen:function(){return F.isOpen()},getSelectedValue:function(){return F.getSelectedValue()},setSelectedValue:function(e){return F.setSelectedValue(e)}}}),[p,c,F]),{plasmicProps:{variants:I,args:T,overrides:A},state:F}},exports.useSelectOption=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=r.useContext(qe);if(!s){if(xe)throw new Error("You can only use a Select.Option within a Select component.");return Oe(e,t)}var l=t.children,u=r.useRef(null),c=N(u,i),p=t._node,d=s.selectionManager.isSelected(p.key),f=s.disabledKeys.has(p.key),v=s.selectionManager.isFocused&&s.selectionManager.focusedKey===p.key,m=g.useOption({isSelected:d,isDisabled:f,"aria-label":p&&p["aria-label"],key:p.key,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,isVirtualized:!1},s,u),h=m.optionProps,y=m.labelProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isSelectedVariant,active:d},{def:n.isDisabledVariant,active:f},{def:n.isHighlightedVariant,active:v})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((a={})[n.labelSlot]=l,a)),overrides:((o={})[n.root]={props:D(h,Ce(t),{ref:c,style:{outline:"none"}})},o[n.labelContainer]={props:y},o)}}},exports.useSelectOptionGroup=function(e,t,n){var i,a,o=r.useContext(qe),s=t._node;if(!o||!s){if(xe)throw new Error("You can only use a Select.OptionGroup within a Select component.");return Oe(e,t)}var l=g.useListBoxSection({heading:t.title,"aria-label":t["aria-label"]}),u=l.headingProps,c=l.groupProps,p=v.useSeparator({elementType:"li"}).separatorProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.noTitleVariant,active:!t.title},{def:n.isFirstVariant,active:o.collection.getFirstKey()===s.key})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.titleSlot]=t.title,i[n.optionsSlot]=Array.from(s.childNodes).map((function(e){return ke(e)})),i)),overrides:((a={})[n.root]={props:Ce(t)},a[n.separator]={props:S({},p)},a[n.titleContainer]=S({props:S({role:"presentation"},u)},!t.title&&{render:function(){return null}}),a[n.optionsContainer]={props:S({},c)},a)}}},exports.useSwitch=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=t.children,l=t.isDisabled;we();var p=r.useRef(null),d=r.useRef(null),f=function(e){var t=S({},e,{isSelected:e.isChecked,defaultSelected:e.defaultChecked});return delete t.isChecked,delete t.defaultChecked,t}(t),v=c.useToggleState(f),m=w.useSwitch(f,v,p).inputProps,h=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:l},{def:n.isCheckedVariant,active:v.isSelected},{def:n.noLabelVariant,active:!s})),y=((a={})[n.root]={as:"label",props:D(Ce(t),{ref:d}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(u.VisuallyHidden,{isFocusable:!0},r.createElement("input",Object.assign({},m,{ref:p}))),e)}},a),g=S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.labelSlot?((o={})[n.labelSlot]=s,o):{}),b=r.useMemo((function(){return{setChecked:function(e){return v.setSelected(e)}}}),[v]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return d.current},focus:function(){var e;return null==(e=p.current)?void 0:e.focus()},blur:function(){var e;return null==(e=p.current)?void 0:e.blur()},setChecked:function(e){return b.setChecked(e)}}}),[d,p,b]),{plasmicProps:{variants:h,overrides:y,args:g},state:b}},exports.useTextInput=function(e,t,n,i){var a,o,s;void 0===i&&(i=null);var l=t.isDisabled,u=t.startIcon,c=t.endIcon,p=t.showStartIcon,d=t.showEndIcon,f=t.className,v=t.style,m=t.inputClassName,h=t.inputStyle,y=x(t,["isDisabled","startIcon","endIcon","showStartIcon","showEndIcon","className","style","inputClassName","inputStyle"]),g=r.useRef(null),b=r.useRef(null);return r.useImperativeHandle(i,(function(){return{focus:function(){var e;null==(e=b.current)||e.focus()},blur:function(){var e;null==(e=b.current)||e.blur()},getRoot:function(){return g.current},getInput:function(){return b.current}}}),[g,b]),{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.showStartIconVariant,active:p},{def:n.showEndIconVariant,active:d},{def:n.isDisabledVariant,active:l})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.startIconSlot&&((a={})[n.startIconSlot]=u,a),n.endIconSlot&&((o={})[n.endIconSlot]=c,o)),overrides:((s={})[n.root]={props:{ref:g,className:f,style:v}},s[n.input]={props:S({},M.apply(void 0,[y].concat(e.internalArgProps.filter((function(e){return"required"!==e})),e.internalVariantProps)),{disabled:l,ref:b,className:m,style:h})},s)}}},exports.useTrigger=function(e,t){return Pe[e](t)},exports.useTriggeredOverlay=function(e,t,n,a){var o,l;void 0===a&&(a=null);var u=r.useRef(null),c=N(u,a),p=r.useContext(We);if(!p){if(xe)throw new Error("You can only use a triggered overlay with a TriggeredOverlayContext");return Oe(e,t)}var d=t.children,f=p.triggerRef,v=p.placement,m=p.overlayMatchTriggerWidth,h=p.overlayMinTriggerWidth,y=p.overlayWidth,g=p.state,b=r.useState(!1),w=b[0],x=b[1],E=f.current&&(m||h)?f.current.offsetWidth:void 0;R((function(){!w&&f.current&&(m||h)&&x(!0)}),[f,w,m,h]);var V=P.useOverlay({isOpen:g.isOpen,onClose:g.close,isDismissable:!0,shouldCloseOnBlur:!0},u).overlayProps,C=P.useOverlayPosition({targetRef:f,overlayRef:u,placement:null!=v?v:"bottom left",shouldFlip:!0,isOpen:g.isOpen,onClose:g.close,containerPadding:0}),M=C.overlayProps,I=C.updatePosition,k=C.placement;R((function(){g.isOpen&&requestAnimationFrame((function(){I()}))}),[g.isOpen,I]);var A=D({style:{left:"auto",right:"auto",top:"auto",bottom:"auto",position:"absolute",width:null!=y?y:m?E:"auto",minWidth:h?E:"auto"}},V,M);return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isPlacedTopVariant,active:"top"===k},{def:n.isPlacedBottomVariant,active:"bottom"===k},{def:n.isPlacedLeftVariant,active:"left"===k},{def:n.isPlacedRightVariant,active:"right"===k})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.contentSlot]=r.createElement(s.FocusScope,{restoreFocus:!0},r.createElement(P.DismissButton,{onDismiss:g.close}),d),o)),overrides:((l={})[n.root]={props:D(A,Ce(t),{ref:c}),wrap:function(e){return"undefined"!=typeof document?i.createPortal(e,document.body):e}},l)}}},exports.wrapWithClassName=function(e,t){var n=r.isValidElement(e)&&e.key||void 0;return r.createElement("div",{key:n,className:t,style:{display:"grid"}},e)}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("classnames")),r=require("react"),n=e(r),i=require("react-dom"),a=e(i),o=require("@react-aria/ssr"),s=require("@react-aria/focus"),l=require("@react-aria/checkbox"),u=require("@react-aria/visually-hidden"),c=require("@react-stately/toggle"),p=require("@react-aria/menu"),d=require("@react-stately/tree"),f=require("@react-stately/collections"),v=require("@react-aria/separator"),m=require("@react-stately/menu"),h=require("@react-aria/interactions"),y=require("@react-aria/select"),g=require("@react-aria/listbox"),b=require("@react-stately/select"),P=require("@react-aria/switch"),w=require("@react-aria/overlays");function S(){return(S=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}).apply(this,arguments)}function x(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function V(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return E(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function C(e){return null!=e}function O(e){if(0===Object.keys(e).length)return e;for(var t={},r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var s=o[a];s in e&&(t[s]=e[s])}return t}function M(e){if(0===Object.keys(e).length)return e;for(var t={},r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var a=0,o=Object.keys(e);a<o.length;a++){var s=o[a];n.includes(s)||(t[s]=e[s])}return t}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0!==t.length)return function(e){for(var r,n=e,i=V(t);!(r=i()).done;)n=(0,r.value)(n);return n}}function k(e,t){for(var r,n={},i=V(e);!(r=i()).done;){var a=r.value,o=t(a);o in n?n[o].push(a):n[o]=[a]}return n}function A(e,t){var r={};for(var n in e)r[n]=t(e[n]);return r}var T="undefined"!=typeof window,F=Symbol("NONE"),R=T?n.useLayoutEffect:n.useEffect;function j(e,t,r){return Array.isArray(r)?n.createElement.apply(n,[e,t].concat(r)):r||"children"in t?n.createElement(e,t,r):n.createElement(e,t)}function W(e){return n.isValidElement(t=e)||function(e){return"string"==typeof e||"number"==typeof e}(t)?[e]:Array.isArray(e)?e.flatMap(W):[];var t}function D(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(r.every((function(e){return 0===Object.keys(e).length})))return e;for(var i=S({},e),a=0,o=r;a<o.length;a++)for(var s=o[a],l=0,u=Object.keys(s);l<u.length;l++){var c=u[l];i[c]=q(c,i[c],s[c])}return i}function _(e,t){e&&("function"==typeof e?e(t):Object.isFrozen(e)||(e.current=t))}function N(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r,n=V(t);!(r=n()).done;)_(r.value,e)}}function q(e,r,n){return r===F||n===F?null:null==r?n:null==n?r:"className"===e?t(r,n):"style"===e?S({},r,n):"ref"===e?N(r,n):typeof r!=typeof n?n:e.startsWith("on")&&"function"==typeof r?function(){var e;return"function"==typeof r&&(e=r.apply(void 0,arguments)),"function"==typeof n&&(e=n.apply(void 0,arguments)),e}:n}function H(e,t,r,n){var i=t.children,a=x(t,["children"]),o=L(i,null!=r&&r);return j(e,S({ref:n},a),o)}function K(e,t){var r=e.as,n=e.hasGap;return H(null!=r?r:"div",x(e,["as","hasGap"]),n,t)}var U=function(e){return r.forwardRef((function(t,r){var n=t.hasGap,i=x(t,["hasGap"]);return H(e,i,n,r)}))},z=Object.assign(r.forwardRef(K),{div:U("div"),a:U("a"),button:U("button"),h1:U("h1"),h2:U("h2"),h3:U("h3"),h4:U("h4"),h5:U("h5"),h6:U("h6"),label:U("label"),form:U("form"),section:U("section"),head:U("head"),main:U("main"),nav:U("nav")});function L(e,t){var n=t?"__wab_flex-container":"__wab_passthrough";return e?Array.isArray(e)?r.createElement.apply(r,["div",{className:n}].concat(e)):r.createElement("div",{className:n},e):null}function G(e,t,r,i){if(!e||0===Object.keys(e).length)return j(t,r,r.children);var a=Q(e),o=J(r,a.props);if("render"===a.type)return a.render(o,t);var s=t;"as"===a.type&&a.as&&(t===z?o.as=a.as:s=a.as);var l=o.children;a.wrapChildren&&(l=a.wrapChildren(function(e){return Array.isArray(e)?1===e.length?e[0]:n.createElement.apply(n,[n.Fragment,{}].concat(e)):e}(l))),i&&(l=L(l,!0));var u=j(s,o,l);return a.wrap&&(u=a.wrap(u)),u}var B=new Map;function Y(e,t){var r,n=t["data-plasmic-override"],i=t["data-plasmic-wrap-flex-child"],a=null!=(r=t["data-plasmic-trigger-props"])?r:[];delete t["data-plasmic-override"],delete t["data-plasmic-wrap-flex-child"],delete t["data-plasmic-trigger-props"];for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return G(n,e,D.apply(void 0,[t,0===s.length?{}:{children:1===s.length?s[0]:s}].concat(a)),i)}var $=Symbol("UNSET");function J(e,t){if(!t)return e;for(var r=S({},e),n=0,i=Object.keys(t);n<i.length;n++){var a=i[n],o=e[a],s=t[a];s===$?delete r[a]:(null!=s||"className"===a||"style"===a||a.startsWith("on")&&"function"==typeof o||(s=F),r[a]=q(a,o,s))}return r}function Q(e){if(!e)return{type:"default",props:{}};if(function(e){return"string"==typeof e||"number"==typeof e||n.isValidElement(e)}(e))return{type:"default",props:{children:e}};if("object"==typeof e)return"as"in e?S({},e,{props:e.props||{},type:"as"}):"render"in e?S({},e,{type:"render"}):"props"in e?S({},e,{props:e.props||{},type:"default"}):(t=Object.keys(e),r=["wrap","wrapChildren"],t.every((function(e){return r.includes(e)}))?S({},e,{props:{},type:"default"}):{type:"default",props:e});if("function"==typeof e)return{type:"render",render:e};var t,r;throw new Error("Unexpected override: "+e)}function X(e,t){if(!t)return e;for(var r={},n=0,i=Array.from(new Set([].concat(Object.keys(e),Object.keys(t))));n<i.length;n++){var a=i[n];r[a]=Z(e[a],t[a])}return r}function Z(e,t){var r,n;if(!e)return t;if(!t)return e;var i=Q(e),a=Q(t),o=I.apply(void 0,[i.wrap,a.wrap].filter(C)),s=I.apply(void 0,[i.wrapChildren,a.wrapChildren].filter(C)),l=J(null!=(r=i.props)?r:{},a.props);if("render"===a.type)return{render:a.render,props:l,wrap:o,wrapChildren:s};if("render"===i.type)return{render:i.render,props:l,wrap:o,wrapChildren:s};var u=null!=(n="as"===a.type?a.as:void 0)?n:"as"===i.type?i.as:void 0;return S({props:l,wrap:o,wrapChildren:s},u?{as:u}:{})}var ee=[640,750,828,1080,1200,1920,2048,3840],te=[].concat([16,32,48,64,96,128,256,384],ee),re=n.forwardRef((function(e,r){var i=e.src,a=e.className,o=e.displayWidth,s=e.displayHeight,l=e.displayMinWidth,u=e.displayMinHeight,c=e.displayMaxWidth,p=e.displayMaxHeight,d=e.quality,f=e.loader,v=e.imgRef,m=e.style,h=e.loading,y=x(e,["src","className","displayWidth","displayHeight","displayMinWidth","displayMinHeight","displayMaxWidth","displayMaxHeight","quality","loader","imgRef","style","loading"]),g=Object.assign({},y,{loading:null!=h?h:"lazy"}),b="string"!=typeof i&&i?i:{fullWidth:void 0,fullHeight:void 0,aspectRatio:void 0},P=b.fullWidth,w=b.fullHeight,E=b.aspectRatio,V=i?"string"==typeof i?i:i.src:"";if(null==w||null==P)return n.createElement("img",Object.assign({src:V,className:a,style:m},g,{loading:h,ref:N(v,r)}));!ie(V)||null!=s&&"auto"!==s||null!=o&&"auto"!==o||(o="100%"),P&&w&&(!o||"auto"===o)&&oe(s)&&(ie(V)||(o=oe(s)*P/w));var C=P,M=w;E&&isFinite(E)&&ie(V)&&(C=ne,M=Math.round(C/E));var I=function(e,t,r){var n=null==r?void 0:r.minWidth,i=oe(e),a=oe(n);if(null!=i&&(!n||null!=a))return{widthDescs:[{width:ae(Math.max(i,null!=a?a:0),t),desc:"1x"},{width:ae(2*Math.max(i,null!=a?a:0),t),desc:"2x"}],sizes:void 0};var o=ee.filter((function(e){return!t||e<t}));return t&&0===o.length?{widthDescs:[{width:ae(t,t),desc:"1x"}],sizes:void 0}:{widthDescs:o.map((function(e){return{width:ae(e,t),desc:e+"w"}})),sizes:"100vw"}}(o,P,{minWidth:l}),k=I.sizes,A=I.widthDescs,T=function(e){return null==e?void 0:"plasmic"===e?se:e}(f),F='<svg width="'+C+'" height="'+M+'" xmlns="http://www.w3.org/2000/svg" version="1.1"/>',R="undefined"==typeof window?Buffer.from(F).toString("base64"):window.btoa(F),j=S({},m||{}),W=O(m||{},"objectFit","objectPosition");return null!=o&&"auto"!==o?W.width="100%":(W.width=o,j.width="auto",l&&(W.minWidth="100%"),null!=c&&"none"!==c&&(W.maxWidth="100%")),null!=s&&"auto"!==s?(W.height="100%",j.height=s,j.minHeight=u,j.maxHeight=p):(W.height=s,j.height="auto",u&&(W.minHeight="100%",j.minHeight=u),null!=p&&"none"!==p&&(W.maxHeight="100%",j.maxHeight=p)),n.createElement("div",{className:t(a,"__wab_img-wrapper"),ref:r,style:j},n.createElement("img",{alt:"","aria-hidden":!0,className:"__wab_img-spacer-svg",src:"data:image/svg+xml;base64,"+R,style:W}),function(e){var t=e.imageLoader,r=e.widthDescs,i=e.src,a=e.quality,o=e.style,s=e.className,l=e.sizes,u=e.imgProps,c=e.ref;return n.createElement("picture",{className:"__wab_picture"},t&&t.supportsUrl(i)&&n.createElement("source",{type:"image/webp",srcSet:r.map((function(e){return t.transformUrl({src:i,quality:a,width:e.width,format:"webp"})+" "+e.desc})).join(", ")}),n.createElement("img",Object.assign({},u,{ref:c,className:s,decoding:"async",src:t&&t.supportsUrl(i)?t.transformUrl({src:i,quality:a,width:r[r.length-1].width}):i,srcSet:t&&t.supportsUrl(i)?r.map((function(e){return t.transformUrl({src:i,quality:a,width:e.width})+" "+e.desc})).join(", "):void 0,sizes:t&&t.supportsUrl(i)?l:void 0,style:S({},o?O(o,"objectFit","objectPosition"):{},{width:0,height:0})})))}({imageLoader:T,widthDescs:A,sizes:k,src:V,quality:d,ref:v,style:m?O(m,"objectFit","objectPosition"):void 0,imgProps:g,className:"__wab_img"}))})),ne=1e4;function ie(e){return e.endsWith(".svg")||e.startsWith("data:image/svg")}function ae(e,t){var r,n=null!=(r=te.findIndex((function(t){return t>=e})))?r:te.length-1,i=te[n];if(!(i>=t||n+1<te.length&&t<=te[n+1]))return i}function oe(e){if(null!=e&&""!=e){if("number"==typeof e)return e;var t=function(e){var t=e.match(/^\s*(-?(?:\d+\.\d*|\d*\.\d+|\d+))\s*([a-z]*|%)\s*(?:\/\*.*)?$/i);if(null!=t)return{num:+t[1],units:t[2]}}(e);return!t||t.units&&"px"!==t.units?void 0:t.num}}var se={supportsUrl:function(e){return e.startsWith("https://img.plasmic.app")&&!ie(e)},transformUrl:function(e){var t,r=[e.width?"w="+e.width:void 0,"q="+(null!=(t=e.quality)?t:75),e.format?"f="+e.format:void 0].filter((function(e){return!!e}));return e.src+"?"+r.join("&")}},le=n.forwardRef((function(e,t){if("nextjs"===e.platform&&e.href){var r=["href","replace","scroll","shallow","passHref","prefetch","locale"];return n.createElement(e.component,O.apply(void 0,[e].concat(r)),n.createElement("a",Object.assign({},M.apply(void 0,[e,"component","platform"].concat(r)),{ref:t})))}return"gatsby"===e.platform&&/^\/(?!\/)/.test(e.href)?n.createElement(e.component,S({},M(e,"component","platform","href"),{to:e.href,ref:t})):n.createElement("a",Object.assign({},M(e,"component","platform"),{ref:t}))}));function ue(e){var t=e.as,n=e.defaultContents,i=e.value,a=x(e,["as","defaultContents","value"]),o=void 0===i?n:i;if(!o||Array.isArray(o)&&0===o.length)return null;var s=function e(t){return r.isValidElement(t)&&t.type===r.Fragment?e(t.props.children):"string"==typeof t?t:Array.isArray(t)&&1===t.length&&"string"==typeof t[0]?t[0]:void 0}(o);return s&&(o=r.createElement("div",{className:"__wab_slot-string-wrapper"},s)),0===Object.keys(a).filter((function(e){return!!a[e]})).length?r.createElement(r.Fragment,null,o):r.createElement(t||"div",D({className:"__wab_slot"},a),o)}var ce=[],pe={};function de(){return T?Object.entries(pe).filter((function(e){return window.matchMedia(e[1]).matches})).map((function(e){return e[0]})):[]}var fe=void 0;T&&window.addEventListener("resize",(function(){var e=de();fe&&e.join("")===fe.join("")||(fe=e,a.unstable_batchedUpdates((function(){return ce.forEach((function(e){return e()}))})))}));var ve=n.createContext(void 0);function me(e){var t={},r=0;return{str:function e(i){if(!i)return"";if("number"==typeof i||"boolean"==typeof i||"string"==typeof i)return i.toString();if("object"!=typeof i)return"";if(Array.isArray(i)||null!=(a=i)&&"function"==typeof a[Symbol.iterator])return Array.from(i).map((function(t){return e(t)})).filter((function(e){return!!e})).join("");var a,o=ye(i,"props")&&ye(i.props,"children")&&i.props.children||ye(i,"children")&&i.children||[],s=""+n.Children.toArray(o).map((function(t){return e(t)})).filter((function(e){return!!e})).join("");if(n.isValidElement(i)&&i.type===n.Fragment)return s;var l=r+1;return r++,t[l]=n.isValidElement(i)?n.cloneElement(i,{key:l,children:void 0}):i,"<"+l+">"+s+"</"+l+">"}(e),components:t,componentsCount:r}}var he=!1;function ye(e,t){return"object"==typeof e&&null!==e&&t in e}var ge=r.createContext(void 0),be=o.useIsSSR;function Pe(){r.useContext(ge)}var we={useHover:function(){var e=r.useState(!1),t=e[1];return[e[0],{onMouseEnter:function(){return t(!0)},onMouseLeave:function(){return t(!1)}}]},useFocused:function(e){var t=s.useFocusRing({within:!1,isTextInput:e.isTextInput});return[t.isFocused,t.focusProps]},useFocusVisible:function(e){var t=s.useFocusRing({within:!1,isTextInput:e.isTextInput});return[t.isFocusVisible,t.focusProps]},useFocusedWithin:function(e){var t=s.useFocusRing({within:!0,isTextInput:e.isTextInput});return[t.isFocused,t.focusProps]},useFocusVisibleWithin:function(e){var t=s.useFocusRing({within:!0,isTextInput:e.isTextInput});return[t.isFocusVisible,t.focusProps]},usePressed:function(){var e=r.useState(!1),t=e[1];return[e[0],{onMouseDown:function(){return t(!0)},onMouseUp:function(){return t(!1)}}]}},Se=t,xe=!0;function Ee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter((function(e){return!!e.def})),i=k(n,(function(e){return e.def.group}));return A(i,(function(e){return Object.fromEntries(e.map((function(e){return[e.def.variant,!!e.active]})))}))}function Ve(e){if(r.isValidElement(e)){var t=e.type;return t.__plumeType||(null==t.getPlumeType?void 0:t.getPlumeType(e.props))}}function Ce(e){return O(e,"className","style")}function Oe(e,t){return{plasmicProps:{variants:O.apply(void 0,[t].concat(e.internalVariantProps)),args:O.apply(void 0,[t].concat(e.internalArgProps)),overrides:{}}}}var Me=/^(data-.*)$/;function Ie(e,t){var r=t.itemPlumeType,i=t.sectionPlumeType,a=t.invalidChildError,o=t.requireItemValue;return n.useMemo((function(){return function(e,t){if(!e)return{items:[],disabledKeys:[]};var r=t.itemPlumeType,i=t.sectionPlumeType,a=t.invalidChildError,o=0,s=0,l=[];return{items:function e(u){return W(u).flatMap((function(u){if(n.isValidElement(u)){if(u.type===n.Fragment)return e(u.props.children);var c,p=Ve(u);if(p===r){var d=Te(u=function(e){if(Re(e,"value"))return o++,e;if(t.requireItemValue&&xe)throw new Error('Must specify a "value" prop for '+function(e){if("string"==typeof e.type)return e.type;var t,r,n,i,a=e.type;return null!=(t=null!=(r=null!=(n=a.displayName)?n:a.name)?r:null==(i=a.render)?void 0:i.name)?t:"Component"}(e));return je(e,{value:""+o++})}(u));return Fe(u,"isDisabled")&&d&&l.push(d),[u]}if(p===i)return[je(u,{key:null!=(c=u.key)?c:"section-"+s++,children:e(Fe(u,"children"))})]}if(xe)throw new Error(null!=a?a:"Unexpected child");return[]}))}(e),disabledKeys:l}}(e,{itemPlumeType:r,sectionPlumeType:i,invalidChildError:a,requireItemValue:o})}),[e,r,i,a,o])}function ke(e){return je(e.rendered,{_node:e,key:e.key})}function Ae(e,t){if(Ve(e)===t.itemPlumeType){var r,i=e,a=Fe(i,"children");return n.createElement(f.Item,{key:Te(i),textValue:null!=(r=Fe(i,"textValue"))?r:(o=a,"string"==typeof o?a:Re(i,"value")?Fe(i,"value"):i.key),"aria-label":Fe(i,"aria-label")},i)}var o,s=e;return n.createElement(f.Section,{title:s,"aria-label":Fe(s,"aria-label"),items:Fe(s,"children")},(function(e){return Ae(e,t)}))}function Te(e){var t;return null!=(t=Fe(e,"value"))?t:e.key}function Fe(e,t){return"componentProps"in e.props?e.props.componentProps[t]:e.props[t]}function Re(e,t){return"componentProps"in e.props?t in e.props.componentProps:t in e.props}function je(e,t){return n.cloneElement(e,e.type.getPlumeType?S({componentProps:S({},e.props.componentProps,t)},t.key?{key:t.key}:{}):t)}var We=r.createContext(void 0),De=r.createContext(void 0),_e={itemPlumeType:"menu-item",sectionPlumeType:"menu-group"};function Ne(e,t){var n=e.triggerRef,i=e.isDisabled,a=e.placement,o=e.menuMatchTriggerWidth,s=e.menuWidth,l=e.menu,u=p.useMenuTrigger({type:"menu",isDisabled:i},t,n),c=u.menuProps;return{triggerProps:h.usePress(S({},u.menuTriggerProps,{isDisabled:i})).pressProps,makeMenu:function(){var e="function"==typeof l?l():l;if(!e)return null;if("menu"!==Ve(e)){if(xe)throw new Error("Must use an instance of the Menu component.");return null}return r.cloneElement(e,D(e.props,c))},triggerContext:r.useMemo((function(){var e;return{triggerRef:n,state:t,autoFocus:null==(e=t.focusStrategy)||e,placement:a,overlayMatchTriggerWidth:o,overlayMinTriggerWidth:!0,overlayWidth:s}}),[n,t,a,o,s])}}var qe=r.createContext(void 0),He={itemPlumeType:"select-option",sectionPlumeType:"select-option-group"};function Ke(e){var t=e.state,n=e.menuProps,i=e.children,a=r.useRef(null),o=g.useListBox(S({},n,{isVirtualized:!1,autoFocus:t.focusStrategy||!0,disallowEmptySelection:!0}),t,a);return r.cloneElement(i,D(i.props,o.listBoxProps,{style:{outline:"none"},ref:a}))}exports.DropdownMenu=function(e){var t=e.isOpen,n=e.defaultOpen,i=e.onOpenChange,a=e.children,o=e.placement,s=e.menu,l=r.useRef(null),u=m.useMenuTriggerState({isOpen:t,defaultOpen:n,onOpenChange:i,shouldFlip:!0}),c=Ne({triggerRef:l,placement:o,menu:s},u),p=c.makeMenu;return r.createElement(We.Provider,{value:c.triggerContext},r.cloneElement(a,D(a.props,c.triggerProps,{ref:l})),u.isOpen&&p())},exports.PlasmicIcon=function(e){var t=e.PlasmicIconType,n=x(e,["PlasmicIconType"]);return r.createElement(t,Object.assign({},n))},exports.PlasmicImg=re,exports.PlasmicLink=le,exports.PlasmicRootProvider=function(e){var t=e.platform,n=e.children,i=r.useMemo((function(){return{platform:t}}),[t]);return r.createElement(ge.Provider,{value:i},r.createElement(o.SSRProvider,null,r.createElement(ve.Provider,{value:e.translator},n)))},exports.PlasmicSlot=function(e){return ue(e)},exports.Stack=z,exports.Trans=function(e){var t=e.children,r=n.useContext(ve);if(!r)return he||(console.warn("Using Plasmic Translation but no translation function has been provided"),he=!0),t;var i=me(t);return r(i.str,i.componentsCount>0?{components:i.components}:void 0)},exports.classNames=Se,exports.createPlasmicElementProxy=function(e,t){null==t&&(t={});var r=t["data-plasmic-name"],n=t["data-plasmic-root"],i=t["data-plasmic-for-node"];delete t["data-plasmic-name"],delete t["data-plasmic-root"],delete t["data-plasmic-for-node"];for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var l=Y.apply(void 0,[e,t].concat(o));if(r&&B.set(r,l),n){var u,c=i?null!=(u=B.get(i))?u:null:l;return B.clear(),c}return l},exports.createUseScreenVariants=function(e,t){return Object.assign(pe,t),fe=void 0,function(){var t=r.useState()[1],n=r.useRef(fe||[]);return R((function(){var e=function(){fe&&n.current.join("")!==fe.join("")&&(n.current=fe,t({}))};return ce.push(e),void 0===fe&&(fe=de()),e(),function(){ce.splice(ce.indexOf(e),1)}}),[]),e?fe||[]:fe?fe[fe.length-1]:void 0}},exports.deriveRenderOpts=function(e,t){var r,n,i,a,o,s=t.name,l=t.descendantNames,u=t.internalVariantPropNames,c=t.internalArgPropNames,p=["variants","args","overrides"],d=(r=M.apply(void 0,[O.apply(void 0,[e].concat(u))].concat(p)),n=e.variants,r&&n?S({},r,n):r||n||{}),f=(i=M.apply(void 0,[O.apply(void 0,[e].concat(c))].concat(p)),a=e.args,i&&a?S({},i,a):i||a||{}),v=X(M.apply(void 0,[O.apply(void 0,[e].concat(l))].concat(c,u,p)),e.overrides),m=M.apply(void 0,[e,"variants","args","overrides"].concat(l,u,c));return Object.keys(m).length>0&&(v=X(v,((o={})[s]={props:m},o))),{variants:d,args:f,overrides:v}},exports.ensureGlobalVariants=function(e){return Object.entries(e).filter((function(e){return"PLEASE_RENDER_INSIDE_PROVIDER"===e[1]})).forEach((function(t){e[t[0]]=void 0})),e},exports.genTranslatableString=me,exports.getDataProps=function(e){return function(e,t){for(var r={},n=0,i=Object.entries(e);n<i.length;n++){var a=i[n][0];Me.test(a)&&(r[a]=e[a])}return r}(e)},exports.hasVariant=function(e,t,r){if(null==e)return!1;var n=e[t];return null!=n&&(!0===n?r===t:!1!==n&&(Array.isArray(n)?n.includes(r):"string"==typeof n?n===r:void 0!==n[r]&&!1!==n[r]))},exports.makeFragment=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.createElement.apply(r,[r.Fragment,{}].concat(t))},exports.omit=M,exports.pick=O,exports.renderPlasmicSlot=ue,exports.setPlumeStrictMode=function(e){xe=e},exports.useButton=function(e,t,r,n){var i,a,o,s;void 0===n&&(n=null);var l=t.link,u=t.isDisabled,c=t.startIcon,p=t.endIcon,d=t.showStartIcon,f=t.showEndIcon,v=t.children,m=x(t,["link","isDisabled","startIcon","endIcon","showStartIcon","showEndIcon","children"]);return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:r.showStartIconVariant,active:d},{def:r.showEndIconVariant,active:f},{def:r.isDisabledVariant,active:u})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),r.startIconSlot&&((i={})[r.startIconSlot]=c,i),r.endIconSlot&&((a={})[r.endIconSlot]=p,a),((o={})[r.contentSlot]=v,o)),overrides:((s={})[r.root]={as:l?"a":"button",props:S({},M.apply(void 0,[m].concat(e.internalArgProps,e.internalVariantProps)),{ref:n,disabled:u},!!l&&{href:l})},s)}}},exports.useCheckbox=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=t.children,p=t.isDisabled,d=t.isIndeterminate;Pe();var f=r.useRef(null),v=r.useRef(null),m=function(e){var t=S({},e,{isSelected:e.isChecked,defaultSelected:e.defaultChecked});return delete t.isChecked,delete t.defaultChecked,t}(t),h=c.useToggleState(m),y=l.useCheckbox(m,h,f).inputProps,g=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:p},{def:n.isCheckedVariant,active:h.isSelected},{def:n.isIndeterminateVariant,active:d},{def:n.noLabelVariant,active:!s})),b=((a={})[n.root]={as:"label",props:D(Ce(t),{ref:v}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(u.VisuallyHidden,{isFocusable:!0},r.createElement("input",Object.assign({},y,{ref:f}))),e)}},a),P=S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.labelSlot?((o={})[n.labelSlot]=s,o):{}),w=r.useMemo((function(){return{setChecked:function(e){return h.setSelected(e)}}}),[h]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return v.current},focus:function(){var e;return null==(e=f.current)?void 0:e.focus()},blur:function(){var e;return null==(e=f.current)?void 0:e.blur()},setChecked:function(e){return w.setChecked(e)}}}),[v,f,w]),{plasmicProps:{variants:g,overrides:b,args:P},state:w}},exports.useIsSSR=be,exports.useMenu=function(e,t,n,i){var a,o;void 0===i&&(i=null),Pe();var s=function(e){var t=e.children,n=x(e,["children"]),i=Ie(t,S({},_e,{invalidChildError:"Can only use Menu.Item and Menu.Group as children to Menu",requireItemValue:!1})),a=i.items,o=i.disabledKeys;return{ariaProps:S({},n,{children:r.useCallback((function(e){return Ae(e,_e)}),[]),items:a,disabledKeys:o})}}(t).ariaProps,l=r.useContext(We),u=r.useRef(null),c=d.useTreeState(s),f=r.useRef(null),v=p.useMenu(S({},s,{autoFocus:null==l?void 0:l.autoFocus}),c,f).menuProps,m=r.useMemo((function(){return{state:c,menuProps:t}}),[c,t]),h=S({},O.apply(void 0,[t].concat(e.internalVariantProps))),y=((a={})[n.root]={props:D(Ce(t),{ref:u})},a[n.itemsContainer]={as:"ul",props:D(v,{ref:f,style:S({},{outline:"none"})})},a),g=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.itemsSlot]=r.createElement(De.Provider,{value:m},Array.from(c.collection).map((function(e){return ke(e)}))),o)),b=r.useMemo((function(){return{getFocusedValue:function(){return c.selectionManager.focusedKey},setFocusedValue:function(e){return c.selectionManager.setFocusedKey(e)}}}),[c]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return u.current},getFocusedValue:function(){return b.getFocusedValue()},setFocusedValue:function(e){return b.setFocusedValue(e)}}}),[u,b]),{plasmicProps:{variants:h,args:g,overrides:y},state:b}},exports.useMenuButton=function(e,t,n,i){var a,o;void 0===i&&(i=null);var l=t.placement,u=t.isOpen,c=t.defaultOpen,p=t.onOpenChange,d=t.isDisabled,f=t.menu,v=t.autoFocus,h=t.menuMatchTriggerWidth,y=t.menuWidth;Pe();var g=r.useRef(null),b=r.useRef(null),P=m.useMenuTriggerState({isOpen:u,defaultOpen:c,onOpenChange:p,shouldFlip:!0}),w=Ne({isDisabled:d,triggerRef:b,placement:l,menuMatchTriggerWidth:h,menuWidth:y,menu:f},P),x=w.triggerProps,E=w.makeMenu,V=w.triggerContext,C=s.useFocusable(t,b).focusableProps,M=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isOpenVariant,active:P.isOpen},{def:n.isDisabledVariant,active:d})),I=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((a={})[n.menuSlot]=P.isOpen?E():void 0,a)),k=((o={})[n.root]={wrapChildren:function(e){return r.createElement(We.Provider,{value:V},e)},props:{ref:g}},o[n.trigger]={props:D(x,C,Ce(t),O(t,"title"),{ref:b,autoFocus:v,disabled:!!d,type:"button"})},o),A=r.useMemo((function(){return{open:function(){return P.open()},close:function(){return P.close()},isOpen:function(){return P.isOpen}}}),[P]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return g.current},getTrigger:function(){return b.current},focus:function(){return b.current&&b.current.focus()},blur:function(){return b.current&&b.current.blur()},open:A.open,close:A.close,isOpen:A.isOpen}}),[g,b,A]),{plasmicProps:{variants:M,args:I,overrides:k},state:A}},exports.useMenuGroup=function(e,t,n){var i,a,o=r.useContext(De),s=t._node;if(!o||!s){if(xe)throw new Error("You can only use a Menu.Group within a Menu component.");return Oe(e,t)}var l=p.useMenuSection({heading:t.title,"aria-label":t["aria-label"]}),u=l.headingProps,c=l.groupProps,d=v.useSeparator({elementType:"li"}).separatorProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.noTitleVariant,active:!t.title},{def:n.isFirstVariant,active:o.state.collection.getFirstKey()===s.key})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.titleSlot]=t.title,i[n.itemsSlot]=Array.from(s.childNodes).map((function(e){return ke(e)})),i)),overrides:((a={})[n.root]={props:Ce(t)},a[n.separator]={props:S({},d),as:"li"},a[n.titleContainer]=S({props:S({role:"presentation"},u)},!t.title&&{render:function(){return null}}),a[n.itemsContainer]={props:S({},c),as:"ul"},a)}}},exports.useMenuItem=function(e,t,n){var i,a,o=r.useContext(De),s=r.useContext(We);if(!o){if(xe)throw new Error("You can only use a Menu.Item within a Menu component.");return Oe(e,t)}var l=t.children,u=t.onAction,c=o.state,d=o.menuProps,f=t._node,v=c.disabledKeys.has(f.key),m=c.selectionManager.isFocused&&c.selectionManager.focusedKey===f.key,h=r.useRef(null),y=p.useMenuItem(D({onAction:u},{onAction:d.onAction,onClose:null==s?void 0:s.state.close},{isDisabled:v,"aria-label":f&&f["aria-label"],key:f.key,isVirtualized:!1,closeOnSelect:!0}),c,h),g=y.menuItemProps,b=y.labelProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:v},{def:n.isHighlightedVariant,active:m})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.labelSlot]=l,i)),overrides:((a={})[n.root]={as:"li",props:D(g,{ref:h,style:{outline:"none"}})},a[n.labelContainer]={props:S({},b)},a)}}},exports.useSelect=function(e,t,n,i){var a,o;void 0===i&&(i=null),Pe();var s=function(e){var t=e.value,n=e.defaultValue,i=e.children,a=e.onChange,o=x(e,["value","defaultValue","children","onChange","placement","menuMatchTriggerWidth","menuWidth"]),s=Ie(i,S({},He,{invalidChildError:"Can only use Select.Option and Select.OptionGroup as children to Select",requireItemValue:!0})),l=s.items,u=s.disabledKeys;return{ariaProps:S({},o,{children:r.useCallback((function(e){return Ae(e,He)}),[]),onSelectionChange:r.useMemo((function(){return a?function(e){return a(null==e||"null"===e?null:e)}:void 0}),[a]),items:l,disabledKeys:u,defaultSelectedKey:n},"value"in e&&{selectedKey:null!=t?t:null})}}(t).ariaProps,l=t.placement,u=b.useSelectState(s),c=r.useRef(null),p=r.useRef(null),d=t.isDisabled,f=t.name,v=t.menuWidth,m=t.menuMatchTriggerWidth,g=t.autoFocus,P=t.placeholder,w=t.selectedContent,E=y.useSelect(s,u,c),V=E.menuProps,C=h.usePress(S({},E.triggerProps,{isDisabled:d})).pressProps,M=u.selectedItem?null!=w?w:Fe(u.selectedItem.value,"children"):null,I=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isOpenVariant,active:u.isOpen},{def:n.placeholderVariant,active:!u.selectedItem},{def:n.isDisabledVariant,active:d})),k=r.useMemo((function(){return{triggerRef:c,state:u,placement:l,overlayMatchTriggerWidth:m,overlayMinTriggerWidth:!0,overlayWidth:v}}),[c,u,l,m,v]),A=((a={})[n.root]={props:D(Ce(t),{ref:p}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(y.HiddenSelect,{state:u,triggerRef:c,name:f,isDisabled:d}),e)}},a[n.trigger]={props:D(C,{ref:c,autoFocus:g,disabled:!!d,type:"button"})},a[n.overlay]={wrap:function(e){return r.createElement(We.Provider,{value:k},e)}},a[n.optionsContainer]={wrap:function(e){return r.createElement(Ke,{state:u,menuProps:V},e)}},a),T=S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.triggerContentSlot]=M,o[n.placeholderSlot]=P,o[n.optionsSlot]=r.createElement(qe.Provider,{value:u},Array.from(u.collection).map((function(e){return ke(e)}))),o)),F=r.useMemo((function(){return{open:function(){return u.open()},close:function(){return u.close()},isOpen:function(){return u.isOpen},getSelectedValue:function(){return u.selectedKey?""+u.selectedKey:null},setSelectedValue:function(e){return u.setSelectedKey(e)}}}),[u]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return p.current},getTrigger:function(){return c.current},focus:function(){var e;return null==(e=c.current)?void 0:e.focus()},blur:function(){var e;return null==(e=c.current)?void 0:e.blur()},open:function(){return F.open()},close:function(){return F.close()},isOpen:function(){return F.isOpen()},getSelectedValue:function(){return F.getSelectedValue()},setSelectedValue:function(e){return F.setSelectedValue(e)}}}),[p,c,F]),{plasmicProps:{variants:I,args:T,overrides:A},state:F}},exports.useSelectOption=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=r.useContext(qe);if(!s){if(xe)throw new Error("You can only use a Select.Option within a Select component.");return Oe(e,t)}var l=t.children,u=r.useRef(null),c=N(u,i),p=t._node,d=s.selectionManager.isSelected(p.key),f=s.disabledKeys.has(p.key),v=s.selectionManager.isFocused&&s.selectionManager.focusedKey===p.key,m=g.useOption({isSelected:d,isDisabled:f,"aria-label":p&&p["aria-label"],key:p.key,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,isVirtualized:!1},s,u),h=m.optionProps,y=m.labelProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isSelectedVariant,active:d},{def:n.isDisabledVariant,active:f},{def:n.isHighlightedVariant,active:v})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((a={})[n.labelSlot]=l,a)),overrides:((o={})[n.root]={props:D(h,Ce(t),{ref:c,style:{outline:"none"}})},o[n.labelContainer]={props:y},o)}}},exports.useSelectOptionGroup=function(e,t,n){var i,a,o=r.useContext(qe),s=t._node;if(!o||!s){if(xe)throw new Error("You can only use a Select.OptionGroup within a Select component.");return Oe(e,t)}var l=g.useListBoxSection({heading:t.title,"aria-label":t["aria-label"]}),u=l.headingProps,c=l.groupProps,p=v.useSeparator({elementType:"li"}).separatorProps;return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.noTitleVariant,active:!t.title},{def:n.isFirstVariant,active:o.collection.getFirstKey()===s.key})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((i={})[n.titleSlot]=t.title,i[n.optionsSlot]=Array.from(s.childNodes).map((function(e){return ke(e)})),i)),overrides:((a={})[n.root]={props:Ce(t)},a[n.separator]={props:S({},p)},a[n.titleContainer]=S({props:S({role:"presentation"},u)},!t.title&&{render:function(){return null}}),a[n.optionsContainer]={props:S({},c)},a)}}},exports.useSwitch=function(e,t,n,i){var a,o;void 0===i&&(i=null);var s=t.children,l=t.isDisabled;Pe();var p=r.useRef(null),d=r.useRef(null),f=function(e){var t=S({},e,{isSelected:e.isChecked,defaultSelected:e.defaultChecked});return delete t.isChecked,delete t.defaultChecked,t}(t),v=c.useToggleState(f),m=P.useSwitch(f,v,p).inputProps,h=S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isDisabledVariant,active:l},{def:n.isCheckedVariant,active:v.isSelected},{def:n.noLabelVariant,active:!s})),y=((a={})[n.root]={as:"label",props:D(Ce(t),{ref:d}),wrapChildren:function(e){return r.createElement(r.Fragment,null,r.createElement(u.VisuallyHidden,{isFocusable:!0},r.createElement("input",Object.assign({},m,{ref:p}))),e)}},a),g=S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.labelSlot?((o={})[n.labelSlot]=s,o):{}),b=r.useMemo((function(){return{setChecked:function(e){return v.setSelected(e)}}}),[v]);return r.useImperativeHandle(i,(function(){return{getRoot:function(){return d.current},focus:function(){var e;return null==(e=p.current)?void 0:e.focus()},blur:function(){var e;return null==(e=p.current)?void 0:e.blur()},setChecked:function(e){return b.setChecked(e)}}}),[d,p,b]),{plasmicProps:{variants:h,overrides:y,args:g},state:b}},exports.useTextInput=function(e,t,n,i){var a,o,s;void 0===i&&(i=null);var l=t.isDisabled,u=t.startIcon,c=t.endIcon,p=t.showStartIcon,d=t.showEndIcon,f=t.className,v=t.style,m=t.inputClassName,h=t.inputStyle,y=x(t,["isDisabled","startIcon","endIcon","showStartIcon","showEndIcon","className","style","inputClassName","inputStyle"]),g=r.useRef(null),b=r.useRef(null);return r.useImperativeHandle(i,(function(){return{focus:function(){var e;null==(e=b.current)||e.focus()},blur:function(){var e;null==(e=b.current)||e.blur()},getRoot:function(){return g.current},getInput:function(){return b.current}}}),[g,b]),{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.showStartIconVariant,active:p},{def:n.showEndIconVariant,active:d},{def:n.isDisabledVariant,active:l})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),n.startIconSlot&&((a={})[n.startIconSlot]=u,a),n.endIconSlot&&((o={})[n.endIconSlot]=c,o)),overrides:((s={})[n.root]={props:{ref:g,className:f,style:v}},s[n.input]={props:S({},M.apply(void 0,[y].concat(e.internalArgProps.filter((function(e){return"required"!==e})),e.internalVariantProps)),{disabled:l,ref:b,className:m,style:h})},s)}}},exports.useTrigger=function(e,t){return we[e](t)},exports.useTriggeredOverlay=function(e,t,n,a){var o,l;void 0===a&&(a=null);var u=r.useRef(null),c=N(u,a),p=r.useContext(We);if(!p){if(xe)throw new Error("You can only use a triggered overlay with a TriggeredOverlayContext");return Oe(e,t)}var d=t.children,f=p.triggerRef,v=p.placement,m=p.overlayMatchTriggerWidth,h=p.overlayMinTriggerWidth,y=p.overlayWidth,g=p.state,b=r.useState(!1),P=b[0],x=b[1],E=f.current&&(m||h)?f.current.offsetWidth:void 0;R((function(){!P&&f.current&&(m||h)&&x(!0)}),[f,P,m,h]);var V=w.useOverlay({isOpen:g.isOpen,onClose:g.close,isDismissable:!0,shouldCloseOnBlur:!0},u).overlayProps,C=w.useOverlayPosition({targetRef:f,overlayRef:u,placement:null!=v?v:"bottom left",shouldFlip:!0,isOpen:g.isOpen,onClose:g.close,containerPadding:0}),M=C.overlayProps,I=C.updatePosition,k=C.placement;R((function(){g.isOpen&&requestAnimationFrame((function(){I()}))}),[g.isOpen,I]);var A=D({style:{left:"auto",right:"auto",top:"auto",bottom:"auto",position:"absolute",width:null!=y?y:m?E:"auto",minWidth:h?E:"auto"}},V,M);return{plasmicProps:{variants:S({},O.apply(void 0,[t].concat(e.internalVariantProps)),Ee({def:n.isPlacedTopVariant,active:"top"===k},{def:n.isPlacedBottomVariant,active:"bottom"===k},{def:n.isPlacedLeftVariant,active:"left"===k},{def:n.isPlacedRightVariant,active:"right"===k})),args:S({},O.apply(void 0,[t].concat(e.internalArgProps)),((o={})[n.contentSlot]=r.createElement(s.FocusScope,{restoreFocus:!0},r.createElement(w.DismissButton,{onDismiss:g.close}),d),o)),overrides:((l={})[n.root]={props:D(A,Ce(t),{ref:c}),wrap:function(e){return"undefined"!=typeof document?i.createPortal(e,document.body):e}},l)}}},exports.wrapWithClassName=function(e,t){var n=r.isValidElement(e)&&e.key||void 0;return r.createElement("div",{key:n,className:t,style:{display:"grid"}},e)}; | ||
//# sourceMappingURL=react-web.cjs.production.min.js.map |
{ | ||
"name": "@plasmicapp/react-web", | ||
"version": "0.2.97", | ||
"version": "0.2.98", | ||
"description": "plasmic library for rendering in the presentational style", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -73,5 +73,6 @@ import { b as __spreadArray, _ as __rest, a as __assign, p as pick } from '../../tslib.es6-d26ffe68.js'; | ||
spacerStyle.width = "100%"; | ||
wrapperStyle.width = displayWidth; | ||
wrapperStyle.minWidth = displayMinWidth; | ||
wrapperStyle.maxWidth = displayMaxWidth; | ||
// Rely on the styles set by `classname` on the wrapper: | ||
// wrapperStyle.width = displayWidth; | ||
// wrapperStyle.minWidth = displayMinWidth; | ||
// wrapperStyle.maxWidth = displayMaxWidth; | ||
} | ||
@@ -90,7 +91,9 @@ else { | ||
spacerStyle.minWidth = "100%"; | ||
wrapperStyle.minWidth = displayMinWidth; | ||
// Rely on min-width set by `classname` on the wrapper: | ||
// wrapperStyle.minWidth = displayMinWidth; | ||
} | ||
if (displayMaxWidth != null && displayMaxWidth !== "none") { | ||
spacerStyle.maxWidth = "100%"; | ||
wrapperStyle.maxWidth = displayMaxWidth; | ||
// Rely on max-width set by `classname` on the wrapper: | ||
// wrapperStyle.maxWidth = displayMaxWidth; | ||
} | ||
@@ -97,0 +100,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1720418
176
15012
10