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"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var wkAccessibility_exports = {};20__export(wkAccessibility_exports, {21 getAccessibilityTree: () => getAccessibilityTree22});23module.exports = __toCommonJS(wkAccessibility_exports);24async function getAccessibilityTree(session, needle) {25 const objectId = needle ? needle._objectId : void 0;26 const { axNode } = await session.send("Page.accessibilitySnapshot", { objectId });27 const tree = new WKAXNode(axNode);28 return {29 tree,30 needle: needle ? tree._findNeedle() : null31 };32}33const WKRoleToARIARole = new Map(Object.entries({34 "TextField": "textbox"35}));36const WKUnhelpfulRoleDescriptions = new Map(Object.entries({37 "WebArea": "HTML content",38 "Summary": "summary",39 "DescriptionList": "description list",40 "ImageMap": "image map",41 "ListMarker": "list marker",42 "Video": "video playback",43 "Mark": "highlighted",44 "contentinfo": "content information",45 "Details": "details",46 "DescriptionListDetail": "description",47 "DescriptionListTerm": "term",48 "alertdialog": "web alert dialog",49 "dialog": "web dialog",50 "status": "application status",51 "tabpanel": "tab panel",52 "application": "web application"53}));54class WKAXNode {55 constructor(payload) {56 this._payload = payload;57 this._children = [];58 for (const payload2 of this._payload.children || [])59 this._children.push(new WKAXNode(payload2));60 }61 children() {62 return this._children;63 }64 _findNeedle() {65 if (this._payload.found)66 return this;67 for (const child of this._children) {68 const found = child._findNeedle();69 if (found)70 return found;71 }72 return null;73 }74 isControl() {75 switch (this._payload.role) {76 case "button":77 case "checkbox":78 case "ColorWell":79 case "combobox":80 case "DisclosureTriangle":81 case "listbox":82 case "menu":83 case "menubar":84 case "menuitem":85 case "menuitemcheckbox":86 case "menuitemradio":87 case "radio":88 case "scrollbar":89 case "searchbox":90 case "slider":91 case "spinbutton":92 case "switch":93 case "tab":94 case "textbox":95 case "TextField":96 case "tree":97 return true;98 default:99 return false;100 }101 }102 _isTextControl() {103 switch (this._payload.role) {104 case "combobox":105 case "searchfield":106 case "textbox":107 case "TextField":108 return true;109 }110 return false;111 }112 _name() {113 if (this._payload.role === "text")114 return this._payload.value || "";115 return this._payload.name || "";116 }117 isInteresting(insideControl) {118 const { role, focusable } = this._payload;119 const name = this._name();120 if (role === "ScrollArea")121 return false;122 if (role === "WebArea")123 return true;124 if (focusable || role === "MenuListOption")125 return true;126 if (this.isControl())127 return true;128 if (insideControl)129 return false;130 return this.isLeafNode() && !!name;131 }132 _hasRedundantTextChild() {133 if (this._children.length !== 1)134 return false;135 const child = this._children[0];136 return child._payload.role === "text" && this._payload.name === child._payload.value;137 }138 isLeafNode() {139 if (!this._children.length)140 return true;141 if (this._isTextControl())142 return true;143 if (this._hasRedundantTextChild())144 return true;145 return false;146 }147 serialize() {148 const node = {149 role: WKRoleToARIARole.get(this._payload.role) || this._payload.role,150 name: this._name()151 };152 if ("description" in this._payload && this._payload.description !== node.name)153 node.description = this._payload.description;154 if ("roledescription" in this._payload) {155 const roledescription = this._payload.roledescription;156 if (roledescription !== this._payload.role && WKUnhelpfulRoleDescriptions.get(this._payload.role) !== roledescription)157 node.roledescription = roledescription;158 }159 if ("value" in this._payload && this._payload.role !== "text") {160 if (typeof this._payload.value === "string")161 node.valueString = this._payload.value;162 else if (typeof this._payload.value === "number")163 node.valueNumber = this._payload.value;164 }165 if ("checked" in this._payload)166 node.checked = this._payload.checked === "true" ? "checked" : this._payload.checked === "false" ? "unchecked" : "mixed";167 if ("pressed" in this._payload)168 node.pressed = this._payload.pressed === "true" ? "pressed" : this._payload.pressed === "false" ? "released" : "mixed";169 const userStringProperties = [170 "keyshortcuts",171 "valuetext"172 ];173 for (const userStringProperty of userStringProperties) {174 if (!(userStringProperty in this._payload))175 continue;176 node[userStringProperty] = this._payload[userStringProperty];177 }178 const booleanProperties = [179 "disabled",180 "expanded",181 "focused",182 "modal",183 "multiselectable",184 "readonly",185 "required",186 "selected"187 ];188 for (const booleanProperty of booleanProperties) {189 if (booleanProperty === "focused" && (this._payload.role === "WebArea" || this._payload.role === "ScrollArea"))190 continue;191 const value = this._payload[booleanProperty];192 if (!value)193 continue;194 node[booleanProperty] = value;195 }196 const numericalProperties = [197 "level",198 "valuemax",199 "valuemin"200 ];201 for (const numericalProperty of numericalProperties) {202 if (!(numericalProperty in this._payload))203 continue;204 node[numericalProperty] = this._payload[numericalProperty];205 }206 const tokenProperties = [207 "autocomplete",208 "haspopup",209 "invalid"210 ];211 for (const tokenProperty of tokenProperties) {212 const value = this._payload[tokenProperty];213 if (!value || value === "false")214 continue;215 node[tokenProperty] = value;216 }217 const orientationIsApplicable = /* @__PURE__ */ new Set([218 "ScrollArea",219 "scrollbar",220 "listbox",221 "combobox",222 "menu",223 "tree",224 "separator",225 "slider",226 "tablist",227 "toolbar"228 ]);229 if (this._payload.orientation && orientationIsApplicable.has(this._payload.role))230 node.orientation = this._payload.orientation;231 return node;232 }233}234// Annotate the CommonJS export names for ESM import in node:2350 && (module.exports = {236 getAccessibilityTree237});238 