@newadarshorg/spritz-ui-components
Version:
This is shared components library for spritz projects.
16 lines • 229 kB
JavaScript
import*as e from"react";import t,{useRef as n,useEffect as r,useState as o,useCallback as i,useMemo as l,useLayoutEffect as u,useContext as a,createContext as s,forwardRef as c,Fragment as f,isValidElement as d,cloneElement as p,createElement as h,useId as v,useReducer as m,useSyncExternalStore as g,createRef as y,useImperativeHandle as b}from"react";import x from"react-inlinesvg";import*as w from"react-dom";import _,{createPortal as E}from"react-dom";var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function N(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k,S={exports:{}},T={};var P,C={};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?S.exports=function(){if(k)return T;k=1;var e=t,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var u,a={},s=null,c=null;for(u in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,u)&&!l.hasOwnProperty(u)&&(a[u]=t[u]);if(e&&e.defaultProps)for(u in t=e.defaultProps)void 0===a[u]&&(a[u]=t[u]);return{$$typeof:n,type:e,key:s,ref:c,props:a,_owner:i.current}}return T.Fragment=r,T.jsx=u,T.jsxs=u,T}():S.exports=(P||(P=1,"production"!==process.env.NODE_ENV&&function(){var e,n=t,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=g.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}function b(e){return e.displayName||"Context"}function x(e){if(null==e)return null;if("number"==typeof e.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case o:return"Portal";case u:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return b(e)+".Consumer";case a:return b(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:x(e.type)||"Memo";case h:var n=e,r=n._payload,v=n._init;try{return x(v(r))}catch(e){return null}}return null}e=Symbol.for("react.module.reference");var w,_,E,j,N,k,S,T=Object.assign,P=0;function O(){}O.__reactDisabledLog=!0;var F,L=g.ReactCurrentDispatcher;function R(e,t,n){if(void 0===F)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);F=r&&r[1]||""}return"\n"+F+e}var A,D=!1,I="function"==typeof WeakMap?WeakMap:Map;function M(e,t){if(!e||D)return"";var n,r=A.get(e);if(void 0!==r)return r;D=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=L.current,L.current=null,function(){if(0===P){w=console.log,_=console.info,E=console.warn,j=console.error,N=console.group,k=console.groupCollapsed,S=console.groupEnd;var e={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var u=t.stack.split("\n"),a=n.stack.split("\n"),s=u.length-1,c=a.length-1;s>=1&&c>=0&&u[s]!==a[c];)c--;for(;s>=1&&c>=0;s--,c--)if(u[s]!==a[c]){if(1!==s||1!==c)do{if(s--,--c<0||u[s]!==a[c]){var f="\n"+u[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&A.set(e,f),f}}while(s>=1&&c>=0);break}}}finally{D=!1,L.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:w}),info:T({},e,{value:_}),warn:T({},e,{value:E}),error:T({},e,{value:j}),group:T({},e,{value:N}),groupCollapsed:T({},e,{value:k}),groupEnd:T({},e,{value:S})})}P<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=e?e.displayName||e.name:"",p=d?R(d):"";return"function"==typeof e&&A.set(e,p),p}function B(e,t,n){if(null==e)return"";if("function"==typeof e)return M(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return R(e);switch(e){case f:return R("Suspense");case d:return R("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return M(e.render,!1);case p:return B(e.type,t,n);case h:var o=e,i=o._payload,l=o._init;try{return B(l(i),t,n)}catch(e){}}return""}A=new I;var H=Object.prototype.hasOwnProperty,$={},W=g.ReactDebugCurrentFrame;function z(e){if(e){var t=e._owner,n=B(e.type,e._source,t?t.type:null);W.setExtraStackFrame(n)}else W.setExtraStackFrame(null)}var U=Array.isArray;function V(e){return U(e)}function q(e){return""+e}function K(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var G,Y,X=g.ReactCurrentOwner,Z={key:!0,ref:!0,__self:!0,__source:!0};function J(e,t,n,o,i){var l,u={},a=null,s=null;for(l in void 0!==n&&(K(n),a=""+n),function(e){if(H.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(K(t.key),a=""+t.key),function(e){if(H.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(s=t.ref,function(e){"string"==typeof e.ref&&X.current}(t)),t)H.call(t,l)&&!Z.hasOwnProperty(l)&&(u[l]=t[l]);if(e&&e.defaultProps){var c=e.defaultProps;for(l in c)void 0===u[l]&&(u[l]=c[l])}if(a||s){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){G||(G=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(u,f),s&&function(e,t){var n=function(){Y||(Y=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(u,f)}return function(e,t,n,o,i,l,u){var a={$$typeof:r,type:e,key:t,ref:n,props:u,_owner:l,_store:{}};return Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}(e,a,s,i,o,X.current,u)}var Q,ee=g.ReactCurrentOwner,te=g.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=B(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=x(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function le(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=oe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ie[n]){ie[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+x(e._owner.type)+"."),ne(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function ue(e,t){if("object"==typeof e)if(V(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&le(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)re(i.value)&&le(i.value,t)}}function ae(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=x(n);!function(e,t,n,r,o){var i=Function.call.bind(H);for(var l in e)if(i(e,l)){var u=void 0;try{if("function"!=typeof e[l]){var a=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw a.name="Invariant Violation",a}u=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){u=e}!u||u instanceof Error||(z(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof u),z(null)),u instanceof Error&&!(u.message in $)&&($[u.message]=!0,z(o),y("Failed %s type: %s",n,u.message),z(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Q||(Q=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var se={};function ce(t,n,o,m,g,b){var w=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===u||t===l||t===f||t===d||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)}(t);if(!w){var _,E="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),E+=oe(),null===t?_="null":V(t)?_="array":void 0!==t&&t.$$typeof===r?(_="<"+(x(t.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):_=typeof t,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,E)}var j=J(t,n,o,g,b);if(null==j)return j;if(w){var N=n.children;if(void 0!==N)if(m)if(V(N)){for(var k=0;k<N.length;k++)ue(N[k],t);Object.freeze&&Object.freeze(N)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ue(N,t)}if(H.call(n,"key")){var S=x(t),T=Object.keys(n).filter((function(e){return"key"!==e})),P=T.length>0?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}";se[S+P]||(y('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',P,S,T.length>0?"{"+T.join(": ..., ")+": ...}":"{}",S),se[S+P]=!0)}return t===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(j):ae(j),j}var fe=function(e,t,n){return ce(e,t,n,!1)},de=function(e,t,n){return ce(e,t,n,!0)};C.Fragment=i,C.jsx=fe,C.jsxs=de}()),C);var O,F=S.exports,L=function(e){var t=e.type,n=e.message;return F.jsx("div",{className:"p-4 text-white ".concat({success:"bg-green-500 text-center w-[216px]",warning:"bg-yellow-500 text-center w-[216px]",error:"bg-red-500 text-center w-[216px]"}[t]),children:n})},R={exports:{}};
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
O=R,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=r(e,n(o)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var i in n)e.call(n,i)&&n[i]&&(o=r(o,i));return o}function r(e,t){return t?e?e+" "+t:e+t:e}O.exports?(t.default=t,O.exports=t):window.classNames=t}();var A=N(R.exports),D=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.apply(void 0,e)},I=function(e){var t=e.badgeText,n=e.className,r=void 0===n?"bg-red-100 text-red-800 border-red-400":n;return F.jsx("span",{className:D([r,"mx-2 text-xs font-medium px-1.5 py-0.2 rounded border"]),children:t})},M=function(e){var t=e.className,n=void 0===t?"shadow-100 h-60 w-1/2":t,r=e.children;return F.jsx("div",{className:D([n]),children:r})},B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)};function H(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var $={"arrow.svg":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' className='h-5 w-5'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd' /%3e%3c/svg%3e","plus.svg":"data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg id='cross-small-svgrepo-com (1) 1'%3e%3cpath id='Vector' d='M9.99999 2.92893V17.0711M2.92893 9.99999L17.0711 10' stroke='%230C0F13' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e","ellipse.svg":"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='8' fill='currentColor'/%3e%3c/svg%3e"},W=function(e){var t=n(null);r((function(){t.current&&t.current.setAttribute("class",e.className||"")}),[e.className]);var o=e.src.split("/").pop()||"",i=$[o]||"";return F.jsx(x,B({},e,{src:i,style:{display:"inline-block",textAlign:"center",marginRight:"14px"},innerRef:function(e){return t.current=e}}))},z=function(e){var t=e.svg,n=e.clickHandler,r=void 0===n?function(){}:n;return F.jsx("div",{className:"flex",children:F.jsx("button",{onClick:r,className:"flex",children:F.jsx(W,{src:t,width:120,height:28})})})},U=function(e){var t=e.children,n=e.leftIcon,r=e.rightIcon,o=e.iconColor,i=e.type,l=void 0===i?"button":i,u=e.disabled,a=void 0!==u&&u,s=e.className,c=void 0===s?"px-1 py-1 text-center bg-primary-900 rounded-md text-white":s,f=e.id,d=void 0===f?"id-".concat(Math.random(),"-").concat(Math.random()):f,p=e.onClick,h=void 0===p?function(){}:p;return F.jsxs("button",{id:d,disabled:a,type:l,onClick:h,className:D([c,a&&"cursor-not-allowed","h-11 text-sm py-2.5 "]),children:[n&&F.jsx(W,{className:D(["text-center ",null!==t&&"mr-4"]),src:"../../assets/svg/".concat(n),width:20,height:20,color:"ffffff"}),t,r&&F.jsx(W,{className:D(["text-center ",null!==t&&"ml-4"]),src:"../../assets/svg/".concat(r),width:16,height:16,color:o})]})},V=function(e){var t=e.letter,n=e.className,r=void 0===n?"w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold cursor-pointer":n,o=e.selected,i=e.onClick;return F.jsx("div",{className:D([r,"w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold cursor-pointer",o?"bg-indigo-500 text-white":"text-dark-400 bg-light-200"]),onClick:i,children:t})},q=function(e){var t=e.input,n=e.label,r=e.dataType,o=e.dataGroup,i=e.id,l=void 0===i?String((new Date).getTime()):i;return F.jsxs("div",{className:"flex items-center",children:[F.jsx("input",B({},t,{className:"relative w-4 h-4 text-sm text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 cursor-pointer",datatype:r,"data-group":o,type:"checkbox",id:l})),F.jsx("label",{htmlFor:l,className:"ml-2 text-sm font-medium text-gray-900 dark:text-gray-300 cursor-pointer",children:n})]})},K=function(e){var t=e.input,n=e.options,r=e.label,o=e.id,i=void 0===o?String((new Date).getTime()):o,l=e.className,u=void 0===l?"w-40 rounded-md font-medium text-sm border-gray-400 justify-between bg-white text-black":l;return F.jsxs("div",{className:"relative w-full",children:[r&&F.jsx("label",{htmlFor:i,className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:r}),F.jsx("select",B({},t,{id:i,className:D([u]),children:n.map((function(e,t){return F.jsx("option",{value:e,children:e},t)}))}))]})},G=function(e){var t=e.input,n=e.className,r=void 0===n?"w-full h-10 text-base text-gray-600 border-0 border-b border-gray-300":n,o=e.label,i=e.dataType,l=e.meta,u=l.touched,a=l.error,s=e.metaError,c=e.min,f=e.placeholder,d=void 0===f?" ":f,p=e.type,h=void 0===p?"text":p,v=e.step,m=void 0===v?"any":v,g=e.id,y=void 0===g?String((new Date).getTime()):g;return F.jsx(F.Fragment,{children:F.jsxs("div",{className:"relative",children:[F.jsx("input",B({},t,{type:h,className:D([r,"text-sm block py-2.5 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"]),placeholder:d,maxLength:255,step:m,datatype:i,id:y,min:c})),u&&(a||s)&&F.jsx("p",{id:"filled_error_help",className:" absolute mt-1 text-xs text-red-600 dark:text-red-400 font-medium",children:a||s}),o&&F.jsx("label",{htmlFor:y,className:"absolute text-sm text-gray-400 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-4 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6",children:o})]})})},Y=function(e){var t=e.className,i=e.dataType,l=e.options,u=e.input,a=e.meta,s=a.touched,c=a.error,f=e.metaError,d=e.id,p=void 0===d?String((new Date).getTime()):d,h=n(null),v=o(!1),m=v[0],g=v[1],y=o([]),b=y[0],x=y[1];r((function(){return document.addEventListener("click",w),function(){document.removeEventListener("click",w)}}),[]);var w=function(e){var t=e.target,n=h.current;!n||n.contains(t)||t.closest(".dd-container")?g(!0):g(!1)};return F.jsxs(F.Fragment,{children:[F.jsxs("div",{id:p,datatype:i,className:"relative",ref:h,children:[F.jsxs("div",{role:"button",onClick:function(){u.onBlur(),g(!m)},className:D(t,"h-[44px] px-3 w-full flex justify-between items-center border bg-light-200 border-gray-300 rounded-md"),children:[F.jsx("div",{className:"flex items-center [&>*:not(:last-child)]:mr-2",children:0===b.length?F.jsx("span",{className:"text-sm",children:"Select"}):b.length>0?b.map((function(e,t){return F.jsxs("div",{className:"dd-container bg-dark-100 w-auto flex items-center gap-3 py-1 px-2 rounded cursor-default",children:[F.jsx("span",{className:"text-sm",children:e}),F.jsx(W,{className:D(["text-center inline-block cursor-pointer"]),src:"../..../../assets/svg/close.svg",width:10,height:10,onClick:function(){return t=e,n=b.filter((function(e){return e!==t})),x(n),void u.onChange(n);var t,n}})]},t)})):void 0}),F.jsx(W,{className:D([m?"rotate-180":"","text-center inline-block"]),src:"../../assets/svg/arrow.svg",width:18,height:18})]}),m&&F.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:F.jsx("ul",{className:"p-3 overflow-auto rounded-md shadow-md max-h-60 flex flex-wrap [&>*:not(:last-child)]:mb-2",children:l.map((function(e,t){return F.jsx("li",{className:D("select-none relative flex w-full","divider"===e.type&&"!py-0"),children:F.jsxs("label",{htmlFor:"checkbox-".concat(t),className:"flex w-full cursor-pointer justify-between",onClick:function(){return t=e.value,n=(n=b).includes(t)?n.filter((function(e){return e!==t})):H(H([],n,!0),[t],!1),x(n),void u.onChange(n);var t,n},children:[F.jsx("div",{className:"",children:F.jsx("span",{className:"text-sm",children:e.name})}),F.jsx("div",{className:D(b.includes(e.value)?"bg-blue-500":"bg-white border border-gray-600 dark:border-gray-600 dark:bg-gray-700"," relative w-4 h-4 text-sm rounded cursor-pointer"),children:b.includes(e.value)&&F.jsx("svg",{className:"dd-container absolute inset-0 w-full h-full text-light-300",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:F.jsx("path",{d:"M5 13l4 4L19 7"})})})]})},"key-".concat(String(t)))}))})})]}),s&&(c||f)&&F.jsx("p",{id:"filled_error_help",className:" absolute mt-1 text-xs text-red-600 dark:text-red-400 font-medium",children:c||f})]})},X=function(e){var t=e.input,n=e.className,r=e.label,o=e.dataType,i=e.labelClass,l=e.meta,u=l.touched,a=l.error,s=e.metaError,c=e.id,f=void 0===c?String((new Date).getTime()):c;return F.jsxs("div",{className:"flex items-center",children:[F.jsxs("label",{htmlFor:f,className:D([i,"flex items-center text-sm font-medium text-gray-900 dark:text-gray-300 cursor-pointer"]),children:[F.jsx("input",B({},t,{id:f,type:"radio",datatype:o,className:D([n,"w-4 h-4 mr-2 text-sm text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 cursor-pointer"])})),r]}),u&&(a||s)&&F.jsx("p",{id:"filled_error_help",className:"mt-2 text-xs text-red-600 dark:text-red-400 font-medium",children:a||s})]})},Z=function(e){var t=e.options,n=e.onSelect,r=e.panelClass,o=void 0===r?"text-sm bg-white":r,i=e.optionClass,l=void 0===i?"hover:bg-gray-100 p-3":i;return F.jsx("ul",{className:D(o,"py-1.5 overflow-auto rounded-md shadow-md flex flex-wrap"),children:t.map((function(e,t){return F.jsxs("li",{className:D(l,"cursor-pointer select-none relative flex w-full","divider"===e.type&&"!py-0"),onClick:function(){return function(e){n&&n(e)}(e)},children:[e.icon&&F.jsx("div",{className:"flex items-start",children:F.jsx(W,{className:D(["text-center mr-3 inline-block"]),src:e.icon,width:20,height:20})}),e.color&&F.jsx("div",{className:"flex items-start pt-1",children:F.jsx(W,{className:D(["text-center mr-3.5 inline-block"]),src:"../../assets/svg/".concat(""===e.value?"plus.svg":"ellipse.svg"),width:16,height:16,color:e.color})}),e.logo&&F.jsx("div",{className:"w-5 h-5 mr-2 ",style:{backgroundImage:"url(".concat(e.logo,")"),backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}}),!e.type&&F.jsx("div",{className:"flex items-start",children:e.label}),"divider"===e.type&&F.jsx("hr",{className:"w-full"}),"footer"===e.type&&F.jsx("div",{className:"text-xs text-dark-600",onClick:function(e){e.stopPropagation()},children:e.label})]},t)}))})},J=function(e){var t=e.options,i=e.selectedOption,l=e.panelClass,u=e.optionClass,a=e.color,s=void 0===a?"#111111":a,c=e.className,f=void 0===c?"w-40 rounded-md font-medium text-sm border-gray-400 justify-between bg-white text-black":c,d=e.onChange,p=void 0===d?function(){}:d,h=e.setAgentForInput,v=void 0===h?function(){}:h,m=o(!1),g=m[0],y=m[1],b=n(null),x=o(""),w=x[0],_=x[1],E=n(null);r((function(){var e=function(e){b.current&&!b.current.contains(e.target)&&y(!1)};return E.current&&E.current.focus(),document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[g]);var j=t.filter((function(e){return e.label.toLowerCase().includes(w.toLowerCase())}));return F.jsx("div",{className:"relative",ref:b,children:i&&F.jsxs(F.Fragment,{children:[F.jsxs("button",{type:"button",className:D(f,"z-10 rounded-md text-left flex items-center",1===t.length&&"cursor-default"),onClick:g?void 0:function(){t.length>1&&(y(!0),_(""))},children:[F.jsxs("span",{className:"".concat((null==i?void 0:i.logo)&&"text-base font-bold"," items-center line-clamp-1 flex"),children:[F.jsx(W,{className:D(["text-center inline-block",!g&&"mr-3.5"]),src:"../../assets/svg/".concat(""===i.value||g?"plus.svg":"ellipse.svg"),width:""===i.value?20:16,height:""===i.value?20:16,color:i.color}),g?F.jsx("input",{type:"text",value:w,ref:E,onChange:function(e){return _(e.target.value)},className:"w-40 bg-transparent border-none focus:ring-0 "}):F.jsx("span",{className:"max-w-[180px] overflow-hidden whitespace-nowrap overflow-ellipsis",children:null==i?void 0:i.label})]}),t.length>1&&F.jsx(W,{className:D([g?"rotate-180":"","text-center inline-block"]),src:"../../assets/svg/arrow.svg",width:18,height:18,color:s,onClick:function(){y(!1)}})]}),g&&t.length>1&&F.jsx("div",{className:"absolute mt-2 w-full rounded-md shadow-lg z-[100]",children:F.jsx(Z,{options:j,onSelect:function(e){y(!1),p&&p(e),v&&v(null)},panelClass:"overflow-hidden max-h-60\t".concat(l),optionClass:u})})]})})},Q={exports:{}};!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",l=32,u=128,a=256,s=1/0,c=9007199254740991,f=NaN,d=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",a]],h="[object Arguments]",v="[object Array]",m="[object Boolean]",g="[object Date]",y="[object Error]",b="[object Function]",x="[object GeneratorFunction]",w="[object Map]",_="[object Number]",E="[object Object]",N="[object Promise]",k="[object RegExp]",S="[object Set]",T="[object String]",P="[object Symbol]",C="[object WeakMap]",O="[object ArrayBuffer]",F="[object DataView]",L="[object Float32Array]",R="[object Float64Array]",A="[object Int8Array]",D="[object Int16Array]",I="[object Int32Array]",M="[object Uint8Array]",B="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",W=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(V.source),G=RegExp(q.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,se=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",je="a-z\\xdf-\\xf6\\xf8-\\xff",Ne="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="['’]",Pe="["+we+"]",Ce="["+Se+"]",Oe="["+_e+"]",Fe="\\d+",Le="["+Ee+"]",Re="["+je+"]",Ae="[^"+we+Se+Fe+Ee+je+Ne+"]",De="\\ud83c[\\udffb-\\udfff]",Ie="[^"+we+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ne+"]",$e="\\u200d",We="(?:"+Re+"|"+Ae+")",ze="(?:"+He+"|"+Ae+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Oe+"|"+De+")"+"?",Ke="["+ke+"]?",Ge=Ke+qe+("(?:"+$e+"(?:"+[Ie,Me,Be].join("|")+")"+Ke+qe+")*"),Ye="(?:"+[Le,Me,Be].join("|")+")"+Ge,Xe="(?:"+[Ie+Oe+"?",Oe,Me,Be,Pe].join("|")+")",Ze=RegExp(Te,"g"),Je=RegExp(Oe,"g"),Qe=RegExp(De+"(?="+De+")|"+Xe+Ge,"g"),et=RegExp([He+"?"+Re+"+"+Ue+"(?="+[Ce,He,"$"].join("|")+")",ze+"+"+Ve+"(?="+[Ce,He+We,"$"].join("|")+")",He+"?"+We+"+"+Ue,He+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Ye].join("|"),"g"),tt=RegExp("["+$e+we+_e+ke+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,it={};it[L]=it[R]=it[A]=it[D]=it[I]=it[M]=it[B]=it[H]=it[$]=!0,it[h]=it[v]=it[O]=it[m]=it[F]=it[g]=it[y]=it[b]=it[w]=it[_]=it[E]=it[k]=it[S]=it[T]=it[C]=!1;var lt={};lt[h]=lt[v]=lt[O]=lt[F]=lt[m]=lt[g]=lt[L]=lt[R]=lt[A]=lt[D]=lt[I]=lt[w]=lt[_]=lt[E]=lt[k]=lt[S]=lt[T]=lt[P]=lt[M]=lt[B]=lt[H]=lt[$]=!0,lt[y]=lt[b]=lt[C]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,st=parseInt,ct="object"==typeof j&&j&&j.Object===Object&&j,ft="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ft||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,vt=ht&&ht.exports===pt,mt=vt&&ct.process,gt=function(){try{var e=ht&&ht.require&&ht.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,bt=gt&>.isDate,xt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,Et=gt&>.isTypedArray;function jt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Nt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var l=e[o];t(r,l,n(l),e)}return r}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var l=e[n];t(l,n,e)&&(i[o++]=l)}return i}function Ct(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ft(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Lt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Rt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function At(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var It=Ut("length");function Mt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ht(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Wt,n)}function $t(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!=e}function zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:f}function Ut(e){return function(t){return null==t?n:t[e]}}function Vt(e){return function(t){return null==e?n:e[t]}}function qt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Kt(e,t){for(var r,o=-1,i=e.length;++o<i;){var l=t(e[o]);l!==n&&(r=r===n?l:r+l)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Xt(e){return function(t){return e(t)}}function Zt(e,t){return Ft(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var tn=Vt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),nn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+ut[e]}function on(e){return tt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,o=0,l=[];++n<r;){var u=e[n];u!==t&&u!==i||(e[n]=i,l[o++]=n)}return l}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return on(e)?function(e){var t=Qe.lastIndex=0;for(;Qe.test(e);)++t;return t}(e):It(e)}function dn(e){return on(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var hn=Vt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var vn=function e(t){var j,oe=(t=null==t?dt:vn.defaults(dt.Object(),t,vn.pick(dt,rt))).Array,we=t.Date,_e=t.Error,Ee=t.Function,je=t.Math,Ne=t.Object,ke=t.RegExp,Se=t.String,Te=t.TypeError,Pe=oe.prototype,Ce=Ee.prototype,Oe=Ne.prototype,Fe=t["__core-js_shared__"],Le=Ce.toString,Re=Oe.hasOwnProperty,Ae=0,De=(j=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",Ie=Oe.toString,Me=Le.call(Ne),Be=dt._,He=ke("^"+Le.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=vt?t.Buffer:n,We=t.Symbol,ze=t.Uint8Array,Ue=$e?$e.allocUnsafe:n,Ve=un(Ne.getPrototypeOf,Ne),qe=Ne.create,Ke=Oe.propertyIsEnumerable,Ge=Pe.splice,Ye=We?We.isConcatSpreadable:n,Xe=We?We.iterator:n,Qe=We?We.toStringTag:n,tt=function(){try{var e=fi(Ne,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ct=we&&we.now!==dt.Date.now&&we.now,ft=t.setTimeout!==dt.setTimeout&&t.setTimeout,pt=je.ceil,ht=je.floor,mt=Ne.getOwnPropertySymbols,gt=$e?$e.isBuffer:n,It=t.isFinite,Vt=Pe.join,mn=un(Ne.keys,Ne),gn=je.max,yn=je.min,bn=we.now,xn=t.parseInt,wn=je.random,_n=Pe.reverse,En=fi(t,"DataView"),jn=fi(t,"Map"),Nn=fi(t,"Promise"),kn=fi(t,"Set"),Sn=fi(t,"WeakMap"),Tn=fi(Ne,"create"),Pn=Sn&&new Sn,Cn={},On=Ii(En),Fn=Ii(jn),Ln=Ii(Nn),Rn=Ii(kn),An=Ii(Sn),Dn=We?We.prototype:n,In=Dn?Dn.valueOf:n,Mn=Dn?Dn.toString:n;function Bn(e){if(eu(e)&&!zl(e)&&!(e instanceof zn)){if(e instanceof Wn)return e;if(Re.call(e,"__wrapped__"))return Mi(e)}return new Wn(e)}var Hn=function(){function e(){}return function(t){if(!Ql(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function $n(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Yn(e,t){var n=zl(e),r=!n&&Wl(e),o=!n&&!r&&Kl(e),i=!n&&!r&&!o&&au(e),l=n||r||o||i,u=l?Gt(e.length,Se):[],a=u.length;for(var s in e)!t&&!Re.call(e,s)||l&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||yi(s,a))||u.push(s);return u}function Xn(e){var t=e.length;return t?e[Kr(0,t-1)]:n}function Zn(e,t){return Ri(Po(e),lr(t,0,e.length))}function Jn(e){return Ri(Po(e))}function Qn(e,t,r){(r!==n&&!Bl(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function er(e,t,r){var o=e[t];Re.call(e,t)&&Bl(o,r)&&(r!==n||t in e)||or(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(Bl(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Co(t,Cu(t),e)}function or(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var r=-1,o=t.length,i=oe(o),l=null==e;++r<o;)i[r]=l?n:Nu(e,t[r]);return i}function lr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function ur(e,t,r,o,i,l){var u,a=1&t,s=2&t,c=4&t;if(r&&(u=i?r(e,o,i,l):r(e)),u!==n)return u;if(!Ql(e))return e;var f=zl(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return Po(e,u)}else{var d=hi(e),p=d==b||d==x;if(Kl(e))return Eo(e,a);if(d==E||d==h||p&&!i){if(u=s||p?{}:mi(e),!a)return s?function(e,t){return Co(e,pi(e),t)}(e,function(e,t){return e&&Co(t,Ou(t),e)}(u,e)):function(e,t){return Co(e,di(e),t)}(e,rr(u,e))}else{if(!lt[d])return i?e:{};u=function(e,t,n){var r=e.constructor;switch(t){case O:return jo(e);case m:case g:return new r(+e);case F:return function(e,t){var n=t?jo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case R:case A:case D:case I:case M:case B:case H:case $:return No(e,n);case w:return new r;case _:case T:return new r(e);case k:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new r;case P:return o=e,In?Ne(In.call(o)):{}}var o}(e,d,a)}}l||(l=new Gn);var v=l.get(e);if(v)return v;l.set(e,u),iu(e)?e.forEach((function(n){u.add(ur(n,t,r,n,e,l))})):tu(e)&&e.forEach((function(n,o){u.set(o,ur(n,t,r,o,e,l))}));var y=f?n:(c?s?oi:ri:s?Ou:Cu)(e);return kt(y||e,(function(n,o){y&&(n=e[o=n]),er(u,o,ur(n,t,r,o,e,l))})),u}function ar(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ne(e);o--;){var i=r[o],l=t[i],u=e[i];if(u===n&&!(i in e)||!l(u))return!1}return!0}function sr(e,t,o){if("function"!=typeof e)throw new Te(r);return Ci((function(){e.apply(n,o)}),t)}function cr(e,t,n,r){var o=-1,i=Ct,l=!0,u=e.length,a=[],s=t.length;if(!u)return a;n&&(t=Ft(t,Xt(n))),r?(i=Ot,l=!1):t.length>=200&&(i=Jt,l=!1,t=new Kn(t));e:for(;++o<u;){var c=e[o],f=null==n?c:n(c);if(c=r||0!==c?c:0,l&&f==f){for(var d=s;d--;)if(t[d]===f)continue e;a.push(c)}else i(t,f,r)||a.push(c)}return a}Bn.templateSettings={escape:Y,evaluate:X,interpolate:Z,variable:"",imports:{_:Bn}},Bn.prototype=$n.prototype,Bn.prototype.constructor=Bn,Wn.prototype=Hn($n.prototype),Wn.prototype.constructor=Wn,zn.prototype=Hn($n.prototype),zn.prototype.constructor=zn,Un.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Tn){var r=t[e];return r===o?n:r}return Re.call(t,e)?t[e]:n},Un.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==n:Re.call(t,e)},Un.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tn&&t===n?o:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,!0)},Vn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Vn.prototype.has=function(e){return tr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(jn||Vn),string:new Un}},qn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return si(this,e).get(e)},qn.prototype.has=function(e){return si(this,e).has(e)},qn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,o),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!jn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Lo(br),dr=Lo(xr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,r){for(var o=-1,i=e.length;++o<i;){var l=e[o],u=t(l);if(null!=u&&(a===n?u==u&&!uu(u):r(u,a)))var a=u,s=l}return s}function vr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function mr(e,t,n,r,o){var i=-1,l=e.length;for(n||(n=gi),o||(o=[]);++i<l;){var u=e[i];t>0&&n(u)?t>1?mr(u,t-1,n,r,o):Lt(o,u):r||(o[o.length]=u)}return o}var gr=Ro(),yr=Ro(!0);function br(e,t){return e&&gr(e,t,Cu)}function xr(e,t){return e&&yr(e,t,Cu)}function wr(e,t){return Pt(t,(function(t){return Xl(e[t])}))}function _r(e,t){for(var r=0,o=(t=bo(t,e)).length;null!=e&&r<o;)e=e[Di(t[r++])];return r&&r==o?e:n}function Er(e,t,n){var r=t(e);return zl(e)?r:Lt(r,n(e))}function jr(e){return null==e?e===n?"[object Undefined]":"[object Null]":Qe&&Qe in Ne(e)?function(e){var t=Re.call(e,Qe),r=e[Qe];try{e[Qe]=n;var o=!0}catch(e){}var i=Ie.call(e);o&&(t?e[Qe]=r:delete e[Qe]);return i}(e):function(e){return Ie.call(e)}(e)}function Nr(e,t){return e>t}function kr(e,t){return null!=e&&Re.call(e,t)}function Sr(e,t){return null!=e&&t in Ne(e)}function Tr(e,t,r){for(var o=r?Ot:Ct,i=e[0].length,l=e.length,u=l,a=oe(l),s=1/0,c=[];u--;){var f=e[u];u&&t&&(f=Ft(f,Xt(t))),s=yn(f.length,s),a[u]=!r&&(t||i>=120&&f.length>=120)?new Kn(u&&f):n}f=e[0];var d=-1,p=a[0];e:for(;++d<i&&c.length<s;){var h=f[d],v=t?t(h):h;if(h=r||0!==h?h:0,!(p?Jt(p,v):o(c,v,r))){for(u=l;--u;){var m=a[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}p&&p.push(v),c.push(h)}}return c}function Pr(e,t,r){var o=null==(e=Si(e,t=bo(t,e)))?e:e[Di(Yi(t))];return null==o?n:jt(o,e,r)}function Cr(e){return eu(e)&&jr(e)==h}function Or(e,t,r,o,i){return e===t||(null==e||null==t||!eu(e)&&!eu(t)?e!=e&&t!=t:function(e,t,r,o,i,l){var u=zl(e),a=zl(t),s=u?v:hi(e),c=a?v:hi(t),f=(s=s==h?E:s)==E,d=(c=c==h?E:c)==E,p=s==c;if(p&&Kl(e)){if(!Kl(t))return!1;u=!0,f=!1}if(p&&!f)return l||(l=new Gn),u||au(e)?ti(e,t,r,o,i,l):function(e,t,n,r,o,i,l){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case m:case g:case _:return Bl(+e,+t);case y:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case w:var u=ln;case S:var a=1&r;if(u||(u=sn),e.size!=t.size&&!a)return!1;var s=l.get(e);if(s)return s==t;r|=2,l.set(e,t);var c=ti(u(e),u(t),r,o,i,l);return l.delete(e),c;case P:if(In)return In.call(e)==In.call(t)}return!1}(e,t,s,r,o,i,l);if(!(1&r)){var b=f&&Re.call(e,"__wrapped__"),x=d&&Re.call(t,"__wrapped__");if(b||x){var j=b?e.value():e,N=x?t.value():t;return l||(l=new Gn),i(j,N,r,o,l)}}if(!p)return!1;return l||(l=new Gn),function(e,t,r,o,i,l){var u=1&r,a=ri(e),s=a.length,c=ri(t),f=c.length;if(s!=f&&!u)return!1;var d=s;for(;d--;){var p=a[d];if(!(u?p in t:Re.call(t,p)))return!1}var h=l.get(e),v=l.get(t);if(h&&v)return h==t&&v==e;var m=!0;l.set(e,t),l.set(t,e);var g=u;for(;++d<s;){var y=e[p=a[d]],b=t[p];if(o)var x=u?o(b,y,p,t,e,l):o(y,b,p,e,t,l);if(!(x===n?y===b||i(y,b,r,o,l):x)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return l.delete(e),l.delete(t),m}(e,t,r,o,i,l)}(e,t,r,o,Or,i))}function Fr(e,t,r,o){var i=r.length,l=i,u=!o;if(null==e)return!l;for(e=Ne(e);i--;){var a=r[i];if(u&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<l;){var s=(a=r[i])[0],c=e[s],f=a[1];if(u&&a[2]){if(c===n&&!(s in e))return!1}else{var d=new Gn;if(o)var p=o(c,f,s,e,t,d);if(!(p===n?Or(f,c,3,o,d):p))return!1}}return!0}function Lr(e){return!(!Ql(e)||(t=e,De&&De in t))&&(Xl(e)?He:ve).test(Ii(e));var t}function Rr(e){return"function"==typeof e?e:null==e?na:"object"==typeof e?zl(e)?Hr(e[0],e[1]):Br(e):fa(e)}function Ar(e){if(!Ei(e))return mn(e);var t=[];for(var n in Ne(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e){if(!Ql(e))return function(e){var t=[];if(null!=e)for(var n in Ne(e))t.push(n);return t}(e);var t=Ei(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Ir(e,t){return e<t}function Mr(e,t){var n=-1,r=Vl(e)?oe(e.length):[];return fr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Br(e){var t=ci(e);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(n){return n===e||Fr(n,e,t)}}function Hr(e,t){return xi(e)&&ji(t)?Ni(Di(e),t):function(r){var o=Nu(r,e);return o===n&&o===t?ku(r,e):Or(t,o,3)}}function $r(e,t,r,o,i){e!==t&&gr(t,(function(l,u){if(i||(i=new Gn),Ql(l))!function(e,t,r,o,i,l,u){var a=Ti(e,r),s=Ti(t,r),c=u.get(s);if(c)return void Qn(e,r,c);var f=l?l(a,s,r+"",e,t,u):n,d=f===n;if(d){var p=zl(s),h=!p&&Kl(s),v=!p&&!h&&au(s);f=s,p||h||v?zl(a)?f=a:ql(a)?f=Po(a):h?(d=!1,f=Eo(s,!0)):v?(d=!1,f=No(s,!0)):f=[]:ru(s)||Wl(s)?(f=a,Wl(a)?f=mu(a):Ql(a)&&!Xl(a)||(f=mi(s))):d=!1}d&&(u.set(s,f),i(f,s,o,l,u),u.delete(s));Qn(e,r,f)}(e,t,u,r,$r,o,i);else{var a=o?o(Ti(e,u),l,u+"",e,t,i):n;a===n&&(a=l),Qn(e,u,a)}}),Ou)}function Wr(e,t){var r=e.length;if(r)return yi(t+=t<0?r:0,r)?e[t]:n}function zr(e,t,n){t=t.length?Ft(t,(function(e){return zl(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[na];var r=-1;t=Ft(t,Xt(ai()));var o=Mr(e,(function(e,n,o){var i=Ft(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,l=o.length,u=n.length;for(;++r<l;){var a=ko(o[r],i[r]);if(a)return r>=u?a:a*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var l=t[r],u=_r(e,l);n(u,l)&&Jr(i,bo(l,e),u)}return i}function Vr(e,t,n,r){var o=r?$t:Ht,i=-1,l=t.length,u=e;for(e===t&&(t=Po(t)),n&&(u=Ft(e,Xt(n)));++i<l;)for(var a=0,s=t[i],c=n?n(s):s;(a=o(u,c,a,r))>-1;)u!==e&&Ge.call(u,a,1),Ge.call(e,a,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?Ge.call(e,o,1):co(e,o)}}return e}fun