PageSourceSearch

https://aibr.org/build/assets/ImagePeopleForm-YisswJvJ.js

js aibr.org collected 2026-09-24 09:34:09 UTC 2,347 bytes, 1 lines download raw bytes

1import{r as j,W as y,j as e}from"./app-belrbPXN.js";import{I as v}from"./InputError-OZY4xCw_.js";import{P as b}from"./PrimaryButton-ZU7A18o6.js";import{_ as t}from"./Lang-BxT6IC8I.js";import{I as N}from"./ImageCropper-IhE9KBDS.js";import{M as C}from"./Modal-6Vut5sCv.js";import{i as I}from"./chunk-OFGZKCFR-6l-SjWzx.js";import{q as S}from"./transition-QhzdKtqK.js";import"./chunk-NXTXE2B3-LSC6jqGg.js";import"./chunk-3XT5V4LF-zg9JoeIL.js";import"./chunk-MCFSCOSB--WO4Tv9A.js";import"./import-0kiaZdOS.js";import"./chunk-3TAVD5Y3-JLEfvKNw.js";import"./chunk-2PIR7DFM-PKNoTa34.js";import"./chunk-XHQUSKIE-9yTKuk0T.js";import"./index-Cg9dHLmZ.js";import"./use-force-update-VB-OXXUy.js";import"./index-2kllFQyz.js";import"./chunk-MCG5YV3A-mwckgY4f.js";import"./chunk-EB2I5ZVA-WHwNbYK3.js";import"./chunk-BSXPKUBX-mpJVaeDf.js";import"./chunk-YOBXD5IP-I7dSNQUW.js";import"./chunk-6BQDBGF4-B566eCa_.js";import"./dialog-V36qtk1l.js";const V=l=>{const{id:o,image_active:c}=l,[a,i]=j.useState(!1),{data:m,setData:d,post:x,errors:u,progress:s,processing:g,recentlySuccessful:f}=y({id:o,image:c}),p=r=>{r.preventDefault(),x(route("backoffice.people.upload",o),{preserveScroll:!0})},h=r=>{d("image",r)},n=()=>{i(!1)};return e.jsxs("section",{className:"max-w-xl",children:[e.jsx("header",{children:e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:t("Photo")})}),e.jsxs("form",{onSubmit:p,className:"mt-6 space-y-6",encType:"multipart/form-data",children:[e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"text-white font-mono text-xs py-2 px-4 rounded-2xl mt-4 bg-sky-500 hover:bg-sky-600",onClick:()=>i(!0),children:t("Select image")}),a&&e.jsx(C,{show:a,onClose:n,children:e.jsx(N,{modalClose:n,updateChange:h})}),s&&e.jsxs("progress",{value:s.percentage,max:"100",children:[s.percentage,"%"]}),m.image&&e.jsx("figure",{className:"flex justify-start my-2",children:e.jsx(I,{src:m.image,width:240,isZoomed:!0})}),e.jsx(v,{className:"mt-2",message:u.image})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(b,{type:"button",onClick:p,disabled:g,children:t("Upload")}),e.jsx(S,{show:f,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-green-400",children:t("Saved")})})]})]})]})};export{V as ImagePeopleForm};

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.