#[structopt(short = "s", long = "for-signing")]
    is_for_signing: bool,
}

impl CreateRsaKey {
    /// Exports a key.
    pub fn run(&self, basic_client: BasicClient) -> Result<()> {
        let policy = if self.is_for_signing {
            info!("Creating RSA signing key...");
            Policy {
                usage_flags: {
                    let mut usage_flags = UsageFlags::default();
                    let _ = usage_flags
                        .set_sign_hash()
                        .set_verify_hash()
                        .set_sign_message()
                        .set_verify_message();
                    usage_flags
                },
                permitted_algorithms: AsymmetricSignature::RsaPkcs1v15Sign {
                    hash_alg: SignHash::Specific(Hash::Sha256),
                }
                .into(),
            }
        } else {
            info!("Creating RSA encryption key...");
            Policy {
                usage_flags: {
                    let mut usage_flags = UsageFlags::default();
                    let _ = usage_flags.set_encrypt().set_decrypt();
                    usage_flags
                },
                permitted_algorithms: AsymmetricEncryption::RsaPkcs1v15Crypt.into(),
            }
        };

        let attributes = Attributes {
            lifetime: Lifetime::Persistent,
            key_type: Type::RsaKeyPair,
            bits: 2048,
            policy,
        };

        basic_client.psa_generate_key(&self.key_name, attributes)?;

        info!("Key \"{}\" created.", self.key_name);
        Ok(())
    }
}
extern crate proc_macro;
#[macro_use]
extern crate quote;
extern crate syn;

use proc_macro::TokenStream;

use syn::{
    Data, DataStruct, DeriveInput, Ident, ImplGenerics, Item,
    Meta::{List, NameValue},
    NestedMeta::Meta,
    TypeGenerics, WhereClause,
};

#[proc_macro_derive(PostgresMapper, attributes(pg_mapper))]
pub fn postgres_mapper(input: TokenStream) -> TokenStream {
    let mut ast: DeriveInput = syn::parse(input).expect("Couldn't parse item");

    impl_derive(&mut ast)
}

fn impl_derive(ast: &mut DeriveInput) -> TokenStream {
    let name = &ast.ident;
    let table_name = parse_table_attr(&ast);

    let (impl_generics, ty_generics, where_clause) = &ast.generics.split_for_impl();

    let s = match ast.data {
        Data::Struct(ref s) => s,
        _ => panic!("Enums or Unions can not be mapped"),
    };

    let tokio_pg_mapper = impl_tokio_pg_mapper(
        s,
        name,
        &table_name,
        impl_generics,
        ty_generics,
        where_clause,
    );

    let tokens = quote! {
        #tokio_pg_mapper
    };

    tokens.into()
}

fn impl_tokio_pg_mapper(
    s: &DataStruct,
    name: &Ident,
    table_name: &str,
    impl_generics: &ImplGenerics,
    ty_generics: &TypeGenerics,
    where_clause: &Option<&WhereClause>,
) -> Item {
    let required_fields = s
        .fields
        .iter()
        .filter(|field| match check_field_attributes(&field.attrs) {
            FieldAttr::Ignored | FieldAttr::Collection => false,
            _ => true,
        })
        .collect::<Vec<_>>();

    let fields = required_fields.iter().map(|field| {
        let ident = field.ident.as_ref().unwrap();
        let ty = &field.ty;

        let row_expr = format!(r


miTrueName = (putItems.tableLookup(fields.Items_trueName,i) || '').dbName() || '-';
					if (mi != pickedTrueMI) continue;
					miType = (putItems.tableLookup(fields.Items_type,i) || '').dbName() || '-';
					if (miType != pickedType) continue;
					putRow = i;
					break;
				}
				if (showTypes) {
					miObj = abilityLookup( fields.MagicItemDB, pickedMI, pickCS );
					pickedMI = !miObj.obj ? pickedMI : getShownType( miObj );
				}
			}
			i = slotsUsed = 0;
			while (i < putItems.sortKeys.length) {
				mi = putItems.tableLookup( fields.Items_name, i, false );
				if (_.isUndefined(mi)) {break;}
				if (mi == '-' && putRow < 0) {
					putRow = i;
				} else if (mi !== '-') slotsUsed++;
				i++;
			}

			slotCounts[putID] = slotsUsed;

			if (putRow < 0) {
				if (i >= bagSize) {
					sendParsedMsg( tokenID, messages.miBagFull, senderId );
					return;
				} else {
					putRow = i;
				}
			}

			shortMenu = shortMenu && (miList.split('|').length > 2);

			if (pickingUp) content += treasure;

			magicItems = await makeMIbuttons( tokenID, senderId, 'current', 'current', BT.POP_PICK, '|'+pickID+'|'+putID+'|'+putRow, pickRow, false, false, showTypes, true, pickID );

			content += '{{desc='+putName+' has [['+(attrLookup( putCS, fields.ItemContainerSize ) - slotCounts[putID])+']] remaining slots. ';

			if (magicItems && magicItems.length) {
				if (shortMenu) {
					content += 'Press the **[Select]** button to select the item you want to '+pickOrPut+' from a list of items in a container, '
							+ 'then press the **[Store]** button to automatically put it away in an empty slot}}'
							+ '{{Select=[Select Item to '+pickOrPut+'](!magic --button '+BT.POP_PICK+'|'+tokenID+'|?{'+pickOrPut+' which Item?'+miList+'}|'+pickID+'|'+putID+'|'+putRow+')}}'
							+ '{{Store=';
				} else {
					content += 'Select an item you want to '+pickOrPut+'\n'
							+  magicItems
							+  '}}{{desc1='
				}
				content +=((pickRow >= 0 && putRow >= 0) ? '[' : '')
						+ 'Store '+((pickRow >= 0) ? pickedMI : 'item')
						+ ((pickRow >= 0 && putRow >= 0) ? ('](!magic --button '+BT.POP_STORE+'|'+tokenID+'|'+pickRow+'|'+pickID+'|'+putID+'|'+putRow+'|-1)') : '' )
						+ ' in free slot}}{{desc2=';
				content += '[Use '+menuType+' menu](!magic --button '+(pickingUp ? BT.PICKMI_OPTION : BT.PUTMI_OPTION)+'|'+tokenID+'|'+menuType+'|'+pickID+'|'+putID+')}}';

				sendResponse( charCS, content, senderId, flags.feedbackName, flags.feedbackImg, tokenID );
			} else {
				content = messages.header + '{{desc=' + pickCS.get('name') + ' ' + messages.fruitlessSearch + treasure;
				sendParsedMsg( tokenID, content, senderId );
			}
			return;
		} catch (e) {
			sendCatchError('MagicMaster',msg_orig[senderId],e);
		}
	}

	/*
	 * Create the Spells menus
	 */

	var makeMUSpellsMenu = function( args, senderId ) {

		var tok


ext("* (It's a lone doorframe.)[wait:5]\n* (But for some reason,[wait:5] you can't\nsee through it...)")
    else
        Game.world:startCutscene(function(cutscene)
            cutscene:text("* (It's a door.)[wait:5]\n* (Where will you go?)")
            local choices = {}
            for i=1,#self.names do
                if not self.flags[i] or Game:getFlag(self.flags[i], false) then
                    table.insert(choices, self.names[i])
                end
            end
            table.insert(choices, "Cancel")
            local choice_i = cutscene:choicer(choices)
            if choice_i < #choices then
                local name = choices[choice_i]
                local map = self.maps[name]
                if map == self.world.map.id then
                    cutscene:text("* (Amazingly,[wait:5] you are already there.)")
                else
                    Assets.playSound("dooropen")
                    self.sprite:setFrame(2)
                    self.light:remove()
                    cutscene:text("* (The door opened...)")
                    cutscene:wait(0.2) -- 6/30
                    for key,_ in pairs(Assets.sound_instances) do
                        Assets.stopSound(key, true)
                    end
                    Assets.playSound("doorclose")
                    Game.world.music:stop()
                    Game.world.fader:fadeOut(nil, {
                        speed = 0,
                    })
                    cutscene:wait(1)
                    cutscene:loadMap(map, self.markers[name] or "spawn", "down", function() Assets.playSound("dooropen") end)
                    Game.world.fader:fadeIn(nil, {
                        speed = 0.25,
                    })
                end
            else
                cutscene:text("* (You doorn't.)")
            end
        end)
    end

    return true
end

--- Updates the state of the door based on its `open_flag`, and accordingly adjusts it's own sprite and its [`light`](lua://WarpDoor.light)
function WarpDoor:updateOpen()
    self.open = Game:getFlag(self.open_flag)
    if self.open then
        self:setSprite("world/events/shortcut_door")
        if not self.light then
            self.light = Sprite("world/events/shortcut_light", 8, 96)
            self.light:play(0.25, true)
            self.light:setScale(2)
            self:addChild(self.light)
        end
    else
        self:setSprite("world/events/shortcut_door_off")
        if self.light then
            self.light:remove()
        end
    end
end

return WarpDoor


:10px;min-width:0}@media only screen and (max-width:767px){.nav-menu[data-v-be9ec8e8]{font-size:.82353rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.nav--in-breakpoint-range .nav-menu[data-v-be9ec8e8]{font-size:.82353rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-top:0;grid-area:menu}.nav-menu-tray[data-v-be9ec8e8]{width:100%;max-width:100%;align-items:center;display:flex;justify-content:space-between}.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{display:block;overflow:hidden;pointer-events:none;visibility:hidden;max-height:0;transition:max-height .4s ease-in 0s,visibility 0s linear 1s}.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{max-height:calc(100vh - 5.64706rem);overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:auto;visibility:visible;transition-delay:.2s,0s}.nav--is-transitioning.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{overflow-y:hidden}.nav--is-sticking.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{max-height:calc(100vh - 2.82353rem)}.nav-actions[data-v-be9ec8e8]{display:flex;align-items:center}.nav--in-breakpoint-range .nav-actions[data-v-be9ec8e8]{grid-area:actions;justify-content:flex-end}@media only screen and (max-width:767px){.nav-actions[data-v-be9ec8e8]{padding-right:.94118rem}}.nav-title[data-v-be9ec8e8]{height:3.05882rem;font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;cursor:default;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box}@media only screen and (max-width:767px){.nav-title[data-v-be9ec8e8]{padding-top:0;height:2.82353rem;width:90%}}.nav--in-breakpoint-range .nav-title[data-v-be9ec8e8]{grid-area:title}.nav--is-wide-format.nav--in-breakpoint-range .nav-title[data-v-be9ec8e8]{width:100%;justify-content:center}.nav-title[data-v-be9ec8e8] span{height:100%;line-height:normal}.nav-title a[data-v-be9ec8e8]{display:inline-block;letter-spacing:inherit;line-height:normal;margin:0;text-decoration:none;white-space:nowrap}.nav-title a[data-v-be9ec8e8]:hover{text-decoration:none}@media only screen and (max-width:767px){.nav-title a[data-v-be9ec8e8]{display:flex}}.nav-title[data-v-be9ec8e8],.nav-title a[data-v-be9ec8e8]{color:var(--color-figure-gray);transition:c


n 2 randomizer - any% (easy)",
    },
    // The mega man 2 randomizer tournament discord
    RaceConfig {
        guild: "Mega Man 2 Randomizer Tournament",
        game_code: "megamanhacks",
        game_name: "Mega Man Hacks",
        race_goal: "mega man 2 randomizer - any% (easy)",
    },
    // The mega man 9 tournament discord
    RaceConfig {
        guild: "Mega Man 9 Tournament",
        game_code: "mm9",
        game_name: "Mega Man 9",
        race_goal: "any%",
    },
    RaceConfig {
        guild: "whats this",
        game_code: "megamanhacks",
        game_name: "Mega Man Hacks",
        race_goal: "mega man 2 randomizer - any% (easy)",
    },
];

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config_reader = BufReader::new(File::open("config.json").expect("Failed opening file"));
    let config: Config = serde_json::from_reader(config_reader).expect("Failed decoding config");
    let irccfg = config.clone();

    let (sender, receiver) = std::sync::mpsc::channel();
    let (to_discord, for_discord): (
        std::sync::mpsc::Sender<(ContextWrapper, String)>,
        std::sync::mpsc::Receiver<(ContextWrapper, String)>,
    ) = std::sync::mpsc::channel();

    let discord = std::thread::spawn(move || {
        let mut rt = tokio::runtime::Builder::new()
            .enable_all()
            .basic_scheduler()
            .build()
            .expect("failed to create discord runtime");
        let thread = async {
            let framework = StandardFramework::new()
                .configure(|c| c.prefix(&config.prefix))
                .group(&GENERAL_GROUP);
            let mut client = Client::builder(&config.token)
                .event_handler(Handler)
                .framework(framework)
                .await
                .expect("Error creating client");
            {
                let mut data = client.data.write().await;
                data.insert::<Chan>(Mutex::new(sender));
            }

            // start listening for events by starting a single shard
            if let Err(why) = client.start_autosharded().await {
                println!("An error occured while running the client: {:?}", why);
            }
        };
        rt.block_on(thread);
    });

    let irc_messages = std::thread::spawn(move || {
        let mut rt = tokio::runtime::Builder::new()
            .enable_all()
            .basic_scheduler()
            .build()
            .expect("failed to create discord runtime");
        let thread = async {
            loop {
                let (ctx, msg) = for_discord
                    .recv()
                    .expect("failed to get message from IRC thread");
                ctx.channel_id
                    .say(&ctx.http, msg)
                    .await
                    .expect("Failed to respond on discord");
            }
        };
        rt.block_on(thread);
    });

    let irc = std::thread::spawn(move || {
        let mut rt = tokio::runtime::Builder::new()
            .enable_all()
            .basic_scheduler()
            .build()
            .expect("failed to create discord runtime");
        let thread = async {
            use futures::prel


�스. 이번이 네 잘못을 바로잡을 기회다. 이 외부인들을 제거해라. 난 밤의 요새로 돌아가겠다."
end

-- Darkheart Thicket

L = BigWigs:NewBossLocale("Darkheart Thicket Trash", "koKR")
if L then
	L.archdruid_glaidalis_warmup_trigger = "타락한 자들아... 너희 피에서 악몽의 냄새가 난다. 이 숲에서 꺼지지 않으면, 자연의 분노를 맛보게 되리라!"

	L.mindshattered_screecher = "정신파괴 비명날개"
	L.dreadsoul_ruiner = "공포영혼 파멸자"
	L.dreadsoul_poisoner = "공포영혼 독살자"
	L.crazed_razorbeak = "광기 어린 뾰족부리"
	L.festerhide_grizzly = "고름가죽 불곰"
	L.vilethorn_blossom = "썩은가시 꽃"
	L.rotheart_dryad = "썩은심장 드리아드"
	L.rotheart_keeper = "썩은심장 수호자"
	L.nightmare_dweller = "악몽 외눈박이"
	L.bloodtainted_fury = "피로 물든 격노"
	L.bloodtainted_burster = "피로 물든 파괴자"
	L.taintheart_summoner = "타락심장 소환사"
	L.dreadfire_imp = "공포화염 임프"
	L.tormented_bloodseeker = "고통의 흡혈박쥐"
end

L = BigWigs:NewBossLocale("Oakheart", "koKR")
if L then
	L.throw = "던지기"
end

-- Eye of Azshara

L = BigWigs:NewBossLocale("Eye of Azshara Trash", "koKR")
if L then
	L.wrangler = "증오갈퀴 사냥꾼"
	L.stormweaver = "증오갈퀴 폭풍술사"
	L.crusher = "증오갈퀴 분쇄자"
	L.oracle = "증오갈퀴 점쟁이"
	L.siltwalker = "마크라나 진흙방랑자"
	L.tides = "안식 없는 조류"
	L.arcanist = "증오갈퀴 비전술사"
end

L = BigWigs:NewBossLocale("Lady Hatecoil", "koKR")
if L then
	L.custom_on_show_helper_messages = "정전기 회오리/집중된 번개 도우미"
	L.custom_on_show_helper_messages_desc


	frame:SetPoint("TOPLEFT", "Carni_ECB_"..o, "TOPLEFT", 0, -CEnemyCastBar.bSpace);
			else
				frame:SetPoint("TOPLEFT", "Carni_ECB_"..o, "TOPLEFT", 0, CEnemyCastBar.bSpace);
			end
		end
		local buttonicon = getglobal("Carni_ECB_"..o.."_Icon");
		buttonicon:SetHeight(CEnemyCastBar.bSpace);
		buttonicon:SetWidth(CEnemyCastBar.bSpace);
		buttonicon:SetPoint("LEFT", "Carni_ECB_"..o, "LEFT", -CEnemyCastBar.bSpace + 4, 5);

	end

end

function CEnemyCastBar_SetTextSize() --settextsize and ICONSIZE

	for i=1, 20 do

		local buttontext = getglobal("Carni_ECB_"..i.."_Text");
		local buttonttext = getglobal("Carni_ECB_"..i.."_CastTimeText");

		if (CEnemyCastBar.bSmallTSize) then
			buttontext:SetFontObject(GameFontHighlightSmall);
			buttonttext:SetFontObject(GameFontHighlightSmall);
		else
			buttontext:SetFontObject(GameFontHighlight);
			buttonttext:SetFontObject(GameFontHighlight);
		end
	end
end

function CEnemyCastBar_Boolean(var)

	if (var) then

		return "on";

	else

		return "off";

	end

end

function CEnemyCastBar_Handler(msg) --Handler
	if (msg == "help") then

		DEFAULT_CHAT_FRAME:AddMessage(" ")
		DEFAULT_CHAT_FRAME:AddMessage("|cffffff00Natur EnemyCastBar |cffcccc00("..CECB_status_version_txt..")|cffffff00:|cffff0000 /necb help")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb |cffffffff- Toggles the options window.")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb clear |cffffffff- Removes all castbars from screen")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb gcinfo |cffffffffDisplay memory usage of all addons")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb countsec sss label |cffffffff- Starts a countdown of sss seconds")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb countmin mmm label |cffffffff- Starts a countdown of mmm minutes")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb repeat sss label |cffffffff- Repeated countdown of sss seconds")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb stopcount label |cffffffff- Stops all grey CastBars which inherit 'label'")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cffffffffYou may also try |cff00ff00.countsec|cffffffff (s. Options -> Raid/PartyChat!)")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb versions |cffffffff- Displays RaidUsers NECB versions.")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00/necb parser |cffffffff- Opens the NECB - CTRA Channel parser.")
		DEFAULT_CHAT_FRAME:AddMessage("|cffaaaaaaNECB: |cff00ff00SHIFT + LeftClick |cffffffffdeletes the bar, |


(string referenceFolder in folders)
            {
                foreach (string reference in ComputeManagedAssemblies.GetManagedAssembliesInFolder(referenceFolder))
                {
                    string simpleName = Path.GetFileNameWithoutExtension(reference);
                    if (!FrameworkExclusion.Exclude(simpleName, Index, out string reason))
                    {
                        yield return $"-{referenceOption}:{reference}";
                    }
                }
            }
        }
    }
}


