@g1cloud/ui-modeler-next 5.0.0-alpha.1
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/README.md +140 -0
- package/dist/adapter/attrCodec.d.ts +12 -0
- package/dist/adapter/interpretFlat.d.ts +20 -0
- package/dist/adapter/legacyGridSort.d.ts +11 -0
- package/dist/adapter/legacyText.d.ts +31 -0
- package/dist/adapter/legacyValidator.d.ts +2 -0
- package/dist/adapter/migrate.d.ts +47 -0
- package/dist/adapter/persisted.d.ts +75 -0
- package/dist/adapter/uiModelAdapter.d.ts +80 -0
- package/dist/agent/buildAgentBatch.d.ts +22 -0
- package/dist/agent/describeScreen.d.ts +21 -0
- package/dist/agent/resolver.d.ts +72 -0
- package/dist/agent/schema.d.ts +15 -0
- package/dist/agent/strictSubset.d.ts +30 -0
- package/dist/agent/symbolicOp.d.ts +97 -0
- package/dist/catalog/builtin/basic.d.ts +3 -0
- package/dist/catalog/builtin/chart.d.ts +3 -0
- package/dist/catalog/builtin/composite.d.ts +3 -0
- package/dist/catalog/builtin/etc.d.ts +3 -0
- package/dist/catalog/builtin/filter.d.ts +3 -0
- package/dist/catalog/builtin/grid.d.ts +3 -0
- package/dist/catalog/builtin/index.d.ts +3 -0
- package/dist/catalog/builtin/input.d.ts +3 -0
- package/dist/catalog/builtin/layout.d.ts +3 -0
- package/dist/catalog/builtin/listField.d.ts +3 -0
- package/dist/catalog/builtin/multilang.d.ts +3 -0
- package/dist/catalog/builtin/shared.d.ts +69 -0
- package/dist/catalog/builtin/tree.d.ts +3 -0
- package/dist/catalog/catalog.d.ts +13 -0
- package/dist/catalog/containment.d.ts +26 -0
- package/dist/catalog/index.d.ts +6 -0
- package/dist/catalog/propertyEditor.d.ts +24 -0
- package/dist/catalog/styleTokens.d.ts +54 -0
- package/dist/catalog/toAgentCatalog.d.ts +57 -0
- package/dist/catalog/types.d.ts +117 -0
- package/dist/command/commands.d.ts +25 -0
- package/dist/command/op.d.ts +83 -0
- package/dist/command/opSync.d.ts +84 -0
- package/dist/command/stack.d.ts +47 -0
- package/dist/command/types.d.ts +23 -0
- package/dist/core/attrValue.d.ts +50 -0
- package/dist/core/caseMessage.d.ts +13 -0
- package/dist/core/gridDefaultSort.d.ts +15 -0
- package/dist/core/id.d.ts +2 -0
- package/dist/core/lang.d.ts +25 -0
- package/dist/core/partType.d.ts +30 -0
- package/dist/core/traverse.d.ts +24 -0
- package/dist/core/types.d.ts +40 -0
- package/dist/core/validation.d.ts +21 -0
- package/dist/core/validatorConfig.d.ts +48 -0
- package/dist/editor/controller.d.ts +125 -0
- package/dist/index.d.ts +42 -0
- package/dist/ui-modeler-next.css +1 -0
- package/dist/ui-modeler.js +3965 -0
- package/dist/ui-modeler.umd.cjs +1 -0
- package/dist/view/InlineIssueBadge.vue.d.ts +7 -0
- package/dist/view/MultiLangTextField.vue.d.ts +19 -0
- package/dist/view/PartCanvas.vue.d.ts +12 -0
- package/dist/view/PartPalette.vue.d.ts +2 -0
- package/dist/view/PartTree.vue.d.ts +7 -0
- package/dist/view/PropertyPanel.vue.d.ts +2 -0
- package/dist/view/RendererRegistry.d.ts +28 -0
- package/dist/view/SchematicPart.vue.d.ts +29 -0
- package/dist/view/dnd.d.ts +19 -0
- package/dist/view/preview/IframePreview.vue.d.ts +22 -0
- package/dist/view/preview/protocol.d.ts +40 -0
- package/dist/view/validationDisplay.d.ts +8 -0
- package/package.json +56 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(p,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(p=typeof globalThis<"u"?globalThis:p||self,a(p.UiModeler={},p.Vue))})(this,(function(p,a){"use strict";var vr=Object.defineProperty;var wr=(p,a,j)=>a in p?vr(p,a,{enumerable:!0,configurable:!0,writable:!0,value:j}):p[a]=j;var F=(p,a,j)=>wr(p,typeof a!="symbol"?a+"":a,j);const j={Layout:["VerticalLayout","HorizontalLayout","CardLayout","ActionLayout","ActionLayoutArea","FormLayout","TableLayout","TableLayoutCell","FlowLayout","ExpansionLayout","InternalLayoutArea"],Basic:["Button","PopupButton","Label","Image","Link","LinkTab","ProgressBar","Console","NativeUpload","AuditInfo","AuditInfoButton"],Input:["TextField","TextArea","StyledTextField","RichTextArea","TelField","NumberField","CurrencyField","DateField","TimeField","DateRange","CheckBox","RadioButton","RadioGroup","CheckBoxGroup","YesNoGroup","Select","MultiSelect","CategorySelect","PopupSelect","YesNoSelect","ColorField"],Composite:["MultiFileUpload","SingleFileUpload","SingleImageUpload","NameField","AddressField","PageBuilder","ContentEditor"],MultiLang:["MultiLangTextField","MultiLangTextArea","MultiLangStyledTextField","MultiLangRichTextArea","MultiLangPageBuilder","MultiLangContentEditor","MultiLangFileUpload"],Grid:["Grid","GridControl","GridLookup","ColumnDef","GridCellPanel"],Tree:["Tree","TreeControl","TabSheet","TabSheetPanel"],Filter:["TextFilter","NumberFilter","SelectFilter","MultiSelectFilter","PopupSelectFilter","CategorySelectFilter","YesNoSelectFilter"],ListField:["ListField","ListControl"],Chart:["FlagCard","Chart"],Etc:["PageRefreshButton","MultiLangExpandButton","Fragment","CommentList","SourceCodeEditor","MarkdownViewer","History"]},Ze=Object.values(j).flat(),Me=Object.fromEntries(Object.entries(j).flatMap(([e,t])=>t.map(r=>[r,e]))),pn=new Set(Ze);function Ee(e){return pn.has(e)}const V=e=>({kind:"string",value:e}),Be=e=>({kind:"int",value:e}),v=e=>({kind:"bool",value:e}),_e=e=>({kind:"text",value:e}),fn=e=>({kind:"dataSource",value:e}),gn=e=>({kind:"dataMapping",value:e}),Tn=e=>({kind:"validator",value:e});function he(e,t=""){return(e==null?void 0:e.kind)==="string"?e.value:t}function Qe(e,t=0){return(e==null?void 0:e.kind)==="int"?e.value:t}function et(e,t=!1){return(e==null?void 0:e.kind)==="bool"?e.value:t}function tt(e){return(e==null?void 0:e.kind)==="text"?e.value:void 0}function mn(e){return(e==null?void 0:e.kind)==="validator"?e.value:void 0}const En={NOTI_S:"Success",NOTI_F:"Fail",CONFIRM:"Confirm"};function Pe(e){return typeof e=="object"&&e!=null&&typeof e.key=="string"}function re(){return crypto.randomUUID()}function nt(e,t){const r=t(e);if(r==="CONTINUE"&&e.children){for(const o of e.children)if(nt(o,t)==="STOP")break}return r==="SKIP_CHILDREN"?"CONTINUE":r}function $(e,t){if(e!=null){if(e.partId===t)return e;if(e.children)for(const r of e.children){const o=$(r,t);if(o)return o}}}function H(e,t){if(t(e),e.children)for(const r of e.children)H(r,t)}function hn(e,t){const r=[];return H(e,o=>{t(o)&&r.push(o)}),r}function ye(e,t){if(e.children)for(const r of e.children){if(r.partId===t)return e;const o=ye(r,t);if(o)return o}}function Re(e,t){if(e.partId===t)return[e];if(e.children)for(const r of e.children){const o=Re(r,t);if(o)return[e,...o]}}function ot(e,t){const r=[],o=new Map;return H(e,i=>o.set(i.partId,(o.get(i.partId)??0)+1)),H(e,i=>{(o.get(i.partId)??0)>1&&r.push({ruleId:"CHK-DUP-ID",severity:"error",targetKind:"part",targetRef:i.partId,message:`partId가 트리에서 중복됩니다: "${i.partId}"`})}),H(e,i=>{var d;const l=t.get(i.partType);if(!l)r.push({ruleId:"CHK-PART-1",severity:"warning",targetKind:"part",targetRef:i.partId,message:`카탈로그에 없는 파트 타입입니다: "${i.partType}"`});else for(const u of Object.keys(i.attrs))t.propertyItem(i.partType,u)||r.push({ruleId:"CHK-ATTR-1",severity:"warning",targetKind:"part",targetRef:i.partId,message:`카탈로그 정의에 없는 속성 키입니다: "${i.partType}.${u}"`});const s=i.children??[];for(const u of s)if(t.canContain(i.partType,u.partType)==="deny"&&r.push({ruleId:"CHK-CONTAIN-1",severity:"error",targetKind:"part",targetRef:u.partId,contextRef:i.partId,message:`${i.partType}은(는) 자식으로 ${u.partType}을(를) 담을 수 없습니다`}),l)for(const g of Object.keys(u.layoutAttrs??{})){const h=t.propertyItem(i.partType,g);h!=null&&h.layoutAttr||r.push({ruleId:"CHK-ATTR-1",severity:"warning",targetKind:"part",targetRef:u.partId,contextRef:i.partId,message:`${i.partType}의 레이아웃 정의에 없는 레이아웃 속성 키입니다: "${g}"`})}const c=(d=l==null?void 0:l.containment)==null?void 0:d.arity;if(c){const u=s.length;c.max!=null&&u>c.max&&r.push({ruleId:"CHK-ARITY-1",severity:"error",targetKind:"part",targetRef:i.partId,message:`${i.partType}의 자식이 ${u}개로 최대 ${c.max}개를 초과했습니다`}),c.min!=null&&u<c.min&&r.push({ruleId:"CHK-ARITY-2",severity:"warning",targetKind:"part",targetRef:i.partId,message:`${i.partType}의 자식이 ${u}개로 최소 ${c.min}개에 미달합니다`})}}),r}function rt(e){return e==null||e.trim().length===0}function at(e){if(!(e==null||e.length===0))return e.startsWith("#{")&&e.endsWith("}")?{key:e.slice(2,-1)}:{text:e}}function it(e){if(e!=null){if(!rt(e.key))return{key:e.key};if(e.msgMap&&Object.keys(e.msgMap).length>0)return{...e.msgMap};if(!rt(e.text))return e.text}}function pe(e){return it(at(e))}function ae(e){if(e==null)return;const t=e.startsWith("^")?e.slice(1):e,r=Number.parseInt(t,10);return Number.isNaN(r)?void 0:r}function Se(e){if(e==null)return;const t=e.startsWith("^")?e.slice(1):e;return Number.isNaN(Number(t))||t.trim().length===0?void 0:t}function ie(e){return e!=null&&e.startsWith("^")}function lt(e){const t={};if(e==null)return t;for(let r of e.split(";")){if(r=r.trim(),r.length===0)continue;const o=r.split(":"),i=o.length>=1?o[0].trim():null,l=o.length>=2?o[1].trim():null;let s=null,c=null;if(l!=null){const g=l.split(",");g.length>0&&(s=g[0]),g.length>1&&(c=g[1])}const d=o.length>=3?pe(o[2].trim()):void 0,u=o.length>=4?pe(o[3].trim()):void 0;switch(i){case"required":t.useRequired=!0,t.requiredMsg=d;break;case"length":t.useLength=!0,t.lengthMin=ae(s),t.lengthMax=ae(c),t.lengthMsg=d;break;case"currencyRange":t.useCurrencyRange=!0,t.currencyRangeMin=Se(s),t.currencyRangeMax=Se(c),t.currencyRangeMinExclusive=ie(s),t.currencyRangeMaxExclusive=ie(c),t.currencyRangeMsg=d;break;case"longRange":t.useLongRange=!0,t.longRangeMin=ae(s),t.longRangeMax=ae(c),t.longRangeMinExclusive=ie(s),t.longRangeMaxExclusive=ie(c),t.longRangeMsg=d;break;case"doubleRange":t.useDoubleRange=!0,t.doubleRangeMin=Se(s),t.doubleRangeMax=Se(c),t.doubleRangeMinExclusive=ie(s),t.doubleRangeMaxExclusive=ie(c),t.doubleRangeMsg=d;break;case"regexp":t.useRegexp=!0,t.regexpPattern=l??void 0,t.regexpMsg=d;break;case"dupCheck":t.useDupCheck=!0,t.dupCheckMsg1=d,t.dupCheckMsg2=u;break;case"plainTextLength":t.usePlainTextLength=!0,t.plainTextLengthMin=ae(s),t.plainTextLengthMax=ae(c),t.plainTextLengthMsg=d;break}}return t}function st(e){const t=e.split(":");return{sortPropertyId:t.length>0?t[0]:"",order:t.length>1?t[1]:"ASC",sortDataMapping:t.length>2?t[2]:"",sortName:t.length>3?t[3]:""}}function yn(e){return e==null?[]:e.split(";").filter(t=>t.trim().length>0).map(st)}const Sn={S:"string",I:"int",B:"bool",M:"text",DS:"dataSource",DM:"dataMapping"};function ct(e,t){switch(t??Sn[e.type]){case"string":return{kind:"string",value:e.val};case"int":return{kind:"int",value:Number.parseInt(e.val,10)};case"bool":return{kind:"bool",value:e.val==="true"};case"text":return{kind:"text",value:pe(e.val)??""};case"dataSource":return{kind:"dataSource",value:e.val};case"dataMapping":return{kind:"dataMapping",value:e.val};case"validator":return{kind:"validator",value:lt(e.val)};default:return}}function xe(e,t,r){const o={};for(const[i,l]of Object.entries(e)){const s=ct(l,t==null?void 0:t(i));s===void 0?r==null||r(i,l):o[i]=s}return o}function dt(){return{unknownPartTypes:[],discardedAttrs:[],droppedFields:[]}}function bn(e){const t={};if(e.caseText&&(t.caseText={...e.caseText}),e.msgType&&(t.msgType=e.msgType),e.msgText!=null){const r=pe(e.msgText);r!==void 0&&(t.msgText=r)}return t}function kn(e,t){if(e)return r=>{var o;return(o=e.propertyItem(t,r))==null?void 0:o.valueType}}function ut(e,t){const{partId:r,partType:o,partInfo:i,attrMap:l,comment:s,caseMsgList:c,children:d,layoutAttrMap:u,extraAttrMap:g,...h}=e,y=t.report,S=t.catalog?t.catalog.get(o)!=null:!0;y&&!S&&y.unknownPartTypes.push({partId:r,partType:o});const C=y?k=>(O,D)=>y.discardedAttrs.push({partId:r,partType:o,key:O,tag:String(D.type),layout:k}):void 0,R=kn(t.catalog,o),X={partId:r,partType:o,attrs:l?xe(l,R,C==null?void 0:C(!1)):{}};if(i&&(X.info={draggable:!!i.draggable,droppable:!!i.droppable,selectable:!!i.selectable,deletable:!!i.deletable}),u&&(X.layoutAttrs=xe(u,R,C==null?void 0:C(!0))),g&&(X.extraAttrs={...g}),s&&(X.comment={...s}),c&&(X.caseMessages=c.map(bn)),d&&(X.children=d.map(k=>ut(k,t))),y)for(const k of Object.keys(h))y.droppedFields.push({partId:r,partType:o,field:k});return X}function pt(e,t={}){return ut(e,t)}function Cn(e,t,r,o){const i={partId:e.partId,parentId:t,order:r,rev:o,partType:e.partType};return e.info&&(i.info=e.info),e.attrs&&Object.keys(e.attrs).length&&(i.attrs=e.attrs),e.layoutAttrs&&Object.keys(e.layoutAttrs).length&&(i.layoutAttrs=e.layoutAttrs),e.extraAttrs&&(i.extraAttrs=e.extraAttrs),e.comment!==void 0&&(i.comment=e.comment),e.caseMessages&&(i.caseMessages=e.caseMessages),i}function Ne(e,t=null,r=0,o=0){const i=[],l=(s,c,d)=>{var u;i.push(Cn(s,c,d,o)),(u=s.children)==null||u.forEach((g,h)=>l(g,s.partId,h))};return l(e,t,r),i}function ft(e,t={}){const r={schemaVersion:2,rootId:e.partId,partList:Ne(e,null,0,0)};return t.opWriteEnabled!==void 0&&(r.opWriteEnabled=t.opWriteEnabled),t.version!==void 0&&(r.version=t.version),r}function On(e){const t={partId:e.partId,partType:e.partType,attrs:e.attrs?{...e.attrs}:{}};return e.info&&(t.info={...e.info}),e.layoutAttrs&&(t.layoutAttrs={...e.layoutAttrs}),e.extraAttrs&&(t.extraAttrs={...e.extraAttrs}),e.comment!==void 0&&(t.comment=e.comment),e.caseMessages&&(t.caseMessages=[...e.caseMessages]),t}function Ln(e){const t=new Map;for(const d of e.partList){if(t.has(d.partId))throw new Error(`v2-read: 중복 partId '${d.partId}'`);t.set(d.partId,d)}const r=new Map;for(const d of e.partList){if(d.parentId===null)continue;if(!t.has(d.parentId))throw new Error(`v2-read: 고아 파트 '${d.partId}' — 부모 '${d.parentId}' 부재`);const u=r.get(d.parentId);u?u.push(d):r.set(d.parentId,[d])}const o=t.get(e.rootId);if(!o)throw new Error(`v2-read: rootId '${e.rootId}' 파트 부재`);if(o.parentId!==null)throw new Error(`v2-read: rootId '${e.rootId}'의 parentId가 null이 아님(${String(o.parentId)})`);const i={},l=new Set,s=d=>{if(l.has(d.partId))throw new Error(`v2-read: 순환 참조 '${d.partId}'`);l.add(d.partId),i[d.partId]=d.rev;const u=On(d),g=r.get(d.partId);return g&&(g.sort((h,y)=>h.order-y.order),u.children=g.map(s)),u},c=s(o);if(l.size!==t.size){const d=[...t.keys()].filter(u=>!l.has(u));throw new Error(`v2-read: root에서 도달 불가한 파트 ${d.length}개(예: '${d[0]}')`)}return{root:c,revSeed:{revs:i}}}function In(e,t={}){const r=t.report??dt(),o=pt(e,{catalog:t.catalog,report:r});return{v2:ft(o,{opWriteEnabled:t.opWriteEnabled,version:t.version}),report:r,model:o}}function gt(e,t){return e==null?t:Math.max(0,Math.min(e,t))}function An(e,t,r){const o=new Map,i=new Map;for(const u of e){if(o.has(u.partId))throw new Error(`applyOpsToFlat: 입력 중복 partId '${u.partId}'`);o.set(u.partId,{...u}),i.set(u.partId,u.rev)}const l=r.revs??{};for(const[u,g]of Object.entries(l)){if(!i.has(u))continue;const h=i.get(u);if(h!==g)return{ok:!1,conflict:{kind:"rev",ref:u,current:h}}}const s=u=>[...o.values()].filter(g=>g.parentId===u).sort((g,h)=>g.order-h.order),c=u=>u.forEach((g,h)=>g.order=h);for(const u of t)switch(u.kind){case"part.add":{const g=u.parentRef??null;if(g!==null&&!o.has(g))return{ok:!1,conflict:{kind:"missing",ref:g}};if(!u.value)throw new Error("applyOpsToFlat: part.add에 value(서브트리) 누락");const h=Ne(u.value,g,0,0);for(const C of h){if(o.has(C.partId))throw new Error(`applyOpsToFlat: part.add 중복 partId '${C.partId}'`);o.set(C.partId,C)}const y=u.value.partId,S=s(g).filter(C=>C.partId!==y);S.splice(gt(u.index,S.length),0,o.get(y)),c(S);break}case"part.update":{const g=u.partRef?o.get(u.partRef):void 0;if(!g)return{ok:!1,conflict:{kind:"missing",ref:u.partRef}};u.patch&&Object.assign(g,u.patch);break}case"part.move":{const g=u.partRef,h=g?o.get(g):void 0;if(!g||!h)return{ok:!1,conflict:{kind:"missing",ref:g}};const y=u.toParentRef??null;if(y!==null&&!o.has(y))return{ok:!1,conflict:{kind:"missing",ref:y}};const S=h.parentId;c(s(S).filter(R=>R.partId!==g)),h.parentId=y;const C=s(y).filter(R=>R.partId!==g);C.splice(gt(u.index,C.length),0,h),c(C);break}case"part.remove":{const g=u.partRef;if(!g||!o.has(g))return{ok:!1,conflict:{kind:"missing",ref:g}};const h=o.get(g).parentId;for(const y of Mn(o,g))o.delete(y);c(s(h));break}}const d={};for(const[u,g]of Object.entries(l)){const h=o.get(u);h&&(i.has(u)&&(h.rev=g+1),d[u]=h.rev)}return{ok:!0,partList:[...o.values()],revs:d}}function Mn(e,t){const r=[t],o=[t];for(;o.length;){const i=o.shift();for(const l of e.values())l.parentId===i&&(r.push(l.partId),o.push(l.partId))}return r}const Bn=["TEXT","TEXT_WITH_BUTTON","TEXT_RO_WITH_BUTTON","MESSAGE_TEXT","TEXTAREA","FULL_TEXTAREA","MESSAGE_TEXTAREA","INTEGER","BOOL","BUTTON","SIMPLE_BUTTON","WINDOW_OPEN_BUTTON","SELECT","ALIGN","ADD_STYLE","SIZE","ICON","TAGS","COMPONENT_REF","DATASOURCE","DATAMAPPING","COMMENT","CASE_MESSAGES"],Tt={TEXT:!0,TEXTAREA:!0,FULL_TEXTAREA:!0,MESSAGE_TEXT:!0,MESSAGE_TEXTAREA:!0,INTEGER:!0,BOOL:!0,TAGS:!0,SELECT:!0,ALIGN:!0,ADD_STYLE:!0,SIZE:!0,ICON:!0,TEXT_WITH_BUTTON:!1,TEXT_RO_WITH_BUTTON:!1,BUTTON:!1,SIMPLE_BUTTON:!1,WINDOW_OPEN_BUTTON:!1,COMPONENT_REF:!1,DATASOURCE:!1,DATAMAPPING:!1,COMMENT:!1,CASE_MESSAGES:!1},le={spacing:[{token:"xs",css:"margin-xs",label:"X-Small"},{token:"sm",css:"margin-sm",label:"Small"},{token:"default",css:"",label:"Default"},{token:"lg",css:"margin-lg",label:"Large"},{token:"xl",css:"margin-xl",label:"X-Large"}],gap:[{token:"xs",css:"spacing-xs",label:"X-Small"},{token:"sm",css:"spacing-sm",label:"Small"},{token:"default",css:"",label:"Default"},{token:"lg",css:"spacing-lg",label:"Large"},{token:"xl",css:"spacing-xl",label:"X-Large"}],color:[{token:"default",css:"",label:"Default"},{token:"themed",css:"colored",label:"Theme color"},{token:"red",css:"red",label:"Red"},{token:"gray",css:"gray",label:"Gray"},{token:"yellow",css:"yellow",label:"Yellow"},{token:"green",css:"green",label:"Green"}],textColor:[{token:"default",css:"",label:"Default"},{token:"black",css:"black-text",label:"Black"},{token:"blue",css:"blue-text",label:"Blue"},{token:"red",css:"red-text",label:"Red"},{token:"gray",css:"gray-text",label:"Gray"},{token:"yellow",css:"yellow-text",label:"Yellow"},{token:"green",css:"green-text",label:"Green"}],bgColor:[{token:"none",css:"",label:"None"},{token:"blue",css:"blue-bg",label:"Blue"},{token:"red",css:"red-bg",label:"Red"},{token:"yellow",css:"yellow-bg",label:"Yellow"},{token:"green",css:"green-bg",label:"Green"},{token:"purple",css:"purple-bg",label:"Purple"}],captionBg:[{token:"none",css:"",label:"None"},{token:"gray",css:"gray-bg-caption",label:"Gray"},{token:"blue",css:"blue-bg-caption",label:"Blue"},{token:"red",css:"red-bg-caption",label:"Red"},{token:"yellow",css:"yellow-bg-caption",label:"Yellow"},{token:"green",css:"green-bg-caption",label:"Green"},{token:"purple",css:"purple-bg-caption",label:"Purple"},{token:"white",css:"white-bg-caption",label:"White"}],captionDir:[{token:"default",css:"",label:"Default"},{token:"left",css:"left-caption",label:"Left"}],align:[{token:"left",css:"",label:"Left(default)"},{token:"center",css:"align-center",label:"Center"},{token:"right",css:"align-right",label:"Right"}],verticalAlign:[{token:"top",css:"",label:"Top(default)"},{token:"middle",css:"align-middle",label:"Middle"},{token:"bottom",css:"align-bottom",label:"Bottom"}],size:[{token:"tiny",css:"tiny",label:"Tiny"},{token:"small",css:"small",label:"Small"},{token:"default",css:"",label:"Default"},{token:"large",css:"large",label:"Large"},{token:"huge",css:"huge",label:"Huge"}],captionSize:[{token:"tiny",css:"tiny-caption",label:"Tiny"},{token:"small",css:"small-caption",label:"Small"},{token:"default",css:"",label:"Default"},{token:"large",css:"large-caption",label:"Large"},{token:"huge",css:"huge-caption",label:"Huge"}],iconAlign:[{token:"left",css:"",label:"Left(default)"},{token:"right",css:"icon-align-right",label:"Right"},{token:"top",css:"icon-align-top",label:"Top"}],heading:[{token:"h1",css:"h1",label:"Heading 1"},{token:"h2",css:"h2",label:"Heading 2"},{token:"h3",css:"h3",label:"Heading 3"},{token:"h4",css:"h4",label:"Heading 4"}],weight:[{token:"normal",css:"",label:"Normal(default)"},{token:"bold",css:"bold",label:"Bold"},{token:"bolder",css:"bolder",label:"Bolder"},{token:"lighter",css:"lighter",label:"Lighter"}],slotAlign:[{token:"default",css:"",label:"Default"},{token:"left",css:"LEFT",label:"Left"},{token:"center",css:"CENTER",label:"Center"},{token:"right",css:"RIGHT",label:"Right"},{token:"top",css:"TOP",label:"Top"},{token:"middle",css:"MIDDLE",label:"Middle"},{token:"bottom",css:"BOTTOM",label:"Bottom"}]},De={spacing:{source:"style",legacyDimId:"margin",label:"Margin Size"},gap:{source:"style",legacyDimId:"spacing",label:"Spacing Size"},color:{source:"style",legacyDimId:"color",label:"Color"},textColor:{source:"style",legacyDimId:"textColor",label:"Text Color"},bgColor:{source:"style",legacyDimId:"bgColor",label:"Background Color"},captionBg:{source:"style",legacyDimId:"bgCaption",label:"Caption Background"},captionDir:{source:"style",legacyDimId:"dirCaption",label:"Caption Direction"},align:{source:"style",legacyDimId:"alignment",label:"Alignment"},verticalAlign:{source:"style",legacyDimId:"vertical-alignment",label:"Vertical Alignment"},size:{source:"style",legacyDimId:"size",label:"Size"},captionSize:{source:"style",legacyDimId:"caption-size",label:"Caption"},iconAlign:{source:"style",legacyDimId:"icon-align",label:"Icon alignment"},heading:{source:"style",legacyDimId:"heading",label:"Heading"},weight:{source:"style",legacyDimId:"weight",label:"Weight"},slotAlign:{source:"layoutAttr",legacyDimId:"componentAlignment",label:"Align"}},_n=new Map(Object.keys(le).filter(e=>De[e].source==="style").flatMap(e=>le[e].filter(t=>t.css!=="").map(t=>[t.css,{dim:e,token:t.token}])));function mt(e,t){var r;return(r=le[e].find(o=>o.token===t))==null?void 0:r.css}function Et(e,t){var r;return(r=le[e].find(o=>o.css===t))==null?void 0:r.token}function ht(e){return _n.get(e)}function ve(e){return le[e].map(t=>t.token)}function T(e,t,r,o){const i={partType:e,partName:t,groups:r};return o&&o.length>0&&(i.styles=o),i}function n(e,t,r,o,i,l){const s={id:e,name:t,valueType:r,editor:o};return i!=null&&(s.param=i),l!=null&&(s.default=l),s}function f(e,...t){return{name:e,items:t}}function be(e,...t){return{name:e,layoutAttr:!0,items:t.map(r=>({...r,layoutAttr:!0}))}}function m(){return f("Component",n("addStyleNames","Style","string","ADD_STYLE"),n("id","ID","string","TEXT"),n("caption","Caption","text","MESSAGE_TEXT"),n("description","Description","text","MESSAGE_TEXTAREA"),n("skipSrcGen","Skip Src Gen.","bool","BOOL"),n("srcGenHint","Src Gen Hint","string","TEXTAREA"))}function E(){return f("Size",n("width","Width","string","TEXT"),n("height","Height","string","TEXT"))}function ke(){return f("Min/Max Size",n("minWidth","Min Width","string","TEXT"),n("minHeight","Min Height","string","TEXT"),n("maxWidth","Max Width","string","TEXT"),n("maxHeight","Max Height","string","TEXT"))}function we(){return be("Layout",n("componentAlignment","Align","string","ALIGN"),n("expandRatio","Expand Ratio","int","INTEGER"))}function M(){return f("Field",n("propertyId","Property ID","string","TEXT"),n("dataMapping","Data Mapping","dataMapping","DATAMAPPING"),n("viewMode","View Mode","bool","BOOL"),n("enabled","Enabled","bool","BOOL",void 0,v(!0)),n("validate","Validation","validator","TEXT_WITH_BUTTON"))}function Pn(){return f("Field",n("viewMode","View Mode","bool","BOOL"),n("enabled","Enabled","bool","BOOL",void 0,v(!0)),n("validate","Validation","validator","TEXT_WITH_BUTTON"))}function P(e,t){return{kind:"toggle",css:e,label:t}}const J=()=>({kind:"enum",dim:"spacing"}),Ce=()=>({kind:"enum",dim:"gap"}),yt=()=>({kind:"enum",dim:"color"}),Oe=()=>({kind:"enum",dim:"textColor"}),U=()=>({kind:"enum",dim:"bgColor"}),Rn=()=>({kind:"enum",dim:"captionBg"}),xn=()=>({kind:"enum",dim:"captionDir"}),Y=()=>({kind:"enum",dim:"align"}),Nn=()=>({kind:"enum",dim:"verticalAlign"}),G=()=>({kind:"enum",dim:"size"}),fe=()=>({kind:"enum",dim:"size",only:["small","default","large"]}),L=()=>({kind:"enum",dim:"captionSize"}),St=()=>({kind:"enum",dim:"iconAlign"}),bt=()=>({kind:"enum",dim:"heading"}),Fe=()=>({kind:"enum",dim:"weight"}),w=()=>P("borderless","Borderless"),kt=()=>P("borderless-top","Borderless Top"),Ct=()=>P("borderless-bottom","Borderless Bottom"),Ot=()=>P("borderless-left","Borderless Left"),Lt=()=>P("borderless-right","Borderless Right"),W=()=>P("bordered","Bordered"),It=()=>P("bordered-top","Bordered Top"),At=()=>P("bordered-bottom","Bordered Bottom"),Mt=()=>P("bordered-left","Bordered Left"),Bt=()=>P("bordered-right","Bordered Right"),Dn=()=>P("color-bordered-top","Color Bordered Top"),_t=()=>P("lineless","Lineless"),Ge=()=>P("horizontal","Horizontal"),Xe=()=>P("scrollable-full","Scrollable"),Pt=()=>P("white-prefix","White Prefix"),Rt=()=>P("white-suffix","White Suffix"),vn=()=>P("caption-borderless-bottom","Caption Borderless Bottom"),Z=()=>[It(),At(),Mt(),Bt()],Q=()=>[kt(),Ct(),Ot(),Lt()],A=()=>[Rn(),vn(),xn()],wn=[T("Button","Button",[f("Button",n("enabled","Enabled","bool","BOOL",void 0,v(!0)),n("disableOnClick","Disable on click","bool","BOOL"),n("icon","Icon","string","ICON"),n("tags","Tags","string","TAGS","unmask-personal-info,modify-personal-info,personal-info-excel-download,personal-info-excel-upload")),m(),E()],[yt(),G(),w(),St(),P("menu-button","Menu Button"),P("link","Link Button"),Oe()]),T("PopupButton","PopupButton",[f("PopupButton",n("icon","Icon","string","ICON"),n("showHidePopup","Show/Hide Popup","string","SIMPLE_BUTTON")),f("Popup",n("popupPosition","Position","string","SELECT","LEFT:Left; CENTER:Center; RIGHT:Right",V("CENTER")),n("popupTitle","Popup Title","text","MESSAGE_TEXT"),n("popupWidth","Popup Width","int","INTEGER"),n("popupHeight","Popup Height","int","INTEGER"),n("showPopupCloseBox","Show Close Box","bool","BOOL"),n("popupMargin","Popup Margin","bool","BOOL"),n("popupSpacing","Popup Spacing","bool","BOOL"),n("popupStyleNames","Popup Style","string","ADD_STYLE")),m(),E()],[yt(),G(),w(),St()]),T("Label","Label",[f("Label",n("value","Text","text","MESSAGE_TEXT"),n("contentMode","Content mode","string","SELECT","TEXT:Text; PREFORMATTED:Preformatted; HTML:Html")),m(),E()],[Y(),G(),bt(),Fe(),J(),L(),Oe(),U(),...A()]),T("Image","Image",[f("Image",n("source","Source","string","TEXT"),n("alternateText","Alternate text","string","TEXT")),m(),E()],[...A()]),T("Link","Link",[f("Link",n("resource","Resource","string","TEXT"),n("targetName","Target name","string","TEXT")),m(),E()],[Y(),fe(),L(),Oe(),...A()]),T("LinkTab","LinkTab",[f("LinkTab",n("fixed","Fixed","bool","BOOL",void 0,v(!0)),n("scrollContainer","Scroll Container","string","COMPONENT_REF","VerticalLayout,HorizontalLayout")),m(),E()]),T("ProgressBar","Progress Bar",[f("ProgressBar"),m(),E()],[L(),...A()]),T("Console","Console",[f("Console"),m(),E()],[L(),...A()]),T("NativeUpload","Native Upload",[f("NativeUpload",n("immediate","Immediate mode","bool","BOOL"),n("buttonCaption","Submit button","text","MESSAGE_TEXT"),n("cancelButtonCaption","Cancel button","text","MESSAGE_TEXT"),n("submitButtonStyleName","Submit button style","string","TEXT"),n("progressBar","ProgressBar","string","COMPONENT_REF","ProgressBar")),m(),E()],[L(),...A()]),T("AuditInfo","Audit Info",[f("AuditInfo"),m(),E()],[Y(),G(),bt(),Fe(),J(),L(),...A()]),T("AuditInfoButton","Audit Info Button",[f("AuditInfoButton",n("popupPosition","Position","string","SELECT","LEFT:Left; CENTER:Center; RIGHT:Right",V("CENTER"))),m(),E()])],Fn=[T("FlagCard","FlagCard",[f("FlagCard",n("titleDesc","Title Desc.","text","MESSAGE_TEXT"),n("html","Html","string","TEXTAREA"),n("linkCaption","Link Caption","text","MESSAGE_TEXT"),n("linkUrl","Link URL","string","TEXT"),n("linkTarget","Link Target","string","TEXT")),m(),E()]),T("Chart","Chart",[f("Chart",n("chartType","Chart Type","string","SELECT","pie:pie; doughnut:doughnut; bar:bar; horizontalBar:horizontalBar; stackedBar:stackedBar; line:line;"),n("xAxesTitle","X-Axis Title","text","MESSAGE_TEXT"),n("leftYAxesTitle","Left Y-Axis Title","text","MESSAGE_TEXT"),n("rightYAxesTitle","Right Y-Axis Title","text","MESSAGE_TEXT")),m(),E()],[W(),...Z(),L(),...A()])],xt="ALL:All;IMAGE:Image;",Gn=[T("MultiFileUpload","File Upload",[f("MultiFileUpload",n("maxSize","Max size","int","INTEGER"),n("totalMaxSize","Total Max size","int","INTEGER"),n("fileType","File type","string","SELECT",xt),n("fileExtString","File exts","string","TEXT"),n("thumbnailWidth","Thumbnail Width","string","TEXT"),n("thumbnailHeight","Thumbnail Height","string","TEXT"),n("showDropMessage","Show Drop Msg.","bool","BOOL",void 0,v(!0)),n("subFolder","Sub folder","string","TEXT"),n("enableReorder","Enable reorder","bool","BOOL",void 0,v(!0))),M(),m(),E()],[L(),...A()]),T("SingleFileUpload","Single File Upload",[f("SingleFileUpload",n("maxSize","Max size","int","INTEGER"),n("fileType","File type","string","SELECT",xt),n("fileExtString","File exts","string","TEXT"),n("thumbnailWidth","Thumbnail Width","string","TEXT"),n("thumbnailHeight","Thumbnail Height","string","TEXT"),n("showDropMessage","Show Drop Msg.","bool","BOOL",void 0,v(!0)),n("subFolder","Sub folder","string","TEXT")),M(),m(),E()],[G(),L(),...A()]),T("SingleImageUpload","Single Image Upload",[f("SingleImageUpload",n("maxSize","Max size","int","INTEGER"),n("fileExtString","File exts","string","TEXT"),n("subFolder","Sub folder","string","TEXT")),M(),m(),E()],[L(),...A()]),T("NameField","Name Field",[f("NameField"),M(),m(),E()],[L(),...A()]),T("AddressField","Address Field",[f("AddressField",n("showSecondaryAddress","Secondary Addr.","bool","BOOL")),M(),m(),E()],[L(),...A()]),T("PageBuilder","Page Builder",[f("PageBuilder",n("subFolder","Image sub folder","string","TEXT")),M(),m(),E()],[w()]),T("ContentEditor","Content Editor",[f("ContentEditor"),M(),m(),E()],[w()])],Xn=[T("PageRefreshButton","PageRefreshButton",[f("PageRefreshButton"),m(),E()]),T("MultiLangExpandButton","MultiLangExpandButton",[f("MultiLangExpandButton"),m(),E()]),T("Fragment","Fragment",[f("Fragment",n("fragmentName","UI ID","string","TEXT_WITH_BUTTON"),n("openFragment","Open Fragment","string","WINDOW_OPEN_BUTTON"),n("id","ID","string","TEXT"),n("caption","Caption","text","MESSAGE_TEXT")),E()]),T("CommentList","Comment List",[f("CommentList",n("pageLength","Page Length","int","INTEGER"),n("viewMode","View Mode","bool","BOOL"),n("writerPropertyId","Writer Property ID","string","TEXT"),n("writerDataMapping","Writer Data Mapping","dataMapping","DATAMAPPING"),n("postDatePropertyId","Date Property ID","string","TEXT"),n("postDateDataMapping","Date Data Mapping","dataMapping","DATAMAPPING"),n("commentPropertyId","Cmt. Property ID","string","TEXT"),n("commentDataMapping","Cmt. Data Mapping","dataMapping","DATAMAPPING")),m(),E()]),T("SourceCodeEditor","SourceCode Editor",[f("SourceCodeEditor",n("editorMode","Editor Lang","string","SELECT","HTML:HTML; XML:XML; YAML:YAML; CSS:CSS; SCSS:SCSS; JSON:JSON; JAVA:Java; JAVASCRIPT:Javascript; JSP:JSP; PLAIN_TEXT:Plain Text; SQL:SQL; MARKDOWN:MARKDOWN; ASCIIDOC:AsciiDoc;"),n("showGutter","Show Gutter","bool","BOOL",void 0,v(!0)),n("highlightActiveLine","Highlight Line","bool","BOOL",void 0,v(!0))),M(),m(),E()],[W(),...Z(),L(),...A()]),T("MarkdownViewer","Markdown Viewer",[M(),m(),E()],[W(),...Z(),L(),...A()]),T("History","History",[m(),E()],[W(),...Z(),L(),...A()])],Un=[T("TextFilter","Text Filter",[f("TextFilter",n("filterType","Filter Type","string","SELECT",":; LIKE:Like; EQUAL:Equal;"))]),T("NumberFilter","Number Filter",[f("NumberFilter",n("percentage","Percentage","bool","BOOL"))]),T("SelectFilter","Select Filter",[]),T("MultiSelectFilter","Multi Select Filter",[]),T("PopupSelectFilter","Popup Select Filter",[f("PopupSelect",n("buttonCaption","Button caption","text","MESSAGE_TEXT"),n("captionFieldReadOnly","Text ReadOnly","bool","BOOL",void 0,v(!0)),n("hideButton","Hide Button","bool","BOOL"))]),T("CategorySelectFilter","Category Select Filter",[f("CategorySelect",n("filterIncludesChildren","Include Children","bool","BOOL"))]),T("YesNoSelectFilter","YesNo Select Filter",[f("YesNoSelect",n("yesCaption","Yes caption","text","MESSAGE_TEXT"),n("noCaption","No caption","text","MESSAGE_TEXT"))])],Nt=":; STRING:String; LONG:Long; INTEGER:Integer; EMBEDDABLE_NAME:EmbeddableName; EMBEDDABLE_ADDRESS:EmbeddableAddress; EMBEDDABLE_TEL:EmbeddableTel",$n=[T("Grid","Grid",[f("Grid",n("gridDef","Grid Definition","string","BUTTON"),n("entityMapping","Entity Mapping","string","TEXT_WITH_BUTTON"),n("useCheckbox","Checkbox","bool","BOOL"),n("useSerialNo","Serial No","bool","BOOL"),n("useRowEdit","Row Editable","bool","BOOL"),n("alwaysEditing","Always Editing","bool","BOOL"),n("multiSelect","Multi Select","bool","BOOL",void 0,v(!0)),n("enableReorder","Enable reorder","bool","BOOL"),n("fixedColumnCount","Fixed Col. Count","int","INTEGER"),n("maxHeight","Max Height","string","TEXT"),n("selectOnClick","Select On Click","bool","BOOL"),n("defaultColumnWidth","Default Col. Width","string","TEXT"),n("ignoreModelChangeEvent","Ignore ModelChange","bool","BOOL"),n("usePageable","Use Pageable","bool","BOOL")),f("Pivot Grid",n("pivotMode","Pivot Mode","bool","BOOL"),n("fixedRowCount","Fixed Row Count","int","INTEGER")),f("Field",n("propertyId","Property ID","string","TEXT"),n("dataMapping","Data Mapping","dataMapping","DATAMAPPING"),n("validate","Validation","validator","TEXT_WITH_BUTTON")),m(),E()],[L(),...A(),w(),...Q()]),T("ColumnDef","Grid Column",[f("Grid Column",n("actualPropertyId","Property ID","string","TEXT"),n("dataMapping","Data Mapping","dataMapping","DATAMAPPING"),n("caption","Caption","text","MESSAGE_TEXT"),n("width","Width","string","TEXT"),n("expand","Expand","bool","BOOL"),n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("yesCaption","Yes caption","text","MESSAGE_TEXT"),n("noCaption","No caption","text","MESSAGE_TEXT"),n("nullCaption","Null caption","text","MESSAGE_TEXT"),n("cellType","Cell Type","string","SELECT","TEXT:Text; DATE:Date; NUMBER:Number; PERCENTAGE:Percentage; CATEGORY:Category; HTML:HTML; TEXT_MULTILINE:Multiline Text;"),n("numberFormat","Number format","string","SELECT",":; #,###:1,234 (#,###); #:1234 (#); #,##0.#####:1,234.56789 (#,##0.#####); #,##0.00:1,234.00 (#,##0.00); #,##0.##%:1,234.1% (#,##0.##%); #,##0.00%:1,234.10% (#,##0.00%); currency:Currency; _CUSTOM:Custom"),n("dateFormat","Date format","string","SELECT",":; DAY:Day; MONTH:Month; YEAR:Year; HOUR:Hour; MINUTE:Minute; SECOND:Second; _CUSTOM:Custom"),n("merged","Merge","bool","BOOL")),f("Sort",n("sortable","Sort","bool","BOOL"),n("sortPropertyId","Sort Property ID","string","TEXT")),f("Cell Click",n("clickable","Clickable","bool","BOOL"),n("clickUrl","Click URL","string","TEXT"),n("clickTarget","Click Target","string","TEXT")),f("Filter/Lookup",n("filter","Filter","string","SELECT",":; TextFilter:TextFilter; NumberFilter:NumberFilter; Select:Select; MultiSelect:MultiSelect; PopupSelect:PopupSelect; CategorySelect:CategorySelect; YesNoSelect:YesNoSelect"),n("filterPropertyId","Filter Property ID","string","TEXT"),n("filterValueType","Filter Value Type","string","SELECT",Nt),n("lookupDate","Lookup (Date)","bool","BOOL"),n("lookupInput","Lookup (Input)","bool","BOOL"),n("lookupPropertyId","Lookup Property ID","string","TEXT"),n("lookupValueType","Lookup Value Type","string","SELECT",Nt),n("supportsInFilter","Supports In Filter","bool","BOOL")),f("Style",n("styleName","Cell style","string","TEXT"),n("css","Cell CSS","string","TEXT"))]),T("GridCellPanel","Grid Cell Panel",[]),T("GridControl","Grid Control",[f("Grid Control",n("grid","Grid ID","string","COMPONENT_REF","Grid"),n("useTotalCount","Total Count","bool","BOOL"),n("hideSelectedCount","Hide Selected Count","bool","BOOL"),n("useRefreshButton","Refresh","bool","BOOL"),n("useClearFilterButton","Clear Filter","bool","BOOL"),n("useExcelDownloadButton","Excel Download","bool","BOOL"),n("useAddRowButton","Add Row","bool","BOOL"),n("addRowAtBottom","Add to Bottom","bool","BOOL"),n("useRemoveRowButton","Remove Row","bool","BOOL"),n("useFilterLayerButton","Filter Layer","bool","BOOL",void 0,v(!0)),n("useColumnSettingButton","Column Setting","bool","BOOL"),n("excelDownMaxCount","Excel Max Count","int","INTEGER")),m()]),T("GridLookup","Grid Lookup",[f("Grid Lookup",n("grid","Grid ID","string","COMPONENT_REF","Grid"),n("useLookupSettingButton","Use Setting","bool","BOOL"),n("inputFilterType","Input Filter Type","string","SELECT",":; LIKE:Like; EQUAL:Equal;"),n("dateResolution","DateResolution","string","SELECT",":; DAY:Day;HOUR:Hour;MINUTE:Minute;SECOND:Second;")),m(),E()])],ge=":Auto;ENUM:Enum Class;STRING:String",Ue=":; DAY:Day;HOUR:Hour;MINUTE:Minute;SECOND:Second",Hn=[T("TextField","Text Field",[f("TextField",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("textType","Text Type","string","SELECT","TEXT:Text; EMAIL:Email; URL:URL; PASSWORD:Password",V("TEXT")),n("maxLength","Max Length","int","INTEGER"),n("clickable","Clickable","bool","BOOL"),n("clickUrl","Click URL","string","TEXT"),n("clickTarget","Click Target","string","TEXT"),n("prefix","Prefix","text","MESSAGE_TEXT"),n("suffix","Suffix","text","MESSAGE_TEXT"),n("autoComplete","AutoComplete","string","TEXT")),M(),m(),E()],[Y(),G(),L(),w(),U(),Pt(),Rt(),...A()]),T("TextArea","Text Area",[f("TextArea",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("autoResize","Auto resize","bool","BOOL",void 0,v(!0))),M(),m(),E()],[Y(),G(),L(),w(),...A()]),T("StyledTextField","Styled Text Field",[f("StyledTextField"),M(),m(),E()],[...A()]),T("RichTextArea","Rich Text Area",[f("RichTextArea",n("maxSize","Image max size","int","INTEGER"),n("subFolder","Image sub folder","string","TEXT")),M(),m(),E()],[L(),...A()]),T("TelField","Tel Field",[f("TelField",n("telNotation","Notation","string","SELECT",":Default; TYPE1:Type 1; TYPE3:Type 3; TYPE1C:Type 1 + CountryCode; TYPE3C:Type3 + CountryCode"),n("placeholder","Placeholder","text","MESSAGE_TEXT")),M(),m(),E()],[Y(),G(),L(),...A(),w()]),T("NumberField","Number Field",[f("NumberField",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("format","Format","string","SELECT",":; #,###:1,234 (#,###); #:1234 (#); #,##0.#####:1,234.56789 (#,##0.#####); #,##0.00:1,234.00 (#,##0.00); _CUSTOM:Custom"),n("allowNull","Allow null","bool","BOOL"),n("allowNegative","Allow negative","bool","BOOL"),n("clickable","Clickable","bool","BOOL"),n("clickUrl","Click URL","string","TEXT"),n("clickTarget","Click Target","string","TEXT"),n("percentage","Percentage","bool","BOOL"),n("prefix","Prefix","text","MESSAGE_TEXT"),n("suffix","Suffix","text","MESSAGE_TEXT")),M(),m(),E()],[Y(),G(),U(),L(),...A(),w(),Pt(),Rt()]),T("CurrencyField","Currency Field",[f("CurrencyField",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("allowNull","Allow null","bool","BOOL"),n("hidePrefix","Hide Prefix","bool","BOOL"),n("hideSuffix","Hide Suffix","bool","BOOL"),n("clickable","Clickable","bool","BOOL"),n("clickUrl","Click URL","string","TEXT"),n("clickTarget","Click Target","string","TEXT")),M(),m(),E()],[Y(),G(),U(),L(),...A(),w()]),T("DateField","Date Field",[f("DateField",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("dateFormat","Format","string","TEXT"),n("resolution","Resolution","string","SELECT",":; DAY:Day;HOUR:Hour;MINUTE:Minute;SECOND:Second;"),n("displayResolution","Display Resolution","string","SELECT",Ue),n("truncateType","Truncate Type","string","SELECT",":; BEGIN:BEGIN; END:END;"),n("beginYearDelta","Begin Year Delta","int","INTEGER"),n("endYearDelta","End Year Delta","int","INTEGER"),n("initialHour","Initial Hour","int","INTEGER"),n("initialMinute","Initial Minute","int","INTEGER"),n("stepOfMinutes","Step of Minutes","int","INTEGER")),M(),m(),E()],[L(),...A()]),T("TimeField","Time Field",[f("TimeField",n("resolution","Resolution","string","SELECT",":; HOUR:Hour;MINUTE:Minute;SECOND:Second")),M(),m(),E()],[L(),...A()]),T("DateRange","Date Range",[f("DateRange",n("fromPlaceholder","From Placeholder","text","MESSAGE_TEXT"),n("toPlaceholder","To Placeholder","text","MESSAGE_TEXT"),n("checkDateOrder","Check Order","bool","BOOL"),n("checkDateOrderMessage","Check Msg","text","MESSAGE_TEXT"),n("resolution","Resolution","string","SELECT",Ue),n("displayResolution","Display Resolution","string","SELECT",Ue),n("selectResolution","Select Resolution","string","SELECT",":; WEEK:Week"),n("beginYearDelta","Begin Year Delta","int","INTEGER"),n("endYearDelta","End Year Delta","int","INTEGER"),n("fromPropertyId","From Property ID","string","TEXT"),n("fromDataMapping","From Data Mapping","dataMapping","DATAMAPPING"),n("toPropertyId","To Property ID","string","TEXT"),n("toDataMapping","To Data Mapping","dataMapping","DATAMAPPING"),n("stepOfMinutes","Step of Minutes","int","INTEGER"),n("dateFieldWidth","DateField Width","string","TEXT")),Pn(),m(),E()],[L(),...A()]),T("CheckBox","CheckBox",[f("CheckBox",n("checked","Checked","bool","BOOL")),M(),m(),E()],[fe(),L()]),T("RadioButton","RadioButton",[f("RadioButton"),M(),m()],[L()]),T("RadioGroup","Radio Group",[f("RadioGroup",n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("codeValueType","Code Value Type","string","SELECT",ge)),M(),m(),E()],[fe(),Ge(),L(),...A()]),T("CheckBoxGroup","CheckBox Group",[f("CheckBoxGroup",n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("codeValueType","Code Value Type","string","SELECT",ge),n("multiSelect","MultiSelect","bool","BOOL",void 0,v(!0))),M(),m(),E()],[fe(),Ge(),L(),...A()]),T("YesNoGroup","YesNo Group",[f("YesNoGroup",n("yesCaption","Yes caption","text","MESSAGE_TEXT"),n("noCaption","No caption","text","MESSAGE_TEXT")),M(),m(),E()],[fe(),Ge(),L(),...A()]),T("Select","Select",[f("Select",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("codeValueType","Code Value Type","string","SELECT",ge),n("nullSelectionAllowed","Allow null","bool","BOOL"),n("nullCaption","Null caption","text","MESSAGE_TEXT"),n("ignoreCase","Ignore case","bool","BOOL")),M(),m(),E()],[G(),L(),...A(),w()]),T("MultiSelect","Multi Select",[f("MultiSelect",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("codeValueType","Code Value Type","string","SELECT",ge),n("ignoreCase","Ignore case","bool","BOOL")),M(),m(),E()],[G(),L(),...A(),w()]),T("CategorySelect","Category Select",[f("CategorySelect",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("dataSource","Data source","dataSource","TEXT_WITH_BUTTON"),n("codeValueType","Code Value Type","string","SELECT",ge),n("nullSelectionAllowed","Allow null","bool","BOOL"),n("nullCaption","Null caption","text","MESSAGE_TEXT"),n("ignoreCase","Ignore case","bool","BOOL")),M(),m(),E()],[G(),L(),...A(),w()]),T("PopupSelect","Popup Select",[f("PopupSelect",n("buttonCaption","Button caption","text","MESSAGE_TEXT"),n("captionFieldReadOnly","Text ReadOnly","bool","BOOL",void 0,v(!0)),n("captionFieldViewMode","Text ViewMode","bool","BOOL"),n("hideCaptionField","Hide TextField","bool","BOOL"),n("hideButton","Hide Button","bool","BOOL")),M(),m(),E()],[L(),...A()]),T("YesNoSelect","YesNo Select",[f("YesNoSelect",n("placeholder","Placeholder","text","MESSAGE_TEXT"),n("yesCaption","Yes caption","text","MESSAGE_TEXT"),n("noCaption","No caption","text","MESSAGE_TEXT"),n("nullSelectionAllowed","Allow null","bool","BOOL"),n("nullCaption","Null caption","text","MESSAGE_TEXT"),n("ignoreCase","Ignore case","bool","BOOL")),M(),m(),E()],[G(),L(),...A(),w()]),T("ColorField","Color Field",[f("ColorField"),M(),m(),E()],[G(),L(),w(),U(),...A()])],Vn=[T("VerticalLayout","Vertical Layout",[f("Vertical Layout",n("margin","Margin","bool","BOOL"),n("spacing","Spacing","bool","BOOL"),n("enableChildDragAndDrop","Enable DnD","bool","BOOL"),n("dragAndDropPositionMarkSize","DnD mark size","int","INTEGER")),m(),E(),ke(),we()],[J(),Ce(),Xe(),W(),...Z(),...Q(),L(),U(),P("shadow","Shadow")]),T("HorizontalLayout","Horizontal Layout",[f("Horizontal Layout",n("margin","Margin","bool","BOOL"),n("spacing","Spacing","bool","BOOL"),n("enableChildDragAndDrop","Enable DnD","bool","BOOL"),n("dragAndDropPositionMarkSize","DnD mark size","int","INTEGER")),m(),E(),ke(),we()],[J(),Ce(),Xe(),W(),...Z(),...Q(),L(),U(),P("shadow","Shadow")]),T("FormLayout","Form Layout",[f("Form Layout",n("columnCount","Column count","int","INTEGER")),m(),E(),ke(),be("Layout",n("colspan","Column Span","int","INTEGER"),n("takeOneRow","Merge Row","bool","BOOL"),n("hideCaptionCell","Hide Caption","bool","BOOL"),n("formCaption","Form Caption","text","MESSAGE_TEXT"),n("delegateDescription","Delegate Desc.","bool","BOOL"))],[_t(),w(),...Q(),P("exclude-adjust-caption-width","Exclude Adjust Caption Width"),P("gray-caption","Gray Caption"),P("fixed-column-height","Fixed Column Height"),P("shadow","Shadow"),U(),G()]),T("CardLayout","Card Layout",[f("Card Layout",n("margin","Margin","bool","BOOL"),n("spacing","Spacing","bool","BOOL"),n("collapsible","Collapsible","bool","BOOL",void 0,v(!0)),n("collapsed","Collapsed","bool","BOOL")),m(),E(),ke(),we()],[J(),Ce(),Dn(),U(),P("dashboard-card","Dashboard Card")]),T("ActionLayout","Action Layout",[f("Action Layout",n("margin","Margin","bool","BOOL")),m(),E(),be("Layout",n("componentAlignment","Align","string","ALIGN"))],[P("top-action","Top Action"),J(),W(),It(),At(),Mt(),Bt(),U()]),T("ActionLayoutArea","Action Layout Area",[be("Layout",n("componentAlignment","Align","string","ALIGN"))]),T("TableLayout","Table Layout",[f("Table Layout",n("rowCount","Row count","int","INTEGER"),n("colCount","Column count","int","INTEGER")),m(),E()],[P("grid","Grid style"),w(),kt(),Ct(),Ot(),Lt(),L(),U(),P("shadow","Shadow")]),T("TableLayoutCell","Table Layout Cell",[f("Table Layout Cell",n("cellId","Cell ID","string","TEXT"),n("contentMode","Content mode","string","SELECT","TEXT:Text; HTML:Html"),n("caption","Text","text","MESSAGE_TEXTAREA"),n("addStyleNames","Style","string","ADD_STYLE"),n("mergeSameValueVertical","Merge Vertical","bool","BOOL"),n("clickable","Clickable","bool","BOOL")),E()],[P("header","Header"),Y(),Nn(),Oe(),Fe(),w(),...Q(),U()]),T("FlowLayout","Flow Layout",[f("Flow Layout",n("margin","Margin","bool","BOOL"),n("spacing","Spacing","bool","BOOL")),m(),E()],[W(),...Z(),U(),P("shadow","Shadow")]),T("ExpansionLayout","Expansion Layout",[f("Expansion Layout",n("collapsed","Collapsed","bool","BOOL"),n("bodyVisible","Body Visible","bool","BOOL")),m(),E()],[w(),...Q(),U(),P("shadow","Shadow")]),T("InternalLayoutArea","",[])],Yn=[T("ListField","List Field",[f("List Field",n("listFieldDef","ListField Definition","string","BUTTON"),n("margin","Margin","bool","BOOL"),n("spacing","Spacing","bool","BOOL"),n("useCheckbox","Checkbox","bool","BOOL",void 0,v(!0)),n("multiSelect","Multi Select","bool","BOOL",void 0,v(!0)),n("showEmptyMsg","Show Empty Msg","bool","BOOL",void 0,v(!0))),f("Field",n("propertyId","Property ID","string","TEXT"),n("dataMapping","Data Mapping","dataMapping","DATAMAPPING"),n("validate","Validation","validator","TEXT_WITH_BUTTON")),m(),E()],[J(),Ce(),L(),...A(),w(),...Q(),_t()]),T("ListControl","List Control",[f("List Control",n("listField","ListField ID","string","COMPONENT_REF","ListField"),n("useAddRowButton","Add Row","bool","BOOL"),n("useRemoveRowButton","Remove Row","bool","BOOL"),n("useExpandAllButton","Expand All","bool","BOOL"),n("useTotalCount","Total Count","bool","BOOL"),n("useSelectedCount","Selected Count","bool","BOOL")),m()])],ee=()=>[n("langPropertyId","Lang property","string","TEXT"),n("langDataMapping","Lang Data Mapping","dataMapping","DATAMAPPING"),n("textPropertyId","Text property","string","TEXT"),n("textDataMapping","Text Data Mapping","dataMapping","DATAMAPPING")],te=(e="Item Class")=>[n("itemClass",e,"string","TEXT_WITH_BUTTON"),n("expandFields","Expand","bool","BOOL"),n("popupMode","Popup Mode","bool","BOOL")],Wn=[T("MultiLangTextField","Multi Lang TextField",[f("MultiLangTextField",...ee(),n("placeholder","Placeholder","text","MESSAGE_TEXT"),...te()),M(),m(),E()]),T("MultiLangTextArea","Multi Lang TextArea",[f("MultiLangTextArea",...ee(),n("placeholder","Placeholder","text","MESSAGE_TEXT"),...te()),M(),m(),E()]),T("MultiLangStyledTextField","Multi Lang StyledTextField",[f("MultiLangStyledTextField",...ee(),...te()),M(),m(),E()]),T("MultiLangRichTextArea","Multi Lang RichTextArea",[f("MultiLangRichTextArea",...ee(),...te()),M(),m(),E()]),T("MultiLangPageBuilder","Multi Lang PageBuilder",[f("MultiLangPageBuilder",n("subFolder","Image sub folder","string","TEXT"),...ee(),...te()),M(),m(),E()]),T("MultiLangContentEditor","Multi Lang ContentEditor",[f("MultiLangContentEditor",...ee(),...te()),M(),m(),E()]),T("MultiLangFileUpload","Multi Lang FileUpload",[f("MultiLangFileUpload",...ee(),...te("Item type")),f("FileUpload",n("maxSize","Max size","int","INTEGER"),n("fileType","File type","string","SELECT","ALL:All;IMAGE:Image;"),n("fileExtString","File exts","string","TEXT"),n("thumbnailWidth","Thumbnail Width","string","TEXT"),n("thumbnailHeight","Thumbnail Height","string","TEXT")),M(),m(),E()])],zn=[T("Tree","Tree",[f("Tree",n("nullSelectionAllowed","Allow null","bool","BOOL",void 0,v(!0))),m(),E()],[W(),Xe(),L(),...A()]),T("TreeControl","TreeControl",[f("TreeControl",n("tree","Tree ID","string","COMPONENT_REF","Tree"),n("useAddButton","Add","bool","BOOL"),n("useRemoveButton","Remove","bool","BOOL"),n("useExpandButton","Expand","bool","BOOL"),n("useMoveUpButton","Move Up","bool","BOOL"),n("useMoveDownButton","Move Down","bool","BOOL"),n("useSaveOrderButton","Save order","bool","BOOL")),m(),E()]),T("TabSheet","Tab Sheet",[m(),E()]),T("TabSheetPanel","Tab Sheet Panel",[])],Dt=[...Vn,...wn,...Hn,...Gn,...Wn,...$n,...zn,...Un,...Yn,...Fn,...Xn],jn={VerticalLayout:{role:"open"},HorizontalLayout:{role:"open"},CardLayout:{role:"open"},FormLayout:{role:"open"},FlowLayout:{role:"open"},ActionLayoutArea:{role:"open"},InternalLayoutArea:{role:"open",arity:{max:1}},TableLayoutCell:{role:"open",arity:{max:1}},TabSheetPanel:{role:"open",arity:{max:1}},GridCellPanel:{role:"open",arity:{max:1}},ListField:{role:"open",arity:{max:1}},ActionLayout:{role:"fixed",fixedChildren:["ActionLayoutArea"],arity:{min:2,max:2}},ExpansionLayout:{role:"fixed",fixedChildren:["InternalLayoutArea"],arity:{min:2,max:2}},TableLayout:{role:"fixed",fixedChildren:["TableLayoutCell"]},PopupButton:{role:"fixed",fixedChildren:["VerticalLayout"],arity:{min:1,max:1}},AuditInfoButton:{role:"fixed",fixedChildren:["VerticalLayout"],arity:{min:1,max:1}},Grid:{role:"fixed",fixedChildren:["ColumnDef"]},TabSheet:{role:"fixed",fixedChildren:["TabSheetPanel"]},Button:{role:"leaf"},Label:{role:"leaf"},Image:{role:"leaf"},Link:{role:"leaf"},LinkTab:{role:"leaf"},ProgressBar:{role:"leaf"},Console:{role:"leaf"},NativeUpload:{role:"leaf"},AuditInfo:{role:"leaf"},TextField:{role:"leaf"},TextArea:{role:"leaf"},StyledTextField:{role:"leaf"},RichTextArea:{role:"leaf"},TelField:{role:"leaf"},NumberField:{role:"leaf"},CurrencyField:{role:"leaf"},DateField:{role:"leaf"},TimeField:{role:"leaf"},DateRange:{role:"leaf"},CheckBox:{role:"leaf"},RadioButton:{role:"leaf"},RadioGroup:{role:"leaf"},CheckBoxGroup:{role:"leaf"},YesNoGroup:{role:"leaf"},Select:{role:"leaf"},MultiSelect:{role:"leaf"},CategorySelect:{role:"leaf"},PopupSelect:{role:"leaf"},YesNoSelect:{role:"leaf"},ColorField:{role:"leaf"},MultiFileUpload:{role:"leaf"},SingleFileUpload:{role:"leaf"},SingleImageUpload:{role:"leaf"},NameField:{role:"leaf"},AddressField:{role:"leaf"},PageBuilder:{role:"leaf"},ContentEditor:{role:"leaf"},MultiLangTextField:{role:"leaf"},MultiLangTextArea:{role:"leaf"},MultiLangStyledTextField:{role:"leaf"},MultiLangRichTextArea:{role:"leaf"},MultiLangPageBuilder:{role:"leaf"},MultiLangContentEditor:{role:"leaf"},MultiLangFileUpload:{role:"leaf"},ColumnDef:{role:"leaf"},GridControl:{role:"leaf"},GridLookup:{role:"leaf"},Tree:{role:"leaf"},TreeControl:{role:"leaf"},TextFilter:{role:"leaf"},NumberFilter:{role:"leaf"},SelectFilter:{role:"leaf"},MultiSelectFilter:{role:"leaf"},PopupSelectFilter:{role:"leaf"},CategorySelectFilter:{role:"leaf"},YesNoSelectFilter:{role:"leaf"},ListControl:{role:"leaf"},FlagCard:{role:"leaf"},Chart:{role:"leaf"},PageRefreshButton:{role:"leaf"},MultiLangExpandButton:{role:"leaf"},Fragment:{role:"leaf"},CommentList:{role:"leaf"},SourceCodeEditor:{role:"leaf"},MarkdownViewer:{role:"leaf"},History:{role:"leaf"}},vt={Label:"value"};function wt(e){const t=e.category??(Ee(e.partType)?Me[e.partType]:void 0);let r=e.captionProp;r==null&&(vt[e.partType]!=null?r=vt[e.partType]:e.groups.some(l=>l.items.some(s=>s.id==="caption"))&&(r="caption"));const o=e.containment??(Ee(e.partType)?jn[e.partType]:void 0),i={...e,groups:e.groups};return t!=null&&(i.category=t),r!=null&&(i.captionProp=r),o!=null&&(i.containment=o),i}function Kn(e,t){var r,o,i,l;if(e==null)return"warn";switch(e.role){case"leaf":return"deny";case"fixed":return(r=e.fixedChildren)!=null&&r.includes(t)?"allow":"deny";case"open":{if((o=e.deny)!=null&&o.includes(t))return"deny";if(!(e.allow!=null&&e.allow.length>0||e.allowCategories!=null&&e.allowCategories.length>0)||(i=e.allow)!=null&&i.includes(t))return"allow";const c=Ee(t)?Me[t]:void 0;return c!=null&&((l=e.allowCategories)!=null&&l.includes(c))?"allow":"deny"}}}function Ft(e){const t=new Map;for(const o of e)t.set(o.partType,wt(o));const r=[...t.keys()];return{get:o=>t.get(o),all:()=>r.map(o=>t.get(o)),propertyItem:(o,i)=>{const l=t.get(o);if(l)for(const s of l.groups){const c=s.items.find(d=>d.id===i);if(c)return c}},canContain:(o,i)=>{var l;return Kn((l=t.get(o))==null?void 0:l.containment,i)}}}function Gt(e=Dt){return Ft(e)}function qn(e,t={}){const r=new Map;for(const o of e.all())r.set(o.partType,o);for(const o of[...t.add??[],...t.override??[]])r.set(o.partType,wt(o));for(const o of t.remove??[])r.delete(o);return Ft([...r.values()])}const Jn={TEXT:"text",TEXTAREA:"text",FULL_TEXTAREA:"text",ICON:"text",MESSAGE_TEXT:"multilang",MESSAGE_TEXTAREA:"multilang",INTEGER:"int",BOOL:"bool",SELECT:"enum",SIZE:"enum",TAGS:"tags"};function Zn(e){return e?e.split(";").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{const r=t.indexOf(":");return r<0?{value:t,label:t}:{value:t.slice(0,r).trim(),label:t.slice(r+1).trim()}}):[]}function Qn(e){return e?e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>({value:t,label:t})):[]}function eo(e){var t;return((t=e.agent)==null?void 0:t.expose)??Tt[e.editor]}function to(e){var o,i,l;const t=Jn[e.editor]??"text",r={id:e.id,valueType:e.valueType,kind:t};if((o=e.agent)!=null&&o.description&&(r.description=e.agent.description),t==="enum"){const s=((l=(i=e.agent)==null?void 0:i.enum)==null?void 0:l.map(c=>({value:c,label:c})))??Zn(e.param);s.length>0&&(r.options=s)}else if(t==="tags"){const s=Qn(e.param);s.length>0&&(r.options=s)}return r}function no(e){const t=[],r=[];for(const o of e??[])if(o.kind==="toggle")r.push({css:o.css,label:o.label});else{const i=ve(o.dim),l=o.only?i.filter(s=>o.only.includes(s)):i;t.push({dim:o.dim,tokens:l})}return{dims:t,toggles:r}}function oo(e){const t=[];let r=!1;for(const s of e.groups)for(const c of s.items)if(c.editor!=="ADD_STYLE"){if(c.editor==="ALIGN"){r=!0;continue}eo(c)&&t.push(to(c))}const{dims:o,toggles:i}=no(e.styles),l={partType:e.partType,attrs:t,styleDims:o,styleToggles:i};return e.category!=null&&(l.category=e.category),e.captionProp!=null&&(l.captionProp=e.captionProp),r&&(l.slotAlign=ve("slotAlign")),l}function Xt(e){const t=new Map,r=[];for(const o of e.all())t.set(o.partType,oo(o)),r.push(o.partType);return{get:o=>t.get(o),all:()=>r.map(o=>t.get(o))}}const Ut=["part.add","part.update","part.remove"],$e=4,ro={type:"object",description:"요소 지정 핸들. id(파트 UUID) 우선, path(예: FormLayout[0]/TextField[2]) 보조, caption(사람 라벨) 최후. 모호하면 서버가 후보를 돌려주니 describeScreen으로 먼저 읽어 핸들을 확정하라.",properties:{ref:{type:"string",description:"매칭할 id/경로/캡션 문자열."},by:{type:"string",enum:["id","path","caption"],description:"매칭 축 고정(미지정 시 id→path→caption 순)."}},required:["ref"],additionalProperties:!1},ao={type:"object",description:'locale→text 맵(예: {ko:"주문", en:"Order"}).',properties:{ko:{type:"string"},en:{type:"string"},ja:{type:"string"},zh:{type:"string"}},additionalProperties:!1},io={type:"object",description:"메시지 카탈로그 키 참조(레거시 #{key}). 런타임에 key 조회.",properties:{key:{type:"string"},locale:{type:"string"}},required:["key"],additionalProperties:!1},lo={description:"다국어 텍스트: 평문 문자열 | locale 맵 | 메시지 키 참조.",anyOf:[{type:"string"},{$ref:"#/$defs/multiLangString"},{$ref:"#/$defs/multiLangMessage"}]},so={description:"kind로 판별되는 타입드 값.",anyOf:[{type:"object",properties:{kind:{const:"string"},value:{type:"string"}},required:["kind","value"],additionalProperties:!1},{type:"object",properties:{kind:{const:"int"},value:{type:"integer"}},required:["kind","value"],additionalProperties:!1},{type:"object",properties:{kind:{const:"bool"},value:{type:"boolean"}},required:["kind","value"],additionalProperties:!1},{type:"object",properties:{kind:{const:"text"},value:{$ref:"#/$defs/multiLang"}},required:["kind","value"],additionalProperties:!1},{type:"object",description:"SELECT/SIZE 등 저장값 직접 방출(라벨 아님 — toAgentCatalog options의 value).",properties:{kind:{const:"enum"},value:{type:"string"}},required:["kind","value"],additionalProperties:!1}]},co={type:"object",description:"한 속성 지정. id는 카탈로그 PropertyItem.id(agent 노출 항목).",properties:{id:{type:"string"},value:{$ref:"#/$defs/propValue"}},required:["id","value"],additionalProperties:!1},uo={type:"object",description:"중립 의미 토큰(G1). resolver가 token→css(.bs-*)로 lowering — 원시 CSS 방출 금지.",properties:{dim:{type:"string",description:"스타일 차원(예: bgColor·size)."},token:{type:"string",description:"의미 토큰(예: blue·lg)."}},required:["dim","token"],additionalProperties:!1};function po(e){const t={partType:{type:"string",description:"파트 종류(예: FormLayout·Grid·TextField)."},props:{type:"array",description:"타입드 속성(순서 무관).",items:{$ref:"#/$defs/propAssign"}},styles:{type:"array",description:"중립 스타일 토큰(G1 — slotAlign 포함, dim의 source가 하강 타깃 결정).",items:{$ref:"#/$defs/styleAssign"}}};return e<$e&&(t.children={type:"array",description:`inline-fold 자식 서브트리(깊이 ${e+1}). 더 깊은 중첩은 별도 part.add 배치로.`,items:{$ref:`#/$defs/partSpecL${e+1}`}}),{type:"object",description:e===0?"추가할 파트(및 inline-fold 자식). 신규 서브트리 자식은 별도 op가 아니라 여기 children에 담아라.":`깊이 ${e}의 inline-fold 자식 스펙.`,properties:t,required:["partType"],additionalProperties:!1}}function fo(){const e={};for(let t=0;t<=$e;t++)e[`partSpecL${t}`]=po(t);return e}function He(e,t){return{type:"object",properties:{kind:{const:e},...t.properties},required:["kind",...t.required],additionalProperties:!1}}const go={"part.add":He("part.add",{properties:{parent:{description:"추가 대상 부모 핸들. null이면 루트에 추가.",anyOf:[{$ref:"#/$defs/handle"},{type:"null"}]},spec:{$ref:"#/$defs/partSpecL0"},index:{type:"integer",description:"부모 children 내 삽입 위치(미지정 시 말미)."}},required:["parent","spec"]}),"part.update":He("part.update",{properties:{target:{$ref:"#/$defs/handle"},props:{type:"array",items:{$ref:"#/$defs/propAssign"},description:"갱신할 속성(부분)."},styles:{type:"array",items:{$ref:"#/$defs/styleAssign"},description:"갱신할 스타일 토큰(부분)."}},required:["target"]}),"part.remove":He("part.remove",{properties:{target:{$ref:"#/$defs/handle"}},required:["target"]})},$t={anyOf:Ut.map(e=>go[e])},To={type:"object",description:"화면 파트 트리를 생성·수정·삭제할 때 호출한다. ops는 사람 핸들(id·path·caption)로 지정하며 서버가 partId로 해소한다. 모호하면 에러로 후보를 돌려주니 describeScreen으로 현재 화면을 먼저 읽어 핸들을 확정하라.",properties:{ops:{type:"array",items:{$ref:"#/$defs/symbolicOp"}}},required:["ops"],additionalProperties:!1,$defs:{handle:ro,multiLang:lo,multiLangString:ao,multiLangMessage:io,propValue:so,propAssign:co,styleAssign:uo,...fo(),symbolicOp:$t}},mo=new Set(["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minProperties","maxProperties","oneOf","not","if","then","else","patternProperties","propertyNames","dependentSchemas","dependentRequired"]);function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Eo(e){return e.type==="object"||"properties"in e}function K(e,t,r,o){if(Array.isArray(e)){e.forEach((i,l)=>K(i,`${t}[${l}]`,!1,o));return}if(ne(e)){!r&&("$defs"in e||"definitions"in e)&&o.push({rule:"nested-$defs",path:t,detail:"$defs는 최상위에만 허용된다."});for(const i of Object.keys(e))mo.has(i)&&o.push({rule:"unsupported-keyword",path:`${t}.${i}`,detail:`미지원 키워드 '${i}'.`});if(Eo(e)&&e.additionalProperties!==!1&&o.push({rule:"missing-additional-properties-false",path:t,detail:"object 스키마는 additionalProperties:false 이어야 한다."}),ne(e.properties))for(const[i,l]of Object.entries(e.properties))K(l,`${t}.properties.${i}`,!1,o);if(K(e.items,`${t}.items`,!1,o),K(e.anyOf,`${t}.anyOf`,!1,o),K(e.allOf,`${t}.allOf`,!1,o),ne(e.additionalProperties)&&K(e.additionalProperties,`${t}.additionalProperties`,!1,o),r&&ne(e.$defs))for(const[i,l]of Object.entries(e.$defs))K(l,`$defs.${i}`,!1,o)}}const ho=/^#\/\$defs\/(.+)$/;function Le(e,t,r,o){if(Array.isArray(e)){e.forEach(i=>Le(i,t,r,o));return}if(ne(e)){for(const[i,l]of Object.entries(e))if(i!=="$defs")if(i==="$ref"&&typeof l=="string")if(l==="#"||l==="#/")r.add("#");else{const s=ho.exec(l);s&&(t.has(s[1])?r.add(s[1]):o.push(l))}else Le(l,t,r,o)}}function yo(e,t){const r=ne(e.$defs)?e.$defs:{},o=new Set(Object.keys(r)),i=[],l=new Map,s=new Set;Le({...e,$defs:void 0},o,s,i),l.set("#",s);for(const S of o){const C=new Set;Le(r[S],o,C,i),l.set(S,C)}for(const S of i)t.push({rule:"dangling-$ref",path:S,detail:`존재하지 않는 $defs 참조: ${S}.`});const c=0,d=1,u=2,g=new Map;for(const S of l.keys())g.set(S,c);const h=new Set,y=(S,C)=>{g.set(S,d),C.push(S);for(const R of l.get(S)??[])if(l.has(R))if(g.get(R)===d){const X=C.indexOf(R),k=C.slice(X).concat(R),O=k.join("->");h.has(O)||(h.add(O),t.push({rule:"recursion",path:k.join(" -> "),detail:`재귀 스키마($ref 사이클)는 엄격 서브셋 미지원: ${k.join(" -> ")}.`}))}else g.get(R)===c&&y(R,C);C.pop(),g.set(S,u)};for(const S of l.keys())g.get(S)===c&&y(S,[])}function Ht(e){const t=[];return K(e,"",!0,t),ne(e)&&yo(e,t),t}function So(e){return Ht(e).length===0}const bo=/^(.+)\[(\d+)\]$/;function Ve(e,t){const r=Re(e,t);if(!r)return;const o=[];for(let i=1;i<r.length;i++){const l=r[i-1],s=r[i],c=(l.children??[]).filter(d=>d.partType===s.partType);o.push(`${s.partType}[${c.indexOf(s)}]`)}return o.join("/")}function se(e,t){var i;if(!t)return;const r=(i=t.get(e.partType))==null?void 0:i.captionProp;if(!r)return;const o=e.attrs[r];if(o&&(o.kind==="string"||o.kind==="text"&&typeof o.value=="string"))return o.value}function ko(e,t,r){const o={partId:r.partId,path:Ve(e,r.partId)??""},i=se(r,t);return i!=null&&(o.caption=i),o}function Co(e,t){let r;return H(e,o=>{o.partId===t&&(r=o.partId)}),r}function Oo(e,t){let r=e;for(const o of t.split("/")){const i=bo.exec(o.trim());if(!i||!r)return;const[,l,s]=i;if(r=(r.children??[]).filter(d=>d.partType===l)[Number(s)],!r)return}return r===e||r==null?void 0:r.partId}function Lo(e,t,r){const o=[];return H(e,i=>{se(i,t)===r&&o.push(i)}),o}function Ie(e,t){const r=t.root;if(!r)return{ok:!1,issue:{kind:"handle-not-found",ref:e.ref,by:e.by}};const o=()=>Co(r,e.ref),i=()=>Oo(r,e.ref),l=()=>{const c=Lo(r,t.catalog,e.ref);if(c.length===1)return{ok:!0,partId:c[0].partId};if(c.length>1)return{ok:!1,issue:{kind:"handle-ambiguous",ref:e.ref,candidates:c.map(d=>ko(r,t.catalog,d))}}};if(e.by==="id"){const c=o();return c?{ok:!0,partId:c}:{ok:!1,issue:{kind:"handle-not-found",ref:e.ref,by:"id"}}}if(e.by==="path"){const c=i();return c?{ok:!0,partId:c}:{ok:!1,issue:{kind:"handle-not-found",ref:e.ref,by:"path"}}}if(e.by==="caption")return l()??{ok:!1,issue:{kind:"handle-not-found",ref:e.ref,by:"caption"}};const s=o()??i();return s?{ok:!0,partId:s}:l()??{ok:!1,issue:{kind:"handle-not-found",ref:e.ref}}}function Io(e){switch(e.kind){case"string":return V(e.value);case"int":return Be(e.value);case"bool":return v(e.value);case"text":return _e(e.value);case"enum":return V(e.value)}}function Vt(e,t,r){const o={},i={};for(const s of e??[])o[s.id]=Io(s.value);const l=[];for(const s of t??[]){const c=De[s.dim];if(!c){r.push({kind:"unknown-style-dim",dim:s.dim});continue}const d=mt(s.dim,s.token);if(d===void 0){r.push({kind:"unknown-style-token",dim:s.dim,token:s.token});continue}d!==""&&(c.source==="style"?l.push(d):i[c.legacyDimId]=V(d))}return l.length>0&&(o.addStyleNames=V(l.join(" "))),{attrs:o,layoutAttrs:i}}function Yt(e,t,r){const{attrs:o,layoutAttrs:i}=Vt(e.props,e.styles,r),l={partId:t(),partType:e.partType,attrs:o};return Object.keys(i).length>0&&(l.layoutAttrs=i),e.children&&e.children.length>0&&(l.children=e.children.map(s=>Yt(s,t,r))),l}function Ao(e,t={}){const r=t.newId??re,o=[],i=[];for(const l of e)if(l.kind==="part.add"){let s=null;if(l.parent!==null){const u=Ie(l.parent,t);if(!u.ok){o.push(u.issue);continue}s=u.partId}const c=Yt(l.spec,r,o),d={kind:"part.add",parentId:s,part:c};l.index!=null&&(d.index=l.index),i.push(d)}else if(l.kind==="part.update"){const s=Ie(l.target,t);if(!s.ok){o.push(s.issue);continue}const{attrs:c,layoutAttrs:d}=Vt(l.props,l.styles,o);i.push({kind:"part.update",targetId:s.partId,attrs:c,layoutAttrs:d})}else{const s=Ie(l.target,t);if(!s.ok){o.push(s.issue);continue}i.push({kind:"part.remove",targetId:s.partId})}return{ops:i,issues:o}}const Mo=Object.keys({"part.add":!0,"part.update":!0,"part.move":!0,"part.remove":!0});function Ye(e){switch(e.kind){case"part.add":case"part.remove":return e.parentRef?[e.parentRef]:[];case"part.update":return e.partRef?[e.partRef]:[];case"part.move":{const t=new Set;return e.fromParentRef&&t.add(e.fromParentRef),e.toParentRef&&t.add(e.toParentRef),[...t]}}}class We{constructor(t){F(this,"undoStack",[]);F(this,"redoStack",[]);F(this,"savePoint",null);F(this,"listeners",new Set);F(this,"commandListeners",new Set);F(this,"coalesceSealed",!1);this.state=t}execute(t){t.apply(this.state);const r=this.undoStack.at(-1),o=!this.coalesceSealed&&t.coalesceKey!=null&&!!r&&r.coalesceKey===t.coalesceKey;this.coalesceSealed=!1,o?(t.invert=r.invert,this.undoStack[this.undoStack.length-1]=t):this.undoStack.push(t),this.redoStack=[],this.emitCommand(t,"do",o),this.emit()}undo(){const t=this.undoStack.pop();t&&(t.invert(this.state),this.redoStack.push(t),this.emitCommand(t,"undo",!1),this.emit())}redo(){const t=this.redoStack.pop();t&&(t.apply(this.state),this.undoStack.push(t),this.emitCommand(t,"redo",!1),this.emit())}sealCoalesce(){this.coalesceSealed=!0}get canUndo(){return this.undoStack.length>0}get canRedo(){return this.redoStack.length>0}markSavePoint(){this.savePoint=this.undoStack.at(-1)??null,this.emit()}get isDirty(){return(this.undoStack.at(-1)??null)!==this.savePoint}onChange(t){return this.listeners.add(t),()=>this.listeners.delete(t)}onCommand(t){return this.commandListeners.add(t),()=>this.commandListeners.delete(t)}emit(){for(const t of this.listeners)t()}emitCommand(t,r,o){for(const i of this.commandListeners)i(t,r,o)}}function ce(e,t){const r=$(e.root,t);if(!r)throw new Error(`파트 없음: ${t}`);return r}function ze(e,t){var i;const r=ye(e.root,t),o=((i=r==null?void 0:r.children)==null?void 0:i.findIndex(l=>l.partId===t))??-1;if(!r||o<0)throw new Error(`파트를 찾을 수 없거나 root라 이동/삭제 불가: ${t}`);return{parent:r,index:o}}function Wt(e,t){return e==null?t:Math.max(0,Math.min(e,t))}function zt(e,t,r){let o=-1;return{label:`파트 추가: ${t.partType}`,apply(i){const l=ce(i,e),s=l.children??(l.children=[]);o=Wt(r,s.length),s.splice(o,0,t)},invert(i){var c;const l=$(i.root,e),s=((c=l==null?void 0:l.children)==null?void 0:c.findIndex(d=>d.partId===t.partId))??-1;s>=0&&l.children.splice(s,1)},emitOps(){return{forward:[{kind:"part.add",casUnit:"part",parentRef:e,index:o,value:t}],invert:[{kind:"part.remove",casUnit:"part",partRef:t.partId,parentRef:e}]}}}}function jt(e,t){const r=Object.keys(t),o={},i={};return{label:"파트 수정",apply(l){const s=ce(l,e);for(const c of r)i[c]=c in s,o[c]=s[c];Object.assign(s,t)},invert(l){const s=ce(l,e);for(const c of r)i[c]?s[c]=o[c]:delete s[c]},emitOps(){return{forward:[{kind:"part.update",casUnit:"part",partRef:e,patch:{...t}}],invert:[{kind:"part.update",casUnit:"part",partRef:e,patch:{...o}}]}}}}function Kt(e,t,r){let o=null;return{label:"파트 이동",coalesceKey:`move:${e}`,apply(i){const l=ze(i,e),s=l.parent.children[l.index];l.parent.children.splice(l.index,1);const c=ce(i,t),d=c.children??(c.children=[]),u=Wt(r,d.length);d.splice(u,0,s),o={fromParentId:l.parent.partId,fromIndex:l.index,node:s,toIndex:u}},invert(i){if(!o)return;const l=ze(i,e);l.parent.children.splice(l.index,1);const s=ce(i,o.fromParentId);(s.children??(s.children=[])).splice(o.fromIndex,0,o.node)},emitOps(){return o?{forward:[{kind:"part.move",casUnit:"part",partRef:e,fromParentRef:o.fromParentId,toParentRef:t,index:o.toIndex}],invert:[{kind:"part.move",casUnit:"part",partRef:e,fromParentRef:t,toParentRef:o.fromParentId,index:o.fromIndex}]}:{forward:[],invert:[]}}}}function qt(e){let t=null;return{label:"파트 삭제",apply(r){const o=ze(r,e);t={parentId:o.parent.partId,index:o.index,node:o.parent.children[o.index]},o.parent.children.splice(o.index,1)},invert(r){if(!t)return;const o=ce(r,t.parentId);(o.children??(o.children=[])).splice(t.index,0,t.node)},emitOps(){return t?{forward:[{kind:"part.remove",casUnit:"part",partRef:e,parentRef:t.parentId}],invert:[{kind:"part.add",casUnit:"part",parentRef:t.parentId,index:t.index,value:t.node}]}:{forward:[],invert:[]}}}}class Jt{constructor(){F(this,"revs",new Map)}seed(t){this.revs.clear();for(const[r,o]of Object.entries(t.revs??{}))this.revs.set(r,o)}rev(t){return this.revs.get(t)??0}setRev(t,r){this.revs.set(t,r)}deleteRev(t){this.revs.delete(t)}snapshot(){return{revs:Object.fromEntries(this.revs)}}}class Zt{constructor(t){F(this,"cache",new Jt);F(this,"newClientOpId");F(this,"debounceMs");F(this,"emissions",new WeakMap);F(this,"open",null);F(this,"debounceHandle",null);F(this,"queue",[]);F(this,"sending",!1);F(this,"_frozen",!1);F(this,"stack",null);F(this,"settledWaiters",[]);this.opts=t,this.newClientOpId=t.newClientOpId??re,this.debounceMs=t.debounceMs??300}seed(t){this.cache.seed(t)}attach(t){this.stack=t;const r=t.onCommand((o,i,l)=>this.handle(o,i,l));return()=>{r(),this.stack===t&&(this.stack=null)}}get frozen(){return this._frozen}get hasPending(){return this.open!==null||this.queue.length>0||this.sending}cacheSnapshot(){return this.cache.snapshot()}flush(){this.flushOpen(!0)}whenSettled(){return this.hasPending?new Promise(t=>this.settledWaiters.push(t)):Promise.resolve()}handle(t,r,o){var s;if(this._frozen)return;let i;if(r==="do"){const c=(s=t.emitOps)==null?void 0:s.call(t,this.opts.state);if(!c)throw new Error(`op-mode에서 emitOps 미구현 command 실행: ${t.label}`);i=c}else{const c=this.emissions.get(t);if(!c)throw new Error(`op-mode ${r} 대상 command의 emission 미기록: ${t.label}`);i=c}const l=r==="undo"?i.invert:i.forward;if(r==="do"&&o&&this.open&&this.open.coalesceKey===t.coalesceKey){this.open.fwd=l,this.emissions.set(t,{forward:l,invert:this.open.inv}),this.resetDebounce();return}if(this.flushOpen(!1),r==="do"&&(this.emissions.set(t,i),t.coalesceKey!=null)){this.open={coalesceKey:t.coalesceKey,fwd:l,inv:i.invert},this.startDebounce();return}l.length&&this.enqueue(this.buildBatch(l,i,r))}flushOpen(t){var o;this.cancelDebounce();const r=this.open;this.open=null,r&&r.fwd.length&&this.enqueue(this.buildBatch(r.fwd,{forward:r.fwd,invert:r.inv},"do")),t&&((o=this.stack)==null||o.sealCoalesce())}startDebounce(){this.cancelDebounce(),this.debounceHandle=setTimeout(()=>{this.debounceHandle=null,this.flushOpen(!0)},this.debounceMs)}resetDebounce(){this.startDebounce()}cancelDebounce(){this.debounceHandle!=null&&(clearTimeout(this.debounceHandle),this.debounceHandle=null)}buildBatch(t,r,o){const i={},l=new Set;for(const c of t)for(const d of Ye(c))l.add(d);if(l.size){i.revs={};for(const c of l){const d=this.cache.rev(c);i.revs[c]=d,this.cache.setRev(c,d+1)}}const s=o==="undo"?r.forward:r.invert;for(const c of t)if(c.kind==="part.add"&&c.value)H(c.value,d=>this.cache.setRev(d.partId,0));else if(c.kind==="part.remove"&&c.partRef){const d=s.find(u=>{var g;return u.kind==="part.add"&&((g=u.value)==null?void 0:g.partId)===c.partRef});d!=null&&d.value?H(d.value,u=>this.cache.deleteRev(u.partId)):this.cache.deleteRev(c.partRef)}return{modelId:this.opts.modelId,ops:t,cas:i,origin:this.opts.origin??"gui",clientOpId:this.newClientOpId()}}enqueue(t){this.queue.push(t),this.pump()}async pump(){var o,i;if(this.sending||this._frozen)return;const t=this.queue.shift();if(!t){this.notifySettled();return}this.sending=!0;let r=null;try{r=await this.opts.transport(t)}catch(l){this.sending=!1,console.error("[op-sync] op 전송 실패 → 하드 프리즈(kind:missing):",l),(i=(o=this.opts).onError)==null||i.call(o,l),this.freeze({kind:"missing"});return}this.sending=!1,r.ok?(this.reconcile(r),this.pump()):this.freeze(r.conflict)}reconcile(t){if(!(this.queue.length>0))for(const[r,o]of Object.entries(t.revs))this.cache.setRev(r,o)}freeze(t){var r,o;this._frozen=!0,this.queue.length=0,this.open=null,this.cancelDebounce(),(o=(r=this.opts).onFreeze)==null||o.call(r,t),this.notifySettled()}notifySettled(){if(this.hasPending)return;const t=this.settledWaiters;this.settledWaiters=[];for(const r of t)r()}}function Bo(e){switch(e.kind){case"string":return e.value;case"int":return e.value;case"bool":return e.value;case"text":return e.value;default:return}}function _o(e){var i;const t={},r=e.attrs.addStyleNames;if((r==null?void 0:r.kind)==="string"&&r.value)for(const l of r.value.split(/\s+/).filter(Boolean)){const s=ht(l);s&&(t[s.dim]=s.token)}const o=(i=e.layoutAttrs)==null?void 0:i.componentAlignment;if((o==null?void 0:o.kind)==="string"&&o.value){const l=Et("slotAlign",o.value);l&&(t.slotAlign=l)}return t}function Qt(e,t,r,o){var d;const i=((d=o.get(e.partType))==null?void 0:d.attrs)??[],l={};for(const u of i){const g=e.attrs[u.id];if(g===void 0)continue;const h=Bo(g);h!==void 0&&(l[u.id]=h)}Object.assign(l,_o(e));const s={id:e.partId,partType:e.partType,path:Ve(t,e.partId)??"",attrs:l,children:(e.children??[]).map(u=>Qt(u,t,r,o))},c=se(e,r);return c!=null&&(s.caption=c),s}function Po(e,t){const r=Xt(t);return Qt(e,e,t,r)}function en(e){switch(e.kind){case"part.add":{const t={kind:"part.add",casUnit:"part",value:e.part};return e.parentId!=null&&(t.parentRef=e.parentId),e.index!=null&&(t.index=e.index),t}case"part.update":{const t={};return Object.keys(e.attrs).length>0&&(t.attrs=e.attrs),Object.keys(e.layoutAttrs).length>0&&(t.layoutAttrs=e.layoutAttrs),{kind:"part.update",casUnit:"part",partRef:e.targetId,patch:t}}case"part.remove":return{kind:"part.remove",casUnit:"part",partRef:e.targetId}}}function Ro(e,t,r,o={}){const i=o.mkClientOpId??re,l=r.map(en),s=new Set;for(const d of l)for(const u of Ye(d))s.add(u);const c={};if(s.size>0){c.revs={};for(const d of s)c.revs[d]=t[d]??0}return{modelId:e,ops:l,cas:c,origin:o.origin??"agent",clientOpId:i()}}const Te=Symbol("uiEditorController");function tn(e="FormLayout"){return{partId:re(),partType:e,attrs:{},children:[]}}function xo(e=tn(),t={}){var dn,un;const r=t.catalog??Gt(),o=t.modelId??"ui-model",i=a.reactive({root:e});let l=new We(i);const s=a.ref(!1),c=a.ref(!1),d=a.ref(!1),u=a.ref(0),g=a.ref(((dn=t.meta)==null?void 0:dn.schemaVersion)??1),h=a.ref(((un=t.meta)==null?void 0:un.opWriteEnabled)??!1),y=a.computed(()=>g.value>=2&&h.value),S=a.ref(!(g.value>=2&&h.value===!1)),C=a.ref(null),R=a.ref(null),X=a.computed(()=>R.value?$(i.root,R.value)??null:null),k=a.ref(null);let O=0,D=t.meta;function I(){l.onChange(()=>{s.value=l.canUndo,c.value=l.canRedo,d.value=l.isDirty,u.value++})}I();let B=null,b=null;function x(){b==null||b(),b=null,B=null}function oe(){if(x(),!y.value||!t.opTransport)return;const _=new Zt({modelId:o,state:i,transport:t.opTransport,origin:"gui",newClientOpId:t.newClientOpId,onFreeze:N=>{S.value=!1,C.value=N},onError:t.onOpError});_.seed((D==null?void 0:D.revSeed)??{}),b=_.attach(l),B=_}oe();const me=a.computed(()=>ot(i.root,r)),Ae=a.computed(()=>{const _=new Map;for(const N of me.value){if(!N.targetRef)continue;const z=_.get(N.targetRef);z?z.push(N):_.set(N.targetRef,[N])}return _}),ue=_=>{S.value&&l.execute(_)};function cn(_,N){const z=$(i.root,_);return z?r.canContain(z.partType,N)!=="deny":!1}return{state:i,catalog:r,issues:me,issuesByRef:Ae,canUndo:s,canRedo:c,dirty:d,revision:u,editable:S,setEditable(_){S.value=_?y.value||g.value<2:!1},schemaVersion:g,opWriteEnabled:h,opMode:y,opConflict:C,selection:R,selectedPart:X,select(_){R.value=_},focusRequest:k,requestFocus(_){k.value={id:_,nonce:++O}},addPart(_,N,z){return!S.value||!cn(_,N.partType)?!1:(ue(zt(_,N,z)),R.value=N.partId,!0)},updatePart(_,N){return!S.value||!$(i.root,_)?!1:(ue(jt(_,N)),!0)},movePart(_,N,z){if(!S.value)return!1;const Je=$(i.root,_);return!Je||$(Je,N)||!cn(N,Je.partType)?!1:(ue(Kt(_,N,z)),!0)},removePart(_){return!S.value||_===i.root.partId||!$(i.root,_)?!1:(ue(qt(_)),R.value===_&&(R.value=null),!0)},undo(){S.value&&l.undo()},redo(){S.value&&l.redo()},markSaved(){B==null||B.flush(),l.markSavePoint()},loadModel(_,N){x(),i.root=_,l=new We(i),I(),g.value=(N==null?void 0:N.schemaVersion)??1,h.value=(N==null?void 0:N.opWriteEnabled)??!1,S.value=!(g.value>=2&&h.value===!1),D=N,C.value=null,R.value=null,s.value=l.canUndo,c.value=l.canRedo,d.value=l.isDirty,oe()},flush(){B==null||B.flush()},whenOpsSettled(){return(B==null?void 0:B.whenSettled())??Promise.resolve()}}}const No={class:"ui-schematic-head"},Do={class:"ui-schematic-type"},vo={key:0,class:"ui-schematic-caption"},wo={key:0,class:"ui-schematic-body"},Fo={key:0,class:"ui-schematic-drop-hint"},Go=a.defineComponent({__name:"SchematicPart",props:{partType:{},category:{},caption:{},partName:{},selected:{type:Boolean},container:{type:Boolean},empty:{type:Boolean}},setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["ui-schematic-part",[`ui-cat-${e.category??"unknown"}`,{"is-selected":e.selected,"is-container":e.container}]])},[a.createElementVNode("div",No,[a.createElementVNode("span",Do,a.toDisplayString(e.partName??e.partType),1),e.caption?(a.openBlock(),a.createElementBlock("span",vo,a.toDisplayString(e.caption),1)):a.createCommentVNode("",!0)]),e.container?(a.openBlock(),a.createElementBlock("div",wo,[a.renderSlot(t.$slots,"default",{},void 0,!0),e.empty?(a.openBlock(),a.createElementBlock("span",Fo,"여기에 드롭")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],2))}}),q=(e,t)=>{const r=e.__vccOpts||e;for(const[o,i]of t)r[o]=i;return r},je=q(Go,[["__scopeId","data-v-46916ee5"]]);function Ke(e,t){const r=t.get(e.partType),o={partType:e.partType};(r==null?void 0:r.category)!=null&&(o.category=r.category),(r==null?void 0:r.partName)!=null&&(o.partName=r.partName);const i=se(e,t);return i!=null&&(o.caption=i),o}function nn(e){var r;const t=new Map;for(const o of e.all()){const i=(r=o.containment)==null?void 0:r.role;t.set(o.partType,{component:je,propBind:l=>Ke(l,e),acceptsChildren:i!=="leaf"})}return t}function on(e,t,r){const o=e.get(t.partType);return o||{component:je,propBind:i=>Ke(i,r),acceptsChildren:!0}}const Xo={CONTAIN:"담김",ARITY:"개수",DUP:"중복",ATTR:"속성",PART:"파트"};function Uo(e){const t=e.split("-")[1];return t?Xo[t]??t:e}function $o(e){return e.contextRef}function Ho(e,t){return t.container?t.hasParent?e<.3?"before":e>.7?"after":"into":"into":e<.5?"before":"after"}function Vo(e,t,r,o){const i=ye(e,t);if((i==null?void 0:i.partId)===r&&i.children){const l=i.children.findIndex(s=>s.partId===t);if(l>=0&&l<o)return o-1}return o}const Yo=["draggable"],Wo=q(a.defineComponent({__name:"PartCanvas",props:{node:{},registry:{},parentId:{},index:{}},setup(e){const t=e,r=a.inject(Te);if(!r)throw new Error("PartCanvas: EDITOR 컨트롤러가 provide되지 않았습니다");const o=r,i=a.computed(()=>t.registry??nn(o.catalog)),l=a.computed(()=>t.node??o.state.root),s=a.computed(()=>on(i.value,l.value,o.catalog)),c=a.computed(()=>s.value.propBind(l.value)),d=a.computed(()=>s.value.acceptsChildren!==!1),u=a.computed(()=>o.selection.value===l.value.partId),g=a.computed(()=>d.value&&!(l.value.children&&l.value.children.length)),h=a.computed(()=>t.parentId!=null),y=a.ref(null);function S(I){const b=I.currentTarget.getBoundingClientRect(),x=b.height?(I.clientY-b.top)/b.height:.5;return Ho(x,{container:d.value,hasParent:t.parentId!=null})}function C(I){I.preventDefault(),I.stopPropagation(),y.value=S(I)}function R(){y.value=null}function X(I){var B;I.stopPropagation(),(B=I.dataTransfer)==null||B.setData("partId",l.value.partId),I.dataTransfer&&(I.dataTransfer.effectAllowed="move")}function k(I){I.stopPropagation(),o.select(l.value.partId)}function O(I){if(I==="into")return{parentId:l.value.partId};if(t.parentId==null)return null;const B=I==="after"?(t.index??0)+1:t.index??0;return{parentId:t.parentId,index:B}}function D(I){var me,Ae;I.preventDefault(),I.stopPropagation();const B=y.value??S(I);y.value=null;const b=O(B);if(!b)return;const x=(me=I.dataTransfer)==null?void 0:me.getData("partId"),oe=(Ae=I.dataTransfer)==null?void 0:Ae.getData("partType");if(x){const ue=b.index==null?void 0:Vo(o.state.root,x,b.parentId,b.index);o.movePart(x,b.parentId,ue)}else oe&&o.addPart(b.parentId,{partId:re(),partType:oe,attrs:{},children:[]},b.index)}return(I,B)=>{const b=a.resolveComponent("PartCanvas",!0);return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["ui-canvas-node",{"is-drop-into":y.value==="into","is-drop-before":y.value==="before","is-drop-after":y.value==="after"}]),draggable:h.value,onClick:k,onDragstart:X,onDragover:C,onDragleave:R,onDrop:D},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.value.component),a.mergeProps(c.value,{selected:u.value,container:d.value,empty:g.value}),{default:a.withCtx(()=>[d.value?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(l.value.children??[],(x,oe)=>(a.openBlock(),a.createBlock(b,{key:x.partId,node:x,registry:i.value,"parent-id":l.value.partId,index:oe},null,8,["node","registry","parent-id","index"]))),128)):a.createCommentVNode("",!0)]),_:1},16,["selected","container","empty"]))],42,Yo)}}}),[["__scopeId","data-v-d9963ad2"]]),zo={class:"ui-palette"},jo={class:"ui-palette__title"},Ko={class:"ui-palette__list"},qo=["title","onDragstart"],Jo=q(a.defineComponent({__name:"PartPalette",setup(e){const t=a.inject(Te);if(!t)throw new Error("PartPalette: EDITOR 컨트롤러가 provide되지 않았습니다");const r=t,o=a.computed(()=>{const l=new Map;for(const s of r.catalog.all()){const c=s.category??"기타",d=l.get(c);d?d.push(s):l.set(c,[s])}return[...l.entries()]});function i(l,s){var c;(c=l.dataTransfer)==null||c.setData("partType",s.partType),l.dataTransfer&&(l.dataTransfer.effectAllowed="copy")}return(l,s)=>(a.openBlock(),a.createElementBlock("div",zo,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,([c,d])=>(a.openBlock(),a.createElementBlock("section",{key:c,class:"ui-palette__group"},[a.createElementVNode("h4",jo,a.toDisplayString(c),1),a.createElementVNode("ul",Ko,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d,u=>(a.openBlock(),a.createElementBlock("li",{key:u.partType,class:"ui-palette__item",draggable:"true",title:u.partType,onDragstart:g=>i(g,u)},a.toDisplayString(u.partName),41,qo))),128))])]))),128))]))}}),[["__scopeId","data-v-ba70ed30"]]),Zo=["title"],Qo={key:1,class:"ui-mlang"},er={class:"ui-mlang__tabs",role:"tablist"},tr=["aria-selected","onClick"],nr={key:0,class:"ui-mlang__dot"},or=["name","placeholder","value"],rr=["name","placeholder","value"],rn=q(a.defineComponent({__name:"MultiLangTextField",props:{modelValue:{},name:{},languages:{default:()=>["ko","en","ja","zh"]},defaultLang:{},multiline:{type:Boolean,default:!1},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,i=a.computed(()=>Pe(r.modelValue)),l=a.computed(()=>Pe(r.modelValue)?r.modelValue.key:"");function s(){const y=r.defaultLang;return y&&r.languages.includes(y)?y:r.languages[0]??"ko"}const c=a.ref(s());a.watch(()=>[r.languages,r.defaultLang],()=>{r.languages.includes(c.value)||(c.value=s())});const d=a.computed(()=>{const y=r.modelValue;return y==null||i.value?{}:typeof y=="string"?y.trim()?{[c.value]:y}:{}:y});function u(y){var S;return!!((S=d.value[y])!=null&&S.trim())}const g=a.computed(()=>d.value[c.value]??"");function h(y){const S={...d.value};y.trim()===""?delete S[c.value]:S[c.value]=y,o("update:modelValue",S)}return(y,S)=>i.value?(a.openBlock(),a.createElementBlock("code",{key:0,class:"ui-mlang__key",title:`메시지 키: ${l.value}`},"#"+a.toDisplayString("{")+a.toDisplayString(l.value)+a.toDisplayString("}"),9,Zo)):(a.openBlock(),a.createElementBlock("div",Qo,[a.createElementVNode("div",er,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.languages,C=>(a.openBlock(),a.createElementBlock("button",{key:C,type:"button",class:a.normalizeClass(["ui-mlang__tab",{"is-active":c.value===C}]),role:"tab","aria-selected":c.value===C,onClick:R=>c.value=C},[a.createTextVNode(a.toDisplayString(C),1),u(C)?(a.openBlock(),a.createElementBlock("span",nr,"•")):a.createCommentVNode("",!0)],10,tr))),128))]),e.multiline?(a.openBlock(),a.createElementBlock("textarea",{key:0,name:`${e.name}-${c.value}`,class:"ui-mlang__input",rows:"3",placeholder:e.placeholder,value:g.value,onInput:S[0]||(S[0]=C=>h(C.target.value))},null,40,or)):(a.openBlock(),a.createElementBlock("input",{key:1,name:`${e.name}-${c.value}`,class:"ui-mlang__input",type:"text",placeholder:e.placeholder,value:g.value,onInput:S[1]||(S[1]=C=>h(C.target.value))},null,40,rr))]))}}),[["__scopeId","data-v-fa16ddef"]]),ar={class:"ui-inline-issue__mark","aria-hidden":"true"},ir={class:"ui-inline-issue__msgs"},qe=q(a.defineComponent({__name:"InlineIssueBadge",props:{controller:{},refId:{}},setup(e){const t=e,r={error:{order:0,mark:"⛔"},warning:{order:1,mark:"⚠"},info:{order:2,mark:"ℹ"}},o=a.computed(()=>t.refId?t.controller.issuesByRef.value.get(t.refId)??[]:[]),i=a.computed(()=>{let l=null;for(const s of o.value)(l===null||r[s.severity].order<r[l].order)&&(l=s.severity);return l});return(l,s)=>i.value?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(["ui-inline-issue",`is-${i.value}`])},[a.createElementVNode("span",ar,a.toDisplayString(r[i.value].mark),1),a.createElementVNode("span",ir,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,(c,d)=>(a.openBlock(),a.createElementBlock("span",{key:d},a.toDisplayString(c.message),1))),128))])],2)):a.createCommentVNode("",!0)}}),[["__scopeId","data-v-a0454177"]]),lr={class:"ui-props"},sr={key:0,class:"ui-props__empty"},cr={class:"ui-props__head"},dr={class:"ui-props__type"},ur={class:"ui-props__id"},pr=["disabled"],fr={class:"ui-props__group-title"},gr=["title"],Tr={class:"ui-props__field"},mr=["checked","onChange"],Er=["value","onChange"],hr=["value","onChange"],yr=["value"],Sr=["value","onChange"],br={key:5,class:"ui-props__readonly"},kr=["value","onChange"],Cr=q(a.defineComponent({__name:"PropertyPanel",setup(e){const t=a.inject(Te);if(!t)throw new Error("PropertyPanel: EDITOR 컨트롤러가 provide되지 않았습니다");const r=t,o=a.computed(()=>r.selectedPart.value),i=a.computed(()=>o.value?r.catalog.get(o.value.partType):void 0),l=new Set(["SELECT","ALIGN","ADD_STYLE","SIZE","ICON"]),s=new Set(["TEXTAREA","FULL_TEXTAREA","MESSAGE_TEXTAREA"]),c=new Set(["COMPONENT_REF","DATASOURCE","DATAMAPPING","COMMENT","CASE_MESSAGES","BUTTON","SIMPLE_BUTTON","WINDOW_OPEN_BUTTON","TEXT_RO_WITH_BUTTON"]);function d(k){return c.has(k.editor)?"readonly":k.valueType==="bool"?"bool":k.valueType==="int"?"int":k.valueType==="text"?"text":k.valueType==="validator"||k.valueType==="dataSource"||k.valueType==="dataMapping"?"readonly":l.has(k.editor)?"select":s.has(k.editor)?"textarea":"string"}function u(k){var D;const O=o.value;if(O)return k.layoutAttr?(D=O.layoutAttrs)==null?void 0:D[k.id]:O.attrs[k.id]}function g(k,O){const D=o.value;if(D)if(k.layoutAttr){const I={...D.layoutAttrs??{}};O===void 0?delete I[k.id]:I[k.id]=O,r.updatePart(D.partId,{layoutAttrs:I})}else{const I={...D.attrs};O===void 0?delete I[k.id]:I[k.id]=O,r.updatePart(D.partId,{attrs:I})}}function h(k,O){g(k,O===""?void 0:V(O))}function y(k,O){g(k,O===""?void 0:Be(Number(O)))}function S(k,O){g(k,v(O))}function C(k,O){const D=typeof O=="object"&&!("key"in O)&&Object.keys(O).length===0;g(k,D||O===""?void 0:_e(O))}function R(k){var I;const O=(k.param??"").split(";").map(B=>B.trim()).filter(Boolean).map(B=>{const b=B.indexOf(":");return b<0?{value:B,label:B}:{value:B.slice(0,b),label:B.slice(b+1)}}),D=(I=k.agent)==null?void 0:I.enum;return D?O.filter(B=>D.includes(B.value)):O}function X(k){const O=u(k);if(!O)return"—";switch(O.kind){case"string":case"dataSource":case"dataMapping":return O.value;case"int":return String(O.value);case"bool":return O.value?"true":"false";default:return`(${O.kind})`}}return(k,O)=>{var D,I;return a.openBlock(),a.createElementBlock("div",lr,[o.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("header",cr,[a.createElementVNode("span",dr,a.toDisplayString(((D=i.value)==null?void 0:D.partName)??o.value.partType),1),a.createElementVNode("code",ur,a.toDisplayString(o.value.partId),1)]),a.createVNode(qe,{controller:a.unref(r),"ref-id":o.value.partId},null,8,["controller","ref-id"]),a.createElementVNode("fieldset",{class:"ui-props__form",disabled:!a.unref(r).editable.value},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(((I=i.value)==null?void 0:I.groups)??[],B=>(a.openBlock(),a.createElementBlock("section",{key:B.name,class:"ui-props__group"},[a.createElementVNode("h4",fr,a.toDisplayString(B.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(B.items,b=>(a.openBlock(),a.createElementBlock("div",{key:b.id,class:"ui-props__row"},[a.createElementVNode("label",{class:"ui-props__label",title:b.id},a.toDisplayString(b.name),9,gr),a.createElementVNode("div",Tr,[d(b)==="bool"?(a.openBlock(),a.createElementBlock("input",{key:0,type:"checkbox",checked:a.unref(et)(u(b)),onChange:x=>S(b,x.target.checked)},null,40,mr)):d(b)==="int"?(a.openBlock(),a.createElementBlock("input",{key:1,type:"number",class:"ui-props__input",value:u(b)?a.unref(Qe)(u(b)):"",onChange:x=>y(b,x.target.value)},null,40,Er)):d(b)==="text"?(a.openBlock(),a.createBlock(rn,{key:2,name:b.id,"model-value":a.unref(tt)(u(b)),multiline:b.editor==="MESSAGE_TEXTAREA","onUpdate:modelValue":x=>C(b,x)},null,8,["name","model-value","multiline","onUpdate:modelValue"])):d(b)==="select"?(a.openBlock(),a.createElementBlock("select",{key:3,class:"ui-props__input",value:a.unref(he)(u(b)),onChange:x=>h(b,x.target.value)},[O[0]||(O[0]=a.createElementVNode("option",{value:""},"—",-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(R(b),x=>(a.openBlock(),a.createElementBlock("option",{key:x.value,value:x.value},a.toDisplayString(x.label),9,yr))),128))],40,hr)):d(b)==="textarea"?(a.openBlock(),a.createElementBlock("textarea",{key:4,class:"ui-props__input",rows:"3",value:a.unref(he)(u(b)),onChange:x=>h(b,x.target.value)},null,40,Sr)):d(b)==="readonly"?(a.openBlock(),a.createElementBlock("span",br,a.toDisplayString(X(b)),1)):(a.openBlock(),a.createElementBlock("input",{key:6,type:"text",class:"ui-props__input",value:a.unref(he)(u(b)),onChange:x=>h(b,x.target.value)},null,40,kr))])]))),128))]))),128))],8,pr)],64)):(a.openBlock(),a.createElementBlock("p",sr,"선택된 파트가 없습니다"))])}}}),[["__scopeId","data-v-74030a51"]]),Or={class:"ui-tree-node"},Lr={class:"ui-tree-type"},Ir={key:0,class:"ui-tree-caption"},Ar=q(a.defineComponent({__name:"PartTree",props:{node:{},depth:{}},setup(e){const t=e,r=a.inject(Te);if(!r)throw new Error("PartTree: EDITOR 컨트롤러가 provide되지 않았습니다");const o=r,i=a.computed(()=>t.node??o.state.root),l=a.computed(()=>t.depth??0),s=a.computed(()=>se(i.value,o.catalog)),c=a.computed(()=>o.selection.value===i.value.partId);return(d,u)=>{const g=a.resolveComponent("PartTree",!0);return a.openBlock(),a.createElementBlock("div",Or,[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["ui-tree-row",{"is-selected":c.value}]),style:a.normalizeStyle({paddingLeft:`${l.value*14+6}px`}),onClick:u[0]||(u[0]=h=>a.unref(o).select(i.value.partId))},[a.createElementVNode("span",Lr,a.toDisplayString(i.value.partType),1),s.value?(a.openBlock(),a.createElementBlock("span",Ir,a.toDisplayString(s.value),1)):a.createCommentVNode("",!0)],6),a.createVNode(qe,{controller:a.unref(o),"ref-id":i.value.partId},null,8,["controller","ref-id"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value.children??[],h=>(a.openBlock(),a.createBlock(g,{key:h.partId,node:h,depth:l.value+1},null,8,["node","depth"]))),128))])}}}),[["__scopeId","data-v-cfddebcf"]]),de="ui-modeler-preview";function an(e,t){return{channel:de,type:"render",model:e,revision:t}}function Mr(){return{channel:de,type:"ready"}}function Br(e){return{channel:de,type:"resize",height:e}}function _r(e){return{channel:de,type:"error",message:e}}function ln(e){return typeof e=="object"&&e!==null&&e.channel===de&&typeof e.type=="string"}const Pr=new Set(["ready","resize","error"]),Rr=new Set(["render"]);function sn(e){return ln(e)&&Pr.has(e.type)}function xr(e){return ln(e)&&Rr.has(e.type)}const Nr=["src"],Dr=q(a.defineComponent({__name:"IframePreview",props:{model:{},revision:{default:0},src:{},targetOrigin:{default:"/"}},emits:["error","ready"],setup(e,{emit:t}){const r=e,o=t,i=a.ref(null),l=a.ref(0);let s=!1;function c(){var g;const u=(g=i.value)==null?void 0:g.contentWindow;if(!(!u||!s))try{const h=JSON.parse(JSON.stringify(r.model));u.postMessage(an(h,r.revision),r.targetOrigin)}catch(h){o("error",h instanceof Error?h.message:String(h))}}function d(u){var g;if(u.source===((g=i.value)==null?void 0:g.contentWindow)&&sn(u.data))switch(u.data.type){case"ready":s=!0,c(),o("ready");break;case"resize":l.value=u.data.height;break;case"error":o("error",u.data.message);break}}return a.onMounted(()=>window.addEventListener("message",d)),a.onBeforeUnmount(()=>window.removeEventListener("message",d)),a.watch(()=>[r.model,r.revision],()=>c(),{deep:!1}),(u,g)=>(a.openBlock(),a.createElementBlock("iframe",{ref_key:"frame",ref:i,class:"ui-iframe-preview",src:e.src,style:a.normalizeStyle(l.value?{height:l.value+"px"}:void 0),title:"실 미리보기"},null,12,Nr))}}),[["__scopeId","data-v-72e13e1b"]]);p.AGENT_EXPOSE_DEFAULT=Tt,p.APPLY_UI_OPS_INPUT_SCHEMA=To,p.BUILTIN_PART_DEFS=Dt,p.CASE_MSG_CAPTION=En,p.CommandStack=We,p.EDITOR=Te,p.IframePreview=Dr,p.InlineIssueBadge=qe,p.MAX_INLINE_DEPTH=$e,p.MultiLangTextField=rn,p.OP_KINDS=Mo,p.OpSyncAdapter=Zt,p.PART_CATEGORY=Me,p.PART_TYPES=Ze,p.PART_TYPES_BY_CATEGORY=j,p.PREVIEW_CHANNEL=de,p.PROPERTY_EDITORS=Bn,p.PartCanvas=Wo,p.PartPalette=Jo,p.PartTree=Ar,p.PropertyPanel=Cr,p.RevCache=Jt,p.STYLE_TOKENS=le,p.STYLE_TOKEN_DIM_META=De,p.SYMBOLIC_OP_KINDS=Ut,p.SYMBOLIC_OP_SCHEMA=$t,p.SchematicPart=je,p.accept=nt,p.addPart=zt,p.applyOpsToFlat=An,p.asBool=et,p.asInt=Qe,p.asString=he,p.asText=tt,p.asValidator=mn,p.attrMapFrom=xe,p.attrValFrom=ct,p.bool=v,p.buildAgentBatch=Ro,p.captionText=se,p.checkStrictSubset=Ht,p.classifyStyleClass=ht,p.collect=hn,p.createCatalog=Gt,p.createSchematicRegistry=nn,p.createUiEditorController=xo,p.cssToToken=Et,p.dataMapping=gn,p.dataSource=fn,p.decodeKeyText=at,p.decodeToMultiLang=pe,p.describeScreen=Po,p.emptyCoverageReport=dt,p.emptyRoot=tn,p.errorMessage=_r,p.extendCatalog=qn,p.findPartById=$,p.flattenSubtree=Ne,p.fromPersisted=pt,p.fromPersistedV2=Ln,p.int=Be,p.isMultiLangMessage=Pe,p.isPartType=Ee,p.isPreviewInbound=sn,p.isPreviewOutbound=xr,p.isStrictSubset=So,p.issueCategoryLabel=Uo,p.issueParentRef=$o,p.migrateV1ToV2=In,p.movePart=Kt,p.newPartId=re,p.parentOf=ye,p.parseGridSort=st,p.parseGridSortList=yn,p.parseValidatorString=lt,p.pathOf=Ve,p.pathTo=Re,p.readyMessage=Mr,p.removePart=qt,p.renderMessage=an,p.resizeMessage=Br,p.resolveHandle=Ie,p.resolveOps=Ao,p.resolveRenderer=on,p.revContainersOf=Ye,p.schematicProps=Ke,p.str=V,p.text=_e,p.toAgentCatalog=Xt,p.toOpShape=en,p.toPersistedV2=ft,p.tokenToCss=mt,p.tokensOf=ve,p.uiKeyTextToMultiLang=it,p.updatePart=jt,p.validatePartModel=ot,p.validator=Tn,p.walk=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UiEditorController } from '../editor/controller';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
controller: UiEditorController;
|
|
4
|
+
refId: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MultiLangText } from '../core/lang';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: MultiLangText;
|
|
4
|
+
/** input name 접두 — 실제 name은 `${name}-${lang}`. 폼 식별용. */
|
|
5
|
+
name: string;
|
|
6
|
+
languages?: string[];
|
|
7
|
+
defaultLang?: string;
|
|
8
|
+
multiline?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: MultiLangText) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: MultiLangText) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
languages: string[];
|
|
17
|
+
multiline: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PartModel } from '../core/types';
|
|
2
|
+
import { RendererRegistry } from './RendererRegistry';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
node?: PartModel;
|
|
5
|
+
registry?: RendererRegistry;
|
|
6
|
+
/** 이 노드의 부모 id(root는 undefined) — 형제 삽입 대상 부모. */
|
|
7
|
+
parentId?: string;
|
|
8
|
+
/** 부모 children 내 이 노드의 인덱스 — 형제 삽입 gap 계산. */
|
|
9
|
+
index?: number;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PartModel } from '../core/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node?: PartModel;
|
|
4
|
+
depth?: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { PartModel } from '../core/types';
|
|
3
|
+
import { PartCatalog } from '../catalog/types';
|
|
4
|
+
/** 한 파트 타입의 렌더러. */
|
|
5
|
+
export interface PartRenderer {
|
|
6
|
+
/** 렌더 컴포넌트(props는 `propBind` 산출값 + `selected`/`container` 크롬을 캔버스가 주입). */
|
|
7
|
+
component: Component;
|
|
8
|
+
/** 중립 attr → 표시 props 번역(디자인시스템 결합 격리점). 순수 함수. */
|
|
9
|
+
propBind(part: PartModel): Record<string, unknown>;
|
|
10
|
+
/** 자식 슬롯 렌더 여부(컨테이너). 미지정이면 캔버스가 fallback으로 true 취급. */
|
|
11
|
+
acceptsChildren?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type RendererRegistry = Map<string, PartRenderer>;
|
|
14
|
+
/**
|
|
15
|
+
* 스키매틱 개념 props(순수 — 테스트 가능). caption은 M8 `captionText` 재사용이라 agent read
|
|
16
|
+
* (describeScreen)와 표시가 정합한다(재정의 0). partName/category는 카탈로그 파생.
|
|
17
|
+
*/
|
|
18
|
+
export declare function schematicProps(part: PartModel, catalog: PartCatalog): Record<string, unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* 카탈로그의 전 파트를 스키매틱 개념 컴포넌트로 매핑한 기본 레지스트리. `acceptsChildren`은
|
|
21
|
+
* containment role로 파생(leaf=false, open/fixed=true, 규칙 미정=true — 과도 제약 방지).
|
|
22
|
+
*/
|
|
23
|
+
export declare function createSchematicRegistry(catalog: PartCatalog): RendererRegistry;
|
|
24
|
+
/**
|
|
25
|
+
* 파트의 렌더러 조회 — 미등록(호스트 확장·미지 partType)이면 스키매틱 fallback(자식 수용 = true,
|
|
26
|
+
* 미지 파트도 트리에 자식이 있으면 렌더). 캔버스가 매 노드 렌더 시 호출한다.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveRenderer(registry: RendererRegistry, part: PartModel, catalog: PartCatalog): PartRenderer;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 스키매틱 개념 파트(전략 B 캔버스 축) — 실 bluesea@5.x 컴포넌트가 아닌 경량 개념 프록시.
|
|
3
|
+
* 캔버스는 개념 박스(타입 뱃지 + caption)로 구조를 보여주고, 실 미리보기(iframe bluesea@5.x)는
|
|
4
|
+
* M10으로 분리한다(CLAUDE.md §"설계 표면 렌더링 전략" 전략 B). 순수 마크업이라 디자인시스템
|
|
5
|
+
* 결합이 없다(불변식 #1) — bluesea 결합은 RendererRegistry의 대체 주입으로만 들어온다.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
partType: string;
|
|
9
|
+
category?: string;
|
|
10
|
+
caption?: string;
|
|
11
|
+
partName?: string;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
/** 컨테이너 파트 여부(자식 슬롯 노출). */
|
|
14
|
+
container?: boolean;
|
|
15
|
+
/** 컨테이너가 비어 있는지(드롭 영역 힌트 노출). */
|
|
16
|
+
empty?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare var __VLS_1: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PartModel } from '../core/types';
|
|
2
|
+
/** 드롭 존 — 형제 앞/뒤 삽입(before/after) 또는 컨테이너 자식으로(into). */
|
|
3
|
+
export type DropZone = 'before' | 'after' | 'into';
|
|
4
|
+
/**
|
|
5
|
+
* 커서 세로 위치(ratio 0=상단~1=하단)로 드롭 존을 판정한다.
|
|
6
|
+
* - 컨테이너: 3분할(상 before / 중 into / 하 after). 단 root(hasParent=false)는 형제가 없어 항상 into.
|
|
7
|
+
* - leaf: 2분할(상 before / 하 after) — 자식을 담을 수 없으므로 into 없음.
|
|
8
|
+
*/
|
|
9
|
+
export declare function dropZoneAt(ratio: number, opts: {
|
|
10
|
+
container: boolean;
|
|
11
|
+
hasParent: boolean;
|
|
12
|
+
}): DropZone;
|
|
13
|
+
/**
|
|
14
|
+
* 형제 상대 삽입 gap(대상 부모의 **현재(제거 전)** children 기준)을 move command가 기대하는
|
|
15
|
+
* **대상 파트 제거 후 배열 기준 index**로 보정한다. 같은 부모 내 이동이고 원위치가 gap보다
|
|
16
|
+
* 앞이면 제거로 뒤 요소들이 한 칸 당겨지므로 gap-1. 다른 부모로의 이동이면 대상 배열이 제거에
|
|
17
|
+
* 영향받지 않으므로 그대로. (신규 파트 add에는 이 보정을 쓰지 않는다 — 제거가 없으므로 gap 그대로.)
|
|
18
|
+
*/
|
|
19
|
+
export declare function adjustMoveIndex(root: PartModel, movedId: string, toParentId: string, gap: number): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PartModel } from '../../core/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 미리보기할 모델 트리(직렬화되어 iframe으로 전송). */
|
|
4
|
+
model: PartModel;
|
|
5
|
+
/** 모델 revision — 변경 감지 트리거(controller.revision 배선). */
|
|
6
|
+
revision?: number;
|
|
7
|
+
/** iframe 진입 문서 URL(자체 bluesea@5.x 렌더러 번들). */
|
|
8
|
+
src: string;
|
|
9
|
+
/** postMessage targetOrigin — 기본 동일 출처('/'). 교차 출처면 명시. */
|
|
10
|
+
targetOrigin?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
+
error: (message: string) => any;
|
|
14
|
+
ready: () => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onError?: ((message: string) => any) | undefined;
|
|
17
|
+
onReady?: (() => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
revision: number;
|
|
20
|
+
targetOrigin: string;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PartModel } from '../../core/types';
|
|
2
|
+
/** postMessage 네임스페이스 — 다른 트래픽과 충돌 방지. */
|
|
3
|
+
export declare const PREVIEW_CHANNEL: "ui-modeler-preview";
|
|
4
|
+
/** 부모 → iframe: 렌더할 모델 스냅샷(PartModel은 전부 JSON-safe — attr/MultiLangText/구조값 plain). */
|
|
5
|
+
export interface PreviewRenderMessage {
|
|
6
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
7
|
+
type: 'render';
|
|
8
|
+
model: PartModel;
|
|
9
|
+
/** 부모 revision — iframe이 순서 역전/stale 스냅샷 판별·진단. */
|
|
10
|
+
revision: number;
|
|
11
|
+
}
|
|
12
|
+
/** iframe → 부모: 마운트 완료(부모는 이 신호에 최초 스냅샷을 push). */
|
|
13
|
+
export interface PreviewReadyMessage {
|
|
14
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
15
|
+
type: 'ready';
|
|
16
|
+
}
|
|
17
|
+
/** iframe → 부모: 콘텐츠 높이(부모가 iframe 높이 자동 맞춤 — 스크롤 이중화 방지). */
|
|
18
|
+
export interface PreviewResizeMessage {
|
|
19
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
20
|
+
type: 'resize';
|
|
21
|
+
height: number;
|
|
22
|
+
}
|
|
23
|
+
/** iframe → 부모: 렌더 오류(스파이크 진단 — 실 컴포넌트 마운트 실패 표면화). */
|
|
24
|
+
export interface PreviewErrorMessage {
|
|
25
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
26
|
+
type: 'error';
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
/** 부모가 보내는 메시지(iframe이 수신). */
|
|
30
|
+
export type PreviewOutbound = PreviewRenderMessage;
|
|
31
|
+
/** 부모가 받는 메시지(iframe이 송신). */
|
|
32
|
+
export type PreviewInbound = PreviewReadyMessage | PreviewResizeMessage | PreviewErrorMessage;
|
|
33
|
+
export declare function renderMessage(model: PartModel, revision: number): PreviewRenderMessage;
|
|
34
|
+
export declare function readyMessage(): PreviewReadyMessage;
|
|
35
|
+
export declare function resizeMessage(height: number): PreviewResizeMessage;
|
|
36
|
+
export declare function errorMessage(message: string): PreviewErrorMessage;
|
|
37
|
+
/** 부모 수신 필터 — iframe이 보낸 ready/resize/error만 통과. */
|
|
38
|
+
export declare function isPreviewInbound(data: unknown): data is PreviewInbound;
|
|
39
|
+
/** iframe 수신 필터 — 부모가 보낸 render만 통과. */
|
|
40
|
+
export declare function isPreviewOutbound(data: unknown): data is PreviewOutbound;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationIssue } from '../core/validation';
|
|
2
|
+
/** ruleId('CHK-CONTAIN-1') → 분류 라벨('담김'). 형식 불명 입력은 원문 폴백. */
|
|
3
|
+
export declare function issueCategoryLabel(ruleId: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* 이슈가 가리키는 부모 파트(containment 이슈의 contextRef) — 패널 그룹핑/내비용. UI는 대상이 항상
|
|
6
|
+
* 파트라 targetRef가 곧 문제 파트이고, 부모 맥락이 필요하면 contextRef를 쓴다(없으면 undefined).
|
|
7
|
+
*/
|
|
8
|
+
export declare function issueParentRef(issue: ValidationIssue): string | undefined;
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@g1cloud/ui-modeler-next",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "5.0.0-alpha.1",
|
|
5
|
+
"description": "Vue 3 visual UI-modeling / screen-design editor",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">= 24.10.0"
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/ui-modeler.umd.cjs",
|
|
14
|
+
"module": "./dist/ui-modeler.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/ui-modeler.js",
|
|
20
|
+
"require": "./dist/ui-modeler.umd.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./style.css": "./dist/ui-modeler-next.css"
|
|
23
|
+
},
|
|
24
|
+
"author": "l.kei@g1project.net",
|
|
25
|
+
"license": "LicenseRef-LICENSE",
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@g1cloud/open-bluesea-core": "1.0.0-alpha.9",
|
|
28
|
+
"vue": "^3.5.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@g1cloud/bluesea": "5.0.0-beta.29",
|
|
32
|
+
"@g1cloud/open-bluesea-core": "1.0.0-alpha.9",
|
|
33
|
+
"@tailwindcss/vite": "^4.1.0",
|
|
34
|
+
"@types/node": "^25.9.2",
|
|
35
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
36
|
+
"dayjs": "^1.11.21",
|
|
37
|
+
"jsdom": "^25.0.0",
|
|
38
|
+
"tailwindcss": "^4.1.0",
|
|
39
|
+
"typescript": "^5.6.0",
|
|
40
|
+
"vite": "^6.0.0",
|
|
41
|
+
"vite-plugin-dts": "^5.0.3",
|
|
42
|
+
"vitest": "^2.1.0",
|
|
43
|
+
"vue": "^3.5.0",
|
|
44
|
+
"vue-router": "^4.6.4",
|
|
45
|
+
"vue-tsc": "^2.1.0",
|
|
46
|
+
"vue3-youtube": "^0.1.9"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"dev": "vite",
|
|
50
|
+
"build": "vue-tsc --noEmit && vite build",
|
|
51
|
+
"preview": "vite preview",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:watch": "vitest",
|
|
54
|
+
"typecheck": "vue-tsc --noEmit"
|
|
55
|
+
}
|
|
56
|
+
}
|