1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8617],{48746:(e,t,i)=>{i.d(t,{T:()=>n});var a=i(64685),r=i(18169),s=i(92375);let n=r.forwardRef(({className:e,...t},i)=>(0,a.jsx)("textarea",{className:(0,s.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:i,...t}));n.displayName="Textarea"},58006:(e,t,i)=>{i.d(t,{Bw:()=>u,Gv:()=>v,LD:()=>m,NJ:()=>b,To:()=>g,Tu:()=>p,_w:()=>x,gM:()=>w,sX:()=>s,t6:()=>c});var a=i(41931),r=i(14597);function s(e,t="1K"){let i=String(t||"1K").toUpperCase(),a="4K"===i?2880:"2K"===i?2048:1024,r=String(e||"").trim();if(!r||"auto"===r)return{width:a,height:a};let[n,d]=r.split(":").map(e=>Number(e));if(!Number.isFinite(n)||!Number.isFinite(d)||n<=0||d<=0||n===d)return{width:a,height:a};let h=n/d,c=Math.min(Math.max(h,.3333333333333333),3),u="4K"===i?3840:"2K"===i?2048:1280;return Number.isInteger(n)&&Number.isInteger(d)&&h>=.3333333333333333&&h<=3?function(e,t,i){var a,r;let s=l(e,t),n=e/s,d=t/s,h=(a=16/l(n,16),Math.abs(a*(r=16/l(d,16)))/l(a,r)),c=n*h,u=d*h,m=Math.max(1,Math.floor(i/Math.max(c,u))),g=Math.max(1,Math.ceil(Math.sqrt(655360/(c*u)))),f=Math.max(1,Math.floor(Math.min(3840/Math.max(c,u),Math.sqrt(8294400/(c*u)))));if(g>f||c>3840||u>3840){let a=e/t;return o(a>=1?i:i*a,a>=1?i/a:i)}let p=Math.min(Math.max(m,g),f),x={width:c*p,height:u*p},b=e/t,w=o(b>=1?i:i*b,b>=1?i/b:i);return x.width*x.height>=w.width*w.height*.95&&(Math.max(x.width,x.height)<=i||x.width*x.height<=786432)?x:w}(n,d,u):o(c>1?u:u*c,c>1?u/c:u)}function n({width:e,height:t}){return Number.isInteger(e)&&Number.isInteger(t)&&e>0&&t>0&&e%16==0&&t%16==0&&3840>=Math.max(e,t)&&e*t>=655360&&e*t<=8294400&&e/t>=1/3&&e/t<=3}function o(e,t){if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0)throw Error("Invalid image dimensions");let i=Math.max(1/3,Math.min(3,e/t)),a=Math.max(655360,Math.min(8294400,e*t)),r=Math.sqrt(a*i),s=Math.sqrt(a/i),o=Math.min(1,3840/Math.max(r,s));r*=o,s*=o;let l={width:1024,height:1024},d=1/0;for(let e=16;e<=3840;e+=16){let t=16*Math.ceil(Math.max(e/3,655360/e)/16),a=16*Math.floor(Math.min(3*e,3840,8294400/e)/16);if(!(t>a))for(let o of[16*Math.floor(e/i/16),16*Math.ceil(e/i/16),16*Math.round(s/16)]){let i={width:e,height:Math.max(t,Math.min(a,o))};if(!n(i))continue;let h=((e-r)/r)**2+((i.height-s)/s)**2;h<d&&(l=i,d=h)}}return l}function l(e,t){return 0===t?Math.abs(e):l(t,e%t)}let d=["1:1","3:4","4:5","2:3","9:16","4:3","5:4","3:2","16:9","21:9"],h=["21:9","2:1","16:9","3:2","7:5","4:3","5:4","1:1","4:5","3:4","5:7","2:3","9:16","1:2"];function c(e,t="text-to-image"){let i=t.includes("video"),s=e.includes("gpt-image"),n=e.includes("seedream"),o=e.includes("grok"),l=(0,a.H)(e),u=(0,a.eZ)(e),m=e.includes("nano-banana-2");return{ratios:i?["1:1","16:9","9:16","4:3","3:4","21:9"]:l?Object.keys(f):u?h:o?["1:1","2:1","20:9","19.5:9","16:9","4:3","3:2","2:3","3:4","9:16","9:19.5","9:20","1:2"]:m?[...d,"4:1","1:4","8:1","1:8"]:s||n?[...d,"16:10","9:21","3:1","1:3"]:d,resolutions:i?(0,r.yo)(e)?.resolutions||[]:(0,a.Mu)(e).map(e=>e.value),sizeType:s||n||l?"custom":"native",frameControl:"image-to-video"===t&&e.includes("minimax")?"omit":"image-to-video"===t&&e.includes("seedance-2.5")?"auto":"ratio",upscaled:i&&/minimax\/h3(?:\/|$)/.test(e)}}function u(e){let[t,i]=e.split(":").map(Number);return t>0&&i>0?t/i:NaN}function m(e,t){let i=e.normalize("NFKC"),a=[],r=[];for(let e of i.matchAll(/(?<![\d.])(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)(?![\d.:])/g)){if(/\d:$/.test(i.slice(0,e.index)))continue;let s=i.slice(Math.max(0,e.index-35),e.index),n=i.slice(e.index+e[0].length,e.index+e[0].length+18),o=/(?:--ar|aspect\s+ratio|宽髿¯|ç»å¹
|æ¯ä¾)\s*[:=ï¼]?\s*$/i.test(s);if(!o&&(/(?:(?:æ¯å|æ¶é´)[^\d]{0,8}|\b(?:score|scored|time|at)\b[^\d]{0,8})$/i.test(s)||/^\s*(?:am\b|pm\b|ç¹|å|æ¯å|çæ¯å)/i.test(n)||(/^(?:0\d)$/.test(e[1])||/^0\d$/.test(e[2])||/^\d{2}$/.test(e[2])&&!t.includes(`${Number(e[1])}:${Number(e[2])}`))&&23>=Number(e[1])&&59>=Number(e[2])))continue;let l=Number(e[1])/Number(e[2]),d=t.find(e=>1e-8>Math.abs(u(e)-l));d&&(o?a:r).push(d)}let s=[...new Set(a.length?a:r)];return{ratio:1===s.length?s[0]:void 0,conflict:s.length>1,matches:s}}function g(e="1:1",t="1K"){let i=u(e)||1,a="1K"===t.toUpperCase()?1048576:4194304,r=1048576===a?Math.
1ceil:Math.floor;return{width:8*r(Math.sqrt(a*i)/8),height:8*r(Math.sqrt(a/i)/8)}}let f={"1:1":{"1K":{width:1024,height:1024},"2K":{width:2048,height:2048}},"4:3":{"1K":{width:1152,height:864},"2K":{width:2304,height:1728}},"3:4":{"1K":{width:864,height:1152},"2K":{width:1728,height:2304}},"5:4":{"1K":{width:1120,height:896},"2K":{width:2240,height:1792}},"4:5":{"1K":{width:896,height:1120},"2K":{width:1792,height:2240}},"3:2":{"1K":{width:1248,height:832},"2K":{width:2496,height:1664}},"2:3":{"1K":{width:832,height:1248},"2K":{width:1664,height:2496}},"16:10":{"1K":{width:1280,height:800},"2K":{width:2560,height:1600}},"16:9":{"1K":{width:1280,height:720},"2K":{width:2560,height:1440}},"9:16":{"1K":{width:720,height:1280},"2K":{width:1440,height:2560}},"2:1":{"1K":{width:1440,height:720},"2K":{width:2880,height:1440}},"1:2":{"1K":{width:720,height:1440},"2K":{width:1440,height:2880}}};function p(e="1:1",t="1K"){return{...(f[e]||f["1:1"])["2K"===String(t).toUpperCase()?"2K":"1K"]}}function x(e,t,i={}){let r=c(e),o=i.aspect_ratio_selection??i.aspect_ratio??"auto",l=i.aspect_ratio_mode??("auto"===o?"auto":"manual");if(!["auto","manual"].includes(l))throw Error("Invalid image aspect ratio mode");let d=m(t,r.ratios),h="auto"===l?d.ratio||"1:1":o,f=(0,a.qH)(e)&&"string"==typeof h&&/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(h)&&u(h)>=1/3&&3>=u(h);if(!r.ratios.includes(h)&&!f)throw Error(`Unsupported aspect ratio: ${h}`);let b="custom"===r.sizeType?e.includes("seedream")?g(h,i.resolution):(0,a.H)(e)?p(h,i.resolution):s(h,i.resolution):void 0;if(b&&(0,a.qH)(e)&&!n(b))throw Error("Unsupported GPT image dimensions");if(i.image_size&&(!b||i.image_size.width!==b.width||i.image_size.height!==b.height))throw Error("Image dimensions do not match the selected aspect ratio and resolution");let w={...i,aspect_ratio_mode:l,aspect_ratio_selection:o,aspect_ratio:h,aspect_ratio_from_prompt:"auto"===l&&!!d.ratio,geometry_rule_version:1};return b?w.image_size=b:delete w.image_size,w}function b(e,t){let i,a,r=(i=e.width/e.height,1-Math.min(i,a="number"==typeof t?t:u(t))/Math.max(i,a));return r<=.05+1e-10?"original":r<=.15+1e-10?"preview":"compose"}function w(e,t,i={x:50,y:50}){let a=u(t);if(!Number.isFinite(a)||e.width<=0||e.height<=0)throw Error("Invalid crop dimensions");let r=Math.min(e.width,e.height*a),s=r/a;return{x:(e.width-r)*Math.max(0,Math.min(100,i.x))/100,y:(e.height-s)*Math.max(0,Math.min(100,i.y))/100,width:r,height:s}}function v(e){let t=l(e.width,e.height);return`${e.width/t}:${e.height/t}`}},59456:(e,t,i)=>{i.d(t,{TR:()=>f,bq:()=>m,eb:()=>p,gC:()=>g,l6:()=>h,s3:()=>c,yv:()=>u});var a=i(64685),r=i(33671);i(18169);var s=i(58990),n=i(60214),o=i(54336),l=i(53755),d=i(92375);function h(e){let t,i,n=(0,r.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(i=(0,a.jsx)(s.bL,{"data-slot":"select",...t}),n[2]=t,n[3]=i):i=n[3],i}function c(e){let t,i,n=(0,r.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(i=(0,a.jsx)(s.YJ,{"data-slot":"select-group",...t}),n[2]=t,n[3]=i):i=n[3],i}function u(e){let t,i,n=(0,r.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(i=(0,a.jsx)(s.WT,{"data-slot":"select-value",...t}),n[2]=t,n[3]=i):i=n[3],i}function m(e){let t,i,o,l,h,c,u,m=(0,r.c)(13);m[0]!==e?({className:i,size:l,children:t,...o}=e,m[0]=e,m[1]=t,m[2]=i,m[3]=o,m[4]=l):(t=m[1],i=m[2],o=m[3],l=m[4]);let g=void 0===l?"default":l;return m[5]!==i?(h=(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),m[5]=i,m[6]=h):h=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(s.In,{asChild:!0,children:(0,a.jsx)(n.A,{className:"size-4 opacity-50"})}),m[7]=c):c=m[7],m[8]!==t||m[9]!==o||m[10]!==g||m[11]!==h?(u=(0,a.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":g,className:h,...o,children:[t,c]}),m[8]=t,m[9]=o,m[10]=g,m[11]=h,m[12]=u):u=m[12],u}function g(e){let t,i,n,o,l,h,c,u,m,g,f=(0,r.c)(20);f[0]!==e?({className:i,children:t,position:o,...n}=e,f[0]=e,f[1]=t,f[2]=i,f[3]=n,f[4]=o):(t=f[1],i=f[2],n=f[3],o=f[4]);let p=void 0===o?"popper":o,w="popper"===p&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";f[5]!==i||f[6]!==w?(l=(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-[1100] max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",w,i),f[5]=i,f[6]=w,f[7]=l):l=f[7],f[8]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)(x,{}),f[8]=h):h=f[8];let v="popper"===p&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";return f[9]!==v?(c=(0,d.cn)("p-1",v),f[9]=v,f[10]=c):c=f[10],f[11]!==t||f[12]!==c?(u=(0,a.jsx)(s.LM,{className:c,children:t}),f[11]=t,f[12]=c,f[13]=u):u=f[13],f[14]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(b,{}),f[14]=m):m=f[14],f[15]!==p||f[16]!==n||f[17]!==l||f[18]!==u?(g=(0,a.jsx)(s.ZL,{children:(0,a.jsxs)(s.UC,{"data-slot":"select-content",className:l,position:p,...n,children:[h,u,m]})}),f[15]=p,f[16]=n,f[17]=l,f[18]=u,f[19]=g):g=f[19],g}function f(e){let t,i,n,o,l=(0,r.c)(8);return l[0]!==e?({className:t,...i}=e,l[0]=e,l[1]=t,l[2]=i):(t=l[1],i=l[2]),l[3]!==t?(n=(0,d.cn)("text-muted-foreground px-2 py-1.5 text-xs",t),l[3]=t,l[4]=n):n=l[4],l[5]!==i||l[6]!==n?(o=(0,a.jsx)(s.JU,{"data-slot":"select-label",className:n,...i}),l[5]=i,l[6]=n,l[7]=o):o=l[7],o}function p(e){let t,i,n,l,h,c,u,m=(0,r.c)(13);return m[0]!==e?({className:i,children:t,...n}=e,m[0]=e,m[1]=t,m[2]=i,m[3]=n):(t=m[1],i=m[2],n=m[3]),m[4]!==i?(l=(0,d.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),m[4]=i,m[5]=l):l=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(s.VF,{children:(0,a.jsx)(o.A,{className:"size-4"})})}),m[6]=h):h=m[6],m[7]!==t?(c=(0,a.jsx)(s.p4,{className:"min-w-0 flex-1",children:t}),m[7]=t,m[8]=c):c=m[8],m[9]!==n||m[10]!==l||m[11]!==c?(u=(0,a.jsxs)(s.q7,{"data-slot":"select-item",className:l,...n,children:[h,c]}),m[9]=n,m[10]=l,m[11]=c,m[12]=u):u=m[12],u}function x(e){let t,i,n,o,h,c=(0,r.c)(9);return c[0]!==e?({className:t,...i}=e,c[0]=e,c[1]=t,c[2]=i):(t=c[1],i=c[2]),c[3]!==t?(n=(0,d.cn)("flex cursor-default items-center justify-center py-1",t),c[3]=t,c[4]=n):n=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)(l.A,{className:"size-4"}),c[5]=o):o=c[5],c[6]!==i||c[7]!==n?(h=(0,a.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:n,...i,children:o}),c[6]=i,c[7]=n,c[8]=h):h=c[8],h}function b(e){let t,i,o,l,h,c=(0,r.c)(9);return c[0]!==e?({className:t,...i}=e,c[0]=e,c[1]=t,c[2]=i):(t=c[1],i=c[2]),c[3]!==t?(o=(0,d.cn)("flex cursor-default items-center justify-center py-1",t),c[3]=t,c[4]=o):o=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(n.A,{className:"size-4"}),c[5]=l):l=c[5],c[6]!==i||c[7]!==o?(h=(0,a.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:o,...i,children:l}),c[6]=i,c[7]=o,c[8]=h):h=c[8],h}},73183:(e,t,i)=>{i.d(t,{V:()=>s,i:()=>n});var a,r,s=((a={}).MUSIC="music",a.IMAGE="image",a.VIDEO="video",a.TEXT="text",a.SPEECH="speech",a),n=((r={}).PENDING="pending",r.PROCESSING="processing",r.SUCCESS="success",r.FAILED="failed",r.CANCELED="canceled",r)},89271:(e,t,i)=>{function a(e,t,i){let a=new URLSearchParams({url:e});return t&&a.set("filename",t),i&&a.set("taskId",i),`/api/proxy/file?${a.toString()}`}function r(e,t,i){let a=e.trim().replace(/[<>:"/\\|?*\x00-\x1f]+/g,"-").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,120)||"download",r=function(e,t){try{let t=new URL(e,"https://imgstyler.local").pathname.match(/\.([a-z0-9]{2,8})$/i);if(t?.[1])return t[1].toLowerCase()}catch{}return t.replace(/^\./,"").toLowerCase()}(t,i);return!r||a.toLowerCase().endsWith(`.${r}`)?a:`${a}.${r}`}i.d(t,{E:()=>a,e:()=>r})},96114:(e,t,i)=>{i.d(t,{J:()=>
1o});var a=i(64685),r=i(33671);i(18169);var s=i(22137),n=i(92375);function o(e){let t,i,o,l,d=(0,r.c)(8);return d[0]!==e?({className:t,...i}=e,d[0]=e,d[1]=t,d[2]=i):(t=d[1],i=d[2]),d[3]!==t?(o=(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),d[3]=t,d[4]=o):o=d[4],d[5]!==i||d[6]!==o?(l=(0,a.jsx)(s.b,{"data-slot":"label",className:o,...i}),d[5]=i,d[6]=o,d[7]=l):l=d[7],l}}}]);
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.