modifier is:

  * In the general-purpose register or stack pointer that is specified by <Xm|SP> for `BLRAA` and `BLRAB`.
  * The value zero, for `BLRAAZ` and `BLRABZ`.

Key A is used for `BLRAA` and `BLRAAZ`. Key B is used for `BLRAB` and
`BLRABZ`.

If the authentication passes, the PE continues execution at the target of the
branch. For information on behavior if the authentication fails, see Faulting
on pointer authentication.

The authenticated address is not written back to the general-purpose register.

""",
        "https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/BLRAA--BLRAAZ--BLRAB--BLRABZ--Branch-with-link-to-register--with-pointer-authentication-"
    )
    this["blrabz"] = OpCodeDoc(
        "BLRABZ",
        """Branch with Link to Register, with pointer authentication. This instruction
authenticates the address in the general-purpose register that is specified by
<Xn>, using a modifier and the specified key, and calls a subroutine at the
authenticated address, setting register X30 to PC+4.

The modifier is:

  * In the general-purpose register or stack pointer that is specified by <Xm|SP> for `BLRAA` and `BLRAB`.
  * The value zero, for `BLRAAZ` and `BLRABZ`.

Key A is used for `BLRAA` and `BLRAAZ`. Key B is used for `BLRAB` and
`BLRABZ`.

If the authentication passes, the PE continues execution at the target of the
branch. For information on behavior if the authentication fails, see Faulting
on pointer authentication.

The authenticated address is not written back to the general-purpose register.

""",
        "https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/BLRAA--BLRAAZ--BLRAB--BLRABZ--Branch-with-link-to-register--with-pointer-authentication-"
    )
    this["bmopa"] = OpCodeDoc(
        "BMOPA",
        """This instruction works with 32-bit element ZA tile. This instruction generates
an outer product of the first source SVLS×1 vector and the second source
1×SVLS vector. Each outer product element is obtained as population count of
the bitwise XNOR result of the corresponding 32-bit elements of the first
source vector and the second source vector. Each source vector is
independently predicated by a corresponding governing predicate. When either
source vector element is inactive the corresponding destination tile element
remains unmodified. The resulting SVLS×SVLS product is then destructively
added to the destination tile.

""",
        "https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/BMOPA---"
    )
    this["bmops"] = OpCodeDoc(
        "BMOPS",
        """This instruction works with 32-bit element ZA tile. This instruction generates
an outer product of the first source SVLS×1 vector and the second source
1×SVLS vector. Each outer product element is obtained as population count of
the bitwise XNOR result of the corresponding 32-bit elements of the first
source vector and the second source vector. Each source vector is
independently predicated by a corresponding governing predicate. When either
source vector element is inactive the corresponding destination tile element
remains unmodified. The resulting SVLS×SVLS product is then destructively
subtracted from the destination tile.

""",
        "https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/BMOPS---"
    )
    this["br"] = OpCodeDoc(
        "BR",
        """Branch to Register branches unconditionally to an address in a register, with
a hint that this is not a subroutine return.

