class TimeStampAdminMixin:
    list_display = \
        [
            'created_at',
            'modified_at',
        ]

    fields = \
        [
            'created_at',
            'modified_at',
        ]

    readonly_fields = \
        [
            'created_at',
            'modified_at',
        ]

class UuidAdminMixin:
    list_display = \
        [

        ]

    fields = \
        [
            'uuid',
        ]

    readonly_fields = \
        [
            'uuid',
        ]

class OrderAdminMixin:
    list_display = \
        [
            'order',
        ]

    fields = \
        [
            'order',
        ]

    readonly_fields = [

    ]

class TitleAdminMixin:
    list_display = \
        [
            'title',
        ]

    fields = \
        [
            'title',
        ]

    readonly_fields = \
        [

        ]

class TitleSlugAdminMixin:
    list_display = \
        [
            'title',
        ]

    fields = \
        [
            'title',
            'slug',
        ]

    readonly_fields = \
        [
            'slug',
        ]

class DescriptionAdminMixin:
    list_display = \
        [

        ]

    fields = \
        [
            'description',
        ]

    readonly_fields = \
        [

        ]

class BodyAdminMixin:
    list_display = \
        [

        ]

    fields = \
        [
            'body',
        ]

    readonly_fields = \
        [

        ]

class BodyExcerptAdminMixin:
    list_display = \
        [

        ]

    fields = \
        [
            'body',
            'excerpt_short',
            'excerpt_long',
        ]

    readonly_fields = \
        [

        ]

class PositionAdminMixin:
    list_display = \
        [
            'position',
        ]

    fields = \
        [
            'position',
        ]

    readonly_fields = \
        [

        ]


m::quatLookAtLH(glm::normalize(center - eye), up);
	glm::quat test_matLH = glm::conjugate(glm::quat_cast(glm::lookAtLH(eye, center, up)));
	Error += static_cast<int>(glm::abs(glm::length(test_quatLH) - 1.0f) > glm::epsilon<float>());
	Error += static_cast<int>(glm::min(glm::length(test_quatLH - test_matLH), glm::length(test_quatLH + test_matLH)) > glm::epsilon<float>());

	// Test right-handed implementation
	glm::quat test_quatRH = glm::quatLookAtRH(glm::normalize(center - eye), up);
	glm::quat test_matRH = glm::conjugate(glm::quat_cast(glm::lookAtRH(eye, center, up)));
	Error += static_cast<int>(glm::abs(glm::length(test_quatRH) - 1.0f) > glm::epsilon<float>());
	Error += static_cast<int>(glm::min(glm::length(test_quatRH - test_matRH), glm::length(test_quatRH + test_matRH)) > glm::epsilon<float>());

	return Error;
}

int main()
{
	int Error = 0;

	Error += test_lookAt();

	return Error;
}
#include <glm/ext/scalar_reciprocal.hpp>
#include <glm/ext/scalar_relational.hpp>
#include <glm/ext/scalar_constants.hpp>

static int test_sec()
{
	int Error = 0;

	Error += glm::equal(glm::sec(0.0), 1.0, 0.01) ? 0 : 1;
	Error += glm::equal(glm::sec(glm::pi<double>() * 2.0), 1.0, 0.01) ? 0 : 1;
	Error += glm::equal(glm::sec(glm::pi<double>() * -2.0), 1.0, 0.01) ? 0 : 1;
	Error += glm::equal(glm::sec(glm::pi<double>() * 1.0), -1.0, 0.01) ? 0 : 1;
	Error += glm::equal(glm::sec(glm::pi<double>() * -1.0), -1.0, 0.01) ? 0 : 1;

	return Error;
}

static int test_csc()
{
	int Error = 0;

	double const a = glm::csc(glm::pi<double>() * 0.5);
	Error += glm::equal(a, 1.0, 0.01) ? 0 : 1;
	double const b = glm::csc(glm::pi<double>() * -0.5);
	Error += glm::equal(b, -1.0, 0.01) ? 0 : 1;

	return Error;
}

static int test_cot()
{
	int Error = 0;

	double const a = glm::cot(glm::pi<double>() * 0.5);
	Error += glm::equal(a, 0.0, 0.01) ? 0 : 1;
	double const b = glm::cot(glm::pi<double>() * -0.5);
	Error += glm::equal(b, 0.0, 0.01) ? 0 : 1;

	return Error;
}

static int test_asec()
{
	int Error = 0;

	Error += glm::equal(glm::asec(100000.0), glm::pi<double>() * 0.5, 0.01) ? 0 : 1;
	Error += glm::equal(glm::asec(-100000.0), glm::pi<double>() * 0.5, 0.01) ? 0 : 1;

	return Error;
}

s


(0x11, 0));
						shop.removeAllVisitors((byte) 16, (byte) 0);
						shop.closeShop(save, true);
					}else{
						//boolean save = false;
						shop.setOpen(true);
						chr.setPlayerShop(null);
						//shop.closeShop(save, true);
					}
                }
                break;
            }
            case MAINTANCE_ORGANISE: {
                final IMaplePlayerShop imps = chr.getPlayerShop();
                if (imps != null && imps.isOwner(chr) && !(imps instanceof MapleMiniGame)) {
                    for (int i = 0; i < imps.getItems().size(); i++) {
                        if (imps.getItems().get(i).bundles == 0) {
                            imps.getItems().remove(i);
                        }
                    }
                    if (chr.getMeso() + imps.getMeso() < 0) {
                        c.sendPacket(PlayerShopPacket.shopItemUpdate(imps));
                    } else {
                        chr.gainMeso(imps.getMeso(), false);
                        imps.setMeso(0);
                        c.sendPacket(PlayerShopPacket.shopItemUpdate(imps));
                    }
                }
                break;
            }
            case CLOSE_MERCHANT: {
                /* final IMaplePlayerShop merchant = chr.getPlayerShop();
                 if (merchant != null && merchant.getShopType() == 1 && merchant.isOwner(chr) && merchant.isAvailable()) {
                 c.sendPacket(MaplePacketCreator.serverNotice(1, "請去找富蘭德里領取你的裝備和楓幣"));
                 c.sendPacket(MaplePacketCreator.enableActions());
                 merchant.removeAllVisitors(-1, -1);
                 chr.setPlayerShop(null);
                 merchant.closeShop(true, true);
                 }
                 break;*/
                final IMaplePlayerShop merchant = chr.getPlayerShop();
                if (merchant != null && merchant.getShopType() == 1 && merchant.isOwner(chr)) {
                    //c.sendPacket(MaplePacketCreator.serverNotice(1, "請去找富蘭德里領取你的裝備和楓幣"));
                    boolean save = false;

                    if (chr.getMeso() + merchant.getMeso() < 0) {
                        save = true;
                    } else {
                        if (merchant.getMeso() > 0) {
                            chr.gainMeso(merchant.getMeso(), false);
                        }
                        merchant.setMeso(0);

                        if (merchant.getItems().size() > 0) {
                            for (MaplePlayerShopItem items : merchant.getItems()) {
                                if (items.bundles > 0) {
                                    IItem item_get = items.item.copy();
                                    item_get.setQuantity((short) (items.bundles * items.item.getQuantity()));
                                    if (MapleInventoryManipulator.addFromDrop(c, item_get, false)) {
                                        items.bundles = 0;
                                    } else {
                                        save = true;
                                        break;
                                    }
                                }
                            }
                        }
                    }
					if(save){
						c.sendPacket(MaplePacketCreator.serverNotice(1, "請去找富蘭德里領取你的裝備和楓幣"));
					}
					merchant.removeAllVisitors(10, 1);
					c.sendPacket(PlayerShopPacket.shopErrorMessage(0x15, 0));
                    merchant.closeShop(save, true);
                    chr.setPlayerShop(null);
                }
                break;
            }
			case MERCHANT_GETMESO :{
				final IMaplePlayerShop merchant = chr.getPlayerShop();
				System.out.println(merchant.getShopType());
				if (merchant != null && merchant.getShopType() == 1 && merchant.isOwner(chr)) {
					if (chr.getMeso() + merchant.getMeso() <


 r2 = r3 = r4 = 0;
	            }

	            var total;
	            if (r1 + r2 > width) {
	                total = r1 + r2;
	                r1 *= width / total;
	                r2 *= width / total;
	            }
	            if (r3 + r4 > width) {
	                total = r3 + r4;
	                r3 *= width / total;
	                r4 *= width / total;
	            }
	            if (r2 + r3 > height) {
	                total = r2 + r3;
	                r2 *= height / total;
	                r3 *= height / total;
	            }
	            if (r1 + r4 > height) {
	                total = r1 + r4;
	                r1 *= height / total;
	                r4 *= height / total;
	            }
	            ctx.moveTo(x + r1, y);
	            ctx.lineTo(x + width - r2, y);
	            r2 !== 0 && ctx.quadraticCurveTo(
	                x + width, y, x + width, y + r2
	            );
	            ctx.lineTo(x + width, y + height - r3);
	            r3 !== 0 && ctx.quadraticCurveTo(
	                x + width, y + height, x + width - r3, y + height
	            );
	            ctx.lineTo(x + r4, y + height);
	            r4 !== 0 && ctx.quadraticCurveTo(
	                x, y + height, x, y + height - r4
	            );
	            ctx.lineTo(x, y + r1);
	            r1 !== 0 && ctx.quadraticCurveTo(x, y, x + r1, y);
	        }
	    };

