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/**2 * Custom positioning reference element.3 * @see https://floating-ui.com/docs/virtual-elements4 */5 6const sides = ['top', 'right', 'bottom', 'left'];7const alignments = ['start', 'end'];8const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);9const min = Math.min;10const max = Math.max;11const round = Math.round;12const floor = Math.floor;13const createCoords = v => ({14 x: v,15 y: v16});17const oppositeSideMap = {18 left: 'right',19 right: 'left',20 bottom: 'top',21 top: 'bottom'22};23function clamp(start, value, end) {24 return max(start, min(value, end));25}26function evaluate(value, param) {27 return typeof value === 'function' ? value(param) : value;28}29function getSide(placement) {30 return placement.split('-')[0];31}32function getAlignment(placement) {33 return placement.split('-')[1];34}35function getOppositeAxis(axis) {36 return axis === 'x' ? 'y' : 'x';37}38function getAxisLength(axis) {39 return axis === 'y' ? 'height' : 'width';40}41function getSideAxis(placement) {42 const firstChar = placement[0];43 return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';44}45function getAlignmentAxis(placement) {46 return getOppositeAxis(getSideAxis(placement));47}48function getAlignmentSides(placement, rects, rtl) {49 if (rtl === void 0) {50 rtl = false;51 }52 const alignment = getAlignment(placement);53 const alignmentAxis = getAlignmentAxis(placement);54 const length = getAxisLength(alignmentAxis);55 let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';56 if (rects.reference[length] > rects.floating[length]) {57 mainAlignmentSide = getOppositePlacement(mainAlignmentSide);58 }59 return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];60}61function getExpandedPlacements(placement) {62 const oppositePlacement = getOppositePlacement(placement);63 return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];64}65function getOppositeAlignmentPlacement(placement) {66 return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');67}68const lrPlacement = ['left', 'right'];69const rlPlacement = ['right', 'left'];70const tbPlacement = ['top', 'bottom'];71const btPlacement = ['bottom', 'top'];72function getSideList(side, isStart, rtl) {73 switch (side) {74 case 'top':75 case 'bottom':76 if (rtl) return isStart ? rlPlacement : lrPlacement;77 return isStart ? lrPlacement : rlPlacement;78 case 'left':79 case 'right':80 return isStart ? tbPlacement : btPlacement;81 default:82 return [];83 }84}85function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {86 const alignment = getAlignment(placement);87 let list = getSideList(getSide(placement), direction === 'start', rtl);88 if (alignment) {89 list = list.map(side => side + "-" + alignment);90 if (flipAlignment) {91 list = list.concat(list.map(getOppositeAlignmentPlacement));92 }93 }94 return list;95}96function getOppositePlacement(placement) {97 const side = getSide(placement);98 return oppositeSideMap[side] + placement.slice(side.length);99}100function expandPaddingObject(padding) {101 return {102 top: 0,103 right: 0,104 bottom: 0,105 left: 0,106 ...padding107 };108}109function getPaddingObject(padding) {110 return typeof padding !== 'number' ? expandPaddingObject(padding) : {111 top: padding,112 right: padding,113 bottom: padding,114 left: padding115 };116}117function rectToClientRect(rect) {118 const {119 x,120 y,121 width,122 height123 } = rect;124 return {125 width,126 height,127 top: y,128 left: x,129 right: x + width,130 bottom: y + height,131 x,132 y133 };134}135 136export { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };137 