2025-01-03 00:20:48 +00:00
|
|
|
{"version":3,"file":"index-qpNewm3I.js","sources":["../../src/extensions/core/clipspace.ts","../../src/extensions/core/contextMenuFilter.ts","../../src/extensions/core/dynamicPrompts.ts","../../src/extensions/core/editAttention.ts","../../src/extensions/core/electronAdapter.ts","../../src/extensions/core/groupNodeManage.ts","../../src/extensions/core/widgetInputs.ts","../../src/extensions/core/groupNode.ts","../../src/extensions/core/groupOptions.ts","../../src/extensions/core/invertMenuScrolling.ts","../../node_modules/three/build/three.module.js","../../node_modules/three/examples/jsm/controls/OrbitControls.js","../../node_modules/three/examples/jsm/libs/fflate.module.js","../../node_modules/three/examples/jsm/curves/NURBSUtils.js","../../node_modules/three/examples/jsm/curves/NURBSCurve.js","../../node_modules/three/examples/jsm/loaders/FBXLoader.js","../../node_modules/three/examples/jsm/utils/BufferGeometryUtils.js","../../node_modules/three/examples/jsm/loaders/GLTFLoader.js","../../node_modules/three/examples/jsm/loaders/MTLLoader.js","../../node_modules/three/examples/jsm/loaders/OBJLoader.js","../../node_modules/three/examples/jsm/loaders/STLLoader.js","../../src/extensions/core/load3d.ts","../../src/extensions/core/maskEditorOld.ts","../../src/extensions/core/maskeditor.ts","../../src/extensions/core/nodeTemplates.ts","../../src/extensions/core/noteNode.ts","../../src/extensions/core/rerouteNode.ts","../../src/extensions/core/saveImageExtraOutput.ts","../../src/extensions/core/simpleTouchSupport.ts","../../src/extensions/core/slotDefaults.ts","../../src/extensions/core/uploadAudio.ts","../../src/extensions/core/uploadImage.ts","../../src/extensions/core/webcamCapture.ts"],"sourcesContent":["import { app } from '../../scripts/app'\nimport { ComfyApp } from '../../scripts/app'\nimport { $el, ComfyDialog } from '../../scripts/ui'\n\nexport class ClipspaceDialog extends ComfyDialog {\n static items: Array<\n HTMLButtonElement & {\n contextPredicate?: () => boolean\n }\n > = []\n static instance: ClipspaceDialog | null = null\n\n static registerButton(\n name: string,\n contextPredicate: () => boolean,\n callback: () => void\n ) {\n const item = $el('button', {\n type: 'button',\n textContent: name,\n contextPredicate: contextPredicate,\n onclick: callback\n })\n\n ClipspaceDialog.items.push(item)\n }\n\n static invalidatePreview() {\n if (\n ComfyApp.clipspace &&\n ComfyApp.clipspace.imgs &&\n ComfyApp.clipspace.imgs.length > 0\n ) {\n const img_preview = document.getElementById(\n 'clipspace_preview'\n ) as HTMLImageElement\n if (img_preview) {\n img_preview.src =\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\n img_preview.style.maxHeight = '100%'\n img_preview.style.maxWidth = '100%'\n }\n }\n }\n\n static invalidate() {\n if (ClipspaceDialog.instance) {\n const self = ClipspaceDialog.instance\n // allow reconstruct controls when copying from non-image to image content.\n const children = $el('div.comfy-modal-content', [\n self.createImgSettings(),\n ...self.createButtons()\n ])\n\n if (self.element) {\n // update\n if (self.element.firstChild) {\n self.element.removeChild(self.element.firstChild)\n }\n self.element.appendChild(children)\n } else {\n // new\n self.element = $el('div.comfy-modal', { parent: document.body }, [\n children\n ])\n }\n\n if (self.element.children[0].children.length <= 1) {\n self.element.children[0].appendChild(\n $el('p', {}, [\n 'Unable to find the features to edit content of a format stored in the current Clipspace.'\n ])\n )\n }\n\n ClipspaceDialog.invalidatePreview()\n }\n }\n\n constructor() {\n super()\n }\n\n createButtons() {\n const buttons = []\n\n for (let idx in ClipspaceDialog.items) {\n const item = ClipspaceDialog.ite
|