""",


mm4, %xmm4, %xmm4
	leaq	1024(%r13,%rdi,4), %rsi
	vmovdqa64	%zmm4, %zmm3
	.p2align 4,,10
	.p2align 3
.L994:
	movq	%rdi, %rcx
	addq	$256, %rdi
	cmpq	%rdi, %rbx
	jb	.L998
	leaq	-1024(%rsi), %rax
.L993:
	vpxord	(%rax), %zmm0, %zmm1
	vpxord	64(%rax), %zmm0, %zmm2
	leaq	128(%rax), %rdx
	vpord	%zmm3, %zmm1, %zmm3
	vpord	%zmm4, %zmm2, %zmm4
	vpxord	128(%rax), %zmm0, %zmm1
	vpxord	192(%rax), %zmm0, %zmm2
	vpord	%zmm3, %zmm1, %zmm3
	vpxord	256(%rax), %zmm0, %zmm1
	vpord	%zmm4, %zmm2, %zmm4
	vpxord	320(%rax), %zmm0, %zmm2
	leaq	384(%rdx), %rax
	vpord	%zmm3, %zmm1, %zmm3
	vpxord	256(%rdx), %zmm0, %zmm1
	vpord	%zmm4, %zmm2, %zmm4
	vpxord	320(%rdx), %zmm0, %zmm2
	vpord	%zmm3, %zmm1, %zmm1
	vpord	%zmm4, %zmm2, %zmm2
	vmovdqa64	%zmm1, %zmm3
	vmovdqa64	%zmm2, %zmm4
	cmpq	%rax, %rsi
	jne	.L993
	vpord	%zmm2, %zmm1, %zmm1
	leaq	1408(%rdx), %rsi
	vptestnmd	%zmm1, %zmm1, %k0
	kortestw	%k0, %k0
	setc	%al
	testb	%al, %al
	jne	.L994
	vmovdqa32	0(%r13,%rcx,4), %zmm6
	vpcmpd	$4, %zmm0, %zmm6, %k0
	kortestw	%k0, %k0
	jne	.L996
	.p2align 4,,10
	.p2align 3
.L995:
	addq	$16, %rcx
	vmovdqa32	0(%r13,%rcx,4), %zmm7
	vpcmpd	$4, %zmm0, %zmm7, %k0
	kortestw	%k0, %k0
	je	.L995
.L996:
	kmovw	%k0, %eax
	tzcntl	%eax, %eax
	addq	%rcx, %rax
.L992:
	vpbroadcastd	0(%r13,%rax,4), %zmm5
	vmovdqa64	%zmm0, %zmm2
	leaq	0(%r13,%rax,4), %rdi
	vpcmpd	$6, %zmm0, %zmm5, %k0
	vmovdqa64	%zmm5, %zmm1
	kortestw	%k0, %k0
	jne	.L1001
	leaq	-16(%rbx), %rax
	xorl	%ecx, %ecx
	jmp	.L1007
	.p2align 4,,10
	.p2align 3
.L1002:
	kmovw	%k0, %edx
	popcntq	%rdx, %rdx


-LIMIT-WEIGHT : 2
   *

   *
   * @see docs
   */
  GetCurrentFundingRateResp getCurrentFundingRate(GetCurrentFundingRateReq req);

  /**
   * Get Public Funding History
   *
   *
Query the funding rate at each settlement time point within a certain time range of the
   * corresponding contract.
   *
   *
Extra API Info:
   *
   *

   *
API-DOMAIN : FUTURES
   *
API-CHANNEL : PUBLIC
   *
API-PERMISSION : FUTURES
   *
API-RATE-LIMIT-POOL : PUBLIC
   *
API-RATE-LIMIT-WEIGHT : 5
   *

   *
   * @see docs
   */
  GetPublicFundingHistoryResp getPublicFundingHistory(GetPublicFundingHistoryReq req);

  /**
   * Get Private Funding History
   *
   *
Submit request to get the funding history.
   *
   *
Extra API Info:
   *
   *

   *
API-DOMAIN : FUTURES
   *
API-CHANNEL : PRIVATE
   *
API-PERMISSION : FUTURES
   *
API-RATE-LIMIT-POOL : FUTURES
   *
API-RATE-LIMIT-WEIGHT : 5
   *

   *
   * @see docs
   */
  GetPrivateFundingHistoryResp getPrivateFundingHistory(GetPrivateFundingHistoryReq req);
}
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.

package com.kucoin.universal.sdk.generate.futures.order;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.kucoin.universal.sdk.internal.interfaces.Request;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@Builder
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class AddOrderReq implements Request {
  /**
   * Unique order ID created by users to identify their orders. The maximum length cannot exceed 40,
   * e.g. UUID only allows numbers, characters, underline(_), and separator (-).
   */
  @JsonProperty("clientOid")
  private String clientOid;

  /** Specify if the order is to 'buy' or 'sell'. */
  @JsonProperty("side")
  private SideEnum side;

  /**
   * Symbol of the contract. Please refer to [Get Symbol endpoint:
   * symbol](https://www.kucoin.com/docs-new/api-3470220)
   */
  @JsonProperty("symbol")
  private String symbol;

  /**
   * Used to calculate the margin to be frozen for the order. If you are to close the position, this
   * parameter is not required.
   */
  @JsonProperty("leverage")
  private Integer leverage;

  /** Specify if the order is a 'limit' order or 'market' order */
  @JsonProperty("type")
  @Builder.Default
  private TypeEnum type = TypeEnum.LIMIT;

  /** Remark for the order: Length cannot exceed 100 utf8 characters */
  @JsonProperty("remark")
  private String remark;

  /**
   * Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be
   * provided.
   */
  @JsonProperty("stop")
  private StopEnum stop;

  /** Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. */
  @JsonProperty("stopPriceType")
  private StopPriceTypeEnum stopPriceType;

  /** Needs to be defined if stop is specified. */
  @JsonProperty("stopPrice")
  private String stopPric


Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBTB3dmMwF;_ylu=X3oDMTBxNDRkc3R1BGNvbG8DdwRwb3MDMzcEc2VjA3NyBHZ0aWQD\\/SIG=16n3e4s74\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.spc.noaa.gov\\/products\\/watch\\/ww0132.html%26w=132%26d=N4g-pUaqMusz%26icp=1%26.intl=us","Size":"19990"}},{"Title":"PLANT PHYSIOLOGY ONLINE -- Table of Contents (132 [2])","Summary":"To see an article, click its [Full Text] link. To review many abstracts, check the boxes to the left of the titles you want, and click the \'Get All Checked Abstract(s)\' button. To see one abstract at a time, click its [Abstract] link.","Url":"http:\\/\\/www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBTh3dmMwF;_ylu=X3oDMTEwa2NtaWpsBGNvbG8DdwRsA1dTMQRwb3MDMzgEc2VjA3NyBHZ0aWQD\\/SIG=12hg0jpkp\\/EXP=1147592336\\/**http%3a\\/\\/www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml","ModificationDate":1141804800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBUx3dmMwF;_ylu=X3oDMTBxYnZvM21yBGNvbG8DdwRwb3MDMzgEc2VjA3NyBHZ0aWQD\\/SIG=172cps28k\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml%26w=132%26d=Yvs4KUaqMjZc%26icp=1%26.intl=us","Size":"79038"}},{"Title":"AgGPS 132","Summary":"... The AgGPS 132 outputs sub- meter accuracy DGPS positions ... lightbar is connected to the. AgGPS 132. The AgGPS 132. can output positions up to 10 ...","Url":"http:\\/\\/www.farmgis.com\\/products\\/hardware\\/gps\\/aggps132.pdf","ClickUrl":"http:\\/\\/www.farmgis.com\\/products\\/hardware\\/gps\\/aggps132.pdf#search=\'\'","ModificationDate":1098169200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWB3dmMwF;_ylu=X3oDMTBxcXNibWtvBGNvbG8DdwRwb3MDMzkEc2VjA3NyBHZ0aWQD\\/SIG=16us46bp9\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.farmgis.com\\/


U5E 49077
IEluc3RhbGxhdGlvbg== 49078
IEFhbg== 49079
RG9n 49080
2LrYtw== 49081
IGhvdHQ= 49082
c3Rt 49083
INis2Yraqg== 49084
IG1hdGhlbWF0aWNz 49085
IGdseQ== 49086
YXNzaXM= 49087
IG1hdMOpcmk= 49088
0YPQtdC40YI= 49089
UGFydGlhbA== 49090
IGVudGZlcg== 49091
X3ZhcmlhYmxl 49092
IGFrcw== 49093
IHJlc2M= 49094
INWl1b0= 49095
IENPTlRSSUJVVA== 49096
YWJpbGl0w6k= 49097
eWV6 49098
IGZhemVuZG8= 49099
INep15zXkA== 49100
INGB0L/QvtGA0YI= 49101
IFByZXBhcmU= 49102
VWw= 49103
15jXog== 49104
IOCopuCovg== 49105
YmVl 49106
YXBpYQ== 49107
cmVhdG1lbnQ= 49108
YXRpZXZl 49109
LXJlc3BvbnNpdmU= 49110
LkNvbnRyb2xsZXI= 49111
IHDDumJsaWNvcw== 49112
TG9zcw== 49113
IOCqnOCqow== 49114
dmlzdWFs 49115
IGluc3VsdA== 49116
cHJpb3JpdHk= 49117
IGRlY2xpbmVk 49118
cmVkdWNl 49119
IOa1tw== 49120
LmxheWVycw== 49121
cHJlY2Vk 49122
IERleg== 49123
d2VrZQ== 49124
4KS+4KSh4KS8 49125
aXNzZXM= 49126
X3dlaWdodHM= 49127
IGFjY2lvbmVz 49128
NzY0 49129
R2k= 49130
emVpdGln 49131
Q2FwdGlvbg== 49132
RWRpdGFibGU= 49133
IG5vaXI= 49134
Z2F0 49135
IG15bmQ= 49136
IGN5dA== 49137
aXRpbQ== 49138
TWFpbnQ= 49139
VGVhY2hlcg== 49140
IOCkreCkvuCksOCkpOClgOCkrw== 49141
OTMy 49142
IGNvbW1lbnRlZA== 49143
IGJlc2NoZXJt 49144
IHRoZWZ0 49145
OTM2 49146
KdiM 49147
CXRpdGxl 49148
dWFydA== 49149
ODI0 49150
IOS4i+i9vQ== 49151
dWFyeQ== 49152
X0lk 49153
INmI2KfZhNiv 49154
INmE2Kw= 49155
IG13ZW4= 49156
4oCZYXI= 49157
4oCZZW50 49158
IGNvbW1lbnRhcnk= 49159
LnZpZXdz 49160
IHRoYW5rZnVs 49161
IGRhdG8= 49162
IGFzZQ== 49163
INGF05nQuw== 49164
IHBpw6hjZXM= 49165
IGluZmx1ZW5jZXM= 49166
IENoaXA= 49167
LnJvdXRlcg== 49168
IHByb3NlY3V0 49169
IHByb3RvY29scw== 49170
IGxpbmV1cA== 49171
IGFuYWx5c3Rz 49172
IGNvbXByaXM= 49173
INCh0LDQvA== 49174
IG9sZHXEn3U= 49175


.insert]
  CALL R3 2 0
  RETURN R0 0

PROTO_20:
  MOVE R4 R1
  NAMECALL R2 R0 K0 ["apisSearchUsers"]
  CALL R2 2 1
  NEWTABLE R3 0 0
  LENGTH R4 R2
  LOADN R5 0
  JUMPIFNOTLT R5 R4 [+39]
  GETIMPORT R4 K2 [pairs]
  MOVE R5 R2
  CALL R4 1 3
  FORGPREP_NEXT R4
  NEWTABLE R11 4 0
  GETUPVAL R13 0
  GETTABLEKS R12 R13 K3 ["SubjectNameKey"]
  GETTABLEKS R13 R8 K4 ["Name"]
  SETTABLE R13 R11 R12
  GETUPVAL R13 0
  GETTABLEKS R12 R13 K5 ["SubjectDisplayNameKey"]
  GETUPVAL R14 1
  JUMPIFNOT R14 [+3]
  GETTABLEKS R13 R8 K6 ["DisplayName"]
  JUMP [+1]
  LOADNIL R13
  SETTABLE R13 R11 R12
  GETUPVAL R13 0
  GETTABLEKS R12 R13 K7 ["SubjectIdKey"]
  GETTABLEKS R13 R8 K8 ["UserId"]
  SETTABLE R13 R11 R12
  FASTCALL2 TABLE_INSERT R3 R11 [+4]
  MOVE R10 R3
  GETIMPORT R9 K11 [table.insert]
  CALL R9 2 0
  FORGLOOP R4 2 [-31]
  JUMP [+10]
  GETIMPORT R4 K13 [pcall]
  NEWCLOSURE R5 P0
  CAPTURE UPVAL U2
  CAPTURE VAL R1
  CAPTURE UPVAL U1
  CAPTURE UPVAL U3
  CAPTURE VAL R3
  CAPTURE UPVAL U0
  CALL R4 1 0
  NEWTABLE R4 1 0
  GETUPVAL R6 0
  GETTABLEKS R5 R6 K14 ["UserSubjectKey"]
  SETTABLE R3 R4 R5
  RETURN R4 1

PROTO_21:
  MOVE R4 R1
  NAMECALL R2 R0 K0 ["searchGroupsV1GET"]
  CALL R2 2 1
  NAMECALL R2 R2 K1 ["await"]
  CALL R2 1 1
  GETTABLEKS R4 R2 K2 ["responseBody"]
  GETTABLEKS R3 R4 K3 ["data"]
  NEWTABLE R4 0 0
  JUMPIFNOT R3 [+39]
  NEWTABLE R5 0 0
  GETIMPORT R6 K5 [pairs]
  MOVE R7 R3
  CALL R6 1 3
  FORGPREP_NEXT R6
  NEWTABLE R13 4 0
  GETUPVAL R15 0
  GETTABLEKS R14 R15 K6 ["GroupNameKey"]
  GETTABLEKS R15 R10 K7 ["name"]
  SETTABLE R15 R13 R14
  GETUPVAL R15 0
  GETTABLEKS R14 R15 K8 ["GroupIdKey"]
  GETTABLEKS R15 R10 K9 ["id"]
  SETTABLE R15 R13 R14
  GETUPVAL R15 0
  GETTABLEKS R14 R15 K10 ["GroupMemberCountKey"]
  GETTABLEKS R15 R10 K11 ["memberCount"]
  SETTABLE R15 R13 R14
  FASTCALL2 TABLE_INSERT R5 R13 [+4]
  MOVE R12 R5
  GETIMPORT R11 K14 [table.insert]
  CALL R11 2 0
  FORGLOOP R6 2 [-27]
  GETUPVAL R7 0
  GETTABLEKS R6 R7 K15 ["GroupSubjectKey"]
  SETTABLE R5 R4 R6
  RETURN R4 1

PROTO_22:
  GETTABLEKS R3 R0 K0 ["__networking"]
  LOADK R6 K1 ["apis"]
  LOADK R7 K2 ["/experience-guidelines-service/v1beta1/multi-creator-eligibility"]
  DUPTAB


      // 检查是否已经缓存了弹幕数据
      final cachedDanmaku = await DanmakuCacheManager.getDanmakuFromCache(episodeId);
      if (cachedDanmaku != null) {
        debugPrint('弹幕已存在于缓存中，无需预加载: episodeId=$episodeId');
        return;
      }

      // 异步预加载弹幕，不等待结果
      DandanplayService.getDanmaku(episodeId, animeId).then((danmakuData) {
        final count = danmakuData['count'];
        if (count != null) {
          debugPrint('弹幕预加载成功: 加载了$count条弹幕');
        } else {
          debugPrint('弹幕预加载成功，但无法确定数量');
        }

        // 确保弹幕数据被正确缓存
        if (danmakuData['comments'] != null && danmakuData['comments'] is List) {
          final List<dynamic> comments = danmakuData['comments'];
          if (comments.isNotEmpty) {
            debugPrint('已成功缓存 ${comments.length} 条弹幕');
          }
        }
      }).catchError((e) {
        debugPrint('弹幕预加载失败: $e');
      });
    } catch (e) {
      debugPrint('预加载弹幕出错: $e');
    }
  }

  /// 创建一个可播放的历史记录条目
  ///
  /// 将Emby媒体信息转换为可播放的WatchHistoryItem，同时尝试匹配DandanPlay元数据
  ///
  /// [context] 用于显示匹配对话框
  /// [episode] Emby剧集信息
  /// [showMatchDialog] 是否显示匹配对话框（默认true）
  ///
  /// 返回一个完整的WatchHistoryItem，包含弹幕信息
  Future<WatchHistoryItem?> createPlayableHistoryItem(
      BuildContext context,
      EmbyEpisodeInfo episode, {
      bool showMatchDialog = true}) async {
    // 1. 先创建基本的WatchHistoryItem
    final historyItem = episode.toWatchHistoryItem();

    try {
      // 获取Emby流媒体URL（仅用于日志）
      final streamUrl = await getPlayUrl(episode);
      debugPrint('正在为Emby内容创建可播放项: ${episode.seriesName} - ${episode.name}');
      debugPrint('Emby流媒体URL: $streamUrl');

      // 获取视频信息（不阻塞主流程）
      Map<String, dynamic> videoInfo = {};
      try {
        videoInfo = await calculateVideoHash(episode).timeout(
          const Duration(seconds: 2),
          onTimeout: () => {'hash': '', 'fileName': '', 'fileSize': 0}
        );
      } catch (e) {
        debugPrint('获取视频信息失败: $e');
      }

      // 2. 通过DandanPlay API匹配内容
      final Map<String, dynamic> dummyVideoInfo = await _matchWithDandanPlay(context, episode, showMatchDialog, videoInfo);
      if (dummyVideoInfo['__cancel__'] == true) {
        debugPrint('用户取消了弹幕匹配，直接返回null');
        return null;
      }

      // 3. 如果匹配成功，更新历史条目的元数据
      if (dummyVideoInfo.isNotEmpty && dummyVideoInfo['animeId'] != null) {
        fin


8.7 47.7 2.4 11.7 4 23.8 4.8 36.4 37 25.4 70.3 42.5 60.3 66.9zM207.4 159.9c.9-44-37.9-42.2-78.6-40.3-21.7 1-38.9 1.9-45.5 13.9-11.4 20.9 5.9 92.9 23.2 101.2 9.8 4.7 73.4 7.9 86.3-7.1 8.2-9.4 15-49.4 14.6-67.7zm52 58.3c-4.3-12.4-6-30.1-15.3-32.7-2-.5-9-.5-11 0-10 2.8-10.8 22.1-17 37.2 15.4 0 19.3 9.7 23.7 9.7 4.3 0 6.3-11.3 19.6-14.2zm135.7-84.7c-6.6-12.1-24.8-12.9-46.5-13.9-40.2-1.9-78.2-3.8-77.3 40.3-.5 18.3 5 58.3 13.2 67.8 13 14.9 76.6 11.8 86.3 7.1 15.8-7.6 36.5-78.9 24.3-101.3z"/></svg>';
  static const String ebay =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="640" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 512"><path fill="currentColor" d="m606 189.5-54.8 109.9-54.9-109.9h-37.5l10.9 20.6c-11.5-19-35.9-26-63.3-26-31.8 0-67.9 8.7-71.5 43.1h33.7c1.4-13.8 15.7-21.8 35-21.8 26 0 41 9.6 41 33v3.4c-12.7 0-28 .1-41.7.4-42.4.9-69.6 10-76.7 34.4 1-5.2 1.5-10.6 1.5-16.2 0-52.1-39.7-76.2-75.4-76.2-21.3 0-43 5.5-58.7 24.2v-80.6h-32.1v169.5c0 10.3-.6 22.9-1.1 33.1h31.5c.7-6.3 1.1-12.9 1.1-19.5 13.6 16.6 35.4 24.9 58.7 24.9 36.9 0 64.9-21.9 73.3-54.2-.5 2.8-.7 5.8-.7 9 0 24.1 21.1 45 60.6 45 26.6 0 45.8-5.7 61.9-25.5 0 6.6.3 13.3 1.1 20.2h29.8c-.7-8.2-1-17.5-1-26.8v-65.6c0-9.3-1.7-17.2-4.8-23.8l61.5 116.1-28.5 54.1h35.9L640 189.5zM243.7 313.8c-29.6 0-50.2-21.5-50.2-53.8 0-32.4 20.6-53.8 50.2-53.8 29.8 0 50.2 21.4 50.2 53.8 0 32.3-20.4 53.8-50.2 53.8zm200.9-47.3c0 30-17.9 48.4-51.6 48.4-25.1 0-35-13.4-35-25.8 0-19.1 18.1-24.4 47.2-25.3 13.1-.5 27.6-.6 39.4-.6zm-411.9 1.6h128.8v-8.5c0-51.7-33.1-75.4-78.4-75.4-56.8 0-83 30.8-83 77.6 0 42.5 25.3 74 82.5 74 31.4 0 68-11.7 74.4-46.1h-33.1c-12 35.8-87.7 36.7-91.2-21.6zm95-21.4H33.3c6.9


的前提是，你得知道那是什么样子。兴趣项目就有这个作用，让你认识自己、塑造自己，壮大追求梦想的决心。

![](https://cdn.beekka.com/blogimg/asset/202202/bg2022021403.webp)

我向大家推荐一本书，就是讲个人兴趣可以让一个人走得多远。书名叫做 **《孤筏重洋》**，作者是上个世纪的一位挪威学者海尔达尔。

他原本是动物学家，有一次去南太平洋波利尼西亚群岛研究动物。他注意到那里的一个未解之谜，那些岛屿（下图黄色多边形的右侧部分）距离最近的陆地都有几千公里，没人知道，岛上的土著居民是从哪里来的？

![](https://cdn.beekka.com/blogimg/asset/202202/bg2022021404.webp)

他出于兴趣，写了一篇文章，推测可能是从南美洲坐木筏来的。所有杂志都拒绝发表，专家评语是异想天开，木筏怎么可能横渡几千公里的太平洋呢？

海尔达尔不甘心这么放弃，念念不忘自己的假说，最后做出了一个最疯狂的决定。你们都不信，我就实现给你们看。

他真的做了一支大木筏（下图），住在上面，用了三个月时间，完全依靠风力和洋流，饿了就捕鱼，渴了就喝雨水，这样从秘鲁漂到了波利尼西亚群岛，行程8000公里。完成这个壮举之后，他写了这本书，后来还拍成了电影，下面是预告片。

![](https://cdn.beekka.com/blogimg/asset/202202/bg2022021405.webp)

<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=c3323r7pdn8" allowFullScreen="true" width="600" height="400"></iframe>

因为这件事，他认识到自己的真正道路不是动物学，而是人类学和历史，他后来成了世界著名的人类学家。阅读这本书，可以鼓舞士气，让你获得勇气去追寻梦想，而且书的内容都是科学冒险，可读性很强。

总之，如果你找到了一个兴趣项目，你觉得它对你很重要，但是这个项目赚不到钱，可能也不会有人关注。我的建议是不要放过它，要抓住这个项目，这是你学习新知识、找到自我、成就自我的最好途径。

## FinClip：通用小程


ders: {'authtoken': token}})
    if (data.error) return message.error(data.error)
    self.orders.replace(data)
    message.success("You changed the order's status")
  }),
  // для продавца, получение всех продуктов добавленных этим продавцом
  fetchSelfProducts: flow(function* () {
    const token = self.getToken()
    const {data} = yield axios.get('/api/products/self/products', { headers: {'authtoken': token}})
    if (data.error) return message.error(data.error)
    self.selfProducts.replace(data)
  })
}))
.views(self => ({
  // получение определенное кол-во продуктов, зависящее от текущей страницы(page)
  getProducts() {
    return self.products.slice(self.page * 12, self.page * 12 + 12)
  },
  getLength(): number {
    return self.products.length
  },
  // для продавца, возвращает общую сумму заработка всех заказов (без комиссии сайта)
  get getIncome(): number {
    const income = self.orders.slice().reduce((total, order) => {
      return total += order.count * order.productId.price
    }, 0)
    return income
  }
})).views(self => ({
  get getNetProfit(): number {
    const income = self.getIncome
    const taxes = income * 15 / 100
    return income - taxes
  }
}))

export const store = StoreModel.create({
  user: {
    profile: {
      name: '',
      country: '',
      city: '',
      address: '',
      postal: ''
    },
    token: '',
    userId: '',
    isAdmin: false,
    cart: []
  },
  product: {
    _id: '',
    name: '',
    author: '',
    genre: '',
    image: '',
    price: 0,
    count: 0,
    rating: [],
    comments: [],
    customers: [],
    owner: {ownerName: '', ownerId: ''},
    sold: 0
  },
  otherProducts: [],
  products: [],
  orders: [],
  selfProducts: []
})

export type StoreInstance = Instance<typeof StoreModel>

export const StoreContext = createContext(store)

export const useStore = () => useContext<StoreInstance>(StoreContext)
// 92. Reverse Linked List II

// Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right, and return the reversed list.

// Example 1:

// Input: head = [1,2,3,4,5], left = 2, right = 4
// Output: [1,4,3,2,5]

// Example 2:

// Input: head = [5], left = 1, right = 1
// Output: [5]

//   Definition for singly-linked list.
class ListNode {
    val: number
    next: ListNode | null
    constructor(val?: number, next?: ListNode | null) {
        this.val = (val === undefined ? 0 : val)
        this.next = (next === undefined ? null : next)
    }
}

function reverseBetween(head: ListNode | null, left: number, right: number): ListNode | null {
    let currentPos = 1
    let currentNode: ListNode = head;
    let start = head;

    while (currentPos < left) {
        start = currentNode;
        currentNode = currentNode.next;
        currentPos++;
    }

    let newList = null, tail = currentNode;

    while (currentPos >= left && currentPos <= right)


if (v.amount == nil) then
								data[type] = (data[type] or 0) + tonumber(found)
							elseif (v.amount == "n/100") then
								data[type] = (data[type] or 0) + tonumber(found)/100
							elseif (v.amount == "totem") then
								data[type] = (data[type] or 0) + tonumber(found)/2*5
							elseif (v.amount == "hl") then
								data[type] = (data[type] or 0) + tonumber(found)/2.5*3.5
							elseif (v.amount == "fol") then
								data[type] = (data[type] or 0) + tonumber(found)/1.5*3.5
							else
								data[type] = (data[type] or 0) + v.amount
							end
						end
					end
				end
			end
		end
  	end
end

local old = {}
local old2 = {}

function TheoryCraft_UpdateBuffs(arg1, dontgen)
	if (arg1 == "player") then
		TheoryCraft_DeleteTable(TheoryCraft_Data.PlayerBuffs)
		TheoryCraft_AddAllBuffs("player", TheoryCraft_Data.PlayerBuffs)
		TheoryCraft_AddAllBuffs("player", TheoryCraft_Data.PlayerBuffs, "debuffs")
		if dontgen == nil then
			if TheoryCraft_Data.redotalents then
				TheoryCraft_UpdateTalents(true)
				TheoryCraft_Data.redotalents = nil
			end
			TheoryCraft_LoadStats()
			TheoryCraft_UpdateArmor()
			TheoryCraft_GenerateAll()
		end
	elseif (arg1 == "target") then
		TheoryCraft_DeleteTable(old)
		TheoryCraft_CopyTable(TheoryCraft_Data.TargetBuffs, old)
		TheoryCraft_DeleteTable(TheoryCraft_Data.TargetBuffs)
		TheoryCraft_AddAllBuffs("target", TheoryCraft_Data.TargetBuffs)
		TheoryCraft_AddAllBuffs("target", TheoryCraft_Data.TargetBuffs, "debuffs")
		if dontgen == nil then
			if TheoryCraft_Data.redotalents then
				TheoryCraft_UpdateTalents(true)
				TheoryCraft_Data.redotalents = nil
			end
			TheoryCraft_DeleteTable(old2)
			TheoryCraft_CopyTable(TheoryCraft_Data.Stats, old2)
			TheoryCraft_LoadStats()
			if (TheoryCraft_IsDifferent(old, TheoryCraft_Data.TargetBuffs)) or (TheoryCraft_IsDifferent(old2, TheoryCraft_Data.Stats)) then
				TheoryCraft_UpdateArmor()
				TheoryCraft_GenerateAll()
			end
		end
	end
end


48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.027 0h-34.334c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.44c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z"],"ruble-sign":[384,512,[],"f158","M239.36 320C324.48 320 384 260.542 384 175.071S324.48 32 239.36 32H76c-6.627 0-12 5.373-12 12v206.632H12c-6.627 0-12 5.373-12 12V308c0 6.627 5.373 12 12 12h52v32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v52c0 6.627 5.373 12 12 12h58.56c6.627 0 12-5.373 12-12v-52H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H146.56v-32h92.8zm-92.8-219.252h78.72c46.72 0 74.88 29.11 74.88 74.323 0 45.832-28.16 75.561-76.16 75.561h-77.44V100.748z"],ruler:[640,512,[],"f545","M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79


page-break-inside:avoid}img{max-width:100% !important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff !important}.navbar{display:none}.table td,.table th{background-color:#fff !important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Merriweather,Georgia,serif;font-size:14px;line-height:1.428571429;color:#222;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#008cba;text-decoration:none}a:hover,a:focus{color:#00526e;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:0}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:21px;margin-bottom:21px;border:0;border-top:1px solid #ddd}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:300;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:21px;margin-bottom:10.5px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10.5px;margin-bottom:10.5px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1,.h1{font-size:39px}h2,.h2{font-size:32px}h3,.h3{font-size:26px}h4,.h4{font-size:19px}h5,.h5{font-size:15px}h6,.h6{font-size:13px}p{margin:0 0 10.5px}.lead{margin-bottom:21px;font-size:17px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:22.5px}}small,.small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#008cba}.text-primary:hover{color:#


"""Test Supervisor scheduler backend."""

import asyncio

from supervisor.const import CoreState

async def test_simple_task(coresys):
    """Schedule a simple task."""
    await coresys.core.set_state(CoreState.RUNNING)
    trigger = []

    async def test_task():
        """Test task for schedule."""
        trigger.append(True)

    coresys.scheduler.register_task(test_task, 0.1, False)
    await asyncio.sleep(0.3)

    assert len(trigger) == 1

async def test_simple_task_repeat(coresys):
    """Schedule a simple task and repeat."""
    await coresys.core.set_state(CoreState.RUNNING)
    trigger = []

    async def test_task():
        """Test task for schedule."""
        trigger.append(True)

    coresys.scheduler.register_task(test_task, 0.1, True)

    for _ in range(5):
        await asyncio.sleep(0.1)
        if len(trigger) > 1:
            break

    assert len(trigger) > 1

async def test_simple_task_shutdown(coresys):
    """Schedule a simple task with shudown."""
    await coresys.core.set_state(CoreState.RUNNING)
    trigger = []

    async def test_task():
        """Test task for schedule."""
        trigger.append(True)

    coresys.scheduler.register_task(test_task, 0.1, True)
    await asyncio.sleep(0.3)
    await coresys.scheduler.shutdown()

    assert len(trigger) > 1

    old = len(trigger)
    await asyncio.sleep(0.2)

    assert len(trigger) == old

async def test_simple_task_repeat_block(coresys):
    """Schedule a simple task with repeat and block."""
    await coresys.core.set_state(CoreState.RUNNING)
    trigger = []

    async def test_task():
        """Test task for schedule."""
        trigger.append(True)
        await asyncio.sleep(2)

    coresys.scheduler.register_task(test_task, 0.1, True)
    await asyncio.sleep(0.3)

    assert len(trigger) == 1
    await coresys.scheduler.shutdown()


script_system_dofile('../generator/parser_keys.lua')

function parse_sound_tsv()

    local role_groups = {}
	local summon_groups = {}
	local last_group_name
	for line in io.lines([[E:\Github\SimpleEngine\res\tables\sound.tsv]]) do
		cxlog_info('line', line)
		local group_name = line:match('%[(.+)%]')
        if group_name then
            last_group_name = group_name
        else
            local actionstr, idstr = line:match('(.+)=(.+)')
            if actionstr and idstr then
                local id = '21-'.. idstr:match('0x(.+)')

                if role_sound_keys[last_group_name] then
                    local action_str,weapon_str = actionstr:match('(.+)_(.+)')
                    local action_key =  find_action_key(action_str)
                    local weapon_key = find_weapon_key(weapon_str)
                    local role_key = find_role_key(last_group_name)

                    local id_key = role_key ..'-'..weapon_key
                    if not role_groups[id_key] then
                        role_groups[id_key] = {}
                    end
                    role_groups[id_key][action_key] = id
                else
                    local action = find_action_key(actionstr)
                    local id_key = find_summon_key(last_group_name)
                    if not summon_groups[id_key] then
                        summon_groups[id_key] = {}
                    end
                    summon_groups[id_key][action] = id
                end
            end
		end
    end

    local role_path = [[E:\Github\SimpleEngine\res\tables\sound_role.tsv]]
    local role_tbl,role_tbl_cnames = utils_parse_tsv(role_path,{
        { name = 'ID' },
        { name = 'name' },
        { name = 'role' },
        { name = 'weapon_type' },
        { name = 'idle' },
        { name = 'walk' },
        { name = 'sit' },
        { name = 'angry' },
        { name = 'sayhi' },
        { name = 'dance' },
        { name = 'salute' },
        { name = 'c


assets/style/fixed/base.scss';
// 补丁 element
@import '~@/assets/style/fixed/element.scss';
// 补丁 markdown
@import '~@/assets/style/fixed/markdown.scss';
// 补丁 n-progress
@import '~@/assets/style/fixed/n-progress.scss';
// 补丁 vue-splitpane
@import '~@/assets/style/fixed/vue-splitpane.scss';
// 补丁 vue-grid-layout
@import '~@/assets/style/fixed/vue-grid-layout.scss';
// 补丁 tree-view
@import '~@/assets/style/fixed/tree-view.scss';

// 动画
@import '~@/assets/style/animate/vue-transition.scss';

// 在这里写公用的class
// 注意 这个文件里只写class
// mixin等内容请在 public.scss 里书写

// 文字相关
.#{$prefix}-text-center {
  text-align: center;
}

// 浮动相关
.#{$prefix}-fl {
  float: left;
}
.#{$prefix}-fr {
  float: right;
}

// 边距相关
$sizes: (0, 5, 10, 15, 20);

@for $index from 1 to 6 {
  .#{$prefix}-m-#{nth($sizes, $index)} { margin: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-mt-#{nth($sizes, $index)} { margin-top: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-mr-#{nth($sizes, $index)} { margin-right: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-mb-#{nth($sizes, $index)} { margin-bottom: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-ml-#{nth($sizes, $index)} { margin-left: #{nth($sizes, $index)}px !important; }

  .#{$prefix}-p-#{nth($sizes, $index)} { padding: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-pt-#{nth($sizes, $index)} { padding-top: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-pr-#{nth($sizes, $index)} { padding-right: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-pb-#{nth($sizes, $index)} { padding-bottom: #{nth($sizes, $index)}px !important; }
  .#{$prefix}-pl-#{nth($sizes, $index)} { padding-left: #{nth($sizes, $index)}px !important; }
}

// 快速使用

.#{$prefix}-m { margin: 20px !important; }
.#{$prefix}-mt { margin-top: 20px !important; }
.#{$prefix}-mr { margin-right: 20px !important; }
.#{$prefix}-mb { margin-bottom: 20px !important; }
.#{$prefix}-ml { margin-left: 20px !important; }

.#{$prefix}-p { padding: 20px !important; }
.#{$prefix}-pt { padding-top: 20px !important; }
.#{$prefix}-pr { padding-right: 20px !important; }
.#{$prefix}-pb { padding-bottom: 20px !important; }
.#{$prefix}-pl { padding-left: 20px !important; }
// 减小弹出菜单的项目高度
.el


# Time:  O(max(h, k))
# Space: O(h)

class Solution(object):
    # @param {TreeNode} root
    # @param {integer} k
    # @return {integer}
    def kthSmallest(self, root, k):
        s, cur, rank = [], root, 0

        while s or cur:
            if cur:
                s.append(cur)
                cur = cur.left
            else:
                cur = s.pop()
                rank += 1
                if rank == k:
                    return cur.val
                cur = cur.right

        return float("-inf")

# time: O(max(h, k))
# space: O(h)

from itertools import islice

class Solution2(object):
    def kthSmallest(self, root, k):
        """
        :type root: TreeNode
        :type k: int
        :rtype: int
        """
        def gen_inorder(root):
            if root:
                for n in gen_inorder(root.left):
                    yield n

                yield root.val

                for n in gen_inorder(root.right):
                    yield n

        return next(islice(gen_inorder(root), k-1, k))


 lercWasm, { LercFactory } from "./lerc-wasm";

type PixelTypedArray =
  | Int8Array
  | Uint8Array
  | Uint8ClampedArray
  | Int16Array
  | Uint16Array
  | Int32Array
  | Uint32Array
  | Float32Array
  | Float64Array;

type PixelTypedArrayCtor =
  | Int8ArrayConstructor
  | Uint8ArrayConstructor
  | Uint8ClampedArrayConstructor
  | Int16ArrayConstructor
  | Uint16ArrayConstructor
  | Int32ArrayConstructor
  | Uint32ArrayConstructor
  | Float32ArrayConstructor
  | Float64ArrayConstructor;

type LercPixelType = "S8" | "U8" | "S16" | "U16" | "S32" | "U32" | "F32" | "F64";

interface BandStats {
  minValue: number;
  maxValue: number;
  /**
   * deprecated, will be removed in next release. use depthStats instead
   */
  dimStats?: {
    minValues: Float64Array;
    maxValues: Float64Array;
  };
  depthStats?: {
    // Note the type change compared to the JS version which used typed array that fits the data's pixel type
    minValues: Float64Array;
    maxValues: Float64Array;
  };
}

interface LercHeaderInfo {
  version: number;
  dimCount: number;
  width: number;
  height: number;
  validPixelCount: number;
  bandCount: number;
  blobSize: number;
  maskCount: number;
  depthCount: number;
  dataType: number;
  minValue: number;
  maxValue: number;
  maxZerror: number;
  statistics: BandStats[];
  bandCountWithNoData: number;
}

interface DecodeOptions {
  inputOffset?: number;
  returnInterleaved?: boolean;
  /**
   * deprecated, will be removed in next release. use returnInterleaved instead
   */
  returnPixelInterleavedDims?: boolean;
  noDataValue?: number;
}

interface LercData {
  width: number;
  height: number;
  pixelType: LercPixelType;
  statistics: BandStats[];
  pixels: PixelTypedArray[];
  mask: Uint8Array;
  dimCount: number;
  depthCount: number;
  bandMasks?: Uint8Array[];
}

interface PixelTypeInfo {
  pixelType: LercPixelType;
  size: 1 | 2 | 4 | 8;
  ctor: PixelTypedArrayCtor;
  range: [number, number];
}

const pixelTypeInfoMap: PixelTypeInfo[] = [
  {
    pixelType: "S8",
    size: 1,
    ctor: Int8Array,
    range: [-128, 128]
  },
  {
    pixelType: "U8",
    size: 1,
    ctor: Uint8Array,
    range: [0, 255]
  },
  {
    pixelType: "S16",
    size: 2,
    ctor: Int16Array,
    range: [-32768, 32767]
  },
  {
    pixelType: "U16",
    size: 2,
    ctor: Uint16Array,
    range: [0, 65536]
  },
  {
    pixelType: "S32",
    size: 4,
    ctor: Int32Array,
    range: [-2147483648, 2147483647]
  },
  {
    pixelType: "U32",
    size: 4,
    ctor: Uint32Array,
    range: [0, 4294967296]
  },
  {
    pixelType: "F32",
    size: 4,
    ctor: Float32Array,
    range: [-3.4027999387901484e38, 3.4027999387901484e38]
  },
  {
    pixelType: "F64",
    size: 8,
    ctor: Float64Array,
    range: [-1.7976931348623157e308, 1.7976931348623157


<RIGHTFLIPPER
 DA <BALL
 DA <BMP1
 DA <BMP2
 DA <BMP3
 DA <BMP4
 DA <BMP5
 DA <BMP6
 DA <LKICK
 DA <RKICK
 DA <KICK1
 DA <KICK2
 DA <ROLL1
 DA <ROLL2
 DA <ROLL3
 DA <TARG1
 DA <TARG2
 DA <TARG3
 DA <TARG4
 DA <TARG5
 DA <TARG6
 DA <LFLIP2
 DA <RFLIP2
 DA <POLY1
 DA <POLY2
 DA <POLY3
 DA <POLY4
 DA <LANE1
 DA <LANE2
 DA <LANE3
 DA <GATE1
 DA <GATE2
 DA <GATE3
 DA <GATE4
 DA <DROP1
 DA <DROP2
 DA <CATCH1
 DA <CATCH2
 DA <SPIN
 DA <MGNT
*
OBJADDRHI DA >POLY
 DA >LAUNCHER
 DA >LEFTFLIPPER
 DA >RIGHTFLIPPER
 DA >BALL
 DA >BMP1
 DA >BMP2
 DA >BMP3
 DA >BMP4
 DA >BMP5
 DA >BMP6
 DA >LKICK
 DA >RKICK
 DA >KICK1
 DA >KICK2
 DA >ROLL1
 DA >ROLL2
 DA >ROLL3
 DA >TARG1
 DA >TARG2
 DA >TARG3
 DA >TARG4
 DA >TARG5
 DA >TARG6
 DA >LFLIP2
 DA >RFLIP2
 DA >POLY1
 DA >POLY2
 DA >POLY3
 DA >POLY4
 DA >LANE1
 DA >LANE2
 DA >LANE3
 DA >GATE1
 DA >GATE2
 DA >GATE3
 DA >GATE4
 DA >DROP1
 DA >DROP2
 DA >CATCH1
 DA >CATCH2
 DA >SPIN
 DA >MGNT
*
TABLEB HEX 000000BF1506
*
KITB HEX 001600BF1106
*
TOOLB HEX 002400BF0306
*
HANDB HEX 0024000E0306
*
POINTERB HEX 0F2400090306
*
SCISSORB HEX 1924000D0306
*
HAMMERB HEX 2724000D0306
*
BRUSHB HEX 3524000A0306
*
WHITEB HEX 402400090306
*
GREENB HEX 4A2400090306
*
REDB HEX 542400090306
*
VIOLETB HEX 5E2400090306
*
BLUEB HEX 682400090306
*
PLAYB HEX 7324000C0306
*
MAGNB HEX 8124000C0306
*
WORLDB HEX 8F24000C0306
*
WIREB HEX 9D24000C0306
*
DISKB HEX AB24000D0306
*
POLYB HEX 1B1705100202
*
LAUNCHERB HEX 4922020C0006
*
LFLIPB HEX 021C06100204
*
RFLIPB HEX 021F01100204
*
BALLB HEX 052206050005
*
BMP1B HEX 301705110203
*
BMP2B HEX 311A020A0106
*
BMP3B HEX 301C04100004
*
BMP4B HEX 351D05050204
*
BMP5B HEX 3020030D0105
*
BMP6B HEX 3022030D0105
*
LKICKB HEX 4417051A0204
*
RKICKB HEX 441B011A0204
*
KICK1B HEX 4A1E030D0005
*
KICK2B HEX 4E1F06060104
*
ROLL1B HEX A01801050004
*
ROLL2B HEX A019


Recording());
    await matchGoldenFile('ui_canvas_draw_points.png', region: region);
  });

  test('draws raw points in all 3 modes', () async {
    final ui.Paint paint = ui.Paint();
    paint.strokeWidth = 2.0;
    paint.color = const ui.Color(0xFF0000FF);
    final Float32List points = offsetListToFloat32List(const <ui.Offset>[
      ui.Offset(10, 10),
      ui.Offset(50, 10),
      ui.Offset(70, 70),
      ui.Offset(170, 70)
    ]);
    canvas.drawRawPoints(ui.PointMode.points, points, paint);
    final Float32List points2 = offsetListToFloat32List(const <ui.Offset>[
      ui.Offset(10, 110),
      ui.Offset(50, 110),
      ui.Offset(70, 170),
      ui.Offset(170, 170)
    ]);
    canvas.drawRawPoints(ui.PointMode.lines, points2, paint);
    final Float32List points3 = offsetListToFloat32List(const <ui.Offset>[
      ui.Offset(10, 210),
      ui.Offset(50, 210),
      ui.Offset(70, 270),
      ui.Offset(170, 270)
    ]);
    canvas.drawRawPoints(ui.PointMode.polygon, points3, paint);

    await drawPictureUsingCurrentRenderer(recorder.endRecording());
    await matchGoldenFile('ui_canvas_draw_raw_points.png', region: region);
  });

  test('Should draw points with strokeWidth', () async {
    final ui.Paint nullStrokePaint =
      ui.Paint()..color = const ui.Color(0xffff0000);
    canvas.drawRawPoints(ui.PointMode.lines, Float32List.fromList(<double>[
      30.0, 20.0, 200.0, 20.0]), nullStrokePaint);
    final ui.Paint strokePaint1 = ui.Paint()
      ..strokeWidth = 1.0
      ..color = const ui.Color(0xff0000ff);
    canvas.drawRawPoints(ui.PointMode.lines, Float32List.fromList(<double>[
      30.0, 30.0, 200.0, 30.0]), strokePaint1);
    final ui.Paint strokePaint3 = ui.Paint()
      ..strokeWidth = 3.0
      ..color = const ui.Color(0xff00a000);
    canvas.drawRawPoints(ui.PointMode.lines, Float32List.fromList(<double>[
      30.0, 40.0, 200.0, 40.0]), strokePaint3);
    canvas.drawRawPoints(ui.PointMode.points, Float32List.fromList(<double>[
      30.0, 50.0, 40.0, 50.0, 50.0, 50.0]), strokePaint3);
    await drawPictureUsingCurrentRenderer(recorder.endRecording());
    await matchGoldenFile('ui_canvas_draw_points_stroke.png', region: region);
  });
}
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:typed_data' show Float64List;

import 'package:test/bootstrap/browser.dart';
import 'package:test/test.dart';
import 'package:ui/ui.dart';

import '../common/test_initialization.dart';
import 'utils.dart';

void main() {
  internalBootstrapBrowserTest(() => testMain);
}

Future<void> testMain() async {
  setUpUnitTests();
  test('path getBounds', () {
    const Rect r = Rect.fromLTRB(1.0, 3.0, 5.0, 7.0);
    final Path p = Path()..addRect(r);
    expect(p.getBounds(), equals(r));
    p.lineTo(20.0, 15.0);
    expect(p.getBounds(), equals(const Rect.fromLTRB(1.0, 3.0, 20.0, 15.0)));


ning:
//
// dart pkg/vm_service/test/update_line_numbers.dart pkg/vm_service/test/async_star_single_step_into_test.dart
//
const LINE_A = 27;
const LINE_B = 28;
const LINE_C = 32;
const LINE_G = 34;
const LINE_0 = 35;
const LINE_D = 36;
const LINE_1 = 41;
const LINE_E = 42;
const LINE_F = 43;
// AUTOGENERATED END

Stream<int> foobar() async* {
  yield 1; // LINE_A
  yield 2; // LINE_B
}

Future<void> helper() async {
  print('helper'); // LINE_C
  // ignore: unused_local_variable
  await for (var i in foobar()) /* LINE_G */ {
    debugger(); // LINE_0
    print('loop'); // LINE_D
  }
}

Future<void> testMain() async {
  debugger(); // LINE_1
  print('mmmmm'); // LINE_E
  await helper(); // LINE_F
  print('z');
}

final tests = <IsolateTest>[
  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_1),
  stepOver, // debugger.

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_E),
  stepOver, // print.

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_F),
  stepInto,

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_C),
  stepOver, // print.

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_G), // foobar()
  stepInto,

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_G), // await for
  stepInto,

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_A),
  // Resume here to exit the generator function.
  // TODO(johnmccutchan): Implement support for step-out of async functions.
  resumeIsolate,

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_0),
  stepOver, // debugger.

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_D),
  stepOver, // print.

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_G),
  stepInto,

  hasStoppedAtBreakpoint,
  stoppedAtLine(LINE_B),
  resumeIsolate,
];

void main([args = const <String>[]]) => runIsolateTests(
      args,
      tests,
      'async_star_single_step_into_test.dart',
      testeeConcurrent: testMain,
      extraArgs: extraDebuggingArgs,
    );
// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:developer';

import 'package:test/test.dart';
import 'package:vm_service/vm_service.dart';

import 'common/service_test_common.dart';
import 'common/test_helper.dart';

// AUTOGENERATED START
//
// Update these constants by running:
//
// dart pkg/vm_service/test/update_line_numbers.dart pkg/vm_service/test/rewind_optimized_out_test.dart
//
const LINE_0 = 39;
const LINE_A = 41;
const LINE_B = 46;
const LINE_C = 49;
const LINE_D = 53;
// AUTOGENERATED END

int global = 0;

@pragma('vm:never-inline')
int b3(int x) {
  int sum = 0;
  try {
    for (int i = 0; i < x; i++) {
      sum += x;
    }
  } catch (e) {
    print('caught $e');
  }
  if (global >= 100) {
    debugger(); // LINE_0.
  }
  global = global + 1; // LINE_A.
  return sum;
}

@pragma('vm:prefer-inline')
int b2(x) => b3


       entries[2].index = 2;
        }
        {
            let entries = kvm_cpuid.mut_entries_slice();
            entries[3].function = 0x80000001;
            entries[3].ecx = 0b11;
            entries[3].edx = 0b111;
        }
        {
            let entries = kvm_cpuid.mut_entries_slice();
            // Something other than 0x1, 0x7, 0x80000001.
            entries[4].function = 0x0;
        }

        set_cpuid_entries(&mut kvm_cpuid.mut_entries_slice());

        let cpuid_f1 = kvm_cpuid_entry2 {
            function: 1,
            index: 0,
            flags: 0,
            eax: 0
                & !(0b11111111 << leaf_0x1::eax::EXTENDED_FAMILY_ID_SHIFT)
                & !(0b1111 << leaf_0x1::eax::EXTENDED_PROCESSOR_MODEL_SHIFT)
                | 3 << leaf_0x1::eax::EXTENDED_PROCESSOR_MODEL_SHIFT
                    & !(0b11 << leaf_0x1::eax::PROCESSOR_TYPE_SHIFT)
                    & !(0b1111 << leaf_0x1::eax::PROCESSOR_FAMILY_SHIFT)
                | 6 << leaf_0x1::eax::PROCESSOR_FAMILY_SHIFT
                    & !(0b1111 << leaf_0x1::eax::PROCESSOR_MODEL_SHIFT)
                | 15 << leaf_0x1::eax::PROCESSOR_MODEL_SHIFT & !(0b1111 as u32)
                | 2 as u32,
            ebx: 0,
            ecx: 0b11
                & !(1 << leaf_0x1::ecx::DTES64_SHIFT)
                & !(1 << leaf_0x1::ecx::MONITOR_SHIFT)
                & !(1 << leaf_0x1::ecx::DS_CPL_SHIFT)
                & !(1 << leaf_0x1::ecx::TM2_SHIFT)
                & !(1 << leaf_0x1::ecx::CNXT_ID)
                & !(1 << leaf_0x1::ecx::SDBG_SHIFT)
                & !(1 << leaf_0x1::ecx::XTPR_UPDATE_SHIFT)
                & !(1 << leaf_0x1::ecx::PDCM_SHIFT)
                & !(1 << leaf_0x1::ecx::OSXSAVE_SHIFT),
            edx: 0b111
                & !(1 << leaf_0x1::edx::PSN_SHIFT)
                & !(1 << leaf_0x1::edx::DS_SHIFT)
                & !(1 << leaf_0x1::edx::ACPI_SHIFT)
                & !(1 << leaf_0x1::edx::SS_SHIFT)
                & !(1 << leaf_0x1::edx::TM_SHIFT)
                & !(1 << leaf_0x1::edx::PBE_SHIFT),
            padding: [0, 0, 0],
        };
        {
            let entries = kvm_cpuid.mut_entries_slice();
            assert_eq!(entries[0], cpuid_f1);
        }
        let cpuid_f7_index0 = kvm_cpuid_entry2 {
            function: 0x7,
            index: 0,
            flags: 0,
            eax: 0,
            ebx: 0b11
                & !(1 << leaf_0x7::index0::ebx::SGX_SHIFT)
                & !(1 << leaf_0x7::index0::ebx::HLE_SHIFT)
                & !(1 << leaf_0x7::index0::ebx::FPDP_SHIFT)
                & !(1 << leaf_0x7::index0::ebx::RTM_SHIFT)
                & !(1 << leaf_0x7::index0::ebx::RDT_M_SHIFT)
                & !(1 << leaf_0x7::index0::eb


pg = pg or {}
pg.weapon_property_224 = {}

function ()
	uv0.weapon_property_224[314511] = {
		action_index = "",
		range = 10,
		type = 2,
		fire_fx = "",
		recover_time = 0,
		axis_angle = 0,
		shakescreen = 0,
		name = "龙骧轰炸机T1",
		aim_type = 0,
		torpedo_ammo = 0,
		expose = 0,
		angle = 180,
		charge_param = "",
		damage = 60,
		corrected = 100,
		min_range = 0,
		id = 314511,
		attack_attribute_ratio = 100,
		fire_fx_loop_type = 1,
		attack_attribute = 4,
		reload_max = 400,
		queue = 1,
		search_type = 1,
		effect_move = 1,
		suppress = 0,
		spawn_bound = "cannon",
		fire_sfx = "",
		auto_aftercast = 0,
		initial_over_heat = 0,
		bullet_ID = {
			10012
		},
		barrage_ID = {
			10001
		},
		oxy_type = {
			1
		},
		search_condition = {
			1
		},
		precast_param = {}
	}
	uv0.weapon_property_224[314512] = {
		action_index = "",
		range = 85,
		type = 1,
		fire_fx = "fangkongpaohuoshe2",
		recover_time = 0,
		axis_angle = 0,
		shakescreen = 0,
		name = "第4章第三关boss龙骧战斗机弹幕",
		aim_type = 1,
		torpedo_ammo = 0,
		expose = 0,
		angle = 180,
		charge_param = "",
		damage = 10,
		corrected = 100,
		min_range = 0,
		id = 314512,
		attack_attribute_ratio = 80,
		fire_fx_loop_type = 1,
		attack_attribute = 4,
		reload_max = 1650,
		queue = 1,
		search_type = 1,
		effect_move = 1,
		suppress = 1,
		spawn_bound = "cannon",
		fire_sfx = "battle/air-atk",
		auto_aftercast = 0,
		initial_over_heat = 0,
		bullet_ID = {
			20001,
			20001,
			20001,
			20001
		},
		barrage_ID = {
			101,
			102,
			103,
			104
		},
		oxy_type = {
			1
		},
		search_condition = {
			1
		},
		precast_param = {}
	}
	uv0.weapon_property_224[314513] = {
		action_index = "",
		range = 200,
		type = 4,
		fire_fx = "fangkongpaohuoshe2",
		recover_time = 0,
		axis_angle = 0,
		shakescreen = 0,
		name = "第4章第三关boss龙骧-战斗机空中",
		aim_type = 1,
		torpedo_ammo = 0,
		expose = 0,
		angle = 180,
		charge_param = "",
		damage = 30,
		corrected = 100,
		min_range = 0,
		id = 314513,
		attack_attribute_ratio = 80,
		fire_fx_loop_type = 1,
		attack_attribute = 4,
		reload_max = 48,
		queue = 1,
		search_type = 1,
		effect_move = 1,
		suppress = 1,
		spawn_bound = "antiaircraft",
		fire_sfx = "battle/air-a


6ze4y5J1xcs99DKGypHYkuXQ9v/Ocu5D/zbeFPFajZWqJBF83QbfHvzQEus35d2mbx+2vsOglvAE70Gb0LxfK7GhFnqhDgWGw0vo0YJF2pjdxznFMSi17Xq9sof7A48m45t93/aseCxnGC31LXFtCXaasFGoBUeClt9pwZZuyvexzR++lzvixWPr0y7QVLXKFWKuhVlN+KNvrXCKOD0XyS89JJlYvxQcdq1koX1NvJh5++QIpmV4hx48wdvutkjYt9bYTfforf6f4QonSK4L5f/iuZL830QPpv8f4Cs8+5Jo6/9a0d9f2f9i+QJ1aUJ5VWfsAhw42/q1wtQ+1Op/Ay6aYeIAAAB42n3M104CYRSF0e/Qewd7731mYCh2BLH33iVRgcQYoyHG19IX1Dj/tedmZe+dHGz8fx8gNrFjx4ETF248ePHhJ0CQEGEiRIkRJ0GSFC200kY7HXTSRTc99NJHPwMMMsQwI4wyxjgTTDLFNDNo6BikyWCSJUeeArPMMc8CiyyxTJEVSpRZpcIa62ywyRbb7LDLHvsccMgRx5xwyhnnXHDJFdfccMsd91TFIU5xiVs84hWf+CUgQQlJWCISlZjE+eJbEpKUlKv2/Pla193Nl4amaWXLoqb8y8bvoNSVhjKtzChNZVaZU+aVBWXRUld/dd331Kg13x4fqu91qzIqlqalWSn9ACnqRHp42j3MsQ6CMBQF0D4qBStQBlYTnJuoCb8gOLAQpzb6C67OxsRRv+XVybj4afrU2u2em5t7h9cZ4cJ6TAfjAK7WdUKbGZa2x2pD4WinKPTOMOR1i1yvUNTtjT8j/UVMEGuPESFuPJLPbO+REpKlx5iQzn8AlP42r9sHk6BYpB3vDtRktMu3gRNi1gQWRHkKVMSiCyyJavGnxUq/Aa6pQk0AAAFVQTqrAAA=) format('woff');
  font-weight: normal;
  font-style: normal;
}

/*
 * Vendors
 */

@font-face {
  font-family: weather-icons;
  src: url('http://192.185.228.226/projects/ma/1-5-1/jquery/fonts/weather-icons/weather-icons.eot');
  src: url('../fonts/weather-icons/weather-icons.eot') format('embedded-opentype'), url('../fonts/weather-icons/weather-icons.woff') format('woff'), url('../fonts/weather-icons/weather-icons.ttf') format('truetype'), url('../fonts/weather-icons/weather-icons.svg') format('svg');
  font-weight: 400;
  font-style: normal;
}

#weather-


                onExit: widget.onExit,
              ),
            ),
        transitionDuration: const Duration(milliseconds: 300),
        reverseTransitionDuration: const Duration(milliseconds: 300),
      ),
    );
    _isFullScreenImageOpened = false;
  }

  void _closeFullScreenImage() {
    if (_isFullScreenImageOpened && _rootNavigator.canPop()) {
      _rootNavigator.pop();
    }
  }
}
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:vndb_lite/src/features/search/presentation/search_screen.dart';
import 'package:vndb_lite/src/util/responsive.dart';
import 'package:vndb_lite/src/features/sort_filter/presentation/remote/remote_sort_filter_controller.dart';
import 'package:vndb_lite/src/features/vn/domain/p1.dart';
import 'package:vndb_lite/src/features/search/presentation/search_screen_controller.dart';
import 'package:vndb_lite/src/features/vn_item/presentation/vn_item_grid_.dart';
import 'package:vndb_lite/src/util/debouncer.dart';

part 'search_result_controller.g.dart';

@Riverpod(keepAlive: true)
class SearchResultPageController extends _$SearchResultPageController {
  @override
  int build() {
    return 1;
  }

  void increment() => state++;

  void decrement() {
    // Prevent a situation where the state is 1, and decremented into 0.
    if (state > 1) state--;
  }
}

@Riverpod(keepAlive: true)
class SearchResultController extends _$SearchResultController {
  final _debouncer = Debouncer(delay: const Duration(milliseconds: 400));

  @override
  List<VnItemGrid> build() {
    return [];
  }

  final List<String> vnId = [];

  final double limit = responsiveUI.own(0.7);

  void fromP1(List<VnDataPhase01> p1List, String labelCode) {
    for (VnDataPhase01 p1 in p1List) {
      if (vnId.contains(p1.id)) return;
      state.add(VnItemGrid(key: Key(p1.id), p1: p1, isGridView: true, labelCode: labelCode));
      vnId.add(p1.id);
    }
  }

  void handleNextResult(double currentPosition, double maxPosition) {
    // debugPrint("CURRENT POST. $currentPosition");
    // debugPrint("MAX POST. $maxPosition");

    // * Using debouncer to debounce scrolling listener to fetch the next result if exists.
    _debouncer.call(() {
      if (_searchStateCanContinue && currentPosition >= (maxPosition - limit)) {
        // * Continue searching...

        SchedulerBinding.instance.addPostFrameCallback((_) async {
          ref.read(searchResultPageControllerProvider.notifier).increment();
          ref.read(searchResultNotifierProvider.notifier).ring();

          await ref
              .read(searchScreenControllerProvider.notifier)
              .searchWithCurrentConf(pageResult: ref.read(searchResultPageControllerProvider));
        });
      }
    });
  }

  /// This ensures that search state is not either SizedBox containing loading widget,
  /// or error widget, AND search filter DOES have content, NOT empty.
  bool get _searchStateCanContinue {
    final searchQuery = ref.read(appliedRemoteFilterControllerProvider).search;
    final searchState = ref.read(searchScreenControllerProvider);

    // Logging result.
    // debugPrint(searchState.toString());

    // Can continue if search state is not empty, have at least a result,
    // and that result should not be a loading indicator or an error,
    // and most importantly, no empty searchQuery.
    return searchState.isNotEmpty &&
        searchQuery.isNotEmpty &&
        searchState.last.key != SearchScreen.onHoldStatusKey;
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'remote_vn_repo


("this is a regular file")
    }
    fileSystem.createDirectory(directory)
    fileSystem.createSymlink(symlink, "regularFile".toPath())

    val regularFileMetadata = fileSystem.metadata(regularFile)
    assertEquals(true, regularFileMetadata.isRegularFile)
    assertEquals(false, regularFileMetadata.isDirectory)
    assertEquals(null, regularFileMetadata.symlinkTarget)
    assertEquals(22L, regularFileMetadata.size)

    val directoryMetadata = fileSystem.metadata(directory)
    assertEquals(false, directoryMetadata.isRegularFile)
    assertEquals(true, directoryMetadata.isDirectory)
    assertEquals(null, directoryMetadata.symlinkTarget)
    // Note: no assertions about directory size.

    val symlinkMetadata = fileSystem.metadata(symlink)
    assertEquals(false, symlinkMetadata.isRegularFile)
    assertEquals(false, symlinkMetadata.isDirectory)
    assertEquals("regularFile".toPath(), symlinkMetadata.symlinkTarget)
    assertEquals("regularFile".length.toLong(), symlinkMetadata.size)
  }

  @Test
  fun absentMetadata() {
    assertEquals(null, fileSystem.metadataOrNull(base / "no-such-file"))
    assertFailsWith<FileNotFoundException> {
      fileSystem.metadata(base / "no-such-file")
    }
  }

  @Test
  fun fileHandleRead() {
    val path = base / "file.txt"
    fileSystem.write(path) {
      writeUtf8("this is a file about dogs and cats")
    }
    fileSystem.openReadOnly(path).use { handle ->
      val sink = Buffer()
      handle.read(21L, sink, 4L)

      assertEquals(
        "dogs",
        sink.readUtf8(),
      )
    }
  }

  @Test
  fun fileHandleWrite() {
    val path = base / "file.txt"
    fileSystem.write(path) {
      writeUtf8("this is a file about cats and cats")
    }
    fileSystem.openReadWrite(path).use { handle ->
      val source = Buffer().writeUtf8("dogs")
      handle.write(21L, source, 4L)

      assertEquals(
        "this is a file about dogs and cats",
        fileSystem.read(path) {
          readUtf8()
        },
      )
    }
  }

  @Test
  fun fileHandleGetSize() {
    val path = base / "file.txt"
    fileSystem.write(path) {
      writeUtf8("this is a file about dogs and cats")
    }
    fileSystem.openReadOnly(path).use { handle ->
      assertEquals(
        34L,
        handle.size(),
      )
    }
  }

  @Test
  fun fileHandleResize() {
    val path = base / "file.txt"
    fileSystem.write(path) {
      writeUtf8("this is a file about dogs and cats")
    }
    fileSystem.openReadWrite(path).use { handle ->
      handle.resize(25L)

      assertEquals(
        "this is a file about dogs",
        fileSystem.read(path) {
          readUtf8()
        },
      )
    }
  }

  @Test
  fun fileHandleFlush() {
    val path = base / "file.txt"
    fileSystem.openReadWrite(path).use { handle ->
      handle.sink().buffer().use {
        it.writeUtf8("hello")
      }
      handle.flush()

      assertEquals(
        "hello",
        fileSystem.read(path) {
          readUtf8()
        },
      )
    }
  }

  @Test
  fun fileSinkFlush() {
    val path = base / "file.txt"
    fileSystem.write(path) {
      writeUtf8("hello")
      flush()

      assertEquals(
        "hello",
        fileSystem.read(path) {
          readUtf8()
        },
      )
    }
  }
}
/*
 * Copyright (C) 2018 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the


  src: url(https://assets.propublica.org/prod/v3/fonts/Graphik-Bold-Web.woff2) format('woff2'),
  url(https://assets.propublica.org/prod/v3/fonts/Graphik-Bold-Web.woff) format('woff');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'Graphik';
  src: url(https://assets.propublica.org/prod/v3/fonts/Graphik-BoldItalic-Web.woff2) format('woff2'),
  url(https://assets.propublica.org/prod/v3/fonts/Graphik-BoldItalic-Web.woff) format('woff');
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: 'Graphik';
  src: url(https://assets.propublica.org/prod/v3/fonts/Graphik-BoldItalic-Web.woff2) format('woff2'),
  url(https://assets.propublica.org/prod/v3/fonts/Graphik-BoldItalic-Web.woff) format('woff');
  font-weight: bold;
  font-style: italic;
}

// ------------------------------------------------------------
// FONT STACKS
// ------------------------------------------------------------

$fonts-serif-initial: Georgia, Times, 'Times New Roman', serif;
$fonts-serif: 'Tiempos Text', serif;
$fonts-sans-initial: Arial, Verdana, sans-serif;
$fonts-sans: Graphik, sans-serif;
$fonts-monospace: monospace;

// ------------------------------------------------------------
// TYPOGRAPHIC SCALE
// ------------------------------------------------------------
// Dual-stranded Fibonacci series: 5+8=13, 8+13=21, 13+21=34, etc.
// 005   008   013   021   034   055   089   144   233   377   610   987
//    006   010   016   026   042   068   110   178   288   466   754

 $scale-1: 00.3125rem;  //    5
 $scale-2: 00.3750rem;  //    6
 $scale-3: 00.5000rem;  //    8
 $scale-4: 00.6250rem;  //   10
 $scale-5: 00.8125rem;  //   13
 $scale-6: 01.0000rem;  //   16
 $scale-7: 01.3125rem;  //   21
 $scale-8: 01.6250rem;  //   26
 $scale-9: 02.1250rem;  //   34
$scale-10: 02.6250rem;  //   42
$scale-11: 03.4375rem;  //   55
$scale-12: 04.2500rem;  //   68
$scale-13: 05.5625rem;  //   89
$scale-14: 06.8750rem;  //  110
$scale-15: 09.0000rem;  //  144
$scale-16: 11.1250rem;  //  178
$scale-17: 14.5625rem;  //  233
$scale-18: 18.0000rem;  //  288
$scale-19: 23.5625rem;  //  377
$scale-20: 29.1250rem;  //  466
$scale-21: 38.1250rem;  //  610
$scale-22: 47.1250rem;  //  754
$scale-23: 61.6875rem;  //  987
$scale-24: 76.2500rem;  // 1220

// ------------------------------------------------------------
// LINE-HEIGHT & LETTER-SPACING
// ------------------------------------------------------------

$line-height-taller:   1.7;
$line-height-base:     1.5;
$line-height-shorter:  1.3;
$line-height-shortest: 1.1;

$letter-spacing-more: 0.035em;
$letter-spacing-base: 0.025em;
$letter-spacing-less: 0.015em;

/*- BROWSER RESET --------------------------


namespace Raven.Server.Documents.Indexes.Persistence.Corax
{
    public sealed class CoraxHighlightingTermIndex
    {
        public static string[] DefaultPreTags = {
            "<b style=\"background:yellow\">", "<b style=\"background:lawngreen\">", "<b style=\"background:aquamarine\">",
            "<b style=\"background:magenta\">", "<b style=\"background:palegreen\">", "<b style=\"background:coral\">",
            "<b style=\"background:wheat\">", "<b style=\"background:khaki\">", "<b style=\"background:lime\">",
            "<b style=\"background:deepskyblue\">", "<b style=\"background:deeppink\">", "<b style=\"background:salmon\">",
            "<b style=\"background:peachpuff\">", "<b style=\"background:violet\">", "<b style=\"background:mediumpurple\">",
            "<b style=\"background:palegoldenrod\">", "<b style=\"background:darkkhaki\">", "<b style=\"background:springgreen\">",
            "<b style=\"background:


'../classOMF_1_1OMF86Format_1_1SymbolLineNumbersRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::SymbolLineNumbersRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1AliasDefinitionRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::AliasDefinitionRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1AliasDefinitionRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::AliasDefinitionRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1OMFVersionNumberRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::OMFVersionNumberRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1OMFVersionNumberRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::OMFVersionNumberRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1VendorExtensionRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::VendorExtensionRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1VendorExtensionRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::VendorExtensionRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1CommentRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::CommentRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1CommentRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::CommentRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1LibraryHeaderRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::LibraryHeaderRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1LibraryHeaderRecord.html#a880acdcc5957bfddac2e8762e20cbf00',1,'OMF::OMF86Format::LibraryHeaderRecord::ReadRecordContents(OMF86Format *omf, Linker::Reader &rd)=0'],['../classOMF_1_1OMF86Format_1_1LibraryEndRecord.html#a4ed5d08d591b1afea86573a4cf415867',1,'OMF::OMF86Format::LibraryEndRecord::ReadRecordContents(OMFFormat *omf, Linker::Reader &rd) override'],['../classOMF_1_1OMF86Format_1_1LibraryEndRecord.html#a880acdcc5957


 ok
}

testC(c.HttpRequest request) {
  request.certificate; // error
  request.response; // error
  request.readyState; // error
  request.hashCode; // ok
}

void main() {
  expect(false, const bool.fromEnvironment("dart.library.io"));
  expect(true, const bool.fromEnvironment("dart.library.html"));
  expect(false, const bool.fromEnvironment("dart.library.foo"));
}

expect(expected, actual) {
  if (expected != actual) throw 'Expected $expected, actual $actual';
}
// Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

String log = "";

T sideEffect<T>(T t) {
  log = "${log}:${t}";
  return t;
}

main() {
  log = "";
  var map1 = {sideEffect<String>("one"): ?sideEffect<String?>("two")};
  expectEquals(log, ":one:two");
  log = "";
  var map2 = {
    sideEffect<int>(0): sideEffect<int>(1),
    sideEffect<int>(2): ?sideEffect<int?>(3),
    ?sideEffect<int?>(4): sideEffect<int>(5),
    ?sideEffect<int?>(6): ?sideEffect<int?>(7),
  };
  expectEquals(log, ":0:1:2:3:4:5:6:7");
  log = "";
  var map3 = {
    sideEffect<int>(0): sideEffect<int>(1),
    sideEffect<int>(2): ?sideEffect<int?>(3),
    ?sideEffect<int?>(null): sideEffect<int>(5),
    ?sideEffect<int?>(null): ?sideEffect<int?>(7),
  };
  expectEquals(log, ":0:1:2:3:null:null");

  log = "";
  var list1 = [sideEffect<String>("one"), ?sideEffect<String?>("two")];
  expectEquals(log, ":one:two");
  log = "";
  var list2 = [
    sideEffect<int>(0), sideEffect<int>(1),
    sideEffect<int>(2), ?sideEffect<int?>(3),
    ?sideEffect<int?>(4), sideEffect<int>(5),
    ?sideEffect<int?>(6), ?sideEffect<int?>(7),
  ];
  expectEquals(log, ":0:1:2:3:4:5:6:7");
  log = "";
  var list3 = [
    sideEffect<int>(0), sideEffect<int>(1),
    sideEffect<int>(2), ?sideEffect<int?>(3),
    ?sideEffect<int?>(null), sideEffect<int>(5),
    ?sideEffect<int?>(null), ?sideEffect<int?>(7),
  ];
  expectEquals(log, ":0:1:2:3:null:5:null:7");

  log = "";
  var set1 = {sideEffect<String>("one"), ?sideEffect<String?>("two")};
  expectEquals(log, ":one:two");
  log = "";
  var set2 = {
    sideEffect<int>(0), sideEffect<int>(1),
    sideEffect<int>(2), ?sideEffect<int?>(3),
    ?sideEffect<int?>(4), sideEffect<int>(5),
    ?sideEffect<int?>(6), ?sideEffect<int?>(7),
  };
  expectEquals(log, ":0:1:2:3:4:5:6:7");
  log = "";
  var set3 = {
    sideEffect<int>(0), sideEffect<int>(1),
    sideEffect<int>(2), ?sideEffect<int?>(3),
    ?sideEffect<int?>(null), sideEffect<int>(5),
    ?sideEffect<int?>(null), ?sideEffect<int?>(7),
  };
  expectEquals(log, ":0:1:2:3:null:5:null:7");
}

expectEquals(x, y) {
  if (x != y) {
    throw "Expected the two given values to be equal: x=${x}, y=${y}.";
  }
}
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license tha


.add(withoutPrefix)
            continue
          }
          // do not keep reasoning in prompt, so we need to extract image description tags
          if (isImageDescription) {
            newLines.add(withoutPrefix)
            if (withoutPrefix == config.imageDescriptionStopTag) {
              isImageDescription = false
            }
          } else {
            if (withoutPrefix == config.imageDescriptionStartTag) {
              isImageDescription = true
              newLines.add(withoutPrefix)
            }
          }
        } else if (line == "</details>") {
          isReasoning = false
          if (isImageDescription) {
            Logger.warn(LogType.INVALID_EXTERNAL_DATA, "image description is not ended properly, but reasoning is stopped")
            isImageDescription = false
          }
          if (!config.keepReasoningInPrompt) {
            newLines.removeLast()
          }
        } else {
          Logger.warn(LogType.INVALID_EXTERNAL_DATA, "unexpected line for reasoning: should start with `> `, but got: $line")
        }
      } else {
        if (line.startsWith("<details type=\"reasoning\"")) {
          isReasoning = true
          modified = true
          newLines.removeLast()
          if (config.keepReasoningInPrompt) {
            newLines.add("<details type=\"reasoning\">")
          }
        }
      }
    }

    if (!modified) {
      return c
    }

    return newLines.joinToString("\n")
  }

  private fun removeLastImagePrompt(c: OpenAiApi.ChatCompletion) {
    val last = c.messages.last()
    if (last.role != Role.assistant) {
      removeImagePrompt(last)
    }
  }

  private fun removeImagePrompt(c: OpenAiApi.ChatCompletionMessage) {
    if (c.simpleContent != null) {
      c.simpleContent = removeImagePrompt(c.simpleContent)
    } else {
      for (cc in c.content) {
        if (cc.type == OpenAiApi.ChatCompletionContentType.text) {
          cc.text = removeImagePrompt(cc.text)
        }
      }
    }
  }

  private fun removeImagePrompt(msg: String): String {
    var c = msg
    val sb = StringBuilder()
    while (true) {
      var idx = c.indexOf(config.imagePromptStartTag)
      if (idx == -1) {
        sb.append(c)
        break
      }
      sb.append(c.substring(0, idx))
      c = c.substring(idx + config.imagePromptStartTag.length)
      idx = c.indexOf(config.imagePromptStopTag)
      if (idx == -1) {
        Logger.error(LogType.INVALID_EXTERNAL_DATA, "got only image prompt start tag, but no stop tag: $msg")
        break
      }
      c = c.substring(idx + config.imagePromptStopTag.length)
    }
    return sb.toString()
  }

  private fun convertRespTokens(ctx: RoutingContext, c: OpenAiApi.CompletionResponse, sendChunkIfEmpty: Boolean = false) {
    val info = ctx.get(ReqContext.KEY)!!
    if (info.id == null) {
      if (c.id != null) {
        info.id = c.id
      } else {
        // we may not be able to wait for the id to generate
        info.id = UUID.randomUUID().toString()
      }
    }

    val backupIsRoleSent = info.isRoleSent

    c.id = info.id
    c.model = config.name
    c.created = System.currentTimeMillis() / 1000
    if (info.isStream) {
      c.`object` = "chat.completion.chunk"
    } else {
      c.`object` = "chat.completion"
    }
    for (ch in c.choices) {
      val msg = if (ch.message == null) ch.delta else ch


Member, "toLowerCase", token.Position{4, 43}},
				{token.Member, "includes", token.Position{4, 57}},
			},
			Literals: []parsedLiteral[any]{
				{
					Type:     "Regexp",
					GoType:   "string",
					Value:    "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",
					RawValue: "/(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/",
					InArray:  false,
					Pos:      token.Position{3, 15},
				},
				{"String", "string", "localhost", "'localhost'", false, token.Position{4, 66}},
			},
		},
		printJSON: true,
	},
	{
		name: "test big integers",
		inputJS: `
let a = 123456789123456789n;     // 123456789123456789
let b = 0o777777777777n;         // 68719476735
let c = 0x123456789ABCDEFn;      // 81985529216486895
let d = 0b11101001010101010101n; // 955733
`,
		want: singleParseData{
			ValidInput: true,
			Identifiers: []parsedIdentifier{
				{token.Variable, "a", token.Position{2, 4}},
				{token.Variable, "b", token.Position{3, 4}},
				{token.Variable, "c", token.Position{4, 4}},
				{token.Variable, "d", token.Position{5, 4}},
			},
			Literals: []parsedLiteral[any]{
				{"Numeric", "big.Int", big.NewInt(123456789123456789), "123456789123456789n", false, token.Position{2, 8}},
				{"Numeric", "big.Int", big.NewInt(68719476735), "0o777777777777n", false, token.Position{3, 8}},
				{"Numeric", "big.Int", big.NewInt(81985529216486895), "0x123456789ABCDEFn", false, token.Position{4, 8}},
				{"Numeric", "big.Int", big.NewInt(955733), "0b11101001010101010101n", false, token.Position{5, 8}},
			},
		},
		printJSON: false,
	},
	{
		name: "test syntax error",
		inputJS: `
a = w w;
`,
		want: singleParseData{
			ValidInput:  false,
			Identifiers: []parsedIdentifier{},
			Errors: []parserStatus{
				{
					"Error", "SyntaxError", "BABEL_PARSER_SYNTAX_ERROR: MissingSemicolon", token.Position{2, 5},
				},
				{
					"Error", "SyntaxError", "FATAL SYNTAX ERROR (unable to parse remainder of file)", token.Position{2, 5},
				},
			},
		},
		printJSON: false,
	},
	{
		name: "more string templates",
		inputJS: "console.log(`the operation ${1} \\u2297 ${2} equals ${5}`);\n" +
			"console.log(`\\u{54}\\u0065\\x78t`);",
		want: singleParseData{
			ValidInput: true,
			Identifiers: []parsedIdentifier{
				{token.Member, "log", token.Position{1, 8}},
				{token.Member, "log", token.Position{2, 8


(multistep.BasicStateBag)
	state.Put("ui", ui)

	genData := packerbuilderdata.GeneratedData{State: state}

	tc := []struct {
		name                  string
		step                  *StepGetSourceImageName
		expected              string
		mockedGalleryReturn   *galleryimageversions.GalleryImageVersion
		expectedImageId       galleryimageversions.ImageVersionId
		SourceImageResourceID string
		GeneratedData         packerbuilderdata.GeneratedData
	}{
		{
			name:                  "SharedImageWithManagedImageSource",
			SourceImageResourceID: "/subscriptions/1234/resourceGroups/bar/providers/Microsoft.Compute/galleries/test/images/foo/versions/1.0.6",
			GeneratedData:         genData,
			mockedGalleryReturn: &galleryimageversions.GalleryImageVersion{
				Properties: &galleryimageversions.GalleryImageVersionProperties{
					StorageProfile: galleryimageversions.GalleryImageVersionStorageProfile{
						Source: &galleryimageversions.GalleryArtifactVersionFullSource{
							Id: common.StringPtr("/subscription/resource/managed/image/name/as/source"),
						},
					},
				},
			},
			expectedImageId: galleryimageversions.ImageVersionId{
				SubscriptionId:    "1234",
				ResourceGroupName: "bar",
				GalleryName:       "test",
				ImageName:         "foo",
				VersionName:       "1.0.6",
			},
			expected: "/subscription/resource/managed/image/name/as/source",
		},
		{
			name:                  "SimulatedBadImageResponse",
			SourceImageResourceID: "/subscriptions/1234/resourceGroups/bar/providers/Microsoft.Compute/galleries/test/images/foo/versions/0.0.0",
			GeneratedData:         genData,
			expected:              "ERR_SOURCE_IMAGE_NAME_NOT_FOUND",
		},
	}
	for _, tt := range tc {
		tt := tt
		t.Run(tt.name, func(t *testing.T) {

			var actualID galleryimageversions.ImageVersionId
			step := StepGetSourceImageName{
				SourceImageResourceID: tt.SourceImageResourceID,
				GeneratedData:         &tt.GeneratedData,
				get: func(ctx context.Context, azcli client.AzureClientSet, id galleryimageversions.ImageVersionId) (*galleryimageversions.GalleryImageVersion, error) {
					actualID = id
					if tt.mockedGalleryReturn == nil {
						return nil, fmt.Errorf("Generic error")
					}
					return tt.mockedGalleryReturn, nil
				},
			}
			state.Put("azureclient", &client.AzureClientSetMock{
				SubscriptionIDMock: "1234",
			})
			step.Run(context.TODO(), state)
			got := state.Get("generated_data").(map[string]interface{})
			v, ok := got["SourceImageName"]
			if !ok {
				t.Errorf("expected SourceImageName to be set in generatedData")
			}

			if v != tt.expected {
				t.Errorf("expected SourceImageName to be set to %q but got %q", tt.expected, v)
			}

			if tt.mockedGalleryReturn != nil {
				if actualID != tt.expectedImageId {
					t.Errorf("expected %s but got %s Gallery Image Version ID passed into client", tt.expectedImageId, actualID)
				}
			}
		})
	}
}
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package chroot

import (
	"context"
	"testing"
	"time"

	"github.com/hashicorp/packer-plugin-azure/builder/azure/common/client"
	"github.com/hashicorp/packer-plugin-


#if defined(LEAN_JSON)
        lean::initialize_server();
#endif
    }
    ~initializer() {
#if defined(LEAN_JSON)
        lean::finalize_server();
#endif
    }
};

class progress_message_stream {
    mutex m_mutex;
    bool m_showing_task = false;
    std::ostream & m_out;
    bool m_use_json;
    log_tree::node m_lt;

    bool m_show_progress;
    std::unique_ptr<single_timer> m_timer;
    std::string m_last_task;

    void clear_shown_task() {
        if (m_showing_task) {
            m_out << "\33[2K\r";
            m_showing_task = false;
        }
    }

public:
    progress_message_stream(std::ostream & out, bool use_json, bool show_progress, log_tree::node const & lt) :
            m_out(out), m_use_json(use_json), m_lt(lt), m_show_progress(show_progress) {
#if defined(LEAN_MULTI_THREAD)
        if (show_progress) {
            m_timer.reset(new single_timer);
        }
#endif
    }

    ~progress_message_stream() {
        m_timer.reset();
        clear_shown_task();
    }

    void on_event(std::vector<log_tree::event> const & events) {
        bool refresh_task = false;
        for (auto & e : events) {
            switch (e.m_kind) {
                case log_tree::event::EntryAdded:
                    if (auto msg = dynamic_cast<message const *>(e.m_entry.get())) {
                        unique_lock<mutex> lock(m_mutex);
                        clear_shown_task();
                        if (m_use_json) {
#if defined(LEAN_JSON)
                            print_json(m_out, *msg);
#endif
                        } else {
                            m_out << *msg;
                        }
                    }
                    break;
                case log_tree::event::EntryRemoved: break;
                case log_tree::event::ProducerSet:
                    taskq().submit(e.m_node.get_producer());
                    break;
                case log_tree::event::StateChanged:
                    refresh_task = true;
                    break;
            }
        }
        if (m_show_progress && refresh_task) {
#if defined(LEAN_MULTI_THREAD)
            lean_assert(m_timer);
            m_timer->set(chrono::steady_clock::now() + chrono::milliseconds(100),
                [=] { show_current_task(); }, false);
#else
            show_current_task_core();
#endif
        }
    }

    optional<std::string> find_current_task() {
        optional<std::string> found_running;
        m_lt.for_each([&] (log_tree::node const & lt) {
            if (!found_running) {
                if (lt.get_state() == log_tree::state::Running) {
                    std::ostringstream fmt;
                    fmt << lt.get_location().m_file_name << ": " << lt.get_description();
                    found_running = fmt.str();
                }
            }
            return !found_running;
        });
        return found_running;
    }

    void show_current_task() {
        unique_lock<mutex> lock(m_mutex);
        show_current_task_core();
    }
    void show_current_task_core() {
        if (m_use_json) return;
        if (auto desc = find_current_task()) {
            if (*desc == m_last_task && m_showing_task) return;
            m_last_task = *desc;
            clear_shown_task();
#if defined(LEAN_EMSCRIPTEN)
            m_out << *desc << std: