Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/** @import { Effect, TemplateNode } from '#client' */2/** @import {} from 'trusted-types' */3import {4 FILENAME,5 HYDRATION_ERROR,6 NAMESPACE_SVG,7 NAMESPACE_MATHML8} from '../../../../constants.js';9import { remove_effect_dom, template_effect } from '../../reactivity/effects.js';10import { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';11 12import { assign_nodes } from '../template.js';13import * as w from '../../warnings.js';14import { hash, sanitize_location } from '../../../../utils.js';15import { DEV } from 'esm-env';16import { dev_current_component_function } from '../../context.js';17import { create_element, get_first_child, get_next_sibling } from '../operations.js';18import { active_effect } from '../../runtime.js';19import { COMMENT_NODE } from '#client/constants';20 21/**22 * @param {Element} element23 * @param {string | null} server_hash24 * @param {string | TrustedHTML} value25 */26function check_hash(element, server_hash, value) {27 if (!server_hash || server_hash === hash(String(value ?? ''))) return;28 29 let location;30 31 // @ts-expect-error32 const loc = element.__svelte_meta?.loc;33 if (loc) {34 location = `near ${loc.file}:${loc.line}:${loc.column}`;35 } else if (dev_current_component_function?.[FILENAME]) {36 location = `in ${dev_current_component_function[FILENAME]}`;37 }38 39 w.hydration_html_changed(sanitize_location(location));40}41 42/**43 * @param {Element | Text | Comment} node44 * @param {() => string | TrustedHTML} get_value45 * @param {boolean} [is_controlled]46 * @param {boolean} [svg]47 * @param {boolean} [mathml]48 * @param {boolean} [skip_warning]49 * @returns {void}50 */51export function html(52 node,53 get_value,54 is_controlled = false,55 svg = false,56 mathml = false,57 skip_warning = false58) {59 var anchor = node;60 61 /** @type {string | TrustedHTML} */62 var value = '';63 64 if (is_controlled) {65 var parent_node = /** @type {Element} */ (node);66 67 if (hydrating) {68 anchor = set_hydrate_node(get_first_child(parent_node));69 }70 }71 72 template_effect(() => {73 var effect = /** @type {Effect} */ (active_effect);74 75 if (value === (value = get_value() ?? '')) {76 if (hydrating) hydrate_next();77 return;78 }79 80 if (is_controlled && !hydrating) {81 // When @html is the only child, use innerHTML directly.82 // This also handles contenteditable, where the user may delete the anchor comment.83 effect.nodes = null;84 parent_node.innerHTML = /** @type {string} */ (value);85 86 if (value !== '') {87 assign_nodes(88 /** @type {TemplateNode} */ (get_first_child(parent_node)),89 /** @type {TemplateNode} */ (parent_node.lastChild)90 );91 }92 93 return;94 }95 96 if (effect.nodes !== null) {97 remove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));98 effect.nodes = null;99 }100 101 if (value === '') return;102 103 if (hydrating) {104 // We're deliberately not trying to repair mismatches between server and client,105 // as it's costly and error-prone (and it's an edge case to have a mismatch anyway)106 var hash = /** @type {Comment} */ (hydrate_node).data;107 108 /** @type {TemplateNode | null} */109 var next = hydrate_next();110 var last = next;111 112 while (113 next !== null &&114 (next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')115 ) {116 last = next;117 next = get_next_sibling(next);118 }119 120 if (next === null) {121 w.hydration_mismatch();122 throw HYDRATION_ERROR;123 }124 125 if (DEV && !skip_warning) {126 check_hash(/** @type {Element} */ (next.parentNode), hash, value);127 }128 129 assign_nodes(hydrate_node, last);130 anchor = set_hydrate_node(next);131 return;132 }133 134 // Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.135 // @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.136 // Use a <template>, <svg>, or <math> wrapper depending on context. If value is a TrustedHTML object,137 // it will be assigned directly to innerHTML without coercion — this allows {@html policy.createHTML(...)} to work.138 var ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : undefined;139 var wrapper = /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */ (140 create_element(svg ? 'svg' : mathml ? 'math' : 'template', ns)141 );142 wrapper.innerHTML = /** @type {any} */ (value);143 144 /** @type {DocumentFragment | Element} */145 var node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ (wrapper).content;146 147 assign_nodes(148 /** @type {TemplateNode} */ (get_first_child(node)),149 /** @type {TemplateNode} */ (node.lastChild)150 );151 152 if (svg || mathml) {153 while (get_first_child(node)) {154 anchor.before(/** @type {TemplateNode} */ (get_first_child(node)));155 }156 } else {157 anchor.before(node);158 }159 });160}161 