/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {

	/**
	 * 直线
	 * @module zrender/graphic/shape/Line
	 */

	    module.exports = __webpack_require__(45).extend({

	        type: 'line',

	        shape: {
	            // Start point
	            x1: 0,
	            y1: 0,
	            // End point
	            x2: 0,
	            y2: 0,

	            percent: 1
	        },

	        style: {
	            stroke: '#000',
	            fill: null
	        },

	        buildPath: function (ctx, shape) {
	            var x1 = shape.x1;
	            var y1 = shape.y1;
	            var x2 = shape.x2;
	            var y2 = shape.y2;
	            var percent = shape.percent;

	            if (percent === 0) {
	                return;
	            }

	            ctx.moveTo(x1, y1);

	            if (percent < 1) {
	                x2 = x1 * (1 - percent) + x2 * percent;
	                y2 = y1 * (1 - percent) + y2 * percent;
	            }
	            ctx.lineTo(x2, y2);
	        },

	        /**
	         * Get point at percent
	         * @param  {number} percent
	         * @return {Array.<number>}
	         */
	        pointAt: function (p) {
	            var shape = this.shape;
	            return [
	                shape.x1 * (1 - p) + shape.x2 * p,
	                shape.y1 * (1 - p) + shape.y2 * p
	            ];
	        }
	    });

/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';
	/**
	 * 贝塞尔曲线
	 * @module zrender/shape/BezierCurve
	 */

	    var curveTool = __webpack_require__(50);
	    var vec2 = __webpack_require__(10);
	    var quadraticSubdivide = curveTool.quadraticSubdivide;
	    var cubicSubdivide = curveTool.cubicSubdivide;
	    var quadraticAt = curveTool.quadraticAt;
	    var cubicAt = curveTool.cubicAt;
	    var quadraticDerivativeAt = curveTool.quadraticDerivativeAt;
	    var cubicDerivativeAt = curveTool.cubicDerivativeAt;

	    var out = [];

	    function someVectorAt(shape, t, isTangent) {


zed and
   * uninitialized (BSS) data are placed.

   *
   *
end_data  %lu  (since Linux 3.3) Address below which program initialized and
   * uninitialized (BSS) data are placed.

   *
   *
start_brk  %lu  (since Linux 3.3) Address above which program heap can be expanded with
   * brk(2).

   *
   *
arg_start  %lu  (since Linux 3.5) Address above which program command-line arguments
   * (argv) are placed.

   *
   *
arg_end  %lu  (since Linux 3.5) Address below program command-line arguments (argv) are
   * placed.

   *
   *
env_start  %lu  (since Linux 3.5) Address above which program environment is placed.

   *
   *
env_end  %lu  (since Linux 3.5) Address below which program environment is placed.

   *
   *
exit_code  %d  (since Linux 3.5) The thread's exit status in the form reported by
   * waitpid(2).

   *
   *

   *
   * @return the {@link Stat} for this process
   * @throws IOException
   *     if the file does not exist or we don't have read permissions.
   */
  public Stat stat() throws IOException {
    return Stat.get(pid);
  }

  /**
   *
Provides information about memory usage, measured in pages.

   *
   *
The columns are:

   *
   *

   *
size       (1) total program size (same as VmSize in /proc/[pid]/status)

   *
resident   (2) resident set size (same as VmRSS in /proc/[pid]/status)

   *
share      (3) shared pages (i.e., backed by a file)

   *
text       (4) text (code)

   *
lib        (5) library (unused in Linux 2.6)

   *
data       (6) data + stack

   *
dt         (7) dirty pages (unused in Linux 2.6)

   *

   *
   * @return the {@link Statm} for this process
   * @throws IOException
   *     if the file does not exist or we don't have read permissions.
   */
  public Statm statm() throws IOException {
    return Statm.get(pid);
  }

  /**
   *
/proc/[pid]/status

   *
   *
Provides much of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format
   * that's
   * easier for humans to parse.

   *
   *
Here's an example:

   *
   *

   * $ cat /proc/$$/status
   * Name:   bash
   * State:  S (sleeping)
   * Tgid:   3515
   * Pid:    3515
   * PPid:   3452
   * TracerPid:      0
   * Uid:    1000    1000    1000    1000
   * Gid:    100     100     100     100
   * FDSize: 256
   * Groups: 16 33 100
   * VmPeak:     9136 kB
   * VmSize:     7896 kB
   * VmLck:         0 kB
   * VmPin:         0 kB
   * VmHWM:      7572 kB
   * VmRSS:      6316 kB
   * VmData:     5224 kB
   * VmStk:        88 kB
   * VmExe:       572 kB
   * VmLib:      1708 kB
   * VmPMD:         4 kB
   * VmPTE:        20 kB
   * VmSwap:        0 kB
   * Threads:        1
   * SigQ:   0/3067
   * SigPnd: 0000000000000000
   * ShdPnd: 0000000000000000
   * SigBlk: 0000000000010000


x17] = Instr(1, 4, "RLA", { proc.rlReg(Reg.A, false) })
    op[0x18] = JmpInstr(2, 12, 12, "JR r8", { proc.jr() })
    op[0x19] = Instr(1, 8, "ADD HL, DE", { proc.addHL(Reg16.DE) })
    op[0x1A] = Instr(1, 8, "LD A, (DE)", { proc.ld8Reg16AddrToReg(Reg.A, Reg16.DE) })
    op[0x1B] = Instr(1, 8, "DEC DE", { proc.dec16(Reg16.DE) })
    op[0x1C] = Instr(1, 4, "INC E", { proc.inc(Reg.E) })
    op[0x1D] = Instr(1, 4, "DEC E", { proc.dec(Reg.E) })
    op[0x1E] = Instr(2, 8, "LD E, d8", { proc.ld8ImmValueToReg(Reg.E) })
    op[0x1F] = Instr(1, 4, "RRA", { proc.rrReg(Reg.A, false) })
    op[0x20] = JmpInstr(2, 12, 8, "JR NZ, r8", { proc.jrNZ() })
    op[0x21] = Instr(3, 12, "LD HL, d16", { proc.ld16ImmValueToReg(Reg16.HL) })
    op[0x22] = Instr(1, 8, "LD (HL+), A", {
        proc.ld8RegToReg16Addr(Reg16.HL, Reg.A)
        proc.inc16(Reg16.HL)
    })
    op[0x23] = Instr(1, 8, "INC HL", { proc.inc16(Reg16.HL) })
    op[0x24] = Instr(1, 4, "INC H", { proc.inc(Reg.H) })
    op[0x25] = Instr(1, 4, "DEC H", { proc.dec(Reg.H) })
    op[0x26] = Instr(2, 8, "LD H, d8", { proc.ld8ImmValueToReg(Reg.H) })
    op[0x27] = Instr(1, 4, "DAA", { proc.daa() })
    op[0x28] = JmpInstr(2, 12, 8, "JR Z, r8", { proc.jrZ() })
    op[0x29] = Instr(1, 8, "ADD HL, HL", { proc.addHL(Reg16.HL) })
    op[0x2A] = Instr(1, 8, "LD A, (HL+)", {
        proc.ld8Reg16AddrToReg(Reg.A, Reg16.HL)
        proc.inc16(Reg16.HL)
    })
    op[0x2B] = Instr(1, 8, "DEC HL", { proc.dec16(Reg16.HL) })
    op[0x2C] = Instr(1, 4, "INC L", { proc.inc(Reg.L) })
    op[0x2D] = Instr(1, 4, "DEC L", { proc.dec(Reg.L) })
    op[0x2E] = Instr(2, 8, "LD L, d8", { proc.ld8ImmValueToReg(Reg.L) })
    op[0x2F] = Instr(1, 4, "CPL", { proc.cpl() })
    op[0x30] = JmpInstr(2, 12, 8, "JR NC, r8", { proc.jrNC() })
    op[0x31] = Instr(3, 12, "LD SP, d16", { cpu.sp = emu.read16(cpu.pc + 1) })
    op[0x32] = Instr(1, 8, "LD (HL-), A", {
        proc.ld8RegToReg16Addr(Reg16.HL, Reg.A)
        proc.dec16(Reg16.H


pPlayer, pQuestArg->pGame, pQuestArg->nNPCNo);
		}
		break;

	case MONSTER_LYSANDER:
		if (nMessageIndex == 274)
		{
			PLRINTRO_SetQuestIntroFlag(pQuestArg->pPlayer, pQuestArg->pGame, pQuestArg->nNPCNo);
		}
		break;

	default:
		return;
	}
}

//D2Game.0x6FC9F260
void __fastcall ACT2Intro_Callback00_NpcActivate(D2QuestDataStrc* pQuestData, D2QuestArgStrc* pQuestArg)
{
	int32_t nNpcId = -1;
	if (pQuestArg->pTarget)
	{
		nNpcId = pQuestArg->pTarget->dwClassId;
	}

	int32_t nPlayerClass = -1;
	if (pQuestArg->pPlayer)
	{
		nPlayerClass = pQuestArg->pPlayer->dwClassId;
	}

	int32_t nSpecialIntroClass = 0;
	switch (nNpcId)
	{
	case MONSTER_ELZIX:
		nSpecialIntroClass = PCLASS_NECROMANCER;
		break;

	case MONSTER_GEGLASH:
		nSpecialIntroClass = PCLASS_BARBARIAN;
		break;

	case MONSTER_MESHIF1:
		nSpecialIntroClass = PCLASS_AMAZON;
		break;

	case MONSTER_FARA:
		nSpecialIntroClass = PCLASS_PALADIN;
		break;

	case MONSTER_DROGNAN:
		nSpecialIntroClass = PCLASS_SORCERESS;
		break;

	case MONSTER_WARRIV2:
	case MONSTER_GREIZ:
	case MONSTER_LYSANDER:
		nSpecialIntroClass = PCLASS_INVALID;
		break;

	default:
		return;
	}

	if (PLRINTRO_GetQuestIntroFlag(pQuestArg->pPlayer, pQuestArg->pGame, nNpcId))
	{
		return;
	}

	if (nPlayerClass == nSpecialIntroClass)
	{
		QUESTS_InitScrollTextChain(pQuestData, pQuestArg->pTextControl, nNpcId, 1);
	}
	else
	{
		QUESTS_InitScrollTextChain(pQuestData, pQuestArg->pTextControl, nNpcId, 0);
	}
}

//
bool __fastcall ACT2Intro_StatusFilterCallback(D2QuestDataStrc* pQuest, D2UnitStrc* pPlayer, D2BitBufferStrc* pGlobalFlags, D2BitBufferStrc* pFlags, uint8_t* pStatus)
{
	*pStatus = 0;
	return false;
}

//
bool __fastcall ACT2Intro_ActiveFilterCallback(D2QuestDataStrc* pQuest, int32_t nNpcId, D2UnitStrc* pPlayer, D2BitBufferStrc* pQuestFlags, D2UnitStrc* pNPC)
{
	return false;
}
#include "QUESTS/ACT2/A2Q1.h"

#include <DataTbls/LevelsIds.h>
#include <DataTbls/MonsterIds.h>
#include <Drlg/D2DrlgDrlg.h>
#include <D2Dungeon.h>
#include <D2Items.h>
#include <D2QuestRecord.h>

#include "GAME/Game.h"
#include "ITEMS/Items.h"
#include "QUESTS/Quests.h"
#include "UNIT/Party.h"
#include "UNIT/SUnit.h"

//D2Game.0x6FD34B38
D2NPCMessageTableStrc gpAct2Q1NpcMessages[] =
{
	{
		{
			{ MONSTER_ATMA, 304, 0, 0 },
		},
		1
	},
	{
		{
			{ MONSTER_ATMA, 310, 0, 2, },
			{ MONSTER_WARRIV2, 307,


[napalm-eos](https://github.com/napalm-automation/napalm-eos)。

2017.7.0版本中提供以下模块：
- [NAPALM grains](https://docs.saltstack.com/en/latest/ref/grains/all/salt.grains.napalm.html#module-salt.grains.napalm)
- [NET execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_network.html#module-salt.modules.napalm_network) - 基础网络管理功能
- [NTP execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_ntp.html#module-salt.modules.napalm_ntp)
- [BGP execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_bgp.html#module-salt.modules.napalm_bgp)
- [Routes execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_route.html#module-salt.modules.napalm_route)
- [SNMP execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_snmp.html#module-salt.modules.napalm_snmp)
- [Users execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_users.html#module-salt.modules.napalm_users)
- [Probes execution module](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.napalm_probes.html#module-salt.modules.napalm_probes)
- [NTP peers management state](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netntp.html#module-salt.states.netntp)
- [SNMP configuration management state](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netsnmp.html#module-salt.states.netsnmp)
- [Users management state](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netusers.html#module-salt.states.netusers)
- [Netconfig state module](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netconfig.html#module-salt.states.netconfig) - 使用任意模板和特定于Salt的高级模板方法来管理网络设备的配置。
- [Network ACL execution module](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netacl.html) - 在网络设备上生成并加载ACL（防火墙）配置。
- [Network ACL state](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.netacl.html#module-salt.states.netacl) - 管理防火墙配置。 只需要正确编写pillar结构即可！
- [NAPALM YANG execution module](https://docs.saltstack.com/en/late


stance) SetSdfgiReadSkyLight(value bool) {
	class(self).SetSdfgiReadSkyLight(value)
}

/*
The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than 0.0 will simulate multiple bounces, resulting in a more realistic appearance. Increasing [SdfgiBounceFeedback] generally has no performance impact. See also [SdfgiEnergy].

Note: Values greater than 0.5 can cause infinite feedback loops and should be avoided in scenes with bright materials.

Note: If [SdfgiBounceFeedback] is 0.0, indirect lighting will not be represented in reflections as light will only bounce one time.

[SdfgiBounceFeedback]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiBounceFeedback
[SdfgiEnergy]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiEnergy
*/
func (self Instance) SdfgiBounceFeedback() Float.X {
	return Float.X(Float.X(class(self).GetSdfgiBounceFeedback()))
}

// SetSdfgiBounceFeedback sets the property returned by [GetSdfgiBounceFeedback].
func (self Instance) SetSdfgiBounceFeedback(value Float.X) {
	class(self).SetSdfgiBounceFeedback(float64(value))
}

/*
The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [SdfgiCascades] can often be decreased between 1 and 4 to improve performance.

[SdfgiCascades]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiCascades
*/
func (self Instance) SdfgiCascades() int {
	return int(int(class(self).GetSdfgiCascades()))
}

// SetSdfgiCascades sets the property returned by [GetSdfgiCascades].
func (self Instance) SetSdfgiCascades(value int) {
	class(self).SetSdfgiCascades(int64(value))
}

/*
The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.

Note: This property is linked to [SdfgiMaxDistance] and [SdfgiCascade0Distance]. Changing its value will automatically change those properties as well.

[SdfgiCascade0Distance]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiCascade0Distance
[SdfgiMaxDistance]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiMaxDistance
*/
func (self Instance) SdfgiMinCellSize() Float.X {
	return Float.X(Float.X(class(self).GetSdfgiMinCellSize()))
}

// SetSdfgiMinCellSize sets the property returned by [GetSdfgiMinCellSize].
func (self Instance) SetSdfgiMinCellSize(value Float.X) {
	class(self).SetSdfgiMinCellSize(float64(value))
}

/*
Note: This property is linked to [SdfgiMinCellSize] and [SdfgiMaxDistance]. Changing its value will automatically change those properties as well.

[SdfgiMaxDistance]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiMaxDistance
[SdfgiMinCellSize]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiMinCellSize
*/
func (self Instance) SdfgiCascade0Distance() F


  ? 0
             : -1;
}

int zip_total_entries(struct zip_t *zip) {
  if (!zip) {
    // zip_t handler is not initialized
    return -1;
  }

  return zip->archive.m_total_files;
}

int zip_create(const char *zipname, const char *filenames[], size_t len) {
  int status = 0;
  size_t i;
  mz_zip_archive zip_archive;

  if (!zipname || strlen(zipname) < 1) {
    // zip_t archive name is empty or NULL
    return -1;
  }

  // Create a new archive.
  if (!memset(&(zip_archive), 0, sizeof(zip_archive))) {
    // Cannot memset zip archive
    return -1;
  }

  if (!mz_zip_writer_init_file(&zip_archive, zipname, 0)) {
    // Cannot initialize zip_archive writer
    return -1;
  }

  for (i = 0; i < len; ++i) {
    const char *name = filenames[i];
    if (!name) {
      status = -1;
      break;
    }

    if (!mz_zip_writer_add_file(&zip_archive, basename(name), name, "", 0,
                                ZIP_DEFAULT_COMPRESSION_LEVEL)) {
      // Cannot add file to zip_archive
      status = -1;
      break;
    }
  }

  mz_zip_writer_finalize_archive(&zip_archive);
  mz_zip_writer_end(&zip_archive);
  return status;
}

int zip_extract(const char *zipname, const char *dir,
                int (*on_extract)(const char *filename, void *arg), void *arg) {
  int status = -1;
  mz_uint i, n;
  char path[MAX_PATH + 1] = {0};
  mz_zip_archive zip_archive;
  mz_zip_archive_file_stat info;
  size_t dirlen = 0;

  if (!memset(&(zip_archive), 0, sizeof(zip_archive))) {
    // Cannot memset zip archive
    return -1;
  }

  if (!zipname || !dir) {
    // Cannot parse zip archive name
    return -1;
  }

  dirlen = strlen(dir);
  if (dirlen + 1 > MAX_PATH) {
    return -1;
  }

  // Now try to open the archive.
  if (!mz_zip_reader_init_file(&zip_archive, zipname, 0)) {
    // Cannot initialize zip_archive reader
    return -1;
  }

#if defined(_MSC_VER)
  strcpy_s(path, MAX_PATH, dir);
#else
  strcpy(path, dir);
#endif

  if (!ISSLASH(path[dirlen - 1])) {
#if defined(_WIN32) || defined(__WIN32__)
    path[dirlen] = '\\';
#else
    path[dirlen] = '/';
#endif
    ++dirlen;
  }

  // Get and print information about each file in the archive.
  n = mz_zip_reader_get_num_files(&zip_archive);
  for (i = 0; i < n; ++i) {
    if (!mz_zip_reader_file_stat(&zip_archive, i, &info)) {
      // Cannot get information about zip archive;
      goto out;
    }
#if defined(_MSC_VER)
    strncpy_s(&path[dirlen], MAX_PATH - dirlen, info.m_filename,
              MAX_PATH - dirlen);
#else
    strncpy(&path[dirlen], info.m_filename, MAX_PATH - dirlen);
#endif
    if (mkpath(path) < 0) {
      // Cannot make a path
      goto out;
    }

    if (!mz_zip_reader_is_file_a_directory(&zip_archive, i)) {
      if (!mz_zip_reader_extract_to_file(&zip_archive, i, path, 0)) {
        // Cannot extract zip archive to file
        goto out;
      }
    }

    if (on_extract) {
      if (on_extract(path, arg) < 0) {
        goto out;
      }
    }
  }
  status = 0;

out:
  // Close the archive, freeing any resources it was using
  if (!mz_zip_reader_end(&zip_archive)) {
    // Cannot end zip reader
    status = -1;
  }

  return status;
}


Sigma 300mm F2.8 EX DG HSM APO
0x736	= Sigma 50-500mm F4-6.3 EX DG HSM APO

0x200	= Sigma 12-24mm F4.5-5.6 EX DG ASP HSM
0x737	= Sigma 150-500mm F5-6.3 APO DG OS HSM

0x201	= Sigma 10-20mm F4-5.6 EX DC HSM
0x738	= Sigma 50-500mm F4.5-6.3 APO DG OS HSM

0x202	= Sigma 10-20mm F3.5 EX DC HSM
0x740	= Sigma 150-600mm F5-6.3 DG OS HSM | S

0x203	= Sigma 8-16mm F4.5-5.6 DC HSM
0x745	= Sigma 150-600mm F5-6.3 DG OS HSM | C

0x204	= Sigma 12-24mm F4.5-5.6 DG HSM II
0x777	= Sigma 18-200mm F3.5-6.3 DC

0x205	= Sigma 12-24mm F4 DG HSM | A
0x77d	= Sigma 18-200mm F3.5-6.3 DC (Motorized)

0x210	= Sigma 18-35mm F1.8 DC HSM | A
0x785	= Sigma 28-200mm F3.5-5.6 DL ASP IF HZM Macro

0x240	= Sigma 135mm F1.8 DG HSM | A
0x787	= Sigma 28-200mm F3.5-5.6 Compact ASP HZ Macro

0x256	= Sigma 105mm F2.8 EX Macro
0x789	= Sigma 18-125mm F3.5-5.6 DC

0x257	= Sigma 105mm F2.8 EX DG Macro
0x790	= Sigma 28-300mm F3.5-6.3 DL ASP IF HZM

0x258	= Sigma 105mm F2.8 EX DG OS HSM Macro
0x793	= Sigma 28-300mm F3.5-6.3 Macro

0x259	= Sigma 105mm F1.4 DG HSM | A
0x794	= Sigma 28-200mm F3.5-5.6 DG Compact ASP HZ Macro

0x270	= Sigma 70mm F2.8 EX DG Macro
0x795	= Sigma 28-300mm F3.5-6.3 DG Macro

0x271	= Sigma 70mm F


     keypress('j', 'J');
    }

    public void triggerK() {
        keypress('k', 'K');
    }

    public void triggerL() {
        keypress('l', 'L');
    }

    public void triggerM() {
        keypress('m', 'M');
    }

    public void triggerN() {
        keypress('n', 'N');
    }

    public void triggerO() {
        keypress('o', 'O');
    }

    public void triggerP() {
        keypress('p', 'P');
    }

    public void triggerQ() {
        keypress('q', 'Q');
    }

    public void triggerR() {
        keypress('r', 'R');
    }

    public void triggerS() {
        keypress('s', 'S');
    }

    public void triggerT() {
        keypress('t', 'T');
    }

    public void triggerU() {
        keypress('u', 'U');
    }

    public void triggerV() {
        keypress('v', 'V');
    }

    public void triggerW() {
        keypress('w', 'W');
    }

    public void triggerX() {
        keypress('x', 'X');
    }

    public void triggerY() {
        keypress('y', 'Y');
    }

    public void triggerZ() {
        keypress('z', 'Z');
    }

    public void trigger1() {
        triggerAndAppend("1");
    }

    public void trigger2() {
        triggerAndAppend("2");
    }

    public void trigger3() {
        triggerAndAppend("3");
    }

    public void trigger4() {
        triggerAndAppend("4");
    }

    public void trigger5() {
        triggerAndAppend("5");
    }

    public void trigger6() {
        triggerAndAppend("6");
    }

    public void trigger7() {
        triggerAndAppend("7");
    }

    public void trigger8() {
        triggerAndAppend("8");
    }

    public void trigger9() {
        triggerAndAppend("9");
    }

    public void trigger0() {
        triggerAndAppend("0");
    }

    public void triggerDot() {
        triggerAndAppend(".");
    }

    public void triggerDash() {
        triggerAndAppend("-");
    }

    public void triggerSpace() {
        triggerAndAppend(" ");
    }

    public void triggerAt() {
        triggerAndAppend("@");
    }

    public void triggerClear() {
        clear();
    }

    public void triggerDel() {
        delete();
    }

    public void triggerEnter() {
        close();
    }

    public void triggerCancel() {
        cancel();
    }

    public void triggerShift() {
        if (wasMouseClicked()) {
            shift();
        }
    }

    public void triggerShiftLock() {
        if (wasMouseClicked()) {
            shiftLock();
        }
    }

    public void triggerAndAppend(String s) {
        if (wasMouseClicked()) {
            append(s);
        }
    }

    private synchronized void keypress(char lower, char upper) {
        if (wasMouseClicked()) {
            if (m_shiftLock) {
                if (m_shift) {
                    append(lower);
                    shift();
                } else {
                    append(upper);
                }
            } else {
                if (m_shift) {
                    append(upper);
                    shift();
                } else {
                    append(lower);
                }
            }
        }
    }

    private synchronized void shiftLock() {
        if (m_shiftLock) {
            m_shiftLock = false;
            this.


.verb(tell)] [npc2.name] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breasts+].",

								"Pulling [npc.her] [npc.cock+] out from [npc2.namePos] cleavage, [npc.name] [npc.verb(tell)] [npc2.name] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breasts+]."));
						break;
				}
			} else if(Main.sex.getCharacterTargetedForSexAction(this).hasBreasts()) {
				switch(Main.sex.getSexPace(Main.sex.getCharacterPerformingAction())) {
					case DOM_ROUGH:
						UtilText.nodeContentSB.append(UtilText.returnStringAtRandom(
								"Roughly pushing [npc2.name] away, [npc.name] [npc.verb(pull)] [npc.her] [npc.cock+] out from [npc2.her] tiny amount of cleavage"
										+ " and [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breastSize] [npc2.breasts].",

								"Roughly pulling [npc.her] [npc.cock+] out from [npc2.namePos] tiny amount of cleavage,"
										+ " [npc.name] [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breastSize] [npc2.breasts]."));
						break;
					default:
						UtilText.nodeContentSB.append(UtilText.returnStringAtRandom(
								"[npc.name] [npc.verb(pull)] [npc.her] [npc.cock+] out from [npc2.namePos] tiny amount of cleavage"
										+ " and [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breastSize] [npc2.breasts].",

								"Pulling [npc.her] [npc.cock+] out from [npc2.namePos] tiny amount of cleavage,"
										+ " [npc.name] [npc.verb(tell)] [npc2.name] that [npc.sheHas] had enough of fucking [npc2.her] [npc2.breastSize] [npc2.breasts]."));
						break;
				}
			} else {
				switch(Main.sex.getSexPace(Main.sex.getCharacterPerformingAction())) {
					case DOM_ROUGH:
						UtilText.nodeContentSB.append(UtilText.returnStringAtRandom(
								"Roughly pushing [npc2.name] away, [npc.name] takes [npc.her] [npc.cock+] away from [npc2.her] chest and [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of grinding against [npc2.herHim].",

								"Roughly pulling [npc.her] [npc.cock+] away from [npc2.namePos] chest, [npc.name] [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of grinding against [npc2.herHim]."));
						break;
					default:
						UtilText.nodeContentSB.append(UtilText.returnStringAtRandom(
								"[npc.Name] takes [npc.her] [npc.cock+] away from [npc2.namePos] chest and [npc.verb(tell)] [npc2.herHim] that [npc.sheHas] had enough of grinding against [npc2.herHim].",

								"Pulling [npc.her] [npc.cock+] away from [npc2.namePos] chest, [npc.name] [npc.verb(tell)]


DeclareChipRegister(rCTL, 0xFD89);

        namespace CTL
        {
            RTSXDeclareChipRegisterValue(kTimeMask, 0xF0);
            RTSXDeclareChipRegisterValue(kEnableDetection, 0x08);
            RTSXDeclareChipRegisterValue(kEnableInterrupt, 0x04);
            RTSXDeclareChipRegisterValue(kClearInterrupt, 0x02);
            RTSXDeclareChipRegisterValue(kClear, 0x01);
        }

        /// Address of the register that contains the current status
        RTSXDeclareChipRegister(rSTAT, 0xFD8A);

        namespace STAT
        {
            RTSXDeclareChipRegisterValue(kGlitchTimeMask, 0xF0);
            RTSXDeclareChipRegisterValue(kDetect, 0x08);
            RTSXDeclareChipRegisterValue(kNow, 0x04);
            RTSXDeclareChipRegisterValue(kEver, 0x02);
        }
    }
}

namespace RTSX::PCR::Chip
{
    RTSXDeclareChipRegister(rIRQEN0, 0xFE20);
    namespace IRQEN0
    {
        RTSXDeclareChipRegisterValue(kEnableLinkDownInt, 0x10);
        RTSXDeclareChipRegisterValue(kEnableLinkReadyInt, 0x20);
        RTSXDeclareChipRegisterValue(kEnableSuspendInt, 0x40);
        RTSXDeclareChipRegisterValue(kEnableDMADoneInt, 0x80);
    }

    RTSXDeclareChipRegister(rIRQSTAT0, 0xFE21);
    namespace IRQSTAT0
    {
        RTSXDeclareChipRegisterValue(kDMADoneInt, 0x80);
        RTSXDeclareChipRegisterValue(kSuspendInt, 0x40);
        RTSXDeclareChipRegisterValue(kLinkReadyInt, 0x20);
        RTSXDeclareChipRegisterValue(kLinkDownInt, 0x10);
    }
}

/// Chip registers that manages DMA
namespace RTSX::PCR::Chip::DMA
{
    /// DMA data length registers
    RTSXDeclareChipRegister(rC0, 0xFE28);
    RTSXDeclareChipRegister(rC1, 0xFE29);
    RTSXDeclareChipRegister(rC2, 0xFE2A);
    RTSXDeclareChipRegister(rC3, 0xFE2B);

    /// Address of the register that manages DMA
    RTSXDeclareChipRegister(rCTL, 0xFE2C);

    /// Special values and flags for the CTL register
    namespace CTL
    {
        /// Bit 7 is set to reset DMA
        RTSXDeclareChipRegisterValue(kResetMask, 0x80);
        RTSXDeclareChipRegisterValue(kResetValue, 0x80);
        RTSXDeclareChipRegisterValue(kBusy, 0x04);

        RTSXDeclareChipRegisterValue(kDirectionToCard, 0x00);
        RTSXDeclareChipRegisterValue(kDirectionFromCard, 0x02);
        RTSXDeclareChipRegisterValue(kDirectionMask, 0x02);

        RTSXDeclareChipRegisterValue(kEnable, 0x01);

        RTSXDeclareChipRegisterValue(kPackSize128, 0 << 4);
        RTSXDeclareChipRegisterValue(kPackSize256, 1 << 4);
        RTSXDeclareChipRegisterValue(kPackSize512, 2 << 4);
        RTSXDeclareChipRegisterValue(kPackSize1024, 3 << 4);
        RTSXDeclareChipRegisterValue(kPackSizeMask, 0x30);
    }

    /// Address of the register that resets DMA for RTS5260
    RTSXDeclareChipRegister(rRSTCTL0, 0xFEBF);

    /// Special values and flags for the CTL register
    namespace RSTCTL0
    {
        RTSXDeclareChipRegisterValue(kResetDMA, 0x80);
        RTSXDeclareChipRegisterValue(kResetADMA3, 0x40);

        RTSXDeclareChipRegisterValue(kResetAllMask, kResetDMA | kRese


            throw PropRequiresFormatToBeNonNullError("videoBitRate")
          }
          val recommendedBitRate = CamcorderProfileUtils.getRecommendedBitRate(cameraId, format.videoSize)
          if (recommendedBitRate != null) {
            val targetBitRate = recommendedBitRate.toDouble() * bitRateMultiplier
            recorder.setTargetVideoEncodingBitRate(targetBitRate.toInt())
          }
        }
      }.build()
    }

    val video = VideoCapture.Builder(recorder).also { video ->
      // Configure Video Output
      if (videoConfig.config.isMirrored) {
        video.setMirrorMode(MirrorMode.MIRROR_MODE_ON)
      } else {
        video.setMirrorMode(MirrorMode.MIRROR_MODE_OFF)
      }
      if (configuration.videoStabilizationMode.isAtLeast(VideoStabilizationMode.STANDARD)) {
        assertFormatRequirement("videoStabilizationMode", format, InvalidVideoStabilizationMode(configuration.videoStabilizationMode)) {
          it.videoStabilizationModes.contains(configuration.videoStabilizationMode)
        }
        video.setVideoStabilizationEnabled(true)
      }
      if (fpsRange != null) {
        assertFormatRequirement("fps", format, InvalidFpsError(fpsRange.upper)) {
          fpsRange.lower >= it.minFps &&
            fpsRange.upper <= it.maxFps
        }
        video.setTargetFrameRate(fpsRange)
      }
      if (videoConfig.config.enableHdr) {
        assertFormatRequirement("videoHdr", format, InvalidVideoHdrError()) { it.supportsVideoHdr }
        video.setDynamicRange(DynamicRange.HDR_UNSPECIFIED_10_BIT)
      }
      if (format != null) {
        Log.i(CameraSession.TAG, "Video size: ${format.videoSize}")
        val resolutionSelector = ResolutionSelector.Builder()
          .forSize(format.videoSize)
          .setAllowedResolutionMode(ResolutionSelector.PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION)
          .build()
        video.setResolutionSelector(resolutionSelector)
      }
    }.build()
    videoOutput = video
    recorderOutput = recorder
  } else {
    videoOutput = null
    recorderOutput = null
  }

  // 4. Frame Processor
  val frameProcessorConfig = configuration.frameProcessor as? CameraConfiguration.Output.Enabled<CameraConfiguration.FrameProcessor>
  if (frameProcessorConfig != null) {
    val pixelFormat = frameProcessorConfig.config.pixelFormat
    Log.i(CameraSession.TAG, "Creating $pixelFormat Frame Processor output...")
    val analyzer = ImageAnalysis.Builder().also { analysis ->
      analysis.setBackpressureStrategy(ImageAnalysis.STRATEGY_BLOCK_PRODUCER)
      analysis.setOutputImageFormat(pixelFormat.toImageAnalysisFormat())
      if (fpsRange != null) {
        assertFormatRequirement("fps", format, InvalidFpsError(fpsRange.upper)) {
          fpsRange.lower >= it.minFps &&
            fpsRange.upper <= it.maxFps
        }
        analysis.setTargetFrameRate(fpsRange)
      }
      if (format != null) {
        Log.i(CameraSession.TAG, "Frame Processor size: ${format.videoSize}")
        val resolutionSelector = ResolutionSelector.Builder()
          .forSize(format.videoSize)
          .setAllowedResolutionMode(ResolutionSelector.PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION)
          .build()
        analysis.setResolutionSelector(resolutionSelector)
      }
    }.build()
    val pipeline = FrameProcessorPipeline(callback)
    analyzer.setAnalyzer(CameraQueues.videoQueue.executor, pipeline)
    frameProcessorOutput = analyzer
  } else {
    frameProcessorOutput = null
  }

  // 5. Code Scanner
  val codeScannerConfig = configuration.codeScan


