PageSourceSearch

https://vectr.com/design/static/js/17.db0cd4bf.chunk.js

js vectr.com collected 2026-09-24 08:34:29 UTC 20,338 bytes, 1 lines download raw bytes

1(this["webpackJsonpvectr-next"]=this["webpackJsonpvectr-next"]||[]).push([[17],{454:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n,r=a(0);const l=["title","titleId"];function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}function o(e,t){let{title:a,titleId:o}=e,c=function(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,l);return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},c),a?r.createElement("title",{id:o},a):null,n||(n=r.createElement("path",{fill:"currentColor",d:"M4,4H11V2H4A2,2 0 0,0 2,4V11H4V4M10,13L6,18H18L15,14L12.97,16.71L10,13M17,8.5A1.5,1.5 0 0,0 15.5,7A1.5,1.5 0 0,0 14,8.5A1.5,1.5 0 0,0 15.5,10A1.5,1.5 0 0,0 17,8.5M20,2H13V4H20V11H22V4A2,2 0 0,0 20,2M20,20H13V22H20A2,2 0 0,0 22,20V13H20V20M4,13H2V20A2,2 0 0,0 4,22H11V20H4V13Z"})))}const c=r.forwardRef(o);a.p},456:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n,r=a(0);const l=["title","titleId"];function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}function o(e,t){let{title:a,titleId:o}=e,c=function(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,l);return r.createElement("svg",i({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"25px",height:"25px",viewBox:"0 0 25 25",enableBackground:"new 0 0 25 25",xmlSpace:"preserve",ref:t,"aria-labelledby":o},c),a?r.createElement("title",{id:o},a):null,n||(n=r.createElement("path",{fill:"currentColor",d:"M25,16.071c0,2.959-2.398,5.357-5.357,5.357H14.87v-4.874h3.836l-5.992-5.992 c-0.118-0.118-0.309-0.118-0.427,0l-5.992,5.992h3.786v4.874H5.357C2.398,21.429,0,19.03,0,16.071s2.398-5.357,5.357-5.357 c0-3.945,3.198-7.143,7.143-7.143s7.143,3.198,7.143,7.143C22.602,10.714,25,13.113,25,16.071z"})))}const c=r.forwardRef(o);a.p},458:function(e,t,a){"use strict";var n=a(260),r=a(261);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(a(0)),i=(0,n(a(262)).default)(l.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");t.default=i},471:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n,r=a(0);const l=["title","titleId"];function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}function o(e,t){let{title:a,titleId:o}=e,c=function(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,l);return r.createElement("svg",i({viewBox:"0 0 21 21",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},c),a?r.createElement("title",{id:o},a):null,n||(n=r.createElement("path",{fill:"currentColor",d:"M 9,3 H 5 V 0 L 0,5 5,10 V 7 H 9 V 3 M 3,11.94 V 19 a 2,2 0 0 0 2,2 h 14 a 2,2 0 0 0 2,-2 V 5 A 2,2 0 0 0 19,3 H 11.94 C 12,3.33 12,3.67 12,4 A 8,8 0 0 1 4,12 C 3.67,12 3.33,12 3,11.94 M 5,18 9.5,12 13,16.5 15.5,13.5 19,18 Z"})))}const c=r.forwardRef(o);a.p},520:function(e,t,a){"use strict";var n=a(0),r=(a(547),a(250)),l=a(386),i=a(395),o=a(850),c=a(369),s=a(467),d=a(45),u=a(3);t.a=e=>{let{onClose:t,fetchPresetData:a}=e;const m=Object(n.useRef)(null),[b,j]=Object(n.useState)(""),[p,g]=Object(n.useState)([]),[f,h]=Object(n.useState)(!0),[v,O]=Object(n.useState)(null),x=Object(n.useMemo)((()=>
1{if(!b.trim())return p;const e=b.toLowerCase().trim();return p.filter((t=>t.sample_title.toLowerCase().includes(e)))}),[b,p]);Object(n.useEffect)((()=>{let e=!0;return(async()=>{try{h(!0),O(null);const t=await a();if(!e)return;t.data&&Array.isArray(t.data)?g(t.data):(console.warn("Unexpected response format:",t),g([]))}catch(t){console.error("Failed to fetch presets:",t),e&&(O("Failed to load presets"),g([]))}finally{e&&h(!1)}})(),()=>{e=!1}}),[]);const y=e=>{t(e)};return Object(u.jsxs)("div",{className:"modal-overlay",children:[Object(u.jsx)(r.a,{className:"popup-close-btn",onClick:()=>y(void 0),children:Object(u.jsx)(c.a,{})}),Object(u.jsxs)("div",{ref:m,className:"modal-content positioned-modal",onClick:e=>e.stopPropagation(),children:[Object(u.jsx)("div",{className:"header",children:Object(d.b)("imagetoimage.presetpop.title")}),Object(u.jsx)(l.a,{style:{marginTop:"7px"},value:b,onChange:e=>{j(e.currentTarget.value)},variant:"outlined",placeholder:Object(d.b)("editor.search"),InputProps:{endAdornment:Object(u.jsx)(i.a,{position:"start",children:Object(u.jsx)(o.a,{component:s.j})})},size:"small",fullWidth:!0,disabled:f}),Object(u.jsx)("div",{className:"item-container",children:f?Object(u.jsx)("div",{className:"loading",children:Object(d.b)("imagetoimage.presetpop.loading")}):v?Object(u.jsx)("div",{className:"error",children:v}):x.length>0?x.map((e=>Object(u.jsxs)("div",{className:"item",onClick:()=>y(e),children:[Object(u.jsx)("img",{src:e.sample_cover_url}
1),Object(u.jsx)("div",{className:"title",children:e.sample_title})]},e.id))):Object(u.jsx)("div",{className:"no-results",children:Object(d.b)("imagetoimage.presetpop.nopresets")})})]})]})}},547:function(e,t,a){},612:function(e,t,a){"use strict";var n=a(41),r=a(178),l=a(69),i=a(389),o=a(399),c=a(712),s=a(438),d=a(250),u=a(386),m=a(527),b=a(180),j=a(0),p=a(19),g=a(183),f=a(45),h=a(65),v=a(30),O=a(458),x=a.n(O),y=a(471),w=a(456),N=a(520),I=a(102),_=a(369),C=a(23),S=a(453),A=a(451),P=a(11),k=a(461),R=a(131),M=a.n(R),E=a(103),H=a(457),L=(a(613),a(454)),B=a(455),V=a(452),D=a(111),K=a.n(D),T=a(3);const F=async e=>new Promise((t=>setTimeout(t,e)));t.a=()=>{const e=Object(p.d)(C.a),t=Object(n.a)(),a=(Object(p.d)(v.a),Object(p.d)(I.a)),O=Object(V.f)(),R=Object(r.a)({root:{borderRadius:"6px"},sliderRail:{background:"#45B017",opacity:.7}})(),{enqueueSnackbar:D}=Object(g.b)(),[z,U]=Object(j.useState)(""),q=Object(j.useMemo)((()=>({label:"Nano Banana Pro",value:"nano-banana-pro"})),[]),W=Object(j.useMemo)((()=>({label:"Nano Banana 2",value:"nano-banana2"})),[]),J=Object(j.useMemo)((()=>[q,W]),[q,W]),[Z,G]=Object(j.useState)(J[0]),X=Object(j.useMemo)((()=>[{name:Object(f.b)("magicedit.match-input-image"),value:"match_input_image"},{name:"1:1",value:"1:1"},{name:"2:3",value:"2:3"},{name:"3:2",value:"3:2"},{name:"3:4",value:"3:4"},{name:"4:3",value:"4:3"},{name:"4:5",value:"4:5"},{name:"5:4",value:"5:4"},{name:"9:16",value:"9:16"},{name:"16:9",value:"16:9"},{name:"21:9",value:"21:9"}]),[]),Q=Object(j.useMemo)((()=>[{name:Object(f.b)("magicedit.match-input-image"),value:"match_input_image"},{name:"1:1",value:"1:1"},{name:"1:4",value:"1:4"},{name:"1:8",value:"1:8"},{name:"2:3",value:"2:3"},{name:"3:2",value:"3:2"},{name:"3:4",value:"3:4"},{name:"4:1",value:"4:1"},{name:"4:3",value:"4:3"},{name:"4:5",value:"4:5"},{name:"5:4",value:"5:4"},{name:"8:1",value:"8:1"},{name:"9:16",value:"9:16"},{name:"16:9",value:"16:9"},{name:"21:9",value:"21:9"}]),[]),Y=Object(j.useMemo)((()=>[{name:"1K",value:"1K"},{name:"2K",value:"2K"},{name:"4K",value:"4K"}]),[]),$=Object(j.useMemo)((()=>[{name:"1K",value:"1K"},{name:"2K",value:"2K"}]),[]),[ee,te]=Object(j.useState)(Q),[ae,ne]=Object(j.useState)("match_input_image"),[re,le]=Object(j.useState)($),[ie,oe]=Object(j.useState)("1K"),[ce,se]=Object(j.useState)(void 0),de=()=>"4K"===ie?10:6,[ue,me]=Object(j.useState)(!1),[be,je]=Object(j.useState)(!1),[pe,ge]=Object(j.useState)(!1),[fe,he]=Object(j.useState)([]);Object(j.useEffect)((()=>{"nano-banana-pro"===Z.value?(te(X),le(Y),oe("1K")):"nano-banana2"===Z.value&&(te(Q),le($),oe("1K")),0===fe.length?ne("1:1"):ne("match_input_image")}),[Z,fe]);Object(j.useEffect)((()=>{var t,a;if(!e.showAINanoBananaDialog.value)return;const n=null!==(t=localStorage.getItem("selected-nano-banana"))&&void 0!==t?t:localStorage.getItem("selected-image-to-image");if(!n)return void console.log("[AINanoBanana] No stored sample found in localStorage");let r=null;try{r=JSON.parse(n),console.log("[AINanoBanana] Parsed stored sample",r)}catch(o){return void console.error("Failed to parse selected Image to Image sample",o)}if(!r)return void console.log("[AINanoBanana] Parsed sample is empty");if(U(null!==(a=r.prompt)&&void 0!==a?a:""),r.model){const e=J.find((e=>{var t,a;const n=null===(t=r)||void 0===t||null===(a=t.model)||void 0===a?void 0:a.toLowerCase();return e.value.toLowerCase()===n||e.label.toLowerCase()===n}));e&&G(e)}he([]);let l=!1;const i=r.sample_cover_url;return i&&(console.log("[AINanoBanana] Source URL to preload",i),(async()=>{try{const e=await fetch(i);if(!e.ok)throw new Error("Failed to fetch image: ".concat(e.status));const t=await e.blob(),a=await new Promise(((e,a)=>{const n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=e=>a(e),n.readAsDataURL(t)}));!l&&a&&he([a])}catch(o){console.error("Failed to preload Image to Image sample images",o)}})()),()=>{l=!0}}),[e.showAINanoBananaDialog.value,J]);const ve=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=[],n=Array.from(e).find((e=>"image/png"!==e.type&&"image/jpeg"!==e.type)),r=Array.from(e).filter((e=>"image/png"===e.type||"image/jpeg"===e.type));for(let o of r){const e=await Object(A.v)(o);a.push(e)}let l=[...fe];
1if(t){const e=a.shift();e&&(l.length>0&&l.shift(),l=[e,...l])}n&&D(Object(f.b)("imagetoimage.fileformat_error"),{variant:"error"});let i=[...l,...a];i.length>21&&(i=i.slice(0,21),D(Object(f.b)("imagetoimage.filecount_error",{maxCount:21}),{variant:"error"})),he([...i])},Oe=async()=>{const e=await Object(S.a)({multiple:!0,mimeTypes:["image/jpg","image/png"],extensions:[".jpg",".jpeg",".png"]});await ve(e)};return Object(T.jsxs)(T.Fragment,{children:[Object(T.jsx)("style",{children:"\n          .action-footer {\n          .left{\n              width: 350px !important;\n          }\n  }\n        "}),Object(T.jsx)(l.a,{container:!0,style:{height:"100%",overflow:"hidden"},children:Object(T.jsxs)("div",{className:"nanobanana-main-area",children:[Object(T.jsxs)("div",{className:"form-container",children:[Object(T.jsxs)("div",{className:"generator-presets",children:[Object(T.jsxs)(l.a,{container:!0,style:{borderRadius:"6px",border:"1px solid rgb(255, 255, 255)",display:"flex",marginBottom:"15px",alignItems:"center",width:"66%",marginRight:"15px",flexShrink:0,flexWrap:"nowrap"},children:[Object(T.jsx)(i.a,{style:{fontSize:"12px",marginLeft:"12px",color:"#ffffff"},children:Object(f.b)("premium_image_generator.generator")}),Object(T.jsx)(o.a,{className:"generator-select",style:{width:"100%",color:"#fff",height:"38px"},value:Z,onChange:e=>{const t=e.target.value;G(t)},children:J.map((e=>Object(T.jsx)(c.a,{value:e,children:e.label},e.value)))})]}),Object(T.jsx)(l.a,{container:!0,style:{borderRadius:"6px",border:"1px solid rgb(255, 255, 255)",display:"flex",marginBottom:"15px",alignItems:"center"},children:Object(T.jsx)("div",{style:{flex:"1",display:"flex",justifyContent:"center",alignItems:"center",height:"38px",cursor:"pointer"},onClick:()=>ge(!0),children:Object(T.jsx)("div",{className:"preset-btn",children:Object(f.b)("imagetoimage.preset-button")})})})]}),pe&&Object(T.jsx)(N.a,{fetchPresetData:A.y,onClose:e=>(e=>{if(e){const t=J.find((t=>t.value===e.model));t&&G(t),U(e.prompt)}ge(!1)})(e)}),Object(T.jsxs)("div",{style:{borderRadius:"6px",border:"1px solid #ffffff",color:"#fff",width:"100%",height:"88px",padding:"12px",display:"flex",alignItems:"flex-start"},className:"more-images-container source ".concat(be?"dragover":""),onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),je(!0)},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),je(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),je(!1)},onDrop:e=>{je(!1),(async e=>{var t,a;e.preventDefault(),e.stopPropagation(),null!==e&&void 0!==e&&null!==(t=e.dataTransfer)&&void 0!==t&&t.files&&await ve(null===e||void 0===e||null===(a=e.dataTransfer)||void 0===a?void 0:a.files)})(e)},children:[0===fe.length&&Object(T.jsxs)("div",{style:{display:"flex",width:"100%",height:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[Object(T.jsx)(L.a,{style:{width:"32px",height:"32px"},onClick:()=>{Oe()}}),Object(T.jsx)("div",{style:{color:"rgba(255, 255, 255, 0.7)"},children:Object(f.b)("outpainting.upload_drag_label")})]}),fe.length>0&&fe.map(((e,t)=>Object(T.jsxs)("div",{className:"more-image-item",children:[Object(T.jsx)("img",{className:"img",src:e,alt:""}),Object(T.jsx)(s.a,{className:"close-button",title:Object(f.b)("premium_image_generator.remove_image"),children:Object(T.jsx)(d.a,{onClick:t=>{t.stopPropagation();const a=fe.indexOf(e);he(fe.filter(((e,t)=>t!==a)))},children:Object(T.jsx)(_.a,{})})})]})))]}),Object(T.jsx)(u.a,{label:Object(f.b)("nanobanana.prompt"),multiline:!0,minRows:5,maxRows:17,variant:"filled",placeholder:Object(f.b)("nanobanana.prompt-placeholder"),className:"prompt-container",style:{borderRadius:"6px",border:"1px solid #ffffff",color:"#fff",height:"100%"},value:z,InputLabelProps:{shrink:!0,style:{color:"#fff"}},InputProps:{classes:R,disableUnderline:!0,style:{background:"#323f4e",height:"100%",display:"flex",alignItems:"flex-start"}},onChange:e=>U(e.target.value)}),Object(T.jsx)("div",{className:"aspect-ratio-container",children:Object(T.jsxs)(l.a,{container:!0,style:{borderRadius:"6px",border:"1px solid rgb(255, 255, 255)",display:"flex",alignItems:"center",flexWrap:"nowrap"},children:[Object(T.jsx)(i.a,{style:{fontSize:"12px",marginLeft:"12px",marginRight:"14px",color:"#ffffff",flexShrink:0},children:Object(f.b)("nanobanana.aspect-ratio")}),Object(T.jsx)(o.a,{style:{width:"100%",color:"#fff",height:"38px"},className:"aspect-ratio-select",value:ae,disabled:ue,onChange:e=>ne(e.target.value),children:ee.map((e=>Object(T.jsx)(c.a,{value:e.value,children:e.name},e.value)))})]})}),Object(T.jsx)("div",{className:"resolution-container",children:Object(T.jsxs)(l.a,{container:!0,style:{borderRadius:"6px",border:"1px solid rgb(255, 255, 255)",display:"flex",alignItems:"center",flexWrap:"nowrap"},children:[Object(T.jsx)(i.a,{style:{fontSize:"12px",marginLeft:"12px",marginRight:"14px",color:"#ffffff"},children:Object(f.b)("nanobanana.resolution")}),Object(T.jsx)(o.a,{style:{width:"100%",color:"#fff",height:"38px"},className:"resolution-select",value:ie,onChange:e=>oe(e.target.value),children:re.map((e=>Object(T.jsx)(c.a,{value:e.value,children:e.name},e.value)))})]})})]}),Object(T.jsx)("div",{className:"result-container",children:ce?Object(T.jsxs)(T.Fragment,{children:[Object(T.jsx)(s.a,{title:Object(f.b)("remove_object.update_original_tooltip"),children:Object(T.jsx)("div",{className:"transfer-button",onClick:()=>(e=>{let t=[...fe];t.shift();let a=[e,...t];a.length>21&&(a=a.slice(0,21),D(Object(f.b)("imagetoimage.filecount_error",{maxCount:21}),{variant:"error"})),he([...a])})(ce),children:Object(T.jsx)(y.a,{style:{color:"#45B017",width:"18px",height:"18px"}})})}),Object(T.jsx)("img",{src:ce,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}})]}):Object(T.jsx)(x.a,{style:{width:"72px",height:"72px"}})})]})}),Object(T.jsxs)("div",{className:"action-footer",children:[Object(T.jsx)("div",{className:"left",children:Object(T.jsx)("div",{className:"seed-result-container",children:Object(T.jsx)(m.a,{href:"../ai-generator-terms-of-service.html",target:"_blank",variant:"body1",color:"inherit",children:Object(f.b)("editor.ai_generator_tos")})})}),Object(T.jsxs)("div",{className:"right",children:[Object(T.jsxs)(b.a,{variant:"outlined",color:"default",onClick:Oe,children:[Object(T.jsx)(w.a,{style:{width:t.spacing(2.5),height:t.spacing(2.5),marginRight:"16px"}}),Object(f.b)("outpainting.upload_label")]}),Object(T.jsxs)("div",{style:{display:"flex",alignItems:"center"}
1,children:[ue&&ce&&Object(T.jsx)(T.Fragment,{children:Object(T.jsx)(s.a,{title:Object(f.b)("auto_enhance.replace_tooltip"),children:Object(T.jsx)(b.a,{variant:"outlined",color:"primary",onClick:async()=>{if(!ce)return;const{file:e,activeObj:t}=Object(k.b)()||{};if(!e||!t)return;v.a.requesting.set((e=>e+1));const a=setInterval((()=>{v.a.progress.set((e=>{return t=e,a=90,Math.floor(Math.random()*(a-t+1))+t;var t,a}))}),1e3),n=await new Promise((e=>{const a=new Image;a.src=ce,a.crossOrigin="Anonymous",a.onload=async()=>{const n=document.createElement("canvas");n.width=t.width,n.height=t.height;n.getContext("2d").drawImage(a,0,0,t.width,t.height);const r=n.toDataURL("image/jpeg"),l=await Object(A.G)(r);e(l)}}));Object(k.d)(t,n),await new Promise((e=>setTimeout((()=>e()),3e3))),clearInterval(a),v.a.requesting.set((e=>e>0?e-1:0)),v.a.progress.set(0),C.a.showAINanoBananaDialog.set(!1)},disabled:!ce,style:{marginRight:12},children:Object(f.b)("editor.replace")})})}),ce&&Object(T.jsxs)(T.Fragment,{children:[Object(T.jsx)(b.a,{style:{marginRight:"12px"},variant:"outlined",disabled:!ce,onClick:async()=>{(async e=>{try{const t=await Object(A.b)(e);M.a.saveAs(t,"image.png"),"dialog"===O&&await Object(V.a)(t)}catch(t){D(Object(f.b)("components.notify.save_failed"),{variant:"error"})}})(ce)},children:Object(f.b)("editor.download")}),"page"===O&&Object(T.jsx)(b.a,{style:{marginRight:"12px"},variant:"outlined",onClick:async()=>{Object(V.d)(ce,"Nano Banana")},children:Object(f.b)("editor.edit-image")})]}),Object(T.jsxs)(b.a,{variant:"outlined",disabled:0===fe.length&&""===z,onClick:Object(V.g)((async()=>{if(!(e=>{if(!Object(E.a)(e))return!1;if(z&&""!==z){const e=Object(H.a)(z,{minLength:3,only:["eng","cmn"]}),t=Object(P.g)(z,e);if(t)return D("".concat(Object(f.b)("editor.ai_image_generation_denied"),' "').concat(t.join('", "'),'".'),{variant:"error"}),!1}return!0})("AI_NANO_BANANA"))return;let e=[];
1if(fe.length>0&&(e=await Object(A.H)(fe),0===e.length))return;const t={model:Z.value,aspectRatio:ae,prompt:z,image_input:[...e],resolution:ie};await h.a.post("/images/nano-banana2",t).then((async e=>{let{data:t}=e;const n=t.urls.get,r=n.lastIndexOf("/"),l=n.substring(r+1,n.length);await(async(e,t)=>{const a=18e4,n=K.a.CancelToken.source(),r=setTimeout((()=>{n.cancel("Timeout exceeded")}),a),l=async()=>{if(n.token.reason)throw new Error("timeout: exceeded ".concat(a," ms"));try{const{data:a}=await h.a.get("/images/nano-banana2?predictionsId=".concat(e,"&resolution=").concat(t),{cancelToken:n.token});return"succeeded"===a.status?(clearTimeout(r),{url:Array.isArray(a.output)?a.output[0]:a.output}):"failed"===a.status?(clearTimeout(r),{url:void 0}):(await F(1500),l())}catch(i){if(K.a.isCancel(i))throw new Error("timeout: exceeded ".concat(a," ms"));return await F(1500),l()}};return l()})(l,ie).then((e=>{var t;let{url:n}=e;null===(t=a.ornull)||void 0===t||t.merge((e=>({credits:e.credits-de()}))),se(n)}))})).catch((()=>{D(Object(f.b)("imagetoimage.request_error"),{variant:"error"})}))}),6e4),children:[Object(f.b)("imagetoimage.generate"),Object(T.jsx)(B.a,{style:{width:t.spacing(2.5),height:t.spacing(2.5),margin:"0 8px"}}),de()]})]})]})]})]})}},613:function(e,t,a){},899:function(e,t,a){"use strict";a.r(t);var n=a(36),r=a(452),l=a(612),i=a(3);t.default=()=>{const e=Object(n.g)();return Object(i.jsx)(r.c,{mode:"page",onClose:()=>{localStorage.removeItem("selected-nano-banana"),localStorage.removeItem("open-nano-banana"),e.push("/design")},children:Object(i.jsx)(l.a,{})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.