sage-agent-internal 0.1.30__py3-none-any.whl → 0.1.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. sage_agent_internal/__init__.py +16 -0
  2. {sage_agent → sage_agent_internal}/_version.py +1 -1
  3. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/install.json +5 -0
  4. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/package.json +228 -0
  5. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/schemas/sage-agent-internal/package.json.orig +223 -0
  6. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/schemas/sage-agent-internal/plugin.json +101 -0
  7. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/122.3c2c200586e65203b674.js +1 -0
  8. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/220.d384edfd5bbcfda33a2a.js +1 -0
  9. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/262.3fc4ad88e6f8c273d4ad.js +1 -0
  10. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/364.c2fb82c6f484097228c6.js +1 -0
  11. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/379.b3bf2f8d00bdb186e6f8.js +1 -0
  12. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/424.58d3508585951cee4f35.js +1 -0
  13. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/439.61293ec148172a793000.js +1 -0
  14. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/481.96b91d018df31d54d173.js +1 -0
  15. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/540.283f7cceb475717261ed.js +1 -0
  16. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/553.b7906877d98a62265533.js +2 -0
  17. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/553.b7906877d98a62265533.js.LICENSE.txt +15 -0
  18. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/713.103cb5ae248be385b08a.js +1 -0
  19. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/742.b204789055ded4e07883.js +1 -0
  20. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/845.cc2bc80fbfea6d20a396.js +1 -0
  21. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/888.09382cc93a2ad3932b31.js +1 -0
  22. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/982.e8f28fa7892d44e0d1bb.js +2 -0
  23. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/982.e8f28fa7892d44e0d1bb.js.LICENSE.txt +1 -0
  24. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/remoteEntry.28bb17beaf868e051da1.js +1 -0
  25. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/style.js +4 -0
  26. sage_agent_internal-0.1.31.data/data/share/jupyter/labextensions/sage-agent-internal/static/third-party-licenses.json +268 -0
  27. {sage_agent_internal-0.1.30.dist-info → sage_agent_internal-0.1.31.dist-info}/METADATA +12 -12
  28. sage_agent_internal-0.1.31.dist-info/RECORD +30 -0
  29. sage_agent_internal-0.1.30.data/data/share/jupyter/labextensions/sage-agent/install.json +0 -5
  30. sage_agent_internal-0.1.30.dist-info/RECORD +0 -6
  31. {sage_agent_internal-0.1.30.dist-info → sage_agent_internal-0.1.31.dist-info}/WHEEL +0 -0
  32. {sage_agent_internal-0.1.30.dist-info → sage_agent_internal-0.1.31.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 553.b7906877d98a62265533.js.LICENSE.txt */
2
+ (self.webpackChunksage_agent_internal=self.webpackChunksage_agent_internal||[]).push([[553],{1020:(e,t,n)=>{"use strict";var r=n(3345),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:i.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},2485:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},2692:e=>{"use strict";e.exports=function(e,t,n,r,o,a,s,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,s,i],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,s){if(s!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},4553:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Accordion:()=>$e,AccordionBody:()=>Ee,AccordionButton:()=>je,AccordionCollapse:()=>be,AccordionContext:()=>he,AccordionHeader:()=>Re,AccordionItem:()=>Pe,Alert:()=>lt,AlertHeading:()=>Ae,AlertLink:()=>Je,Anchor:()=>ct,Badge:()=>dt,Breadcrumb:()=>vt,BreadcrumbItem:()=>pt,Button:()=>xt,ButtonGroup:()=>gt,ButtonToolbar:()=>wt,Card:()=>zt,CardBody:()=>Nt,CardFooter:()=>jt,CardGroup:()=>Gt,CardHeader:()=>Pt,CardImg:()=>$t,CardImgOverlay:()=>Dt,CardLink:()=>Mt,CardSubtitle:()=>Bt,CardText:()=>Ht,CardTitle:()=>Wt,Carousel:()=>an,CarouselCaption:()=>Qt,CarouselItem:()=>tn,CloseButton:()=>st,Col:()=>cn,Collapse:()=>pe,Container:()=>dn,Dropdown:()=>Zo,DropdownButton:()=>na,DropdownDivider:()=>$o,DropdownHeader:()=>Do,DropdownItem:()=>Mo,DropdownItemText:()=>Ao,DropdownMenu:()=>Go,DropdownToggle:()=>Xo,Fade:()=>tt,Figure:()=>da,FigureCaption:()=>ca,FigureImage:()=>ia,FloatingLabel:()=>Fa,Form:()=>Ka,FormCheck:()=>wa,FormControl:()=>Na,FormFloating:()=>ja,FormGroup:()=>Ra,FormLabel:()=>Pa,FormSelect:()=>Da,FormText:()=>Ma,Image:()=>aa,InputGroup:()=>Ua,ListGroup:()=>ls,ListGroupItem:()=>ss,Modal:()=>Js,ModalBody:()=>Ls,ModalDialog:()=>Fs,ModalFooter:()=>_s,ModalHeader:()=>zs,ModalTitle:()=>qs,Nav:()=>oi,NavDropdown:()=>Li,NavItem:()=>ei,NavLink:()=>ni,Navbar:()=>Ii,NavbarBrand:()=>si,NavbarCollapse:()=>li,NavbarOffcanvas:()=>Ti,NavbarText:()=>Si,NavbarToggle:()=>ui,Offcanvas:()=>ki,OffcanvasBody:()=>hi,OffcanvasHeader:()=>wi,OffcanvasTitle:()=>Ci,OffcanvasToggling:()=>gi,Overlay:()=>Zi,OverlayTrigger:()=>Qi,PageItem:()=>tl,Pagination:()=>cl,Placeholder:()=>ml,PlaceholderButton:()=>fl,Popover:()=>Gi,PopoverBody:()=>Wi,PopoverHeader:()=>_i,ProgressBar:()=>bl,Ratio:()=>yl,Row:()=>El,SSRProvider:()=>kl,Spinner:()=>Cl,SplitButton:()=>Rl,Stack:()=>$l,Tab:()=>Xl,TabContainer:()=>Kl,TabContent:()=>Vl,TabPane:()=>Ul,Table:()=>Zl,Tabs:()=>tc,ThemeProvider:()=>j,Toast:()=>dc,ToastBody:()=>cc,ToastContainer:()=>mc,ToastHeader:()=>ic,ToggleButton:()=>xc,ToggleButtonGroup:()=>gc,Tooltip:()=>Xi,useAccordionButton:()=>Ne});var r=n(2485),o=n.n(r),a=n(3345),s=n.n(a);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function l(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var c=n(2692),u=n.n(c);function d(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function f(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function p(e,t,n){var r=(0,a.useRef)(void 0!==e),o=(0,a.useState)(t),s=o[0],i=o[1],l=void 0!==e,c=r.current;return r.current=l,!l&&c&&s!==t&&i(t),[l?e:s,(0,a.useCallback)(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];n&&n.apply(void 0,[e].concat(r)),i(e)},[n])]}function m(e,t){return Object.keys(t).reduce(function(n,r){var o,a=n,s=a[d(r)],c=a[r],u=l(a,[d(r),r].map(f)),m=t[r],v=p(c,s,e[m]),h=v[0],x=v[1];return i({},u,((o={})[r]=h,o[m]=x,o))},e)}var v=n(4848);const h=["xxl","xl","lg","md","sm","xs"],x="xs",b=a.createContext({prefixes:{},breakpoints:h,minBreakpoint:x}),{Consumer:g,Provider:y}=b;function w(e,t){const{prefixes:n}=(0,a.useContext)(b);return e||n[t]||t}function E(){const{breakpoints:e}=(0,a.useContext)(b);return e}function N(){const{minBreakpoint:e}=(0,a.useContext)(b);return e}function C(){const{dir:e}=(0,a.useContext)(b);return"rtl"===e}const j=function({prefixes:e={},breakpoints:t=h,minBreakpoint:n=x,dir:r,children:o}){const s=(0,a.useMemo)(()=>({prefixes:{...e},breakpoints:t,minBreakpoint:n,dir:r}),[e,t,n,r]);return(0,v.jsx)(y,{value:s,children:o})};function O(e){return e&&e.ownerDocument||document}var R=/([A-Z])/g,k=/^ms-/;function P(e){return function(e){return e.replace(R,"-$1").toLowerCase()}(e).replace(k,"-ms-")}var T=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const $=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(P(t))||function(e,t){return function(e){var t=O(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(P(t));Object.keys(t).forEach(function(o){var a=t[o];a||0===a?function(e){return!(!e||!T.test(e))}(o)?r+=o+"("+a+") ":n+=P(o)+": "+a+";":e.style.removeProperty(P(o))}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var D=n(7628),I=n.n(D);const M=s().createContext(null);var L="unmounted",A="exited",B="entering",F="entered",H="exiting",_=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=A,r.appearStatus=B):o=F:o=t.unmountOnExit||t.mountOnEnter?L:A,r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===L?{status:A}:null};var o=r.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==B&&n!==F&&(t=B):n!==B&&n!==F||(t=H)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===B){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:I().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===A&&this.setState({status:L})},o.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[I().findDOMNode(this),r],a=o[0],s=o[1],i=this.getTimeouts(),l=r?i.appear:i.enter;e||n?(this.props.onEnter(a,s),this.safeSetState({status:B},function(){t.props.onEntering(a,s),t.onTransitionEnd(l,function(){t.safeSetState({status:F},function(){t.props.onEntered(a,s)})})})):this.safeSetState({status:F},function(){t.props.onEntered(a)})},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:I().findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:H},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:A},function(){e.props.onExited(r)})})})):this.safeSetState({status:A},function(){e.props.onExited(r)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:I().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===L)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,l(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s().createElement(M.Provider,{value:null},"function"==typeof n?n(e,r):s().cloneElement(s().Children.only(n),r))},r}(s().Component);function K(){}_.contextType=M,_.propTypes={},_.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:K,onEntering:K,onEntered:K,onExit:K,onExiting:K,onExited:K},_.UNMOUNTED=L,_.EXITED=A,_.ENTERING=B,_.ENTERED=F,_.EXITING=H;const W=_;function V(e){return"Escape"===e.code||27===e.keyCode}function z(e){if(!e||"function"==typeof e)return null;const{major:t}=function(){const e=a.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}();return t>=19?e.props.ref:e.ref}const U=!("undefined"==typeof window||!window.document||!window.document.createElement);var G=!1,q=!1;try{var X={get passive(){return G=!0},get once(){return q=G=!0}};U&&(window.addEventListener("test",X,X),window.removeEventListener("test",X,!0))}catch(e){}const Y=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!q){var o=r.once,a=r.capture,s=n;!q&&o&&(s=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=s),e.addEventListener(t,s,G?r:a)}e.addEventListener(t,n,r)},Z=function(e,t,n,r){var o=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)},J=function(e,t,n,r){return Y(e,t,n,r),function(){Z(e,t,n,r)}};function Q(e,t,n,r){var o,a;null==n&&(a=-1===(o=$(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(o)*a||0);var s=function(e,t,n){void 0===n&&(n=5);var r=!1,o=setTimeout(function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent("transitionend",n,r),e.dispatchEvent(o)}}(e,0,!0)},t+n),a=J(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),a()}}(e,n,r),i=J(e,"transitionend",t);return function(){s(),i()}}function ee(e,t){const n=$(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function te(e,t){const n=ee(e,"transitionDuration"),r=ee(e,"transitionDelay"),o=Q(e,n=>{n.target===e&&(o(),t(n))},n+r)}const ne=function(...e){return e.filter(e=>null!=e).reduce((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}},null)};function re(e){e.offsetHeight}const oe=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,ae=function(e,t){return(0,a.useMemo)(()=>function(e,t){const n=oe(e),r=oe(t);return e=>{n&&n(e),r&&r(e)}}(e,t),[e,t])};function se(e){return e&&"setState"in e?I().findDOMNode(e):null!=e?e:null}const ie=s().forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:i,addEndListener:l,children:c,childRef:u,...d},f)=>{const p=(0,a.useRef)(null),m=ae(p,u),h=e=>{m(se(e))},x=e=>t=>{e&&p.current&&e(p.current,t)},b=(0,a.useCallback)(x(e),[e]),g=(0,a.useCallback)(x(t),[t]),y=(0,a.useCallback)(x(n),[n]),w=(0,a.useCallback)(x(r),[r]),E=(0,a.useCallback)(x(o),[o]),N=(0,a.useCallback)(x(i),[i]),C=(0,a.useCallback)(x(l),[l]);return(0,v.jsx)(W,{ref:f,...d,onEnter:b,onEntered:y,onEntering:g,onExit:w,onExited:N,onExiting:E,addEndListener:C,nodeRef:p,children:"function"==typeof c?(e,t)=>c(e,{...t,ref:h}):s().cloneElement(c,{ref:h})})});ie.displayName="TransitionWrapper";const le=ie,ce={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function ue(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=ce[e];return n+parseInt($(t,r[0]),10)+parseInt($(t,r[1]),10)}const de={[A]:"collapse",[H]:"collapsing",[B]:"collapsing",[F]:"collapse show"},fe=s().forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,className:l,children:c,dimension:u="height",in:d=!1,timeout:f=300,mountOnEnter:p=!1,unmountOnExit:m=!1,appear:h=!1,getDimensionValue:x=ue,...b},g)=>{const y="function"==typeof u?u():u,w=(0,a.useMemo)(()=>ne(e=>{e.style[y]="0"},e),[y,e]),E=(0,a.useMemo)(()=>ne(e=>{const t=`scroll${y[0].toUpperCase()}${y.slice(1)}`;e.style[y]=`${e[t]}px`},t),[y,t]),N=(0,a.useMemo)(()=>ne(e=>{e.style[y]=null},n),[y,n]),C=(0,a.useMemo)(()=>ne(e=>{e.style[y]=`${x(y,e)}px`,re(e)},r),[r,x,y]),j=(0,a.useMemo)(()=>ne(e=>{e.style[y]=null},i),[y,i]);return(0,v.jsx)(le,{ref:g,addEndListener:te,...b,"aria-expanded":b.role?d:null,onEnter:w,onEntering:E,onEntered:N,onExit:C,onExiting:j,childRef:z(c),in:d,timeout:f,mountOnEnter:p,unmountOnExit:m,appear:h,children:(e,t)=>s().cloneElement(c,{...t,className:o()(l,c.props.className,de[e],"width"===y&&"collapse-horizontal")})})});fe.displayName="Collapse";const pe=fe;function me(e,t){return Array.isArray(e)?e.includes(t):e===t}const ve=a.createContext({});ve.displayName="AccordionContext";const he=ve,xe=a.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:s,...i},l)=>{const{activeEventKey:c}=(0,a.useContext)(he);return t=w(t,"accordion-collapse"),(0,v.jsx)(pe,{ref:l,in:me(c,s),...i,className:o()(n,t),children:(0,v.jsx)(e,{children:a.Children.only(r)})})});xe.displayName="AccordionCollapse";const be=xe,ge=a.createContext({eventKey:""});ge.displayName="AccordionItemContext";const ye=ge,we=a.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:s,onEntered:i,onExit:l,onExiting:c,onExited:u,...d},f)=>{t=w(t,"accordion-body");const{eventKey:p}=(0,a.useContext)(ye);return(0,v.jsx)(be,{eventKey:p,onEnter:r,onEntering:s,onEntered:i,onExit:l,onExiting:c,onExited:u,children:(0,v.jsx)(e,{ref:f,...d,className:o()(n,t)})})});we.displayName="AccordionBody";const Ee=we;function Ne(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=(0,a.useContext)(he);return a=>{let s=e===n?null:e;o&&(s=Array.isArray(n)?n.includes(e)?n.filter(t=>t!==e):[...n,e]:[e]),null==r||r(s,a),null==t||t(a)}}const Ce=a.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...s},i)=>{t=w(t,"accordion-button");const{eventKey:l}=(0,a.useContext)(ye),c=Ne(l,r),{activeEventKey:u}=(0,a.useContext)(he);return"button"===e&&(s.type="button"),(0,v.jsx)(e,{ref:i,onClick:c,...s,"aria-expanded":Array.isArray(u)?u.includes(l):l===u,className:o()(n,t,!me(u,l)&&"collapsed")})});Ce.displayName="AccordionButton";const je=Ce,Oe=a.forwardRef(({as:e="h2","aria-controls":t,bsPrefix:n,className:r,children:a,onClick:s,...i},l)=>(n=w(n,"accordion-header"),(0,v.jsx)(e,{ref:l,...i,className:o()(r,n),children:(0,v.jsx)(je,{onClick:s,"aria-controls":t,children:a})})));Oe.displayName="AccordionHeader";const Re=Oe,ke=a.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...s},i)=>{t=w(t,"accordion-item");const l=(0,a.useMemo)(()=>({eventKey:r}),[r]);return(0,v.jsx)(ye.Provider,{value:l,children:(0,v.jsx)(e,{ref:i,...s,className:o()(n,t)})})});ke.displayName="AccordionItem";const Pe=ke,Te=a.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:s,className:i,onSelect:l,flush:c,alwaysOpen:u,...d}=m(e,{activeKey:"onSelect"}),f=w(s,"accordion"),p=(0,a.useMemo)(()=>({activeEventKey:r,onSelect:l,alwaysOpen:u}),[r,l,u]);return(0,v.jsx)(he.Provider,{value:p,children:(0,v.jsx)(n,{ref:t,...d,className:o()(i,f,c&&`${f}-flush`)})})});Te.displayName="Accordion";const $e=Object.assign(Te,{Button:je,Collapse:be,Item:Pe,Header:Re,Body:Ee}),Se=function(e){const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{t.current=e},[e]),t};function De(e){const t=Se(e);return(0,a.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}const Ie=e=>a.forwardRef((t,n)=>(0,v.jsx)("div",{...t,ref:n,className:o()(t.className,e)})),Me=Ie("h4");Me.displayName="DivStyledAsH4";const Le=a.forwardRef(({className:e,bsPrefix:t,as:n=Me,...r},a)=>(t=w(t,"alert-heading"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Le.displayName="AlertHeading";const Ae=Le;function Be(){return(0,a.useState)(null)}function Fe(e){const t=function(e){const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{t.current=e},[e]),t}(e);return(0,a.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function He(){const e=(0,a.useRef)(!0),t=(0,a.useRef)(()=>e.current);return(0,a.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function _e(e){const t=(0,a.useRef)(null);return(0,a.useEffect)(()=>{t.current=e}),t.current}const Ke=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,We="undefined"!=typeof document||Ke?a.useLayoutEffect:a.useEffect;new WeakMap;const Ve=["as","disabled"];function ze({tagName:e,disabled:t,href:n,target:r,rel:o,role:a,onClick:s,tabIndex:i=0,type:l}){e||(e=null!=n||null!=r||null!=o?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=r=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&r.preventDefault(),t?r.stopPropagation():null==s||s(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=a?a:"button",disabled:void 0,tabIndex:t?void 0:i,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?o:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const Ue=a.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,Ve);const[a,{tagName:s}]=ze(Object.assign({tagName:n,disabled:r},o));return(0,v.jsx)(s,Object.assign({},o,a,{ref:t}))});Ue.displayName="Button";const Ge=Ue,qe=["onKeyDown"],Xe=a.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,qe);const[o]=ze(Object.assign({tagName:"a"},r)),a=Fe(e=>{o.onKeyDown(e),null==n||n(e)});return(s=r.href)&&"#"!==s.trim()&&"button"!==r.role?(0,v.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,v.jsx)("a",Object.assign({ref:t},r,o,{onKeyDown:a}));var s});Xe.displayName="Anchor";const Ye=Xe,Ze=a.forwardRef(({className:e,bsPrefix:t,as:n=Ye,...r},a)=>(t=w(t,"alert-link"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ze.displayName="AlertLink";const Je=Ze,Qe={[B]:"show",[F]:"show"},et=a.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...s},i)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...s},c=(0,a.useCallback)((e,t)=>{re(e),null==r||r(e,t)},[r]);return(0,v.jsx)(le,{ref:i,addEndListener:te,...l,onEnter:c,childRef:z(t),children:(r,s)=>a.cloneElement(t,{...s,className:o()("fade",e,t.props.className,Qe[r],n[r])})})});et.displayName="Fade";const tt=et;var nt=n(5556),rt=n.n(nt);const ot={"aria-label":rt().string,onClick:rt().func,variant:rt().oneOf(["white"])},at=a.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},a)=>(0,v.jsx)("button",{ref:a,type:"button",className:o()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));at.displayName="CloseButton",at.propTypes=ot;const st=at,it=a.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:a="Close alert",closeVariant:s,className:i,children:l,variant:c="primary",onClose:u,dismissible:d,transition:f=tt,...p}=m(e,{show:"onClose"}),h=w(n,"alert"),x=De(e=>{u&&u(!1,e)}),b=!0===f?tt:f,g=(0,v.jsxs)("div",{role:"alert",...b?void 0:p,ref:t,className:o()(i,h,c&&`${h}-${c}`,d&&`${h}-dismissible`),children:[d&&(0,v.jsx)(st,{onClick:x,"aria-label":a,variant:s}),l]});return b?(0,v.jsx)(b,{unmountOnExit:!0,...p,ref:void 0,in:r,children:g}):r?g:null});it.displayName="Alert";const lt=Object.assign(it,{Link:Je,Heading:Ae}),ct=Ye,ut=a.forwardRef(({bsPrefix:e,bg:t="primary",pill:n=!1,text:r,className:a,as:s="span",...i},l)=>{const c=w(e,"badge");return(0,v.jsx)(s,{ref:l,...i,className:o()(a,c,n&&"rounded-pill",r&&`text-${r}`,t&&`bg-${t}`)})});ut.displayName="Badge";const dt=ut,ft=a.forwardRef(({bsPrefix:e,active:t=!1,children:n,className:r,as:a="li",linkAs:s=Ye,linkProps:i={},href:l,title:c,target:u,...d},f)=>{const p=w(e,"breadcrumb-item");return(0,v.jsx)(a,{ref:f,...d,className:o()(p,r,{active:t}),"aria-current":t?"page":void 0,children:t?n:(0,v.jsx)(s,{...i,href:l,title:c,target:u,children:n})})});ft.displayName="BreadcrumbItem";const pt=ft,mt=a.forwardRef(({bsPrefix:e,className:t,listProps:n={},children:r,label:a="breadcrumb",as:s="nav",...i},l)=>{const c=w(e,"breadcrumb");return(0,v.jsx)(s,{"aria-label":a,className:t,ref:l,...i,children:(0,v.jsx)("ol",{...n,className:o()(c,null==n?void 0:n.className),children:r})})});mt.displayName="Breadcrumb";const vt=Object.assign(mt,{Item:pt}),ht=a.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:a=!1,disabled:s=!1,className:i,...l},c)=>{const u=w(t,"btn"),[d,{tagName:f}]=ze({tagName:e,disabled:s,...l}),p=f;return(0,v.jsx)(p,{...d,...l,ref:c,disabled:s,className:o()(i,u,a&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});ht.displayName="Button";const xt=ht,bt=a.forwardRef(({bsPrefix:e,size:t,vertical:n=!1,className:r,role:a="group",as:s="div",...i},l)=>{const c=w(e,"btn-group");let u=c;return n&&(u=`${c}-vertical`),(0,v.jsx)(s,{...i,ref:l,role:a,className:o()(r,u,t&&`${c}-${t}`)})});bt.displayName="ButtonGroup";const gt=bt,yt=a.forwardRef(({bsPrefix:e,className:t,role:n="toolbar",...r},a)=>{const s=w(e,"btn-toolbar");return(0,v.jsx)("div",{...r,ref:a,className:o()(t,s),role:n})});yt.displayName="ButtonToolbar";const wt=yt,Et=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"card-body"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Et.displayName="CardBody";const Nt=Et,Ct=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"card-footer"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ct.displayName="CardFooter";const jt=Ct,Ot=a.createContext(null);Ot.displayName="CardHeaderContext";const Rt=Ot,kt=a.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},s)=>{const i=w(e,"card-header"),l=(0,a.useMemo)(()=>({cardHeaderBsPrefix:i}),[i]);return(0,v.jsx)(Rt.Provider,{value:l,children:(0,v.jsx)(n,{ref:s,...r,className:o()(t,i)})})});kt.displayName="CardHeader";const Pt=kt,Tt=a.forwardRef(({bsPrefix:e,className:t,variant:n,as:r="img",...a},s)=>{const i=w(e,"card-img");return(0,v.jsx)(r,{ref:s,className:o()(n?`${i}-${n}`:i,t),...a})});Tt.displayName="CardImg";const $t=Tt,St=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"card-img-overlay"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));St.displayName="CardImgOverlay";const Dt=St,It=a.forwardRef(({className:e,bsPrefix:t,as:n="a",...r},a)=>(t=w(t,"card-link"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));It.displayName="CardLink";const Mt=It,Lt=Ie("h6"),At=a.forwardRef(({className:e,bsPrefix:t,as:n=Lt,...r},a)=>(t=w(t,"card-subtitle"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));At.displayName="CardSubtitle";const Bt=At,Ft=a.forwardRef(({className:e,bsPrefix:t,as:n="p",...r},a)=>(t=w(t,"card-text"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ft.displayName="CardText";const Ht=Ft,_t=Ie("h5"),Kt=a.forwardRef(({className:e,bsPrefix:t,as:n=_t,...r},a)=>(t=w(t,"card-title"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Kt.displayName="CardTitle";const Wt=Kt,Vt=a.forwardRef(({bsPrefix:e,className:t,bg:n,text:r,border:a,body:s=!1,children:i,as:l="div",...c},u)=>{const d=w(e,"card");return(0,v.jsx)(l,{ref:u,...c,className:o()(t,d,n&&`bg-${n}`,r&&`text-${r}`,a&&`border-${a}`),children:s?(0,v.jsx)(Nt,{children:i}):i})});Vt.displayName="Card";const zt=Object.assign(Vt,{Img:$t,Title:Wt,Subtitle:Bt,Body:Nt,Link:Mt,Text:Ht,Header:Pt,Footer:jt,ImgOverlay:Dt}),Ut=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"card-group"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ut.displayName="CardGroup";const Gt=Ut;function qt(e){const t=function(e){const t=(0,a.useRef)(e);return t.current=e,t}(e);(0,a.useEffect)(()=>()=>t.current(),[])}const Xt=2**31-1;function Yt(e,t,n){const r=n-Date.now();e.current=r<=Xt?setTimeout(t,r):setTimeout(()=>Yt(e,t,n),Xt)}function Zt(){const e=function(){const e=(0,a.useRef)(!0),t=(0,a.useRef)(()=>e.current);return(0,a.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}(),t=(0,a.useRef)();return qt(()=>clearTimeout(t.current)),(0,a.useMemo)(()=>{const n=()=>clearTimeout(t.current);return{set:function(r,o=0){e()&&(n(),o<=Xt?t.current=setTimeout(r,o):Yt(t,r,Date.now()+o))},clear:n,handleRef:t}},[])}const Jt=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"carousel-caption"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Jt.displayName="CarouselCaption";const Qt=Jt,en=a.forwardRef(({as:e="div",bsPrefix:t,className:n,...r},a)=>{const s=o()(n,w(t,"carousel-item"));return(0,v.jsx)(e,{ref:a,...r,className:s})});en.displayName="CarouselItem";const tn=en;function nn(e,t){let n=0;return a.Children.map(e,e=>a.isValidElement(e)?t(e,n++):e)}function rn(e,t){let n=0;a.Children.forEach(e,e=>{a.isValidElement(e)&&t(e,n++)})}const on=a.forwardRef(({defaultActiveIndex:e=0,...t},n)=>{const{as:r="div",bsPrefix:s,slide:i=!0,fade:l=!1,controls:c=!0,indicators:u=!0,indicatorLabels:d=[],activeIndex:f,onSelect:p,onSlide:h,onSlid:x,interval:b=5e3,keyboard:g=!0,onKeyDown:y,pause:E="hover",onMouseOver:N,onMouseOut:j,wrap:O=!0,touch:R=!0,onTouchStart:k,onTouchMove:P,onTouchEnd:T,prevIcon:$=(0,v.jsx)("span",{"aria-hidden":"true",className:"carousel-control-prev-icon"}),prevLabel:S="Previous",nextIcon:D=(0,v.jsx)("span",{"aria-hidden":"true",className:"carousel-control-next-icon"}),nextLabel:I="Next",variant:M,className:L,children:A,...B}=m({defaultActiveIndex:e,...t},{activeIndex:"onSelect"}),F=w(s,"carousel"),H=C(),_=(0,a.useRef)(null),[K,W]=(0,a.useState)("next"),[V,z]=(0,a.useState)(!1),[U,G]=(0,a.useState)(!1),[q,X]=(0,a.useState)(f||0);(0,a.useEffect)(()=>{U||f===q||(_.current?W(_.current):W((f||0)>q?"next":"prev"),i&&G(!0),X(f||0))},[f,U,q,i]),(0,a.useEffect)(()=>{_.current&&(_.current=null)});let Y,Z=0;rn(A,(e,t)=>{++Z,t===f&&(Y=e.props.interval)});const J=Se(Y),Q=(0,a.useCallback)(e=>{if(U)return;let t=q-1;if(t<0){if(!O)return;t=Z-1}_.current="prev",null==p||p(t,e)},[U,q,p,O,Z]),ee=De(e=>{if(U)return;let t=q+1;if(t>=Z){if(!O)return;t=0}_.current="next",null==p||p(t,e)}),ne=(0,a.useRef)();(0,a.useImperativeHandle)(n,()=>({element:ne.current,prev:Q,next:ee}));const oe=De(()=>{!document.hidden&&function(e){if(!(e&&e.style&&e.parentNode&&e.parentNode.style))return!1;const t=getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"none"!==getComputedStyle(e.parentNode).display}(ne.current)&&(H?Q():ee())}),ae="next"===K?"start":"end";!function(e,t){const n=(0,a.useRef)(!0);(0,a.useEffect)(()=>{if(!n.current)return e();n.current=!1},t)}(()=>{i||(null==h||h(q,ae),null==x||x(q,ae))},[q]);const se=`${F}-item-${K}`,ie=`${F}-item-${ae}`,ce=(0,a.useCallback)(e=>{re(e),null==h||h(q,ae)},[h,q,ae]),ue=(0,a.useCallback)(()=>{G(!1),null==x||x(q,ae)},[x,q,ae]),de=(0,a.useCallback)(e=>{if(g&&!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":return e.preventDefault(),void(H?ee(e):Q(e));case"ArrowRight":return e.preventDefault(),void(H?Q(e):ee(e))}null==y||y(e)},[g,y,Q,ee,H]),fe=(0,a.useCallback)(e=>{"hover"===E&&z(!0),null==N||N(e)},[E,N]),pe=(0,a.useCallback)(e=>{z(!1),null==j||j(e)},[j]),me=(0,a.useRef)(0),ve=(0,a.useRef)(0),he=Zt(),xe=(0,a.useCallback)(e=>{me.current=e.touches[0].clientX,ve.current=0,"hover"===E&&z(!0),null==k||k(e)},[E,k]),be=(0,a.useCallback)(e=>{e.touches&&e.touches.length>1?ve.current=0:ve.current=e.touches[0].clientX-me.current,null==P||P(e)},[P]),ge=(0,a.useCallback)(e=>{if(R){const t=ve.current;Math.abs(t)>40&&(t>0?Q(e):ee(e))}"hover"===E&&he.set(()=>{z(!1)},b||void 0),null==T||T(e)},[R,E,Q,ee,he,b,T]),ye=null!=b&&!V&&!U,we=(0,a.useRef)();(0,a.useEffect)(()=>{var e,t;if(!ye)return;const n=H?Q:ee;return we.current=window.setInterval(document.visibilityState?oe:n,null!=(e=null!=(t=J.current)?t:b)?e:void 0),()=>{null!==we.current&&clearInterval(we.current)}},[ye,Q,ee,J,b,oe,H]);const Ee=(0,a.useMemo)(()=>u&&Array.from({length:Z},(e,t)=>e=>{null==p||p(t,e)}),[u,Z,p]);return(0,v.jsxs)(r,{ref:ne,...B,onKeyDown:de,onMouseOver:fe,onMouseOut:pe,onTouchStart:xe,onTouchMove:be,onTouchEnd:ge,className:o()(L,F,i&&"slide",l&&`${F}-fade`,M&&`${F}-${M}`),children:[u&&(0,v.jsx)("div",{className:`${F}-indicators`,children:nn(A,(e,t)=>(0,v.jsx)("button",{type:"button","data-bs-target":"","aria-label":null!=d&&d.length?d[t]:`Slide ${t+1}`,className:t===q?"active":void 0,onClick:Ee?Ee[t]:void 0,"aria-current":t===q},t))}),(0,v.jsx)("div",{className:`${F}-inner`,children:nn(A,(e,t)=>{const n=t===q;return i?(0,v.jsx)(le,{in:n,onEnter:n?ce:void 0,onEntered:n?ue:void 0,addEndListener:te,children:(t,r)=>a.cloneElement(e,{...r,className:o()(e.props.className,n&&"entered"!==t&&se,("entered"===t||"exiting"===t)&&"active",("entering"===t||"exiting"===t)&&ie)})}):a.cloneElement(e,{className:o()(e.props.className,n&&"active")})})}),c&&(0,v.jsxs)(v.Fragment,{children:[(O||0!==f)&&(0,v.jsxs)(Ye,{className:`${F}-control-prev`,onClick:Q,children:[$,S&&(0,v.jsx)("span",{className:"visually-hidden",children:S})]}),(O||f!==Z-1)&&(0,v.jsxs)(Ye,{className:`${F}-control-next`,onClick:ee,children:[D,I&&(0,v.jsx)("span",{className:"visually-hidden",children:I})]})]})]})});on.displayName="Carousel";const an=Object.assign(on,{Caption:Qt,Item:tn});function sn({as:e,bsPrefix:t,className:n,...r}){t=w(t,"col");const a=E(),s=N(),i=[],l=[];return a.forEach(e=>{const n=r[e];let o,a,c;delete r[e],"object"==typeof n&&null!=n?({span:o,offset:a,order:c}=n):o=n;const u=e!==s?`-${e}`:"";o&&i.push(!0===o?`${t}${u}`:`${t}${u}-${o}`),null!=c&&l.push(`order${u}-${c}`),null!=a&&l.push(`offset${u}-${a}`)}),[{...r,className:o()(n,...i,...l)},{as:e,bsPrefix:t,spans:i}]}const ln=a.forwardRef((e,t)=>{const[{className:n,...r},{as:a="div",bsPrefix:s,spans:i}]=sn(e);return(0,v.jsx)(a,{...r,ref:t,className:o()(n,!i.length&&s)})});ln.displayName="Col";const cn=ln,un=a.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...a},s)=>{const i=w(e,"container"),l="string"==typeof t?`-${t}`:"-fluid";return(0,v.jsx)(n,{ref:s,...a,className:o()(r,t?`${i}${l}`:i)})});un.displayName="Container";const dn=un;var fn=Function.prototype.bind.call(Function.prototype.call,[].slice);function pn(e,t){return fn(e.querySelectorAll(t))}function mn(e,t,n){const r=(0,a.useRef)(void 0!==e),[o,s]=(0,a.useState)(t),i=void 0!==e,l=r.current;return r.current=i,!i&&l&&o!==t&&s(t),[i?e:o,(0,a.useCallback)((...e)=>{const[t,...r]=e;let o=null==n?void 0:n(t,...r);return s(t),o},[n])]}function vn(){const[,e]=(0,a.useReducer)(e=>e+1,0);return e}const hn=a.createContext(null);var xn=Object.prototype.hasOwnProperty;function bn(e,t,n){for(n of e.keys())if(gn(n,t))return n}function gn(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&gn(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((o=r)&&"object"==typeof o&&!(o=bn(t,o)))return!1;if(!t.has(o))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((o=r[0])&&"object"==typeof o&&!(o=bn(t,o)))return!1;if(!gn(r[1],t.get(o)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(xn.call(e,n)&&++r&&!xn.call(t,n))return!1;if(!(n in t)||!gn(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function yn(e){return e.split("-")[0]}function wn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function En(e){return e instanceof wn(e).Element||e instanceof Element}function Nn(e){return e instanceof wn(e).HTMLElement||e instanceof HTMLElement}function Cn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof wn(e).ShadowRoot||e instanceof ShadowRoot)}var jn=Math.max,On=Math.min,Rn=Math.round;function kn(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Pn(){return!/^((?!chrome|android).)*safari/i.test(kn())}function Tn(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Nn(e)&&(o=e.offsetWidth>0&&Rn(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Rn(r.height)/e.offsetHeight||1);var s=(En(e)?wn(e):window).visualViewport,i=!Pn()&&n,l=(r.left+(i&&s?s.offsetLeft:0))/o,c=(r.top+(i&&s?s.offsetTop:0))/a,u=r.width/o,d=r.height/a;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $n(e){var t=Tn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Sn(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Cn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Dn(e){return e?(e.nodeName||"").toLowerCase():null}function In(e){return wn(e).getComputedStyle(e)}function Mn(e){return["table","td","th"].indexOf(Dn(e))>=0}function Ln(e){return((En(e)?e.ownerDocument:e.document)||window.document).documentElement}function An(e){return"html"===Dn(e)?e:e.assignedSlot||e.parentNode||(Cn(e)?e.host:null)||Ln(e)}function Bn(e){return Nn(e)&&"fixed"!==In(e).position?e.offsetParent:null}function Fn(e){for(var t=wn(e),n=Bn(e);n&&Mn(n)&&"static"===In(n).position;)n=Bn(n);return n&&("html"===Dn(n)||"body"===Dn(n)&&"static"===In(n).position)?t:n||function(e){var t=/firefox/i.test(kn());if(/Trident/i.test(kn())&&Nn(e)&&"fixed"===In(e).position)return null;var n=An(e);for(Cn(n)&&(n=n.host);Nn(n)&&["html","body"].indexOf(Dn(n))<0;){var r=In(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Hn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _n(e,t,n){return jn(e,On(t,n))}function Kn(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Wn(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Vn="top",zn="bottom",Un="right",Gn="left",qn="auto",Xn=[Vn,zn,Un,Gn],Yn="start",Zn="end",Jn="viewport",Qn="popper",er=Xn.reduce(function(e,t){return e.concat([t+"-"+Yn,t+"-"+Zn])},[]),tr=[].concat(Xn,[qn]).reduce(function(e,t){return e.concat([t,t+"-"+Yn,t+"-"+Zn])},[]),nr=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];const rr={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,i=yn(n.placement),l=Hn(i),c=[Gn,Un].indexOf(i)>=0?"height":"width";if(a&&s){var u=function(e,t){return Kn("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Wn(e,Xn))}(o.padding,n),d=$n(a),f="y"===l?Vn:Gn,p="y"===l?zn:Un,m=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],v=s[l]-n.rects.reference[l],h=Fn(a),x=h?"y"===l?h.clientHeight||0:h.clientWidth||0:0,b=m/2-v/2,g=u[f],y=x-d[c]-u[p],w=x/2-d[c]/2+b,E=_n(g,w,y),N=l;n.modifiersData[r]=((t={})[N]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Sn(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function or(e){return e.split("-")[1]}var ar={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sr(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,i=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,p=void 0===f?0:f,m=s.y,v=void 0===m?0:m,h="function"==typeof u?u({x:p,y:v}):{x:p,y:v};p=h.x,v=h.y;var x=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),g=Gn,y=Vn,w=window;if(c){var E=Fn(n),N="clientHeight",C="clientWidth";E===wn(n)&&"static"!==In(E=Ln(n)).position&&"absolute"===i&&(N="scrollHeight",C="scrollWidth"),(o===Vn||(o===Gn||o===Un)&&a===Zn)&&(y=zn,v-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[N])-r.height,v*=l?1:-1),o!==Gn&&(o!==Vn&&o!==zn||a!==Zn)||(g=Un,p-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-r.width,p*=l?1:-1)}var j,O=Object.assign({position:i},c&&ar),R=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Rn(n*o)/o||0,y:Rn(r*o)/o||0}}({x:p,y:v},wn(n)):{x:p,y:v};return p=R.x,v=R.y,l?Object.assign({},O,((j={})[y]=b?"0":"",j[g]=x?"0":"",j.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",j)):Object.assign({},O,((t={})[y]=b?v+"px":"",t[g]=x?p+"px":"",t.transform="",t))}const ir={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,s=void 0===a||a,i=n.roundOffsets,l=void 0===i||i,c={placement:yn(t.placement),variation:or(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,sr(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,sr(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var lr={passive:!0};const cr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,s=r.resize,i=void 0===s||s,l=wn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",n.update,lr)}),i&&l.addEventListener("resize",n.update,lr),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",n.update,lr)}),i&&l.removeEventListener("resize",n.update,lr)}},data:{}};var ur={left:"right",right:"left",bottom:"top",top:"bottom"};function dr(e){return e.replace(/left|right|bottom|top/g,function(e){return ur[e]})}var fr={start:"end",end:"start"};function pr(e){return e.replace(/start|end/g,function(e){return fr[e]})}function mr(e){var t=wn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vr(e){return Tn(Ln(e)).left+mr(e).scrollLeft}function hr(e){var t=In(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function xr(e){return["html","body","#document"].indexOf(Dn(e))>=0?e.ownerDocument.body:Nn(e)&&hr(e)?e:xr(An(e))}function br(e,t){var n;void 0===t&&(t=[]);var r=xr(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=wn(r),s=o?[a].concat(a.visualViewport||[],hr(r)?r:[]):r,i=t.concat(s);return o?i:i.concat(br(An(s)))}function gr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yr(e,t,n){return t===Jn?gr(function(e,t){var n=wn(e),r=Ln(e),o=n.visualViewport,a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;var c=Pn();(c||!c&&"fixed"===t)&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i+vr(e),y:l}}(e,n)):En(t)?function(e,t){var n=Tn(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):gr(function(e){var t,n=Ln(e),r=mr(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=jn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=jn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),i=-r.scrollLeft+vr(e),l=-r.scrollTop;return"rtl"===In(o||n).direction&&(i+=jn(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:i,y:l}}(Ln(e)))}function wr(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?yn(o):null,s=o?or(o):null,i=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case Vn:t={x:i,y:n.y-r.height};break;case zn:t={x:i,y:n.y+n.height};break;case Un:t={x:n.x+n.width,y:l};break;case Gn:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?Hn(a):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Yn:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Zn:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Er(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,s=void 0===a?e.strategy:a,i=n.boundary,l=void 0===i?"clippingParents":i,c=n.rootBoundary,u=void 0===c?Jn:c,d=n.elementContext,f=void 0===d?Qn:d,p=n.altBoundary,m=void 0!==p&&p,v=n.padding,h=void 0===v?0:v,x=Kn("number"!=typeof h?h:Wn(h,Xn)),b=f===Qn?"reference":Qn,g=e.rects.popper,y=e.elements[m?b:f],w=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=br(An(e)),n=["absolute","fixed"].indexOf(In(e).position)>=0&&Nn(e)?Fn(e):e;return En(n)?t.filter(function(e){return En(e)&&Sn(e,n)&&"body"!==Dn(e)}):[]}(e):[].concat(t),a=[].concat(o,[n]),s=a[0],i=a.reduce(function(t,n){var o=yr(e,n,r);return t.top=jn(o.top,t.top),t.right=On(o.right,t.right),t.bottom=On(o.bottom,t.bottom),t.left=jn(o.left,t.left),t},yr(e,s,r));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(En(y)?y:y.contextElement||Ln(e.elements.popper),l,u,s),E=Tn(e.elements.reference),N=wr({reference:E,element:g,strategy:"absolute",placement:o}),C=gr(Object.assign({},g,N)),j=f===Qn?C:E,O={top:w.top-j.top+x.top,bottom:j.bottom-w.bottom+x.bottom,left:w.left-j.left+x.left,right:j.right-w.right+x.right},R=e.modifiersData.offset;if(f===Qn&&R){var k=R[o];Object.keys(O).forEach(function(e){var t=[Un,zn].indexOf(e)>=0?1:-1,n=[Vn,zn].indexOf(e)>=0?"y":"x";O[e]+=k[n]*t})}return O}const Nr={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,s=n.altAxis,i=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=void 0===p||p,v=n.allowedAutoPlacements,h=t.options.placement,x=yn(h),b=l||(x!==h&&m?function(e){if(yn(e)===qn)return[];var t=dr(e);return[pr(e),t,pr(t)]}(h):[dr(h)]),g=[h].concat(b).reduce(function(e,n){return e.concat(yn(n)===qn?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,s=n.padding,i=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?tr:l,u=or(r),d=u?i?er:er.filter(function(e){return or(e)===u}):Xn,f=d.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=d);var p=f.reduce(function(t,n){return t[n]=Er(e,{placement:n,boundary:o,rootBoundary:a,padding:s})[yn(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:v}):n)},[]),y=t.rects.reference,w=t.rects.popper,E=new Map,N=!0,C=g[0],j=0;j<g.length;j++){var O=g[j],R=yn(O),k=or(O)===Yn,P=[Vn,zn].indexOf(R)>=0,T=P?"width":"height",$=Er(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),S=P?k?Un:Gn:k?zn:Vn;y[T]>w[T]&&(S=dr(S));var D=dr(S),I=[];if(a&&I.push($[R]<=0),i&&I.push($[S]<=0,$[D]<=0),I.every(function(e){return e})){C=O,N=!1;break}E.set(O,I)}if(N)for(var M=function(e){var t=g.find(function(t){var n=E.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},L=m?3:1;L>0&&"break"!==M(L);L--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Cr(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function jr(e){return[Vn,Un,zn,Gn].some(function(t){return e[t]>=0})}const Or={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,s=tr.reduce(function(e,n){return e[n]=function(e,t,n){var r=yn(e),o=[Gn,Vn].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=a[0],i=a[1];return s=s||0,i=(i||0)*o,[Gn,Un].indexOf(r)>=0?{x:i,y:s}:{x:s,y:i}}(n,t.rects,a),e},{}),i=s[t.placement],l=i.x,c=i.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},Rr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,s=n.altAxis,i=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,m=n.tetherOffset,v=void 0===m?0:m,h=Er(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),x=yn(t.placement),b=or(t.placement),g=!b,y=Hn(x),w="x"===y?"y":"x",E=t.modifiersData.popperOffsets,N=t.rects.reference,C=t.rects.popper,j="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,O="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(E){if(a){var P,T="y"===y?Vn:Gn,$="y"===y?zn:Un,S="y"===y?"height":"width",D=E[y],I=D+h[T],M=D-h[$],L=p?-C[S]/2:0,A=b===Yn?N[S]:C[S],B=b===Yn?-C[S]:-N[S],F=t.elements.arrow,H=p&&F?$n(F):{width:0,height:0},_=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=_[T],W=_[$],V=_n(0,N[S],H[S]),z=g?N[S]/2-L-V-K-O.mainAxis:A-V-K-O.mainAxis,U=g?-N[S]/2+L+V+W+O.mainAxis:B+V+W+O.mainAxis,G=t.elements.arrow&&Fn(t.elements.arrow),q=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,X=null!=(P=null==R?void 0:R[y])?P:0,Y=D+U-X,Z=_n(p?On(I,D+z-X-q):I,D,p?jn(M,Y):M);E[y]=Z,k[y]=Z-D}if(i){var J,Q="x"===y?Vn:Gn,ee="x"===y?zn:Un,te=E[w],ne="y"===w?"height":"width",re=te+h[Q],oe=te-h[ee],ae=-1!==[Vn,Gn].indexOf(x),se=null!=(J=null==R?void 0:R[w])?J:0,ie=ae?re:te-N[ne]-C[ne]-se+O.altAxis,le=ae?te+N[ne]+C[ne]-se-O.altAxis:oe,ce=p&&ae?function(e,t,n){var r=_n(e,t,n);return r>n?n:r}(ie,te,le):_n(p?ie:re,te,p?le:oe);E[w]=ce,k[w]=ce-te}t.modifiersData[r]=k}},requiresIfExists:["offset"]};function kr(e,t,n){void 0===n&&(n=!1);var r,o,a=Nn(t),s=Nn(t)&&function(e){var t=e.getBoundingClientRect(),n=Rn(t.width)/e.offsetWidth||1,r=Rn(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Ln(t),l=Tn(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==Dn(t)||hr(i))&&(c=(r=t)!==wn(r)&&Nn(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:mr(r)),Nn(t)?((u=Tn(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=vr(i))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Pr(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var Tr={placement:"bottom",modifiers:[],strategy:"absolute"};function $r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}const Sr=function(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?Tr:o;return function(e,t,n){void 0===n&&(n=a);var o,s,i={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tr,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:i,setOptions:function(n){var o="function"==typeof n?n(i.options):n;d(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:En(e)?br(e):e.contextElement?br(e.contextElement):[],popper:br(t)};var s,c,f=function(e){var t=Pr(e);return nr.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((s=[].concat(r,i.options.modifiers),c=s.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return i.orderedModifiers=f.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var a=o({state:i,name:t,instance:u,options:r});l.push(a||function(){})}}),u.update()},forceUpdate:function(){if(!c){var e=i.elements,t=e.reference,n=e.popper;if($r(t,n)){i.rects={reference:kr(t,Fn(n),"fixed"===i.options.strategy),popper:$n(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,s=o.options,l=void 0===s?{}:s,d=o.name;"function"==typeof a&&(i=a({state:i,options:l,name:d,instance:u})||i)}else i.reset=!1,r=-1}}},update:(o=function(){return new Promise(function(e){u.forceUpdate(),e(i)})},function(){return s||(s=new Promise(function(e){Promise.resolve().then(function(){s=void 0,e(o())})})),s}),destroy:function(){d(),c=!0}};if(!$r(e,t))return u;function d(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}({defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Er(t,{elementContext:"reference"}),i=Er(t,{altBoundary:!0}),l=Cr(s,r),c=Cr(i,o,a),u=jr(l),d=jr(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=wr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ir,cr,Or,Nr,Rr,rr]}),Dr=["enabled","placement","strategy","modifiers"],Ir={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Mr={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==n.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===o&&"setAttribute"in r){const e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},Lr=[],Ar=function(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Lr}=n,l=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(n,Dr);const c=(0,a.useRef)(i),u=(0,a.useRef)(),d=(0,a.useCallback)(()=>{var e;null==(e=u.current)||e.update()},[]),f=(0,a.useCallback)(()=>{var e;null==(e=u.current)||e.forceUpdate()},[]),[p,m]=function(e){const t=He();return[e[0],(0,a.useCallback)(n=>{if(t())return e[1](n)},[t,e[1]])]}((0,a.useState)({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),v=(0,a.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{const t={},n={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],n[r]=e.attributes[r]}),m({state:e,styles:t,attributes:n,update:d,forceUpdate:f,placement:e.placement})}}),[d,f,m]),h=(0,a.useMemo)(()=>(gn(c.current,i)||(c.current=i),c.current),[i]);return(0,a.useEffect)(()=>{u.current&&r&&u.current.setOptions({placement:o,strategy:s,modifiers:[...h,v,Ir]})},[s,o,v,r,h]),(0,a.useEffect)(()=>{if(r&&null!=e&&null!=t)return u.current=Sr(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...h,Mr,v]})),()=>{null!=u.current&&(u.current.destroy(),u.current=void 0,m(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p};function Br(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var Fr=n(9771),Hr=n.n(Fr);const _r=()=>{},Kr=e=>e&&("current"in e?e.current:e),Wr={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},Vr=function(e,t=_r,{disabled:n,clickTrigger:r="click"}={}){const o=(0,a.useRef)(!1),s=(0,a.useRef)(!1),i=(0,a.useCallback)(t=>{const n=Kr(e);var r;Hr()(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!n||!!((r=t).metaKey||r.altKey||r.ctrlKey||r.shiftKey)||!function(e){return 0===e.button}(t)||!!Br(n,t.target)||s.current,s.current=!1},[e]),l=Fe(t=>{const n=Kr(e);n&&Br(n,t.target)?s.current=!0:s.current=!1}),c=Fe(e=>{o.current||t(e)});(0,a.useEffect)(()=>{var t,o;if(n||null==e)return;const a=O(Kr(e)),s=a.defaultView||window;let u=null!=(t=s.event)?t:null==(o=s.parent)?void 0:o.event,d=null;Wr[r]&&(d=J(a,Wr[r],l,!0));const f=J(a,r,i,!0),p=J(a,r,e=>{e!==u?c(e):u=void 0});let m=[];return"ontouchstart"in a.documentElement&&(m=[].slice.call(a.body.children).map(e=>J(e,"mousemove",_r))),()=>{null==d||d(),f(),p(),m.forEach(e=>e())}},[e,n,r,i,l,c])};function zr(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Ur({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:a,containerPadding:s,arrowElement:i,popperConfig:l={}}){var c,u,d,f,p;const m=function(e){const t={};return Array.isArray(e)?(null==e||e.forEach(e=>{t[e.name]=e}),t):e||t}(l.modifiers);return Object.assign({},l,{placement:n,enabled:e,strategy:a?"fixed":l.strategy,modifiers:zr(Object.assign({},m,{eventListeners:{enabled:t,options:null==(c=m.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},m.preventOverflow,{options:s?Object.assign({padding:s},null==(u=m.preventOverflow)?void 0:u.options):null==(d=m.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:o},null==(f=m.offset)?void 0:f.options)},arrow:Object.assign({},m.arrow,{enabled:!!i,options:Object.assign({},null==(p=m.arrow)?void 0:p.options,{element:i})}),flip:Object.assign({enabled:!!r},m.flip)}))})}const Gr=["children","usePopper"],qr=()=>{};function Xr(e={}){const t=(0,a.useContext)(hn),[n,r]=Be(),o=(0,a.useRef)(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=null==(null==t?void 0:t.show)?!!e.show:t.show;m&&!o.current&&(o.current=!0);const{placement:v,setMenu:h,menuElement:x,toggleElement:b}=t||{},g=Ar(b,x,Ur({placement:u||v||"bottom-start",enabled:p,enableEvents:null==f?m:f,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),y=Object.assign({ref:h||qr,"aria-labelledby":null==b?void 0:b.id},g.attributes.popper,{style:g.styles.popper}),w={show:m,placement:v,hasShown:o.current,toggle:null==t?void 0:t.toggle,popper:p?g:null,arrowProps:p?Object.assign({ref:r},g.attributes.arrow,{style:g.styles.arrow}):{}};return Vr(x,e=>{null==t||t.toggle(!1,e)},{clickTrigger:l,disabled:!m}),[y,w]}function Yr(e){let{children:t,usePopper:n=!0}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,Gr);const[o,a]=Xr(Object.assign({},r,{usePopper:n}));return(0,v.jsx)(v.Fragment,{children:t(o,a)})}Yr.displayName="DropdownMenu";const Zr=Yr,Jr={prefix:String(Math.round(1e10*Math.random())),current:0},Qr=s().createContext(Jr),eo=s().createContext(!1);function to(e){let t=(0,a.useContext)(Qr),n=ro(t===Jr),[r,o]=(0,a.useState)(!0),i=(0,a.useMemo)(()=>({prefix:t===Jr?"":`${t.prefix}-${n}`,current:0}),[t,n]);return"undefined"!=typeof document&&(0,a.useLayoutEffect)(()=>{o(!1)},[]),s().createElement(Qr.Provider,{value:i},s().createElement(eo.Provider,{value:r},e.children))}Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);let no=new WeakMap;function ro(e=!1){let t=(0,a.useContext)(Qr),n=(0,a.useRef)(null);if(null===n.current&&!e){var r,o;let e=null===(o=s().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===o||null===(r=o.ReactCurrentOwner)||void 0===r?void 0:r.current;if(e){let n=no.get(e);null==n?no.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,no.delete(e))}n.current=++t.current}return n.current}const oo="function"==typeof s().useId?function(e){let t=s().useId(),[n]=(0,a.useState)("function"==typeof s().useSyncExternalStore?s().useSyncExternalStore(io,ao,so):(0,a.useContext)(eo));return e||`${n?"react-aria":`react-aria${Jr.prefix}`}-${t}`}:function(e){let t=(0,a.useContext)(Qr),n=ro(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function ao(){return!1}function so(){return!0}function io(e){return()=>{}}const lo=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},co=()=>{};function uo(){const e=oo(),{show:t=!1,toggle:n=co,setToggle:r,menuElement:o}=(0,a.useContext)(hn)||{},s=(0,a.useCallback)(e=>{n(!t,e)},[t,n]),i={id:e,ref:r||co,onClick:s,"aria-expanded":!!t};return o&&lo(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function fo({children:e}){const[t,n]=uo();return(0,v.jsx)(v.Fragment,{children:e(t,n)})}fo.displayName="DropdownToggle";const po=fo,mo=(e,t=null)=>null!=e?String(e):t||null,vo=a.createContext(null),ho=a.createContext(null);ho.displayName="NavContext";const xo=ho;function bo(e){return`data-rr-ui-${e}`}const go=["eventKey","disabled","onClick","active","as"];function yo({key:e,href:t,active:n,disabled:r,onClick:o}){const s=(0,a.useContext)(vo),i=(0,a.useContext)(xo),{activeKey:l}=i||{},c=mo(e,t),u=null==n&&null!=e?mo(l)===c:n;return[{onClick:Fe(e=>{r||(null==o||o(e),s&&!e.isPropagationStopped()&&s(c,e))}),"aria-disabled":r||void 0,"aria-selected":u,[bo("dropdown-item")]:""},{isActive:u}]}const wo=a.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:a,as:s=Ge}=e,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,go);const[l]=yo({key:n,href:i.href,disabled:r,onClick:o,active:a});return(0,v.jsx)(s,Object.assign({},i,{ref:t},l))});wo.displayName="DropdownItem";const Eo=wo,No=(0,a.createContext)(U?window:void 0);function Co(){return(0,a.useContext)(No)}function jo(){const e=vn(),t=(0,a.useRef)(null),n=(0,a.useCallback)(n=>{t.current=n,e()},[e]);return[t,n]}function Oo({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${bo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Co(),[u,d]=mn(t,e,r),[f,p]=jo(),m=f.current,[h,x]=jo(),b=h.current,g=_e(u),y=(0,a.useRef)(null),w=(0,a.useRef)(!1),E=(0,a.useContext)(vo),N=(0,a.useCallback)((e,t,n=(null==t?void 0:t.type))=>{d(e,{originalEvent:t,source:n})},[d]),C=Fe((e,t)=>{null==n||n(e,t),N(!1,t,"select"),t.isPropagationStopped()||null==E||E(e,t)}),j=(0,a.useMemo)(()=>({toggle:N,placement:i,show:u,menuElement:m,toggleElement:b,setMenu:p,setToggle:x}),[N,i,u,m,b,p,x]);m&&g&&!u&&(w.current=m.contains(m.ownerDocument.activeElement));const O=Fe(()=>{b&&b.focus&&b.focus()}),R=Fe(()=>{const e=y.current;let t=s;if(null==t&&(t=!(!f.current||!lo(f.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=pn(f.current,o)[0];n&&n.focus&&n.focus()});(0,a.useEffect)(()=>{u?R():w.current&&(w.current=!1,O())},[u,w,O,R]),(0,a.useEffect)(()=>{y.current=null});const k=(e,t)=>{if(!f.current)return null;const n=pn(f.current,o);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return function(e,t,n,r=!1){const o=Fe(n);(0,a.useEffect)(()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,o,r),()=>n.removeEventListener(t,o,r)},[e])}((0,a.useCallback)(()=>c.document,[c]),"keydown",e=>{var t,n;const{key:r}=e,o=e.target,a=null==(t=f.current)?void 0:t.contains(o),s=null==(n=h.current)?void 0:n.contains(o);if(/input|textarea/i.test(o.tagName)&&(" "===r||"Escape"!==r&&a||"Escape"===r&&"search"===o.type))return;if(!a&&!s)return;if(!("Tab"!==r||f.current&&u))return;y.current=e.type;const i={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=k(o,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),u){const e=k(o,1);e&&e.focus&&e.focus()}else d(!0,i);return;case"Tab":Y(o.ownerDocument,"keyup",e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=f.current)&&t.contains(e.target)||d(!1,i)},{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),d(!1,i)}}),(0,v.jsx)(vo.Provider,{value:C,children:(0,v.jsx)(hn.Provider,{value:j,children:l})})}No.Provider,Oo.displayName="Dropdown",Oo.Menu=Zr,Oo.Toggle=po,Oo.Item=Eo;const Ro=Oo,ko=a.createContext({});ko.displayName="DropdownContext";const Po=ko,To=a.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...a},s)=>(t=w(t,"dropdown-divider"),(0,v.jsx)(n,{ref:s,className:o()(e,t),role:r,...a})));To.displayName="DropdownDivider";const $o=To,So=a.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...a},s)=>(t=w(t,"dropdown-header"),(0,v.jsx)(n,{ref:s,className:o()(e,t),role:r,...a})));So.displayName="DropdownHeader";const Do=So,Io=a.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:a,active:s,as:i=Ye,...l},c)=>{const u=w(e,"dropdown-item"),[d,f]=yo({key:n,href:l.href,disabled:r,onClick:a,active:s});return(0,v.jsx)(i,{...l,...d,ref:c,className:o()(t,u,f.isActive&&"active",r&&"disabled")})});Io.displayName="DropdownItem";const Mo=Io,Lo=a.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=w(t,"dropdown-item-text"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Lo.displayName="DropdownItemText";const Ao=Lo,Bo=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,Fo="undefined"!=typeof document||Bo?a.useLayoutEffect:a.useEffect,Ho=a.createContext(null);Ho.displayName="InputGroupContext";const _o=Ho,Ko=a.createContext(null);Ko.displayName="NavbarContext";const Wo=Ko;function Vo(e,t){return e}function zo(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}const Uo=a.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:s=!0,show:i,renderOnMount:l,as:c="div",popperConfig:u,variant:d,...f},p)=>{let m=!1;const h=(0,a.useContext)(Wo),x=w(e,"dropdown-menu"),{align:b,drop:g,isRTL:y}=(0,a.useContext)(Po);n=n||b;const E=(0,a.useContext)(_o),N=[];if(n)if("object"==typeof n){const e=Object.keys(n);if(e.length){const t=e[0],r=n[t];m="start"===r,N.push(`${x}-${t}-${r}`)}}else"end"===n&&(m=!0);const C=zo(m,g,y),[j,{hasShown:O,popper:R,show:k,toggle:P}]=Xr({flip:s,rootCloseEvent:r,show:i,usePopper:!h&&0===N.length,offset:[0,2],popperConfig:u,placement:C});if(j.ref=ae(Vo(p),j.ref),Fo(()=>{k&&(null==R||R.update())},[k]),!O&&!l&&!E)return null;"string"!=typeof c&&(j.show=k,j.close=()=>null==P?void 0:P(!1),j.align=n);let T=f.style;return null!=R&&R.placement&&(T={...f.style,...j.style},f["x-placement"]=R.placement),(0,v.jsx)(c,{...f,...j,style:T,...(N.length||h)&&{"data-bs-popper":"static"},className:o()(t,x,k&&"show",m&&`${x}-end`,d&&`${x}-${d}`,...N)})});Uo.displayName="DropdownMenu";const Go=Uo,qo=a.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:s=xt,...i},l)=>{const c=w(e,"dropdown-toggle"),u=(0,a.useContext)(hn);void 0!==r&&(i.bsPrefix=r);const[d]=uo();return d.ref=ae(d.ref,Vo(l)),(0,v.jsx)(s,{className:o()(n,c,t&&`${c}-split`,(null==u?void 0:u.show)&&"show"),...d,...i})});qo.displayName="DropdownToggle";const Xo=qo,Yo=a.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:s,className:i,align:l="start",onSelect:c,onToggle:u,focusFirstItemOnShow:d,as:f="div",navbar:p,autoClose:h=!0,...x}=m(e,{show:"onToggle"}),b=(0,a.useContext)(_o),g=w(n,"dropdown"),y=C(),E=De((e,t)=>{var n,r;(null==(n=t.originalEvent)||null==(n=n.target)?void 0:n.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),r=t.source,(!1===h?"click"===r:"inside"===h?"rootClose"!==r:"outside"!==h||"select"!==r)&&(null==u||u(e,t)))}),N=zo("end"===l,r,y),j=(0,a.useMemo)(()=>({align:l,drop:r,isRTL:y}),[l,r,y]),O={down:g,"down-centered":`${g}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,v.jsx)(Po.Provider,{value:j,children:(0,v.jsx)(Ro,{placement:N,show:s,onSelect:c,onToggle:E,focusFirstItemOnShow:d,itemSelector:`.${g}-item:not(.disabled):not(:disabled)`,children:b?x.children:(0,v.jsx)(f,{...x,ref:t,className:o()(i,s&&"show",O[r])})})})});Yo.displayName="Dropdown";const Zo=Object.assign(Yo,{Toggle:Xo,Menu:Go,Item:Mo,ItemText:Ao,Divider:$o,Header:Do}),Jo=rt().oneOf(["start","end"]),Qo=rt().oneOfType([Jo,rt().shape({sm:Jo}),rt().shape({md:Jo}),rt().shape({lg:Jo}),rt().shape({xl:Jo}),rt().shape({xxl:Jo}),rt().object]),ea={id:rt().string,href:rt().string,onClick:rt().func,title:rt().node.isRequired,disabled:rt().bool,align:Qo,menuRole:rt().string,renderMenuOnMount:rt().bool,rootCloseEvent:rt().string,menuVariant:rt().oneOf(["dark"]),flip:rt().bool,bsPrefix:rt().string,variant:rt().string,size:rt().string},ta=a.forwardRef(({title:e,children:t,bsPrefix:n,rootCloseEvent:r,variant:o,size:a,menuRole:s,renderMenuOnMount:i,disabled:l,href:c,id:u,menuVariant:d,flip:f,...p},m)=>(0,v.jsxs)(Zo,{ref:m,...p,children:[(0,v.jsx)(Xo,{id:u,href:c,size:a,variant:o,disabled:l,childBsPrefix:n,children:e}),(0,v.jsx)(Go,{role:s,renderOnMount:i,rootCloseEvent:r,variant:d,flip:f,children:t})]}));ta.displayName="DropdownButton",ta.propTypes=ea;const na=ta,ra={bsPrefix:rt().string,fluid:rt().bool,rounded:rt().bool,roundedCircle:rt().bool,thumbnail:rt().bool},oa=a.forwardRef(({bsPrefix:e,className:t,fluid:n=!1,rounded:r=!1,roundedCircle:a=!1,thumbnail:s=!1,...i},l)=>(e=w(e,"img"),(0,v.jsx)("img",{ref:l,...i,className:o()(t,n&&`${e}-fluid`,r&&"rounded",a&&"rounded-circle",s&&`${e}-thumbnail`)})));oa.displayName="Image";const aa=oa,sa=a.forwardRef(({className:e,fluid:t=!0,...n},r)=>(0,v.jsx)(aa,{ref:r,...n,fluid:t,className:o()(e,"figure-img")}));sa.displayName="FigureImage",sa.propTypes=ra;const ia=sa,la=a.forwardRef(({className:e,bsPrefix:t,as:n="figcaption",...r},a)=>(t=w(t,"figure-caption"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));la.displayName="FigureCaption";const ca=la,ua=a.forwardRef(({className:e,bsPrefix:t,as:n="figure",...r},a)=>(t=w(t,"figure"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));ua.displayName="Figure";const da=Object.assign(ua,{Image:ia,Caption:ca}),fa={type:rt().string,tooltip:rt().bool,as:rt().elementType},pa=a.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...a},s)=>(0,v.jsx)(e,{...a,ref:s,className:o()(t,`${n}-${r?"tooltip":"feedback"}`)}));pa.displayName="Feedback",pa.propTypes=fa;const ma=pa,va=a.createContext({}),ha=a.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:s=!1,isInvalid:i=!1,as:l="input",...c},u)=>{const{controlId:d}=(0,a.useContext)(va);return t=w(t,"form-check-input"),(0,v.jsx)(l,{...c,ref:u,type:r,id:e||d,className:o()(n,t,s&&"is-valid",i&&"is-invalid")})});ha.displayName="FormCheckInput";const xa=ha,ba=a.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},s)=>{const{controlId:i}=(0,a.useContext)(va);return e=w(e,"form-check-label"),(0,v.jsx)("label",{...r,ref:s,htmlFor:n||i,className:o()(t,e)})});ba.displayName="FormCheckLabel";const ga=ba,ya=a.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:s=!1,disabled:i=!1,isValid:l=!1,isInvalid:c=!1,feedbackTooltip:u=!1,feedback:d,feedbackType:f,className:p,style:m,title:h="",type:x="checkbox",label:b,children:g,as:y="input",...E},N)=>{t=w(t,"form-check"),n=w(n,"form-switch");const{controlId:C}=(0,a.useContext)(va),j=(0,a.useMemo)(()=>({controlId:e||C}),[C,e]),O=!g&&null!=b&&!1!==b||function(e,t){return a.Children.toArray(e).some(e=>a.isValidElement(e)&&e.type===t)}(g,ga),R=(0,v.jsx)(xa,{...E,type:"switch"===x?"checkbox":x,ref:N,isValid:l,isInvalid:c,disabled:i,as:y});return(0,v.jsx)(va.Provider,{value:j,children:(0,v.jsx)("div",{style:m,className:o()(p,O&&t,r&&`${t}-inline`,s&&`${t}-reverse`,"switch"===x&&n),children:g||(0,v.jsxs)(v.Fragment,{children:[R,O&&(0,v.jsx)(ga,{title:h,children:b}),d&&(0,v.jsx)(ma,{type:f,tooltip:u,children:d})]})})})});ya.displayName="FormCheck";const wa=Object.assign(ya,{Input:xa,Label:ga}),Ea=a.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:s,className:i,isValid:l=!1,isInvalid:c=!1,plaintext:u,readOnly:d,as:f="input",...p},m)=>{const{controlId:h}=(0,a.useContext)(va);return e=w(e,"form-control"),(0,v.jsx)(f,{...p,type:t,size:r,ref:m,readOnly:d,id:s||h,className:o()(i,u?`${e}-plaintext`:e,n&&`${e}-${n}`,"color"===t&&`${e}-color`,l&&"is-valid",c&&"is-invalid")})});Ea.displayName="FormControl";const Na=Object.assign(Ea,{Feedback:ma}),Ca=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"form-floating"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ca.displayName="FormFloating";const ja=Ca,Oa=a.forwardRef(({controlId:e,as:t="div",...n},r)=>{const o=(0,a.useMemo)(()=>({controlId:e}),[e]);return(0,v.jsx)(va.Provider,{value:o,children:(0,v.jsx)(t,{...n,ref:r})})});Oa.displayName="FormGroup";const Ra=Oa,ka=a.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:s,htmlFor:i,...l},c)=>{const{controlId:u}=(0,a.useContext)(va);t=w(t,"form-label");let d="col-form-label";"string"==typeof n&&(d=`${d} ${d}-${n}`);const f=o()(s,t,r&&"visually-hidden",n&&d);return i=i||u,n?(0,v.jsx)(cn,{ref:c,as:"label",className:f,htmlFor:i,...l}):(0,v.jsx)(e,{ref:c,className:f,htmlFor:i,...l})});ka.displayName="FormLabel";const Pa=ka,Ta=a.forwardRef(({bsPrefix:e,className:t,id:n,...r},s)=>{const{controlId:i}=(0,a.useContext)(va);return e=w(e,"form-range"),(0,v.jsx)("input",{...r,type:"range",ref:s,className:o()(t,e),id:n||i})});Ta.displayName="FormRange";const $a=Ta,Sa=a.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:s=!1,isInvalid:i=!1,id:l,...c},u)=>{const{controlId:d}=(0,a.useContext)(va);return e=w(e,"form-select"),(0,v.jsx)("select",{...c,size:n,ref:u,className:o()(r,e,t&&`${e}-${t}`,s&&"is-valid",i&&"is-invalid"),id:l||d})});Sa.displayName="FormSelect";const Da=Sa,Ia=a.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...a},s)=>(e=w(e,"form-text"),(0,v.jsx)(n,{...a,ref:s,className:o()(t,e,r&&"text-muted")})));Ia.displayName="FormText";const Ma=Ia,La=a.forwardRef((e,t)=>(0,v.jsx)(wa,{...e,ref:t,type:"switch"}));La.displayName="Switch";const Aa=Object.assign(La,{Input:wa.Input,Label:wa.Label}),Ba=a.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:a,...s},i)=>(e=w(e,"form-floating"),(0,v.jsxs)(Ra,{ref:i,className:o()(t,e),controlId:r,...s,children:[n,(0,v.jsx)("label",{htmlFor:r,children:a})]})));Ba.displayName="FloatingLabel";const Fa=Ba,Ha={_ref:rt().any,validated:rt().bool,as:rt().elementType},_a=a.forwardRef(({className:e,validated:t,as:n="form",...r},a)=>(0,v.jsx)(n,{...r,ref:a,className:o()(e,t&&"was-validated")}));_a.displayName="Form",_a.propTypes=Ha;const Ka=Object.assign(_a,{Group:Ra,Control:Na,Floating:ja,Check:wa,Switch:Aa,Label:Pa,Text:Ma,Range:$a,Select:Da,FloatingLabel:Fa}),Wa=a.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=w(t,"input-group-text"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Wa.displayName="InputGroupText";const Va=Wa,za=a.forwardRef(({bsPrefix:e,size:t,hasValidation:n,className:r,as:s="div",...i},l)=>{e=w(e,"input-group");const c=(0,a.useMemo)(()=>({}),[]);return(0,v.jsx)(_o.Provider,{value:c,children:(0,v.jsx)(s,{ref:l,...i,className:o()(r,e,t&&`${e}-${t}`,n&&"has-validation")})})});za.displayName="InputGroup";const Ua=Object.assign(za,{Text:Va,Radio:e=>(0,v.jsx)(Va,{children:(0,v.jsx)(xa,{type:"radio",...e})}),Checkbox:e=>(0,v.jsx)(Va,{children:(0,v.jsx)(xa,{type:"checkbox",...e})})}),Ga=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,qa=function(e,t){return(0,a.useMemo)(()=>function(e,t){const n=Ga(e),r=Ga(t);return e=>{n&&n(e),r&&r(e)}}(e,t),[e,t])},Xa=a.createContext(null),Ya=["as","active","eventKey"];function Za({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=(0,a.useContext)(vo),l=(0,a.useContext)(xo),c=(0,a.useContext)(Xa);let u=n;const d={role:o};if(l){o||"tablist"!==l.role||(d.role="tab");const t=l.getControllerId(null!=e?e:null),a=l.getControlledId(null!=e?e:null);d[bo("event-key")]=e,d.id=t||r,u=null==n&&null!=e?l.activeKey===e:n,!u&&(null!=c&&c.unmountOnExit||null!=c&&c.mountOnEnter)||(d["aria-controls"]=a)}return"tab"===d.role&&(d["aria-selected"]=u,u||(d.tabIndex=-1),s&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Fe(n=>{s||(null==t||t(n),null!=e&&i&&!n.isPropagationStopped()&&i(e,n))}),[d,{isActive:u}]}const Ja=a.forwardRef((e,t)=>{let{as:n=Ge,active:r,eventKey:o}=e,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,Ya);const[s,i]=Za(Object.assign({key:mo(o,a.href),active:r},a));return s[bo("active")]=i.isActive,(0,v.jsx)(n,Object.assign({},a,s,{ref:t}))});Ja.displayName="NavItem";const Qa=Ja,es=["as","onSelect","activeKey","role","onKeyDown"],ts=()=>{},ns=bo("event-key"),rs=a.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,es);const c=vn(),u=(0,a.useRef)(!1),d=(0,a.useContext)(vo),f=(0,a.useContext)(Xa);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const h=(0,a.useRef)(null),x=e=>{const t=h.current;if(!t)return null;const n=pn(t,`[${ns}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const o=n.indexOf(r);if(-1===o)return null;let a=o+e;return a>=n.length&&(a=0),a<0&&(a=n.length-1),n[a]},b=(e,t)=>{null!=e&&(null==r||r(e,t),null==d||d(e,t))};(0,a.useEffect)(()=>{if(h.current&&u.current){const e=h.current.querySelector(`[${ns}][aria-selected=true]`);null==e||e.focus()}u.current=!1});const g=qa(t,h);return(0,v.jsx)(vo.Provider,{value:b,children:(0,v.jsx)(xo.Provider,{value:{role:s,activeKey:mo(o),getControlledId:p||ts,getControllerId:m||ts},children:(0,v.jsx)(n,Object.assign({},l,{onKeyDown:e=>{if(null==i||i(e),!f)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=x(-1);break;case"ArrowRight":case"ArrowDown":t=x(1);break;default:return}t&&(e.preventDefault(),b(t.dataset["rrUiEventKey"]||null,e),u.current=!0,c())},ref:g,role:s}))})})});rs.displayName="Nav";const os=Object.assign(rs,{Item:Qa}),as=a.forwardRef(({bsPrefix:e,active:t,disabled:n,eventKey:r,className:a,variant:s,action:i,as:l,...c},u)=>{e=w(e,"list-group-item");const[d,f]=Za({key:mo(r,c.href),active:t,...c}),p=De(e=>{if(n)return e.preventDefault(),void e.stopPropagation();d.onClick(e)});n&&void 0===c.tabIndex&&(c.tabIndex=-1,c["aria-disabled"]=!0);const m=l||(i?c.href?"a":"button":"div");return(0,v.jsx)(m,{ref:u,...c,...d,onClick:p,className:o()(a,e,f.isActive&&"active",n&&"disabled",s&&`${e}-${s}`,i&&`${e}-action`)})});as.displayName="ListGroupItem";const ss=as,is=a.forwardRef((e,t)=>{const{className:n,bsPrefix:r,variant:a,horizontal:s,numbered:i,as:l="div",...c}=m(e,{activeKey:"onSelect"}),u=w(r,"list-group");let d;return s&&(d=!0===s?"horizontal":`horizontal-${s}`),(0,v.jsx)(os,{ref:t,...c,as:l,className:o()(n,u,a&&`${u}-${a}`,d&&`${u}-${d}`,i&&`${u}-numbered`)})});is.displayName="ListGroup";const ls=Object.assign(is,{Item:ss});var cs;function us(e){if((!cs&&0!==cs||e)&&U){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),cs=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return cs}function ds(e){void 0===e&&(e=O());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}const fs=bo("modal-open"),ps=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt($(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(fs,""),$(r,t)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(fs),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},ms=(e,t)=>U?null==e?(t||O()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function vs(e,t){const n=Co(),[r,o]=(0,a.useState)(()=>ms(e,null==n?void 0:n.document));if(!r){const t=ms(e);t&&o(t)}return(0,a.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,a.useEffect)(()=>{const t=ms(e);t!==r&&o(t)},[e,r]),r}const hs=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=(0,a.useRef)(null),i=(0,a.useRef)(t),l=Fe(n);(0,a.useEffect)(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=qa(s,z(e)),u=(0,a.cloneElement)(e,{ref:c});return t?u:o||!i.current&&r?null:u},xs=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],bs=["component"],gs=a.forwardRef((e,t)=>{let{component:n}=e;const r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:s,onExited:i,addEndListener:l,children:c}=e,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,xs);const d=(0,a.useRef)(null),f=qa(d,z(c)),p=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,a.useCallback)(p(t),[t]),v=(0,a.useCallback)(p(n),[n]),h=(0,a.useCallback)(p(r),[r]),x=(0,a.useCallback)(p(o),[o]),b=(0,a.useCallback)(p(s),[s]),g=(0,a.useCallback)(p(i),[i]),y=(0,a.useCallback)(p(l),[l]);return Object.assign({},u,{nodeRef:d},t&&{onEnter:m},n&&{onEntering:v},r&&{onEntered:h},o&&{onExit:x},s&&{onExiting:b},i&&{onExited:g},l&&{addEndListener:y},{children:"function"==typeof c?(e,t)=>c(e,Object.assign({},t,{ref:f})):(0,a.cloneElement)(c,{ref:f})})}(function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,bs));return(0,v.jsx)(n,Object.assign({ref:t},r))});function ys({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=(0,a.useState)(!t);t&&s&&i(!1);const l=function({in:e,onTransition:t}){const n=(0,a.useRef)(null),r=(0,a.useRef)(!0),o=Fe(t);return We(()=>{if(!n.current)return;let t=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,o]),We(()=>(r.current=!1,()=>{r.current=!0}),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(o(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(i(!0),null==n||n(e.element)))},t=>{throw e.in||i(!0),t})}}),c=qa(l,z(e));return s&&!t?null:(0,a.cloneElement)(e,{ref:c})}function ws(e,t,n){return e?(0,v.jsx)(gs,Object.assign({},n,{component:e})):t?(0,v.jsx)(ys,Object.assign({},n,{transition:t})):(0,v.jsx)(hs,Object.assign({},n))}const Es=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let Ns;const Cs=(0,a.forwardRef)((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:p,backdropTransition:m,runBackdropTransition:h,autoFocus:x=!0,enforceFocus:b=!0,restoreFocus:g=!0,restoreFocusOptions:y,renderDialog:w,renderBackdrop:E=e=>(0,v.jsx)("div",Object.assign({},e)),manager:N,container:C,onShow:j,onHide:O=()=>{},onExit:R,onExited:k,onExiting:P,onEnter:T,onEntering:$,onEntered:S}=e,D=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,Es);const M=Co(),L=vs(C),A=function(e){const t=Co(),n=e||function(e){return Ns||(Ns=new ps({ownerDocument:null==e?void 0:e.document})),Ns}(t),r=(0,a.useRef)({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:(0,a.useCallback)(e=>{r.current.dialog=e},[]),setBackdropRef:(0,a.useCallback)(e=>{r.current.backdrop=e},[])})}(N),B=He(),F=_e(n),[H,_]=(0,a.useState)(!n),K=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,()=>A,[A]),U&&!F&&n&&(K.current=ds(null==M?void 0:M.document)),n&&H&&_(!1);const W=Fe(()=>{if(A.add(),Z.current=J(document,"keydown",X),Y.current=J(document,"focus",()=>setTimeout(G),!0),j&&j(),x){var e,t;const n=ds(null!=(e=null==(t=A.dialog)?void 0:t.ownerDocument)?e:null==M?void 0:M.document);A.dialog&&n&&!Br(A.dialog,n)&&(K.current=n,A.dialog.focus())}}),z=Fe(()=>{var e;A.remove(),null==Z.current||Z.current(),null==Y.current||Y.current(),g&&(null==(e=K.current)||null==e.focus||e.focus(y),K.current=null)});(0,a.useEffect)(()=>{n&&L&&W()},[n,L,W]),(0,a.useEffect)(()=>{H&&z()},[H,z]),function(e){const t=function(e){const t=(0,a.useRef)(e);return t.current=e,t}(e);(0,a.useEffect)(()=>()=>t.current(),[])}(()=>{z()});const G=Fe(()=>{if(!b||!B()||!A.isTopModal())return;const e=ds(null==M?void 0:M.document);A.dialog&&e&&!Br(A.dialog,e)&&A.dialog.focus()}),q=Fe(e=>{e.target===e.currentTarget&&(null==u||u(e),!0===l&&O())}),X=Fe(e=>{c&&V(e)&&A.isTopModal()&&(null==d||d(e),e.defaultPrevented||O())}),Y=(0,a.useRef)(),Z=(0,a.useRef)();if(!L)return null;const Q=Object.assign({role:r,ref:A.setDialogRef,"aria-modal":"dialog"===r||void 0},D,{style:s,className:o,tabIndex:-1});let ee=w?w(Q):(0,v.jsx)("div",Object.assign({},Q,{children:a.cloneElement(i,{role:"document"})}));ee=ws(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:R,onExiting:P,onExited:(...e)=>{_(!0),null==k||k(...e)},onEnter:T,onEntering:$,onEntered:S,children:ee});let te=null;return l&&(te=E({ref:A.setBackdropRef,onClick:q}),te=ws(m,h,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:te})),(0,v.jsx)(v.Fragment,{children:I().createPortal((0,v.jsxs)(v.Fragment,{children:[te,ee]}),L)})});Cs.displayName="Modal";const js=Object.assign(Cs,{Manager:ps});function Os(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function Rs(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const ks=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ps=".sticky-top",Ts=".navbar-toggler";class $s extends ps{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,$(t,{[e]:`${parseFloat($(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],$(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):Os(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";pn(t,ks).forEach(t=>this.adjustAndStore(o,t,e.scrollBarWidth)),pn(t,Ps).forEach(t=>this.adjustAndStore(a,t,-e.scrollBarWidth)),pn(t,Ts).forEach(t=>this.adjustAndStore(a,t,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Rs(n.className,r):n.setAttribute("class",Rs(n.className&&n.className.baseVal||"",r));const o=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";pn(t,ks).forEach(e=>this.restore(o,e)),pn(t,Ps).forEach(e=>this.restore(a,e)),pn(t,Ts).forEach(e=>this.restore(a,e))}}let Ss;function Ds(e){return Ss||(Ss=new $s(e)),Ss}const Is=$s,Ms=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"modal-body"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ms.displayName="ModalBody";const Ls=Ms,As=a.createContext({onHide(){}}),Bs=a.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:a,fullscreen:s,children:i,scrollable:l,...c},u)=>{const d=`${e=w(e,"modal")}-dialog`,f="string"==typeof s?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return(0,v.jsx)("div",{...c,ref:u,className:o()(d,t,a&&`${e}-${a}`,r&&`${d}-centered`,l&&`${d}-scrollable`,s&&f),children:(0,v.jsx)("div",{className:o()(`${e}-content`,n),children:i})})});Bs.displayName="ModalDialog";const Fs=Bs,Hs=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"modal-footer"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Hs.displayName="ModalFooter";const _s=Hs,Ks=a.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=(0,a.useContext)(As),c=De(()=>{null==l||l.onHide(),null==r||r()});return(0,v.jsxs)("div",{ref:i,...s,children:[o,n&&(0,v.jsx)(st,{"aria-label":e,variant:t,onClick:c})]})});Ks.displayName="AbstractModalHeader";const Ws=Ks,Vs=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...a},s)=>(e=w(e,"modal-header"),(0,v.jsx)(Ws,{ref:s,...a,className:o()(t,e),closeLabel:n,closeButton:r})));Vs.displayName="ModalHeader";const zs=Vs,Us=Ie("h4"),Gs=a.forwardRef(({className:e,bsPrefix:t,as:n=Us,...r},a)=>(t=w(t,"modal-title"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Gs.displayName="ModalTitle";const qs=Gs;function Xs(e){return(0,v.jsx)(tt,{...e,timeout:null})}function Ys(e){return(0,v.jsx)(tt,{...e,timeout:null})}const Zs=a.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:s,children:i,dialogAs:l=Fs,"data-bs-theme":c,"aria-labelledby":u,"aria-describedby":d,"aria-label":f,show:p=!1,animation:m=!0,backdrop:h=!0,keyboard:x=!0,onEscapeKeyDown:b,onShow:g,onHide:y,container:E,autoFocus:N=!0,enforceFocus:j=!0,restoreFocus:R=!0,restoreFocusOptions:k,onEntered:P,onExit:T,onExiting:$,onEnter:S,onEntering:D,onExited:I,backdropClassName:M,manager:L,...A},B)=>{const[F,H]=(0,a.useState)({}),[_,K]=(0,a.useState)(!1),W=(0,a.useRef)(!1),V=(0,a.useRef)(!1),z=(0,a.useRef)(null),[G,q]=(0,a.useState)(null),X=ae(B,q),J=De(y),ee=C();e=w(e,"modal");const te=(0,a.useMemo)(()=>({onHide:J}),[J]);function ne(){return L||Ds({isRTL:ee})}function re(e){if(!U)return;const t=ne().getScrollbarWidth()>0,n=e.scrollHeight>O(e).documentElement.clientHeight;H({paddingRight:t&&!n?us():void 0,paddingLeft:!t&&n?us():void 0})}const oe=De(()=>{G&&re(G.dialog)});qt(()=>{Z(window,"resize",oe),null==z.current||z.current()});const se=()=>{W.current=!0},ie=e=>{W.current&&G&&e.target===G.dialog&&(V.current=!0),W.current=!1},le=()=>{K(!0),z.current=Q(G.dialog,()=>{K(!1)})},ce=e=>{"static"!==h?V.current||e.target!==e.currentTarget?V.current=!1:null==y||y():(e=>{e.target===e.currentTarget&&le()})(e)},ue=(0,a.useCallback)(t=>(0,v.jsx)("div",{...t,className:o()(`${e}-backdrop`,M,!m&&"show")}),[m,M,e]),de={...n,...F};return de.display="block",(0,v.jsx)(As.Provider,{value:te,children:(0,v.jsx)(js,{show:p,ref:X,backdrop:h,container:E,keyboard:!0,autoFocus:N,enforceFocus:j,restoreFocus:R,restoreFocusOptions:k,onEscapeKeyDown:e=>{x?null==b||b(e):(e.preventDefault(),"static"===h&&le())},onShow:g,onHide:y,onEnter:(e,t)=>{e&&re(e),null==S||S(e,t)},onEntering:(e,t)=>{null==D||D(e,t),Y(window,"resize",oe)},onEntered:P,onExit:e=>{null==z.current||z.current(),null==T||T(e)},onExiting:$,onExited:e=>{e&&(e.style.display=""),null==I||I(e),Z(window,"resize",oe)},manager:ne(),transition:m?Xs:void 0,backdropTransition:m?Ys:void 0,renderBackdrop:ue,renderDialog:n=>(0,v.jsx)("div",{role:"dialog",...n,style:de,className:o()(t,e,_&&`${e}-static`,!m&&"show"),onClick:h?ce:void 0,onMouseUp:ie,"data-bs-theme":c,"aria-label":f,"aria-labelledby":u,"aria-describedby":d,children:(0,v.jsx)(l,{...A,onMouseDown:se,className:r,contentClassName:s,children:i})})})})});Zs.displayName="Modal";const Js=Object.assign(Zs,{Body:Ls,Header:zs,Title:qs,Footer:_s,Dialog:Fs,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),Qs=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"nav-item"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Qs.displayName="NavItem";const ei=Qs,ti=a.forwardRef(({bsPrefix:e,className:t,as:n=Ye,active:r,eventKey:a,disabled:s=!1,...i},l)=>{e=w(e,"nav-link");const[c,u]=Za({key:mo(a,i.href),active:r,disabled:s,...i});return(0,v.jsx)(n,{...i,...c,ref:l,disabled:s,className:o()(t,e,s&&"disabled",u.isActive&&"active")})});ti.displayName="NavLink";const ni=ti,ri=a.forwardRef((e,t)=>{const{as:n="div",bsPrefix:r,variant:s,fill:i=!1,justify:l=!1,navbar:c,navbarScroll:u,className:d,activeKey:f,...p}=m(e,{activeKey:"onSelect"}),h=w(r,"nav");let x,b,g=!1;const y=(0,a.useContext)(Wo),E=(0,a.useContext)(Rt);return y?(x=y.bsPrefix,g=null==c||c):E&&({cardHeaderBsPrefix:b}=E),(0,v.jsx)(os,{as:n,ref:t,activeKey:f,className:o()(d,{[h]:!g,[`${x}-nav`]:g,[`${x}-nav-scroll`]:g&&u,[`${b}-${s}`]:!!b,[`${h}-${s}`]:!!s,[`${h}-fill`]:i,[`${h}-justified`]:l}),...p})});ri.displayName="Nav";const oi=Object.assign(ri,{Item:ei,Link:ni}),ai=a.forwardRef(({bsPrefix:e,className:t,as:n,...r},a)=>{e=w(e,"navbar-brand");const s=n||(r.href?"a":"span");return(0,v.jsx)(s,{...r,ref:a,className:o()(t,e)})});ai.displayName="NavbarBrand";const si=ai,ii=a.forwardRef(({children:e,bsPrefix:t,...n},r)=>{t=w(t,"navbar-collapse");const o=(0,a.useContext)(Wo);return(0,v.jsx)(pe,{in:!(!o||!o.expanded),...n,children:(0,v.jsx)("div",{ref:r,className:t,children:e})})});ii.displayName="NavbarCollapse";const li=ii,ci=a.forwardRef(({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:s="button",onClick:i,...l},c)=>{e=w(e,"navbar-toggler");const{onToggle:u,expanded:d}=(0,a.useContext)(Wo)||{},f=De(e=>{i&&i(e),u&&u()});return"button"===s&&(l.type="button"),(0,v.jsx)(s,{...l,ref:c,onClick:f,"aria-label":r,className:o()(t,e,!d&&"collapsed"),children:n||(0,v.jsx)("span",{className:`${e}-icon`})})});ci.displayName="NavbarToggle";const ui=ci,di=new WeakMap,fi=(e,t)=>{if(!e||!t)return;const n=di.get(t)||new Map;di.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function pi(e,t=("undefined"==typeof window?void 0:window)){const n=fi(e,t),[r,o]=(0,a.useState)(()=>!!n&&n.matches);return Fo(()=>{let n=fi(e,t);if(!n)return o(!1);let r=di.get(t);const a=()=>{o(n.matches)};return n.refCount++,n.addListener(a),a(),()=>{n.removeListener(a),n.refCount--,n.refCount<=0&&(null==r||r.delete(n.media)),n=void 0}},[e]),r}const mi=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}return function(r,o,s){let i;return"object"==typeof r?(i=r,s=o,o=!0):(o=o||!0,i={[r]:o}),pi((0,a.useMemo)(()=>Object.entries(i).reduce((r,[o,a])=>("up"!==a&&!0!==a||(r=n(r,function(t){let n=e[t];return"number"==typeof n&&(n=`${n}px`),`(min-width: ${n})`}(o))),"down"!==a&&!0!==a||(r=n(r,function(n){const r=function(e){return t[Math.min(t.indexOf(e)+1,t.length-1)]}(n);let o=e[r];return o="number"==typeof o?o-.2+"px":`calc(${o} - 0.2px)`,`(max-width: ${o})`}(o))),r),""),[JSON.stringify(i)]),s)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}),vi=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"offcanvas-body"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));vi.displayName="OffcanvasBody";const hi=vi,xi={[B]:"show",[F]:"show"},bi=a.forwardRef(({bsPrefix:e,className:t,children:n,in:r=!1,mountOnEnter:s=!1,unmountOnExit:i=!1,appear:l=!1,...c},u)=>(e=w(e,"offcanvas"),(0,v.jsx)(le,{ref:u,addEndListener:te,in:r,mountOnEnter:s,unmountOnExit:i,appear:l,...c,childRef:z(n),children:(r,s)=>a.cloneElement(n,{...s,className:o()(t,n.props.className,(r===B||r===H)&&`${e}-toggling`,xi[r])})})));bi.displayName="OffcanvasToggling";const gi=bi,yi=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...a},s)=>(e=w(e,"offcanvas-header"),(0,v.jsx)(Ws,{ref:s,...a,className:o()(t,e),closeLabel:n,closeButton:r})));yi.displayName="OffcanvasHeader";const wi=yi,Ei=Ie("h5"),Ni=a.forwardRef(({className:e,bsPrefix:t,as:n=Ei,...r},a)=>(t=w(t,"offcanvas-title"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ni.displayName="OffcanvasTitle";const Ci=Ni;function ji(e){return(0,v.jsx)(gi,{...e})}function Oi(e){return(0,v.jsx)(tt,{...e})}const Ri=a.forwardRef(({bsPrefix:e,className:t,children:n,"aria-labelledby":r,placement:s="start",responsive:i,show:l=!1,backdrop:c=!0,keyboard:u=!0,scroll:d=!1,onEscapeKeyDown:f,onShow:p,onHide:m,container:h,autoFocus:x=!0,enforceFocus:b=!0,restoreFocus:g=!0,restoreFocusOptions:y,onEntered:E,onExit:N,onExiting:C,onEnter:j,onEntering:O,onExited:R,backdropClassName:k,manager:P,renderStaticNode:T=!1,...$},S)=>{const D=(0,a.useRef)();e=w(e,"offcanvas");const[I,M]=(0,a.useState)(!1),L=De(m),A=mi(i||"xs","up");(0,a.useEffect)(()=>{M(i?l&&!A:l)},[l,i,A]);const B=(0,a.useMemo)(()=>({onHide:L}),[L]),F=(0,a.useCallback)(t=>(0,v.jsx)("div",{...t,className:o()(`${e}-backdrop`,k)}),[k,e]),H=a=>(0,v.jsx)("div",{...a,...$,className:o()(t,i?`${e}-${i}`:e,`${e}-${s}`),"aria-labelledby":r,children:n});return(0,v.jsxs)(v.Fragment,{children:[!I&&(i||T)&&H({}),(0,v.jsx)(As.Provider,{value:B,children:(0,v.jsx)(js,{show:I,ref:S,backdrop:c,container:h,keyboard:u,autoFocus:x,enforceFocus:b&&!d,restoreFocus:g,restoreFocusOptions:y,onEscapeKeyDown:f,onShow:p,onHide:L,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==j||j(e,...t)},onEntering:O,onEntered:E,onExit:N,onExiting:C,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==R||R(...t)},manager:P||(d?(D.current||(D.current=new Is({handleContainerOverflow:!1})),D.current):Ds()),transition:ji,backdropTransition:Oi,renderBackdrop:F,renderDialog:H})})]})});Ri.displayName="Offcanvas";const ki=Object.assign(Ri,{Body:hi,Header:wi,Title:Ci}),Pi=a.forwardRef(({onHide:e,...t},n)=>{const r=(0,a.useContext)(Wo),o=De(()=>{null==r||null==r.onToggle||r.onToggle(),null==e||e()});return(0,v.jsx)(ki,{ref:n,show:!(null==r||!r.expanded),...t,renderStaticNode:!0,onHide:o})});Pi.displayName="NavbarOffcanvas";const Ti=Pi,$i=a.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=w(t,"navbar-text"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));$i.displayName="NavbarText";const Si=$i,Di=a.forwardRef((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:s="light",bg:i,fixed:l,sticky:c,className:u,as:d="nav",expanded:f,onToggle:p,onSelect:h,collapseOnSelect:x=!1,...b}=m(e,{expanded:"onToggle"}),g=w(n,"navbar"),y=(0,a.useCallback)((...e)=>{null==h||h(...e),x&&f&&(null==p||p(!1))},[h,x,f,p]);void 0===b.role&&"nav"!==d&&(b.role="navigation");let E=`${g}-expand`;"string"==typeof r&&(E=`${E}-${r}`);const N=(0,a.useMemo)(()=>({onToggle:()=>null==p?void 0:p(!f),bsPrefix:g,expanded:!!f,expand:r}),[g,f,r,p]);return(0,v.jsx)(Wo.Provider,{value:N,children:(0,v.jsx)(vo.Provider,{value:y,children:(0,v.jsx)(d,{ref:t,...b,className:o()(u,g,r&&E,s&&`${g}-${s}`,i&&`bg-${i}`,c&&`sticky-${c}`,l&&`fixed-${l}`)})})})});Di.displayName="Navbar";const Ii=Object.assign(Di,{Brand:si,Collapse:li,Offcanvas:Ti,Text:Si,Toggle:ui}),Mi=a.forwardRef(({id:e,title:t,children:n,bsPrefix:r,className:a,rootCloseEvent:s,menuRole:i,disabled:l,active:c,renderMenuOnMount:u,menuVariant:d,...f},p)=>{const m=w(void 0,"nav-item");return(0,v.jsxs)(Zo,{ref:p,...f,className:o()(a,m),children:[(0,v.jsx)(Zo.Toggle,{id:e,eventKey:null,active:c,disabled:l,childBsPrefix:r,as:ni,children:t}),(0,v.jsx)(Zo.Menu,{role:i,renderOnMount:u,rootCloseEvent:s,variant:d,children:n})]})});Mi.displayName="NavDropdown";const Li=Object.assign(Mi,{Item:Zo.Item,ItemText:Zo.ItemText,Divider:Zo.Divider,Header:Zo.Header}),Ai=()=>{},Bi=a.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=Be(),[f,p]=Be(),m=qa(d,t),v=vs(e.container),h=vs(e.target),[x,b]=(0,a.useState)(!e.show),g=Ar(h,u,Ur({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&x&&b(!1);const y=e.show||!x;if(function(e,t,{disabled:n,clickTrigger:r}={}){const o=t||Ai;Vr(e,o,{disabled:n,clickTrigger:r});const s=Fe(e=>{V(e)&&o(e)});(0,a.useEffect)(()=>{if(n||null==e)return;const t=O(Kr(e));let r=(t.defaultView||window).event;const o=J(t,"keyup",e=>{e!==r?s(e):r=void 0});return()=>{o()}},[e,n,s])}(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!y)return null;const{onExit:w,onExiting:E,onEnter:N,onEntering:C,onEntered:j}=e;let R=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:m}),{popper:g,placement:o,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:p})});return R=ws(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:w,onExiting:E,onExited:(...t)=>{b(!0),e.onExited&&e.onExited(...t)},onEnter:N,onEntering:C,onEntered:j}),v?I().createPortal(R,v):null});Bi.displayName="Overlay";const Fi=Bi,Hi=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"popover-header"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Hi.displayName="PopoverHeader";const _i=Hi,Ki=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"popover-body"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Ki.displayName="PopoverBody";const Wi=Ki;function Vi(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function zi(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}a.Component;const Ui=a.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:a,body:s,arrowProps:i,hasDoneInitialMeasure:l,popper:c,show:u,...d},f)=>{const p=w(e,"popover"),m=C(),[h]=(null==t?void 0:t.split("-"))||[],x=Vi(h,m);let b=r;return u&&!l&&(b={...r,...zi(null==c?void 0:c.strategy)}),(0,v.jsxs)("div",{ref:f,role:"tooltip",style:b,"x-placement":h,className:o()(n,p,h&&`bs-popover-${x}`),...d,children:[(0,v.jsx)("div",{className:"popover-arrow",...i}),s?(0,v.jsx)(Wi,{children:a}):a]})});Ui.displayName="Popover";const Gi=Object.assign(Ui,{Header:_i,Body:Wi,POPPER_OFFSET:[0,8]}),qi=a.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:a,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=w(e,"tooltip");const f=C(),[p]=(null==t?void 0:t.split("-"))||[],m=Vi(p,f);let h=r;return c&&!i&&(h={...r,...zi(null==l?void 0:l.strategy)}),(0,v.jsxs)("div",{ref:d,style:h,role:"tooltip","x-placement":p,className:o()(n,e,`bs-tooltip-${m}`),...u,children:[(0,v.jsx)("div",{className:"tooltip-arrow",...s}),(0,v.jsx)("div",{className:`${e}-inner`,children:a})]})});qi.displayName="Tooltip";const Xi=Object.assign(qi,{TOOLTIP_OFFSET:[0,6]}),Yi=a.forwardRef(({children:e,transition:t=tt,popperConfig:n={},rootClose:r=!1,placement:s="top",show:i=!1,...l},c)=>{const u=(0,a.useRef)({}),[d,f]=(0,a.useState)(null),[p,m]=function(e){const t=(0,a.useRef)(null),n=w(void 0,"popover"),r=w(void 0,"tooltip"),o=(0,a.useMemo)(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(Os(t.current,n))return Gi.POPPER_OFFSET;if(Os(t.current,r))return Xi.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}(l.offset),h=ae(c,p),x=!0===t?tt:t||void 0,b=De(e=>{f(e),null==n||null==n.onFirstUpdate||n.onFirstUpdate(e)});return Fo(()=>{d&&l.target&&(null==u.current.scheduleUpdate||u.current.scheduleUpdate())},[d,l.target]),(0,a.useEffect)(()=>{i||f(null)},[i]),(0,v.jsx)(Fi,{...l,ref:h,popperConfig:{...n,modifiers:m.concat(n.modifiers||[]),onFirstUpdate:b},transition:x,rootClose:r,placement:s,show:i,children:(r,{arrowProps:s,popper:i,show:l})=>{var c;!function(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(se(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(se(e)))}(r,s);const f=null==i?void 0:i.placement,p=Object.assign(u.current,{state:null==i?void 0:i.state,scheduleUpdate:null==i?void 0:i.update,placement:f,outOfBoundaries:(null==i||null==(c=i.state)||null==(c=c.modifiersData.hide)?void 0:c.isReferenceHidden)||!1,strategy:n.strategy}),m=!!d;return"function"==typeof e?e({...r,placement:f,show:l,...!t&&l&&{className:"show"},popper:p,arrowProps:s,hasDoneInitialMeasure:m}):a.cloneElement(e,{...r,placement:f,arrowProps:s,popper:p,hasDoneInitialMeasure:m,className:o()(e.props.className,!t&&l&&"show"),style:{...e.props.style,...r.style}})}})});Yi.displayName="Overlay";const Zi=Yi;function Ji(e,t,n){const[r]=t,o=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];a&&a===o||Br(o,a)||e(...t)}rt().oneOf(["click","hover","focus"]);const Qi=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:o,defaultShow:s=!1,onToggle:i,delay:l,placement:c,flip:u=c&&-1!==c.indexOf("auto"),...d})=>{const f=(0,a.useRef)(null),m=ae(f,z(n)),h=Zt(),x=(0,a.useRef)(""),[b,g]=p(o,s,i),y=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(l),{onFocus:w,onBlur:E,onClick:N}="function"!=typeof n?a.Children.only(n).props:{},C=(0,a.useCallback)(()=>{h.clear(),x.current="show",y.show?h.set(()=>{"show"===x.current&&g(!0)},y.show):g(!0)},[y.show,g,h]),j=(0,a.useCallback)(()=>{h.clear(),x.current="hide",y.hide?h.set(()=>{"hide"===x.current&&g(!1)},y.hide):g(!1)},[y.hide,g,h]),O=(0,a.useCallback)((...e)=>{C(),null==w||w(...e)},[C,w]),R=(0,a.useCallback)((...e)=>{j(),null==E||E(...e)},[j,E]),k=(0,a.useCallback)((...e)=>{g(!b),null==N||N(...e)},[N,g,b]),P=(0,a.useCallback)((...e)=>{Ji(C,e,"fromElement")},[C]),T=(0,a.useCallback)((...e)=>{Ji(j,e,"toElement")},[j]),$=null==e?[]:[].concat(e),S={ref:e=>{m(se(e))}};return-1!==$.indexOf("click")&&(S.onClick=k),-1!==$.indexOf("focus")&&(S.onFocus=O,S.onBlur=R),-1!==$.indexOf("hover")&&(S.onMouseOver=P,S.onMouseOut=T),(0,v.jsxs)(v.Fragment,{children:["function"==typeof n?n(S):(0,a.cloneElement)(n,S),(0,v.jsx)(Zi,{...d,show:b,onHide:j,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},el=a.forwardRef(({active:e=!1,disabled:t=!1,className:n,style:r,activeLabel:a="(current)",children:s,linkStyle:i,linkClassName:l,as:c=Ye,...u},d)=>{const f=e||t?"span":c;return(0,v.jsx)("li",{ref:d,style:r,className:o()(n,"page-item",{active:e,disabled:t}),children:(0,v.jsxs)(f,{className:o()("page-link",l),style:i,...u,children:[s,e&&a&&(0,v.jsx)("span",{className:"visually-hidden",children:a})]})})});el.displayName="PageItem";const tl=el;function nl(e,t,n=e){const r=a.forwardRef(({children:e,...r},o)=>(0,v.jsxs)(el,{...r,ref:o,children:[(0,v.jsx)("span",{"aria-hidden":"true",children:e||t}),(0,v.jsx)("span",{className:"visually-hidden",children:n})]}));return r.displayName=e,r}const rl=nl("First","«"),ol=nl("Prev","‹","Previous"),al=nl("Ellipsis","…","More"),sl=nl("Next","›"),il=nl("Last","»"),ll=a.forwardRef(({bsPrefix:e,className:t,size:n,...r},a)=>{const s=w(e,"pagination");return(0,v.jsx)("ul",{ref:a,...r,className:o()(t,s,n&&`${s}-${n}`)})});ll.displayName="Pagination";const cl=Object.assign(ll,{First:rl,Prev:ol,Ellipsis:al,Item:tl,Next:sl,Last:il});function ul({animation:e,bg:t,bsPrefix:n,size:r,...a}){n=w(n,"placeholder");const[{className:s,...i}]=sn(a);return{...i,className:o()(s,e?`${n}-${e}`:n,r&&`${n}-${r}`,t&&`bg-${t}`)}}const dl=a.forwardRef((e,t)=>{const n=ul(e);return(0,v.jsx)(xt,{...n,ref:t,disabled:!0,tabIndex:-1})});dl.displayName="PlaceholderButton";const fl=dl,pl=a.forwardRef(({as:e="span",...t},n)=>{const r=ul(t);return(0,v.jsx)(e,{...r,ref:n})});pl.displayName="Placeholder";const ml=Object.assign(pl,{Button:fl});function vl(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(1e3*r)/1e3}function hl({min:e,now:t,max:n,label:r,visuallyHidden:a,striped:s,animated:i,className:l,style:c,variant:u,bsPrefix:d,...f},p){return(0,v.jsx)("div",{ref:p,...f,role:"progressbar",className:o()(l,`${d}-bar`,{[`bg-${u}`]:u,[`${d}-bar-animated`]:i,[`${d}-bar-striped`]:i||s}),style:{width:`${vl(t,e,n)}%`,...c},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:a?(0,v.jsx)("span",{className:"visually-hidden",children:r}):r})}const xl=a.forwardRef(({isChild:e=!1,...t},n)=>{const r={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(r.bsPrefix=w(r.bsPrefix,"progress"),e)return hl(r,n);const{min:s,now:i,max:l,label:c,visuallyHidden:u,striped:d,animated:f,bsPrefix:p,variant:m,className:h,children:x,...b}=r;return(0,v.jsx)("div",{ref:n,...b,className:o()(h,p),children:x?nn(x,e=>(0,a.cloneElement)(e,{isChild:!0})):hl({min:s,now:i,max:l,label:c,visuallyHidden:u,striped:d,animated:f,bsPrefix:p,variant:m},n)})});xl.displayName="ProgressBar";const bl=xl,gl=a.forwardRef(({bsPrefix:e,className:t,children:n,aspectRatio:r="1x1",style:s,...i},l)=>{e=w(e,"ratio");const c="number"==typeof r;return(0,v.jsx)("div",{ref:l,...i,style:{...s,...c&&{"--bs-aspect-ratio":(u=r,u<=0?"100%":u<1?100*u+"%":`${u}%`)}},className:o()(e,t,!c&&`${e}-${r}`),children:a.Children.only(n)});var u});gl.displayName="Ratio";const yl=gl,wl=a.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},a)=>{const s=w(e,"row"),i=E(),l=N(),c=`${s}-cols`,u=[];return i.forEach(e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const o=e!==l?`-${e}`:"";null!=n&&u.push(`${c}${o}-${n}`)}),(0,v.jsx)(n,{ref:a,...r,className:o()(t,s,...u)})});wl.displayName="Row";const El=wl,Nl=a.forwardRef(({bsPrefix:e,variant:t,animation:n="border",size:r,as:a="div",className:s,...i},l)=>{const c=`${e=w(e,"spinner")}-${n}`;return(0,v.jsx)(a,{ref:l,...i,className:o()(s,c,r&&`${c}-${r}`,t&&`text-${t}`)})});Nl.displayName="Spinner";const Cl=Nl,jl={id:rt().string,toggleLabel:rt().string,href:rt().string,target:rt().string,onClick:rt().func,title:rt().node.isRequired,type:rt().string,disabled:rt().bool,align:Qo,menuRole:rt().string,renderMenuOnMount:rt().bool,rootCloseEvent:rt().string,flip:rt().bool,bsPrefix:rt().string,variant:rt().string,size:rt().string},Ol=a.forwardRef(({id:e,bsPrefix:t,size:n,variant:r,title:o,type:a="button",toggleLabel:s="Toggle dropdown",children:i,onClick:l,href:c,target:u,menuRole:d,renderMenuOnMount:f,rootCloseEvent:p,flip:m,...h},x)=>(0,v.jsxs)(Zo,{ref:x,...h,as:gt,children:[(0,v.jsx)(xt,{size:n,variant:r,disabled:h.disabled,bsPrefix:t,href:c,target:u,onClick:l,type:a,children:o}),(0,v.jsx)(Zo.Toggle,{split:!0,id:e,size:n,variant:r,disabled:h.disabled,childBsPrefix:t,children:(0,v.jsx)("span",{className:"visually-hidden",children:s})}),(0,v.jsx)(Zo.Menu,{role:d,renderOnMount:f,rootCloseEvent:p,flip:m,children:i})]}));Ol.propTypes=jl,Ol.displayName="SplitButton";const Rl=Ol,kl=function(e){return"function"==typeof s().useId?s().createElement(s().Fragment,null,e.children):s().createElement(to,e)};function Pl(e,t=h,n=x){const r=[];return Object.entries(e).forEach(([e,o])=>{null!=o&&("object"==typeof o?t.forEach(t=>{const a=o[t];if(null!=a){const o=t!==n?`-${t}`:"";r.push(`${e}${o}-${a}`)}}):r.push(`${e}-${o}`))}),r}const Tl=a.forwardRef(({as:e="div",bsPrefix:t,className:n,direction:r,gap:a,...s},i)=>{t=w(t,"horizontal"===r?"hstack":"vstack");const l=E(),c=N();return(0,v.jsx)(e,{...s,ref:i,className:o()(n,t,...Pl({gap:a},l,c))})});Tl.displayName="Stack";const $l=Tl,Sl=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Dl=["activeKey","getControlledId","getControllerId"],Il=["as"];function Ml(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ll(e){let{active:t,eventKey:n,mountOnEnter:r,transition:o,unmountOnExit:s,role:i="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}=e,m=Ml(e,Sl);const v=(0,a.useContext)(Xa);if(!v)return[Object.assign({},m,{role:i}),{eventKey:n,isActive:t,mountOnEnter:r,transition:o,unmountOnExit:s,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}];const{activeKey:h,getControlledId:x,getControllerId:b}=v,g=Ml(v,Dl),y=mo(n);return[Object.assign({},m,{role:i,id:x(n),"aria-labelledby":b(n)}),{eventKey:n,isActive:null==t&&null!=y?mo(h)===y:t,transition:o||g.transition,mountOnEnter:null!=r?r:g.mountOnEnter,unmountOnExit:null!=s?s:g.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Al=a.forwardRef((e,t)=>{let{as:n="div"}=e,r=Ml(e,Il);const[o,{isActive:a,onEnter:s,onEntering:i,onEntered:l,onExit:c,onExiting:u,onExited:d,mountOnEnter:f,unmountOnExit:p,transition:m=hs}]=Ll(r);return(0,v.jsx)(Xa.Provider,{value:null,children:(0,v.jsx)(vo.Provider,{value:null,children:(0,v.jsx)(m,{in:a,onEnter:s,onEntering:i,onEntered:l,onExit:c,onExiting:u,onExited:d,mountOnEnter:f,unmountOnExit:p,children:(0,v.jsx)(n,Object.assign({},o,{ref:t,hidden:!a,"aria-hidden":!a}))})})})});Al.displayName="TabPanel";const Bl=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=mn(o,s,r),p=oo(t),m=(0,a.useMemo)(()=>n||((e,t)=>p?`${p}-${t}-${e}`:null),[p,n]),h=(0,a.useMemo)(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:e=>m(e,"tabpane"),getControllerId:e=>m(e,"tab")}),[f,d,i,l,c,m]);return(0,v.jsx)(Xa.Provider,{value:h,children:(0,v.jsx)(vo.Provider,{value:f||null,children:u})})};Bl.Panel=Al;const Fl=Bl;function Hl(e){return"boolean"==typeof e?e?tt:hs:e}const _l=({transition:e,...t})=>(0,v.jsx)(Fl,{...t,transition:Hl(e)});_l.displayName="TabContainer";const Kl=_l,Wl=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"tab-content"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));Wl.displayName="TabContent";const Vl=Wl,zl=a.forwardRef(({bsPrefix:e,transition:t,...n},r)=>{const[{className:a,as:s="div",...i},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:h,unmountOnExit:x,transition:b=tt}]=Ll({...n,transition:Hl(t)}),g=w(e,"tab-pane");return(0,v.jsx)(Xa.Provider,{value:null,children:(0,v.jsx)(vo.Provider,{value:null,children:(0,v.jsx)(b,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:h,unmountOnExit:x,children:(0,v.jsx)(s,{...i,ref:r,className:o()(a,g,l&&"active")})})})})});zl.displayName="TabPane";const Ul=zl,Gl={eventKey:rt().oneOfType([rt().string,rt().number]),title:rt().node.isRequired,disabled:rt().bool,tabClassName:rt().string,tabAttrs:rt().object},ql=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};ql.propTypes=Gl;const Xl=Object.assign(ql,{Container:Kl,Content:Vl,Pane:Ul}),Yl=a.forwardRef(({bsPrefix:e,className:t,striped:n,bordered:r,borderless:a,hover:s,size:i,variant:l,responsive:c,...u},d)=>{const f=w(e,"table"),p=o()(t,f,l&&`${f}-${l}`,i&&`${f}-${i}`,n&&`${f}-${"string"==typeof n?`striped-${n}`:"striped"}`,r&&`${f}-bordered`,a&&`${f}-borderless`,s&&`${f}-hover`),m=(0,v.jsx)("table",{...u,className:p,ref:d});if(c){let e=`${f}-responsive`;return"string"==typeof c&&(e=`${e}-${c}`),(0,v.jsx)("div",{className:e,children:m})}return m});Yl.displayName="Table";const Zl=Yl;function Jl(e){let t;return rn(e,e=>{null==t&&(t=e.props.eventKey)}),t}function Ql(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:a,id:s}=e.props;return null==t?null:(0,v.jsx)(ei,{as:"li",role:"presentation",children:(0,v.jsx)(ni,{as:"button",type:"button",eventKey:n,disabled:r,id:s,className:o,...a,children:t})})}const ec=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:a=!1,variant:s="tabs",children:i,activeKey:l=Jl(i),...c}=m(e,{activeKey:"onSelect"});return(0,v.jsxs)(Fl,{id:t,activeKey:l,onSelect:n,transition:Hl(r),mountOnEnter:o,unmountOnExit:a,children:[(0,v.jsx)(oi,{id:t,...c,role:"tablist",as:"ul",variant:s,children:nn(i,Ql)}),(0,v.jsx)(Vl,{children:nn(i,e=>{const t={...e.props};return delete t.title,delete t.disabled,delete t.tabClassName,delete t.tabAttrs,(0,v.jsx)(Ul,{...t})})})]})};ec.displayName="Tabs";const tc=ec,nc={[B]:"showing",[H]:"showing show"},rc=a.forwardRef((e,t)=>(0,v.jsx)(tt,{...e,ref:t,transitionClasses:nc}));rc.displayName="ToastFade";const oc=rc,ac=a.createContext({onClose(){}}),sc=a.forwardRef(({bsPrefix:e,closeLabel:t="Close",closeVariant:n,closeButton:r=!0,className:s,children:i,...l},c)=>{e=w(e,"toast-header");const u=(0,a.useContext)(ac),d=De(e=>{null==u||null==u.onClose||u.onClose(e)});return(0,v.jsxs)("div",{ref:c,...l,className:o()(e,s),children:[i,r&&(0,v.jsx)(st,{"aria-label":t,variant:n,onClick:d,"data-dismiss":"toast"})]})});sc.displayName="ToastHeader";const ic=sc,lc=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=w(t,"toast-body"),(0,v.jsx)(n,{ref:a,className:o()(e,t),...r})));lc.displayName="ToastBody";const cc=lc,uc=a.forwardRef(({bsPrefix:e,className:t,transition:n=oc,show:r=!0,animation:s=!0,delay:i=5e3,autohide:l=!1,onClose:c,onEntered:u,onExit:d,onExiting:f,onEnter:p,onEntering:m,onExited:h,bg:x,...b},g)=>{e=w(e,"toast");const y=(0,a.useRef)(i),E=(0,a.useRef)(c);(0,a.useEffect)(()=>{y.current=i,E.current=c},[i,c]);const N=Zt(),C=!(!l||!r),j=(0,a.useCallback)(()=>{C&&(null==E.current||E.current())},[C]);(0,a.useEffect)(()=>{N.set(j,y.current)},[N,j]);const O=(0,a.useMemo)(()=>({onClose:c}),[c]),R=!(!n||!s),k=(0,v.jsx)("div",{...b,ref:g,className:o()(e,t,x&&`bg-${x}`,!R&&(r?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return(0,v.jsx)(ac.Provider,{value:O,children:R&&n?(0,v.jsx)(n,{in:r,onEnter:p,onEntering:m,onEntered:u,onExit:d,onExiting:f,onExited:h,unmountOnExit:!0,children:k}):k})});uc.displayName="Toast";const dc=Object.assign(uc,{Body:cc,Header:ic}),fc={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},pc=a.forwardRef(({bsPrefix:e,position:t,containerPosition:n,className:r,as:a="div",...s},i)=>(e=w(e,"toast-container"),(0,v.jsx)(a,{ref:i,...s,className:o()(e,t&&fc[t],n&&`position-${n}`,r)})));pc.displayName="ToastContainer";const mc=pc,vc=()=>{},hc=a.forwardRef(({bsPrefix:e,name:t,className:n,checked:r,type:a,onChange:s,value:i,disabled:l,id:c,inputRef:u,...d},f)=>(e=w(e,"btn-check"),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("input",{className:e,name:t,type:a,value:i,ref:u,autoComplete:"off",checked:!!r,disabled:!!l,onChange:s||vc,id:c}),(0,v.jsx)(xt,{...d,ref:f,className:o()(n,l&&"disabled"),type:void 0,role:void 0,as:"label",htmlFor:c})]})));hc.displayName="ToggleButton";const xc=hc,bc=a.forwardRef((e,t)=>{const{children:n,type:r="radio",name:o,value:s,onChange:i,vertical:l=!1,...c}=m(e,{value:"onChange"}),d=()=>null==s?[]:[].concat(s);return"radio"!==r||o||u()(!1),(0,v.jsx)(gt,{...c,ref:t,vertical:l,children:nn(n,e=>{const t=d(),{value:n,onChange:s}=e.props;return a.cloneElement(e,{type:r,name:e.name||o,checked:-1!==t.indexOf(n),onChange:ne(s,e=>((e,t)=>{if(!i)return;const n=d(),o=-1!==n.indexOf(e);"radio"!==r?i(o?n.filter(t=>t!==e):[...n,e],t):o||i(e,t)})(n,e))})})})});bc.displayName="ToggleButtonGroup";const gc=Object.assign(bc,{Button:xc})},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9771:e=>{"use strict";e.exports=function(){}}}]);
@@ -0,0 +1,15 @@
1
+ /*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */
6
+
7
+ /**
8
+ * @license React
9
+ * react-jsx-runtime.production.min.js
10
+ *
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksage_agent_internal=self.webpackChunksage_agent_internal||[]).push([[713],{5713:(e,n,t)=>{function r(){}function i(e,n,t,r,i){for(var o,l=[];n;)l.push(n),o=n.previousComponent,delete n.previousComponent,n=o;l.reverse();for(var a=0,u=l.length,s=0,f=0;a<u;a++){var c=l[a];if(c.removed)c.value=e.join(r.slice(f,f+c.count)),f+=c.count;else{if(!c.added&&i){var d=t.slice(s,s+c.count);d=d.map(function(e,n){var t=r[f+n];return t.length>e.length?t:e}),c.value=e.join(d)}else c.value=e.join(t.slice(s,s+c.count));s+=c.count,c.added||(f+=c.count)}}return l}t.r(n),t.d(n,{Diff:()=>r,applyPatch:()=>q,applyPatches:()=>R,canonicalize:()=>W,convertChangesToDMP:()=>he,convertChangesToXML:()=>ve,createPatch:()=>Z,createTwoFilesPatch:()=>X,diffArrays:()=>z,diffChars:()=>l,diffCss:()=>N,diffJson:()=>T,diffLines:()=>L,diffSentences:()=>P,diffTrimmedLines:()=>S,diffWords:()=>m,diffWordsWithSpace:()=>b,formatPatch:()=>U,merge:()=>K,parsePatch:()=>$,reversePatch:()=>de,structuredPatch:()=>_}),r.prototype={diff:function(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callback;"function"==typeof r&&(o=r,r={});var l=this;function a(e){return e=l.postProcess(e,r),o?(setTimeout(function(){o(e)},0),!0):e}e=this.castInput(e,r),n=this.castInput(n,r),e=this.removeEmpty(this.tokenize(e,r));var u=(n=this.removeEmpty(this.tokenize(n,r))).length,s=e.length,f=1,c=u+s;null!=r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var d=null!==(t=r.timeout)&&void 0!==t?t:1/0,h=Date.now()+d,v=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(v[0],n,e,0,r);if(v[0].oldPos+1>=s&&p+1>=u)return a(i(l,v[0].lastComponent,n,e,l.useLongestToken));var g=-1/0,m=1/0;function w(){for(var t=Math.max(g,-f);t<=Math.min(m,f);t+=2){var o=void 0,c=v[t-1],d=v[t+1];c&&(v[t-1]=void 0);var h=!1;if(d){var w=d.oldPos-t;h=d&&0<=w&&w<u}var y=c&&c.oldPos+1<s;if(h||y){if(o=!y||h&&c.oldPos<d.oldPos?l.addToPath(d,!0,!1,0,r):l.addToPath(c,!1,!0,1,r),p=l.extractCommon(o,n,e,t,r),o.oldPos+1>=s&&p+1>=u)return a(i(l,o.lastComponent,n,e,l.useLongestToken));v[t]=o,o.oldPos+1>=s&&(m=Math.min(m,t-1)),p+1>=u&&(g=Math.max(g,t+1))}else v[t]=void 0}f++}if(o)!function e(){setTimeout(function(){if(f>c||Date.now()>h)return o();w()||e()},0)}();else for(;f<=c&&Date.now()<=h;){var y=w();if(y)return y}},addToPath:function(e,n,t,r,i){var o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===n&&o.removed===t?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:n,removed:t,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:n,removed:t,previousComponent:o}}},extractCommon:function(e,n,t,r,i){for(var o=n.length,l=t.length,a=e.oldPos,u=a-r,s=0;u+1<o&&a+1<l&&this.equals(t[a+1],n[u+1],i);)u++,a++,s++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return s&&!i.oneChangePerToken&&(e.lastComponent={count:s,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,u},equals:function(e,n,t){return t.comparator?t.comparator(e,n):e===n||t.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return Array.from(e)},join:function(e){return e.join("")},postProcess:function(e){return e}};var o=new r;function l(e,n,t){return o.diff(e,n,t)}function a(e,n){var t;for(t=0;t<e.length&&t<n.length;t++)if(e[t]!=n[t])return e.slice(0,t);return e.slice(0,t)}function u(e,n){var t;if(!e||!n||e[e.length-1]!=n[n.length-1])return"";for(t=0;t<e.length&&t<n.length;t++)if(e[e.length-(t+1)]!=n[n.length-(t+1)])return e.slice(-t);return e.slice(-t)}function s(e,n,t){if(e.slice(0,n.length)!=n)throw Error("string ".concat(JSON.stringify(e)," doesn't start with prefix ").concat(JSON.stringify(n),"; this is a bug"));return t+e.slice(n.length)}function f(e,n,t){if(!n)return e+t;if(e.slice(-n.length)!=n)throw Error("string ".concat(JSON.stringify(e)," doesn't end with suffix ").concat(JSON.stringify(n),"; this is a bug"));return e.slice(0,-n.length)+t}function c(e,n){return s(e,n,"")}function d(e,n){return f(e,n,"")}function h(e,n){return n.slice(0,function(e,n){var t=0;e.length>n.length&&(t=e.length-n.length);var r=n.length;e.length<n.length&&(r=e.length);var i=Array(r),o=0;i[0]=0;for(var l=1;l<r;l++){for(n[l]==n[o]?i[l]=i[o]:i[l]=o;o>0&&n[l]!=n[o];)o=i[o];n[l]==n[o]&&o++}o=0;for(var a=t;a<e.length;a++){for(;o>0&&e[a]!=n[o];)o=i[o];e[a]==n[o]&&o++}return o}(e,n))}var v="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",p=new RegExp("[".concat(v,"]+|\\s+|[^").concat(v,"]"),"ug"),g=new r;function m(e,n,t){return null==(null==t?void 0:t.ignoreWhitespace)||t.ignoreWhitespace?g.diff(e,n,t):b(e,n,t)}function w(e,n,t,r){if(n&&t){var i=n.value.match(/^\s*/)[0],o=n.value.match(/\s*$/)[0],l=t.value.match(/^\s*/)[0],v=t.value.match(/\s*$/)[0];if(e){var p=a(i,l);e.value=f(e.value,l,p),n.value=c(n.value,p),t.value=c(t.value,p)}if(r){var g=u(o,v);r.value=s(r.value,v,g),n.value=d(n.value,g),t.value=d(t.value,g)}}else if(t)e&&(t.value=t.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(e&&r){var m=r.value.match(/^\s*/)[0],w=n.value.match(/^\s*/)[0],y=n.value.match(/\s*$/)[0],b=a(m,w);n.value=c(n.value,b);var k=u(c(m,b),y);n.value=d(n.value,k),r.value=s(r.value,m,k),e.value=f(e.value,m,m.slice(0,m.length-k.length))}else if(r){var L=r.value.match(/^\s*/)[0],S=h(n.value.match(/\s*$/)[0],L);n.value=d(n.value,S)}else if(e){var x=h(e.value.match(/\s*$/)[0],n.value.match(/^\s*/)[0]);n.value=c(n.value,x)}}g.equals=function(e,n,t){return t.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e.trim()===n.trim()},g.tokenize=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.intlSegmenter){if("word"!=t.intlSegmenter.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');n=Array.from(t.intlSegmenter.segment(e),function(e){return e.segment})}else n=e.match(p)||[];var r=[],i=null;return n.forEach(function(e){/\s/.test(e)?null==i?r.push(e):r.push(r.pop()+e):/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r},g.join=function(e){return e.map(function(e,n){return 0==n?e:e.replace(/^\s+/,"")}).join("")},g.postProcess=function(e,n){if(!e||n.oneChangePerToken)return e;var t=null,r=null,i=null;return e.forEach(function(e){e.added?r=e:e.removed?i=e:((r||i)&&w(t,i,r,e),t=e,r=null,i=null)}),(r||i)&&w(t,i,r,null),e};var y=new r;function b(e,n,t){return y.diff(e,n,t)}y.tokenize=function(e){var n=new RegExp("(\\r?\\n)|[".concat(v,"]+|[^\\S\\n\\r]+|[^").concat(v,"]"),"ug");return e.match(n)||[]};var k=new r;function L(e,n,t){return k.diff(e,n,t)}function S(e,n,t){var r=function(e,n){if("function"==typeof e)n.callback=e;else if(e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t,{ignoreWhitespace:!0});return k.diff(e,n,r)}k.tokenize=function(e,n){n.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var i=0;i<r.length;i++){var o=r[i];i%2&&!n.newlineIsToken?t[t.length-1]+=o:t.push(o)}return t},k.equals=function(e,n,t){return t.ignoreWhitespace?(t.newlineIsToken&&e.includes("\n")||(e=e.trim()),t.newlineIsToken&&n.includes("\n")||(n=n.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),n.endsWith("\n")&&(n=n.slice(0,-1))),r.prototype.equals.call(this,e,n,t)};var x=new r;function P(e,n,t){return x.diff(e,n,t)}x.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var F=new r;function N(e,n,t){return F.diff(e,n,t)}function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach(function(n){var r,i,o;r=e,i=n,o=t[n],(i=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function E(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}F.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var H=new r;function T(e,n,t){return H.diff(e,n,t)}function W(e,n,t,r,i){var o,l;for(n=n||[],t=t||[],r&&(e=r(i,e)),o=0;o<n.length;o+=1)if(n[o]===e)return t[o];if("[object Array]"===Object.prototype.toString.call(e)){for(n.push(e),l=new Array(e.length),t.push(l),o=0;o<e.length;o+=1)l[o]=W(e[o],n,t,r,i);return n.pop(),t.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),"object"===O(e)&&null!==e){n.push(e),l={},t.push(l);var a,u=[];for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&u.push(a);for(u.sort(),o=0;o<u.length;o+=1)l[a=u[o]]=W(e[a],n,t,r,a);n.pop(),t.pop()}else l=e;return l}H.useLongestToken=!0,H.tokenize=k.tokenize,H.castInput=function(e,n){var t=n.undefinedReplacement,r=n.stringifyReplacer,i=void 0===r?function(e,n){return void 0===n?t:n}:r;return"string"==typeof e?e:JSON.stringify(W(e,null,null,i),i," ")},H.equals=function(e,n,t){return r.prototype.equals.call(H,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"),t)};var I=new r;function z(e,n,t){return I.diff(e,n,t)}function D(e){return Array.isArray(e)?e.map(D):j(j({},e),{},{hunks:e.hunks.map(function(e){return j(j({},e),{},{lines:e.lines.map(function(n,t){var r;return n.startsWith("\\")||n.endsWith("\r")||null!==(r=e.lines[t+1])&&void 0!==r&&r.startsWith("\\")?n:n+"\r"})})})})}function M(e){return Array.isArray(e)?e.map(M):j(j({},e),{},{hunks:e.hunks.map(function(e){return j(j({},e),{},{lines:e.lines.map(function(e){return e.endsWith("\r")?e.substring(0,e.length-1):e})})})})}function $(e){var n=e.split(/\n/),t=[],r=0;function i(){var e={};for(t.push(e);r<n.length;){var i=n[r];if(/^(\-\-\-|\+\+\+|@@)\s/.test(i))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(i);a&&(e.index=a[1]),r++}for(o(e),o(e),e.hunks=[];r<n.length;){var u=n[r];if(/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(u))break;if(/^@@/.test(u))e.hunks.push(l());else{if(u)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(u));r++}}}function o(e){var t=/^(---|\+\+\+)\s+(.*)\r?$/.exec(n[r]);if(t){var i="---"===t[1]?"old":"new",o=t[2].split("\t",2),l=o[0].replace(/\\\\/g,"\\");/^".*"$/.test(l)&&(l=l.substr(1,l.length-2)),e[i+"FileName"]=l,e[i+"Header"]=(o[1]||"").trim(),r++}}function l(){var e=r,t=n[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+t[1],oldLines:void 0===t[2]?1:+t[2],newStart:+t[3],newLines:void 0===t[4]?1:+t[4],lines:[]};0===i.oldLines&&(i.oldStart+=1),0===i.newLines&&(i.newStart+=1);for(var o=0,l=0;r<n.length&&(l<i.oldLines||o<i.newLines||null!==(a=n[r])&&void 0!==a&&a.startsWith("\\"));r++){var a,u=0==n[r].length&&r!=n.length-1?" ":n[r][0];if("+"!==u&&"-"!==u&&" "!==u&&"\\"!==u)throw new Error("Hunk at line ".concat(e+1," contained invalid line ").concat(n[r]));i.lines.push(n[r]),"+"===u?o++:"-"===u?l++:" "===u&&(o++,l++)}if(o||1!==i.newLines||(i.newLines=0),l||1!==i.oldLines||(i.oldLines=0),o!==i.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(l!==i.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1));return i}for(;r<n.length;)i();return t}function J(e,n,t){var r=!0,i=!1,o=!1,l=1;return function a(){if(r&&!o){if(i?l++:r=!1,e+l<=t)return e+l;o=!0}if(!i)return o||(r=!0),n<=e-l?e-l++:(i=!0,a())}}function q(e,n){var t,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=$(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}(i.autoConvertLineEndings||null==i.autoConvertLineEndings)&&(!(r=e).includes("\r\n")||r.startsWith("\n")||r.match(/[^\r]\n/)||(t=n,Array.isArray(t)||(t=[t]),t.some(function(e){return e.hunks.some(function(e){return e.lines.some(function(e){return!e.startsWith("\\")&&e.endsWith("\r")})})}))?function(e){return!e.includes("\r\n")&&e.includes("\n")}(e)&&function(e){return Array.isArray(e)||(e=[e]),e.some(function(e){return e.hunks.some(function(e){return e.lines.some(function(e){return e.endsWith("\r")})})})&&e.every(function(e){return e.hunks.every(function(e){return e.lines.every(function(n,t){var r;return n.startsWith("\\")||n.endsWith("\r")||(null===(r=e.lines[t+1])||void 0===r?void 0:r.startsWith("\\"))})})})}(n)&&(n=M(n)):n=D(n));var o=e.split("\n"),l=n.hunks,a=i.compareLine||function(e,n,t,r){return n===r},u=i.fuzzFactor||0,s=0;if(u<0||!Number.isInteger(u))throw new Error("fuzzFactor must be a non-negative integer");if(!l.length)return e;for(var f="",c=!1,d=!1,h=0;h<l[l.length-1].lines.length;h++){var v=l[l.length-1].lines[h];"\\"==v[0]&&("+"==f[0]?c=!0:"-"==f[0]&&(d=!0)),f=v}if(c){if(d){if(!u&&""==o[o.length-1])return!1}else if(""==o[o.length-1])o.pop();else if(!u)return!1}else if(d)if(""!=o[o.length-1])o.push("");else if(!u)return!1;function p(e,n,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=0,f=!1;r<e.length;r++){var c=e[r],d=c.length>0?c[0]:" ",h=c.length>0?c.substr(1):c;if("-"===d){if(!a(n+1,o[n],d,h))return t&&null!=o[n]?(l[u]=o[n],p(e,n+1,t-1,r,!1,l,u+1)):null;n++,s=0}if("+"===d){if(!i)return null;l[u]=h,u++,s=0,f=!0}if(" "===d){if(s++,l[u]=o[n],!a(n+1,o[n],d,h))return f||!t?null:o[n]&&(p(e,n+1,t-1,r+1,!1,l,u+1)||p(e,n+1,t-1,r,!1,l,u+1))||p(e,n,t-1,r+1,!1,l,u);u++,i=!0,f=!1,n++}}return u-=s,n-=s,l.length=u,{patchedLines:l,oldLineLastI:n-1}}for(var g=[],m=0,w=0;w<l.length;w++){for(var y=l[w],b=void 0,k=o.length-y.oldLines+u,L=void 0,S=0;S<=u;S++){for(var x=J(L=y.oldStart+m-1,s,k);void 0!==L&&!(b=p(y.lines,L,S));L=x());if(b)break}if(!b)return!1;for(var P=s;P<L;P++)g.push(o[P]);for(var F=0;F<b.patchedLines.length;F++){var N=b.patchedLines[F];g.push(N)}s=b.oldLineLastI+1,m=L+1-y.oldStart}for(var C=s;C<o.length;C++)g.push(o[C]);return g.join("\n")}function R(e,n){"string"==typeof e&&(e=$(e));var t=0;!function r(){var i=e[t++];if(!i)return n.complete();n.loadFile(i,function(e,t){if(e)return n.complete(e);var o=q(t,i,n);n.patched(i,o,function(e){if(e)return n.complete(e);r()})})}()}function _(e,n,t,r,i,o,l){if(l||(l={}),"function"==typeof l&&(l={callback:l}),void 0===l.context&&(l.context=4),l.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!l.callback)return u(L(t,r,l));var a=l.callback;function u(t){if(t){t.push({value:"",lines:[]});for(var r=[],a=0,u=0,s=[],f=1,c=1,d=function(){var e,n,i,o=t[h],d=o.lines||(e=o.value,n=e.endsWith("\n"),i=e.split("\n").map(function(e){return e+"\n"}),n?i.pop():i.push(i.pop().slice(0,-1)),i);if(o.lines=d,o.added||o.removed){var v;if(!a){var p=t[h-1];a=f,u=c,p&&(s=l.context>0?w(p.lines.slice(-l.context)):[],a-=s.length,u-=s.length)}(v=s).push.apply(v,E(d.map(function(e){return(o.added?"+":"-")+e}))),o.added?c+=d.length:f+=d.length}else{if(a)if(d.length<=2*l.context&&h<t.length-2){var g;(g=s).push.apply(g,E(w(d)))}else{var m,y=Math.min(d.length,l.context);(m=s).push.apply(m,E(w(d.slice(0,y))));var b={oldStart:a,oldLines:f-a+y,newStart:u,newLines:c-u+y,lines:s};r.push(b),a=0,u=0,s=[]}f+=d.length,c+=d.length}},h=0;h<t.length;h++)d();for(var v=0,p=r;v<p.length;v++)for(var g=p[v],m=0;m<g.lines.length;m++)g.lines[m].endsWith("\n")?g.lines[m]=g.lines[m].slice(0,-1):(g.lines.splice(m+1,0,"\"),m++);return{oldFileName:e,newFileName:n,oldHeader:i,newHeader:o,hunks:r}}function w(e){return e.map(function(e){return" "+e})}}L(t,r,j(j({},l),{},{callback:function(e){var n=u(e);a(n)}}))}function U(e){if(Array.isArray(e))return e.map(U).join("\n");var n=[];e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),n.push("==================================================================="),n.push("--- "+e.oldFileName+(void 0===e.oldHeader?"":"\t"+e.oldHeader)),n.push("+++ "+e.newFileName+(void 0===e.newHeader?"":"\t"+e.newHeader));for(var t=0;t<e.hunks.length;t++){var r=e.hunks[t];0===r.oldLines&&(r.oldStart-=1),0===r.newLines&&(r.newStart-=1),n.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),n.push.apply(n,r.lines)}return n.join("\n")+"\n"}function X(e,n,t,r,i,o,l){var a;if("function"==typeof l&&(l={callback:l}),null===(a=l)||void 0===a||!a.callback){var u=_(e,n,t,r,i,o,l);if(!u)return;return U(u)}var s=l.callback;_(e,n,t,r,i,o,j(j({},l),{},{callback:function(e){e?s(U(e)):s()}}))}function Z(e,n,t,r,i,o){return X(e,e,n,t,r,i,o)}function B(e,n){if(n.length>e.length)return!1;for(var t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function G(e){var n=ce(e.lines),t=n.oldLines,r=n.newLines;void 0!==t?e.oldLines=t:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function K(e,n,t){e=Q(e,t),n=Q(n,t);var r={};(e.index||n.index)&&(r.index=e.index||n.index),(e.newFileName||n.newFileName)&&(V(e)?V(n)?(r.oldFileName=Y(r,e.oldFileName,n.oldFileName),r.newFileName=Y(r,e.newFileName,n.newFileName),r.oldHeader=Y(r,e.oldHeader,n.oldHeader),r.newHeader=Y(r,e.newHeader,n.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=n.oldFileName||e.oldFileName,r.newFileName=n.newFileName||e.newFileName,r.oldHeader=n.oldHeader||e.oldHeader,r.newHeader=n.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,l=0,a=0;i<e.hunks.length||o<n.hunks.length;){var u=e.hunks[i]||{oldStart:1/0},s=n.hunks[o]||{oldStart:1/0};if(ee(u,s))r.hunks.push(ne(u,l)),i++,a+=u.newLines-u.oldLines;else if(ee(s,u))r.hunks.push(ne(s,a)),o++,l+=s.newLines-s.oldLines;else{var f={oldStart:Math.min(u.oldStart,s.oldStart),oldLines:0,newStart:Math.min(u.newStart+l,s.oldStart+a),newLines:0,lines:[]};te(f,u.oldStart,u.lines,s.oldStart,s.lines),o++,i++,r.hunks.push(f)}}return r}function Q(e,n){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return $(e)[0];if(!n)throw new Error("Must provide a base reference or pass in a patch");return _(void 0,void 0,n,e)}return e}function V(e){return e.newFileName&&e.newFileName!==e.oldFileName}function Y(e,n,t){return n===t?n:(e.conflict=!0,{mine:n,theirs:t})}function ee(e,n){return e.oldStart<n.oldStart&&e.oldStart+e.oldLines<n.oldStart}function ne(e,n){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+n,newLines:e.newLines,lines:e.lines}}function te(e,n,t,r,i){var o={offset:n,lines:t,index:0},l={offset:r,lines:i,index:0};for(le(e,o,l),le(e,l,o);o.index<o.lines.length&&l.index<l.lines.length;){var a=o.lines[o.index],u=l.lines[l.index];if("-"!==a[0]&&"+"!==a[0]||"-"!==u[0]&&"+"!==u[0])if("+"===a[0]&&" "===u[0]){var s;(s=e.lines).push.apply(s,E(ue(o)))}else if("+"===u[0]&&" "===a[0]){var f;(f=e.lines).push.apply(f,E(ue(l)))}else"-"===a[0]&&" "===u[0]?ie(e,o,l):"-"===u[0]&&" "===a[0]?ie(e,l,o,!0):a===u?(e.lines.push(a),o.index++,l.index++):oe(e,ue(o),ue(l));else re(e,o,l)}ae(e,o),ae(e,l),G(e)}function re(e,n,t){var r,i,o=ue(n),l=ue(t);if(se(o)&&se(l)){var a,u;if(B(o,l)&&fe(t,o,o.length-l.length))return void(a=e.lines).push.apply(a,E(o));if(B(l,o)&&fe(n,l,l.length-o.length))return void(u=e.lines).push.apply(u,E(l))}else if(i=l,(r=o).length===i.length&&B(r,i)){var s;return void(s=e.lines).push.apply(s,E(o))}oe(e,o,l)}function ie(e,n,t,r){var i,o=ue(n),l=function(e,n){for(var t=[],r=[],i=0,o=!1,l=!1;i<n.length&&e.index<e.lines.length;){var a=e.lines[e.index],u=n[i];if("+"===u[0])break;if(o=o||" "!==a[0],r.push(u),i++,"+"===a[0])for(l=!0;"+"===a[0];)t.push(a),a=e.lines[++e.index];u.substr(1)===a.substr(1)?(t.push(a),e.index++):l=!0}if("+"===(n[i]||"")[0]&&o&&(l=!0),l)return t;for(;i<n.length;)r.push(n[i++]);return{merged:r,changes:t}}(t,o);l.merged?(i=e.lines).push.apply(i,E(l.merged)):oe(e,r?l:o,r?o:l)}function oe(e,n,t){e.conflict=!0,e.lines.push({conflict:!0,mine:n,theirs:t})}function le(e,n,t){for(;n.offset<t.offset&&n.index<n.lines.length;){var r=n.lines[n.index++];e.lines.push(r),n.offset++}}function ae(e,n){for(;n.index<n.lines.length;){var t=n.lines[n.index++];e.lines.push(t)}}function ue(e){for(var n=[],t=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===t&&"+"===r[0]&&(t="+"),t!==r[0])break;n.push(r),e.index++}return n}function se(e){return e.reduce(function(e,n){return e&&"-"===n[0]},!0)}function fe(e,n,t){for(var r=0;r<t;r++){var i=n[n.length-t+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=t,!0}function ce(e){var n=0,t=0;return e.forEach(function(e){if("string"!=typeof e){var r=ce(e.mine),i=ce(e.theirs);void 0!==n&&(r.oldLines===i.oldLines?n+=r.oldLines:n=void 0),void 0!==t&&(r.newLines===i.newLines?t+=r.newLines:t=void 0)}else void 0===t||"+"!==e[0]&&" "!==e[0]||t++,void 0===n||"-"!==e[0]&&" "!==e[0]||n++}),{oldLines:n,newLines:t}}function de(e){return Array.isArray(e)?e.map(de).reverse():j(j({},e),{},{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(function(e){return{oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(function(e){return e.startsWith("-")?"+".concat(e.slice(1)):e.startsWith("+")?"-".concat(e.slice(1)):e})}})})}function he(e){for(var n,t,r=[],i=0;i<e.length;i++)t=(n=e[i]).added?1:n.removed?-1:0,r.push([t,n.value]);return r}function ve(e){for(var n=[],t=0;t<e.length;t++){var r=e[t];r.added?n.push("<ins>"):r.removed&&n.push("<del>"),n.push(pe(r.value)),r.added?n.push("</ins>"):r.removed&&n.push("</del>")}return n.join("")}function pe(e){var n=e;return(n=(n=(n=n.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}I.tokenize=function(e){return e.slice()},I.join=I.removeEmpty=function(e){return e}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksage_agent_internal=self.webpackChunksage_agent_internal||[]).push([[742],{2742:(e,t,s)=>{function n(e,t,s,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,s):r?r.value=s:t.set(e,s),s}function r(e,t,s,n){if("a"===s&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?n:"a"===s?n.call(e):n?n.value:t.get(e)}s.r(t),s.d(t,{AI_PROMPT:()=>Xt,APIConnectionError:()=>u,APIConnectionTimeoutError:()=>d,APIError:()=>l,APIPromise:()=>se,APIUserAbortError:()=>h,Anthropic:()=>Ct,AnthropicError:()=>c,AuthenticationError:()=>p,BadRequestError:()=>f,BaseAnthropic:()=>Wt,ConflictError:()=>y,HUMAN_PROMPT:()=>Dt,InternalServerError:()=>_,NotFoundError:()=>m,PagePromise:()=>re,PermissionDeniedError:()=>g,RateLimitError:()=>w,UnprocessableEntityError:()=>b,default:()=>Ct,toFile:()=>me});let i=function(){const{crypto:e}=globalThis;if(e?.randomUUID)return i=e.randomUUID.bind(e),e.randomUUID();const t=new Uint8Array(1),s=e?()=>e.getRandomValues(t)[0]:()=>255*Math.random()&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^s()&15>>+e/4).toString(16))};function o(e){return"object"==typeof e&&null!==e&&("name"in e&&"AbortError"===e.name||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}const a=e=>{if(e instanceof Error)return e;if("object"==typeof e&&null!==e){try{if("[object Error]"===Object.prototype.toString.call(e)){const t=new Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return new Error(JSON.stringify(e))}catch{}}return new Error(e)};class c extends Error{}class l extends c{constructor(e,t,s,n){super(`${l.makeMessage(e,t,s)}`),this.status=e,this.headers=n,this.requestID=n?.get("request-id"),this.error=t}static makeMessage(e,t,s){const n=t?.message?"string"==typeof t.message?t.message:JSON.stringify(t.message):t?JSON.stringify(t):s;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,t,s,n){if(!e||!n)return new u({message:s,cause:a(t)});const r=t;return 400===e?new f(e,r,s,n):401===e?new p(e,r,s,n):403===e?new g(e,r,s,n):404===e?new m(e,r,s,n):409===e?new y(e,r,s,n):422===e?new b(e,r,s,n):429===e?new w(e,r,s,n):e>=500?new _(e,r,s,n):new l(e,r,s,n)}}class h extends l{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class u extends l{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}}class d extends u{constructor({message:e}={}){super({message:e??"Request timed out."})}}class f extends l{}class p extends l{}class g extends l{}class m extends l{}class y extends l{}class b extends l{}class w extends l{}class _ extends l{}const v=/^[a-z][a-z0-9+.-]*:/i;function k(e){return"object"!=typeof e?{}:e??{}}const S=e=>{try{return JSON.parse(e)}catch(e){return}},R={off:0,error:200,warn:300,info:400,debug:500},x=(e,t,s)=>{var n,r;if(e)return n=R,r=e,Object.prototype.hasOwnProperty.call(n,r)?e:void E(s).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(R))}`)};function M(){}function P(e,t,s){return!t||R[e]>R[s]?M:t[e].bind(t)}const A={error:M,warn:M,info:M,debug:M};let T=new WeakMap;function E(e){const t=e.logger,s=e.logLevel??"off";if(!t)return A;const n=T.get(t);if(n&&n[0]===s)return n[1];const r={error:P("error",t,s),warn:P("warn",t,s),info:P("info",t,s),debug:P("debug",t,s)};return T.set(t,[s,r]),r}const $=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,"x-api-key"===e.toLowerCase()||"authorization"===e.toLowerCase()||"cookie"===e.toLowerCase()||"set-cookie"===e.toLowerCase()?"***":t]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e),I="0.54.0",O=()=>{const e="undefined"!=typeof Deno&&null!=Deno.build?"deno":"undefined"!=typeof EdgeRuntime?"edge":"[object process]"===Object.prototype.toString.call(void 0!==globalThis.process?globalThis.process:0)?"node":"unknown";if("deno"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":I,"X-Stainless-OS":L(Deno.build.os),"X-Stainless-Arch":q(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":"string"==typeof Deno.version?Deno.version:Deno.version?.deno??"unknown"};if("undefined"!=typeof EdgeRuntime)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":I,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if("node"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":I,"X-Stainless-OS":L(globalThis.process.platform??"unknown"),"X-Stainless-Arch":q(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const t=function(){if("undefined"==typeof navigator||!navigator)return null;const e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:t,pattern:s}of e){const e=s.exec(navigator.userAgent);if(e)return{browser:t,version:`${e[1]||0}.${e[2]||0}.${e[3]||0}`}}return null}();return t?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":I,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":I,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},q=e=>"x32"===e?"x32":"x86_64"===e||"x64"===e?"x64":"arm"===e?"arm":"aarch64"===e||"arm64"===e?"arm64":e?`other:${e}`:"unknown",L=e=>(e=e.toLowerCase()).includes("ios")?"iOS":"android"===e?"Android":"darwin"===e?"MacOS":"win32"===e?"Windows":"freebsd"===e?"FreeBSD":"openbsd"===e?"OpenBSD":"linux"===e?"Linux":e?`Other:${e}`:"Unknown";let j;function N(...e){const t=globalThis.ReadableStream;if(void 0===t)throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function U(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return N({start(){},async pull(e){const{done:s,value:n}=await t.next();s?e.close():e.enqueue(n)},async cancel(){await(t.return?.())}})}function W(e){if(e[Symbol.asyncIterator])return e;const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}const C=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});let D,X;function H(e){let t;return(D??(t=new globalThis.TextEncoder,D=t.encode.bind(t)))(e)}function B(e){let t;return(X??(t=new globalThis.TextDecoder,X=t.decode.bind(t)))(e)}var F,J,K,V;class z{constructor(){F.set(this,void 0),J.set(this,void 0),n(this,F,new Uint8Array,"f"),n(this,J,null,"f")}decode(e){if(null==e)return[];const t=e instanceof ArrayBuffer?new Uint8Array(e):"string"==typeof e?H(e):e;n(this,F,function(e){let t=0;for(const s of e)t+=s.length;const s=new Uint8Array(t);let n=0;for(const t of e)s.set(t,n),n+=t.length;return s}([r(this,F,"f"),t]),"f");const s=[];let i;for(;null!=(i=G(r(this,F,"f"),r(this,J,"f")));){if(i.carriage&&null==r(this,J,"f")){n(this,J,i.index,"f");continue}if(null!=r(this,J,"f")&&(i.index!==r(this,J,"f")+1||i.carriage)){s.push(B(r(this,F,"f").subarray(0,r(this,J,"f")-1))),n(this,F,r(this,F,"f").subarray(r(this,J,"f")),"f"),n(this,J,null,"f");continue}const e=null!==r(this,J,"f")?i.preceding-1:i.preceding,t=B(r(this,F,"f").subarray(0,e));s.push(t),n(this,F,r(this,F,"f").subarray(i.index),"f"),n(this,J,null,"f")}return s}flush(){return r(this,F,"f").length?this.decode("\n"):[]}}function G(e,t){for(let s=t??0;s<e.length;s++){if(10===e[s])return{preceding:s,index:s+1,carriage:!1};if(13===e[s])return{preceding:s,index:s+1,carriage:!0}}return null}function Q(e){for(let t=0;t<e.length-1;t++){if(10===e[t]&&10===e[t+1])return t+2;if(13===e[t]&&13===e[t+1])return t+2;if(13===e[t]&&10===e[t+1]&&t+3<e.length&&13===e[t+2]&&10===e[t+3])return t+4}return-1}F=new WeakMap,J=new WeakMap,z.NEWLINE_CHARS=new Set(["\n","\r"]),z.NEWLINE_REGEXP=/\r\n|[\n\r]/g;class Y{constructor(e,t){this.iterator=e,this.controller=t}static fromSSEResponse(e,t){let s=!1;return new Y(async function*(){if(s)throw new c("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");s=!0;let n=!1;try{for await(const s of async function*(e,t){if(!e.body){if(t.abort(),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product)throw new c("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new c("Attempted to iterate over a response with no body")}const s=new Z,n=new z,r=W(e.body);for await(const e of async function*(e){let t=new Uint8Array;for await(const s of e){if(null==s)continue;const e=s instanceof ArrayBuffer?new Uint8Array(s):"string"==typeof s?H(s):s;let n,r=new Uint8Array(t.length+e.length);for(r.set(t),r.set(e,t.length),t=r;-1!==(n=Q(t));)yield t.slice(0,n),t=t.slice(n)}t.length>0&&(yield t)}(r))for(const t of n.decode(e)){const e=s.decode(t);e&&(yield e)}for(const e of n.flush()){const t=s.decode(e);t&&(yield t)}}(e,t)){if("completion"===s.event)try{yield JSON.parse(s.data)}catch(e){throw console.error("Could not parse message into JSON:",s.data),console.error("From chunk:",s.raw),e}if("message_start"===s.event||"message_delta"===s.event||"message_stop"===s.event||"content_block_start"===s.event||"content_block_delta"===s.event||"content_block_stop"===s.event)try{yield JSON.parse(s.data)}catch(e){throw console.error("Could not parse message into JSON:",s.data),console.error("From chunk:",s.raw),e}if("ping"!==s.event&&"error"===s.event)throw new l(void 0,S(s.data)??s.data,void 0,e.headers)}n=!0}catch(e){if(o(e))return;throw e}finally{n||t.abort()}},t)}static fromReadableStream(e,t){let s=!1;return new Y(async function*(){if(s)throw new c("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");s=!0;let n=!1;try{for await(const t of async function*(){const t=new z,s=W(e);for await(const e of s)for(const s of t.decode(e))yield s;for(const e of t.flush())yield e}())n||t&&(yield JSON.parse(t));n=!0}catch(e){if(o(e))return;throw e}finally{n||t.abort()}},t)}[Symbol.asyncIterator](){return this.iterator()}tee(){const e=[],t=[],s=this.iterator(),n=n=>({next:()=>{if(0===n.length){const n=s.next();e.push(n),t.push(n)}return n.shift()}});return[new Y(()=>n(e),this.controller),new Y(()=>n(t),this.controller)]}toReadableStream(){const e=this;let t;return N({async start(){t=e[Symbol.asyncIterator]()},async pull(e){try{const{value:s,done:n}=await t.next();if(n)return e.close();const r=H(JSON.stringify(s)+"\n");e.enqueue(r)}catch(t){e.error(t)}},async cancel(){await(t.return?.())}})}}class Z{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;const e={event:this.event,data:this.data.join("\n"),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(":"))return null;let[t,s,n]=function(e){const t=e.indexOf(":");return-1!==t?[e.substring(0,t),":",e.substring(t+1)]:[e,"",""]}(e);return n.startsWith(" ")&&(n=n.substring(1)),"event"===t?this.event=n:"data"===t&&this.data.push(n),null}}async function ee(e,t){const{response:s,requestLogID:n,retryOfRequestLogID:r,startTime:i}=t,o=await(async()=>{if(t.options.stream)return E(e).debug("response",s.status,s.url,s.headers,s.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(s,t.controller):Y.fromSSEResponse(s,t.controller);if(204===s.status)return null;if(t.options.__binaryResponse)return s;const n=s.headers.get("content-type"),r=n?.split(";")[0]?.trim();return r?.includes("application/json")||r?.endsWith("+json")?te(await s.json(),s):await s.text()})();return E(e).debug(`[${n}] response parsed`,$({retryOfRequestLogID:r,url:s.url,status:s.status,body:o,durationMs:Date.now()-i})),o}function te(e,t){return!e||"object"!=typeof e||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("request-id"),enumerable:!1})}class se extends Promise{constructor(e,t,s=ee){super(e=>{e(null)}),this.responsePromise=t,this.parseResponse=s,K.set(this,void 0),n(this,K,e,"f")}_thenUnwrap(e){return new se(r(this,K,"f"),this.responsePromise,async(t,s)=>te(e(await this.parseResponse(t,s),s),s.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){const[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(r(this,K,"f"),e))),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}K=new WeakMap;class ne{constructor(e,t,s,r){V.set(this,void 0),n(this,V,e,"f"),this.options=r,this.response=t,this.body=s}hasNextPage(){return!!this.getPaginatedItems().length&&null!=this.nextPageRequestOptions()}async getNextPage(){const e=this.nextPageRequestOptions();if(!e)throw new c("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await r(this,V,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(V=new WeakMap,Symbol.asyncIterator)](){for await(const e of this.iterPages())for(const t of e.getPaginatedItems())yield t}}class re extends se{constructor(e,t,s){super(e,t,async(e,t)=>new s(e,t.response,await ee(e,t),t.options))}async*[Symbol.asyncIterator](){const e=await(this);for await(const t of e)yield t}}class ie extends ne{constructor(e,t,s,n){super(e,t,s,n),this.data=s.data||[],this.has_more=s.has_more||!1,this.first_id=s.first_id||null,this.last_id=s.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return!1!==this.has_more&&super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){const e=this.first_id;return e?{...this.options,query:{...k(this.options.query),before_id:e}}:null}const e=this.last_id;return e?{...this.options,query:{...k(this.options.query),after_id:e}}:null}}const oe=()=>{if("undefined"==typeof File){const{process:e}=globalThis,t="string"==typeof e?.versions?.node&&parseInt(e.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function ae(e,t,s){return oe(),new File(e,t??"unknown_file",s)}function ce(e){return("object"==typeof e&&null!==e&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"").split(/[\\/]/).pop()||void 0}const le=e=>null!=e&&"object"==typeof e&&"function"==typeof e[Symbol.asyncIterator],he=new WeakMap,ue=async(e,t)=>{if(!await function(e){const t="function"==typeof e?e:e.fetch,s=he.get(t);if(s)return s;const n=(async()=>{try{const e="Response"in t?t.Response:(await t("data:,")).constructor,s=new FormData;return s.toString()!==await new e(s).text()}catch{return!0}})();return he.set(t,n),n}(t))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");const s=new FormData;return await Promise.all(Object.entries(e||{}).map(([e,t])=>de(s,e,t))),s},de=async(e,t,s)=>{if(void 0!==s){if(null==s)throw new TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if("string"==typeof s||"number"==typeof s||"boolean"==typeof s)e.append(t,String(s));else if(s instanceof Response){let n={};const r=s.headers.get("Content-Type");r&&(n={type:r}),e.append(t,ae([await s.blob()],ce(s),n))}else if(le(s))e.append(t,ae([await new Response(U(s)).blob()],ce(s)));else if((e=>e instanceof Blob&&"name"in e)(s))e.append(t,ae([s],ce(s),{type:s.type}));else if(Array.isArray(s))await Promise.all(s.map(s=>de(e,t+"[]",s)));else{if("object"!=typeof s)throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${s} instead`);await Promise.all(Object.entries(s).map(([s,n])=>de(e,`${t}[${s}]`,n)))}}},fe=e=>null!=e&&"object"==typeof e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.text&&"function"==typeof e.slice&&"function"==typeof e.arrayBuffer,pe=e=>null!=e&&"object"==typeof e&&"string"==typeof e.name&&"number"==typeof e.lastModified&&fe(e),ge=e=>null!=e&&"object"==typeof e&&"string"==typeof e.url&&"function"==typeof e.blob;async function me(e,t,s){if(oe(),e=await e,t||(t=ce(e)),pe(e))return e instanceof File&&null==t&&null==s?e:ae([await e.arrayBuffer()],t??e.name,{type:e.type,lastModified:e.lastModified,...s});if(ge(e)){const n=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),ae(await ye(n),t,s)}const n=await ye(e);if(!s?.type){const e=n.find(e=>"object"==typeof e&&"type"in e&&e.type);"string"==typeof e&&(s={...s,type:e})}return ae(n,t,s)}async function ye(e){let t=[];if("string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(fe(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else{if(!le(e)){const t=e?.constructor?.name;throw new Error(`Unexpected data type: ${typeof e}${t?`; constructor: ${t}`:""}${function(e){if("object"!=typeof e||null===e)return"";return`; props: [${Object.getOwnPropertyNames(e).map(e=>`"${e}"`).join(", ")}]`}(e)}`)}for await(const s of e)t.push(...await ye(s))}return t}class be{constructor(e){this._client=e}}const we=Symbol.for("brand.privateNullableHeaders"),_e=Array.isArray;function*ve(e){if(!e)return;if(we in e){const{values:t,nulls:s}=e;yield*t.entries();for(const e of s)yield[e,null];return}let t,s=!1;e instanceof Headers?t=e.entries():_e(e)?t=e:(s=!0,t=Object.entries(e??{}));for(let e of t){const t=e[0];if("string"!=typeof t)throw new TypeError("expected header name to be a string");const n=_e(e[1])?e[1]:[e[1]];let r=!1;for(const e of n)void 0!==e&&(s&&!r&&(r=!0,yield[t,null]),yield[t,e])}}const ke=e=>{const t=new Headers,s=new Set;for(const n of e){const e=new Set;for(const[r,i]of ve(n)){const n=r.toLowerCase();e.has(n)||(t.delete(r),e.add(n)),null===i?(t.delete(r),s.add(n)):(t.append(r,i),s.delete(n))}}return{[we]:!0,values:t,nulls:s}};function Se(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}const Re=((e=Se)=>function(t,...s){if(1===t.length)return t[0];let n=!1;const r=t.reduce((t,r,i)=>(/[?#]/.test(r)&&(n=!0),t+r+(i===s.length?"":(n?encodeURIComponent:e)(String(s[i])))),""),i=r.split(/[?#]/,1)[0],o=[],a=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;let l;for(;null!==(l=a.exec(i));)o.push({start:l.index,length:l[0].length});if(o.length>0){let e=0;const t=o.reduce((t,s)=>{const n=" ".repeat(s.start-e),r="^".repeat(s.length);return e=s.start+s.length,t+n+r},"");throw new c(`Path parameters result in path with invalid segments:\n${r}\n${t}`)}return r})(Se);class xe extends be{list(e={},t){const{betas:s,...n}=e??{};return this._client.getAPIList("/v1/files",ie,{query:n,...t,headers:ke([{"anthropic-beta":[...s??[],"files-api-2025-04-14"].toString()},t?.headers])})}delete(e,t={},s){const{betas:n}=t??{};return this._client.delete(Re`/v1/files/${e}`,{...s,headers:ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},s?.headers])})}download(e,t={},s){const{betas:n}=t??{};return this._client.get(Re`/v1/files/${e}/content`,{...s,headers:ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},s?.headers]),__binaryResponse:!0})}retrieveMetadata(e,t={},s){const{betas:n}=t??{};return this._client.get(Re`/v1/files/${e}`,{...s,headers:ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},s?.headers])})}upload(e,t){const{betas:s,...n}=e;return this._client.post("/v1/files",(async(e,t)=>({...e,body:await ue(e.body,t)}))({body:n,...t,headers:ke([{"anthropic-beta":[...s??[],"files-api-2025-04-14"].toString()},t?.headers])},this._client))}}class Me extends be{retrieve(e,t={},s){const{betas:n}=t??{};return this._client.get(Re`/v1/models/${e}?beta=true`,{...s,headers:ke([{...null!=n?.toString()?{"anthropic-beta":n?.toString()}:void 0},s?.headers])})}list(e={},t){const{betas:s,...n}=e??{};return this._client.getAPIList("/v1/models?beta=true",ie,{query:n,...t,headers:ke([{...null!=s?.toString()?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}class Pe{constructor(e,t){this.iterator=e,this.controller=t}async*decoder(){const e=new z;for await(const t of this.iterator)for(const s of e.decode(t))yield JSON.parse(s);for(const t of e.flush())yield JSON.parse(t)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,t){if(!e.body){if(t.abort(),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product)throw new c("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new c("Attempted to iterate over a response with no body")}return new Pe(W(e.body),t)}}class Ae extends be{create(e,t){const{betas:s,...n}=e;return this._client.post("/v1/messages/batches?beta=true",{body:n,...t,headers:ke([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString()},t?.headers])})}retrieve(e,t={},s){const{betas:n}=t??{};return this._client.get(Re`/v1/messages/batches/${e}?beta=true`,{...s,headers:ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},s?.headers])})}list(e={},t){const{betas:s,...n}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",ie,{query:n,...t,headers:ke([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString()},t?.headers])})}delete(e,t={},s){const{betas:n}=t??{};return this._client.delete(Re`/v1/messages/batches/${e}?beta=true`,{...s,headers:ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},s?.headers])})}cancel(e,t={},s){const{betas:n}=t??{};return this._client.post(Re`/v1/messages/batches/${e}/cancel?beta=true`,{...s,headers:ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},s?.headers])})}async results(e,t={},s){const n=await this.retrieve(e);if(!n.results_url)throw new c(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);const{betas:r}=t??{};return this._client.get(n.results_url,{...s,headers:ke([{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},s?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>Pe.fromResponse(t.response,t.controller))}}const Te=e=>{if(0===e.length)return e;let t=e[e.length-1];switch(t.type){case"separator":return e=e.slice(0,e.length-1),Te(e);case"number":let s=t.value[t.value.length-1];if("."===s||"-"===s)return e=e.slice(0,e.length-1),Te(e);case"string":let n=e[e.length-2];if("delimiter"===n?.type)return e=e.slice(0,e.length-1),Te(e);if("brace"===n?.type&&"{"===n.value)return e=e.slice(0,e.length-1),Te(e);break;case"delimiter":return e=e.slice(0,e.length-1),Te(e)}return e},Ee=e=>JSON.parse((e=>{let t="";return e.map(e=>{"string"===e.type?t+='"'+e.value+'"':t+=e.value}),t})((e=>{let t=[];return e.map(e=>{"brace"===e.type&&("{"===e.value?t.push("}"):t.splice(t.lastIndexOf("}"),1)),"paren"===e.type&&("["===e.value?t.push("]"):t.splice(t.lastIndexOf("]"),1))}),t.length>0&&t.reverse().map(t=>{"}"===t?e.push({type:"brace",value:"}"}):"]"===t&&e.push({type:"paren",value:"]"})}),e})(Te((e=>{let t=0,s=[];for(;t<e.length;){let n=e[t];if("\\"===n){t++;continue}if("{"===n){s.push({type:"brace",value:"{"}),t++;continue}if("}"===n){s.push({type:"brace",value:"}"}),t++;continue}if("["===n){s.push({type:"paren",value:"["}),t++;continue}if("]"===n){s.push({type:"paren",value:"]"}),t++;continue}if(":"===n){s.push({type:"separator",value:":"}),t++;continue}if(","===n){s.push({type:"delimiter",value:","}),t++;continue}if('"'===n){let r="",i=!1;for(n=e[++t];'"'!==n;){if(t===e.length){i=!0;break}if("\\"===n){if(t++,t===e.length){i=!0;break}r+=n+e[t],n=e[++t]}else r+=n,n=e[++t]}n=e[++t],i||s.push({type:"string",value:r});continue}if(n&&/\s/.test(n)){t++;continue}let r=/[0-9]/;if(n&&r.test(n)||"-"===n||"."===n){let i="";for("-"===n&&(i+=n,n=e[++t]);n&&r.test(n)||"."===n;)i+=n,n=e[++t];s.push({type:"number",value:i});continue}let i=/[a-z]/i;if(n&&i.test(n)){let r="";for(;n&&i.test(n)&&t!==e.length;)r+=n,n=e[++t];if("true"!=r&&"false"!=r&&"null"!==r){t++;continue}s.push({type:"name",value:r});continue}t++}return s})(e)))));var $e,Ie,Oe,qe,Le,je,Ne,Ue,We,Ce,De,Xe,He,Be,Fe,Je,Ke,Ve,ze,Ge,Qe,Ye;const Ze="__json_buf";function et(e){return"tool_use"===e.type||"server_tool_use"===e.type||"mcp_tool_use"===e.type}class tt{constructor(){$e.add(this),this.messages=[],this.receivedMessages=[],Ie.set(this,void 0),this.controller=new AbortController,Oe.set(this,void 0),qe.set(this,()=>{}),Le.set(this,()=>{}),je.set(this,void 0),Ne.set(this,()=>{}),Ue.set(this,()=>{}),We.set(this,{}),Ce.set(this,!1),De.set(this,!1),Xe.set(this,!1),He.set(this,!1),Be.set(this,void 0),Fe.set(this,void 0),Ve.set(this,e=>{if(n(this,De,!0,"f"),o(e)&&(e=new h),e instanceof h)return n(this,Xe,!0,"f"),this._emit("abort",e);if(e instanceof c)return this._emit("error",e);if(e instanceof Error){const t=new c(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new c(String(e)))}),n(this,Oe,new Promise((e,t)=>{n(this,qe,e,"f"),n(this,Le,t,"f")}),"f"),n(this,je,new Promise((e,t)=>{n(this,Ne,e,"f"),n(this,Ue,t,"f")}),"f"),r(this,Oe,"f").catch(()=>{}),r(this,je,"f").catch(()=>{})}get response(){return r(this,Be,"f")}get request_id(){return r(this,Fe,"f")}async withResponse(){const e=await r(this,Oe,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){const t=new tt;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s){const n=new tt;for(const e of t.messages)n._addMessageParam(e);return n._run(()=>n._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),n}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},r(this,Ve,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){const n=s?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),r(this,$e,"m",ze).call(this);const{response:i,data:o}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();this._connected(i);for await(const e of o)r(this,$e,"m",Ge).call(this,e);if(o.controller.signal?.aborted)throw new h;r(this,$e,"m",Qe).call(this)}_connected(e){this.ended||(n(this,Be,e,"f"),n(this,Fe,e?.headers.get("request-id"),"f"),r(this,qe,"f").call(this,e),this._emit("connect"))}get ended(){return r(this,Ce,"f")}get errored(){return r(this,De,"f")}get aborted(){return r(this,Xe,"f")}abort(){this.controller.abort()}on(e,t){return(r(this,We,"f")[e]||(r(this,We,"f")[e]=[])).push({listener:t}),this}off(e,t){const s=r(this,We,"f")[e];if(!s)return this;const n=s.findIndex(e=>e.listener===t);return n>=0&&s.splice(n,1),this}once(e,t){return(r(this,We,"f")[e]||(r(this,We,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{n(this,He,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){n(this,He,!0,"f"),await r(this,je,"f")}get currentMessage(){return r(this,Ie,"f")}async finalMessage(){return await this.done(),r(this,$e,"m",Je).call(this)}async finalText(){return await this.done(),r(this,$e,"m",Ke).call(this)}_emit(e,...t){if(r(this,Ce,"f"))return;"end"===e&&(n(this,Ce,!0,"f"),r(this,Ne,"f").call(this));const s=r(this,We,"f")[e];if(s&&(r(this,We,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){const e=t[0];return r(this,He,"f")||s?.length||Promise.reject(e),r(this,Le,"f").call(this,e),r(this,Ue,"f").call(this,e),void this._emit("end")}if("error"===e){const e=t[0];r(this,He,"f")||s?.length||Promise.reject(e),r(this,Le,"f").call(this,e),r(this,Ue,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",r(this,$e,"m",Je).call(this))}async _fromReadableStream(e,t){const s=t?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort())),r(this,$e,"m",ze).call(this),this._connected(null);const n=Y.fromReadableStream(e,this.controller);for await(const e of n)r(this,$e,"m",Ge).call(this,e);if(n.controller.signal?.aborted)throw new h;r(this,$e,"m",Qe).call(this)}[(Ie=new WeakMap,Oe=new WeakMap,qe=new WeakMap,Le=new WeakMap,je=new WeakMap,Ne=new WeakMap,Ue=new WeakMap,We=new WeakMap,Ce=new WeakMap,De=new WeakMap,Xe=new WeakMap,He=new WeakMap,Be=new WeakMap,Fe=new WeakMap,Ve=new WeakMap,$e=new WeakSet,Je=function(){if(0===this.receivedMessages.length)throw new c("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},Ke=function(){if(0===this.receivedMessages.length)throw new c("stream ended without producing a Message with role=assistant");const e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new c("stream ended without producing a content block with type=text");return e.join(" ")},ze=function(){this.ended||n(this,Ie,void 0,"f")},Ge=function(e){if(this.ended)return;const t=r(this,$e,"m",Ye).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{const s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":et(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;default:e.delta}break}case"message_stop":this._addMessageParam(t),this._addMessage(t,!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":n(this,Ie,t,"f")}},Qe=function(){if(this.ended)throw new c("stream has ended, this shouldn't happen");const e=r(this,Ie,"f");if(!e)throw new c("request ended without sending any chunks");return n(this,Ie,void 0,"f"),e},Ye=function(e){let t=r(this,Ie,"f");if("message_start"===e.type){if(t)throw new c(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new c(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.container=e.delta.container,t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case"content_block_start":return t.content.push(e.content_block),t;case"content_block_delta":{const s=t.content.at(e.index);switch(e.delta.type){case"text_delta":"text"===s?.type&&(s.text+=e.delta.text);break;case"citations_delta":"text"===s?.type&&(s.citations??(s.citations=[]),s.citations.push(e.delta.citation));break;case"input_json_delta":if(s&&et(s)){let t=s[Ze]||"";if(t+=e.delta.partial_json,Object.defineProperty(s,Ze,{value:t,enumerable:!1,writable:!0}),t)try{s.input=Ee(t)}catch(e){const s=new c(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${e}. JSON: ${t}`);r(this,Ve,"f").call(this,s)}}break;case"thinking_delta":"thinking"===s?.type&&(s.thinking+=e.delta.thinking);break;case"signature_delta":"thinking"===s?.type&&(s.signature=e.delta.signature);break;default:e.delta}return t}}},Symbol.asyncIterator)](){const e=[],t=[];let s=!1;return this.on("streamEvent",s=>{const n=t.shift();n?n.resolve(s):e.push(s)}),this.on("end",()=>{s=!0;for(const e of t)e.resolve(void 0);t.length=0}),this.on("abort",e=>{s=!0;for(const s of t)s.reject(e);t.length=0}),this.on("error",e=>{s=!0;for(const s of t)s.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Y(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}const st={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192},nt={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};class rt extends be{constructor(){super(...arguments),this.batches=new Ae(this._client)}create(e,t){const{betas:s,...n}=e;n.model in nt&&console.warn(`The model '${n.model}' is deprecated and will reach end-of-life on ${nt[n.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let r=this._client._options.timeout;if(!n.stream&&null==r){const e=st[n.model]??void 0;r=this._client.calculateNonstreamingTimeout(n.max_tokens,e)}return this._client.post("/v1/messages?beta=true",{body:n,timeout:r??6e5,...t,headers:ke([{...null!=s?.toString()?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}stream(e,t){return tt.createMessage(this,e,t)}countTokens(e,t){const{betas:s,...n}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:n,...t,headers:ke([{"anthropic-beta":[...s??[],"token-counting-2024-11-01"].toString()},t?.headers])})}}rt.Batches=Ae;class it extends be{constructor(){super(...arguments),this.models=new Me(this._client),this.messages=new rt(this._client),this.files=new xe(this._client)}}it.Models=Me,it.Messages=rt,it.Files=xe;class ot extends be{create(e,t){const{betas:s,...n}=e;return this._client.post("/v1/complete",{body:n,timeout:this._client._options.timeout??6e5,...t,headers:ke([{...null!=s?.toString()?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}}var at,ct,lt,ht,ut,dt,ft,pt,gt,mt,yt,bt,wt,_t,vt,kt,St,Rt,xt,Mt,Pt,At;const Tt="__json_buf";function Et(e){return"tool_use"===e.type||"server_tool_use"===e.type}class $t{constructor(){at.add(this),this.messages=[],this.receivedMessages=[],ct.set(this,void 0),this.controller=new AbortController,lt.set(this,void 0),ht.set(this,()=>{}),ut.set(this,()=>{}),dt.set(this,void 0),ft.set(this,()=>{}),pt.set(this,()=>{}),gt.set(this,{}),mt.set(this,!1),yt.set(this,!1),bt.set(this,!1),wt.set(this,!1),_t.set(this,void 0),vt.set(this,void 0),Rt.set(this,e=>{if(n(this,yt,!0,"f"),o(e)&&(e=new h),e instanceof h)return n(this,bt,!0,"f"),this._emit("abort",e);if(e instanceof c)return this._emit("error",e);if(e instanceof Error){const t=new c(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new c(String(e)))}),n(this,lt,new Promise((e,t)=>{n(this,ht,e,"f"),n(this,ut,t,"f")}),"f"),n(this,dt,new Promise((e,t)=>{n(this,ft,e,"f"),n(this,pt,t,"f")}),"f"),r(this,lt,"f").catch(()=>{}),r(this,dt,"f").catch(()=>{})}get response(){return r(this,_t,"f")}get request_id(){return r(this,vt,"f")}async withResponse(){const e=await r(this,lt,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){const t=new $t;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s){const n=new $t;for(const e of t.messages)n._addMessageParam(e);return n._run(()=>n._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),n}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},r(this,Rt,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){const n=s?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),r(this,at,"m",xt).call(this);const{response:i,data:o}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();this._connected(i);for await(const e of o)r(this,at,"m",Mt).call(this,e);if(o.controller.signal?.aborted)throw new h;r(this,at,"m",Pt).call(this)}_connected(e){this.ended||(n(this,_t,e,"f"),n(this,vt,e?.headers.get("request-id"),"f"),r(this,ht,"f").call(this,e),this._emit("connect"))}get ended(){return r(this,mt,"f")}get errored(){return r(this,yt,"f")}get aborted(){return r(this,bt,"f")}abort(){this.controller.abort()}on(e,t){return(r(this,gt,"f")[e]||(r(this,gt,"f")[e]=[])).push({listener:t}),this}off(e,t){const s=r(this,gt,"f")[e];if(!s)return this;const n=s.findIndex(e=>e.listener===t);return n>=0&&s.splice(n,1),this}once(e,t){return(r(this,gt,"f")[e]||(r(this,gt,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{n(this,wt,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){n(this,wt,!0,"f"),await r(this,dt,"f")}get currentMessage(){return r(this,ct,"f")}async finalMessage(){return await this.done(),r(this,at,"m",kt).call(this)}async finalText(){return await this.done(),r(this,at,"m",St).call(this)}_emit(e,...t){if(r(this,mt,"f"))return;"end"===e&&(n(this,mt,!0,"f"),r(this,ft,"f").call(this));const s=r(this,gt,"f")[e];if(s&&(r(this,gt,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){const e=t[0];return r(this,wt,"f")||s?.length||Promise.reject(e),r(this,ut,"f").call(this,e),r(this,pt,"f").call(this,e),void this._emit("end")}if("error"===e){const e=t[0];r(this,wt,"f")||s?.length||Promise.reject(e),r(this,ut,"f").call(this,e),r(this,pt,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",r(this,at,"m",kt).call(this))}async _fromReadableStream(e,t){const s=t?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort())),r(this,at,"m",xt).call(this),this._connected(null);const n=Y.fromReadableStream(e,this.controller);for await(const e of n)r(this,at,"m",Mt).call(this,e);if(n.controller.signal?.aborted)throw new h;r(this,at,"m",Pt).call(this)}[(ct=new WeakMap,lt=new WeakMap,ht=new WeakMap,ut=new WeakMap,dt=new WeakMap,ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt=new WeakMap,wt=new WeakMap,_t=new WeakMap,vt=new WeakMap,Rt=new WeakMap,at=new WeakSet,kt=function(){if(0===this.receivedMessages.length)throw new c("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},St=function(){if(0===this.receivedMessages.length)throw new c("stream ended without producing a Message with role=assistant");const e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new c("stream ended without producing a content block with type=text");return e.join(" ")},xt=function(){this.ended||n(this,ct,void 0,"f")},Mt=function(e){if(this.ended)return;const t=r(this,at,"m",At).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{const s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":Et(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;default:e.delta}break}case"message_stop":this._addMessageParam(t),this._addMessage(t,!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":n(this,ct,t,"f")}},Pt=function(){if(this.ended)throw new c("stream has ended, this shouldn't happen");const e=r(this,ct,"f");if(!e)throw new c("request ended without sending any chunks");return n(this,ct,void 0,"f"),e},At=function(e){let t=r(this,ct,"f");if("message_start"===e.type){if(t)throw new c(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new c(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case"content_block_start":return t.content.push(e.content_block),t;case"content_block_delta":{const s=t.content.at(e.index);switch(e.delta.type){case"text_delta":"text"===s?.type&&(s.text+=e.delta.text);break;case"citations_delta":"text"===s?.type&&(s.citations??(s.citations=[]),s.citations.push(e.delta.citation));break;case"input_json_delta":if(s&&Et(s)){let t=s[Tt]||"";t+=e.delta.partial_json,Object.defineProperty(s,Tt,{value:t,enumerable:!1,writable:!0}),t&&(s.input=Ee(t))}break;case"thinking_delta":"thinking"===s?.type&&(s.thinking+=e.delta.thinking);break;case"signature_delta":"thinking"===s?.type&&(s.signature=e.delta.signature);break;default:e.delta}return t}}},Symbol.asyncIterator)](){const e=[],t=[];let s=!1;return this.on("streamEvent",s=>{const n=t.shift();n?n.resolve(s):e.push(s)}),this.on("end",()=>{s=!0;for(const e of t)e.resolve(void 0);t.length=0}),this.on("abort",e=>{s=!0;for(const s of t)s.reject(e);t.length=0}),this.on("error",e=>{s=!0;for(const s of t)s.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Y(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}class It extends be{create(e,t){return this._client.post("/v1/messages/batches",{body:e,...t})}retrieve(e,t){return this._client.get(Re`/v1/messages/batches/${e}`,t)}list(e={},t){return this._client.getAPIList("/v1/messages/batches",ie,{query:e,...t})}delete(e,t){return this._client.delete(Re`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(Re`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){const s=await this.retrieve(e);if(!s.results_url)throw new c(`No batch \`results_url\`; Has it finished processing? ${s.processing_status} - ${s.id}`);return this._client.get(s.results_url,{...t,headers:ke([{Accept:"application/binary"},t?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>Pe.fromResponse(t.response,t.controller))}}class Ot extends be{constructor(){super(...arguments),this.batches=new It(this._client)}create(e,t){e.model in qt&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${qt[e.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let s=this._client._options.timeout;if(!e.stream&&null==s){const t=st[e.model]??void 0;s=this._client.calculateNonstreamingTimeout(e.max_tokens,t)}return this._client.post("/v1/messages",{body:e,timeout:s??6e5,...t,stream:e.stream??!1})}stream(e,t){return $t.createMessage(this,e,t)}countTokens(e,t){return this._client.post("/v1/messages/count_tokens",{body:e,...t})}}const qt={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};Ot.Batches=It;class Lt extends be{retrieve(e,t={},s){const{betas:n}=t??{};return this._client.get(Re`/v1/models/${e}`,{...s,headers:ke([{...null!=n?.toString()?{"anthropic-beta":n?.toString()}:void 0},s?.headers])})}list(e={},t){const{betas:s,...n}=e??{};return this._client.getAPIList("/v1/models",ie,{query:n,...t,headers:ke([{...null!=s?.toString()?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}const jt=e=>void 0!==globalThis.process?globalThis.process.env?.[e]?.trim()??void 0:void 0!==globalThis.Deno?globalThis.Deno.env?.get?.(e)?.trim():void 0;var Nt,Ut;class Wt{constructor({baseURL:e=jt("ANTHROPIC_BASE_URL"),apiKey:t=jt("ANTHROPIC_API_KEY")??null,authToken:s=jt("ANTHROPIC_AUTH_TOKEN")??null,...r}={}){Ut.set(this,void 0);const i={apiKey:t,authToken:s,...r,baseURL:e||"https://api.anthropic.com"};if(!i.dangerouslyAllowBrowser&&"undefined"!=typeof window&&void 0!==window.document&&"undefined"!=typeof navigator)throw new c("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n");this.baseURL=i.baseURL,this.timeout=i.timeout??Ct.DEFAULT_TIMEOUT,this.logger=i.logger??console;const o="warn";this.logLevel=o,this.logLevel=x(i.logLevel,"ClientOptions.logLevel",this)??x(jt("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??o,this.fetchOptions=i.fetchOptions,this.maxRetries=i.maxRetries??2,this.fetch=i.fetch??function(){if("undefined"!=typeof fetch)return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}(),n(this,Ut,C,"f"),this._options=i,this.apiKey=t,this.authToken=s}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){if(!(this.apiKey&&e.get("x-api-key")||t.has("x-api-key")||this.authToken&&e.get("authorization")||t.has("authorization")))throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){return ke([this.apiKeyAuth(e),this.bearerAuth(e)])}apiKeyAuth(e){if(null!=this.apiKey)return ke([{"X-Api-Key":this.apiKey}])}bearerAuth(e){if(null!=this.authToken)return ke([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new c(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${I}`}defaultIdempotencyKey(){return`stainless-node-retry-${i()}`}makeStatusError(e,t,s,n){return l.generate(e,t,s,n)}buildURL(e,t){const s=(e=>v.test(e))(e)?new URL(e):new URL(this.baseURL+(this.baseURL.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),n=this.defaultQuery();return function(e){if(!e)return!0;for(const t in e)return!1;return!0}(n)||(t={...n,...t}),"object"==typeof t&&t&&!Array.isArray(t)&&(s.search=this.stringifyQuery(t)),s.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new c("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:t,options:s}){}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,s){return this.request(Promise.resolve(s).then(s=>({method:e,path:t,...s})))}request(e,t=null){return new se(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,s){const n=await e,r=n.maxRetries??this.maxRetries;null==t&&(t=r),await this.prepareOptions(n);const{req:i,url:c,timeout:l}=this.buildRequest(n,{retryCount:r-t});await this.prepareRequest(i,{url:c,options:n});const f="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),p=void 0===s?"":`, retryOf: ${s}`,g=Date.now();if(E(this).debug(`[${f}] sending request`,$({retryOfRequestLogID:s,method:n.method,url:c,options:n,headers:i.headers})),n.signal?.aborted)throw new h;const m=new AbortController,y=await this.fetchWithTimeout(c,i,l,m).catch(a),b=Date.now();if(y instanceof Error){const e=`retrying, ${t} attempts remaining`;if(n.signal?.aborted)throw new h;const r=o(y)||/timed? ?out/i.test(String(y)+("cause"in y?String(y.cause):""));if(t)return E(this).info(`[${f}] connection ${r?"timed out":"failed"} - ${e}`),E(this).debug(`[${f}] connection ${r?"timed out":"failed"} (${e})`,$({retryOfRequestLogID:s,url:c,durationMs:b-g,message:y.message})),this.retryRequest(n,t,s??f);if(E(this).info(`[${f}] connection ${r?"timed out":"failed"} - error; no more retries left`),E(this).debug(`[${f}] connection ${r?"timed out":"failed"} (error; no more retries left)`,$({retryOfRequestLogID:s,url:c,durationMs:b-g,message:y.message})),r)throw new d;throw new u({cause:y})}const w=`[${f}${p}${[...y.headers.entries()].filter(([e])=>"request-id"===e).map(([e,t])=>", "+e+": "+JSON.stringify(t)).join("")}] ${i.method} ${c} ${y.ok?"succeeded":"failed"} with status ${y.status} in ${b-g}ms`;if(!y.ok){const e=this.shouldRetry(y);if(t&&e){const e=`retrying, ${t} attempts remaining`;return await async function(e){if(null===e||"object"!=typeof e)return;if(e[Symbol.asyncIterator])return void await(e[Symbol.asyncIterator]().return?.());const t=e.getReader(),s=t.cancel();t.releaseLock(),await s}(y.body),E(this).info(`${w} - ${e}`),E(this).debug(`[${f}] response error (${e})`,$({retryOfRequestLogID:s,url:y.url,status:y.status,headers:y.headers,durationMs:b-g})),this.retryRequest(n,t,s??f,y.headers)}const r=e?"error; no more retries left":"error; not retryable";E(this).info(`${w} - ${r}`);const i=await y.text().catch(e=>a(e).message),o=S(i),c=o?void 0:i;throw E(this).debug(`[${f}] response error (${r})`,$({retryOfRequestLogID:s,url:y.url,status:y.status,headers:y.headers,message:c,durationMs:Date.now()-g})),this.makeStatusError(y.status,o,c,y.headers)}return E(this).info(w),E(this).debug(`[${f}] response start`,$({retryOfRequestLogID:s,url:y.url,status:y.status,headers:y.headers,durationMs:b-g})),{response:y,options:n,controller:m,requestLogID:f,retryOfRequestLogID:s,startTime:g}}getAPIList(e,t,s){return this.requestAPIList(t,{method:"get",path:e,...s})}requestAPIList(e,t){const s=this.makeRequest(t,null,void 0);return new re(this,s,e)}async fetchWithTimeout(e,t,s,n){const{signal:r,method:i,...o}=t||{};r&&r.addEventListener("abort",()=>n.abort());const a=setTimeout(()=>n.abort(),s),c=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||"object"==typeof o.body&&null!==o.body&&Symbol.asyncIterator in o.body,l={signal:n.signal,...c?{duplex:"half"}:{},method:"GET",...o};i&&(l.method=i.toUpperCase());try{return await this.fetch.call(void 0,e,l)}finally{clearTimeout(a)}}shouldRetry(e){const t=e.headers.get("x-should-retry");return"true"===t||"false"!==t&&(408===e.status||409===e.status||429===e.status||e.status>=500)}async retryRequest(e,t,s,n){let r;const i=n?.get("retry-after-ms");if(i){const e=parseFloat(i);Number.isNaN(e)||(r=e)}const o=n?.get("retry-after");if(o&&!r){const e=parseFloat(o);r=Number.isNaN(e)?Date.parse(o)-Date.now():1e3*e}if(!(r&&0<=r&&r<6e4)){const s=e.maxRetries??this.maxRetries;r=this.calculateDefaultRetryTimeoutMillis(t,s)}var a;return await(a=r,new Promise(e=>setTimeout(e,a))),this.makeRequest(e,t-1,s)}calculateDefaultRetryTimeoutMillis(e,t){const s=t-e;return Math.min(.5*Math.pow(2,s),8)*(1-.25*Math.random())*1e3}calculateNonstreamingTimeout(e,t){const s=6e5;if(36e5*e/128e3>s||null!=t&&e>t)throw new c("Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return s}buildRequest(e,{retryCount:t=0}={}){const s={...e},{method:n,path:r,query:i}=s,o=this.buildURL(r,i);"timeout"in s&&((e,t)=>{if("number"!=typeof t||!Number.isInteger(t))throw new c(`${e} must be an integer`);if(t<0)throw new c(`${e} must be a positive integer`)})("timeout",s.timeout),s.timeout=s.timeout??this.timeout;const{bodyHeaders:a,body:l}=this.buildBody({options:s});return{req:{method:n,headers:this.buildHeaders({options:e,method:n,bodyHeaders:a,retryCount:t}),...s.signal&&{signal:s.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:"half"},...l&&{body:l},...this.fetchOptions??{},...s.fetchOptions??{}},url:o,timeout:s.timeout}}buildHeaders({options:e,method:t,bodyHeaders:s,retryCount:n}){let r={};this.idempotencyHeader&&"get"!==t&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),r[this.idempotencyHeader]=e.idempotencyKey);const i=ke([r,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(n),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...j??(j=O()),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},this.authHeaders(e),this._options.defaultHeaders,s,e.headers]);return this.validateHeaders(i),i.values}buildBody({options:{body:e,headers:t}}){if(!e)return{bodyHeaders:void 0,body:void 0};const s=ke([t]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||"string"==typeof e&&s.values.has("content-type")||e instanceof Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:"object"==typeof e&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&"function"==typeof e.next)?{bodyHeaders:void 0,body:U(e)}:r(this,Ut,"f").call(this,{body:e,headers:s})}}Nt=Wt,Ut=new WeakMap,Wt.Anthropic=Nt,Wt.HUMAN_PROMPT="\n\nHuman:",Wt.AI_PROMPT="\n\nAssistant:",Wt.DEFAULT_TIMEOUT=6e5,Wt.AnthropicError=c,Wt.APIError=l,Wt.APIConnectionError=u,Wt.APIConnectionTimeoutError=d,Wt.APIUserAbortError=h,Wt.NotFoundError=m,Wt.ConflictError=y,Wt.RateLimitError=w,Wt.BadRequestError=f,Wt.AuthenticationError=p,Wt.InternalServerError=_,Wt.PermissionDeniedError=g,Wt.UnprocessableEntityError=b,Wt.toFile=me;class Ct extends Wt{constructor(){super(...arguments),this.completions=new ot(this),this.messages=new Ot(this),this.models=new Lt(this),this.beta=new it(this)}}Ct.Completions=ot,Ct.Messages=Ot,Ct.Models=Lt,Ct.Beta=it;const{HUMAN_PROMPT:Dt,AI_PROMPT:Xt}=Ct}}]);