/*

MIT License

Copyright (c) John Blaiklock 2020 miniwin Embedded Window Manager

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

/***************
*** INCLUDES ***
***************/

#include "miniwin.h"
#include "app.h"

/****************
*** CONSTANTS ***
****************/

/************
*** TYPES ***
************/

/***********************
*** GLOBAL VARIABLES ***
***********************/

/**********************
*** LOCAL VARIABLES ***
**********************/

/********************************
*** LOCAL FUNCTION PROTOTYPES ***
********************************/

/**********************
*** LOCAL FUNCTIONS ***
**********************/

/***********************
*** GLOBAL FUNCTIONS ***
***********************/

void app_main()
{
	/* initialize non-miniwin parts of the application */
	app_init();

	/* initialize miniwin */
	mw_init();

	while (true)
	{
		/* do non-miniwin parts of application main loop processing */
		app_main_loop_process();

		/* do miniwin message processing */
		(void)mw_process_message();
	}
}


reserved)
	lengthInBits += 4

	// Simple field (originalInvokeId)
	lengthInBits += 8

	// Simple field (serviceChoice)
	lengthInBits += 8

	return lengthInBits
}

func (m *_APDUSimpleAck) GetLengthInBytes(ctx context.Context) uint16 {
	return m.GetLengthInBits(ctx) / 8
}

