New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@twilio-paste/button

Package Overview
Dependencies
Maintainers
5
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio-paste/button - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

6

CHANGELOG.md
# Change Log
## 7.0.1
### Patch Changes
- [`174be6d9`](https://github.com/twilio-labs/paste/commit/174be6d968c5b4e4c8973a88e0491f45496b15d9) [#1363](https://github.com/twilio-labs/paste/pull/1363) Thanks [@TheSisb](https://github.com/TheSisb)! - Buttons that behave as links (`<Button as="a" href="">`) now correctly use the external link icon for external links.
## 7.0.0

@@ -4,0 +10,0 @@

2

dist/index.es.js

@@ -1,1 +0,1 @@

var ae=Object.prototype.hasOwnProperty;var Tt=Object.getOwnPropertySymbols,ie=Object.prototype.propertyIsEnumerable;var i=Object.assign;var p=(t,e)=>{var o={};for(var r in t)ae.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&Tt)for(var r of Tt(t))e.indexOf(r)<0&&ie.call(t,r)&&(o[r]=t[r]);return o},se=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var g=se((L,D)=>{var ce=200,kt="__lodash_hash_undefined__",le=800,ue=16,Lt=9007199254740991,It="[object Arguments]",de="[object Array]",pe="[object AsyncFunction]",fe="[object Boolean]",he="[object Date]",ye="[object Error]",Ct="[object Function]",ge="[object GeneratorFunction]",Be="[object Map]",me="[object Number]",be="[object Null]",Rt="[object Object]",Se="[object Proxy]",ve="[object RegExp]",xe="[object Set]",_e="[object String]",we="[object Undefined]",De="[object WeakMap]",Pe="[object ArrayBuffer]",Te="[object DataView]",ke="[object Float32Array]",Le="[object Float64Array]",Ie="[object Int8Array]",Ce="[object Int16Array]",Re="[object Int32Array]",Ee="[object Uint8Array]",Oe="[object Uint8ClampedArray]",ze="[object Uint16Array]",Ne="[object Uint32Array]",Ae=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,je=/^(?:0|[1-9]\d*)$/,d={};d[ke]=d[Le]=d[Ie]=d[Ce]=d[Re]=d[Ee]=d[Oe]=d[ze]=d[Ne]=!0;d[It]=d[de]=d[Pe]=d[fe]=d[Te]=d[he]=d[ye]=d[Ct]=d[Be]=d[me]=d[Rt]=d[ve]=d[xe]=d[_e]=d[De]=!1;var Et=typeof global=="object"&&global&&global.Object===Object&&global,He=typeof self=="object"&&self&&self.Object===Object&&self,I=Et||He||Function("return this")(),Ot=typeof L=="object"&&L&&!L.nodeType&&L,C=Ot&&typeof D=="object"&&D&&!D.nodeType&&D,zt=C&&C.exports===Ot,rt=zt&&Et.process,Nt=function(){try{var t=C&&C.require&&C.require("util").types;return t||rt&&rt.binding&&rt.binding("util")}catch(e){}}(),At=Nt&&Nt.isTypedArray;function Fe(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}function We(t,e){for(var o=-1,r=Array(t);++o<t;)r[o]=e(o);return r}function Ve(t){return function(e){return t(e)}}function Ue(t,e){return t==null?void 0:t[e]}function qe(t,e){return function(o){return t(e(o))}}var Ge=Array.prototype,$e=Function.prototype,z=Object.prototype,nt=I["__core-js_shared__"],N=$e.toString,b=z.hasOwnProperty,Mt=function(){var t=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),jt=z.toString,Ke=N.call(Object),Xe=RegExp("^"+N.call(b).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=zt?I.Buffer:void 0,Ht=I.Symbol,Ft=I.Uint8Array,Wt=A?A.allocUnsafe:void 0,Vt=qe(Object.getPrototypeOf,Object),Ut=Object.create,Je=z.propertyIsEnumerable,Ye=Ge.splice,x=Ht?Ht.toStringTag:void 0,M=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ze=A?A.isBuffer:void 0,qt=Math.max,Qe=Date.now,Gt=at(I,"Map"),R=at(Object,"create"),to=function(){function t(){}return function(e){if(!_(e))return{};if(Ut)return Ut(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function w(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function eo(){this.__data__=R?R(null):{},this.size=0}function oo(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ro(t){var e=this.__data__;if(R){var o=e[t];return o===kt?void 0:o}return b.call(e,t)?e[t]:void 0}function no(t){var e=this.__data__;return R?e[t]!==void 0:b.call(e,t)}function ao(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=R&&e===void 0?kt:e,this}w.prototype.clear=eo;w.prototype.delete=oo;w.prototype.get=ro;w.prototype.has=no;w.prototype.set=ao;function S(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function io(){this.__data__=[],this.size=0}function so(t){var e=this.__data__,o=j(e,t);if(o<0)return!1;var r=e.length-1;return o==r?e.pop():Ye.call(e,o,1),--this.size,!0}function co(t){var e=this.__data__,o=j(e,t);return o<0?void 0:e[o][1]}function lo(t){return j(this.__data__,t)>-1}function uo(t,e){var o=this.__data__,r=j(o,t);return r<0?(++this.size,o.push([t,e])):o[r][1]=e,this}S.prototype.clear=io;S.prototype.delete=so;S.prototype.get=co;S.prototype.has=lo;S.prototype.set=uo;function P(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function po(){this.size=0,this.__data__={hash:new w,map:new(Gt||S),string:new w}}function fo(t){var e=H(this,t).delete(t);return this.size-=e?1:0,e}function ho(t){return H(this,t).get(t)}function yo(t){return H(this,t).has(t)}function go(t,e){var o=H(this,t),r=o.size;return o.set(t,e),this.size+=o.size==r?0:1,this}P.prototype.clear=po;P.prototype.delete=fo;P.prototype.get=ho;P.prototype.has=yo;P.prototype.set=go;function T(t){var e=this.__data__=new S(t);this.size=e.size}function Bo(){this.__data__=new S,this.size=0}function mo(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function bo(t){return this.__data__.get(t)}function So(t){return this.__data__.has(t)}function vo(t,e){var o=this.__data__;if(o instanceof S){var r=o.__data__;if(!Gt||r.length<ce-1)return r.push([t,e]),this.size=++o.size,this;o=this.__data__=new P(r)}return o.set(t,e),this.size=o.size,this}T.prototype.clear=Bo;T.prototype.delete=mo;T.prototype.get=bo;T.prototype.has=So;T.prototype.set=vo;function xo(t,e){var o=st(t),r=!o&&it(t),n=!o&&!r&&Kt(t),a=!o&&!r&&!n&&Xt(t),l=o||r||n||a,s=l?We(t.length,String):[],u=s.length;for(var f in t)(e||b.call(t,f))&&!(l&&(f=="length"||n&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||$t(f,u)))&&s.push(f);return s}function lt(t,e,o){(o!==void 0&&!F(t[e],o)||o===void 0&&!(e in t))&&ct(t,e,o)}function _o(t,e,o){var r=t[e];(!(b.call(t,e)&&F(r,o))||o===void 0&&!(e in t))&&ct(t,e,o)}function j(t,e){for(var o=t.length;o--;)if(F(t[o][0],e))return o;return-1}function ct(t,e,o){e=="__proto__"&&M?M(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var Do=wo();function W(t){return t==null?t===void 0?we:be:x&&x in Object(t)?Po(t):To(t)}function Jt(t){return E(t)&&W(t)==It}function Io(t){if(!_(t)||ko(t))return!1;var e=ut(t)?Xe:Me;return e.test(Lo(t))}function Co(t){return E(t)&&Yt(t.length)&&!!d[W(t)]}function Eo(t){if(!_(t))return Ro(t);var e=Zt(t),o=[];for(var r in t)r=="constructor"&&(e||!b.call(t,r))||o.push(r);return o}function Qt(t,e,o,r,n){t!==e&&Do(e,function(a,l){if(n||(n=new T),_(a))Oo(t,e,l,o,Qt,r,n);else{var s=r?r(dt(t,l),a,l+"",t,e,n):void 0;s===void 0&&(s=a),lt(t,l,s)}},te)}function Oo(t,e,o,r,n,a,l){var s=dt(t,o),u=dt(e,o),f=l.get(u);if(f){lt(t,o,f);return}var y=a?a(s,u,o+"",t,e,l):void 0,v=y===void 0;if(v){var m=st(u),k=!m&&Kt(u),O=!m&&!k&&Xt(u);y=u,m||k||O?st(s)?y=s:jo(s)?y=Ao(s):k?(v=!1,y=zo(u,!0)):O?(v=!1,y=No(u,!0)):y=[]:Ho(u)||it(u)?(y=s,it(s)?y=Fo(s):(!_(s)||ut(s))&&(y=Mo(u))):v=!1}v&&(l.set(u,y),n(y,u,r,a,l),l.delete(u)),lt(t,o,y)}function Uo(t,e){return Vo(Wo(t,e,ee),t+"")}var Go=M?function(t,e){return M(t,"toString",{configurable:!0,enumerable:!1,value:qo(e),writable:!0})}:ee;function zo(t,e){if(e)return t.slice();var o=t.length,r=Wt?Wt(o):new t.constructor(o);return t.copy(r),r}function $o(t){var e=new t.constructor(t.byteLength);return new Ft(e).set(new Ft(t)),e}function No(t,e){var o=e?$o(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function Ao(t,e){var o=-1,r=t.length;for(e||(e=Array(r));++o<r;)e[o]=t[o];return e}function Ko(t,e,o,r){var n=!o;o||(o={});for(var a=-1,l=e.length;++a<l;){var s=e[a],u=r?r(o[s],t[s],s,o,t):void 0;u===void 0&&(u=t[s]),n?ct(o,s,u):_o(o,s,u)}return o}function Jo(t){return Uo(function(e,o){var r=-1,n=o.length,a=n>1?o[n-1]:void 0,l=n>2?o[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,l&&Xo(o[0],o[1],l)&&(a=n<3?void 0:a,n=1),e=Object(e);++r<n;){var s=o[r];s&&t(e,s,r,a)}return e})}function wo(t){return function(e,o,r){for(var n=-1,a=Object(e),l=r(e),s=l.length;s--;){var u=l[t?s:++n];if(o(a[u],u,a)===!1)break}return e}}function H(t,e){var o=t.__data__;return Yo(e)?o[typeof e=="string"?"string":"hash"]:o.map}function at(t,e){var o=Ue(t,e);return Io(o)?o:void 0}function Po(t){var e=b.call(t,x),o=t[x];try{t[x]=void 0;var r=!0}catch(a){}var n=jt.call(t);return r&&(e?t[x]=o:delete t[x]),n}function Mo(t){return typeof t.constructor=="function"&&!Zt(t)?to(Vt(t)):{}}function $t(t,e){var o=typeof t;return e=e==null?Lt:e,!!e&&(o=="number"||o!="symbol"&&je.test(t))&&t>-1&&t%1==0&&t<e}function Xo(t,e,o){if(!_(o))return!1;var r=typeof e;return(r=="number"?pt(o)&&$t(e,o.length):r=="string"&&e in o)?F(o[e],t):!1}function Yo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ko(t){return!!Mt&&Mt in t}function Zt(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||z;return t===o}function Ro(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}function To(t){return jt.call(t)}function Wo(t,e,o){return e=qt(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,a=qt(r.length-e,0),l=Array(a);++n<a;)l[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o(l),Fe(t,this,s)}}function dt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Vo=Zo(Go);function Zo(t){var e=0,o=0;return function(){var r=Qe(),n=ue-(r-o);if(o=r,n>0){if(++e>=le)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Lo(t){if(t!=null){try{return N.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function F(t,e){return t===e||t!==t&&e!==e}var it=Jt(function(){return arguments}())?Jt:function(t){return E(t)&&b.call(t,"callee")&&!Je.call(t,"callee")},st=Array.isArray;function pt(t){return t!=null&&Yt(t.length)&&!ut(t)}function jo(t){return E(t)&&pt(t)}var Kt=Ze||Qo;function ut(t){if(!_(t))return!1;var e=W(t);return e==Ct||e==ge||e==pe||e==Se}function Yt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Lt}function _(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function E(t){return t!=null&&typeof t=="object"}function Ho(t){if(!E(t)||W(t)!=Rt)return!1;var e=Vt(t);if(e===null)return!0;var o=b.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&N.call(o)==Ke}var Xt=At?Ve(At):Co;function Fo(t){return Ko(t,te(t))}function te(t){return pt(t)?xo(t,!0):Eo(t)}var tr=Jo(function(t,e,o){Qt(t,e,o)});function qo(t){return function(){return t}}function ee(t){return t}function Qo(){return!1}D.exports=tr});import{Children as wt,Fragment as oe,createElement as B,forwardRef as Sn,isValidElement as vn,useMemo as xn,useState as _n}from"react";import{Box as Dt}from"@twilio-paste/box";import{Stack as wn}from"@twilio-paste/stack";import{Spinner as Dn}from"@twilio-paste/spinner";import{secureExternalLink as Pn}from"@twilio-paste/anchor";import{useSpring as Tn,animated as kn}from"@twilio-paste/animation-library";import{ArrowForwardIcon as Ln}from"@twilio-paste/icons/esm/ArrowForwardIcon";import{createElement as er,forwardRef as or}from"react";import{Box as rr,safelySpreadBoxProps as nr}from"@twilio-paste/box";var ft=g(),ht={appearance:"none",background:"none",display:"inline-block",border:"none",outline:"none",transition:"background-color 100ms ease-in, box-shadow 100ms ease-in, color 100ms ease-in",fontFamily:"fontFamilyText",fontWeight:"fontWeightSemibold",textDecoration:"none",position:"relative",_hover:{textDecoration:"none"},_focus:{textDecoration:"none",boxShadow:"shadowFocus"},_active:{textDecoration:"none"}},c={default:ft({},ht,{cursor:"pointer",_active:{boxShadow:"none"}}),disabled:ft({},ht,{cursor:"not-allowed"}),loading:ft({},ht,{cursor:"wait"})},h={default:{paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",borderRadius:"borderRadius20",fontSize:"fontSize30",lineHeight:"lineHeight20"},small:{paddingTop:"space20",paddingBottom:"space20",paddingLeft:"space30",paddingRight:"space30",borderRadius:"borderRadius10",fontSize:"fontSize30",lineHeight:"lineHeight20"},icon:{padding:"space30",borderRadius:"borderRadius20"},icon_small:{padding:"space20",borderRadius:"borderRadius20"},reset:{paddingTop:"space0",paddingRight:"space0",paddingBottom:"space0",paddingLeft:"space0",borderWidth:"borderWidth0"}};var yt=g(),ar=yt({},c.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimary",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDark",boxShadow:"shadowBorderPrimaryDarker"}}),ir=yt({},c.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"}),sr=yt({},c.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryLight",boxShadow:"shadowBorderPrimaryLight"}),cr={default:ar,loading:ir,disabled:sr},V=or((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return er(rr,i(i(i({ref:n,width:o?"100%":"auto"},nr(r)),cr[e]),h[t]))});V.defaultProps={as:"button"};V.displayName="PrimaryButton";import{createElement as lr,forwardRef as ur}from"react";import{Box as dr,safelySpreadBoxProps as pr}from"@twilio-paste/box";var gt=g(),fr=gt({},c.default,{color:"colorTextLink",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryDarker"}}),U={color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryLighter"},hr=gt({},c.loading,i(i({},U),{_hover:U,_active:U,_focus:U})),q={color:"colorTextLinkLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimaryLight"},yr=gt({},c.disabled,i(i({},q),{_hover:q,_active:q,_focus:q})),gr={default:fr,loading:hr,disabled:yr},G=ur((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return lr(dr,i(i(i({ref:n,width:o?"100%":"auto"},pr(r)),gr[e]),h[t]))});G.defaultProps={as:"button"};G.displayName="SecondaryButton";import{createElement as Br,forwardRef as mr}from"react";import{Box as br,safelySpreadBoxProps as Sr}from"@twilio-paste/box";var Bt=g(),vr=Bt({},c.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructive",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDark",boxShadow:"shadowBorderDestructiveDarker"}}),xr=Bt({},c.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"}),_r=Bt({},c.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveLight",boxShadow:"shadowBorderDestructiveLight"}),wr={default:vr,loading:xr,disabled:_r},$=mr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Br(br,i(i(i({ref:n,width:o?"100%":"auto"},Sr(r)),wr[e]),h[t]))});$.defaultProps={as:"button"};$.displayName="DestructiveButton";import{createElement as Dr,forwardRef as Pr}from"react";import{Box as Tr,safelySpreadBoxProps as kr}from"@twilio-paste/box";var mt=g(),Lr=mt({},c.default,{color:"colorTextLinkDestructive",transition:"none",_hover:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"},_active:{color:"colorTextLinkDestructiveDarker",textDecoration:"underline"},_focus:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"}}),Ir=mt({},c.loading,{color:"colorTextLinkDestructiveDarker",_hover:{color:"colorTextLinkDestructiveDarker"},_active:{color:"colorTextLinkDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker"}}),Cr=mt({},c.disabled,{color:"colorTextLinkDestructiveLight",_hover:{color:"colorTextLinkDestructiveLight"},_active:{color:"colorTextLinkDestructiveLight"},_focus:{color:"colorTextLinkDestructiveLight"}}),Rr={default:Lr,loading:Ir,disabled:Cr},K=Pr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Dr(Tr,i(i(i({ref:n,width:o?"100%":"auto"},kr(r)),Rr[e]),h[t]))});K.defaultProps={as:"a"};K.displayName="DestructiveLinkButton";import{createElement as Er,forwardRef as Or}from"react";import{Box as zr,safelySpreadBoxProps as Nr}from"@twilio-paste/box";var bt=g(),Ar=bt({},c.default,{color:"colorTextLinkDestructive",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveDarker"}}),X={color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveLighter"},Mr=bt({},c.loading,i(i({},X),{_hover:X,_active:X,_focus:X})),J={color:"colorTextLinkDestructiveLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructiveLight"},jr=bt({},c.disabled,i(i({},J),{_hover:J,_active:J,_focus:J})),Hr={default:Ar,loading:Mr,disabled:jr},Y=Or((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Er(zr,i(i(i({ref:n,width:o?"100%":"auto"},Nr(r)),Hr[e]),h[t]))});Y.defaultProps={as:"button"};Y.displayName="DestructiveSecondaryButton";import{createElement as Fr,forwardRef as Wr}from"react";import{Box as Vr,safelySpreadBoxProps as Ur}from"@twilio-paste/box";var St=g(),qr=St({},c.default,{color:"colorTextLink",transition:"none",_hover:{color:"colorTextLinkDark",textDecoration:"underline"},_focus:{color:"colorTextLinkDark",textDecoration:"underline"},_active:{color:"colorTextLinkDarker",textDecoration:"underline"}}),Gr=St({},c.loading,{color:"colorTextLinkDarker"}),$r=St({},c.disabled,{color:"colorTextLinkLight"}),Kr={default:qr,loading:Gr,disabled:$r},Z=Wr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Fr(Vr,i(i(i({ref:n,width:o?"100%":"auto"},Ur(r)),Kr[e]),h[t]))});Z.defaultProps={as:"a"};Z.displayName="LinkButton";import{createElement as Xr,forwardRef as Jr}from"react";import{Box as Yr,safelySpreadBoxProps as Zr}from"@twilio-paste/box";var vt=g(),Qr=vt({},c.default,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverse",_hover:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLighter"},_focus:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowFocusInverse"},_active:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLightest"}}),tn=vt({},c.loading,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseDarker"}),en=vt({},c.disabled,{color:"colorTextInverseWeaker",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverseDarker"}),on={default:Qr,loading:tn,disabled:en},Q=Jr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Xr(Yr,i(i(i({ref:n,width:o?"100%":"auto"},Zr(r)),on[e]),h[t]))});Q.defaultProps={as:"button"};Q.displayName="InverseButton";import{createElement as rn,forwardRef as nn}from"react";import{Box as an,safelySpreadBoxProps as sn}from"@twilio-paste/box";var xt=g(),cn=xt({},c.default,{color:"colorTextInverse",transition:"none",_hover:{color:"colorTextInverseWeaker",textDecoration:"underline"},_focus:{color:"colorTextInverseWeaker",boxShadow:"shadowFocusInverse",textDecoration:"underline"},_active:{textDecoration:"underline"}}),ln=xt({},c.loading,{color:"colorTextInverse"}),un=xt({},c.disabled,{color:"colorTextInverseWeaker"}),dn={default:cn,loading:ln,disabled:un},tt=nn((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return rn(an,i(i(i({ref:n,width:o?"100%":"auto"},sn(r)),dn[e]),h[t]))});tt.defaultProps={as:"a"};tt.displayName="InverseLinkButton";import{createElement as pn,forwardRef as fn}from"react";import{Box as hn,safelySpreadBoxProps as yn}from"@twilio-paste/box";var _t=g(),gn=_t({},c.default,{fontSize:"inherit",fontWeight:"inherit",color:"inherit"}),Bn=_t({},c.loading,{fontSize:"inherit",fontWeight:"inherit"}),mn=_t({},c.disabled,{fontSize:"inherit",fontWeight:"inherit"}),bn={default:gn,loading:Bn,disabled:mn},et=fn((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return pn(hn,i(i(i({ref:n,width:o?"100%":"auto"},yn(r)),bn[e]),h[t]))});et.defaultProps={as:"button"};et.displayName="ResetButton";var In=kn(Dt),Cn=(t,e,o)=>{let r="default";return o!=null?r=o:t==="link"||t==="destructive_link"||t==="reset"?r="reset":wt.count(e)===1&&wt.forEach(e,n=>{vn(n)&&typeof n.type.displayName=="string"&&n.type.displayName.includes("Icon")&&(r="icon")}),r},Rn=(t,e)=>t?"disabled":e?"loading":"default",En=({as:t,href:e,tabIndex:o,variant:r,size:n,fullWidth:a,children:l,disabled:s,loading:u})=>{let f=e!=null&&e!=="",y=o!=null;if(t!=="a"&&f)throw new Error(`[Paste: Button] You cannot pass href into a button without the 'a' tag. Use 'as="a"'.`);if(t==="a"){if(!f)throw new Error("[Paste: Button] Missing href prop for link button.");if(r==="link"||r==="inverse_link")throw new Error("[Paste: Button] Using Button component as an Anchor. Use the Paste Anchor component instead.");if(r!=="primary"&&r!=="secondary"&&r!=="reset")throw new Error('[Paste: Button] <Button as="a"> only works with the following variants: primary or secondary.');if(s||u)throw new Error('[Paste: Button] <Button as="a"> cannot be disabled or loading.')}if(r==="reset"&&n!=="reset")throw new Error('[Paste: Button] The "RESET" variant can only be used with the "RESET" size.');if((n==="icon"||n==="icon_small")&&a)throw new Error("[Paste: Button] Icon buttons should not be fullWidth.");if(l==null)throw new Error("[Paste: Button] Must have non-null children.");if(y&&!(o===0||o===-1))throw new Error("[Paste: Button] tabIndex must be 0 or -1.")},On=({buttonState:t,children:e,showLoading:o,variant:r})=>B(oe,null,B(Dt,{as:"span",display:"flex",textDecoration:"inherit",opacity:t==="loading"?"0":"1","aria-hidden":t==="loading"?"true":"false",justifyContent:r==="reset"?null:"center"},wt.count(e)>1?B(wn,{as:"span",orientation:"horizontal",spacing:"space20"},e):e),o?B(Dt,{as:"span",position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"lineHeight30"},B(Dn,{decorative:!1,title:"Loading, please wait.",delay:0})):null),zn=t=>{switch(t){case"secondary":return G;case"destructive":return $;case"destructive_secondary":return Y;case"link":return Z;case"destructive_link":return K;case"reset":return et;case"inverse":return Q;case"inverse_link":return tt;case"primary":default:return V}},Pt=Sn((t,e)=>{let{size:o,variant:r,children:n,disabled:a,loading:l}=t,s=p(t,["size","variant","children","disabled","loading"]),[u,f]=_n(!1),y=Tn({translateX:u?"4px":"0px",config:{mass:.1,tension:275,friction:16}}),v=xn(()=>Cn(r,n,o),[o,r,n]);En(i(i({},t),{size:v}));let m=Rn(a,l),k=m==="loading",O=m!=="default",re=zn(r),ne=t.as==="a"&&t.href!=null&&typeof n=="string"&&r!=="reset"?B(oe,null,n,B(In,{style:y},B(Ln,{decorative:!0}))):n;return B(re,i(i(i({},s.href!=null?Pn(s.href):null),s),{onMouseEnter:ot=>{typeof s.onMouseEnter=="function"&&s.onMouseEnter(ot),f(!0)},onMouseLeave:ot=>{typeof s.onMouseLeave=="function"&&s.onMouseLeave(ot),f(!1)},buttonState:m,disabled:O,size:v,"aria-busy":m==="loading"?"true":"false",className:void 0,style:void 0,ref:e}),B(On,{buttonState:m,showLoading:k,variant:r},ne))});Pt.defaultProps={as:"button",fullWidth:!1,disabled:!1,loading:!1,type:"button",variant:"primary"};Pt.displayName="Button";export{Pt as Button};
var ie=Object.prototype.hasOwnProperty;var Lt=Object.getOwnPropertySymbols,se=Object.prototype.propertyIsEnumerable;var i=Object.assign;var p=(t,e)=>{var o={};for(var r in t)ie.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&Lt)for(var r of Lt(t))e.indexOf(r)<0&&se.call(t,r)&&(o[r]=t[r]);return o},le=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var g=le((L,D)=>{var ce=200,It="__lodash_hash_undefined__",ue=800,de=16,Ct=9007199254740991,Rt="[object Arguments]",pe="[object Array]",fe="[object AsyncFunction]",he="[object Boolean]",ye="[object Date]",ge="[object Error]",Et="[object Function]",me="[object GeneratorFunction]",Be="[object Map]",be="[object Number]",ve="[object Null]",Ot="[object Object]",Se="[object Proxy]",xe="[object RegExp]",_e="[object Set]",we="[object String]",De="[object Undefined]",Pe="[object WeakMap]",Te="[object ArrayBuffer]",ke="[object DataView]",Le="[object Float32Array]",Ie="[object Float64Array]",Ce="[object Int8Array]",Re="[object Int16Array]",Ee="[object Int32Array]",Oe="[object Uint8Array]",ze="[object Uint8ClampedArray]",Ne="[object Uint16Array]",Ae="[object Uint32Array]",Me=/[\\^$.*+?()[\]{}|]/g,je=/^\[object .+?Constructor\]$/,He=/^(?:0|[1-9]\d*)$/,d={};d[Le]=d[Ie]=d[Ce]=d[Re]=d[Ee]=d[Oe]=d[ze]=d[Ne]=d[Ae]=!0;d[Rt]=d[pe]=d[Te]=d[he]=d[ke]=d[ye]=d[ge]=d[Et]=d[Be]=d[be]=d[Ot]=d[xe]=d[_e]=d[we]=d[Pe]=!1;var zt=typeof global=="object"&&global&&global.Object===Object&&global,Fe=typeof self=="object"&&self&&self.Object===Object&&self,I=zt||Fe||Function("return this")(),Nt=typeof L=="object"&&L&&!L.nodeType&&L,C=Nt&&typeof D=="object"&&D&&!D.nodeType&&D,At=C&&C.exports===Nt,rt=At&&zt.process,Mt=function(){try{var t=C&&C.require&&C.require("util").types;return t||rt&&rt.binding&&rt.binding("util")}catch(e){}}(),jt=Mt&&Mt.isTypedArray;function We(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}function Ve(t,e){for(var o=-1,r=Array(t);++o<t;)r[o]=e(o);return r}function Ue(t){return function(e){return t(e)}}function qe(t,e){return t==null?void 0:t[e]}function Ge(t,e){return function(o){return t(e(o))}}var $e=Array.prototype,Ke=Function.prototype,z=Object.prototype,nt=I["__core-js_shared__"],N=Ke.toString,b=z.hasOwnProperty,Ht=function(){var t=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ft=z.toString,Xe=N.call(Object),Je=RegExp("^"+N.call(b).replace(Me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=At?I.Buffer:void 0,Wt=I.Symbol,Vt=I.Uint8Array,Ut=A?A.allocUnsafe:void 0,qt=Ge(Object.getPrototypeOf,Object),Gt=Object.create,Ye=z.propertyIsEnumerable,Ze=$e.splice,x=Wt?Wt.toStringTag:void 0,M=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Qe=A?A.isBuffer:void 0,$t=Math.max,to=Date.now,Kt=at(I,"Map"),R=at(Object,"create"),eo=function(){function t(){}return function(e){if(!_(e))return{};if(Gt)return Gt(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function w(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function oo(){this.__data__=R?R(null):{},this.size=0}function ro(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function no(t){var e=this.__data__;if(R){var o=e[t];return o===It?void 0:o}return b.call(e,t)?e[t]:void 0}function ao(t){var e=this.__data__;return R?e[t]!==void 0:b.call(e,t)}function io(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=R&&e===void 0?It:e,this}w.prototype.clear=oo;w.prototype.delete=ro;w.prototype.get=no;w.prototype.has=ao;w.prototype.set=io;function v(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function so(){this.__data__=[],this.size=0}function lo(t){var e=this.__data__,o=j(e,t);if(o<0)return!1;var r=e.length-1;return o==r?e.pop():Ze.call(e,o,1),--this.size,!0}function co(t){var e=this.__data__,o=j(e,t);return o<0?void 0:e[o][1]}function uo(t){return j(this.__data__,t)>-1}function po(t,e){var o=this.__data__,r=j(o,t);return r<0?(++this.size,o.push([t,e])):o[r][1]=e,this}v.prototype.clear=so;v.prototype.delete=lo;v.prototype.get=co;v.prototype.has=uo;v.prototype.set=po;function P(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function fo(){this.size=0,this.__data__={hash:new w,map:new(Kt||v),string:new w}}function ho(t){var e=H(this,t).delete(t);return this.size-=e?1:0,e}function yo(t){return H(this,t).get(t)}function go(t){return H(this,t).has(t)}function mo(t,e){var o=H(this,t),r=o.size;return o.set(t,e),this.size+=o.size==r?0:1,this}P.prototype.clear=fo;P.prototype.delete=ho;P.prototype.get=yo;P.prototype.has=go;P.prototype.set=mo;function T(t){var e=this.__data__=new v(t);this.size=e.size}function Bo(){this.__data__=new v,this.size=0}function bo(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function vo(t){return this.__data__.get(t)}function So(t){return this.__data__.has(t)}function xo(t,e){var o=this.__data__;if(o instanceof v){var r=o.__data__;if(!Kt||r.length<ce-1)return r.push([t,e]),this.size=++o.size,this;o=this.__data__=new P(r)}return o.set(t,e),this.size=o.size,this}T.prototype.clear=Bo;T.prototype.delete=bo;T.prototype.get=vo;T.prototype.has=So;T.prototype.set=xo;function _o(t,e){var o=st(t),r=!o&&it(t),n=!o&&!r&&Jt(t),a=!o&&!r&&!n&&Yt(t),c=o||r||n||a,s=c?Ve(t.length,String):[],u=s.length;for(var f in t)(e||b.call(t,f))&&!(c&&(f=="length"||n&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Xt(f,u)))&&s.push(f);return s}function ct(t,e,o){(o!==void 0&&!F(t[e],o)||o===void 0&&!(e in t))&&lt(t,e,o)}function wo(t,e,o){var r=t[e];(!(b.call(t,e)&&F(r,o))||o===void 0&&!(e in t))&&lt(t,e,o)}function j(t,e){for(var o=t.length;o--;)if(F(t[o][0],e))return o;return-1}function lt(t,e,o){e=="__proto__"&&M?M(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var Po=Do();function W(t){return t==null?t===void 0?De:ve:x&&x in Object(t)?To(t):ko(t)}function Zt(t){return E(t)&&W(t)==Rt}function Co(t){if(!_(t)||Lo(t))return!1;var e=ut(t)?Je:je;return e.test(Io(t))}function Ro(t){return E(t)&&Qt(t.length)&&!!d[W(t)]}function Oo(t){if(!_(t))return Eo(t);var e=te(t),o=[];for(var r in t)r=="constructor"&&(e||!b.call(t,r))||o.push(r);return o}function ee(t,e,o,r,n){t!==e&&Po(e,function(a,c){if(n||(n=new T),_(a))zo(t,e,c,o,ee,r,n);else{var s=r?r(dt(t,c),a,c+"",t,e,n):void 0;s===void 0&&(s=a),ct(t,c,s)}},oe)}function zo(t,e,o,r,n,a,c){var s=dt(t,o),u=dt(e,o),f=c.get(u);if(f){ct(t,o,f);return}var y=a?a(s,u,o+"",t,e,c):void 0,S=y===void 0;if(S){var B=st(u),k=!B&&Jt(u),O=!B&&!k&&Yt(u);y=u,B||k||O?st(s)?y=s:Ho(s)?y=Mo(s):k?(S=!1,y=No(u,!0)):O?(S=!1,y=Ao(u,!0)):y=[]:Fo(u)||it(u)?(y=s,it(s)?y=Wo(s):(!_(s)||ut(s))&&(y=jo(u))):S=!1}S&&(c.set(u,y),n(y,u,r,a,c),c.delete(u)),ct(t,o,y)}function qo(t,e){return Uo(Vo(t,e,re),t+"")}var $o=M?function(t,e){return M(t,"toString",{configurable:!0,enumerable:!1,value:Go(e),writable:!0})}:re;function No(t,e){if(e)return t.slice();var o=t.length,r=Ut?Ut(o):new t.constructor(o);return t.copy(r),r}function Ko(t){var e=new t.constructor(t.byteLength);return new Vt(e).set(new Vt(t)),e}function Ao(t,e){var o=e?Ko(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function Mo(t,e){var o=-1,r=t.length;for(e||(e=Array(r));++o<r;)e[o]=t[o];return e}function Xo(t,e,o,r){var n=!o;o||(o={});for(var a=-1,c=e.length;++a<c;){var s=e[a],u=r?r(o[s],t[s],s,o,t):void 0;u===void 0&&(u=t[s]),n?lt(o,s,u):wo(o,s,u)}return o}function Yo(t){return qo(function(e,o){var r=-1,n=o.length,a=n>1?o[n-1]:void 0,c=n>2?o[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,c&&Jo(o[0],o[1],c)&&(a=n<3?void 0:a,n=1),e=Object(e);++r<n;){var s=o[r];s&&t(e,s,r,a)}return e})}function Do(t){return function(e,o,r){for(var n=-1,a=Object(e),c=r(e),s=c.length;s--;){var u=c[t?s:++n];if(o(a[u],u,a)===!1)break}return e}}function H(t,e){var o=t.__data__;return Zo(e)?o[typeof e=="string"?"string":"hash"]:o.map}function at(t,e){var o=qe(t,e);return Co(o)?o:void 0}function To(t){var e=b.call(t,x),o=t[x];try{t[x]=void 0;var r=!0}catch(a){}var n=Ft.call(t);return r&&(e?t[x]=o:delete t[x]),n}function jo(t){return typeof t.constructor=="function"&&!te(t)?eo(qt(t)):{}}function Xt(t,e){var o=typeof t;return e=e==null?Ct:e,!!e&&(o=="number"||o!="symbol"&&He.test(t))&&t>-1&&t%1==0&&t<e}function Jo(t,e,o){if(!_(o))return!1;var r=typeof e;return(r=="number"?pt(o)&&Xt(e,o.length):r=="string"&&e in o)?F(o[e],t):!1}function Zo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Lo(t){return!!Ht&&Ht in t}function te(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||z;return t===o}function Eo(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}function ko(t){return Ft.call(t)}function Vo(t,e,o){return e=$t(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,a=$t(r.length-e,0),c=Array(a);++n<a;)c[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o(c),We(t,this,s)}}function dt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Uo=Qo($o);function Qo(t){var e=0,o=0;return function(){var r=to(),n=de-(r-o);if(o=r,n>0){if(++e>=ue)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Io(t){if(t!=null){try{return N.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function F(t,e){return t===e||t!==t&&e!==e}var it=Zt(function(){return arguments}())?Zt:function(t){return E(t)&&b.call(t,"callee")&&!Ye.call(t,"callee")},st=Array.isArray;function pt(t){return t!=null&&Qt(t.length)&&!ut(t)}function Ho(t){return E(t)&&pt(t)}var Jt=Qe||tr;function ut(t){if(!_(t))return!1;var e=W(t);return e==Et||e==me||e==fe||e==Se}function Qt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ct}function _(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function E(t){return t!=null&&typeof t=="object"}function Fo(t){if(!E(t)||W(t)!=Ot)return!1;var e=qt(t);if(e===null)return!0;var o=b.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&N.call(o)==Xe}var Yt=jt?Ue(jt):Ro;function Wo(t){return Xo(t,oe(t))}function oe(t){return pt(t)?_o(t,!0):Oo(t)}var er=Yo(function(t,e,o){ee(t,e,o)});function Go(t){return function(){return t}}function re(t){return t}function tr(){return!1}D.exports=er});import{Children as wt,Fragment as ne,createElement as m,forwardRef as Sn,isValidElement as xn,useMemo as _n,useState as wn}from"react";import{Box as Dt}from"@twilio-paste/box";import{Stack as Dn}from"@twilio-paste/stack";import{Spinner as Pn}from"@twilio-paste/spinner";import{secureExternalLink as Tn}from"@twilio-paste/anchor";import{useSpring as kn,animated as Ln}from"@twilio-paste/animation-library";import{ArrowForwardIcon as In}from"@twilio-paste/icons/esm/ArrowForwardIcon";import{LinkExternalIcon as Cn}from"@twilio-paste/icons/esm/LinkExternalIcon";import{createElement as or,forwardRef as rr}from"react";import{Box as nr,safelySpreadBoxProps as ar}from"@twilio-paste/box";var ft=g(),ht={appearance:"none",background:"none",display:"inline-block",border:"none",outline:"none",transition:"background-color 100ms ease-in, box-shadow 100ms ease-in, color 100ms ease-in",fontFamily:"fontFamilyText",fontWeight:"fontWeightSemibold",textDecoration:"none",position:"relative",_hover:{textDecoration:"none"},_focus:{textDecoration:"none",boxShadow:"shadowFocus"},_active:{textDecoration:"none"}},l={default:ft({},ht,{cursor:"pointer",_active:{boxShadow:"none"}}),disabled:ft({},ht,{cursor:"not-allowed"}),loading:ft({},ht,{cursor:"wait"})},h={default:{paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",borderRadius:"borderRadius20",fontSize:"fontSize30",lineHeight:"lineHeight20"},small:{paddingTop:"space20",paddingBottom:"space20",paddingLeft:"space30",paddingRight:"space30",borderRadius:"borderRadius10",fontSize:"fontSize30",lineHeight:"lineHeight20"},icon:{padding:"space30",borderRadius:"borderRadius20"},icon_small:{padding:"space20",borderRadius:"borderRadius20"},reset:{paddingTop:"space0",paddingRight:"space0",paddingBottom:"space0",paddingLeft:"space0",borderWidth:"borderWidth0"}};var yt=g(),ir=yt({},l.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimary",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDark",boxShadow:"shadowBorderPrimaryDarker"}}),sr=yt({},l.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"}),lr=yt({},l.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryLight",boxShadow:"shadowBorderPrimaryLight"}),cr={default:ir,loading:sr,disabled:lr},V=rr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return or(nr,i(i(i({ref:n,width:o?"100%":"auto"},ar(r)),cr[e]),h[t]))});V.defaultProps={as:"button"};V.displayName="PrimaryButton";import{createElement as ur,forwardRef as dr}from"react";import{Box as pr,safelySpreadBoxProps as fr}from"@twilio-paste/box";var gt=g(),hr=gt({},l.default,{color:"colorTextLink",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryDarker"}}),U={color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryLighter"},yr=gt({},l.loading,i(i({},U),{_hover:U,_active:U,_focus:U})),q={color:"colorTextLinkLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimaryLight"},gr=gt({},l.disabled,i(i({},q),{_hover:q,_active:q,_focus:q})),mr={default:hr,loading:yr,disabled:gr},G=dr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return ur(pr,i(i(i({ref:n,width:o?"100%":"auto"},fr(r)),mr[e]),h[t]))});G.defaultProps={as:"button"};G.displayName="SecondaryButton";import{createElement as Br,forwardRef as br}from"react";import{Box as vr,safelySpreadBoxProps as Sr}from"@twilio-paste/box";var mt=g(),xr=mt({},l.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructive",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDark",boxShadow:"shadowBorderDestructiveDarker"}}),_r=mt({},l.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"}),wr=mt({},l.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveLight",boxShadow:"shadowBorderDestructiveLight"}),Dr={default:xr,loading:_r,disabled:wr},$=br((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Br(vr,i(i(i({ref:n,width:o?"100%":"auto"},Sr(r)),Dr[e]),h[t]))});$.defaultProps={as:"button"};$.displayName="DestructiveButton";import{createElement as Pr,forwardRef as Tr}from"react";import{Box as kr,safelySpreadBoxProps as Lr}from"@twilio-paste/box";var Bt=g(),Ir=Bt({},l.default,{color:"colorTextLinkDestructive",transition:"none",_hover:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"},_active:{color:"colorTextLinkDestructiveDarker",textDecoration:"underline"},_focus:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"}}),Cr=Bt({},l.loading,{color:"colorTextLinkDestructiveDarker",_hover:{color:"colorTextLinkDestructiveDarker"},_active:{color:"colorTextLinkDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker"}}),Rr=Bt({},l.disabled,{color:"colorTextLinkDestructiveLight",_hover:{color:"colorTextLinkDestructiveLight"},_active:{color:"colorTextLinkDestructiveLight"},_focus:{color:"colorTextLinkDestructiveLight"}}),Er={default:Ir,loading:Cr,disabled:Rr},K=Tr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Pr(kr,i(i(i({ref:n,width:o?"100%":"auto"},Lr(r)),Er[e]),h[t]))});K.defaultProps={as:"a"};K.displayName="DestructiveLinkButton";import{createElement as Or,forwardRef as zr}from"react";import{Box as Nr,safelySpreadBoxProps as Ar}from"@twilio-paste/box";var bt=g(),Mr=bt({},l.default,{color:"colorTextLinkDestructive",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveDarker"}}),X={color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveLighter"},jr=bt({},l.loading,i(i({},X),{_hover:X,_active:X,_focus:X})),J={color:"colorTextLinkDestructiveLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructiveLight"},Hr=bt({},l.disabled,i(i({},J),{_hover:J,_active:J,_focus:J})),Fr={default:Mr,loading:jr,disabled:Hr},Y=zr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Or(Nr,i(i(i({ref:n,width:o?"100%":"auto"},Ar(r)),Fr[e]),h[t]))});Y.defaultProps={as:"button"};Y.displayName="DestructiveSecondaryButton";import{createElement as Wr,forwardRef as Vr}from"react";import{Box as Ur,safelySpreadBoxProps as qr}from"@twilio-paste/box";var vt=g(),Gr=vt({},l.default,{color:"colorTextLink",transition:"none",_hover:{color:"colorTextLinkDark",textDecoration:"underline"},_focus:{color:"colorTextLinkDark",textDecoration:"underline"},_active:{color:"colorTextLinkDarker",textDecoration:"underline"}}),$r=vt({},l.loading,{color:"colorTextLinkDarker"}),Kr=vt({},l.disabled,{color:"colorTextLinkLight"}),Xr={default:Gr,loading:$r,disabled:Kr},Z=Vr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Wr(Ur,i(i(i({ref:n,width:o?"100%":"auto"},qr(r)),Xr[e]),h[t]))});Z.defaultProps={as:"a"};Z.displayName="LinkButton";import{createElement as Jr,forwardRef as Yr}from"react";import{Box as Zr,safelySpreadBoxProps as Qr}from"@twilio-paste/box";var St=g(),tn=St({},l.default,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverse",_hover:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLighter"},_focus:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowFocusInverse"},_active:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLightest"}}),en=St({},l.loading,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseDarker"}),on=St({},l.disabled,{color:"colorTextInverseWeaker",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverseDarker"}),rn={default:tn,loading:en,disabled:on},Q=Yr((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return Jr(Zr,i(i(i({ref:n,width:o?"100%":"auto"},Qr(r)),rn[e]),h[t]))});Q.defaultProps={as:"button"};Q.displayName="InverseButton";import{createElement as nn,forwardRef as an}from"react";import{Box as sn,safelySpreadBoxProps as ln}from"@twilio-paste/box";var xt=g(),cn=xt({},l.default,{color:"colorTextInverse",transition:"none",_hover:{color:"colorTextInverseWeaker",textDecoration:"underline"},_focus:{color:"colorTextInverseWeaker",boxShadow:"shadowFocusInverse",textDecoration:"underline"},_active:{textDecoration:"underline"}}),un=xt({},l.loading,{color:"colorTextInverse"}),dn=xt({},l.disabled,{color:"colorTextInverseWeaker"}),pn={default:cn,loading:un,disabled:dn},tt=an((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return nn(sn,i(i(i({ref:n,width:o?"100%":"auto"},ln(r)),pn[e]),h[t]))});tt.defaultProps={as:"a"};tt.displayName="InverseLinkButton";import{createElement as fn,forwardRef as hn}from"react";import{Box as yn,safelySpreadBoxProps as gn}from"@twilio-paste/box";var _t=g(),mn=_t({},l.default,{fontSize:"inherit",fontWeight:"inherit",color:"inherit"}),Bn=_t({},l.loading,{fontSize:"inherit",fontWeight:"inherit"}),bn=_t({},l.disabled,{fontSize:"inherit",fontWeight:"inherit"}),vn={default:mn,loading:Bn,disabled:bn},et=hn((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=p(a,["size","buttonState","fullWidth"]);return fn(yn,i(i(i({ref:n,width:o?"100%":"auto"},gn(r)),vn[e]),h[t]))});et.defaultProps={as:"button"};et.displayName="ResetButton";var Rn=Ln(Dt),En=(t,e,o)=>{let r="default";return o!=null?r=o:t==="link"||t==="destructive_link"||t==="reset"?r="reset":wt.count(e)===1&&wt.forEach(e,n=>{xn(n)&&typeof n.type.displayName=="string"&&n.type.displayName.includes("Icon")&&(r="icon")}),r},On=(t,e)=>t?"disabled":e?"loading":"default",zn=({as:t,href:e,tabIndex:o,variant:r,size:n,fullWidth:a,children:c,disabled:s,loading:u})=>{let f=e!=null&&e!=="",y=o!=null;if(t!=="a"&&f)throw new Error(`[Paste: Button] You cannot pass href into a button without the 'a' tag. Use 'as="a"'.`);if(t==="a"){if(!f)throw new Error("[Paste: Button] Missing href prop for link button.");if(r==="link"||r==="inverse_link")throw new Error("[Paste: Button] Using Button component as an Anchor. Use the Paste Anchor component instead.");if(r!=="primary"&&r!=="secondary"&&r!=="reset")throw new Error('[Paste: Button] <Button as="a"> only works with the following variants: primary or secondary.');if(s||u)throw new Error('[Paste: Button] <Button as="a"> cannot be disabled or loading.')}if(r==="reset"&&n!=="reset")throw new Error('[Paste: Button] The "RESET" variant can only be used with the "RESET" size.');if((n==="icon"||n==="icon_small")&&a)throw new Error("[Paste: Button] Icon buttons should not be fullWidth.");if(c==null)throw new Error("[Paste: Button] Must have non-null children.");if(y&&!(o===0||o===-1))throw new Error("[Paste: Button] tabIndex must be 0 or -1.")},Nn=({buttonState:t,children:e,showLoading:o,variant:r})=>m(ne,null,m(Dt,{as:"span",display:"flex",textDecoration:"inherit",opacity:t==="loading"?"0":"1","aria-hidden":t==="loading"?"true":"false",justifyContent:r==="reset"?null:"center"},wt.count(e)>1?m(Dn,{as:"span",orientation:"horizontal",spacing:"space20"},e):e),o?m(Dt,{as:"span",position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"lineHeight30"},m(Pn,{decorative:!1,title:"Loading, please wait.",delay:0})):null),An=t=>{switch(t){case"secondary":return G;case"destructive":return $;case"destructive_secondary":return Y;case"link":return Z;case"destructive_link":return K;case"reset":return et;case"inverse":return Q;case"inverse_link":return tt;case"primary":default:return V}},Pt=Sn((t,e)=>{let{size:o,variant:r,children:n,disabled:a,loading:c}=t,s=p(t,["size","variant","children","disabled","loading"]),[u,f]=wn(!1),y=kn({translateX:u?"4px":"0px",config:{mass:.1,tension:275,friction:16}}),S=_n(()=>En(r,n,o),[o,r,n]);zn(i(i({},t),{size:S}));let B=On(a,c),k=B==="loading",O=B!=="default",ae=An(r),Tt=t.href!=null?Tn(t.href):null,kt=n;return t.as==="a"&&t.href!=null&&typeof n=="string"&&r!=="reset"&&(kt=m(ne,null,n,Tt!=null?m(Cn,{decorative:!1,title:"link takes you to an external page"}):m(Rn,{style:y},m(In,{decorative:!0})))),m(ae,i(i(i({},Tt),s),{onMouseEnter:ot=>{typeof s.onMouseEnter=="function"&&s.onMouseEnter(ot),f(!0)},onMouseLeave:ot=>{typeof s.onMouseLeave=="function"&&s.onMouseLeave(ot),f(!1)},buttonState:B,disabled:O,size:S,"aria-busy":B==="loading"?"true":"false",className:void 0,style:void 0,ref:e}),m(Nn,{buttonState:B,showLoading:k,variant:r},kt))});Pt.defaultProps={as:"button",fullWidth:!1,disabled:!1,loading:!1,type:"button",variant:"primary"};Pt.displayName="Button";export{Pt as Button};

@@ -1,1 +0,1 @@

var Ie=Object.create,N=Object.defineProperty,Ce=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty,Re=Object.getOwnPropertyNames,Ee=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertySymbols,Oe=Object.prototype.propertyIsEnumerable;var i=Object.assign,Xt=t=>N(t,"__esModule",{value:!0});var h=(t,e)=>{var o={};for(var r in t)$t.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&Kt)for(var r of Kt(t))e.indexOf(r)<0&&Oe.call(t,r)&&(o[r]=t[r]);return o},ze=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Ne=(t,e)=>{Xt(t);for(var o in e)N(t,o,{get:e[o],enumerable:!0})},Ae=(t,e,o)=>{if(Xt(t),e&&typeof e=="object"||typeof e=="function")for(let r of Re(e))!$t.call(t,r)&&r!=="default"&&N(t,r,{get:()=>e[r],enumerable:!(o=Ee(e,r))||o.enumerable});return t},p=t=>t&&t.__esModule?t:Ae(N(t!=null?Ie(Ce(t)):{},"default",{value:t,enumerable:!0}),t);var m=ze((I,P)=>{var Me=200,Jt="__lodash_hash_undefined__",je=800,He=16,Yt=9007199254740991,Zt="[object Arguments]",Fe="[object Array]",We="[object AsyncFunction]",Ve="[object Boolean]",Ue="[object Date]",qe="[object Error]",Qt="[object Function]",Ge="[object GeneratorFunction]",$e="[object Map]",Ke="[object Number]",Xe="[object Null]",te="[object Object]",Je="[object Proxy]",Ye="[object RegExp]",Ze="[object Set]",Qe="[object String]",to="[object Undefined]",eo="[object WeakMap]",oo="[object ArrayBuffer]",ro="[object DataView]",no="[object Float32Array]",ao="[object Float64Array]",io="[object Int8Array]",so="[object Int16Array]",co="[object Int32Array]",lo="[object Uint8Array]",uo="[object Uint8ClampedArray]",po="[object Uint16Array]",fo="[object Uint32Array]",ho=/[\\^$.*+?()[\]{}|]/g,yo=/^\[object .+?Constructor\]$/,go=/^(?:0|[1-9]\d*)$/,f={};f[no]=f[ao]=f[io]=f[so]=f[co]=f[lo]=f[uo]=f[po]=f[fo]=!0;f[Zt]=f[Fe]=f[oo]=f[Ve]=f[ro]=f[Ue]=f[qe]=f[Qt]=f[$e]=f[Ke]=f[te]=f[Ye]=f[Ze]=f[Qe]=f[eo]=!1;var ee=typeof global=="object"&&global&&global.Object===Object&&global,Bo=typeof self=="object"&&self&&self.Object===Object&&self,C=ee||Bo||Function("return this")(),oe=typeof I=="object"&&I&&!I.nodeType&&I,R=oe&&typeof P=="object"&&P&&!P.nodeType&&P,re=R&&R.exports===oe,Dt=re&&ee.process,ne=function(){try{var t=R&&R.require&&R.require("util").types;return t||Dt&&Dt.binding&&Dt.binding("util")}catch(e){}}(),ae=ne&&ne.isTypedArray;function mo(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}function bo(t,e){for(var o=-1,r=Array(t);++o<t;)r[o]=e(o);return r}function So(t){return function(e){return t(e)}}function vo(t,e){return t==null?void 0:t[e]}function xo(t,e){return function(o){return t(e(o))}}var _o=Array.prototype,wo=Function.prototype,A=Object.prototype,Pt=C["__core-js_shared__"],M=wo.toString,S=A.hasOwnProperty,ie=function(){var t=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),se=A.toString,Do=M.call(Object),Po=RegExp("^"+M.call(S).replace(ho,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=re?C.Buffer:void 0,ce=C.Symbol,le=C.Uint8Array,ue=j?j.allocUnsafe:void 0,de=xo(Object.getPrototypeOf,Object),pe=Object.create,To=A.propertyIsEnumerable,ko=_o.splice,_=ce?ce.toStringTag:void 0,H=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Lo=j?j.isBuffer:void 0,fe=Math.max,Io=Date.now,he=Tt(C,"Map"),E=Tt(Object,"create"),Co=function(){function t(){}return function(e){if(!w(e))return{};if(pe)return pe(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function D(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function Ro(){this.__data__=E?E(null):{},this.size=0}function Eo(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Oo(t){var e=this.__data__;if(E){var o=e[t];return o===Jt?void 0:o}return S.call(e,t)?e[t]:void 0}function zo(t){var e=this.__data__;return E?e[t]!==void 0:S.call(e,t)}function No(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=E&&e===void 0?Jt:e,this}D.prototype.clear=Ro;D.prototype.delete=Eo;D.prototype.get=Oo;D.prototype.has=zo;D.prototype.set=No;function v(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function Ao(){this.__data__=[],this.size=0}function Mo(t){var e=this.__data__,o=F(e,t);if(o<0)return!1;var r=e.length-1;return o==r?e.pop():ko.call(e,o,1),--this.size,!0}function jo(t){var e=this.__data__,o=F(e,t);return o<0?void 0:e[o][1]}function Ho(t){return F(this.__data__,t)>-1}function Fo(t,e){var o=this.__data__,r=F(o,t);return r<0?(++this.size,o.push([t,e])):o[r][1]=e,this}v.prototype.clear=Ao;v.prototype.delete=Mo;v.prototype.get=jo;v.prototype.has=Ho;v.prototype.set=Fo;function T(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function Wo(){this.size=0,this.__data__={hash:new D,map:new(he||v),string:new D}}function Vo(t){var e=W(this,t).delete(t);return this.size-=e?1:0,e}function Uo(t){return W(this,t).get(t)}function qo(t){return W(this,t).has(t)}function Go(t,e){var o=W(this,t),r=o.size;return o.set(t,e),this.size+=o.size==r?0:1,this}T.prototype.clear=Wo;T.prototype.delete=Vo;T.prototype.get=Uo;T.prototype.has=qo;T.prototype.set=Go;function k(t){var e=this.__data__=new v(t);this.size=e.size}function $o(){this.__data__=new v,this.size=0}function Ko(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function Xo(t){return this.__data__.get(t)}function Jo(t){return this.__data__.has(t)}function Yo(t,e){var o=this.__data__;if(o instanceof v){var r=o.__data__;if(!he||r.length<Me-1)return r.push([t,e]),this.size=++o.size,this;o=this.__data__=new T(r)}return o.set(t,e),this.size=o.size,this}k.prototype.clear=$o;k.prototype.delete=Ko;k.prototype.get=Xo;k.prototype.has=Jo;k.prototype.set=Yo;function Zo(t,e){var o=Lt(t),r=!o&&kt(t),n=!o&&!r&&ge(t),a=!o&&!r&&!n&&Be(t),l=o||r||n||a,s=l?bo(t.length,String):[],u=s.length;for(var y in t)(e||S.call(t,y))&&!(l&&(y=="length"||n&&(y=="offset"||y=="parent")||a&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||ye(y,u)))&&s.push(y);return s}function Ct(t,e,o){(o!==void 0&&!V(t[e],o)||o===void 0&&!(e in t))&&It(t,e,o)}function Qo(t,e,o){var r=t[e];(!(S.call(t,e)&&V(r,o))||o===void 0&&!(e in t))&&It(t,e,o)}function F(t,e){for(var o=t.length;o--;)if(V(t[o][0],e))return o;return-1}function It(t,e,o){e=="__proto__"&&H?H(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var er=tr();function U(t){return t==null?t===void 0?to:Xe:_&&_ in Object(t)?or(t):rr(t)}function me(t){return O(t)&&U(t)==Zt}function ir(t){if(!w(t)||nr(t))return!1;var e=Rt(t)?Po:yo;return e.test(ar(t))}function sr(t){return O(t)&&be(t.length)&&!!f[U(t)]}function lr(t){if(!w(t))return cr(t);var e=Se(t),o=[];for(var r in t)r=="constructor"&&(e||!S.call(t,r))||o.push(r);return o}function ve(t,e,o,r,n){t!==e&&er(e,function(a,l){if(n||(n=new k),w(a))ur(t,e,l,o,ve,r,n);else{var s=r?r(Et(t,l),a,l+"",t,e,n):void 0;s===void 0&&(s=a),Ct(t,l,s)}},xe)}function ur(t,e,o,r,n,a,l){var s=Et(t,o),u=Et(e,o),y=l.get(u);if(y){Ct(t,o,y);return}var B=a?a(s,u,o+"",t,e,l):void 0,x=B===void 0;if(x){var b=Lt(u),L=!b&&ge(u),z=!b&&!L&&Be(u);B=u,b||L||z?Lt(s)?B=s:yr(s)?B=fr(s):L?(x=!1,B=dr(u,!0)):z?(x=!1,B=pr(u,!0)):B=[]:gr(u)||kt(u)?(B=s,kt(s)?B=Br(s):(!w(s)||Rt(s))&&(B=hr(u))):x=!1}x&&(l.set(u,B),n(B,u,r,a,l),l.delete(u)),Ct(t,o,B)}function Sr(t,e){return br(mr(t,e,_e),t+"")}var xr=H?function(t,e){return H(t,"toString",{configurable:!0,enumerable:!1,value:vr(e),writable:!0})}:_e;function dr(t,e){if(e)return t.slice();var o=t.length,r=ue?ue(o):new t.constructor(o);return t.copy(r),r}function _r(t){var e=new t.constructor(t.byteLength);return new le(e).set(new le(t)),e}function pr(t,e){var o=e?_r(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function fr(t,e){var o=-1,r=t.length;for(e||(e=Array(r));++o<r;)e[o]=t[o];return e}function wr(t,e,o,r){var n=!o;o||(o={});for(var a=-1,l=e.length;++a<l;){var s=e[a],u=r?r(o[s],t[s],s,o,t):void 0;u===void 0&&(u=t[s]),n?It(o,s,u):Qo(o,s,u)}return o}function Pr(t){return Sr(function(e,o){var r=-1,n=o.length,a=n>1?o[n-1]:void 0,l=n>2?o[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,l&&Dr(o[0],o[1],l)&&(a=n<3?void 0:a,n=1),e=Object(e);++r<n;){var s=o[r];s&&t(e,s,r,a)}return e})}function tr(t){return function(e,o,r){for(var n=-1,a=Object(e),l=r(e),s=l.length;s--;){var u=l[t?s:++n];if(o(a[u],u,a)===!1)break}return e}}function W(t,e){var o=t.__data__;return Tr(e)?o[typeof e=="string"?"string":"hash"]:o.map}function Tt(t,e){var o=vo(t,e);return ir(o)?o:void 0}function or(t){var e=S.call(t,_),o=t[_];try{t[_]=void 0;var r=!0}catch(a){}var n=se.call(t);return r&&(e?t[_]=o:delete t[_]),n}function hr(t){return typeof t.constructor=="function"&&!Se(t)?Co(de(t)):{}}function ye(t,e){var o=typeof t;return e=e==null?Yt:e,!!e&&(o=="number"||o!="symbol"&&go.test(t))&&t>-1&&t%1==0&&t<e}function Dr(t,e,o){if(!w(o))return!1;var r=typeof e;return(r=="number"?Ot(o)&&ye(e,o.length):r=="string"&&e in o)?V(o[e],t):!1}function Tr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function nr(t){return!!ie&&ie in t}function Se(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||A;return t===o}function cr(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}function rr(t){return se.call(t)}function mr(t,e,o){return e=fe(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,a=fe(r.length-e,0),l=Array(a);++n<a;)l[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o(l),mo(t,this,s)}}function Et(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var br=kr(xr);function kr(t){var e=0,o=0;return function(){var r=Io(),n=He-(r-o);if(o=r,n>0){if(++e>=je)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ar(t){if(t!=null){try{return M.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function V(t,e){return t===e||t!==t&&e!==e}var kt=me(function(){return arguments}())?me:function(t){return O(t)&&S.call(t,"callee")&&!To.call(t,"callee")},Lt=Array.isArray;function Ot(t){return t!=null&&be(t.length)&&!Rt(t)}function yr(t){return O(t)&&Ot(t)}var ge=Lo||Lr;function Rt(t){if(!w(t))return!1;var e=U(t);return e==Qt||e==Ge||e==We||e==Je}function be(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yt}function w(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function O(t){return t!=null&&typeof t=="object"}function gr(t){if(!O(t)||U(t)!=te)return!1;var e=de(t);if(e===null)return!0;var o=S.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&M.call(o)==Do}var Be=ae?So(ae):sr;function Br(t){return wr(t,xe(t))}function xe(t){return Ot(t)?Zo(t,!0):lr(t)}var Ir=Pr(function(t,e,o){ve(t,e,o)});function vr(t){return function(){return t}}function _e(t){return t}function Lr(){return!1}P.exports=Ir});Ne(exports,{Button:()=>Gt});var d=p(require("react")),xt=p(require("@twilio-paste/box")),we=p(require("@twilio-paste/stack")),De=p(require("@twilio-paste/spinner")),Pe=p(require("@twilio-paste/anchor")),_t=p(require("@twilio-paste/animation-library")),Te=p(require("@twilio-paste/icons/cjs/ArrowForwardIcon"));var q=p(require("react")),G=p(require("@twilio-paste/box"));var zt=m(),Nt={appearance:"none",background:"none",display:"inline-block",border:"none",outline:"none",transition:"background-color 100ms ease-in, box-shadow 100ms ease-in, color 100ms ease-in",fontFamily:"fontFamilyText",fontWeight:"fontWeightSemibold",textDecoration:"none",position:"relative",_hover:{textDecoration:"none"},_focus:{textDecoration:"none",boxShadow:"shadowFocus"},_active:{textDecoration:"none"}},c={default:zt({},Nt,{cursor:"pointer",_active:{boxShadow:"none"}}),disabled:zt({},Nt,{cursor:"not-allowed"}),loading:zt({},Nt,{cursor:"wait"})},g={default:{paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",borderRadius:"borderRadius20",fontSize:"fontSize30",lineHeight:"lineHeight20"},small:{paddingTop:"space20",paddingBottom:"space20",paddingLeft:"space30",paddingRight:"space30",borderRadius:"borderRadius10",fontSize:"fontSize30",lineHeight:"lineHeight20"},icon:{padding:"space30",borderRadius:"borderRadius20"},icon_small:{padding:"space20",borderRadius:"borderRadius20"},reset:{paddingTop:"space0",paddingRight:"space0",paddingBottom:"space0",paddingLeft:"space0",borderWidth:"borderWidth0"}};var At=m(),Cr=At({},c.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimary",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDark",boxShadow:"shadowBorderPrimaryDarker"}}),Rr=At({},c.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"}),Er=At({},c.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryLight",boxShadow:"shadowBorderPrimaryLight"}),Or={default:Cr,loading:Rr,disabled:Er},$=q.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return q.createElement(G.Box,i(i(i({ref:n,width:o?"100%":"auto"},G.safelySpreadBoxProps(r)),Or[e]),g[t]))});$.defaultProps={as:"button"};$.displayName="PrimaryButton";var K=p(require("react")),X=p(require("@twilio-paste/box"));var Mt=m(),zr=Mt({},c.default,{color:"colorTextLink",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryDarker"}}),J={color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryLighter"},Nr=Mt({},c.loading,i(i({},J),{_hover:J,_active:J,_focus:J})),Y={color:"colorTextLinkLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimaryLight"},Ar=Mt({},c.disabled,i(i({},Y),{_hover:Y,_active:Y,_focus:Y})),Mr={default:zr,loading:Nr,disabled:Ar},Z=K.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return K.createElement(X.Box,i(i(i({ref:n,width:o?"100%":"auto"},X.safelySpreadBoxProps(r)),Mr[e]),g[t]))});Z.defaultProps={as:"button"};Z.displayName="SecondaryButton";var Q=p(require("react")),tt=p(require("@twilio-paste/box"));var jt=m(),jr=jt({},c.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructive",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDark",boxShadow:"shadowBorderDestructiveDarker"}}),Hr=jt({},c.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"}),Fr=jt({},c.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveLight",boxShadow:"shadowBorderDestructiveLight"}),Wr={default:jr,loading:Hr,disabled:Fr},et=Q.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return Q.createElement(tt.Box,i(i(i({ref:n,width:o?"100%":"auto"},tt.safelySpreadBoxProps(r)),Wr[e]),g[t]))});et.defaultProps={as:"button"};et.displayName="DestructiveButton";var ot=p(require("react")),rt=p(require("@twilio-paste/box"));var Ht=m(),Vr=Ht({},c.default,{color:"colorTextLinkDestructive",transition:"none",_hover:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"},_active:{color:"colorTextLinkDestructiveDarker",textDecoration:"underline"},_focus:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"}}),Ur=Ht({},c.loading,{color:"colorTextLinkDestructiveDarker",_hover:{color:"colorTextLinkDestructiveDarker"},_active:{color:"colorTextLinkDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker"}}),qr=Ht({},c.disabled,{color:"colorTextLinkDestructiveLight",_hover:{color:"colorTextLinkDestructiveLight"},_active:{color:"colorTextLinkDestructiveLight"},_focus:{color:"colorTextLinkDestructiveLight"}}),Gr={default:Vr,loading:Ur,disabled:qr},nt=ot.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ot.createElement(rt.Box,i(i(i({ref:n,width:o?"100%":"auto"},rt.safelySpreadBoxProps(r)),Gr[e]),g[t]))});nt.defaultProps={as:"a"};nt.displayName="DestructiveLinkButton";var at=p(require("react")),it=p(require("@twilio-paste/box"));var Ft=m(),$r=Ft({},c.default,{color:"colorTextLinkDestructive",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveDarker"}}),st={color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveLighter"},Kr=Ft({},c.loading,i(i({},st),{_hover:st,_active:st,_focus:st})),ct={color:"colorTextLinkDestructiveLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructiveLight"},Xr=Ft({},c.disabled,i(i({},ct),{_hover:ct,_active:ct,_focus:ct})),Jr={default:$r,loading:Kr,disabled:Xr},lt=at.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return at.createElement(it.Box,i(i(i({ref:n,width:o?"100%":"auto"},it.safelySpreadBoxProps(r)),Jr[e]),g[t]))});lt.defaultProps={as:"button"};lt.displayName="DestructiveSecondaryButton";var ut=p(require("react")),dt=p(require("@twilio-paste/box"));var Wt=m(),Yr=Wt({},c.default,{color:"colorTextLink",transition:"none",_hover:{color:"colorTextLinkDark",textDecoration:"underline"},_focus:{color:"colorTextLinkDark",textDecoration:"underline"},_active:{color:"colorTextLinkDarker",textDecoration:"underline"}}),Zr=Wt({},c.loading,{color:"colorTextLinkDarker"}),Qr=Wt({},c.disabled,{color:"colorTextLinkLight"}),tn={default:Yr,loading:Zr,disabled:Qr},pt=ut.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ut.createElement(dt.Box,i(i(i({ref:n,width:o?"100%":"auto"},dt.safelySpreadBoxProps(r)),tn[e]),g[t]))});pt.defaultProps={as:"a"};pt.displayName="LinkButton";var ft=p(require("react")),ht=p(require("@twilio-paste/box"));var Vt=m(),en=Vt({},c.default,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverse",_hover:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLighter"},_focus:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowFocusInverse"},_active:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLightest"}}),on=Vt({},c.loading,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseDarker"}),rn=Vt({},c.disabled,{color:"colorTextInverseWeaker",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverseDarker"}),nn={default:en,loading:on,disabled:rn},yt=ft.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ft.createElement(ht.Box,i(i(i({ref:n,width:o?"100%":"auto"},ht.safelySpreadBoxProps(r)),nn[e]),g[t]))});yt.defaultProps={as:"button"};yt.displayName="InverseButton";var gt=p(require("react")),Bt=p(require("@twilio-paste/box"));var Ut=m(),an=Ut({},c.default,{color:"colorTextInverse",transition:"none",_hover:{color:"colorTextInverseWeaker",textDecoration:"underline"},_focus:{color:"colorTextInverseWeaker",boxShadow:"shadowFocusInverse",textDecoration:"underline"},_active:{textDecoration:"underline"}}),sn=Ut({},c.loading,{color:"colorTextInverse"}),cn=Ut({},c.disabled,{color:"colorTextInverseWeaker"}),ln={default:an,loading:sn,disabled:cn},mt=gt.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return gt.createElement(Bt.Box,i(i(i({ref:n,width:o?"100%":"auto"},Bt.safelySpreadBoxProps(r)),ln[e]),g[t]))});mt.defaultProps={as:"a"};mt.displayName="InverseLinkButton";var bt=p(require("react")),St=p(require("@twilio-paste/box"));var qt=m(),un=qt({},c.default,{fontSize:"inherit",fontWeight:"inherit",color:"inherit"}),dn=qt({},c.loading,{fontSize:"inherit",fontWeight:"inherit"}),pn=qt({},c.disabled,{fontSize:"inherit",fontWeight:"inherit"}),fn={default:un,loading:dn,disabled:pn},vt=bt.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return bt.createElement(St.Box,i(i(i({ref:n,width:o?"100%":"auto"},St.safelySpreadBoxProps(r)),fn[e]),g[t]))});vt.defaultProps={as:"button"};vt.displayName="ResetButton";var hn=_t.animated(xt.Box),yn=(t,e,o)=>{let r="default";return o!=null?r=o:t==="link"||t==="destructive_link"||t==="reset"?r="reset":d.Children.count(e)===1&&d.Children.forEach(e,n=>{d.isValidElement(n)&&typeof n.type.displayName=="string"&&n.type.displayName.includes("Icon")&&(r="icon")}),r},gn=(t,e)=>t?"disabled":e?"loading":"default",Bn=({as:t,href:e,tabIndex:o,variant:r,size:n,fullWidth:a,children:l,disabled:s,loading:u})=>{let y=e!=null&&e!=="",B=o!=null;if(t!=="a"&&y)throw new Error(`[Paste: Button] You cannot pass href into a button without the 'a' tag. Use 'as="a"'.`);if(t==="a"){if(!y)throw new Error("[Paste: Button] Missing href prop for link button.");if(r==="link"||r==="inverse_link")throw new Error("[Paste: Button] Using Button component as an Anchor. Use the Paste Anchor component instead.");if(r!=="primary"&&r!=="secondary"&&r!=="reset")throw new Error('[Paste: Button] <Button as="a"> only works with the following variants: primary or secondary.');if(s||u)throw new Error('[Paste: Button] <Button as="a"> cannot be disabled or loading.')}if(r==="reset"&&n!=="reset")throw new Error('[Paste: Button] The "RESET" variant can only be used with the "RESET" size.');if((n==="icon"||n==="icon_small")&&a)throw new Error("[Paste: Button] Icon buttons should not be fullWidth.");if(l==null)throw new Error("[Paste: Button] Must have non-null children.");if(B&&!(o===0||o===-1))throw new Error("[Paste: Button] tabIndex must be 0 or -1.")},mn=({buttonState:t,children:e,showLoading:o,variant:r})=>d.createElement(d.Fragment,null,d.createElement(xt.Box,{as:"span",display:"flex",textDecoration:"inherit",opacity:t==="loading"?"0":"1","aria-hidden":t==="loading"?"true":"false",justifyContent:r==="reset"?null:"center"},d.Children.count(e)>1?d.createElement(we.Stack,{as:"span",orientation:"horizontal",spacing:"space20"},e):e),o?d.createElement(xt.Box,{as:"span",position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"lineHeight30"},d.createElement(De.Spinner,{decorative:!1,title:"Loading, please wait.",delay:0})):null),bn=t=>{switch(t){case"secondary":return Z;case"destructive":return et;case"destructive_secondary":return lt;case"link":return pt;case"destructive_link":return nt;case"reset":return vt;case"inverse":return yt;case"inverse_link":return mt;case"primary":default:return $}},Gt=d.forwardRef((t,e)=>{let{size:o,variant:r,children:n,disabled:a,loading:l}=t,s=h(t,["size","variant","children","disabled","loading"]),[u,y]=d.useState(!1),B=_t.useSpring({translateX:u?"4px":"0px",config:{mass:.1,tension:275,friction:16}}),x=d.useMemo(()=>yn(r,n,o),[o,r,n]);Bn(i(i({},t),{size:x}));let b=gn(a,l),L=b==="loading",z=b!=="default",ke=bn(r),Le=t.as==="a"&&t.href!=null&&typeof n=="string"&&r!=="reset"?d.createElement(d.Fragment,null,n,d.createElement(hn,{style:B},d.createElement(Te.ArrowForwardIcon,{decorative:!0}))):n;return d.createElement(ke,i(i(i({},s.href!=null?Pe.secureExternalLink(s.href):null),s),{onMouseEnter:wt=>{typeof s.onMouseEnter=="function"&&s.onMouseEnter(wt),y(!0)},onMouseLeave:wt=>{typeof s.onMouseLeave=="function"&&s.onMouseLeave(wt),y(!1)},buttonState:b,disabled:z,size:x,"aria-busy":b==="loading"?"true":"false",className:void 0,style:void 0,ref:e}),d.createElement(mn,{buttonState:b,showLoading:L,variant:r},Le))});Gt.defaultProps={as:"button",fullWidth:!1,disabled:!1,loading:!1,type:"button",variant:"primary"};Gt.displayName="Button";
var Re=Object.create,N=Object.defineProperty,Ee=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty,Oe=Object.getOwnPropertyNames,ze=Object.getOwnPropertyDescriptor,Jt=Object.getOwnPropertySymbols,Ne=Object.prototype.propertyIsEnumerable;var i=Object.assign,Yt=t=>N(t,"__esModule",{value:!0});var h=(t,e)=>{var o={};for(var r in t)Xt.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&Jt)for(var r of Jt(t))e.indexOf(r)<0&&Ne.call(t,r)&&(o[r]=t[r]);return o},Ae=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Me=(t,e)=>{Yt(t);for(var o in e)N(t,o,{get:e[o],enumerable:!0})},je=(t,e,o)=>{if(Yt(t),e&&typeof e=="object"||typeof e=="function")for(let r of Oe(e))!Xt.call(t,r)&&r!=="default"&&N(t,r,{get:()=>e[r],enumerable:!(o=ze(e,r))||o.enumerable});return t},p=t=>t&&t.__esModule?t:je(N(t!=null?Re(Ee(t)):{},"default",{value:t,enumerable:!0}),t);var B=Ae((I,P)=>{var He=200,Zt="__lodash_hash_undefined__",Fe=800,We=16,Qt=9007199254740991,te="[object Arguments]",Ve="[object Array]",Ue="[object AsyncFunction]",qe="[object Boolean]",Ge="[object Date]",$e="[object Error]",ee="[object Function]",Ke="[object GeneratorFunction]",Xe="[object Map]",Je="[object Number]",Ye="[object Null]",oe="[object Object]",Ze="[object Proxy]",Qe="[object RegExp]",to="[object Set]",eo="[object String]",oo="[object Undefined]",ro="[object WeakMap]",no="[object ArrayBuffer]",ao="[object DataView]",io="[object Float32Array]",so="[object Float64Array]",lo="[object Int8Array]",co="[object Int16Array]",uo="[object Int32Array]",po="[object Uint8Array]",fo="[object Uint8ClampedArray]",ho="[object Uint16Array]",yo="[object Uint32Array]",go=/[\\^$.*+?()[\]{}|]/g,mo=/^\[object .+?Constructor\]$/,Bo=/^(?:0|[1-9]\d*)$/,f={};f[io]=f[so]=f[lo]=f[co]=f[uo]=f[po]=f[fo]=f[ho]=f[yo]=!0;f[te]=f[Ve]=f[no]=f[qe]=f[ao]=f[Ge]=f[$e]=f[ee]=f[Xe]=f[Je]=f[oe]=f[Qe]=f[to]=f[eo]=f[ro]=!1;var re=typeof global=="object"&&global&&global.Object===Object&&global,bo=typeof self=="object"&&self&&self.Object===Object&&self,C=re||bo||Function("return this")(),ne=typeof I=="object"&&I&&!I.nodeType&&I,R=ne&&typeof P=="object"&&P&&!P.nodeType&&P,ae=R&&R.exports===ne,Dt=ae&&re.process,ie=function(){try{var t=R&&R.require&&R.require("util").types;return t||Dt&&Dt.binding&&Dt.binding("util")}catch(e){}}(),se=ie&&ie.isTypedArray;function vo(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}function So(t,e){for(var o=-1,r=Array(t);++o<t;)r[o]=e(o);return r}function xo(t){return function(e){return t(e)}}function _o(t,e){return t==null?void 0:t[e]}function wo(t,e){return function(o){return t(e(o))}}var Do=Array.prototype,Po=Function.prototype,A=Object.prototype,Pt=C["__core-js_shared__"],M=Po.toString,v=A.hasOwnProperty,le=function(){var t=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ce=A.toString,To=M.call(Object),ko=RegExp("^"+M.call(v).replace(go,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=ae?C.Buffer:void 0,ue=C.Symbol,de=C.Uint8Array,pe=j?j.allocUnsafe:void 0,fe=wo(Object.getPrototypeOf,Object),he=Object.create,Lo=A.propertyIsEnumerable,Io=Do.splice,_=ue?ue.toStringTag:void 0,H=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Co=j?j.isBuffer:void 0,ye=Math.max,Ro=Date.now,ge=Tt(C,"Map"),E=Tt(Object,"create"),Eo=function(){function t(){}return function(e){if(!w(e))return{};if(he)return he(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function D(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function Oo(){this.__data__=E?E(null):{},this.size=0}function zo(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function No(t){var e=this.__data__;if(E){var o=e[t];return o===Zt?void 0:o}return v.call(e,t)?e[t]:void 0}function Ao(t){var e=this.__data__;return E?e[t]!==void 0:v.call(e,t)}function Mo(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=E&&e===void 0?Zt:e,this}D.prototype.clear=Oo;D.prototype.delete=zo;D.prototype.get=No;D.prototype.has=Ao;D.prototype.set=Mo;function S(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function jo(){this.__data__=[],this.size=0}function Ho(t){var e=this.__data__,o=F(e,t);if(o<0)return!1;var r=e.length-1;return o==r?e.pop():Io.call(e,o,1),--this.size,!0}function Fo(t){var e=this.__data__,o=F(e,t);return o<0?void 0:e[o][1]}function Wo(t){return F(this.__data__,t)>-1}function Vo(t,e){var o=this.__data__,r=F(o,t);return r<0?(++this.size,o.push([t,e])):o[r][1]=e,this}S.prototype.clear=jo;S.prototype.delete=Ho;S.prototype.get=Fo;S.prototype.has=Wo;S.prototype.set=Vo;function T(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var r=t[e];this.set(r[0],r[1])}}function Uo(){this.size=0,this.__data__={hash:new D,map:new(ge||S),string:new D}}function qo(t){var e=W(this,t).delete(t);return this.size-=e?1:0,e}function Go(t){return W(this,t).get(t)}function $o(t){return W(this,t).has(t)}function Ko(t,e){var o=W(this,t),r=o.size;return o.set(t,e),this.size+=o.size==r?0:1,this}T.prototype.clear=Uo;T.prototype.delete=qo;T.prototype.get=Go;T.prototype.has=$o;T.prototype.set=Ko;function k(t){var e=this.__data__=new S(t);this.size=e.size}function Xo(){this.__data__=new S,this.size=0}function Jo(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function Yo(t){return this.__data__.get(t)}function Zo(t){return this.__data__.has(t)}function Qo(t,e){var o=this.__data__;if(o instanceof S){var r=o.__data__;if(!ge||r.length<He-1)return r.push([t,e]),this.size=++o.size,this;o=this.__data__=new T(r)}return o.set(t,e),this.size=o.size,this}k.prototype.clear=Xo;k.prototype.delete=Jo;k.prototype.get=Yo;k.prototype.has=Zo;k.prototype.set=Qo;function tr(t,e){var o=Lt(t),r=!o&&kt(t),n=!o&&!r&&Be(t),a=!o&&!r&&!n&&be(t),c=o||r||n||a,s=c?So(t.length,String):[],u=s.length;for(var y in t)(e||v.call(t,y))&&!(c&&(y=="length"||n&&(y=="offset"||y=="parent")||a&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||me(y,u)))&&s.push(y);return s}function Ct(t,e,o){(o!==void 0&&!V(t[e],o)||o===void 0&&!(e in t))&&It(t,e,o)}function er(t,e,o){var r=t[e];(!(v.call(t,e)&&V(r,o))||o===void 0&&!(e in t))&&It(t,e,o)}function F(t,e){for(var o=t.length;o--;)if(V(t[o][0],e))return o;return-1}function It(t,e,o){e=="__proto__"&&H?H(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var rr=or();function U(t){return t==null?t===void 0?oo:Ye:_&&_ in Object(t)?nr(t):ar(t)}function ve(t){return O(t)&&U(t)==te}function lr(t){if(!w(t)||ir(t))return!1;var e=Rt(t)?ko:mo;return e.test(sr(t))}function cr(t){return O(t)&&Se(t.length)&&!!f[U(t)]}function dr(t){if(!w(t))return ur(t);var e=xe(t),o=[];for(var r in t)r=="constructor"&&(e||!v.call(t,r))||o.push(r);return o}function _e(t,e,o,r,n){t!==e&&rr(e,function(a,c){if(n||(n=new k),w(a))pr(t,e,c,o,_e,r,n);else{var s=r?r(Et(t,c),a,c+"",t,e,n):void 0;s===void 0&&(s=a),Ct(t,c,s)}},we)}function pr(t,e,o,r,n,a,c){var s=Et(t,o),u=Et(e,o),y=c.get(u);if(y){Ct(t,o,y);return}var m=a?a(s,u,o+"",t,e,c):void 0,x=m===void 0;if(x){var b=Lt(u),L=!b&&Be(u),z=!b&&!L&&be(u);m=u,b||L||z?Lt(s)?m=s:mr(s)?m=yr(s):L?(x=!1,m=fr(u,!0)):z?(x=!1,m=hr(u,!0)):m=[]:Br(u)||kt(u)?(m=s,kt(s)?m=br(s):(!w(s)||Rt(s))&&(m=gr(u))):x=!1}x&&(c.set(u,m),n(m,u,r,a,c),c.delete(u)),Ct(t,o,m)}function xr(t,e){return Sr(vr(t,e,De),t+"")}var wr=H?function(t,e){return H(t,"toString",{configurable:!0,enumerable:!1,value:_r(e),writable:!0})}:De;function fr(t,e){if(e)return t.slice();var o=t.length,r=pe?pe(o):new t.constructor(o);return t.copy(r),r}function Dr(t){var e=new t.constructor(t.byteLength);return new de(e).set(new de(t)),e}function hr(t,e){var o=e?Dr(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function yr(t,e){var o=-1,r=t.length;for(e||(e=Array(r));++o<r;)e[o]=t[o];return e}function Pr(t,e,o,r){var n=!o;o||(o={});for(var a=-1,c=e.length;++a<c;){var s=e[a],u=r?r(o[s],t[s],s,o,t):void 0;u===void 0&&(u=t[s]),n?It(o,s,u):er(o,s,u)}return o}function kr(t){return xr(function(e,o){var r=-1,n=o.length,a=n>1?o[n-1]:void 0,c=n>2?o[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,c&&Tr(o[0],o[1],c)&&(a=n<3?void 0:a,n=1),e=Object(e);++r<n;){var s=o[r];s&&t(e,s,r,a)}return e})}function or(t){return function(e,o,r){for(var n=-1,a=Object(e),c=r(e),s=c.length;s--;){var u=c[t?s:++n];if(o(a[u],u,a)===!1)break}return e}}function W(t,e){var o=t.__data__;return Lr(e)?o[typeof e=="string"?"string":"hash"]:o.map}function Tt(t,e){var o=_o(t,e);return lr(o)?o:void 0}function nr(t){var e=v.call(t,_),o=t[_];try{t[_]=void 0;var r=!0}catch(a){}var n=ce.call(t);return r&&(e?t[_]=o:delete t[_]),n}function gr(t){return typeof t.constructor=="function"&&!xe(t)?Eo(fe(t)):{}}function me(t,e){var o=typeof t;return e=e==null?Qt:e,!!e&&(o=="number"||o!="symbol"&&Bo.test(t))&&t>-1&&t%1==0&&t<e}function Tr(t,e,o){if(!w(o))return!1;var r=typeof e;return(r=="number"?Ot(o)&&me(e,o.length):r=="string"&&e in o)?V(o[e],t):!1}function Lr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ir(t){return!!le&&le in t}function xe(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||A;return t===o}function ur(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}function ar(t){return ce.call(t)}function vr(t,e,o){return e=ye(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,a=ye(r.length-e,0),c=Array(a);++n<a;)c[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o(c),vo(t,this,s)}}function Et(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Sr=Ir(wr);function Ir(t){var e=0,o=0;return function(){var r=Ro(),n=We-(r-o);if(o=r,n>0){if(++e>=Fe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function sr(t){if(t!=null){try{return M.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function V(t,e){return t===e||t!==t&&e!==e}var kt=ve(function(){return arguments}())?ve:function(t){return O(t)&&v.call(t,"callee")&&!Lo.call(t,"callee")},Lt=Array.isArray;function Ot(t){return t!=null&&Se(t.length)&&!Rt(t)}function mr(t){return O(t)&&Ot(t)}var Be=Co||Cr;function Rt(t){if(!w(t))return!1;var e=U(t);return e==ee||e==Ke||e==Ue||e==Ze}function Se(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Qt}function w(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function O(t){return t!=null&&typeof t=="object"}function Br(t){if(!O(t)||U(t)!=oe)return!1;var e=fe(t);if(e===null)return!0;var o=v.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&M.call(o)==To}var be=se?xo(se):cr;function br(t){return Pr(t,we(t))}function we(t){return Ot(t)?tr(t,!0):dr(t)}var Rr=kr(function(t,e,o){_e(t,e,o)});function _r(t){return function(){return t}}function De(t){return t}function Cr(){return!1}P.exports=Rr});Me(exports,{Button:()=>Gt});var d=p(require("react")),xt=p(require("@twilio-paste/box")),Pe=p(require("@twilio-paste/stack")),Te=p(require("@twilio-paste/spinner")),ke=p(require("@twilio-paste/anchor")),_t=p(require("@twilio-paste/animation-library")),Le=p(require("@twilio-paste/icons/cjs/ArrowForwardIcon")),Ie=p(require("@twilio-paste/icons/cjs/LinkExternalIcon"));var q=p(require("react")),G=p(require("@twilio-paste/box"));var zt=B(),Nt={appearance:"none",background:"none",display:"inline-block",border:"none",outline:"none",transition:"background-color 100ms ease-in, box-shadow 100ms ease-in, color 100ms ease-in",fontFamily:"fontFamilyText",fontWeight:"fontWeightSemibold",textDecoration:"none",position:"relative",_hover:{textDecoration:"none"},_focus:{textDecoration:"none",boxShadow:"shadowFocus"},_active:{textDecoration:"none"}},l={default:zt({},Nt,{cursor:"pointer",_active:{boxShadow:"none"}}),disabled:zt({},Nt,{cursor:"not-allowed"}),loading:zt({},Nt,{cursor:"wait"})},g={default:{paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",borderRadius:"borderRadius20",fontSize:"fontSize30",lineHeight:"lineHeight20"},small:{paddingTop:"space20",paddingBottom:"space20",paddingLeft:"space30",paddingRight:"space30",borderRadius:"borderRadius10",fontSize:"fontSize30",lineHeight:"lineHeight20"},icon:{padding:"space30",borderRadius:"borderRadius20"},icon_small:{padding:"space20",borderRadius:"borderRadius20"},reset:{paddingTop:"space0",paddingRight:"space0",paddingBottom:"space0",paddingLeft:"space0",borderWidth:"borderWidth0"}};var At=B(),Er=At({},l.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimary",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDark",boxShadow:"shadowBorderPrimaryDarker"}}),Or=At({},l.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryDarker",boxShadow:"shadowBorderPrimaryDarker"}),zr=At({},l.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundPrimaryLight",boxShadow:"shadowBorderPrimaryLight"}),Nr={default:Er,loading:Or,disabled:zr},$=q.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return q.createElement(G.Box,i(i(i({ref:n,width:o?"100%":"auto"},G.safelySpreadBoxProps(r)),Nr[e]),g[t]))});$.defaultProps={as:"button"};$.displayName="PrimaryButton";var K=p(require("react")),X=p(require("@twilio-paste/box"));var Mt=B(),Ar=Mt({},l.default,{color:"colorTextLink",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimary",_hover:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowBorderPrimaryDarker"},_focus:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryDarker"}}),J={color:"colorTextLinkDarker",backgroundColor:"colorBackgroundPrimaryLighter",boxShadow:"shadowBorderPrimaryLighter"},Mr=Mt({},l.loading,i(i({},J),{_hover:J,_active:J,_focus:J})),Y={color:"colorTextLinkLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderPrimaryLight"},jr=Mt({},l.disabled,i(i({},Y),{_hover:Y,_active:Y,_focus:Y})),Hr={default:Ar,loading:Mr,disabled:jr},Z=K.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return K.createElement(X.Box,i(i(i({ref:n,width:o?"100%":"auto"},X.safelySpreadBoxProps(r)),Hr[e]),g[t]))});Z.defaultProps={as:"button"};Z.displayName="SecondaryButton";var Q=p(require("react")),tt=p(require("@twilio-paste/box"));var jt=B(),Fr=jt({},l.default,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructive",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowFocus"},_active:{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDark",boxShadow:"shadowBorderDestructiveDarker"}}),Wr=jt({},l.loading,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveDarker",boxShadow:"shadowBorderDestructiveDarker"}),Vr=jt({},l.disabled,{color:"colorTextInverse",backgroundColor:"colorBackgroundDestructiveLight",boxShadow:"shadowBorderDestructiveLight"}),Ur={default:Fr,loading:Wr,disabled:Vr},et=Q.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return Q.createElement(tt.Box,i(i(i({ref:n,width:o?"100%":"auto"},tt.safelySpreadBoxProps(r)),Ur[e]),g[t]))});et.defaultProps={as:"button"};et.displayName="DestructiveButton";var ot=p(require("react")),rt=p(require("@twilio-paste/box"));var Ht=B(),qr=Ht({},l.default,{color:"colorTextLinkDestructive",transition:"none",_hover:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"},_active:{color:"colorTextLinkDestructiveDarker",textDecoration:"underline"},_focus:{color:"colorTextLinkDestructiveDark",textDecoration:"underline"}}),Gr=Ht({},l.loading,{color:"colorTextLinkDestructiveDarker",_hover:{color:"colorTextLinkDestructiveDarker"},_active:{color:"colorTextLinkDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker"}}),$r=Ht({},l.disabled,{color:"colorTextLinkDestructiveLight",_hover:{color:"colorTextLinkDestructiveLight"},_active:{color:"colorTextLinkDestructiveLight"},_focus:{color:"colorTextLinkDestructiveLight"}}),Kr={default:qr,loading:Gr,disabled:$r},nt=ot.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ot.createElement(rt.Box,i(i(i({ref:n,width:o?"100%":"auto"},rt.safelySpreadBoxProps(r)),Kr[e]),g[t]))});nt.defaultProps={as:"a"};nt.displayName="DestructiveLinkButton";var at=p(require("react")),it=p(require("@twilio-paste/box"));var Ft=B(),Xr=Ft({},l.default,{color:"colorTextLinkDestructive",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructive",_hover:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowBorderDestructiveDarker"},_focus:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLightest",boxShadow:"shadowFocus"},_active:{color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveDarker"}}),st={color:"colorTextLinkDestructiveDarker",backgroundColor:"colorBackgroundDestructiveLighter",boxShadow:"shadowBorderDestructiveLighter"},Jr=Ft({},l.loading,i(i({},st),{_hover:st,_active:st,_focus:st})),lt={color:"colorTextLinkDestructiveLight",backgroundColor:"colorBackgroundBody",boxShadow:"shadowBorderDestructiveLight"},Yr=Ft({},l.disabled,i(i({},lt),{_hover:lt,_active:lt,_focus:lt})),Zr={default:Xr,loading:Jr,disabled:Yr},ct=at.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return at.createElement(it.Box,i(i(i({ref:n,width:o?"100%":"auto"},it.safelySpreadBoxProps(r)),Zr[e]),g[t]))});ct.defaultProps={as:"button"};ct.displayName="DestructiveSecondaryButton";var ut=p(require("react")),dt=p(require("@twilio-paste/box"));var Wt=B(),Qr=Wt({},l.default,{color:"colorTextLink",transition:"none",_hover:{color:"colorTextLinkDark",textDecoration:"underline"},_focus:{color:"colorTextLinkDark",textDecoration:"underline"},_active:{color:"colorTextLinkDarker",textDecoration:"underline"}}),tn=Wt({},l.loading,{color:"colorTextLinkDarker"}),en=Wt({},l.disabled,{color:"colorTextLinkLight"}),on={default:Qr,loading:tn,disabled:en},pt=ut.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ut.createElement(dt.Box,i(i(i({ref:n,width:o?"100%":"auto"},dt.safelySpreadBoxProps(r)),on[e]),g[t]))});pt.defaultProps={as:"a"};pt.displayName="LinkButton";var ft=p(require("react")),ht=p(require("@twilio-paste/box"));var Vt=B(),rn=Vt({},l.default,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverse",_hover:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLighter"},_focus:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowFocusInverse"},_active:{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseLightest"}}),nn=Vt({},l.loading,{color:"colorTextInverse",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverseLight",boxShadow:"shadowBorderInverseDarker"}),an=Vt({},l.disabled,{color:"colorTextInverseWeaker",fontWeight:"fontWeightSemibold",backgroundColor:"colorBackgroundInverse",boxShadow:"shadowBorderInverseDarker"}),sn={default:rn,loading:nn,disabled:an},yt=ft.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return ft.createElement(ht.Box,i(i(i({ref:n,width:o?"100%":"auto"},ht.safelySpreadBoxProps(r)),sn[e]),g[t]))});yt.defaultProps={as:"button"};yt.displayName="InverseButton";var gt=p(require("react")),mt=p(require("@twilio-paste/box"));var Ut=B(),ln=Ut({},l.default,{color:"colorTextInverse",transition:"none",_hover:{color:"colorTextInverseWeaker",textDecoration:"underline"},_focus:{color:"colorTextInverseWeaker",boxShadow:"shadowFocusInverse",textDecoration:"underline"},_active:{textDecoration:"underline"}}),cn=Ut({},l.loading,{color:"colorTextInverse"}),un=Ut({},l.disabled,{color:"colorTextInverseWeaker"}),dn={default:ln,loading:cn,disabled:un},Bt=gt.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return gt.createElement(mt.Box,i(i(i({ref:n,width:o?"100%":"auto"},mt.safelySpreadBoxProps(r)),dn[e]),g[t]))});Bt.defaultProps={as:"a"};Bt.displayName="InverseLinkButton";var bt=p(require("react")),vt=p(require("@twilio-paste/box"));var qt=B(),pn=qt({},l.default,{fontSize:"inherit",fontWeight:"inherit",color:"inherit"}),fn=qt({},l.loading,{fontSize:"inherit",fontWeight:"inherit"}),hn=qt({},l.disabled,{fontSize:"inherit",fontWeight:"inherit"}),yn={default:pn,loading:fn,disabled:hn},St=bt.forwardRef((a,n)=>{var{size:t,buttonState:e,fullWidth:o}=a,r=h(a,["size","buttonState","fullWidth"]);return bt.createElement(vt.Box,i(i(i({ref:n,width:o?"100%":"auto"},vt.safelySpreadBoxProps(r)),yn[e]),g[t]))});St.defaultProps={as:"button"};St.displayName="ResetButton";var gn=_t.animated(xt.Box),mn=(t,e,o)=>{let r="default";return o!=null?r=o:t==="link"||t==="destructive_link"||t==="reset"?r="reset":d.Children.count(e)===1&&d.Children.forEach(e,n=>{d.isValidElement(n)&&typeof n.type.displayName=="string"&&n.type.displayName.includes("Icon")&&(r="icon")}),r},Bn=(t,e)=>t?"disabled":e?"loading":"default",bn=({as:t,href:e,tabIndex:o,variant:r,size:n,fullWidth:a,children:c,disabled:s,loading:u})=>{let y=e!=null&&e!=="",m=o!=null;if(t!=="a"&&y)throw new Error(`[Paste: Button] You cannot pass href into a button without the 'a' tag. Use 'as="a"'.`);if(t==="a"){if(!y)throw new Error("[Paste: Button] Missing href prop for link button.");if(r==="link"||r==="inverse_link")throw new Error("[Paste: Button] Using Button component as an Anchor. Use the Paste Anchor component instead.");if(r!=="primary"&&r!=="secondary"&&r!=="reset")throw new Error('[Paste: Button] <Button as="a"> only works with the following variants: primary or secondary.');if(s||u)throw new Error('[Paste: Button] <Button as="a"> cannot be disabled or loading.')}if(r==="reset"&&n!=="reset")throw new Error('[Paste: Button] The "RESET" variant can only be used with the "RESET" size.');if((n==="icon"||n==="icon_small")&&a)throw new Error("[Paste: Button] Icon buttons should not be fullWidth.");if(c==null)throw new Error("[Paste: Button] Must have non-null children.");if(m&&!(o===0||o===-1))throw new Error("[Paste: Button] tabIndex must be 0 or -1.")},vn=({buttonState:t,children:e,showLoading:o,variant:r})=>d.createElement(d.Fragment,null,d.createElement(xt.Box,{as:"span",display:"flex",textDecoration:"inherit",opacity:t==="loading"?"0":"1","aria-hidden":t==="loading"?"true":"false",justifyContent:r==="reset"?null:"center"},d.Children.count(e)>1?d.createElement(Pe.Stack,{as:"span",orientation:"horizontal",spacing:"space20"},e):e),o?d.createElement(xt.Box,{as:"span",position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"lineHeight30"},d.createElement(Te.Spinner,{decorative:!1,title:"Loading, please wait.",delay:0})):null),Sn=t=>{switch(t){case"secondary":return Z;case"destructive":return et;case"destructive_secondary":return ct;case"link":return pt;case"destructive_link":return nt;case"reset":return St;case"inverse":return yt;case"inverse_link":return Bt;case"primary":default:return $}},Gt=d.forwardRef((t,e)=>{let{size:o,variant:r,children:n,disabled:a,loading:c}=t,s=h(t,["size","variant","children","disabled","loading"]),[u,y]=d.useState(!1),m=_t.useSpring({translateX:u?"4px":"0px",config:{mass:.1,tension:275,friction:16}}),x=d.useMemo(()=>mn(r,n,o),[o,r,n]);bn(i(i({},t),{size:x}));let b=Bn(a,c),L=b==="loading",z=b!=="default",Ce=Sn(r),$t=t.href!=null?ke.secureExternalLink(t.href):null,Kt=n;return t.as==="a"&&t.href!=null&&typeof n=="string"&&r!=="reset"&&(Kt=d.createElement(d.Fragment,null,n,$t!=null?d.createElement(Ie.LinkExternalIcon,{decorative:!1,title:"link takes you to an external page"}):d.createElement(gn,{style:m},d.createElement(Le.ArrowForwardIcon,{decorative:!0})))),d.createElement(Ce,i(i(i({},$t),s),{onMouseEnter:wt=>{typeof s.onMouseEnter=="function"&&s.onMouseEnter(wt),y(!0)},onMouseLeave:wt=>{typeof s.onMouseLeave=="function"&&s.onMouseLeave(wt),y(!1)},buttonState:b,disabled:z,size:x,"aria-busy":b==="loading"?"true":"false",className:void 0,style:void 0,ref:e}),d.createElement(vn,{buttonState:b,showLoading:L,variant:r},Kt))});Gt.defaultProps={as:"button",fullWidth:!1,disabled:!1,loading:!1,type:"button",variant:"primary"};Gt.displayName="Button";
{
"name": "@twilio-paste/button",
"version": "7.0.0",
"version": "7.0.1",
"category": "interaction",

@@ -5,0 +5,0 @@ "status": "production",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc