PageSourceSearch

https://newsletter.adamkoszary.co.uk/assets/label-6Is4t9r1.js

js adamkoszary.co.uk collected 2026-09-29 02:59:31 UTC 2,939 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="60f9de14-8203-5511-82fa-18a158f4cc30")}catch(e){}}();
3import{a as e}from"./jsx-runtime-CMgEUHpv.js";import{V as t}from"./dist-CAHjj65Z.js";import{g as n,i as r,l as i,m as a,t as o}from"./render-D-6lIDot.js";import{n as s}from"./keyboard-BynAefDg.js";var c=e(t(),1);function l(e,t,n){let[r,i]=(0,c.useState)(n),o=e!==void 0,s=(0,c.useRef)(o),l=(0,c.useRef)(!1),u=(0,c.useRef)(!1);return o&&!s.current&&!l.current?(l.current=!0,s.current=o,console.error(`A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.`)):!o&&s.current&&!u.current&&(u.current=!0,s.current=o,console.error(`A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.`)),[o?e:r,a(e=>(o||i(e),t?.(e)))]}function u(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))f(n,d(t,r),i);return n}function d(e,t){return e?e+`[`+t+`]`:t}function f(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())f(e,d(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n==`boolean`?e.push([t,n?`1`:`0`]):typeof n==`string`?e.push([t,n]):typeof n==`number`?e.push([t,`${n}`]):n==null?e.push([t,``]):u(n,t,e)}function p(e){var t;let n=e?.form??e.closest(`form`);if(n){for(let t of n.elements)if(t!==e&&(t.tagName===`INPUT`&&t.type===`submit`||t.tagName===`BUTTON`&&t.type===`submit`||t.nodeName===`INPUT`&&t.type===`image`)){t.click();return}(t=n.requestSubmit)==null||t.call(n)}}var m=(0,c.createContext)(null);function h(){let e=(0,c.useContext)(m);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,h),e}return e}function g(){let[e,t]=(0,c.useState)([]);return[e.length>0?e.join(` `):void 0,(0,c.useMemo)(()=>function(e){let n=a(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),r=(0,c.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return c.createElement(m.Provider,{value:r},e.children)},[t])]}var _=`label`;function v(e,t){let r=s(),{id:a=`headlessui-label-${r}`,passive:c=!1,...l}=e,u=h(),d=i(t);n(()=>u.register(a),[a,u.register]);let f={ref:d,...u.props,id:a};return c&&(`onClick`in f&&(delete f.htmlFor,delete f.onClick),`onClick`in l&&delete l.onClick),o({ourProps:f,theirProps:l,slot:u.slot||{},defaultTag:_,name:u.name||`Label`})}var y=r(v),b=Object.assign(y,{});export{l as a,p as i,g as n,u as r,b as t};
4//# sourceMappingURL=label-6Is4t9r1.js.map
5//# debugId=60f9de14-8203-5511-82fa-18a158f4cc30

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.