func (m *_APDUSimpleAck) parse(ctx context.Context, readBuffer utils.ReadBuffer, parent *_APDU, apduLength uint16) (__aPDUSimpleAck APDUSimpleAck, err error) {
	m.APDUContract = parent
	parent._SubType = m
	positionAware := readBuffer
	_ = positionAware
	if pullErr := readBuffer.PullContext("APDUSimpleAck"); pullErr != nil {
		return nil, errors.Wrap(pullErr, "Error pulling for APDUSimpleAck")
	}
	currentPos := positionAware.GetPos()
	_ = currentPos

	reservedField0, err := ReadReservedField(ctx, "reserved", ReadUnsignedByte(readBuffer, uint8(4)), uint8(0))
	if err != nil {
		return nil, errors.Wrap(err, fmt.Sprintf("Error parsing reserved field"))
	}
	m.reservedField0 = reservedField0

	originalInvokeId, err := ReadSimpleField(ctx, "originalInvokeId", ReadUnsignedByte(readBuffer, uint8(8)))
	if err != nil {
		return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'originalInvokeId' field"))
	}
	m.OriginalInvokeId = originalInvokeId

	serviceChoice, err := ReadEnumField[BACnetConfirmedServiceChoice](ctx, "serviceChoice", "BACnetConfirmedServiceChoice", ReadEnum(BACnetConfirmedServiceChoiceByValue, ReadUnsignedByte(readBuffer, uint8(8))))
	if err != nil {
		return nil, errors.Wrap(err, fmt.Sprintf("Error parsing 'serviceChoice' field"))
	}
	m.ServiceChoice = serviceChoice

	if closeErr := readBuffer.CloseContext("APDUSimpleAck"); closeErr != nil {
		return nil, errors.Wrap(closeErr, "Error closing for APDUSimpleAck")
	}

	return m, nil
}

func (m *_APDUSimpleAck) Serialize() ([]byte, error) {
	wb := utils.NewWriteBufferByteBased(utils.WithInitialSizeForByteBasedBuffer(int(m.GetLengthInBytes(context.Background()))))
	if err := m.SerializeWithWriteBuffer(context.Background(), wb); err != nil {
		return nil, err
	}
	return wb.GetBytes(), nil
}

