MCPcopy
hub / github.com/mudler/LocalAI / stringify

Method stringify

core/http/static/assets/tailwindcss.js:11–11  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

9`,beforeComment:`
10`,after:`
11`,emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};function xw(r){return r[0].toUpperCase()+r.slice(1)}var Ri=class{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(i+n+s,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,t!==n||i)}}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,t,i){let n;if(i||(i=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let s=e.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return jf[i];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[i]!="undefined")return a.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let o="raw"+xw(i);this[o]?n=this[o](a,e):a.walk(u=>{if(n=u.raws[t],typeof n!="undefined")return!1})}return typeof n=="undefined"&&(n=jf[i]),a.rawCache[i]=n,n}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t!="undefined"))return!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before!="undefined"){let s=i.raws.before.split(`
12`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawBeforeComment(e,t){let i;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return i=n.raws.before,i.includes(`
13`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i=="undefined"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return i=n.raws.before,i.includes(`
14`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i=="undefined"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before!="undefined")return t=i.raws.before,t.includes(`

Callers 15

promptVideoFunction · 0.80
ttsFunction · 0.80
promptDallEFunction · 0.80
generateSoundFunction · 0.80
saveChatsToStorageFunction · 0.80
promptGPTFunction · 0.80
sendSessionUpdateFunction · 0.80
connectFunction · 0.80
sendTestToneFunction · 0.80
serializableMethod · 0.80
copyMethod · 0.80
_createMaskCanvasMethod · 0.80

Calls 4

syncMethod · 0.80
generateMethod · 0.80
divMethod · 0.80
pushMethod · 0.45

Tested by 15

setupChatPageFunction · 0.64
mockClusterFunction · 0.64
mockDistributedNodesFunction · 0.64
mockBackendsFunction · 0.64
mockBackendsFunction · 0.64
mockBackendsFunction · 0.64
mockBackendsFunction · 0.64
mockCapabilitiesFunction · 0.64
mockImageGenerationFunction · 0.64
mockVideoGenerationFunction · 0.64
mockCapabilitiesFunction · 0.64
mockEditorEndpointsFunction · 0.64