1var z=Object.defineProperty,_=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var C=(e,t,o)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,y=(e,t)=>{for(var o in t||(t={}))B.call(t,o)&&C(e,o,t[o]);if(F)for(var o of F(t))H.call(t,o)&&C(e,o,t[o]);return e},j=(e,t)=>_(e,L(t));var S=(e,t,o)=>new Promise((u,m)=>{var x=s=>{try{l(o.next(s))}catch(d){m(d)}},g=s=>{try{l(o.throw(s))}catch(d){m(d)}},l=s=>s.done?u(s.value):Promise.resolve(s.value).then(x,g);l((o=o.apply(e,t)).next())});import{r as R,j as r}from"./react-vendor-BVeEtWib.js";import{B as q,c2 as A,C as K,l as M,I as X,b6 as $}from"./index-DOFpcHn6.js";import{u as G,E as T}from"./LabelsProvider-BB4H4TW-.js";import{a as Q}from"./query-vendor-bYEWgeIu.js";import{aV as U}from"./icons-vendor-BA4Mz4VL.js";import{u as V}from"./i18n-vendor-BIMhB-XO.js";import{F as i,a0 as Y,d as I,U as J,T as O,i as P,B as W}from"./chakra-vendor-CKKGuUzI.js";import"./runtime-vendor-BW7OjrgA.js";import"./sentry-vendor-CFRjtyRw.js";import"./core-vendor-1uFh8y-G.js";import"./router-vendor-DDwvmwvl.js";import"./ark-vendor-P-rf11il.js";import"./date-picker-vendor-DZEnvv2y.js";import"./position-vendor-LXGB3YuB.js";import"./motion-vendor-DJDFvA-Z.js";import"./openlayers-vendor-VlfTnamM.js";import"./map-style-vendor-vbFUfZsC.js";import"./select-vendor-BMQlIkDk.js";import"./useShortcuts-DZcocUgP.js";(function(){try{var e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="70bbe30a-4588-401f-8703-94ff7d1c2b4f",e._sentryDebugIdIdentifier="sentry-dbid-70bbe30a-4588-401f-8703-94ff7d1c2b4f")}catch(o){}})();const Z=()=>S(void 0,null,function*(){return yield $.getFonts()}),ee=()=>{const[e]=V(),{lightTextColor:t}=q(),{selectedIds:o,container:u,setContainer:m,saveHistory:x,loadFont:g,loadingFonts:l,loadedFonts:s}=G(),[d,v]=R.useState(""),{colorMode:E}=A(),{data:c}=Q({queryKey:["labels","fonts"],queryFn:()=>Z(),staleTime:1e3*60*60}),f=o.some(n=>{const h=u.find(b=>b.id===n);return h&&h.type===T.TEXT}),w=(c!=null?c:[]).filter(n=>n.fontName.toLowerCase().includes(d.toLowerCase())),N=n=>{f&&g(n.fontName,n.path).then(h=>{if(!h){X.error({title:"Schriftart konnte nicht geladen werden",duration:3e3});return}m(b=>{const a=[...b];return o.forEach(D=>{const p=a.findIndex(k=>k.id===D);p!==-1&&a[p].type===T.TEXT&&(a[p]=j(y({},a[p]),{element:j(y({},a[p].element),{fontFamily:n.fontName})}))}),x(a),a})})};return r.jsxs(i,{w:"full",height:"100%",flexDirection:"column",gap:K,children:[r.jsx(Y,{as:"h4",fontSize:"md",children:e("labels.font","Schriftart")}),!c||c.length===0?r.jsx(i,{justify:"center",py:4,children:r.jsx(I,{size:"md",color:M.blue[30],mr:2})}):r.jsxs(r.Fragment,{children:[r.jsx(i,{p:2,height:"40px",children:r.jsx(J,{name:"search-font",size:"sm",placeholder:e("labels.searchFont","Suche Schriftart..."),value:d,onChange:n=>v(n.target.value)})}),r.jsx(i,{w:"full",flexDirection:"column",gap:2,overflowY:"auto",h:{base:"810px",xl:"760px"},pb:4,children:w.length===0?r.jsx(i,{justify:"center",alignItems:"center",py:4,color:t,children:r.jsx(O,{fontSize:"sm",children:e("labels.noFontsFound","Keine Schriftarten gefunden")})}):w.map(n=>r.jsxs(i,{onClick:()=>N(n),cursor:f?"pointer":"not-allowed",opacity:f?1:.6,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",_hover:{transform:f?"scale(.98)":"none"},width:"full",p:2,height:"35px",minH:"35px",position:"relative",alignItems:"center",children:[r.jsx(P,{src:`https://api.app.memida.de/${n.img}`,alt:n.fontName,width:"auto",height:"100%",filter:E==="dark"?"invert(1) brightness(1.5)":"none"}),l[n.fontName]&&r.jsx(i,{position:"absolute",right:"10px",bg:"whiteAlpha.800",borderRadius:"full",p:1,children:r.jsx(I,{size:"xs",opacity:.5})}),s.has(n.fontName)&&!l[n.fontName]&&r.jsx(W,{position:"absolute",right:"10px",width:"10px",height:"10px",children:r.jsx(U,{})})]},n.fontName))})]})]})},we=ee;export{we as component};
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.