func (m *_APDUSimpleAck) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error {
	positionAware := writeBuffer
	_ = positionAware
	log := zerolog.Ctx(ctx)
	_ = log
	ser := func() error {
		if pushErr := writeBuffer.PushContext("APDUSimpleAck"); pushErr != nil {
			return errors.Wrap(pushErr, "Error pushing for APDUSimpleAck")
		}

		if err := WriteReservedField[uint8](ctx, "reserved", uint8(0), WriteUnsignedByte(writeBuffer, 4)); err != nil {
			return errors.Wrap(err, "Error serializing 'reserved' field number 1")
		}

		if err := WriteSimpleField[uint8](ctx, "originalInvokeId", m.GetOriginalInvokeId(), WriteUnsignedByte(writeBuffer, 8)); err != nil {
			return errors.Wrap(err, "Error serializing 'originalInvokeId' field")
		}

		if err := WriteSimpleEnumField[BACnetConfirmedServiceChoice](ctx, "serviceChoice", "BACnetConfirmedServiceChoice", m.GetServiceChoice(), WriteEnum[BACnetConfirmedServiceChoice, uint8](BACnetConfirmedServiceChoice.GetValue, BACnetConfirmedServiceChoice.PLC4XEnumName, WriteUnsignedByt


| فارسی
        | Türkçe
        | Tiếng Việt
        | Bahasa Indonesia

# Otwarty, lekki zamiennik Trello zaprojektowany dla twórców i niezależnych programistów.

Skupienie na prostocie, szybkości i skalowalności.
Zbudowany w oparciu o nowoczesny stack: Tailwind CSS, shadcn/ui, Supabase, integracja Stripe.
Obsługuje nieograniczoną liczbę projektów, współpracę zespołową, tryb ciemny/jasny i płynne doświadczenie użytkownika.
Idealny dla pojedynczych deweloperów i małych zespołów, którzy chcą pełnej kontroli bez zbędnej złożoności.

## 🌟 Jeśli ten projekt jest dla Ciebie użyteczny, rozważ dodanie gwiazdki! To pomaga innym go odkryć.

# Przewodnik wdrożeniowy

## Przegląd
Ta aplikacja korzysta teraz z lokalnych tras API Next.js zamiast Supabase Edge Functions do integracji Stripe. To upraszcza wdrożenie i pozwala używać standardowych plików .env do konfiguracji.

## Konfiguracja zmiennych środowiskowych

### 1. Utwórz plik .env.local
Skopiuj `.env.example` do `.env.local` i uzupełnij rzeczywistymi wartościami:

```bash
cp .env.example .env.local
```
### 2. Wymagane zmienne środowiskowe

#### Konfiguracja Supabase
- `NEXT_PUBLIC_SUPABASE_URL` - URL Twojego projektu Supabase
- `NEXT_PUBLIC_SUPABASE_ANON_KEY` - Twój anonimowy klucz Supabase
- `SUPABASE_SERVICE_ROLE_KEY` - Twój klucz roli serwisowej Supabase (tylko po stronie serwera)

#### Konfiguracja Stripe (opcjonalnie)
- `STRIPE_SECRET_KEY` - Twój tajny klucz Stripe (tylko po stronie serwera)
- `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` - Twój klucz publiczny Stripe
- `STRIPE_WEBHOOK_SECRET` - Twój sekret webhook Stripe

#### Konfiguracja strony
- `NEXT_PUBLIC_SITE_URL` - URL Twojej strony (na produkcji)
- `NEXTAUTH_URL` - URL Twojej strony (taki sam jak wyżej)
- `NEXTAUTH_SECRET` - Losowy sekret dla NextAuth

## Lokalny rozwój

1. Zainstaluj zależności:

```bash
npm install
```
2. Skonfiguruj swoje zmienne środowiskowe w `.env.local`

3. Uruchom serwer


(columns: Column[], noNull: boolean) {

    let columnList = '';

    for (let i = 0; i < columns.length; i++) {
        if (columns[i].usedInQuery) {
            columnList += columns[i].databaseColumnName;
            columnList += ',';
        }
    }
    columnList = columnList.substring(0, columnList.length - 1);

    let query = `select+distinct+${columnList}+from+ps`;

    if (noNull) {
        let whereClause = '+where+';
        for (let i = 0; i < columns.length; i++) {
            if (columns[i].usedInQuery) {
                whereClause += columns[i].databaseColumnName + '+is+not+null';
                whereClause += '+and+';
            }
        }
        whereClause = whereClause.substring(0, whereClause.length - 5);
        query += whereClause;
    }

    return query;
}import { chatReducer } from "./reducers";
import {
  SEND_MESSAGE,
  FORBIDDEN_WORD,
  DELETE_MESSAGE,
  ChatState
} from "./types";

describe("Chat Reducers", () => {
  let newChatState: ChatState;
  it("should handle SEND_MESSAGE", () => {
    const message = {
      message: "test message",
      timestamp: 123456,
      user: "test user"
    };
    const state = chatReducer(undefined, {
      type: SEND_MESSAGE,
      payload: message
    });
    newChatState = {
      messages: [message],
      forbiddenWord: false
    };
    expect(state).toEqual(newChatState);
  });
  it("should handle FORBIDDEN_WORD", () => {
    const state = chatReducer(undefined, {
      type: FORBIDDEN_WORD
    });
    newChatState = {
      messages: [],
      forbiddenWord: true
    };
    expect(state).toEqual(newChatState);
  });
  it("should handle DELETE_MESSAGE", () => {
    const initialState: ChatState = {
      messages: [
        {
          user: "test user",
          message: "test message",
          timestamp: 123456
        }
      ],
      forbiddenWord: false
    };
    const state = chatReducer(initialState, {
      type: DELETE_MESSAGE,
      meta: { timestamp: initialState.messages[0].timestamp }
    });
    newChatState = {
      messages: [],
      forbiddenWord: false
    };
    expect(state).toEqual(newChatState);
  });
});
/// <reference path="../node_modules/phaser/typescript/phaser.d.ts" />

export default class Extras {

	static types = [
		"feather",
		"beaver",
		"hat"
	];

	static scores = {
		"beaver": 5,
		"feather": 10,
		"hat": 20
	};

	static preload(game: Phaser.Game) {
		game.load.image("feather", "assets/feather.png");
		game.load.image("beaver", "assets/beaver.png");
		game.load.image("hat", "assets/hat.png");
		game.load.audio("mam-to", "assets/mam-to.mp3");
	}

	protected items: Array


// Copyright (c) MOSA Project. Licensed under the New BSD License.

using Mosa.Compiler.Common;

namespace Mosa.Compiler.Framework.Stages;

/// <summary>
/// Virtual Register Reindex Stage
/// </summary>
/// <seealso cref="Mosa.Compiler.Framework.BaseMethodCompilerStage" />
public sealed class VirtualRegisterReindexStage : BaseMethodCompilerStage
{
	protected override void Run()
	{
		MethodCompiler.VirtualRegisters.RemoveUnused();
		OrderVirtualRegisters();
		OrderLocalStack();
	}

	private void OrderLocalStack()
	{
		var sl = new List<Operand>();

		foreach (var block in BasicBlocks)
		{
			for (var node = block.AfterFirst; !node.IsBlockEndInstruction; node = node.Next)
			{
				if (node.IsEmptyOrNop)
					continue;

				foreach (var op in node.Operands)
				{
					if (op.IsLocalStack)
					{
						sl.AddIfNew(op);
					}
				}
			}
		}

		foreach (var s in MethodCompiler.LocalStack)
		{
			sl.AddIfNew(s.HasParent ? s.Parent : s);
		}

		var index = 0;

		foreac


	}
		else {
			fraction /= length;
		}
		if ( fraction < trace.fraction ) {
			VectorSubtract(end, start, dir);
			VectorMA(start, fraction, dir, intersection);
			// if the intersection is between the cylinder lower and upper bound
			if (intersection[2] <= origin[2] + halfheight &&
						intersection[2] >= origin[2] - halfheight) {
				//
				trace.fraction = fraction;
				VectorSubtract(intersection, origin, dir);
				dir[2] = 0;
				#ifdef CAPSULE_DEBUG
					l2 = VectorLength(dir);
					if (l2 <= radius) {
						int bah = 1;
					}
				#endif
				scale = 1 / (radius+RADIUS_EPSILON);
				VectorScale(dir, scale, dir);
				VectorCopy(dir, trace.plane.normal);
				VectorAdd( tw->modelOrigin, intersection, intersection);
				trace.plane.dist = DotProduct(trace.plane.normal, intersection);
				trace.contents = CONTENTS_BODY;
			}
		}
	}
	else if (d == 0) {
		//t[0] = (- b ) / 2 * a;
		// slide along the cylinder
	}
	// no intersection at all
}

/*
================
CM_TraceCapsuleThroughCapsule

capsule vs. capsule collision (not rotated)
================
*/
void CM_TraceCapsuleThroughCapsule( traceWork_t *tw, trace_t &trace, clipHandle_t model ) {
	int i;
	vec3_t mins, maxs;
	vec3_t top, bottom, starttop, startbottom, endtop, endbottom;
	vec3_t offset, symetricSize[2];
	float radius, halfwidth, halfheight, offs, h;

	CM_ModelBounds(model, mins, maxs);
	// test trace bounds vs. capsule bounds
	if ( tw->bounds[0][0] > maxs[0] + RADIUS_EPSILON
		|| tw->bounds[0][1] > maxs[1] + RADIUS_EPSILON
		|| tw->bounds[0][2] > maxs[2] + RADIUS_EPSILON
		|| tw->bounds[1][0] < mins[0] - RADIUS_EPSILON
		|| tw->bounds[1][1] < mins[1] - RADIUS_EPSILON
		|| tw->bounds[1][2] < mins[2] - RADIUS_EPSILON
		) {
		return;
	}
	// top origin and bottom origin of each sphere at start and end of trace
	VectorAdd(tw->start, tw->sphere.offset, starttop);
	VectorSubtract(tw->start, tw->sphere.offset, startbottom);
	VectorAdd(tw->end, tw->sphere.offset, endtop);
	VectorSubtract(tw->end, tw->sphere.offset, endbottom);

	// calculate top and bottom of the capsule spheres to collide with
	for ( i = 0 ; i < 3 ; i++ ) {
		offset[i] = ( mins[i] + maxs[i] ) * 0.5;
		symetricSize[0][i] = mins[i] - offset[i];
		symetricSize[1][i] = maxs[i] - offset[i];
	}
	halfwidth = symetricSize[ 1 ][ 0 ];
	halfheight = symetricSize[ 1 ][ 2 ];
	radius = ( halfwidth > halfheight ) ? halfheight : halfwidth;
	offs = halfheight - radius;
	VectorCopy(offset, top);
	top[2] += offs;
	VectorCopy(offset, bottom);
	bottom[2] -= offs;
	// expand radius of spheres
	radius += tw->sphere.radius;
	// if there is horizontal movement
	if ( tw->start[0] != tw->end[0] || tw->start[1] != tw->end[1] ) {
		// height of the expanded cylinder is the height of both cylinders minus the radius of both spheres
		h = halfhe


4 K11 ["AssetConfigSharing"]
  LOADK R25 K26 ["PublicInformation"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R18 R22
  JUMP [+77]
  GETUPVAL R22 0
  JUMPIFNOT R22 [+18]
  GETIMPORT R22 K25 [Enum.AssetType.Video]
  JUMPIFNOTEQ R6 R22 [+8]
  LOADK R24 K11 ["AssetConfigSharing"]
  LOADK R25 K27 ["VideoPublicDisabledInformation"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R18 R22
  JUMP [+13]
  LOADK R24 K11 ["AssetConfigSharing"]
  LOADK R25 K28 ["PublicDisabledInformation"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R18 R22
  JUMP [+6]
  LOADK R24 K11 ["AssetConfigSharing"]
  LOADK R25 K28 ["PublicDisabledInformation"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R18 R22
  LOADB R21 0
  DUPTABLE R22 K31 [{"Text", "OnClick"}]
  LOADK R25 K11 ["AssetConfigSharing"]
  LOADK R26 K32 ["PublicDisabledLinkText"]
  NAMECALL R23 R11 K13 ["getText"]
  CALL R23 3 1
  SETTABLEKS R23 R22 K29 ["Text"]
  GETTABLEKS R23 R0 K33 ["onLearnMoreActivated"]
  SETTABLEKS R23 R22 K30 ["OnClick"]
  MOVE R19 R22
  LOADK R24 K11 ["AssetConfigSharing"]
  LOADK R25 K34 ["PrivateInformationVersionTwo"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R17 R22
  GETUPVAL R24 1
  GETTABLEKS R23 R24 K36 ["getAssetConfigMessaging"]
  CALL R23 0 1
  GETTABLEKS R22 R23 K35 ["showManageUniversePermissionsLink"]
  JUMPIFNOT R22 [+24]
  JUMPIFNOT R5 [+23]
  DUPTABLE R22 K31 [{"Text", "OnClick"}]
  LOADK R25 K11 ["AssetConfigSharing"]
  LOADK R26 K37 ["PrivateInformationLinkText"]
  NAMECALL R23 R11 K13 ["getText"]
  CALL R23 3 1
  SETTABLEKS R23 R22 K29 ["Text"]
  NEWCLOSURE R23 P0
  CAPTURE UPVAL U2
  CAPTURE UPVAL U3
  CAPTURE VAL R5
  CAPTURE UPVAL U4
  SETTABLEKS R23 R22 K30 ["OnClick"]
  MOVE R20 R22
  JUMP [+6]
  LOADK R24 K11 ["AssetConfigSharing"]
  LOADK R25 K26 ["PublicInformation"]
  NAMECALL R22 R11 K13 ["getText"]
  CALL R22 3 1
  MOVE R18 R22
  GETUPVAL R23 5
  GETTABLEKS R22 R23 K38 ["new"]
  CALL R22 0 1
  JUMPIFNOT R9 [+6]
  GETUPVAL R25 6
  GETTABLEKS R24 R25 K39 ["SHARING_KEYS"]
  GETTABLEKS R23 R24 K40 ["Public"]
  JUMP [+5]
  GETUPVAL R25 6
  GETTABLEKS R24 R25 K39 ["SHARING_KEYS"]
  GETTABLEKS R23 R24 K41 ["Private"]
  GETUPVAL R25 7
  GETTABLEKS R24 R25 K42 ["createElement"]
  GETUPVAL R25 8
  DUPTABLE R26 K49 [{"AutomaticSize", "HorizontalAlignment", "Layout", "LayoutOrder", "Padding", "Size", "VerticalAlignment


",
    schoolId = "123456",
    studentName = "",
    schoolNameShort = "",
    type = MailboxType.UNKNOWN,
)

fun getSemesterPojo(diaryId: Int, semesterId: Int, start: LocalDate, end: LocalDate, semesterName: Int = 1) = SdkSemester(
    diaryId = diaryId,
    kindergartenDiaryId = 0,
    semesterId = semesterId,
    diaryName = "$semesterId",
    schoolYear = 1970,
    classId = 0,
    className = "Ti",
    semesterNumber = semesterName,
    unitId = 1,
    start = start,
    end = end,
)

fun getStudentEntity(mode: Sdk.Mode = Sdk.Mode.HEBE) = Student(
    scrapperBaseUrl = "http://fakelog.cf",
    scrapperDomainSuffix = "",
    email = "jan@fakelog.cf",
    certificateKey = "",
    classId = 0,
    className = "",
    isCurrent = false,
    isParent = false,
    loginMode = mode.name,
    loginType = "STANDARD",
    mobileBaseUrl = "",
    password = "",
    privateKey = "",
    registrationDate = now(),
    schoolName = "",
    schoolShortName = "test",
    schoolSymbol = "",
    studentId = 1,
    studentName = "",
    symbol = "",
    userLoginId = 1,
    userName = "",
    isEduOne = false,
    isAuthorized = false
).apply {
    id = 1
}
package io.github.wulkanowy.data.repositories

import io.github.wulkanowy.createWulkanowySdkFactoryMock
import io.github.wulkanowy.data.dataOrNull
import io.github.wulkanowy.data.db.dao.GradePartialStatisticsDao
import io.github.wulkanowy.data.db.dao.GradePointsStatisticsDao
import io.github.wulkanowy.data.db.dao.GradeSemesterStatisticsDao
import io.github.wulkanowy.data.errorOrNull
import io.github.wulkanowy.data.mappers.mapToEntities
import io.github.wulkanowy.data.toFirstResult
import io.github.wulkanowy.getSemesterEntity
import io.github.wulkanowy.getStudentEntity
import io.github.wulkanowy.sdk.Sdk
import io.github.wulkanowy.sdk.pojo.GradeStatisticsItem
import io.github.wulkanowy.sdk.pojo.GradeStatisticsSubject
import io.github.wulkanowy.utils.AutoRefreshHelper
import io.mockk.MockKAnnotations
import io.mockk.Runs
import io.mockk.coEvery
import io.mockk.coVerify
import io.mockk.every
import io.mockk.impl.annotations.MockK
import io.mockk.just
import io.mockk.spyk
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test

class GradeStatisticsRepositoryTest {

    private var sdk = spyk<Sdk>()
    private val wulkanowySdkFactory = createWulkanowySdkFactoryMock(sdk)

    @MockK
    private lateinit var gradePartialStatisticsDb: GradePartialStatisticsDao

    @MockK
    private lateinit var gradePointsStatisticsDb: GradePointsStatisticsDao

    @MockK
    private lateinit var gradeSemesterStatisticsDb: GradeSemesterStatisticsDao

    @MockK(relaxUnitFun = true)
    private lateinit var refreshHelper: AutoRefreshHelper

    private val semester = getSemesterEntity()

    private val student = getStudentEntity()

    private lateinit var gradeStatisticsRepository: GradeStatisticsRepository

    @Before
    fun setUp() {
        MockKAnnotations.init(this)
        every { refreshHelper.shouldBeRefreshed(any()) } returns false

        gradeStatisticsRepository = GradeStatisticsRepository(
            gradePartialStatisticsDb = gradePartialStatisticsDb,
            gradePointsStatisticsDb = gradePointsStatisticsDb,
            gradeSemesterStatisticsDb = gradeSemesterStatisticsDb,
            wulkanowySdkFactory = wulkanowySdkFactory,
            refreshHelper = refreshHelper,
        )
    }

    @Test


.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/************************************************************
* SPLIT-FLAP class                                          *
************************************************************/
.split-flap {
    -fx-skin        : "eu.hansolo.enzo.splitflap.skin.SplitFlapSkin";
    -flap-base      : rgb(59, 58, 53);
}

/************************************************************
* SPLIT-FLAP components                                     *
************************************************************/
.split-flap .fixture {
    -fx-background-color : linear-gradient(from 55% 0% to 55% 100%,
                                           rgb(56, 56, 56) 0%,
                                           rgb(156, 156, 156) 18%,
                                           rgb(47, 47, 47) 65%,
                                           rgb(84, 86, 85) 89%,
                                           rgb(55, 55, 55) 100%),
                           linear-gradient(from 57% 0% to 57% 100%,
                                           rgb(116, 116, 116) 0%,
                                           rgb(213, 213, 213) 13%,
                                           rgb(56, 56, 56) 66%,
                                           rgb(64, 64, 64) 73%,
                                           rgb(109, 109, 109) 90%,
                                           rgb(83, 83, 83) 100%);
    -fx-background-insets: 0, 1;
    -fx-scale-shape      : true;
    -fx-shape            : "M 103.0 79.0 H 112.0 V 110.0 H 103.0 V 79.0 Z";
}
.split-flap .fixture-dark {
    -fx-background-color : linear-gradient(from 55% 0% to 55% 100%,
                                           rgb(26, 26, 26) 0%,
                                           rgb(86, 86, 86) 18%,
                                           rgb(17, 17, 17) 65%,
                                           rgb(24, 24, 24) 89%,
                                           rgb(25, 25, 25) 100%),
                           linear-gradient(from 57% 0% to 57% 100%,
                                           rgb(66, 66, 66) 0%,
                                           rgb(153, 153, 153) 13%,
                                           rgb(6, 6, 6) 66%,
                                           rgb(14, 14, 14) 73%,
                                           rgb(39, 39, 39) 90%,
                                           rgb(23, 23, 23) 100%);
    -fx-background-insets: 0, 1;
    -fx-scale-shape      : true;
    -fx-shape            : "M 103.0 79.0 H 112.0 V 110.0 H 103.0 V 79.0 Z";
}

.split


SHA1(0, 128, 20, 20, 40, SigAlgo.DSA, "SHA-1", "SHA1withDSA", CryptoConstants.DSA_SHA1_SPEC, "1.2.840.10040.4.3", "0"),
    /**  Pubkey 64 bytes; privkey 32 bytes; hash 32 bytes; sig 64 bytes */
    ECDSA_SHA256_P256(1, 64, 32, 32, 64, SigAlgo.EC, "SHA-256", "SHA256withECDSA", ECConstants.P256_SPEC, "1.2.840.10045.4.3.2", "0.9.12"),
    /**  Pubkey 96 bytes; privkey 48 bytes; hash 48 bytes; sig 96 bytes */
    ECDSA_SHA384_P384(2, 96, 48, 48, 96, SigAlgo.EC, "SHA-384", "SHA384withECDSA", ECConstants.P384_SPEC, "1.2.840.10045.4.3.3", "0.9.12"),
    /**  Pubkey 132 bytes; privkey 66 bytes; hash 64 bytes; sig 132 bytes */
    ECDSA_SHA512_P521(3, 132, 66, 64, 132, SigAlgo.EC, "SHA-512", "SHA512withECDSA", ECConstants.P521_SPEC, "1.2.840.10045.4.3.4", "0.9.12"),

    /**  Pubkey 256 bytes; privkey 512 bytes; hash 32 bytes; sig 256 bytes */
    RSA_SHA256_2048(4, 256, 512, 32, 256, SigAlgo.RSA, "SHA-256", "SHA256withRSA", RSAConstants.F4_2048_SPEC, "1.2.840.113549.1.1.11", "0.9.12"),
    /**  Pubkey 384 bytes; privkey 768 bytes; hash 48 bytes; sig 384 bytes */
    RSA_SHA384_3072(5, 384, 768, 48, 384, SigAlgo.RSA, "SHA-384", "SHA384withRSA", RSAConstants.F4_3072_SPEC, "1.2.840.113549.1.1.12", "0.9.12"),
    /**  Pubkey 512 bytes; privkey 1024 bytes; hash 64 bytes; sig 512 bytes */
    RSA_SHA512_4096(6, 512, 1024, 64, 512, SigAlgo.RSA, "SHA-512", "SHA512withRSA", RSAConstants.F4_4096_SPEC, "1.2.840.113549.1.1.13", "0.9.12"),

    /**
     *  Pubkey 32 bytes; privkey 32 bytes; hash 64 bytes; sig 64 bytes
     *
     *  Due to bugs in previous versions, minimum version is 0.9.17.
     *
     *  @since 0.9.15
     */
    EdDSA_SHA512_Ed25519(7, 32, 32, 64, 64, SigAlgo.EdDSA, "SHA-512", "SHA512withEdDSA",
                         EdDSANamedCurveTable.getByName("ed25519-sha-512"), "1.3.101.101", "0.9.17"),

    /**
     *  Prehash version (double hashing, for offline use such as su3, not for use on the network)
     *  Pubkey 32 bytes; privkey 32 bytes; hash 64 bytes; sig 64 bytes
     *  @since 0.9.25
     */
    EdDSA_SHA512_Ed25519ph(8, 32, 32, 64, 64, SigAlgo.EdDSA, "SHA-512", "NonewithEdDSA",
                           EdDSANamedCurveTable.getByName("ed25519-sha-512"), "1.3.101.101", "0.9.25"),

    // 9 and 10 reserved for GOST - see proposal 134

    /**
     *  Blinded version of EdDSA, use for encrypted LS2
     *  Pubkey 32 bytes; privkey 32 bytes; hash 64 bytes; sig 64 bytes
     *
     *  @since 0.9.39
     *


lections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_1_1.p3d";
	};
	class bldr_prop_Truck_01_Door_2_1: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_2_1.p3d";
	};
	class bldr_prop_Truck_01_Door_1_1_Orange: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_orange_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_1_1.p3d";
	};
	class bldr_prop_Truck_01_Door_2_1_Orange: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_orange_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_2_1.p3d";
	};
	class bldr_prop_Truck_01_Door_1_1_Blue: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_blue_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_1_1.p3d";
	};
	class bldr_prop_Truck_01_Door_2_1_Blue: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_blue_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_2_1.p3d";
	};
	class bldr_prop_Truck_01_Door_1_1_Grey: HouseNoDestruct
	{
		scope=1;
		hiddenSelections[]=
		{
			"camo_Door"
		};
		hiddenSelectionsTextures[]=
		{
			"\dz\vehicles\wheeled\Truck_01\data\Truck_01_door_grey_co.paa"
		};
		model="\DZ\vehicles\wheeled\Truck_01\proxy\Truck_01_Door_1_1.p3d";
	};
	class bldr_prop_Truck_01_Door_2_1_Grey: HouseNoDestruct
	{
		scope=1;
		hiddenSelec


 govgh.LabelsToStrings(issues[0].Labels)...) {
		t.Fatalf("Expected issue to be prioritized")
	}

	// test issue 2
	if issues[1].GetNumber() != 2 {
		t.Fatalf("Expected issue number 2, got %v", issues[1].GetNumber())
	}
	if !issues[1].GetLocked() {
		t.Fatalf("Expected issue to be locked")
	}

	// test issue 3
	if issues[2].GetNumber() != 3 {
		t.Fatalf("Expected issue number 3, got %v", issues[2].GetNumber())
	}
	if issues[2].GetState() != "closed" {
		t.Fatalf("Expected issue state 'open', got %v", issues[2].GetState())
	}

	// test issue 5 (pull request)
	if issues[4].GetNumber() != 5 {
		t.Fatalf("Expected issue number 5, got %v", issues[4].GetNumber())
	}
	if issues[4].GetState() != "open" {
		t.Fatalf("Expected issue state 'open', got %v", issues[4].GetState())
	}
	if issues[4].GetPullRequestLinks() == nil {
		t.Fatalf("Expected issue to be a pull request")
	}

	fmt.Println(form.SprintJSON(issues))
}

type issuesByNumber []*github.Issue

func (x issuesByNumber) Sort() {
	sort.Sort(x)
}

func (x issuesByNumber) Len() int {
	return len(x)
}

func (x issuesByNumber) Less(i, j int) bool {
	return x[i].GetNumber() < x[j].GetNumber()
}

func (x issuesByNumber) Swap(i, j int) {
	x[i], x[j] = x[j], x[i]
}
package github

import (
	"fmt"
	"testing"

	"github.com/google/go-github/v58/github"
	govgh "github.com/gov4git/gov4git/v2/github"
	"github.com/gov4git/gov4git/v2/proto/account"
	"github.com/gov4git/gov4git/v2/runtime"
	"github.com/gov4git/gov4git/v2/test"
	"github.com/gov4git/lib4git/base"
	"github.com/gov4git/lib4git/form"
	"github.com/gov4git/lib4git/testutil"
	"github.com/migueleliasweb/go-github-mock/src/mock"
)

var (
	testDirectiveOrganizerGithubUser = "organizer"
	testDirectiveEditIssue           = []any{
		&github.Issue{},
		&github.Issue{},
	}
	testDirectivePostComments = []any{
		&github.IssueComment{},
		&github.IssueComment{},
	}
)

func TestDirective(t *testing.T) {
	base.LogVerbosely()

	// init governance
	ctx := testutil.NewCtx(t, runtime.TestWithCache)
	cty := test.NewTestCommunity(t, ctx, 2)

	testIssueAmount := 20.0
	testTransferAmount := 10.0
	testDirectiveGetIssues := []any{
		[]*github.Issue{
			{
				ID:     github.Int64(111),
				Number: github.Int(1),
				Title:  github.String("Issue directive"),
				URL:    github.String("https://test/issue/1"),
				Labels: []*github.Label{{Name: github.String(govgh.DirectiveLabel)}},
				Locked: github.Bool(false),
				State:  github.String("open"),
				Body: github.String(
					fmt.Sprintf("issue %v credits to @%v", testIssueAmount, cty.MemberUser(0)),
				),
				User: &github.User{Log


 'D8', hD8 ],
    [ 'BC', hBC ],
    [ 'C3', hC3 ],
    [ 'BE', hBE ],
    [ 'D6', hD6 ],
    [ 'BF', hBF ],
    [ 'C2', hC2 ],
    [ 'A7', hA7 ],
    [ 'CE', hCE ],
    [ 'AA', hAA ],
    [ 'CD', hCD ],
    [ 'A6', hA6 ],
    [ 'DB', hDB ],
    [ 'DC', hDC ],
    [ 'DD', hDD ],
    [ 'A4', hA4 ],
    [ 'BA', hBA ],
    [ 'DF', hDF ],
    [ 'C0', hC0 ],
    [ 'A8', hA8 ],
    [ 'A9', hA9 ]
]);import IO from "../../lib/io";

// <> selectAll :: string => IO [HTMLElement]
//
export default (selector: string) => (
  IO.from(() => [...document.querySelectorAll(selector)])
);import util from '../lib/util';
import chalk from 'chalk';
import fs from 'fs';
import path from 'path';
import defaults from 'json-schema-defaults';
import { Command } from 'commander';

export = function (program: Command) {
	program
		.command('defaultconfig [bundle]')
		.description('Generate default config from configschema.json')
		.action(action);
};

function action(bundleName?: string) {
	const cwd = process.cwd();
	const nodecgPath = util.getNodeCGPath();

	if (!bundleName) {
		if (util.isBundleFolder(cwd)) {
			bundleName = bundleName ?? path.basename(cwd);
		} else {
			console.error(chalk.red('Error:') + ' No bundle found in the current directory!');
			return;
		}
	}

	const bundlePath = path.join(nodecgPath, 'bundles/', bundleName);
	const schemaPath = path.join(nodecgPath, 'bundles/', bundleName, '/configschema.json');
	const cfgPath = path.join(nodecgPath, 'cfg/');

	if (!fs.existsSync(bundlePath)) {
		console.error(chalk.red('Error:') + ' Bundle %s does not exist', bundleName);
		return;
	}

	if (!fs.existsSync(schemaPath)) {
		console.error(chalk.red('Error:') + ' Bundle %s does not have a configschema.json', bundleName);
		return;
	}

	if (!fs.existsSync(cfgPath)) {
		fs.mkdirSync(cfgPath);
	}

	const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf8'));
	const configPath = path.join(nodecgPath, 'cfg/', bundleName + '.json');
	if (fs.existsSync(configPath)) {
		console.error(chalk.red('Error:') + ' Bundle %s already has a config file', bundleName);
	} else {
		try {
			fs.writeFileSync(configPath, JSON.stringify(defaults(schema), null, '  '));
			console.log(
				chalk.green('Success:') +
					" Created %s's default config from schema\n\n" +
					JSON.stringify(defaults(schema), null, '  '),
				bundleName,
			);
		} catch (e) {
			console.error(chalk.red('Error: ') + String(e));
		}
	}
}
import {INodeDict, PredicateArgument} from "./i-node-dict";
import {isTypescriptNode} from "@wessberg/typescript-ast-util";

/**
 * Checks if the provided item is an INodeDict
 * @param {PredicateArgument} item
 * @returns {boolean}
 */
export function isINodeDict (item: PredicateArgument): item is INodeDict {
	return !isTypescriptNode(item) && item != null && "nodeKind" in item;
}import BoolStr from './types/BoolStr.d';

/**
 * 布尔值转布尔型字符串 boolean -> 'boolean'
 * @param {boolean} bool
 * @e


        variables.put("input", plainTextInput); // 当前需要处理的内容
        variables.put("summary", plainTextInput); // summary 作为 input 的别名
        variables.put("content", plainTextInput); // content 作为 input 的别名
        variables.put("description", plainTextInput); // description 作为 input 的别名

        // 如果 RAG 上下文不为空，则添加带有说明的上下文
        if (plainContext != null && !plainContext.isBlank()) {
            variables.put("context", "## 相关上下文信息:\\n" + plainContext);
        } else {
            variables.put("context", ""); // 如果无上下文，则为空字符串
        }

        // 4. 动态检测模板中的占位符
        try {
            // 简单的正则表达式来匹配 {{xxx}} 形式的占位符
            Pattern placeholderPattern = Pattern.compile("\\{\\{([^}]+)\\}\\}");
            Matcher matcher = placeholderPattern.matcher(template);

            Set<String> foundPlaceholders = new HashSet<>();
            while (matcher.find()) {
                foundPlaceholders.add(matcher.group(1).trim());
            }

            // 检查是否有未处理的占位符
            for (String placeholder : foundPlaceholders) {
                if (!variables.containsKey(placeholder)) {
                    log.warn("提示词模板中存在未处理的占位符: {}，将提供空值", placeholder);
                    // 为未知占位符提供默认空值
                    variables.put(placeholder, "");
                }
            }
        } catch (Exception e) {
            // 确保正则检测失败不会影响主流程
            log.warn("分析提示词模板占位符时发生错误: {}", e.getMessage());
        }

        // 5. 使用 PromptUtil 格式化模板 (formatPromptTemplate 内部会处理 template 的富文本)
        try {
            return com.ainovel.server.common.util.PromptUtil.formatPromptTemplate(template, variables);
        } catch (Exception e) {
            log.error("格式化提示词模板时出错: {}", e.getMessage(), e);
            // 构建一个后备提示词确保服务不中断
            return "输入内容:\\n" + plainTextInput + "\\n\\n上下文信息:\\n" + plainContext;
        }
    }

    /**
     * 重载 buildFinalPrompt 以适应新的参数结构，包括设定信息
     */
    private String buildFinalPrompt(String userPromptTemplate, String combinedContext, String summary, String styleInstructions) {
        Map<String, String> variables = new HashMap<>();

        // 提取并清理输入数据，确保处理空值
        String cleanSummary = RichTextUtil.deltaJsonToPlainText(summary != null ? summary : "");
        String cleanContext = RichTextUtil.deltaJsonToPlainText(combinedContext != null ? combinedContext : "");
        String cleanStyle = styleInstructions != null ? styleInstructions : "";

        // 基础变量映射
        variables.put("summary", cleanSummary);
        variables.put("context", cleanContext); // 现在context包含了设定信息
        variables.put("styleInstructions", cleanStyle);

        // 兼容性变量映射
        variables.put("input", cleanSummary);
        variables.put("content", cleanSummary);
        variables.put("description", cleanSummary);
        variables.put("instruction", cleanStyle);
        variables.put("style", cleanStyle);

        // 确保模板中可以使用settings变量 - 新增部分
        variables.put("settings", cleanContext.contains("## 相关设定信息") ?
            cleanContext.substring(cleanContext.indexOf("## 相关设定信息")) : "


0 SUCLAMP.1D.U32.PL.R8 P0, R0, R0, -0x80000, 0x0; /* 0xb880000000000001 */
@P0 TLD4.R R0, R0, R0, 0x1100, 1D, 0x0; /* 0x7880000000000001 */
@P0 VMNMX2.UD.U16.U16.MX.Y R0, R0.00, 0x0, R0; /* 0xf880000000000001 */
@P0 VADD.UD.U8.U16.SAT.MRG_8B0 R0, R0, 0x0, R0; /* 0x0480000000000001 */
@P0 FSET.BF.F.FTZ.AND R0, R0, 0, P0; /* 0x8480000000000001 */
@P0 IADD32I.ILLEGAL1 R0.CC, R0, 0x0; /* 0x4480000000000001 */
@P0 RRO.SINCOS R0, 0; /* 0xc480000000000001 */
@P0 VADD2.UD.U16.U16.SAT.Y R0, R0.00, 0x0, R0; /* 0x2480000000000001 */
@P0 IMADSP.U32.U24.U16H0 R0, R0, 0x0, R0; /* 0xa480000000000001 */
@P0 TEX R0, R0, R0, 0x900, 1D, 0x0; /* 0x6480000000000001 */
@P0 VMNMX.UD.U8.U16.SAT.MRG_8B0 R0, R0, 0x0, R0; /* 0xe480000000000001 */
@P0 VADD.UD.U8.U16.SAT.MRG_8B0 R0, -R0, 0x0, R0; /* 0x1480000000000001 */
@P0 FFMA.RP R0, R0, 0, R0; /* 0x9480000000000001 */
@P0 VADD4.UD.U8.U8.Y R0, R0.0000, -R0.4444, R0; /* 0xd480000000000001 */
@P0 VADD2.UD.U16.U16.SAT.Y R0, -R0.00, 0x0, R0; /* 0x3480000000000001 */
@P0 FCCO.SP P0, R0, 0, R0; /* 0xb480000000000001 */
@P0 TLD4.R R0, R0, R0, 0x900, 1D, 0x0; /* 0x7480000000000001 */
@P0 VMNMX2.UD.U16.U16.SAT.Y R0, R0.00, 0x0, R0; /* 0xf480000000000001 */
@P0 VADD.UD.U8.U16.SAT.MRG_8B0 R0, R0, 0x0, R0; /* 0x0c80000000000001 */
@P0 FSET.BF.F.FTZ.AND R0, R0, -0, P0; /* 0x8c80000000000001 */
@P0 IADD32I.PO R0.CC, R0, 0x0; /* 0x4c80000000000001 */
@P0 RRO.SINCOS R0, -0; /* 0xcc80000000000001 */
@P0 VADD2.UD.U16.U16.SAT.Y R0, R0.00, 0x0, R0; /* 0x2c80000000000001 */
@P0 IMADSP.U32.U24.U16H0 R0, R0, -0x80000, R0; /* 0xac80000000000001 */
@P0 TEX R0, R0, R0, 0x1900, 1D, 0x0; /* 0x6c80000000000001 */
@P0 VMNMX.UD.U8.U16.MX.SAT.MRG_8B0 R0, R0, 0x0, R0; /* 0xec80000000000001 */
@P0 VADD.UD.U8.U16.PO.SAT.MRG_8B0 R0, R0, 0x0,


Cs 1123 and 2181.
 *
 *
 The labels in a domain name correspond to JNDI atomic names.
 * Each label must be less than 64 octets in length, and only the
 * optional root label at the end of the name may be 0 octets long.
 * The sum of the lengths of all labels in a name, plus the number of
 * non-root labels plus 1, must be less than 256.  The textual
 * representation of a domain name consists of the labels, escaped as
 * needed, dot-separated, and ordered right-to-left.
 *
 *
 A label consists of a sequence of octets, each of which may
 * have any value from 0 to 255.
 *
 *
 Host names are a subset of domain names.
 * Their labels contain only ASCII letters, digits, and hyphens, and
 * none may begin or end with a hyphen.  While names not conforming to
 * these rules may be valid domain names, they will not be usable by a
 * number of DNS applications, and should in most cases be avoided.
 *
 *
 DNS does not specify an encoding (such as UTF-8) to use for
 * octets with non-ASCII values.  As of this writing there is some
 * work going on in this area, but it is not yet finalized.
 * <tt>DnsName</tt> currently converts any non-ASCII octets into
 * characters using ISO-LATIN-1 encoding, in effect taking the
 * value of each octet and storing it directly into the low-order byte
 * of a Java character and vice versa.  As a consequence, no
 * character in a DNS name will ever have a non-zero high-order byte.
 * When the work on internationalizing domain names has stabilized
 * (see for example draft-ietf-idn-idna-10.txt), <tt>DnsName</tt>
 * may be updated to conform to that work.
 *
 *
 Backslash (<tt>\</tt>) is used as the escape character in the
 * textual representation of a domain name.  The character sequence
 * `<tt>\DDD</tt>', where <tt>DDD</tt> is a 3-digit decimal number
 * (with leading zeros if needed), represents the octet whose value
 * is <tt>DDD</tt>.  The character sequence `<tt>\C</tt>', where
 * <tt>C</tt> is a character other than <tt>'0'</tt> through
 * <tt>'9'</tt>, represents the octet whose value is that of
 * <tt>C</tt> (again using ISO-LATIN-1 encoding); this is particularly
 * useful for escaping <tt>'.'</tt> or backslash itself.  Backslash is
 * otherwise not allowed in a domain name.  Note that escape characters
 * are interpreted when a name is parsed.  So, for example, the character
 * sequences `<tt>S</tt>', `<tt>\S</tt>', and `<tt>\083</tt>' each
 * represent the same one-octet name.  The <tt>toString()</tt> method
 * does not generally insert escape sequences except where necessary.
 * If, however, the <tt>DnsName</tt> was constructed using unneeded
 * escapes, those escapes may appear in the <tt>toString</tt> result.
 *
 *
 Atomic names passed as parameters to methods of
 * <tt>DnsName</tt>, and those returned by them, are unescaped.  So,
 * for example, <tt>(new DnsName()).add("a.b")</tt> creates an
 * object representing the one-label domain name <tt>a\.b</tt>, and
 * calling <tt>get(0)</tt> on this object returns <tt>"a.b"</tt>.
 *
 *
 While DNS names are case-preserving, comparisons between them
 * are case-insensitive.  When comparing names containing non-ASCII
 * octets, <tt>DnsName</tt> uses case-insensitive comparison
 * between pairs of ASCII values, and exact binary comparison
 * otherwise.


derTrampoline, @function

# The trampoline code is optimized for ICache footprint
# The common fast path fits in one L2 cache line (< 64 bytes)

xpediteIdentityTrampoline:
  movq  samplesBufferPtr@gottpoff(%rip), %rax
  movq  samplesBufferEnd@gottpoff(%rip), %rdx
  movq  %fs:(%rax), %rcx
  cmpq  %fs:(%rdx), %rcx
  jae   1f
  addq  $0x10, %fs:(%rax)

  rdtsc
  shl   $0x20, %rdx
  or    %rax, %rdx
  movq  %rdx, (%rcx)
  movq  0x00(%rsp), %rax
  movq  %rax, 0x8(%rcx)
  movq  %fs:0, %rax
  ret

xpediteIdentityRecorderTrampoline:
1:
  push  %rsi
  push  %rdi
  push  %r8
  push  %r9
  push  %r10
  push  %r11

  rdtsc
  shl    $0x20, %rdx
  or     %rax, %rdx
  mov    %rdx, %rsi
  movq   0x30(%rsp), %rdi

  push  %rdx
  XPEDITE_ALIGN_STACK(r11)
#ifdef XPEDITE_PIE
  movq activeXpediteRecorder@GOTPCREL(%rip), %rcx
  callq *(%rcx)
#else
  callq *activeXpediteRecorder
#endif
  XPEDITE_RESTORE_STACK
  pop  %rdx

  pop  %r11
  pop  %r10
  pop  %r9
  pop  %r8
  pop  %rdi
  pop  %rsi
  movq  %fs:0, %rax
  ret


pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{right:50px}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow{top:50%;margin-top:-15px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{top:0;border-width:0 13px 13px;border-bottom-color:#2271b1}.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-undefined .wp-pointer-arrow-inner{top:1px;margin-right:-13px;margin-top:-13px;border:13px solid transparent;border-bottom-color:#2271b1;display:block;content:" "}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#c3c4c7}.wp-pointer-bottom .wp-pointer-arrow-inner{bottom:1px;margin-right:-13px;margin-bottom:-13px;border:13px solid transparent;border-top-color:#fff;display:block;content:" "}.wp-pointer-left .wp-pointer-arrow{left:0;border-width:13px 13px 13px 0;border-right-color:#c3c4c7}.wp-pointer-left .wp-pointer-arrow-inner{left:1px;margin-left:-13px;margin-top:-13px;border:13px solid transparent;border-right-color:#fff;display:block;content:" "}.wp-pointer-right .wp-pointer-arrow{right:0;border-width:13px 0 13px 13px;border-left-color:#c3c4c7}.wp-pointer-right .wp-pointer-arrow-inner{right:1px;margin-right:-13px;margin-top:-13px;border:13px solid transparent;border-left-color:#fff;display:block;content:" "}.wp-pointer.arrow-bottom .wp-pointer-content{margin-bottom:-45px}.wp-pointer.arrow-bottom .wp-pointer-arrow{top:100%;margin-top:-30px}@media screen and (max-width:782px){.wp-pointer{display:none}}/*! This file is auto-generated */
.dashicons-no{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAAAcElEQVR4AdXRVxmEMBAGwJMQCUhAIhKQECmRsFJwMFfp7HfP/E8pk0173CuKpt/0R+WaBaaZqogLagBMuh+DdoKbyRCwqZ/SnM0R5oQuZ2UHS8Z6k23qPxZCTrV5UlHMi8bsfHVXP7K/GXZHaTO7S54CWLdHlN2YIwAAAABJRU5ErkJggg==)}.dashicons-admin-comments{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATUlEQVR4AWMYWqCpvUcAiA8A8X9iMFStAD4DG0AKScQNVDZw1MBRAwvIMLCA5jmFlCD4AMQGlOTtBgoNwzQQ3TCKDaTcMMxYN2AYVgAAYPKsEBxN0PIAAAAASUVORK5CYII=)}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATElEQVR4AWMYYqB4lQAQHwDi/8RgqFoBfAY2gBSSiBuobOCogaMGFpBhYAEdcwrhIPgAxAaU5O0GCg3DNBDdMIoNpNwwzFg3YBhWAABG71qAFYcFqgAAAABJRU5ErkJggg==)}.dashicons-share{backgro


, %rsi
	movq	%rcx, %rdx
	movq	%rax, %rcx
	jmp	f8                      # TAILCALL
.Ltmp28:
	.size	h8, .Ltmp28-h8
	.cfi_endproc

	.globl	h12
	.align	16, 0x90
	.type	h12,@function
h12:                                    # @h12
	.cfi_startproc
# BB#0:
	movq	%rdx, %rax
	mov


oject/tari/commit/8f43ff541f62bc5e5098a610c77870741e4df4b0))

### [1.13.1-pre.0](https://github.com/tari-project/tari/compare/v1.13.0-pre.0...v1.13.1-pre.0) (2025-03-31)

### Features

* add num connections to network state ([#6884](https://github.com/tari-project/tari/issues/6884)) ([aa7e286](https://github.com/tari-project/tari/commit/aa7e286d8825e6e46b4adf06753ed2a107bd41c8))
* check coinbase count ([#6880](https://github.com/tari-project/tari/issues/6880)) ([66edc2c](https://github.com/tari-project/tari/commit/66edc2c1f3156e8f9e09dda8a8e42ecb184fcacc))

### Bug Fixes

*  libtor cli option ([#6877](https://github.com/tari-project/tari/issues/6877)) ([d28c94c](https://github.com/tari-project/tari/commit/d28c94c836ba32b161c4a20b5fa9f831ded3c48a))
* excess sig order in the tx tab ([#6897](https://github.com/tari-project/tari/issues/6897)) ([56b9711](https://github.com/tari-project/tari/commit/56b9711197317188954be79c6e06d604c81ecdd2))
* peer order ([#6894](https://github.com/tari-project/tari/issues/6894)) ([f7fe98e](https://github.com/tari-project/tari/commit/f7fe98e728f49f2f9a0c110625254916d644e7a4))
* startup arg ([#6889](https://github.com/tari-project/tari/issues/6889)) ([a7cdcd7](https://github.com/tari-project/tari/commit/a7cdcd77a27cfed878501509afdf9ba66fe30fae))
* use plain string for grpc address ([#6881](https://github.com/tari-project/tari/issues/6881)) ([61eda04](https://github.com/tari-project/tari/commit/61eda049cdd8a437cd673897816e8d4628a6fa31))

## [1.13.0-pre.0](https://github.com/tari-project/tari/compare/v1.12.2-pre.0...v1.13.0-pre.0) (2025-03-11)

### Features

* remove static moneroD response ([#6867](https://github.com/tari-project/tari/issues/6867)) ([cb2ea5b](https://github.com/tari-project/tari/commit/cb2ea5bf489adb99616c7c64c5327c810eed6077))

### Bug Fixes

*  prune mode validation ([#6873](https://github.com/tari-project/tari/issues/6873)) ([d9a686d](https://github.com/tari-project/tari/commit/d9a686d0d884f5d2908bb60190535375b86fee21))
* fix vulnerability in mio 0.7 ([#6857](https://github.com/tari-project/tari/issues/6857)) ([48e7bca](https://github.com/tari-project/tari/commit/48e7bcab60c42302d5e90a72ea8877c7bead9a5b)), closes [#6181](https://github.com/tari-project/tari/issues/6181)

## [1.12.2-


#include "binary_trees.h"

/**
 * binary_tree_height - measures height of a binary tree
 * @tree: pointer to the node of the tree to measure the height
 *
 * Return: if tree is NULL 0
*/
size_t binary_tree_height(const binary_tree_t *tree)
{
	size_t height_left, height_right;

	if (!tree)
	return (0);

	height_left = tree->left ? 1 + binary_tree_height(tree->left) : 0;
	height_right = tree->right ? 1 + binary_tree_height(tree->right) : 0;

	return (height_left > height_right ? height_left : height_right);

}

/**
 * binary_tree_balance - measures balance factor of a binary tree
 * @tree: pointer to the root node of the tree to measure the balance factor
 *
 * Return: if tree is NULL, 0
*/
int binary_tree_balance(const binary_tree_t *tree)
{
	int i, j;

	if (!tree)
	return (0);

	i = binary_tree_height(tree->left);
	j = binary_tree_height(tree->right);

	return (i - j);
}


;content:'arrow_back';font:normal normal normal 24px/1 'Material Icons';-webkit-font-feature-settings:'liga';font-feature-settings:'liga';-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;word-wrap:normal;vertical-align:top}.devsite-expand-section-nav{margin:12px 24px 12px 0}.devsite-expand-section-nav::before{content:'menu'}.devsite-nav-index{color:#212121;cursor:pointer;font-weight:400;margin:16px 0;padding:0 0 0 16px}@media screen and (max-width:720px){.devsite-expand-section-nav{display:inline-block;margin:12px 16px 12px 0}}.devsite-page-nav,.devsite-page-nav-embedded{border-left:4px solid #4285f4}.devsite-page-nav{background:#fff;float:right;overflow-x:hidden;overflow-y:auto;width:160px;z-index:10000}.devsite-page-nav-embedded{display:none;overflow-y:visible}.devsite-page-nav-list{margin-left:12px}.devsite-nav-show-all,.devsite-nav-show-all:focus,.devsite-nav-show-all:hover{color:#757575;height:24px;margin-left:4px;min-width:20px;padding:0;position:absolute;top:-4px}.devsite-nav-show-all::before{content:'expand_more'}.devsite-nav-open::before{content:'expand_less'}.devsite-page-nav-embedded .devsite-nav-item-hidden{display:none}.devsite-nav-more-items{color:#757575}.devsite-nav-more-items::before{content:'more_horiz'}.devsite-nav-more-items.devsite-nav-more-items-close::before{content:'expand_less'}@media screen and (max-width:1200px){.devsite-page-nav{display:none}.devsite-page-nav-embedded:not(:empty){display:block;margin:20px 0 24px}}#table-of-contents,h2#contents,h3#contents,h2.toc,h3.toc,div.toc:not(.class):not(.group):not(.type):not(.interface),section.toc,ol.toc,ul.toc,.inline-toc,#tb-wrapper,#qv-wrapper{display:none}ol.toc,ol.toc ol,ol.toc ul{list-style-type:none}.devsite-content-footer{border-top:1px solid #ebebeb;clear:both;color:#757575;font:italic 13px/20px Roboto,sans-serif;margin-top:16px}.devsite-content-footer-date{margin-bottom:0}.MathJax_SVG_Display{overflow-x:auto}@media screen and (max-width:720px){.MathJax_SVG_Display{margin:1em -16px!important;padding:0 16px 16px;width:calc(100% + 32px)!important}}.framebox{margin:-20px}.devsite-framebox{overflow:hidden;padding:20px}.quickstart-step{margin:16px 0}.quickstart-left{float:left;margin-right:40px;width:calc((100% - 40px)*.4)}.quickstart-right{background:#f7f7f7;float:right;text-align:center;width:calc((100% - 40px)*.6)}.quickstart-wide{width:calc(100% - 200px)}.quickstart-end{margin-top:60px}@media screen and (max-width:1000px){.quickstart-left,.quickstart-right,.quickstart-wide{float:none;width:100%;margin:16px 0}}.devsite-search-project{border-bottom:1px solid #ebebeb;padding-bottom:39px;margin-bottom:40px}.devsite-projectless-search-link,.devsite-search-term{font-weight:bold}.devsite-page-title .devsite-search-term{color:#757575;font-weight:400}aside+.devsite-search-results,.dev


            param("multiParam", "multi1", "multi2").
                cookie("multiCookie", "value1", "value2").
                cookie("standardCookie", "standard value").
                header("multiHeader", "headerValue1", "headerValue2").
                header("standardHeader", "standard header value").
        expect().
                body("greeting", equalTo("Greetings John Doe")).
        when().
                post("/greet");

        assertThat(writer.toString(), equalTo(String.format("Request method:\tPOST%n" +
                        "Request URI:\thttp://localhost:8080/greet?something1=else1&something2=else2&something3=else3%n" +
                        "Proxy:\t\t\t<none>%n" +
                        "Request params:\thello1=world1%n" +
                        "\t\t\t\thello2=world2%n" +
                        "\t\t\t\tmultiParam=[multi1, multi2]%n" +
                        "Query params:\tsomething1=else1%n" +
                        "\t\t\t\tsomething2=else2%n" +
                        "\t\t\t\tsomething3=else3%n" +
                        "Form params:\tfirstName=John%n" +
                        "\t\t\t\tlastName=Doe%n" +
                        "Path params:\t<none>%n" +
                        "Headers:\t\tmultiHeader=headerValue1%n" +
                        "\t\t\t\tmultiHeader=headerValue2%n" +
                        "\t\t\t\tstandardHeader=standard header value%n" +
                        "\t\t\t\tAccept=*/*%n" +
                        "" +
                        "\t\t\t\tContent-Type=application/x-www-form-urlencoded; charset=%s%n" +
                        "Cookies:\t\tmultiCookie=value1%n" +
                        "\t\t\t\tmultiCookie=value2%n" +
                        "\t\t\t\tstandardCookie=standard value%n" +
                        "Multiparts:\t\t<none>%n" +
                        "Body:\t\t\t<none>%n",
                RestAssured.config().getEncoderConfig().defaultContentCharset())));
    }

    @Test(expected = IllegalArgumentException.class)
    public void loggingRequestFilterDoesntAcceptStatusAsLogDetail() {
        new RequestLoggingFilter(LogDetail.STATUS);
    }

    @Test
    public void loggingRequestFilterWithExplicitContentType() {
        final StringWriter writer = new StringWriter();
        final PrintStream captor = new PrintStream(new WriterOutputStream(writer), true);
        given().
                filter(new RequestLoggingFilter(captor)).
                param("firstName", "John").
                param("lastName", "Doe").
                header("Content-type", "application/json").
        expect().
                body("greeting", equalTo("Greetings John Doe")).
        when().
                get("/greet");

        assertThat(writer.toString(), equalTo(String.format("Request method:\tGET%n" +
                        "Request URI:\thttp://localhost:8080/greet?firstName=John&lastName=Doe%n" +
                        "Proxy:\t\t\t<none>%n" +
                        "Request params:\tfirstName=John%n" +
                        "\t\t\t\tlastName=Doe%n" +
                        "Query params:\t<none>%n" +
                        "Form params:\t<none>%n" +
                        "Path params:\t<none>%n" +
                        "Headers:\t\tAccept=*/*%n" +
                        "\t\t\t\tContent-Type=application/json%n" +
                        "Cookies:\t\t<none>%n" +
                        "Multiparts:\t\t<none>%n" +
                        "Body:\t\t\t<none>%n")));
    }

    @Test
    public void loggingRequestFilterPathParams() {
        final StringWriter writer = new StringWriter();
        final PrintStream captor = new PrintStream(new WriterOutputStream(writer), true);

        given().


="#99FFFF" fg="#000000" class="WebAnnotator_HOURS" type="HOURS"></wa-color><wa-color id="WA-color-6" bg="#FF6666" fg="#000000" class="WebAnnotator_SUBJ" type="SUBJ"></wa-color><wa-color id="WA-color-7" bg="#66FF99" fg="#000000" class="WebAnnotator_STREET" type="STREET"></wa-color><wa-color id="WA-color-8" bg="#3333FF" fg="#FFFFFF" class="WebAnnotator_CITY" type="CITY"></wa-color><wa-color id="WA-color-9" bg="#660000" fg="#FFFFFF" class="WebAnnotator_STATE" type="STATE"></wa-color><wa-color id="WA-color-10" bg="#006600" fg="#FFFFFF" class="WebAnnotator_ZIPCODE" type="ZIPCODE"></wa-color><wa-color id="WA-color-11" bg="#663366" fg="#FFFFFF" class="WebAnnotator_COUNTRY" type="COUNTRY"></wa-color><wa-title style="box-shadow:0 0 1em black;border:2px solid blue;padding:0.5em;">Utah Mortgage, Utah Rates, Utah Home Loan, Utah Refinance, and Other Lending Services from Utah Lawyer Loans</wa-title><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<base href="http://www.bluedogink.com/"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Business Sales :  Inkjet Cartridges & Toner Cartridges.  Epson Inkjets, Brother Inkjets, HP Toners, Brother Toners, Dell Inkjets, HP Inkjets, Samsung Toners, Okidata Toners, Canon Inkjets, and Much More</title>
<meta name="title" content="Business Sales :  Inkjet Cartridges & Toner Cartridges.  Epson Inkjets, Brother Inkjets, HP Toners, Brother Toners, Dell Inkjets, HP Inkjets, Samsung Toners, Okidata Toners, Canon Inkjets, and Much More">
<meta name="keywords" content=" Business Sales">
<meta name="description" content=" : Business Sales - ">
<meta name="GOOGLEBOT" content="index, follow">
<meta name="Robots" content="index, follow">
<meta http-equiv="imagetoolbar" content="no">
<link rel="shortcut icon" href="http://www.bluedogink.com//favicon.ico">

<link rel="stylesheet" type="text/css" href="includes/templates/newdesign/css/stylesheet.css"><link rel="stylesheet" type="text/css" href="includes/templates/newdesign/css/stylesheet_new.css">

		<img src="includes/templates/newdesign/images/logo_new.gif" alt="


2626 !important;
}

.cfdoc-toc {

	@supports (position: sticky) {
	  position: sticky;
	  top: 4rem;
	  max-height: calc(94vh - 4rem);
	  overflow-y: auto;
	}
	// order: 2;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	font-size: .875rem;

	ul {
		list-style-type: none;
		padding-left: 1rem;

		&.section-nav {
			border-left: 1px solid #eee;
		}

		li.toc-entry {
			padding-bottom: .125rem;
		}
	}

	.toc-entry a {
		color: #999;
		// padding: .125rem 1.5rem;
	}
}

//
// Main navbar
//

.cfdoc-navbar {
  min-height: 4rem;
  background-color: #222;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.05), inset 0 -1px 0 rgba(0,0,0,.1);

  .navbar-brand {
  	color: white;
  }

  @include media-breakpoint-down(md) {
    padding-right: .5rem;
    padding-left: .5rem;

    .navbar-nav-scroll {
      max-width: 100%;
      height: 2.5rem;
      margin-top: .25rem;
      overflow: hidden;
      font-size: .875rem;

      .navbar-nav {
        padding-bottom: 2rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
      }
    }
  }

  @include media-breakpoint-up(md) {

  }

  .navbar-nav {
    .nav-link {
      padding-right: .5rem;
      padding-left: .5rem;
      color: #bdbdbd;

      &.active,
      &:hover {
        color: #fff;
        background-color: transparent;
      }

      &.active {
        font-weight: 500;
      }
    }
  }

  .dropdown-menu {
    font-size: .875rem;
  }
}
/* */.conversational-form {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@import "./mixins/cf-mixins";

$cf-color-background: #2C2C2E;
$cf-color-chat-response-user-bg: #E5E6EA;

@import "./conversational-form.scss";

cf-chat-response.robot text > p {
  background: #3A3A3C;
  color: #fff;
  // padding: 13px 21px 13px 21px;
}

cf-chat-response.user text > p {
  background: #E5E6EA;
  color: #303030;
}

cf-chat-response {
  & thumb {
    background-color: inherit;
  }
}

.cf-button {
  border: 1px solid rgba($cf-color-secondary, 1);
  color: $cf-color-secondary;

  &:hover, &:focus {
		// TODO
		&:not(&[selected="selected"]),
		&:not([checked="checked"]) {
			background: $cf-color-secondary;
			color: $cf-color-primary;
		}
	}

	&[selected="selected"], &[checked="checked"] {
		&:not(:focus):not(:hover):not(.highlight) {
			color: $cf-color-primary;
		 	background: $cf-color-secondary;
		}
	}

  &.cf-checkbox-button {
    &:hover, &.highlight, &:focus {
      background: $cf-color-secondary;
      color: $cf-color-primary;