PageSourceSearch

https://crem.be/_astro/media-dialog-form.D3Ku9FTF.js

js crem.be collected 2026-09-25 05:23:40 UTC 2,029 bytes, 35 lines download raw bytes

1import{i as e,n as t,r as n,t as r}from"./decorate.CxuyirH_.js";import{r as i}from"./lit-html.bXkQa9PJ.js";import{t as a}from"./custom-element.DfQM5z2l.js";import"./decorators.zwJTjfFb.js";import{t as o}from"./button-style.D84dJK46.js";import{t as s}from"./input-style.DSOkBu2V.js";import{t as c}from"./label-style.DNSzYZR3.js";import{t as l}from"./form-style.D8y-e5QR.js";var u=class extends n{constructor(...e){super(...e),this.name=``,this.url=``}static{this.styles=[l,c,s,o,e`
2    input {
3      width: 100%;
4    }
5
6    footer {
7      display: flex;
8      padding-top: 16px;
9      gap: 4px;
10    }
11
12  `]}render(){return i`
13      <form @submit="${this.submit}">
14        <label>Nom</label>
15        <input id="name" required @change="${this.change}">
16        <label>Url</label>
17        <input id="url" required @change="${this.change}">
18        <footer>
19          <button type="button" @click="${this.cancel}" secondary>Annuler</button>
20          <button primary>Enregistrer</button>
21        </footer>
22      </form>
23    `}cancel(){this.dispatchEvent(new CustomEvent(`cancel`))}change(e){this[e.target.id]=e.target.value}submit(e){e.preventDefault(),this.dispatchEvent(new CustomEvent(`submit`,{detail:{name:this.name,url:this.url}}))}};r([t({type:String})],u.prototype,`name`,void 0),r([t({type:String})],u.prototype,`url`,void 0),u=r([a(`media-form`)],u);var d=class extends n{static{this.styles=e`
24   dialog::backdrop {
25      background: rgba(0,0,0,.8);
26    }
27 `}render(){return i`
28      <dialog>
29        <media-form name="${this.name}"
30                    url="${this.url}"
31                    @cancel="${this.close}"
32                    @submit="${this.submitHandle}">
33        </media-form>
34      </dialog>
35    `}firstUpdated(){this.shadowRoot.querySelector(`dialog`).showModal()}close(){this.remove()}submitHandle(e){this.submit(e),this.close()}};r([t({type:String})],d.prototype,`name`,void 0),r([t({type:String})],d.prototype,`url`,void 0),r([t({attribute:!1})],d.prototype,`submit`,void 0),d=r([a(`media-dialog-form`)],d);

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.