openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 2.29 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{au as t,wa as n,xa as r}from"./control-ui-connection-Bfj9beF_.js";import{Ob as i,kb as a}from"./control-ui-boot-shared-DFTSUQQ0.js";import{n as o}from"./json-schema-BDPIr-N8.js";import{i as s,o as c,s as l,t as u,u as d}from"./config-form-utils-BqrafwiP.js";import{i as f,r as p}from"./config-form.numeric-ClklwzWp.js";import{_ as m,b as h,h as g,s as _,v,y}from"./config-form.constraints-BF6pi17w.js";import{n as b,s as x}from"./config-form.search-CIkOo1VV.js";function S(e){return{hints:e.hints,rawAvailable:e.rawAvailable,maskSensitive:e.maskSensitive,unsupported:e.unsupported,disabled:e.disabled,compact:e.compact,commitOnBlur:e.commitOnBlur,revealSensitive:e.revealSensitive,isSensitivePathRevealed:e.isSensitivePathRevealed,onToggleSensitivePath:e.onToggleSensitivePath}}function C(e){let{label:t,help:n}=x(e.path,e.schema,e.hints),r=e.showLabel??!0;return{label:t,help:n,showLabel:r,required:w(e),helpId:e.descriptionId??(r&&n?g(e.path,`description`):void 0)}}function w(e){return e.isRequired===!0&&(e.schema.default===void 0||!o(e.schema,e.schema.default))}function T(e){return Object.keys(e).every(e=>j.has(e))}function E(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)??``}catch{return``}}function D(e){return typeof e==`number`?p(e):i(e)}function O(e){return!t(e)||typeof e.source!=`string`||typeof e.id!=`string`?!1:e.provider===void 0||typeof e.provider==`string`}function k(e){let t=m(e.value,e.path,e.hints),n=e.value===u,r=t&&!n&&(e.revealSensitive||(e.isSensitivePathRevealed?.(e.path)??!1)),i=s(e.path,e.hints)?.sensitive||h(d(e.path));return{isSensitive:t,isSensitiveField:i,isMasked:e.maskSensitive===!0&&!e.revealSensitive&&!r&&(e.value===void 0||typeof e.value==`string`)&&!(typeof e.value==`string`&&l(e.value))&&(i||t),isRedacted:t&&!r,isRevealed:r,canReveal:t&&!n,sentinelRedacted:n}}function A(e,t){return t.includes(!0)&&t.includes(!1)?e===!0?n(`configForm.enumOn`):e===!1?n(`configForm.enumOff`):e===`auto`?n(`configForm.enumAuto`):D(e):D(e)}var j;function M(){return(M=e((()=>{y(),r(),c(),a(),_(),f(),b(),v(),j=new Set([`title`,`description`,`default`,`nullable`,`enumIncludesNull`,`tags`,`x-tags`])})))()}export{k as a,O as c,D as i,E as l,A as n,M as o,w as r,T as s,S as t,C as u};