mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
3 lines
33 KiB
JavaScript
3 lines
33 KiB
JavaScript
import{d as oe,s as g,h as j,v as X,o as b,c as w,j as e,t as l,F as U,E as _,e as q,a2 as m,a3 as F,a4 as f,a5 as ae,a as de,a6 as M,p as ue,l as pe,_ as ce}from"./framework.CszIUXhs.js";const re={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},be={type:"external",source:"apcu"},we={type:"builtin"},ge={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},xe={type:"builtin"},me={type:"builtin"},ye={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},he={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},ve={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},fe={type:"external",source:"ext-ds"},ze={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Se={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},De={type:"builtin"},Be={support:{Linux:"no",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},ke={type:"builtin"},qe={type:"builtin"},Ee={type:"builtin","lib-suggests":["openssl"]},We={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ce={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},Ie={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Pe={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gmp"]},Le={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Ue={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},_e={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Ne={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Oe={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Ve={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Ae={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Te={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},je={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"]},$e={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},Ge={type:"builtin","arg-type":"custom"},Xe={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Me={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","lib-depends":["zlib"],"ext-depends":["session"]},Re={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},He={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"]},Fe={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable"},Ze={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},Qe={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},Ke={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Ye={type:"builtin","arg-type-unix":"custom"},Je={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},ei={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},ii={support:{Windows:"no"},type:"builtin","unix-only":!0},si={type:"builtin"},li={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},ti={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","ext-depends":["pdo","pgsql"],"lib-depends":["postgresql"]},ni={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},oi={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},ai={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-prefix","lib-depends":["postgresql"]},di={type:"builtin","ext-depends":["zlib"]},ui={support:{Windows:"no"},type:"builtin","unix-only":!0},pi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},ci={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},ri={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["readline"]},bi={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},wi={type:"builtin"},gi={type:"builtin"},xi={type:"external",source:"ext-simdjson","cpp-extension":!0},mi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},yi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},hi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},vi={type:"builtin"},fi={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},zi={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Si={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["sqlite"]},Di={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Bi={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends-windows":["openssl","zlib"]},ki={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},qi={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},Ei={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Wi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Ci={support:{BSD:"wip"},type:"builtin"},Ii={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["tidy"]},Pi={type:"builtin"},Li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-prefix","lib-depends":["libuuid"]},Ui={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-prefix","lib-depends":["libuv"],"ext-depends":["sockets"]},_i={type:"builtin",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Ni={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"]},Oi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},Vi={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"]},Ai={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"]},Ti={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},ji={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},$i={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","ext-depends-unix":["igbinary"]},Gi={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["libyaml"]},Xi={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},Mi={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"]},Ri={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},Hi={amqp:re,apcu:be,bcmath:we,bz2:ge,calendar:xe,ctype:me,curl:ye,dba:he,dom:ve,ds:fe,enchant:ze,event:Se,exif:De,ffi:Be,fileinfo:ke,filter:qe,ftp:Ee,gd:We,gettext:Ce,glfw:Ie,gmp:Pe,gmssl:Le,iconv:Ue,igbinary:_e,imagick:Ne,imap:Oe,inotify:Ve,intl:Ae,ldap:Te,libxml:je,mbregex:$e,mbstring:Ge,mcrypt:Xe,memcache:Me,memcached:Re,mongodb:He,msgpack:Fe,mysqli:Ze,mysqlnd:Qe,oci8:Ke,opcache:Ye,openssl:Je,parallel:ei,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-prefix","lib-depends":["libargon2"]},pcntl:ii,pdo:si,pdo_mysql:li,pdo_pgsql:ti,pdo_sqlite:ni,pdo_sqlsrv:oi,pgsql:ai,phar:di,posix:ui,protobuf:pi,rar:ci,readline:ri,redis:bi,session:wi,shmop:gi,simdjson:xi,simplexml:mi,snappy:yi,soap:hi,sockets:vi,sodium:fi,spx:zi,sqlite3:Si,sqlsrv:Di,ssh2:Bi,swoole:ki,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:qi,sysvmsg:Ei,sysvsem:Wi,sysvshm:Ci,tidy:Ii,tokenizer:Pi,uuid:Li,uv:Ui,xdebug:_i,xhprof:Ni,xlswriter:Oi,xml:Vi,xmlreader:Ai,xmlwriter:Ti,xsl:ji,yac:$i,yaml:Gi,zip:Xi,zlib:Mi,zstd:Ri},Fi={source:"brotli","static-libs-unix":["libbrotlidec.a","libbrotlienc.a","libbrotlicommon.a"],"static-libs-windows":["brotlicommon.lib","brotlienc.lib","brotlidec.lib"],headers:["brotli"]},Zi={source:"bzip2","static-libs-unix":["libbz2.a"],"static-libs-windows":["libbz2.lib","libbz2_a.lib"],headers:["bzlib.h"]},Qi={source:"curl","static-libs-unix":["libcurl.a"],"static-libs-windows":["libcurl_a.lib"],headers:["curl"],"lib-depends-unix":["openssl","zlib"],"lib-depends-windows":["openssl","zlib","libssh2","nghttp2"],"lib-suggests-unix":["libssh2","brotli","nghttp2","zstd","libcares"],"lib-suggests-windows":["brotli","zstd"],frameworks:["CoreFoundation","CoreServices","SystemConfiguration"]},Ki={source:"freetype","static-libs-unix":["libfreetype.a"],"static-libs-windows":["libfreetype_a.lib"],"headers-unix":["freetype2/freetype/freetype.h","freetype2/ft2build.h"],"lib-depends":["zlib"],"lib-suggests":["libpng","bzip2","brotli"]},Yi={source:"gettext","static-libs-unix":["libintl.a"],"lib-depends":["libiconv"],"lib-suggests":["ncurses","libxml2"],frameworks:["CoreFoundation"]},Ji={source:"ext-glfw","static-libs-unix":["libglfw3.a"],frameworks:["CoreVideo","OpenGL","Cocoa","IOKit"]},es={source:"gmp","static-libs-unix":["libgmp.a"],"static-libs-windows":["libgmp.lib"],headers:["gmp.h"]},is={source:"gmssl","static-libs-unix":["libgmssl.a"],"static-libs-windows":["gmssl.lib"],frameworks:["Security"]},ss={source:"icu","cpp-library":!0,"static-libs-unix":["libicui18n.a","libicuio.a","libicuuc.a","libicudata.a"]},ls={source:"imagemagick","static-libs-unix":["libMagick++-7.Q16HDRI.a","libMagickWand-7.Q16HDRI.a","libMagickCore-7.Q16HDRI.a"],"lib-depends":["zlib","libpng","libjpeg","libwebp","freetype","libtiff"],"lib-suggests":["zstd","xz","bzip2","libzip","libxml2"]},ts={source:"imap","static-libs-unix":["libc-client.a"],"lib-suggests":["openssl"]},ns={source:"ldap","static-libs-unix":["liblber.a","libldap.a"],"lib-depends":["openssl","zlib","gmp","libsodium"]},os={source:"libargon2","static-libs-unix":["libargon2.a"]},as={source:"libavif","static-libs-unix":["libavif.a"],"static-libs-windows":["avif.lib"]},ds={source:"libcares","static-libs-unix":["libcares.a"],"headers-unix":["ares.h","ares_dns.h","ares_nameser.h","ares_rules.h"]},us={source:"libevent","static-libs-unix":["libevent.a","libevent_core.a","libevent_extra.a","libevent_openssl.a"],"lib-depends":["openssl"]},ps={source:"libffi","static-libs-unix":["libffi.a"],"static-libs-windows":["libffi.lib"],"headers-unix":["ffi.h","ffitarget.h"],"headers-windows":["ffi.h","fficonfig.h","ffitarget.h"]},cs={source:"libiconv","static-libs-unix":["libiconv.a","libcharset.a"],headers:["iconv.h","libcharset.h","localcharset.h"]},rs={source:"libjpeg","static-libs-unix":["libjpeg.a","libturbojpeg.a"],"static-libs-windows":["libjpeg_a.lib"],"lib-suggests-windows":["zlib"]},bs={source:"liblz4","static-libs-unix":["liblz4.a"]},ws={source:"libmemcached","static-libs-unix":["libmemcached.a","libmemcachedutil.a"]},gs={source:"libpng","static-libs-unix":["libpng16.a"],"static-libs-windows":["libpng16_static.lib","libpng_a.lib"],"headers-unix":["png.h","pngconf.h","pnglibconf.h"],"headers-windows":["png.h","pngconf.h"],"lib-depends":["zlib"]},xs={source:"librabbitmq","static-libs-unix":["librabbitmq.a"],"static-libs-windows":["rabbitmq.4.lib"],"lib-depends":["openssl"]},ms={source:"libsodium","static-libs-unix":["libsodium.a"]},ys={source:"libssh2","static-libs-unix":["libssh2.a"],"static-libs-windows":["libssh2.lib"],headers:["libssh2.h","libssh2_publickey.h","libssh2_sftp.h"],"lib-depends":["openssl"],"lib-suggests":["zlib"]},hs={source:"libtiff","static-libs-unix":["libtiff.a"]},vs={source:"libuuid","static-libs-unix":["libuuid.a"],headers:["uuid/uuid.h"]},fs={source:"libuv","static-libs-unix":["libuv.a"]},zs={source:"libwebp","static-libs-unix":["libwebp.a","libwebpdecoder.a","libwebpdemux.a","libwebpmux.a","libsharpyuv.a"],"static-libs-windows":["libwebp.lib","libwebpdecoder.lib","libwebpdemux.lib","libsharpyuv.lib"]},Ss={source:"libxml2","static-libs-unix":["libxml2.a"],"static-libs-windows":["libxml2s.lib","libxml2_a.lib"],headers:["libxml2"],"lib-depends-unix":["libiconv"],"lib-suggests-unix":["xz","icu","zlib"],"lib-depends-windows":["libiconv-win"],"lib-suggests-windows":["zlib"]},Ds={source:"libxslt","static-libs-unix":["libxslt.a","libexslt.a"],"lib-depends":["libxml2"]},Bs={source:"libyaml","static-libs-unix":["libyaml.a"],"static-libs-windows":["yaml.lib"],headers:["yaml.h"]},ks={source:"libzip","static-libs-unix":["libzip.a"],"static-libs-windows":["zip.lib","libzip_a.lib"],headers:["zip.h","zipconf.h"],"lib-depends-unix":["zlib"],"lib-suggests-unix":["bzip2","xz","zstd","openssl"],"lib-depends-windows":["zlib","bzip2","xz"],"lib-suggests-windows":["zstd","openssl"]},qs={source:"ncurses","static-libs-unix":["libncurses.a"]},Es={source:"nghttp2","static-libs-unix":["libnghttp2.a"],"static-libs-windows":["nghttp2.lib"],headers:["nghttp2"],"lib-depends":["zlib","openssl"],"lib-suggests":["libxml2"]},Ws={source:"onig","static-libs-unix":["libonig.a"],"static-libs-windows":["onig.lib","onig_a.lib"],headers:["oniggnu.h","oniguruma.h"]},Cs={source:"openssl","static-libs-unix":["libssl.a","libcrypto.a"],"static-libs-windows":["libssl.lib","libcrypto.lib"],headers:["openssl"],"lib-depends":["zlib"]},Is={source:"postgresql","static-libs-unix":["libpq.a","libpgport.a","libpgcommon.a"],"lib-depends":["libiconv","libxml2","openssl","zlib","readline"],"lib-suggests":["icu","libxslt","ldap","zstd"]},Ps={source:"pthreads4w","static-libs-windows":["libpthreadVC3.lib"]},Ls={source:"qdbm","static-libs-unix":["libqdbm.a"],"static-libs-windows":["qdbm_a.lib"],"headers-windows":["depot.h"]},Us={source:"readline","static-libs-unix":["libreadline.a"],"lib-depends":["ncurses"]},_s={source:"snappy","static-libs-unix":["libsnappy.a"],"headers-unix":["snappy.h","snappy-c.h","snappy-sinksource.h","snappy-stubs-public.h"],"lib-depends":["zlib"]},Ns={source:"sqlite","static-libs-unix":["libsqlite3.a"],"static-libs-windows":["libsqlite3_a.lib"],headers:["sqlite3.h","sqlite3ext.h"]},Os={source:"tidy","static-libs-unix":["libtidy.a"]},Vs={source:"unixodbc","static-libs-unix":["libodbc.a","libodbccr.a","libodbcinst.a"],"lib-depends":["libiconv"]},As={source:"xz","static-libs-unix":["liblzma.a"],"static-libs-windows":["lzma.lib","liblzma_a.lib"],"headers-unix":["lzma"],"headers-windows":["lzma","lzma.h"],"lib-depends-unix":["libiconv"]},Ts={source:"zlib","static-libs-unix":["libz.a"],"static-libs-windows":["zlib_a.lib"],headers:["zlib.h","zconf.h"]},js={source:"zstd","static-libs-unix":["libzstd.a"],"static-libs-windows":[["zstd.lib","zstd_static.lib"]],"headers-unix":["zdict.h","zstd.h","zstd_errors.h"],"headers-windows":["zstd.h","zstd_errors.h"]},$s={brotli:Fi,bzip2:Zi,curl:Qi,freetype:Ki,gettext:Yi,glfw:Ji,gmp:es,gmssl:is,icu:ss,imagemagick:ls,imap:ts,ldap:ns,libargon2:os,libavif:as,libcares:ds,libevent:us,libffi:ps,"libffi-win":{source:"libffi-win","static-libs-windows":["libffi.lib"],"headers-windows":["ffi.h","ffitarget.h","fficonfig.h"]},libiconv:cs,"libiconv-win":{source:"libiconv-win","static-libs-windows":["libiconv.lib","libiconv_a.lib"]},libjpeg:rs,liblz4:bs,libmemcached:ws,libpng:gs,librabbitmq:xs,libsodium:ms,libssh2:ys,libtiff:hs,libuuid:vs,libuv:fs,libwebp:zs,libxml2:Ss,libxslt:Ds,libyaml:Bs,libzip:ks,ncurses:qs,nghttp2:Es,onig:Ws,openssl:Cs,"pkg-config":{source:"pkg-config"},postgresql:Is,pthreads4w:Ps,qdbm:Ls,readline:Us,snappy:_s,sqlite:Ns,tidy:Os,unixodbc:Vs,xz:As,zlib:Ts,zstd:js};function C(i,s,o,u){return i.os==="linux"?i[s][o][u+"-linux"]??i[s][o][u+"-unix"]??i[s][o][u]??[]:i.os==="macos"?i[s][o][u+"-macos"]??i[s][o][u+"-unix"]??i[s][o][u]??[]:i.os==="windows"?i[s][o][u+"-windows"]??i[s][o][u]??[]:[]}function Z(i,s){return C(i,"ext",s,"ext-depends")}function Gs(i,s){return C(i,"ext",s,"ext-suggests")}function Xs(i,s){return C(i,"ext",s,"lib-depends")}function Ms(i,s){return C(i,"ext",s,"lib-suggests")}function Q(i,s){return C(i,"lib",s,"lib-depends")}function Rs(i,s){return C(i,"lib",s,"lib-suggests")}function Hs(i,s){const o=[],u=new Set,y=[];s.forEach(S=>{u.has(S)||Qs(i,S,u,o)});const z=[];return o.forEach(S=>{s.indexOf(S)===-1&&y.push(S),[...Xs(i,S),...Ms(i,S)].forEach(O=>{z.indexOf(O)===-1&&z.push(O)})}),{exts:o,libs:Fs(i,z),notIncludedExts:y}}function Fs(i,s){const o=[],u=new Set;return s.forEach(y=>{u.has(y)||(console.log("before visited"),console.log(u),Zs(i,y,u,o),console.log("after visited"),console.log(u))}),o}function Zs(i,s,o,u){if(o.has(s))return;o.add(s),[...Q(i,s),...Rs(i,s)].forEach(z=>{K(i,z,o,u)}),u.push(s)}function K(i,s,o,u){o.has(s)||(o.add(s),Q(i,s).forEach(y=>{K(i,y,o,u)}),u.push(s))}function Y(i,s,o,u){o.has(o)||(o.add(s),Z(i,s).forEach(y=>{Y(i,y,o,u)}),u.push(s))}function Qs(i,s,o,u){if(o.has(s))return;o.add(s),[...Z(i,s),...Gs(i,s)].forEach(z=>{Y(i,z,o,u)}),u.push(s)}const N=i=>(ue("data-v-c44ab356"),i=i(),pe(),i),Ks={class:"option-line"},Ys=["id","value","disabled"],Js=["for"],el={class:"box"},il={class:"ext-item"},sl={key:0},ll=["id","value","disabled"],tl=["for"],nl={class:"details custom-block"},ol={class:"box"},al={class:"ext-item"},dl=["id","value","disabled"],ul=["for"],pl={class:"tip custom-block"},cl=N(()=>e("p",{class:"custom-block-title"},"TIP",-1)),rl={class:"box"},bl={class:"ext-item"},wl=["id","value"],gl=["for"],xl={key:1,class:"warning custom-block"},ml=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),yl={key:2,class:"warning custom-block"},hl=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),vl={value:"native"},fl={value:"spc"},zl={key:0,value:"docker"},Sl=["value"],Dl={for:"debug-yes"},Bl={for:"debug-no"},kl={for:"zts-yes"},ql={for:"zts-no"},El={for:"show-download-yes"},Wl={for:"show-download-no"},Cl={for:"pre-built-yes"},Il={for:"pre-built-no"},Pl={key:0},Ll={for:"upx-yes"},Ul={for:"upx-no"},_l=["placeholder"],Nl={key:3,class:"command-container"},Ol={key:0,class:"command-preview"},Vl=N(()=>e("br",null,null,-1)),Al={key:1},Tl={class:"warning custom-block"},jl=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),$l={key:4,class:"command-container"},Gl={class:"command-preview"},Xl={key:5,class:"command-container"},Ml={class:"command-preview"},Rl={key:6,class:"command-container"},Hl={class:"command-preview"},Fl={class:"command-container"},Zl={class:"command-preview"},Ql={name:"CliGenerator"},Kl=oe({...Ql,props:{lang:{type:String,default:"zh"}},setup(i){const s=g(Hi),o=g($s),u=g([]),y=[{os:"linux",label:"Linux",disabled:!1},{os:"macos",label:"macOS",disabled:!1},{os:"windows",label:"Windows",disabled:!1}],z=(x,n)=>{var r,k;const p=new Map([["linux","Linux"],["macos","Darwin"],["windows","Windows"]]).get(n),d=((k=(r=s.value[x])==null?void 0:r.support)==null?void 0:k[p])??"yes";return d==="yes"||d==="partial"},S=["7.4","8.0","8.1","8.2","8.3"],a={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建(Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini,每行写一个,例如:memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTips:"选择扩展后,不可选中的项目为必需的依赖,编译的依赖库列表中可选的为现有扩展和依赖库的可选依赖。选择可选依赖后,将生成 --with-libs 参数。",microUnavailable:"micro 不支持 PHP 7.4 及更早版本!",windowsSAPIUnavailable:"Windows 目前不支持 fpm、embed 构建!",useUPX:"是否开启 UPX 压缩(减小二进制体积)",windowsDownSPCWarning:"Windows 下请手动下载 spc.exe 二进制文件并解压到当前目录!",usePreBuilt:"如果可能,下载预编译的依赖库(减少编译时间)"},en:{selectExt:"Select Extensions",buildTarget:"Build Target",buildOptions:"Build Options",buildEnvironment:"Build Environment",buildEnvNative:"Native build (Git source code)",buildEnvSpc:"Native build (standalone spc binary)",buildEnvDocker:"Alpine docker build",useDebug:"Enable debug message",yes:"Yes",no:"No",resultShow:"Result",selectCommon:"Select common extensions",selectNone:"Unselect all",useZTS:"Enable ZTS",hardcodedINI:"Hardcoded INI options",hardcodedINIPlacehoder:"If you need to hardcode ini, write one per line, for example: memory_limit=2G",resultShowDownload:"Download with corresponding extension dependencies",downloadExtOnlyCommand:"Download sources by extensions command",downloadAllCommand:"Download all sources command",downloadUPXCommand:"Download UPX command",compileCommand:"Compile command",downloadPhpVersion:"Download PHP version",downloadSPCBinaryCommand:"Download spc binary command",selectedArch:"Select build architecture",selectedSystem:"Select Build OS",buildLibs:"Select Dependencies",depTips:"After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.",microUnavailable:"Micro does not support PHP 7.4 and earlier versions!",windowsSAPIUnavailable:"Windows does not support fpm and embed build!",useUPX:"Enable UPX compression (reduce binary size)",windowsDownSPCWarning:"Please download the spc.exe binary file manually and extract it to the current directory on Windows!",usePreBuilt:"Download pre-built dependencies if possible (reduce compile time)"}},O=["cli","fpm","micro","embed","all"],J=()=>{h.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},R=j(()=>h.value.join(",")),ee=j(()=>{const x=D.value.filter(n=>V.value.indexOf(n)===-1);return x.length>0?' --with-libs="'+x.join(",")+'"':""}),h=g([]),D=g([]),$=g([]),V=g([]),v=g(["cli"]),A=g("native"),I=g("8.2"),B=g(0),P=g(0),L=g(1),W=g(1),E=g(0),G=g(""),c=g("linux"),ie=g("x86_64"),T=j(()=>{switch(A.value){case"native":return"bin/spc";case"spc":return c.value==="windows"?".\\spc.exe":"./spc";case"docker":return"bin/spc-alpine-docker";default:return""}}),H=g("--build-cli"),se=j(()=>{const x=G.value.split(`
|
||
`);let n=[];return x.forEach(t=>{t.indexOf("=")>=1&&n.push(t)})," "+n.map(t=>'-I "'+t+'"').join(" ")}),le=x=>{let n;v.value.indexOf("all")!==-1&&x.target.value==="all"?v.value=["all"]:(n=v.value.indexOf("all"))!==-1&&x.target.value!=="all"&&v.value.splice(n,1),H.value=v.value.map(t=>"--build-"+t).join(" ")},te=x=>{const n=new Set,t=p=>{let d=[];if(c.value==="linux"){if(d=s.value[p]["ext-depends-linux"]??s.value[p]["ext-depends-unix"]??s.value[p]["ext-depends"]??[],d.length===0)return}else if(c.value==="macos"){if(d=s.value[p]["ext-depends-macos"]??s.value[p]["ext-depends-unix"]??s.value[p]["ext-depends"]??[],d.length===0)return}else if(c.value==="windows"&&(d=s.value[p]["ext-depends-windows"]??s.value[p]["ext-depends"]??[],d.length===0))return;d.forEach(r=>{n.add(r),t(r)})};return x.forEach(p=>{t(p)}),Array.from(n)},ne=x=>{const n=new Set,t=d=>{let r=[];if(c.value==="linux"){if(r=o.value[d]["lib-depends-linux"]??o.value[d]["lib-depends-unix"]??o.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="macos"){if(r=o.value[d]["lib-depends-macos"]??o.value[d]["lib-depends-unix"]??o.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="windows"&&(r=o.value[d]["lib-depends-windows"]??o.value[d]["lib-depends"]??[],r.length===0))return;r.forEach(k=>{n.add(k),t(k)})},p=d=>{let r=[];if(c.value==="linux"){if(r=s.value[d]["lib-depends-linux"]??s.value[d]["lib-depends-unix"]??s.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="macos"){if(r=s.value[d]["lib-depends-macos"]??s.value[d]["lib-depends-unix"]??s.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="windows"&&(r=s.value[d]["lib-depends-windows"]??s.value[d]["lib-depends"]??[],r.length===0))return;r.forEach(k=>{n.add(k),t(k)})};return x.forEach(d=>{p(d)}),Array.from(n)};return X(c,()=>h.value=[]),X(c,()=>E.value=0),X(h,x=>{$.value=te(x),$.value.forEach(t=>{h.value.indexOf(t)===-1&&h.value.push(t)}),h.value.sort(),console.log("检测到变化!"),console.log(x);const n=Hs({ext:s.value,lib:o.value,os:c.value},h.value);u.value=n.libs.sort(),D.value=[],V.value=ne(n.exts),V.value.forEach(t=>{D.value.indexOf(t)===-1&&D.value.push(t)})}),(x,n)=>(b(),w("div",null,[e("h2",null,l(a[i.lang].selectedSystem),1),e("div",Ks,[(b(),w(U,null,_(y,(t,p)=>e("span",{key:p,style:{"margin-right":"4px"}},[m(e("input",{type:"radio",id:"os-"+t.os,value:t.os,disabled:t.disabled===!0,"onUpdate:modelValue":n[0]||(n[0]=d=>c.value=d)},null,8,Ys),[[f,c.value]]),e("label",{for:"os-"+t.os},l(t.label),9,Js)])),64))]),e("h2",null,l(a[i.lang].selectExt)+l(h.value.length>0?" ("+h.value.length+")":""),1),e("div",el,[(b(!0),w(U,null,_(s.value,(t,p)=>(b(),w("div",il,[z(p,c.value)?(b(),w("span",sl,[m(e("input",{type:"checkbox",id:p,value:p,"onUpdate:modelValue":n[1]||(n[1]=d=>h.value=d),disabled:$.value.indexOf(p)!==-1},null,8,ll),[[M,h.value]]),e("label",{for:p},l(p),9,tl)])):q("",!0)]))),256))]),c.value!=="windows"?(b(),w("div",{key:0,class:"my-btn",onClick:J},l(a[i.lang].selectCommon),1)):q("",!0),e("div",{class:"my-btn",onClick:n[2]||(n[2]=t=>h.value=[])},l(a[i.lang].selectNone),1),e("details",nl,[e("summary",null,l(a[i.lang].buildLibs)+l(D.value.length>0?" ("+D.value.length+")":""),1),e("div",ol,[(b(!0),w(U,null,_(u.value,(t,p)=>(b(),w("div",al,[m(e("input",{type:"checkbox",id:p,value:t,"onUpdate:modelValue":n[3]||(n[3]=d=>D.value=d),disabled:V.value.indexOf(t)!==-1},null,8,dl),[[M,D.value]]),e("label",{for:p},l(t),9,ul)]))),256))])]),e("div",pl,[cl,e("p",null,l(a[i.lang].depTips),1)]),e("h2",null,l(a[i.lang].buildTarget),1),e("div",rl,[(b(),w(U,null,_(O,t=>e("div",bl,[m(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":n[4]||(n[4]=p=>v.value=p),onChange:le},null,40,wl),[[M,v.value]]),e("label",{for:"build_"+t},l(t),9,gl)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(b(),w("div",xl,[ml,e("p",null,l(a[i.lang].microUnavailable),1)])):q("",!0),c.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(b(),w("div",yl,[hl,e("p",null,l(a[i.lang].windowsSAPIUnavailable),1)])):q("",!0),e("h2",null,l(a[i.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,l(a[i.lang].buildEnvironment),1),e("td",null,[m(e("select",{"onUpdate:modelValue":n[5]||(n[5]=t=>A.value=t)},[e("option",vl,l(a[i.lang].buildEnvNative),1),e("option",fl,l(a[i.lang].buildEnvSpc),1),c.value!=="windows"?(b(),w("option",zl,l(a[i.lang].buildEnvDocker),1)):q("",!0)],512),[[F,A.value]])])]),e("tr",null,[e("td",null,l(a[i.lang].downloadPhpVersion),1),e("td",null,[m(e("select",{"onUpdate:modelValue":n[6]||(n[6]=t=>I.value=t)},[(b(),w(U,null,_(S,t=>e("option",{value:t},l(t),9,Sl)),64))],512),[[F,I.value]])])]),e("tr",null,[e("td",null,l(a[i.lang].useDebug),1),e("td",null,[m(e("input",{type:"radio",id:"debug-yes",value:1,"onUpdate:modelValue":n[7]||(n[7]=t=>B.value=t)},null,512),[[f,B.value]]),e("label",Dl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"debug-no",value:0,"onUpdate:modelValue":n[8]||(n[8]=t=>B.value=t)},null,512),[[f,B.value]]),e("label",Bl,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].useZTS),1),e("td",null,[m(e("input",{type:"radio",id:"zts-yes",value:1,"onUpdate:modelValue":n[9]||(n[9]=t=>P.value=t)},null,512),[[f,P.value]]),e("label",kl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"zts-no",value:0,"onUpdate:modelValue":n[10]||(n[10]=t=>P.value=t)},null,512),[[f,P.value]]),e("label",ql,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].resultShowDownload),1),e("td",null,[m(e("input",{type:"radio",id:"show-download-yes",value:1,"onUpdate:modelValue":n[11]||(n[11]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",El,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"show-download-no",value:0,"onUpdate:modelValue":n[12]||(n[12]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",Wl,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].usePreBuilt),1),e("td",null,[m(e("input",{type:"radio",id:"pre-built-yes",value:1,"onUpdate:modelValue":n[13]||(n[13]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",Cl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"pre-built-no",value:0,"onUpdate:modelValue":n[14]||(n[14]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",Il,l(a[i.lang].no),1)])]),c.value!=="macos"?(b(),w("tr",Pl,[e("td",null,l(a[i.lang].useUPX),1),e("td",null,[m(e("input",{type:"radio",id:"upx-yes",value:1,"onUpdate:modelValue":n[15]||(n[15]=t=>E.value=t)},null,512),[[f,E.value]]),e("label",Ll,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"upx-no",value:0,"onUpdate:modelValue":n[16]||(n[16]=t=>E.value=t)},null,512),[[f,E.value]]),e("label",Ul,l(a[i.lang].no),1)])])):q("",!0)]),e("h2",null,l(a[i.lang].hardcodedINI),1),m(e("textarea",{class:"textarea",placeholder:a[i.lang].hardcodedINIPlacehoder,"onUpdate:modelValue":n[17]||(n[17]=t=>G.value=t),rows:"5"},null,8,_l),[[ae,G.value]]),e("h2",null,l(a[i.lang].resultShow),1),A.value==="spc"?(b(),w("div",Nl,[e("b",null,l(a[i.lang].downloadSPCBinaryCommand),1),c.value!=="windows"?(b(),w("div",Ol,[de(" curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-"+l(c.value)+"-"+l(ie.value)+".tar.gz && tar -zxvf spc.tgz && rm spc.tgz",1),Vl])):(b(),w("div",Al,[e("div",Tl,[jl,e("p",null,l(a[i.lang].windowsDownSPCWarning),1)])]))])):q("",!0),L.value?(b(),w("div",$l,[e("b",null,l(a[i.lang].downloadExtOnlyCommand),1),e("div",Gl,l(T.value)+" download --with-php="+l(I.value)+' --for-extensions "'+l(R.value)+'"'+l(W.value?" --prefer-pre-built":"")+l(B.value?" --debug":""),1)])):(b(),w("div",Xl,[e("b",null,l(a[i.lang].downloadAllCommand),1),e("div",Ml,l(T.value)+" download --all --with-php="+l(I.value)+l(W.value?" --prefer-pre-built":"")+l(B.value?" --debug":""),1)])),E.value?(b(),w("div",Rl,[e("b",null,l(a[i.lang].downloadUPXCommand),1),e("div",Hl,l(T.value)+" install-pkg upx"+l(B.value?" --debug":""),1)])):q("",!0),e("div",Fl,[e("b",null,l(a[i.lang].compileCommand),1),e("div",Zl,l(T.value)+" build "+l(H.value)+' "'+l(R.value)+'"'+l(ee.value)+l(B.value?" --debug":"")+l(P.value?" --enable-zts":"")+l(E.value?" --with-upx-pack":"")+l(se.value),1)])]))}}),Jl=ce(Kl,[["__scopeId","data-v-c44ab356"]]);export{Jl as C};
|