PageSourceSearch

https://tinypoly.com/assets/chunks/BoD_X2Bw2.js

js tinypoly.com collected 2026-10-04 23:37:07 UTC 1,697 bytes, 1 lines download raw bytes

1import{i as e}from"./aKtaBQYM.js";import{_ as t,a as n,o as r}from"./FNoz6Tk7.js";import{t as i}from"./C3zvyadc.js";import{Ir as a,an as o}from"./BDBLwt9h.js";import{t as s}from"./AP0i2bQZ2.js";import{a as c,i as l,r as u,t as d}from"./D6Y-ivPK2.js";import{t as f}from"./B4OtWCI22.js";var p=e(t(),1),m=r();function h({isOpen:e,currentName:t,onClose:r,onRename:h}){let{t:g}=n(),[_,v]=(0,p.useState)(t),[y,b]=(0,p.useState)(``),[x,S]=(0,p.useState)(!1);(0,p.useEffect)(()=>{e&&(v(t),b(``),S(!1))},[e,t]);let C=(0,p.useCallback)(e=>{v(String(e)),b(``)},[]),w=(0,p.useCallback)(()=>{x||r()},[x,r]),T=(0,p.useCallback)(async()=>{if(x)return;let e=_.trim();if(!e){b(g(`rename.emptyError`));return}if(e===t){w();return}S(!0);let n=!1;try{n=await h(e)}catch{b(g(`rename.error`))}finally{S(!1)}n?r():b(g(`rename.error`))},[t,w,x,_,r,h,g]);return(0,m.jsxs)(d,{isOpen:e,onClose:w,width:`400px`,children:[(0,m.jsx)(c,{onClose:w,children:g(`rename.title`)}),(0,m.jsx)(u,{children:(0,m.jsxs)(`div`,{className:`rename-modal-content`,children:[(0,m.jsx)(`label`,{className:`rename-modal-label`,htmlFor:`rename-modal-name`,children:g(`rename.newName`)}),(0,m.jsx)(f,{id:`rename-modal-name`,type:`text`,value:_,onChange:C,autoFocus:!0,autoSelect:!0,disabled:x}),y&&(0,m.jsx)(`div`,{className:`rename-error`,children:y})]})}),(0,m.jsx)(l,{children:(0,m.jsxs)(`div`,{className:`rename-modal-actions`,children:[(0,m.jsxs)(s,{variant:`outlined`,onClick:w,disabled:x,children:[(0,m.jsx)(o,{}),g(`general.cancel`)]}),(0,m.jsxs)(s,{color:`primary`,variant:`default`,onClick:T,disabled:_.trim()===``||x,children:[x?(0,m.jsx)(i,{size:`small`}):(0,m.jsx)(a,{}),g(x?`common.loading`:`rename.button`)]})]})})]})}export{h as t};

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.