PageSourceSearch

https://recork.org/_app/immutable/nodes/17.Dy_JWNF2.js

js recork.org collected 2026-09-25 21:06:23 UTC 2,423 bytes, 2 lines download raw bytes

1import"../chunks/CWj6FrbW.js";import"../chunks/69_IOA4Y.js";import{p as x,g as y,o as U,h as B,i as W,a as l,b as q,s as P,k as C,l as s,e as i,m as D,c as m,r as u,f as h}from"../chunks/7a2fV5I9.js";import{i as M}from"../chunks/Dw-yaK-_.js";import{i as Q}from"../chunks/CWFN-V6k.js";import{t as c}from"../chunks/B1RxOmHW.js";import{g as _}from"../chunks/BnvOT63w.js";import{p as j}from"../chunks/BewnZnAa.js";import{c as z,f as H,d as A,e as G}from"../chunks/C33EP41Y.js";import{a as J,u as K,g as L}from"../chunks/BwF-AzEk.js";import{F as T}from"../chunks/Day8yLqD.js";import{S as X}from"../chunks/2p5Upk8k.js";import{g as Y}from"../chunks/BIMfEMVU.js";import{e as Z,c as ee,W as E}from"../chunks/DKKyCjZm.js";var te=h('<div class="px-[1rem] h-full min-w-0 overflow-x-hidden"><!></div>'),oe=h('<div class="flex items-center justify-center h-full"><div class=" pb-16"><!></div></div>');function _e(I,S){x(S,!1);const p=()=>i(R,"$i18n",a),d=()=>i(z,"$config",a),$=()=>i(G,"$settings",a),w=()=>i(j,"$page",a),[a,b]=P(),R=y("i18n");let o=D(null);const N=async t=>{var n,g,v;const e=Z(t.content);if(ee((e==null?void 0:e.required_open_webui_version)??"0.0.0",E)){c.error(p().t("Open WebUI version (v{{OPEN_WEBUI_VERSION}}) is lower than required version (v{{REQUIRED_VERSION}})",{OPEN_WEBUI_VERSION:E,REQUIRED_VERSION:(e==null?void 0:e.required_open_webui_version)??"0.0.0"}));return}await K(localStorage.token,s(o).id,{id:t.id,name:t.name,meta:t.meta,content:t.content}).catch(k=>(c.error(`${k}`),null))&&(c.success(p().t("Function updated successfully")),H.set(await L(localStorage.token)),A.set(await Y(localStorage.token,((g=(n=d())==null?void 0:n.features)==null?void 0:g.enable_direct_connections)&&(((v=$())==null?void 0:v.directConnections)??null),!1,!0)))};U(async()=>{var e,r;if(!((r=(e=d())==null?void 0:e.features)!=null&&r.enable_plugins)){_("/admin",{replaceState:!0});return}const t=w().url.searchParams.get("id");t&&(C(o,await J(localStorage.token,t).catch(n=>(c.error(`${n}`),_("/admin/functions"),null))),s(o))}),Q();var f=B(),O=W(f);{var F=t=>{var e=te(),r=m(e);T(r,{edit:!0,get id(){return s(o).id},get name(){return s(o).name},get meta(){return s(o).meta},get content(){return s(o).content},onSave:n=>{N(n)}}),u(e),l(t,e)},V=t=>{var e=oe(),r=m(e),n=m(r);X(n,{className:"size-5"}),u(r),u(e),l(t,e)};M(O,t=>{s(o)?t(F):t(V,-1)})}l(I,f),q(),b()}export{_e as component};
2//# sourceMappingURL=17.Dy_JWNF2.js.map

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.