Files
admin_hura_8/node_modules/@tailwindcss/node/dist/index.js

19 lines
50 KiB
JavaScript
Raw Normal View History

2025-12-07 15:58:07 +07:00
"use strict";var Pt=Object.create;var ie=Object.defineProperty;var _t=Object.getOwnPropertyDescriptor;var It=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,Ut=Object.prototype.hasOwnProperty;var De=(e,r)=>{for(var t in r)ie(e,t,{get:r[t],enumerable:!0})},Ue=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of It(r))!Ut.call(e,o)&&o!==t&&ie(e,o,{get:()=>r[o],enumerable:!(i=_t(r,o))||i.enumerable});return e};var T=(e,r,t)=>(t=e!=null?Pt(Dt(e)):{},Ue(r||!e||!e.__esModule?ie(t,"default",{value:e,enumerable:!0}):t,e)),Lt=e=>Ue(ie({},"__esModule",{value:!0}),e);var ui={};De(ui,{Features:()=>R.Features,Instrumentation:()=>Ie,Polyfills:()=>R.Polyfills,__unstable__loadDesignSystem:()=>Xr,compile:()=>Jr,compileAst:()=>Qr,env:()=>ne,loadModule:()=>Pe,normalizePath:()=>de,optimize:()=>oi,toSourceMap:()=>si});module.exports=Lt(ui);var Rt=T(require("module")),Ot=require("url");var ne={};De(ne,{DEBUG:()=>he});var he=Kt(process.env.DEBUG);function Kt(e){if(typeof e=="boolean")return e;if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}var F=T(require("enhanced-resolve")),At=require("jiti"),me=T(require("fs")),Oe=T(require("fs/promises")),Y=T(require("path")),Ve=require("url"),R=require("tailwindcss");var oe=T(require("fs/promises")),W=T(require("path")),zt=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Mt=[".js",".cjs",".mjs"],Ft=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],jt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Wt(e,r){for(let t of r){let i=`${e}${t}`;if((await oe.default.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await oe.default.access(i).then(()=>!0,()=>!1))return i}return null}async function Le(e,r,t,i){let o=Mt.includes(i)?Ft:jt,a=await Wt(W.default.resolve(t,r),o);if(a===null||e.has(a))return;e.add(a),t=W.default.dirname(a),i=W.default.extname(a);let n=await oe.default.readFile(a,"utf-8"),s=[];for(let l of zt)for(let u of n.matchAll(l))u[1].startsWith(".")&&s.push(Le(e,u[1],t,i));await Promise.all(s)}async function Ke(e){let r=new Set;return await Le(r,e,W.default.dirname(e),W.default.extname(e)),Array.from(r)}var Ee=T(require("path"));function B(e){return{kind:"word",value:e}}function Bt(e,r){return{kind:"function",value:e,nodes:r}}function Yt(e){return{kind:"separator",value:e}}function S(e){let r="";for(let t of e)switch(t.kind){case"word":case"separator":{r+=t.value;break}case"function":r+=t.value+"("+S(t.nodes)+")"}return r}var ze=92,Gt=41,Me=58,Fe=44,qt=34,je=61,We=62,Be=60,Ye=10,Ht=40,Zt=39,Qt=47,Ge=32,qe=9;function A(e){e=e.replaceAll(`\r
`,`
`);let r=[],t=[],i=null,o="",a;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);switch(s){case ze:{o+=e[n]+e[n+1],n++;break}case Qt:{if(o.length>0){let u=B(o);i?i.nodes.push(u):r.push(u),o=""}let l=B(e[n]);i?i.nodes.push(l):r.push(l);break}case Me:case Fe:case je:case We:case Be:case Ye:case Ge:case qe:{if(o.length>0){let c=B(o);i?i.nodes.push(c):r.push(c),o=""}let l=n,u=n+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==Me&&a!==Fe&&a!==je&&a!==We&&a!==Be&&a!==Ye&&a!==Ge&&a!==qe));u++);n=u-1;let p=Yt(e.slice(l,u));i?i.nodes.push(p):r.push(p);break}case Zt:case qt:{let l=n;for(let u=n+1;u<e.length;u++)if(a=e.charCodeAt(u),a===ze)u+=1;else if(a===s){n=u;break}o+=e.slice(l,n+1);break}case Ht:{let l=Bt(o,[]);o="",i?i.nodes.push(l):r.push(l),t.push(l),i=l;break}case Gt:{let l=t.pop();if(o.length>0){let u=B(o);l?.nodes.push(u),o=""}t.length>0?i=t[t.length-1]:i=null;break}default:o+=String.fromCharCode(s)}}return o.length>0&&r.push(B(o)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var vi=new Uint8Array(256);var ae=new Uint8Array(256);function y(e,r){let t=0,i=[],o=0,a=e.length,n=r.charCodeAt(0);for(let s=0;s<a;s++){let l=e.charCodeAt(s);if(t===0&&l===n){i.push(e.slice(o,s)),o=s+1;continue}switch(l){case 92:s+=1;break;case 39:case 34:for(;++s<a;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===l)break}break;case 40:ae[t]=41,t++;break;case 91:ae[t]=93,t++;break;case 123:ae[t]=125,t++;break;case 93:case 125:case 41:t>0&&l===ae[t-1]&&t--;break}}return i.push(e.slice(o)),i}var ve=(n=>(n[n.Continue=0]="Continue",n[n.Skip=1]="Skip",n[n.Stop=2]="Stop",n[n.Replace=3]="Replace",n[n.ReplaceSkip=4]="ReplaceSkip",n[n.ReplaceStop=5]="ReplaceStop",n))(ve||{}),w={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function v(e,r){typeof r=="function"?He(e,r):He(e,r.enter,r.exit)}function He(e,r=()=>w.Continue,t=()=>w.Continue){let i=[[e,0,null]],o={parent:null,depth:0,path(){let a=[];for(let n=1;n<i.length;n++){let s=i[n][2];s&&a.push(s)}return a}};for(;i.length>0;){let a=i.length-1,n=i[a],s=n[0],l=n[1],u=n[2];if(l>=s.length){i.pop();continue}if(o.parent=u,o.depth=a,l>=0){let m=s[l],d=r(m,o)??w.Continue;switch(d.kind){case 0:{m.nodes&&m.nodes.length>0&&i.push([m.nodes,0,m]),n[1]=~l;continue}case 2:return;case 1:{n[1]=~l;continue}case 3:{s.splice(l,1,...d.nodes);continue}case 5:{s.splice(l,1,...d.nodes);return}case 4:{s.splice(l,1,...d.nodes),n[1]+=d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${ve[d.kind]??`Unknown(${d.kind})`}\` in enter.`)}}let p=~l,c=s[p],f=t(c,o)??w.Continue;switch(f.kind){case 0:n[1]=p+1;continue;case 2:return;case 3:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}case 5:{s.splice(p,1,...f.nodes);return}case 4:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${ve[f.kind]??`Unknown(${f.kind})`}\` in exit.`)}}}var Ei=new g(e=>{let r=A(e),t=new Set;return v(r,(i,o)=>{let a=o.parent===null?r:o.parent.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let n=a.indexOf(i)??-1;if(n===-1)return;let s=a[n-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=a[n+1];if(l?.kind!=="separator"||l.value!==" ")return;t.add(s),t.add(l)}else i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(a[0]===i||a[a.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&v(r,i=>{if(t.has(i))return t.delete(i),w.ReplaceSkip([])}),we(r),S(r)});var Ni=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?S(r[2].nodes):e});function we(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=G(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value===
`,r){t+=u.length;let p=t;t+=n.property.length,t+=2,t+=n.value?.length??0,n.important&&(t+=11);let c=t;t+=2,n.dst=[i,p,c]}}else if(n.kind==="rule"){if(l+=`${u}${n.selector} {
`,r){t+=u.length;let p=t;t+=n.selector.length,t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="at-rule"){if(n.nodes.length===0){let p=`${u}${n.name} ${n.params};
`;if(r){t+=u.length;let c=t;t+=n.name.length,t+=1,t+=n.params.length;let f=t;t+=2,n.dst=[i,c,f]}return p}if(l+=`${u}${n.name}${n.params?` ${n.params} `:" "}{
`,r){t+=u.length;let p=t;t+=n.name.length,n.params&&(t+=1,t+=n.params.length),t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="comment"){if(l+=`${u}/*${n.value}*/
`,r){t+=u.length;let p=t;t+=2+n.value.length+2;let c=t;n.dst=[i,p,c],t+=1}}else if(n.kind==="context"||n.kind==="at-root")return"";return l}let a="";for(let n of e)a+=o(n,0);return i.code=a,a}function Dr(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var i="";if(t>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),i+a.join("/")}function de(e){let r=Dr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Ne=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,gt=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,Ur=/(?:gradient|element|cross-fade|image)\(/,Lr=/^\s*data:/i,Kr=/^([a-z]+:)?\/\//,zr=/^[A-Z_][.\w-]*\(/i,Mr=/(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,Fr=/(?<!\\)"/g,jr=/(?: |\\t|\\n|\\f|\\r)+/g,Wr=e=>Lr.test(e),Br=e=>Kr.test(e);async function ht({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=te(e),o=[];function a(n){if(n[0]==="/")return n;let s=Ee.posix.join(de(r),n),l=Ee.posix.relative(de(t),s);return l.startsWith(".")||(l="./"+l),l}return v(i,n=>{if(n.kind!=="declaration"||!n.value)return;let s=Ne.test(n.value),l=gt.test(n.value);if(s||l){let u=l?Yr:vt;o.push(u(n.value,a).then(p=>{n.value=p}))}}),o.length&&await Promise.all(o),z(i)}function vt(e,r){return yt(e,Ne,async t=>{let[i,o]=t;return await wt(o.trim(),i,r)})}async function Yr(e,r){return await yt(e,gt,async t=>{let[,i]=t;return await qr(i,async({url:a})=>Ne.test(a)?await vt(a,r):Ur.test(a)?a:await wt(a,a,r))})}async function wt(e,r,t,i="url"){let o="",a=e[0];if((a==='"'||a==="'")&&(o=a,e=e.slice(1,-1)),Gr(e))return r;let n=await t(e);return o===""&&n!==encodeURI(n)&&(o='"'),o==="'"&&n.includes("'")&&(o='"'),o==='"'&&n.includes('"')&&(n=n.replace(Fr,'\\"')),`${i}(${o}${n}${o})`}function Gr(e,r){return Br(e)||Wr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||zr.test(e)}function qr(e,r){return Promise.all(Hr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Zr)}function Hr(e){let r=e.trim().replace(jr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Mr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Zr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function yt(e,r,t){let i,o=e,a="";for(;i=r.exec(o);)a+=o.slice(0,i.index),a+=await t(i),o=o.slice(i.index+i[0].length);return a+=o,a}var ni={};function Ct({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:o,customCssResolver:a,customJsResolver:n}){return{base:e,polyfills:t,from:r,async loadModule(s,l){return Pe(s,l,i,n)},async loadStylesheet(s,l){let u=await $t(s,l,i,a);return o&&(u.content=await ht({css:u.content,root:e,base:u.base})),u}}}async function St(e,r){if(e.root&&e.root!=="none"){let t=/[*{]/,i=[];for(let a of e.root.pattern.split("/")){if(t.test(a))break;i.push(a)}if(!await Oe.default.stat(Y.default.resolve(r,i.join("/"))).then(a=>a.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist`)}}async function Qr(e,r){let t=await(0,R.compileAst)(e,Ct(r));return await St(t,r.base),t}async function Jr(e,r){let t=await(0,R.compile)(e,Ct(r));return await St(t,r.base),t}async function Xr(e,{base:r}){return(0,R.__unstable__loadDesignSystem)(e,{base:r,async loadModule(t,i){return Pe(t,i,()=>{})},async loadStylesheet(t,i){return $t(t,i,()=>{})}})}async function Pe(e,r,t,i){if(e[0]!=="."){let s=await xt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let l=await bt((0,Ve.pathToFileURL)(s).href);return{path:s,base:Y.default.dirname(s),module:l.default??l}}let o=await xt(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);let[a,n]=await Promise.all([bt((0,Ve.pathToFileURL)(o).href+"?id="+Date.no
`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(o=>o.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),o=t-i.value;this.#t.get(i.id).value+=o}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let n=this.#e.length-1;n>=0;n--)this.end(this.#e[n].label);for(let[n,{value:s}]of this.#r.entries()){if(this.#t.has(n))continue;t.length===0&&(i=!0,t.push("Hits:"));let l=n.split("//").length;t.push(`${" ".repeat(l)}${n} ${ge(Tt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(`
Timers:`);let o=-1/0,a=new Map;for(let[n,{value:s}]of this.#t){let l=`${(Number(s)/1e6).toFixed(2)}ms`;a.set(n,l),o=Math.max(o,l.length)}for(let n of this.#t.keys()){let s=n.split("//").length;t.push(`${ge(`[${a.get(n).padStart(o," ")}]`)}${" ".repeat(s-1)}${s===1?" ":ge(" \u21B3 ")}${n.split("//").pop()} ${this.#r.get(n).value===1?"":ge(Tt(`\xD7 ${this.#r.get(n).value}`))}`.trimEnd())}r(`
${t.join(`
`)}
`),this.reset()}[Symbol.dispose](){he&&this.report()}};function ge(e){return`\x1B[2m${e}\x1B[22m`}function Tt(e){return`\x1B[34m${e}\x1B[39m`}var Et=T(require("@jridgewell/remapping")),D=require("lightningcss"),Nt=T(require("magic-string"));function oi(e,{file:r="input.css",minify:t=!1,map:i}={}){function o(l,u){return(0,D.transform)({filename:r,code:l,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:D.Features.Nesting|D.Features.MediaQueries,exclude:D.Features.LogicalProperties|D.Features.DirSelector|D.Features.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let a=o(Buffer.from(e),i);if(i=a.map?.toString(),a.warnings=a.warnings.filter(l=>!/'(deep|slotted|global)' is not recognized as a valid pseudo-/.test(l.message)),a.warnings.length>0){let l=e.split(`
`),u=[`Found ${a.warnings.length} ${a.warnings.length===1?"warning":"warnings"} while optimizing generated CSS:`];for(let[p,c]of a.warnings.entries()){u.push(""),a.warnings.length>1&&u.push(`Issue #${p+1}:`);let f=2,m=Math.max(0,c.loc.line-f-1),d=Math.min(l.length,c.loc.line+f),x=l.slice(m,d).map((h,U)=>m+U+1===c.loc.line?`${re("\u2502")} ${h}`:re(`\u2502 ${h}`));x.splice(c.loc.line-m,0,`${re("\u2506")}${" ".repeat(c.loc.column-1)} ${ai(`${re("^--")} ${c.message}`)}`,`${re("\u2506")}`),u.push(...x)}u.push(""),console.warn(u.join(`
`))}a=o(a.code,i),i=a.map?.toString();let n=a.code.toString(),s=new Nt.default(n);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let l=s.generateMap({source:"original",hires:"boundary"}).toString();i=(0,Et.default)([l,i],()=>null).toString()}return n=s.toString(),{code:n,map:i}}function re(e){return`\x1B[2m${e}\x1B[22m`}function ai(e){return`\x1B[33m${e}\x1B[39m`}var Vt=require("source-map-js");function li(e){let r=new Vt.SourceMapGenerator,t=1,i=new g(o=>({url:o?.url??`<unknown ${t++}>`,content:o?.content??"<none>"}));for(let o of e.mappings){let a=i.get(o.originalPosition?.source??null);r.addMapping({generated:o.generatedPosition,original:o.originalPosition,source:a.url,name:o.name}),r.setSourceContent(a.url,a.content)}return r.toString()}function si(e){let r=typeof e=="string"?e:li(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */
`,t}}}process.versions.bun||Rt.register?.((0,Ot.pathToFileURL)(require.resolve("@tailwindcss/node/esm-cache-loader")));0&&(module.exports={Features,Instrumentation,Polyfills,__unstable__loadDesignSystem,compile,compileAst,env,loadModule,normalizePath,optimize,toSourceMap});