@infinilabs/entity-ui 0.0.4 → 0.0.6
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.
- package/dist/entity-ui.cjs +8 -8
- package/dist/entity-ui.js +416 -393
- package/dist/index.d.ts +4 -1
- package/package.json +5 -1
package/dist/entity-ui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._entityCard_1xtgw_1{width:400px;padding:16px;overflow:auto;border-radius:5px;background-color:#fff;color:#101010;font-size:14px;text-align:center;box-shadow:0 0 10px #0000004d;font-family:-regular}._pcCover_1xtgw_15{display:flex;align-items:center;justify-content:center;margin-bottom:25px;overflow:hidden;border-radius:3px;background-color:#bbbbbbb0}._pcCover_1xtgw_15 img{width:100%;height:auto;display:block}._pcSection_1xtgw_31{width:100%;padding-bottom:16px;display:flex;align-items:center}._pcBreadcrumbSep_1xtgw_38{font-size:12px;color:#999}._pcBasic_1xtgw_43{display:flex;gap:8px;flex-wrap:wrap}._pcBasicRow_1xtgw_49{width:100%;display:flex;align-items:center;justify-content:space-between}._pcBasicRowLeft_1xtgw_56{display:flex;align-items:center;gap:8px}._pcLinkIconRight_1xtgw_61{display:flex;align-items:center;justify-content:center;width:30px;height:20px;text-decoration:none;background-color:#fafafa;border-radius:4px}._pcColorSwatch_1xtgw_72{width:7px;height:16px}._pcIconDot_1xtgw_77{width:18px;height:18px}._pcTitleLink_1xtgw_82{display:inline-flex;align-items:center;gap:8px;padding:2px 8px;border:2px solid #027ffe;border-radius:4px;color:#027ffe;font-weight:500;text-decoration:none;line-height:1.6}._pcTitleLink_1xtgw_82:hover{background:#1677ff0f}._pcTitleText_1xtgw_99{display:inline-flex;align-items:center;color:#027ffe;font-size:16px}._pcSubTitleText_1xtgw_106{display:inline-flex;align-items:center;color:#999;font-size:16px}._pcExternalIcon_1xtgw_113{font-size:12px;color:#027ffe;margin-left:2px}._pcProperties_1xtgw_119{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;row-gap:12px;align-items:start}._pcProperty_1xtgw_127{display:flex;align-items:center;gap:4px;min-height:24px;min-width:0;box-sizing:border-box;font-size:12px;color:#999}._pcTagsRow_1xtgw_138{display:inline-flex;flex-wrap:wrap;gap:4px}._pcTag_1xtgw_138{padding:2px 6px;border-radius:4px;background:#f2f3f5;color:#555;font-size:12px}._pcDetails_1xtgw_151{width:100%;display:flex;flex-direction:column;gap:12px}._pcRow_1xtgw_157{display:grid;column-gap:8px;row-gap:12px;width:100%}._pcCol_1xtgw_72{width:100%;padding:10px 8px;box-sizing:border-box;display:flex;flex-direction:column;gap:4px;min-width:0;text-align:left;border-radius:5px;background-color:#fafafa;color:#101010;font-size:14px;font-family:-regular;border:1px solid rgba(245,245,245,1)}._pcColLabel_1xtgw_179{color:#999;font-size:12px}._pcColValue_1xtgw_183{font-size:16px;color:#027ffe}._pcProgressText_1xtgw_188{font-size:10px;color:#027ffe}._entityLabel_1xtgw_194{width:100%;overflow:hidden}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("react"),F=require("antd"),be=require("lucide-react");function _t(t){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(f,a,c.get?c:{enumerable:!0,get:()=>t[a]})}}return f.default=t,Object.freeze(f)}const Ve=_t(be);var we={exports:{}},G={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var $e;function bt(){if($e)return G;$e=1;var t=ne,f=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function y(w,p,R){var _,T={},S=null,O=null;R!==void 0&&(S=""+R),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(O=p.ref);for(_ in p)c.call(p,_)&&!g.hasOwnProperty(_)&&(T[_]=p[_]);if(w&&w.defaultProps)for(_ in p=w.defaultProps,p)T[_]===void 0&&(T[_]=p[_]);return{$$typeof:f,type:w,key:S,ref:O,props:T,_owner:s.current}}return G.Fragment=a,G.jsx=y,G.jsxs=y,G}var X={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.development.js
|
|
13
13
|
*
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
`+
|
|
18
|
+
*/var Me;function wt(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&function(){var t=ne,f=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),w=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),$=Symbol.iterator,ie="@@iterator";function oe(e){if(e===null||typeof e!="object")return null;var r=$&&e[$]||e[ie];return typeof r=="function"?r:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(e){{for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];je("error",e,i)}}function je(e,r,i){{var o=D.ReactDebugCurrentFrame,h=o.getStackAddendum();h!==""&&(r+="%s",i=i.concat([h]));var m=i.map(function(u){return String(u)});m.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,m)}}var se=!1,U=!1,le=!1,ae=!1,ce=!1,V;V=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===g||ce||e===s||e===R||e===_||ae||e===O||se||U||le||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===y||e.$$typeof===w||e.$$typeof===p||e.$$typeof===V||e.getModuleId!==void 0))}function fe(e,r,i){var o=e.displayName;if(o)return o;var h=r.displayName||r.name||"";return h!==""?i+"("+h+")":i}function d(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case a:return"Portal";case g:return"Profiler";case s:return"StrictMode";case R:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w:var r=e;return d(r)+".Consumer";case y:var i=e;return d(i._context)+".Provider";case p:return fe(e,e.render,"ForwardRef");case T:var o=e.displayName||null;return o!==null?o:P(e.type)||"Memo";case S:{var h=e,m=h._payload,u=h._init;try{return P(u(m))}catch{return null}}}return null}var I=Object.assign,N=0,Z,Y,z,q,J,A,L;function Re(){}Re.__reactDisabledLog=!0;function Je(){{if(N===0){Z=console.log,Y=console.info,z=console.warn,q=console.error,J=console.group,A=console.groupCollapsed,L=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function Ke(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Z}),info:I({},e,{value:Y}),warn:I({},e,{value:z}),error:I({},e,{value:q}),group:I({},e,{value:J}),groupCollapsed:I({},e,{value:A}),groupEnd:I({},e,{value:L})})}N<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=D.ReactCurrentDispatcher,he;function Q(e,r,i){{if(he===void 0)try{throw Error()}catch(h){var o=h.stack.trim().match(/\n( *(at )?)/);he=o&&o[1]||""}return`
|
|
19
|
+
`+he+e}}var ve=!1,ee;{var He=typeof WeakMap=="function"?WeakMap:Map;ee=new He}function Ee(e,r){if(!e||ve)return"";{var i=ee.get(e);if(i!==void 0)return i}var o;ve=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=pe.current,pe.current=null,Je();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(C){o=C}Reflect.construct(e,[],u)}else{try{u.call()}catch(C){o=C}e.call(u.prototype)}}else{try{throw Error()}catch(C){o=C}e()}}catch(C){if(C&&o&&typeof C.stack=="string"){for(var l=C.stack.split(`
|
|
20
20
|
`),E=o.stack.split(`
|
|
21
21
|
`),x=l.length-1,b=E.length-1;x>=1&&b>=0&&l[x]!==E[b];)b--;for(;x>=1&&b>=0;x--,b--)if(l[x]!==E[b]){if(x!==1||b!==1)do if(x--,b--,b<0||l[x]!==E[b]){var k=`
|
|
22
|
-
`+l[x].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&
|
|
22
|
+
`+l[x].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,k),k}while(x>=1&&b>=0);break}}}finally{ve=!1,pe.current=m,Ke(),Error.prepareStackTrace=h}var B=e?e.displayName||e.name:"",W=B?Q(B):"";return typeof e=="function"&&ee.set(e,W),W}function Ge(e,r,i){return Ee(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function te(e,r,i){if(e==null)return"";if(typeof e=="function")return Ee(e,Xe(e));if(typeof e=="string")return Q(e);switch(e){case R:return Q("Suspense");case _:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Ge(e.render);case T:return te(e.type,r,i);case S:{var o=e,h=o._payload,m=o._init;try{return te(m(h),r,i)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,Ce={},Te=D.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,i=te(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(i)}else Te.setExtraStackFrame(null)}function Ze(e,r,i,o,h){{var m=Function.call.bind(K);for(var u in e)if(m(e,u)){var l=void 0;try{if(typeof e[u]!="function"){var E=Error((o||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}l=e[u](r,u,o,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x){l=x}l&&!(l instanceof Error)&&(re(h),j("%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).",o||"React class",i,u,typeof l),re(null)),l instanceof Error&&!(l.message in Ce)&&(Ce[l.message]=!0,re(h),j("Failed %s type: %s",i,l.message),re(null))}}}var Qe=Array.isArray;function ge(e){return Qe(e)}function et(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,i=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function tt(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Pe(e){if(tt(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(e)),Se(e)}var H=D.ReactCurrentOwner,rt={key:!0,ref:!0,__self:!0,__source:!0},ke,Oe,ye;ye={};function nt(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function it(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ot(e,r){if(typeof e.ref=="string"&&H.current&&r&&H.current.stateNode!==r){var i=P(H.current.type);ye[i]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(H.current.type),e.ref),ye[i]=!0)}}function st(e,r){{var i=function(){ke||(ke=!0,j("%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)",r))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function lt(e,r){{var i=function(){Oe||(Oe=!0,j("%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)",r))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var at=function(e,r,i,o,h,m,u){var l={$$typeof:f,type:e,key:r,ref:i,props:u,_owner:m};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ct(e,r,i,o,h){{var m,u={},l=null,E=null;i!==void 0&&(Pe(i),l=""+i),it(r)&&(Pe(r.key),l=""+r.key),nt(r)&&(E=r.ref,ot(r,h));for(m in r)K.call(r,m)&&!rt.hasOwnProperty(m)&&(u[m]=r[m]);if(e&&e.defaultProps){var x=e.defaultProps;for(m in x)u[m]===void 0&&(u[m]=x[m])}if(l||E){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&st(u,b),E&<(u,b)}return at(e,l,E,h,o,H.current,u)}}var me=D.ReactCurrentOwner,Ie=D.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,i=te(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(i)}else Ie.setExtraStackFrame(null)}var de;de=!1;function xe(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function Ae(){{if(me.current){var e=P(me.current.type);if(e)return`
|
|
23
23
|
|
|
24
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
24
|
+
Check the render method of \``+e+"`."}return""}}function ut(e){return""}var Fe={};function ft(e){{var r=Ae();if(!r){var i=typeof e=="string"?e:e.displayName||e.name;i&&(r=`
|
|
25
25
|
|
|
26
|
-
Check the top-level render call using <`+i+">.")}return r}}function
|
|
26
|
+
Check the top-level render call using <`+i+">.")}return r}}function De(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=ft(r);if(Fe[i])return;Fe[i]=!0;var o="";e&&e._owner&&e._owner!==me.current&&(o=" It was passed a child from "+P(e._owner.type)+"."),M(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,o),M(null)}}function Ne(e,r){{if(typeof e!="object")return;if(ge(e))for(var i=0;i<e.length;i++){var o=e[i];xe(o)&&De(o,r)}else if(xe(e))e._store&&(e._store.validated=!0);else if(e){var h=oe(e);if(typeof h=="function"&&h!==e.entries)for(var m=h.call(e),u;!(u=m.next()).done;)xe(u.value)&&De(u.value,r)}}}function pt(e){{var r=e.type;if(r==null||typeof r=="string")return;var i;if(typeof r=="function")i=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===T))i=r.propTypes;else return;if(i){var o=P(r);Ze(i,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var h=P(r);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ht(e){{for(var r=Object.keys(e.props),i=0;i<r.length;i++){var o=r[i];if(o!=="children"&&o!=="key"){M(e),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),M(null);break}}e.ref!==null&&(M(e),j("Invalid attribute `ref` supplied to `React.Fragment`."),M(null))}}var Le={};function We(e,r,i,o,h,m){{var u=ue(e);if(!u){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=ut();E?l+=E:l+=Ae();var x;e===null?x="null":ge(e)?x="array":e!==void 0&&e.$$typeof===f?(x="<"+(P(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):x=typeof e,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,l)}var b=ct(e,r,i,h,m);if(b==null)return b;if(u){var k=r.children;if(k!==void 0)if(o)if(ge(k)){for(var B=0;B<k.length;B++)Ne(k[B],e);Object.freeze&&Object.freeze(k)}else j("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 Ne(k,e)}if(K.call(r,"key")){var W=P(e),C=Object.keys(r).filter(function(xt){return xt!=="key"}),_e=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Le[W+_e]){var dt=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
27
27
|
let props = %s;
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,we,$,mt,$),$e[$+we]=!0}}return e===c?pt(b):ft(b),b}}function ht(e,r,i){return Be(e,r,i,!0)}function vt(e,r,i){return Be(e,r,i,!1)}var gt=vt,yt=ht;Q.Fragment=c,Q.jsx=gt,Q.jsxs=yt}()),Q}process.env.NODE_ENV==="production"?Re.exports=_t():Re.exports=bt();var n=Re.exports;const wt="_entityCard_1xtgw_1",jt="_pcCover_1xtgw_15",Rt="_pcSection_1xtgw_31",Et="_pcBreadcrumbSep_1xtgw_38",Ct="_pcBasic_1xtgw_43",Tt="_pcBasicRow_1xtgw_49",St="_pcBasicRowLeft_1xtgw_56",Pt="_pcLinkIconRight_1xtgw_61",kt="_pcColorSwatch_1xtgw_72",Ot="_pcTitleText_1xtgw_99",It="_pcSubTitleText_1xtgw_106",At="_pcProperties_1xtgw_119",Ft="_pcProperty_1xtgw_127",Dt="_pcTagsRow_1xtgw_138",Nt="_pcDetails_1xtgw_151",Lt="_pcRow_1xtgw_157",Wt="_pcCol_1xtgw_72",$t="_pcColLabel_1xtgw_179",Bt="_pcColValue_1xtgw_183",Mt="_pcProgressText_1xtgw_188",Ut="_entityLabel_1xtgw_194",v={entityCard:wt,pcCover:jt,pcSection:Rt,pcBreadcrumbSep:Et,pcBasic:Ct,pcBasicRow:Tt,pcBasicRowLeft:St,pcLinkIconRight:Pt,pcColorSwatch:kt,pcTitleText:Ot,pcSubTitleText:It,pcProperties:At,pcProperty:Ft,pcTagsRow:Dt,pcDetails:Nt,pcRow:Lt,pcCol:Wt,pcColLabel:$t,pcColValue:Bt,pcProgressText:Mt,entityLabel:Ut},Ve=t=>{if(!t)return null;const f=t.trim(),s={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,y=>y.replace("-","").toUpperCase());return ze[s]||null},Vt=(t,f)=>{const a=typeof t=="number"?t:typeof t=="string"?parseFloat(t):NaN,c=isFinite(a)?a<=1?Math.max(0,Math.min(1,a))*100:Math.max(0,Math.min(100,a)):0;return n.jsxs("div",{className:v.pcProgress,children:[n.jsx(L.Progress,{percent:c,showInfo:!1,strokeColor:"#027ffe",size:{height:12}}),(f==null?void 0:f.text)&&n.jsx("div",{className:v.pcProgressText,children:f.text})]})},qe=t=>!Array.isArray(t)||t.length===0?null:n.jsx("div",{className:v.pcTagsRow,children:t.map((f,a)=>n.jsx(L.Tag,{color:"default",style:{display:"inline-flex",alignItems:"center",border:"none",backgroundColor:"#E8E8E8",color:"#027FFE"},children:String(f)},`${f}-${a}`))}),Yt=t=>{const{view:f,value:a,payload:c}=t;return f==="percent_bar"?Vt(a,c):f==="tags"?qe(Array.isArray(a)?a:[]):n.jsx("div",{className:v.pcColValue,children:String(a??"")})},Je=({data:t})=>{var f,a,c;return n.jsxs(n.Fragment,{children:[(t==null?void 0:t.cover)&&n.jsx("div",{className:v.pcCover,style:{height:(f=t==null?void 0:t.style)==null?void 0:f.cover_max_height},children:n.jsx("img",{src:t.cover,alt:"cover"})}),Array.isArray(t==null?void 0:t.categories)&&t.categories.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx(L.Breadcrumb,{items:t.categories.map((s,g)=>({key:`${s}-${g}`,title:s})),separator:n.jsx("span",{className:v.pcBreadcrumbSep,children:"/"})})}),((t==null?void 0:t.color)||(t==null?void 0:t.icon)||(t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.url))&&n.jsx("div",{className:v.pcBasic,children:n.jsxs("div",{className:v.pcBasicRow,children:[n.jsxs("div",{className:v.pcBasicRowLeft,children:[(t==null?void 0:t.color)&&n.jsx("span",{className:v.pcColorSwatch,style:{backgroundColor:t.color},"aria-label":`color ${t.color}`,title:`color: ${t.color}`}),(()=>{var y;const s=(y=t==null?void 0:t.icon)==null?void 0:y.trim();if(s&&/^https?:\/\/+/i.test(s))return n.jsx("img",{src:s,alt:"icon",className:v.pcIcon,width:18,height:18,style:{objectFit:"contain"}});const g=Ve(s);return g?n.jsx(g,{className:v.pcIcon,size:18,strokeWidth:2}):null})(),(t==null?void 0:t.title)&&n.jsx("span",{className:v.pcTitleText,title:t.title,children:t.title}),(t==null?void 0:t.subtitle)&&n.jsxs("span",{className:v.pcSubTitleText,title:t.subtitle,children:["| ",t.subtitle]})]}),(t==null?void 0:t.url)&&n.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer","aria-label":"open link",title:t.url,className:v.pcLinkIconRight,children:n.jsx(je.ExternalLink,{style:{width:12,height:12,color:"#027FFE"}})})]})}),Array.isArray(t==null?void 0:t.properties)&&t.properties.length>0&&n.jsx("div",{className:v.pcSection,style:{paddingTop:25},children:n.jsx("div",{className:v.pcProperties,children:t.properties.map((s,g)=>{const y=Ve(s.icon),w=()=>{if(s.view==="tags")return qe(Array.isArray(s.value)?s.value:[]);if(s.view==="datetime_with_time_zone"){const p=String(s.value??"");return n.jsx("span",{className:v.pcPropertyValue,children:p})}return n.jsx("span",{className:v.pcPropertyValue,children:String(s.value??"")})};return n.jsxs("div",{className:v.pcProperty,children:[y&&n.jsx(y,{className:v.pcPropertyIcon,size:16,strokeWidth:2}),w()]},g)})})}),Array.isArray((c=(a=t==null?void 0:t.details)==null?void 0:a.table)==null?void 0:c.rows)&&t.details.table.rows.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx("div",{className:v.pcDetails,children:t.details.table.rows.map((s,g)=>{const y=Array.isArray(s.columns)?s.columns.filter(p=>p&&(p.label!==void 0||p.value!==void 0)):[],w=y.length;return n.jsx("div",{className:v.pcRow,style:{gridTemplateColumns:w<=1?"1fr":"repeat(2, minmax(0, 1fr))"},children:y.map((p,j)=>n.jsxs("div",{className:v.pcCol,children:[Yt(p),p.label&&n.jsx("div",{className:v.pcColLabel,children:p.label})]},j))},g)})})}),Array.isArray(t==null?void 0:t.tags)&&t.tags.length>0&&n.jsx("div",{className:v.pcSection,children:t.tags.map((s,g)=>n.jsx(L.Tag,{style:{display:"inline-flex",alignItems:"center",gap:4,color:"#027FFE",border:"none"},icon:n.jsx(je.Tags,{style:{width:12,height:12}}),color:"default",children:s},g))})]})},zt=({title:t,subtitle:f,description:a,imageUrl:c,actions:s=[],footer:g,triggerType:y="hover",popupMode:w="modal",trigger:p,open:j,onOpenChange:_,modalTitle:S,width:C,placement:O="right",data:B,hoverOpenDelay:ue=500,closeDelay:fe=200,autoPlacement:A=!1,hoverAutoClose:R=!1,hoverAutoCloseDelay:Ee=2e3})=>{var z,q,J,H;const[pe,he]=ee.useState(!1),te=typeof j=="boolean",ve=te?j:pe,ge=P=>{te?_==null||_(P):he(P)},d=B,M=ee.useRef(null),[ye,re]=ee.useState(O),I=()=>{if(!M.current)return;const P=M.current.getBoundingClientRect(),ie=window.innerWidth,oe=window.innerHeight,se=(()=>{var le;const N=(typeof C=="number"?C:void 0)??((le=d==null?void 0:d.style)==null?void 0:le.width);return N?typeof N=="string"?parseInt(N,10)||376:N:376})(),me=300,K=ie-P.right,G=P.left,U=oe-P.bottom;P.top;let D=O;K>=se?D="right":G>=se?D="left":U>=me?D="bottom":D="top",re(D)},F=n.jsx(L.Button,{type:"default",children:`打开:${(d==null?void 0:d.title)??t??"详情"}`}),W=n.jsx("span",{ref:M,style:{display:"inline-block"},children:p??F}),ne=n.jsx(L.Popover,{content:n.jsx("div",{className:v.entityCard,style:{width:(z=d==null?void 0:d.style)==null?void 0:z.width,height:(q=d==null?void 0:d.style)==null?void 0:q.height,maxWidth:(J=d==null?void 0:d.style)==null?void 0:J.max_width,maxHeight:(H=d==null?void 0:d.style)==null?void 0:H.max_height},children:d!=null&&d.id?n.jsx(Je,{data:d}):n.jsx(L.Skeleton,{active:!0,title:!1,avatar:{shape:"circle",size:24},paragraph:{rows:3}})}),open:ve,onOpenChange:P=>{P&&A&&I(),ge(!!P)},trigger:y,placement:A?ye:O,mouseEnterDelay:y==="hover"?ue/1e3:0,mouseLeaveDelay:y==="hover"?fe/1e3:0,autoAdjustOverflow:!0,getPopupContainer:()=>M.current||document.body,overlayInnerStyle:{padding:0},children:W});return n.jsx(n.Fragment,{children:ne})},qt=t=>{const f=t.trim(),c={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,g=>g.replace("-","").toUpperCase());return ze[c]||null},Jt=t=>{if(t){if(/^mailto:/i.test(t))try{return decodeURIComponent(t.slice(7))}catch{return t.slice(7)}return t}},Ye=()=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,verticalAlign:"middle"},"aria-label":"entity user skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]}),He=({data:t})=>{var _,S;if(!t||!t.title&&!t.icon&&!t.subtitle&&!t.color&&!t.url)return n.jsx(Ye,{});const a=(_=t==null?void 0:t.icon)==null?void 0:_.trim(),c=(S=t==null?void 0:t.title)==null?void 0:S.trim(),s=Jt(t==null?void 0:t.url),g=!!a,y=!!c,w=!!s,p=!!(t!=null&&t.color)||!!(t!=null&&t.subtitle),j=(C=20)=>{if(a&&/^https?:\/\//i.test(a))return n.jsx(L.Avatar,{size:C,src:a});const O=qt(a||"user"),B=Math.max(8,C-4);return n.jsx(L.Avatar,{size:C,icon:O?n.jsx(O,{size:B}):void 0})};return g&&y&&!w&&!p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(),n.jsx("span",{style:{color:"#027FFE",fontWeight:500,lineHeight:"20px"},title:c,children:c})]}):g&&!y&&!w&&!p?n.jsx("span",{style:{display:"inline-flex"},children:j()}):!g&&y&&!w&&!p?n.jsx("span",{style:{display:"inline-block",color:"#027FFE",fontWeight:500},title:c,children:c}):g&&y&&w?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsx("span",{style:{color:"#888",fontSize:12},title:s,children:s})]})]}):g&&y&&p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsxs("span",{style:{marginTop:4,display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"#666"},title:t==null?void 0:t.subtitle,children:[(t==null?void 0:t.color)&&n.jsx("span",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:t.color}}),t==null?void 0:t.subtitle]})]})]}):y?n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}):n.jsx(Ye,{})};function Ht({data:t}){var a,c,s,g;const f=((t==null?void 0:t.type)??"").toLowerCase()==="user";return n.jsx("div",{className:v.entityLabel,style:{width:(a=t==null?void 0:t.style)==null?void 0:a.width,height:(c=t==null?void 0:t.style)==null?void 0:c.height,maxWidth:(s=t==null?void 0:t.style)==null?void 0:s.max_width,maxHeight:(g=t==null?void 0:t.style)==null?void 0:g.max_height},children:t!=null&&t.id?f?n.jsx(He,{data:t}):n.jsx(Je,{data:t}):n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:10,verticalAlign:"middle"},"aria-label":"entity label skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]})})}exports.EntityCard=zt;exports.EntityLabel=Ht;exports.EntityUser=He;
|
|
31
|
+
<%s key={someKey} {...props} />`,_e,W,dt,W),Le[W+_e]=!0}}return e===c?ht(b):pt(b),b}}function vt(e,r,i){return We(e,r,i,!0)}function gt(e,r,i){return We(e,r,i,!1)}var yt=gt,mt=vt;X.Fragment=c,X.jsx=yt,X.jsxs=mt}()),X}process.env.NODE_ENV==="production"?we.exports=bt():we.exports=wt();var n=we.exports;const jt="_entityCard_1xtgw_1",Rt="_pcCover_1xtgw_15",Et="_pcSection_1xtgw_31",Ct="_pcBreadcrumbSep_1xtgw_38",Tt="_pcBasic_1xtgw_43",St="_pcBasicRow_1xtgw_49",Pt="_pcBasicRowLeft_1xtgw_56",kt="_pcLinkIconRight_1xtgw_61",Ot="_pcColorSwatch_1xtgw_72",It="_pcIconDot_1xtgw_77",At="_pcTitleLink_1xtgw_82",Ft="_pcTitleText_1xtgw_99",Dt="_pcSubTitleText_1xtgw_106",Nt="_pcExternalIcon_1xtgw_113",Lt="_pcProperties_1xtgw_119",Wt="_pcProperty_1xtgw_127",$t="_pcTagsRow_1xtgw_138",Mt="_pcTag_1xtgw_138",Bt="_pcDetails_1xtgw_151",Ut="_pcRow_1xtgw_157",Vt="_pcCol_1xtgw_72",Yt="_pcColLabel_1xtgw_179",zt="_pcColValue_1xtgw_183",qt="_pcProgressText_1xtgw_188",Jt="_entityLabel_1xtgw_194",v={entityCard:jt,pcCover:Rt,pcSection:Et,pcBreadcrumbSep:Ct,pcBasic:Tt,pcBasicRow:St,pcBasicRowLeft:Pt,pcLinkIconRight:kt,pcColorSwatch:Ot,pcIconDot:It,pcTitleLink:At,pcTitleText:Ft,pcSubTitleText:Dt,pcExternalIcon:Nt,pcProperties:Lt,pcProperty:Wt,pcTagsRow:$t,pcTag:Mt,pcDetails:Bt,pcRow:Ut,pcCol:Vt,pcColLabel:Yt,pcColValue:zt,pcProgressText:qt,entityLabel:Jt},Be=t=>{if(!t)return null;const f=t.trim(),s={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,y=>y.replace("-","").toUpperCase());return Ve[s]||null},Kt=(t,f)=>{const a=typeof t=="number"?t:typeof t=="string"?parseFloat(t):NaN,c=isFinite(a)?a<=1?Math.max(0,Math.min(1,a))*100:Math.max(0,Math.min(100,a)):0;return n.jsxs("div",{className:v.pcProgress,children:[n.jsx(F.Progress,{percent:c,showInfo:!1,strokeColor:"#027ffe",size:{height:12}}),(f==null?void 0:f.text)&&n.jsx("div",{className:v.pcProgressText,children:f.text})]})},Ye=t=>!Array.isArray(t)||t.length===0?null:n.jsx("div",{className:v.pcTagsRow,children:t.map((f,a)=>n.jsx(F.Tag,{color:"default",style:{display:"inline-flex",alignItems:"center",border:"none",backgroundColor:"#E8E8E8",color:"#027FFE"},children:String(f)},`${f}-${a}`))}),Ht=t=>{const{view:f,value:a,payload:c}=t;return f==="percent_bar"?Kt(a,c):f==="tags"?Ye(Array.isArray(a)?a:[]):n.jsx("div",{className:v.pcColValue,children:String(a??"")})},ze=({data:t})=>{var f,a,c;return n.jsxs(n.Fragment,{children:[(t==null?void 0:t.cover)&&n.jsx("div",{className:v.pcCover,style:{height:(f=t==null?void 0:t.style)==null?void 0:f.cover_max_height},children:n.jsx("img",{src:t.cover,alt:"cover"})}),Array.isArray(t==null?void 0:t.categories)&&t.categories.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx(F.Breadcrumb,{items:t.categories.map((s,g)=>({key:`${s}-${g}`,title:s})),separator:n.jsx("span",{className:v.pcBreadcrumbSep,children:"/"})})}),((t==null?void 0:t.color)||(t==null?void 0:t.icon)||(t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.url))&&n.jsx("div",{className:v.pcBasic,children:n.jsxs("div",{className:v.pcBasicRow,children:[n.jsxs("div",{className:v.pcBasicRowLeft,children:[(t==null?void 0:t.color)&&n.jsx("span",{className:v.pcColorSwatch,style:{backgroundColor:t.color},"aria-label":`color ${t.color}`,title:`color: ${t.color}`}),(()=>{var y;const s=(y=t==null?void 0:t.icon)==null?void 0:y.trim();if(s&&/^https?:\/\/+/i.test(s))return n.jsx("img",{src:s,alt:"icon",className:v.pcIcon,width:18,height:18,style:{objectFit:"contain"}});const g=Be(s);return g?n.jsx(g,{className:v.pcIcon,size:18,strokeWidth:2}):null})(),(t==null?void 0:t.title)&&n.jsx("span",{className:v.pcTitleText,title:t.title,children:t.title}),(t==null?void 0:t.subtitle)&&n.jsxs("span",{className:v.pcSubTitleText,title:t.subtitle,children:["| ",t.subtitle]})]}),(t==null?void 0:t.url)&&n.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer","aria-label":"open link",title:t.url,className:v.pcLinkIconRight,children:n.jsx(be.ExternalLink,{style:{width:12,height:12,color:"#027FFE"}})})]})}),Array.isArray(t==null?void 0:t.properties)&&t.properties.length>0&&n.jsx("div",{className:v.pcSection,style:{paddingTop:25},children:n.jsx("div",{className:v.pcProperties,children:t.properties.map((s,g)=>{const y=Be(s.icon),w=()=>{if(s.view==="tags")return Ye(Array.isArray(s.value)?s.value:[]);if(s.view==="datetime_with_time_zone"){const p=String(s.value??"");return n.jsx("span",{className:v.pcPropertyValue,children:p})}return n.jsx("span",{className:v.pcPropertyValue,children:String(s.value??"")})};return n.jsxs("div",{className:v.pcProperty,children:[y&&n.jsx(y,{className:v.pcPropertyIcon,size:16,strokeWidth:2}),w()]},g)})})}),Array.isArray((c=(a=t==null?void 0:t.details)==null?void 0:a.table)==null?void 0:c.rows)&&t.details.table.rows.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx("div",{className:v.pcDetails,children:t.details.table.rows.map((s,g)=>{const y=Array.isArray(s.columns)?s.columns.filter(p=>p&&(p.label!==void 0||p.value!==void 0)):[],w=y.length;return n.jsx("div",{className:v.pcRow,style:{gridTemplateColumns:w<=1?"1fr":"repeat(2, minmax(0, 1fr))"},children:y.map((p,R)=>n.jsxs("div",{className:v.pcCol,children:[Ht(p),p.label&&n.jsx("div",{className:v.pcColLabel,children:p.label})]},R))},g)})})}),Array.isArray(t==null?void 0:t.tags)&&t.tags.length>0&&n.jsx("div",{className:v.pcSection,children:t.tags.map((s,g)=>n.jsx(F.Tag,{style:{display:"inline-flex",alignItems:"center",gap:4,color:"#027FFE",border:"none"},icon:n.jsx(be.Tags,{style:{width:12,height:12}}),color:"default",children:s},g))})]})},Gt=({title:t,subtitle:f,description:a,imageUrl:c,actions:s=[],footer:g,triggerType:y="hover",popupMode:w="modal",trigger:p,open:R,onOpenChange:_,modalTitle:T,width:S,placement:O="right",data:$,hoverOpenDelay:ie=500,closeDelay:oe=200,autoPlacement:D=!1,hoverAutoClose:j=!1,hoverAutoCloseDelay:je=2e3,getPopupContainer:se,viewportPadding:U=16,zIndex:le})=>{var Y,z,q,J;const[ae,ce]=ne.useState(!1),V=typeof R=="boolean",ue=V?R:ae,fe=A=>{V?_==null||_(A):ce(A)},d=$,P=ne.useRef(null),I=n.jsx(F.Button,{type:"default",children:`打开:${(d==null?void 0:d.title)??t??"详情"}`}),N=n.jsx("span",{ref:P,style:{display:"inline-block"},children:p??I}),Z=n.jsx(F.Popover,{content:n.jsx("div",{className:v.entityCard,style:{width:(Y=d==null?void 0:d.style)==null?void 0:Y.width,height:(z=d==null?void 0:d.style)==null?void 0:z.height,maxWidth:(q=d==null?void 0:d.style)==null?void 0:q.max_width,maxHeight:(J=d==null?void 0:d.style)==null?void 0:J.max_height},children:d!=null&&d.id?n.jsx(ze,{data:d}):n.jsx(F.Skeleton,{active:!0,title:!1,avatar:{shape:"circle",size:24},paragraph:{rows:3}})}),open:ue,onOpenChange:A=>{fe(!!A)},trigger:y,placement:O,align:function(){const A=O,L=U;switch(A){case"top":return{offset:[0,L]};case"bottom":return{offset:[0,-L]};case"left":return{offset:[L,0]};case"right":return{offset:[-L,0]};default:return}}(),mouseEnterDelay:y==="hover"?ie/1e3:0,mouseLeaveDelay:y==="hover"?oe/1e3:0,autoAdjustOverflow:!0,zIndex:le,getPopupContainer:se??(()=>document.body),overlayStyle:{maxHeight:`calc(100vh - 24px - ${U*2}px)`,overflowY:"auto",margin:U},overlayInnerStyle:{padding:0},children:N});return n.jsx(n.Fragment,{children:Z})},Xt=t=>{if(!t)return null;const f=t.trim(),c={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,g=>g.replace("-","").toUpperCase());return Ve[c]||null},Zt=t=>{if(t){if(/^mailto:/i.test(t))try{return decodeURIComponent(t.slice(7))}catch{return t.slice(7)}return t}},Ue=()=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,verticalAlign:"middle"},"aria-label":"entity user skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]}),qe=({data:t})=>{var _,T;if(!t||!t.title&&!t.icon&&!t.subtitle&&!t.color&&!t.url)return n.jsx(Ue,{});const a=(_=t==null?void 0:t.icon)==null?void 0:_.trim(),c=(T=t==null?void 0:t.title)==null?void 0:T.trim(),s=Zt(t==null?void 0:t.url),g=!!a,y=!!c,w=!!s,p=!!(t!=null&&t.color)||!!(t!=null&&t.subtitle),R=(S=20)=>{if(a&&/^https?:\/\//i.test(a))return n.jsx(F.Avatar,{size:S,src:a});const O=Xt(a||"user"),$=Math.max(8,S-4);return n.jsx(F.Avatar,{size:S,icon:O?n.jsx(O,{size:$}):void 0})};return g&&y&&!w&&!p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[R(),n.jsx("span",{style:{color:"#027FFE",fontWeight:500,lineHeight:"20px"},title:c,children:c})]}):g&&!y&&!w&&!p?n.jsx("span",{style:{display:"inline-flex"},children:R()}):!g&&y&&!w&&!p?n.jsx("span",{style:{display:"inline-block",color:"#027FFE",fontWeight:500},title:c,children:c}):g&&y&&w?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[R(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsx("span",{style:{color:"#888",fontSize:12},title:s,children:s})]})]}):g&&y&&p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[R(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsxs("span",{style:{marginTop:4,display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"#666"},title:t==null?void 0:t.subtitle,children:[(t==null?void 0:t.color)&&n.jsx("span",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:t.color}}),t==null?void 0:t.subtitle]})]})]}):y?n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}):n.jsx(Ue,{})};function Qt({data:t}){var a,c,s,g;const f=((t==null?void 0:t.type)??"").toLowerCase()==="user";return n.jsx("div",{className:v.entityLabel,style:{width:(a=t==null?void 0:t.style)==null?void 0:a.width,height:(c=t==null?void 0:t.style)==null?void 0:c.height,maxWidth:(s=t==null?void 0:t.style)==null?void 0:s.max_width,maxHeight:(g=t==null?void 0:t.style)==null?void 0:g.max_height},children:t!=null&&t.id?f?n.jsx(qe,{data:t}):n.jsx(ze,{data:t}):n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:10,verticalAlign:"middle"},"aria-label":"entity label skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]})})}exports.EntityCard=Gt;exports.EntityLabel=Qt;exports.EntityUser=qe;
|