Add Wizardry spell scripts and TLK entries

This commit is contained in:
altpersona 2025-04-26 15:20:45 -04:00
parent 8156e17759
commit ee7bcb4271
1033 changed files with 188165 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# Spell Creation Guidelines for WizardryEE
## 1. File Structure and Metadata
- Uniform comment block at the top (Spell Name, Filename, Copyright, Creation/Modification Dates)
- Include necessary `prc_` header files (e.g., `prc_inc_spells`)
## 2. Spell Logic and Effects
- **Damage Spells**:
- Complex damage calculations with metamagic support
- Example: `nw_s0_icestorm.nss`
- **Buff/Debuff Spells**:
- Temporary skill/attribute modifications
- Example: `nw_s0_identify.nss`
- **Aura/Permanent Effects**:
- AOE implementations with disable/re-enable support
- Example: `nw_s1_aurablind.nss`
## 3. Essential Functions and Variables
- `PRCGetCasterLevel(OBJECT_SELF)`
- `SetLocalInt`/`DeleteLocalInt` for `X2_L_LAST_SPELLSCHOOL_VAR`
- `EffectVisualEffect`, `PRCEffectDamage`, `EffectLinkEffects`
## 4. Customization Tips
- Review `/Notes/spells` for examples
- Test metamagic interactions
- Ensure spell school consistency
## 5. Future Spell Customization Template
```nss
// TO DO: Customize Based on Guidelines Above
// ...

72
Content/spells/badi.nss Normal file
View File

@ -0,0 +1,72 @@
//::///////////////////////////////////////////////
//:: Badi (Death)
//:: badi.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to kill a monster.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest attack spell that targets
one monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Attempt instant death on a monster
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate save DC based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 5; // Minimum level 5 for this spell
int nDC = 10 + nCasterLevel;
// 5. Create the death effect
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(45); // Death visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 24)); // Death spell ID
// Allow saving throw to resist
if (!FortitudeSave(oTarget, nDC, 3)) // 3 = Death saving throw type
{
// Apply the visual and death effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
// Notify success
FloatingTextStringOnCreature("BADI: " + GetName(oTarget) + " is killed!", oCaster, TRUE);
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oTarget) + " resisted death!", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("BADI: No valid target found", oCaster, TRUE);
}
}

61
Content/spells/badial.nss Normal file
View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Badial (More Hurt)
//:: badial.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 2d8 (2-16) points of damage to a monster.
Level 4 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Priest attack spell that targets
one monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 2d8 damage to a monster
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate damage
int nDamage = d8(2); // 2d8 damage
// 5. Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
effect eVis = EffectVisualEffect(40); // Negative energy visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 25)); // Inflict Moderate Wounds spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("BADIAL: Dealt " + IntToString(nDamage) + " damage to " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("BADIAL: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Badialma (Great Hurt)
//:: badialma.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 3d8 (3-24) points of damage to a monster.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest attack spell that targets
one monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 3d8 damage to a monster
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate damage
int nDamage = d8(3); // 3d8 damage
// 5. Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
effect eVis = EffectVisualEffect(40); // Negative energy visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 26)); // Inflict Serious Wounds spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("BADIALMA: Dealt " + IntToString(nDamage) + " damage to " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("BADIALMA: No valid target found", oCaster, TRUE);
}
}

83
Content/spells/badios.nss Normal file
View File

@ -0,0 +1,83 @@
//::///////////////////////////////////////////////
//:: Badios (Harm)
//:: badios.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 1d8 (1-8) points of damage to a monster.
Level 1 Priest spell.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables
object oCaster = OBJECT_SELF;
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
int nMetaMagic = PRCGetMetaMagicFeat();
int nDamage;
float fDelay;
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eDam;
//Get the spell target
object oTarget = PRCGetSpellTargetObject();
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM));
//Make SR check
if (!PRCDoResistSpell(OBJECT_SELF, oTarget, CasterLvl))
{
//Roll damage
nDamage = d8(1);
//Resolve metamagic
if (nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDamage = 8;
}
if (nMetaMagic & METAMAGIC_EMPOWER)
{
nDamage = nDamage + (nDamage / 2);
}
//Set the damage effect
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE);
//Apply the VFX impact and damage effect
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
PRCBonusDamage(oTarget);
}
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

56
Content/spells/bamatu.nss Normal file
View File

@ -0,0 +1,56 @@
//::///////////////////////////////////////////////
//:: Bamatu (Prayer)
//:: bamatu.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of all party members by 4
for the duration of the combat.
Level 3 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Priest support spell that targets
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce AC of all party members by 4
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 3; // Minimum level 3 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(4); // Reduce AC by 4 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Generic blessing visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 4. Apply to all party members
object oTarget = GetFirstPC();
while (GetIsObjectValid(oTarget))
{
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 69, FALSE)); // Prayer spell ID
// Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
// Notify the target
FloatingTextStringOnCreature("Prayer: AC reduced by 4", oTarget, TRUE);
// Get next party member
oTarget = GetNextPC();
}
}

91
Content/spells/calfo.nss Normal file
View File

@ -0,0 +1,91 @@
//::///////////////////////////////////////////////
//:: Calfo (X-ray Vision)
//:: calfo.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Determines the type of trap on a chest with 95% accuracy.
Level 2 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Priest field spell that targets
the caster, allowing them to identify traps.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Identify traps on chests
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = TurnsToSeconds(nCasterLevel); // Lasts for turns equal to caster level
// 3. Create the trap detection effect
effect eVis = EffectVisualEffect(VFX_IMP_MAGICAL_VISION);
effect eDur = EffectVisualEffect(VFX_DUR_MAGICAL_SIGHT);
// 4. Apply to the caster
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oCaster, fDuration);
// 5. Identify traps in the area
object oArea = GetArea(oCaster);
object oChest = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oChest))
{
// If the object is a chest/container
if (GetObjectType(oChest) == OBJECT_TYPE_PLACEABLE &&
GetStringLeft(GetResRef(oChest), 5) == "chest")
{
// Check if it's trapped
if (GetTrapDetectedBy(oChest, oCaster) || GetIsTrapped(oChest))
{
// 95% chance to correctly identify
if (Random(100) < 95)
{
// Determine trap type based on local variables or tags
string sTrapName = "Unknown Trap";
// Example trap detection logic - would be customized for actual implementation
if (GetLocalInt(oChest, "TRAP_POISON") == 1)
sTrapName = "Poison Needle";
else if (GetLocalInt(oChest, "TRAP_FIRE") == 1)
sTrapName = "Fire Trap";
else if (GetLocalInt(oChest, "TRAP_ACID") == 1)
sTrapName = "Acid Trap";
else if (GetLocalInt(oChest, "TRAP_SHOCK") == 1)
sTrapName = "Shock Trap";
else if (GetLocalInt(oChest, "TRAP_GAS") == 1)
sTrapName = "Gas Trap";
else if (GetLocalInt(oChest, "TRAP_EXPLOSIVE") == 1)
sTrapName = "Explosive Runes";
else if (GetLocalInt(oChest, "TRAP_ALARM") == 1)
sTrapName = "Alarm";
// Notify the caster
FloatingTextStringOnCreature("Trap Detected: " + sTrapName, oCaster, TRUE);
// Mark as detected
SetTrapDetectedBy(oChest, oCaster);
}
else
{
// 5% chance to misidentify
FloatingTextStringOnCreature("Trap Detection Failed", oCaster, TRUE);
}
}
}
oChest = GetNextObjectInArea(oArea);
}
}

94
Content/spells/dalto.nss Normal file
View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Dalto (Blizzard)
//:: dalto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 6d6 (6-36) points of cold damage to a
monster group.
Level 4 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Mage attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 6d6 cold damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the blizzard visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eBlizzard = EffectVisualEffect(35); // Ice/Cold burst visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBlizzard, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d6(6); // 6d6 cold damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_COLD);
effect eVis = EffectVisualEffect(35); // Ice/Cold visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 36)); // Cone of Cold spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("DALTO: " + IntToString(nDamage) + " cold damage to " + GetName(oMember), oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("DALTO: Hit " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("DALTO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("DALTO: No valid target found", oCaster, TRUE);
}
}

91
Content/spells/di.nss Normal file
View File

@ -0,0 +1,91 @@
//::///////////////////////////////////////////////
//:: Di (Life)
//:: di.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to resurrect a dead party member.
If successful, the dead character is revived with
only 1 hit point and decreased Vitality.
If failed, the dead character is turned to ashes.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest healing/field spell that
targets one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Attempt to resurrect a dead character
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// Notify if no target selected
FloatingTextStringOnCreature("DI: No target selected", oCaster, TRUE);
return;
}
// 3. Check if target is dead
int bIsDead = GetLocalInt(oTarget, "CONDITION_DEAD");
int bIsAshes = GetLocalInt(oTarget, "CONDITION_ASHES");
if (!bIsDead || bIsAshes)
{
// Notify if target is not dead or is already ashes
FloatingTextStringOnCreature("DI: Target must be dead but not ashes", oCaster, TRUE);
return;
}
// 4. Calculate resurrection chance based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 5; // Minimum level 5 for this spell
int nChance = 50 + (nCasterLevel * 5); // Base 50% + 5% per level
// 5. Create the resurrection effects
effect eVis = EffectVisualEffect(14); // Resurrection visual effect
effect eHeal = EffectHeal(1); // Heal 1 HP
// 6. Attempt resurrection
if (Random(100) < nChance)
{
// Success
// Remove dead condition
DeleteLocalInt(oTarget, "CONDITION_DEAD");
// Apply resurrection effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
// Decrease Vitality
int nVitality = GetLocalInt(oTarget, "STAT_VITALITY");
SetLocalInt(oTarget, "STAT_VITALITY", nVitality - 1);
// Notify success
FloatingTextStringOnCreature("DI: " + GetName(oTarget) + " has been resurrected!", oCaster, TRUE);
FloatingTextStringOnCreature("Vitality decreased by 1", oTarget, TRUE);
}
else
{
// Failure - Turn to ashes
DeleteLocalInt(oTarget, "CONDITION_DEAD");
SetLocalInt(oTarget, "CONDITION_ASHES", 1);
// Apply visual effect for failure
effect eFailVis = EffectVisualEffect(45); // Death/Decay visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eFailVis, oTarget);
// Notify failure
FloatingTextStringOnCreature("DI: " + GetName(oTarget) + " has been turned to ashes!", oCaster, TRUE);
}
}

61
Content/spells/dial.nss Normal file
View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Dial (More Heal)
//:: dial.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Restores 2d8 (2-16) hit points to a party member.
Level 4 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Priest healing spell that targets
one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Heal 2d8 hit points
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, target self
oTarget = oCaster;
}
// 3. Check if target is valid and is a party member
if (GetIsObjectValid(oTarget) && !GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate healing
int nHeal = d8(2); // 2d8 healing
// 5. Create the healing effect
effect eHeal = EffectHeal(nHeal);
effect eVis = EffectVisualEffect(14); // Healing visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 15, FALSE)); // Cure Moderate Wounds spell ID
// Apply the visual and healing effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("DIAL: Healed " + IntToString(nHeal) + " hit points for " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("DIAL: No valid target found", oCaster, TRUE);
}
}

76
Content/spells/dialko.nss Normal file
View File

@ -0,0 +1,76 @@
//::///////////////////////////////////////////////
//:: Dialko (Softness)
//:: dialko.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Cures paralysis and sleep for a party member.
Level 3 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Priest healing spell that targets
one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Cure paralysis and sleep
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, target self
oTarget = oCaster;
}
// 3. Create the visual effect
effect eVis = EffectVisualEffect(14); // Healing visual effect
// 4. Apply to the target
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 88, FALSE)); // Remove Paralysis spell ID
// Check if target has the paralysis or sleep condition flags
int bParalyzed = GetLocalInt(oTarget, "CONDITION_PARALYZED");
int bSleeping = GetLocalInt(oTarget, "CONDITION_SLEEPING");
if (bParalyzed || bSleeping)
{
// Remove the condition flags
if (bParalyzed)
{
DeleteLocalInt(oTarget, "CONDITION_PARALYZED");
// Apply counter-effect to remove paralysis
// This would be implemented in the game engine
SetLocalInt(oTarget, "REMOVE_PARALYSIS", 1);
}
if (bSleeping)
{
DeleteLocalInt(oTarget, "CONDITION_SLEEPING");
// Apply counter-effect to remove sleep
// This would be implemented in the game engine
SetLocalInt(oTarget, "REMOVE_SLEEP", 1);
}
// Apply the visual healing effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
// Notify success
FloatingTextStringOnCreature(GetName(oTarget) + " is cured of paralysis and sleep!", oCaster, TRUE);
}
else
{
// Notify that target is not affected
FloatingTextStringOnCreature(GetName(oTarget) + " is not affected by paralysis or sleep.", oCaster, TRUE);
}
}

61
Content/spells/dialma.nss Normal file
View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Dialma (Great Heal)
//:: dialma.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Restores 3d8 (3-24) hit points to a party member.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest healing spell that targets
one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Heal 3d8 hit points
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, target self
oTarget = oCaster;
}
// 3. Check if target is valid and is a party member
if (GetIsObjectValid(oTarget) && !GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate healing
int nHeal = d8(3); // 3d8 healing
// 5. Create the healing effect
effect eHeal = EffectHeal(nHeal);
effect eVis = EffectVisualEffect(14); // Healing visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 16, FALSE)); // Cure Serious Wounds spell ID
// Apply the visual and healing effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("DIALMA: Healed " + IntToString(nHeal) + " hit points for " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("DIALMA: No valid target found", oCaster, TRUE);
}
}

98
Content/spells/dilto.nss Normal file
View File

@ -0,0 +1,98 @@
//::///////////////////////////////////////////////
//:: Dilto (Darkness)
//:: dilto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Increases the armor class of a monster group by 2
for the duration of the combat.
Level 2 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Mage disable spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Increase monster group's AC by 2
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = RoundsToSeconds(nCasterLevel);
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create darkness visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eDarkVis = EffectVisualEffect(37); // Darkness visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eDarkVis, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Create the AC increase effect
effect eAC = EffectACIncrease(2); // Increase AC by 2 (higher AC is worse)
effect eVis = EffectVisualEffect(36); // Darkness impact visual effect
effect eDur = EffectVisualEffect(15); // Negative duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 34)); // Darkness spell ID
// Apply the effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, fDuration);
// Notify effect
FloatingTextStringOnCreature(GetName(oMember) + "'s AC increased by 2!", oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("DILTO: Affected " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("DILTO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("DILTO: No valid target found", oCaster, TRUE);
}
}

78
Content/spells/dios.nss Normal file
View File

@ -0,0 +1,78 @@
//::///////////////////////////////////////////////
//:: Dios (Heal)
//:: dios.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Restores 1d8 (1-8) hit points to a party member.
Level 1 Priest spell.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables
object oCaster = OBJECT_SELF;
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
int nMetaMagic = PRCGetMetaMagicFeat();
int nHeal;
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_S);
effect eHeal;
//Get the spell target
object oTarget = PRCGetSpellTargetObject();
//Verify the target is a friendly creature
if (spellsIsTarget(oTarget, SPELL_TARGET_ALLALLIES, OBJECT_SELF))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CURE_LIGHT_WOUNDS, FALSE));
//Roll healing
nHeal = d8(1);
//Resolve metamagic
if (nMetaMagic & METAMAGIC_MAXIMIZE)
{
nHeal = 8;
}
if (nMetaMagic & METAMAGIC_EMPOWER)
{
nHeal = nHeal + (nHeal / 2);
}
//Set the healing effect
eHeal = EffectHeal(nHeal);
//Apply the VFX impact and healing effect
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

View File

@ -0,0 +1,67 @@
//::///////////////////////////////////////////////
//:: Dumapic (Clarity)
//:: dumapic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Identifies the location of the party in the dungeon.
Level 1 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Mage field spell that helps
with dungeon navigation.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Show party location
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Create the divination effect
effect eVis = EffectVisualEffect(14); // Divination visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
// 3. Get current dungeon information
object oArea = GetArea(oCaster);
int nLevel = GetLocalInt(oArea, "DUNGEON_LEVEL");
vector vPos = GetPosition(oCaster);
// Convert position to grid coordinates (assuming 10-foot squares)
int nGridX = FloatToInt(vPos.x / 10.0);
int nGridY = FloatToInt(vPos.y / 10.0);
// Get facing direction
float fFacing = GetFacing(oCaster);
string sFacing = "";
// Convert facing angle to cardinal direction
if (fFacing >= 315.0 || fFacing < 45.0) sFacing = "North";
else if (fFacing >= 45.0 && fFacing < 135.0) sFacing = "East";
else if (fFacing >= 135.0 && fFacing < 225.0) sFacing = "South";
else sFacing = "West";
// 4. Build location description
string sLocation = "Location:\n";
sLocation += "Level: " + IntToString(nLevel) + "\n";
sLocation += "Position: " + IntToString(nGridX) + " East, " +
IntToString(nGridY) + " North\n";
sLocation += "Facing: " + sFacing;
// 5. Check for special areas
if (GetLocalInt(oArea, "IS_DARKNESS_ZONE"))
sLocation += "\nIn Darkness Zone";
if (GetLocalInt(oArea, "IS_ANTIMAGIC_ZONE"))
sLocation += "\nIn Anti-Magic Zone";
if (GetLocalInt(oArea, "IS_TRAP_ZONE"))
sLocation += "\nDanger: Trap Zone";
// 6. Display the location information
FloatingTextStringOnCreature(sLocation, oCaster, FALSE);
}

61
Content/spells/halito.nss Normal file
View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Halito (Little Fire)
//:: halito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 1d8 (1-8) points of fire damage to a monster.
Level 1 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Mage attack spell that targets
one monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 1d8 fire damage
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate damage
int nDamage = d8(1); // 1d8 fire damage
// 5. Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
effect eVis = EffectVisualEffect(44); // Fire visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 31)); // Burning Hands spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("HALITO: " + IntToString(nDamage) + " fire damage to " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("HALITO: No valid target found", oCaster, TRUE);
}
}

146
Content/spells/haman.nss Normal file
View File

@ -0,0 +1,146 @@
//::///////////////////////////////////////////////
//:: Haman (Change)
//:: haman.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Has random effects and drains the caster one
experience level.
Level 6 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Mage support/disable spell with
random effects. Requires caster level 13+.
Possible effects:
- Augmented magic: party spells cause more damage
- Cure party: cures all conditions
- Heal party: MADI on all members
- Silence enemies: all monsters silenced
- Teleport enemies: monsters teleported away
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Random effects with level drain
// 1. Get caster information
object oCaster = OBJECT_SELF;
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
// Declare variables used in switch cases
object oMember;
object oArea;
object oTarget;
effect eHeal;
effect eSilence;
effect eTeleport;
// 2. Check minimum level requirement
if (nCasterLevel < 13)
{
FloatingTextStringOnCreature("HAMAN requires level 13+ to cast!", oCaster, TRUE);
return;
}
// 3. Apply level drain to caster
effect eDrain = EffectNegativeLevel(1);
effect eVis = EffectVisualEffect(47); // Negative energy visual effect
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oCaster);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
// 4. Roll for random effect
int nEffect = Random(5); // 0-4 for five possible effects
// 5. Apply the random effect
switch(nEffect)
{
case 0: // Augmented magic
{
SetLocalInt(oCaster, "SPELL_DAMAGE_BONUS", 2);
FloatingTextStringOnCreature("HAMAN: Party spells enhanced!", oCaster, TRUE);
break;
}
case 1: // Cure party
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Remove negative conditions
DeleteLocalInt(oMember, "CONDITION_PARALYZED");
DeleteLocalInt(oMember, "CONDITION_POISONED");
DeleteLocalInt(oMember, "CONDITION_SLEEPING");
DeleteLocalInt(oMember, "CONDITION_SILENCED");
DeleteLocalInt(oMember, "CONDITION_FEARED");
// Visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(14), oMember);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("HAMAN: Party conditions cured!", oCaster, TRUE);
break;
}
case 2: // Heal party
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Full heal
eHeal = EffectHeal(GetMaxHitPoints(oMember));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(14), oMember);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("HAMAN: Party fully healed!", oCaster, TRUE);
break;
}
case 3: // Silence enemies
{
oArea = GetArea(oCaster);
oTarget = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oTarget))
{
if (GetIsEnemy(oTarget, oCaster))
{
eSilence = EffectSilence();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSilence, oTarget);
SetLocalInt(oTarget, "CONDITION_SILENCED", 1);
}
oTarget = GetNextObjectInArea(oArea);
}
FloatingTextStringOnCreature("HAMAN: All enemies silenced!", oCaster, TRUE);
break;
}
case 4: // Teleport enemies
{
oArea = GetArea(oCaster);
oTarget = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oTarget))
{
if (GetIsEnemy(oTarget, oCaster))
{
eTeleport = EffectVisualEffect(46); // Teleport visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oTarget);
SetLocalInt(oTarget, "TELEPORTED_AWAY", 1);
}
oTarget = GetNextObjectInArea(oArea);
}
FloatingTextStringOnCreature("HAMAN: All enemies teleported away!", oCaster, TRUE);
break;
}
}
// Notify level drain
FloatingTextStringOnCreature("Lost one experience level!", oCaster, TRUE);
}

102
Content/spells/kadorto.nss Normal file
View File

@ -0,0 +1,102 @@
//::///////////////////////////////////////////////
//:: Kadorto (Resurrection)
//:: kadorto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to resurrect a dead party member, even if
they've been turned to ashes. If successful, they
are revived with all hit points. If failed, they
are permanently lost.
Level 7 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 7 Priest healing/field spell that
targets one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Attempt to resurrect a dead character
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// Notify if no target selected
FloatingTextStringOnCreature("KADORTO: No target selected", oCaster, TRUE);
return;
}
// 3. Check if target is dead or ashes
int bIsDead = GetLocalInt(oTarget, "CONDITION_DEAD");
int bIsAshes = GetLocalInt(oTarget, "CONDITION_ASHES");
if (!bIsDead && !bIsAshes)
{
// Notify if target is not dead
FloatingTextStringOnCreature("KADORTO: Target must be dead or ashes", oCaster, TRUE);
return;
}
// 4. Calculate resurrection chance based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 7; // Minimum level 7 for this spell
int nChance = 60 + (nCasterLevel * 5); // Base 60% + 5% per level
// Reduce chance if target is ashes
if (bIsAshes)
{
nChance -= 20; // 20% penalty for ashes
}
// 5. Create the resurrection effects
effect eVis = EffectVisualEffect(14); // Resurrection visual effect
effect eHeal = EffectHeal(GetMaxHitPoints(oTarget)); // Full heal
// 6. Attempt resurrection
if (Random(100) < nChance)
{
// Success
// Remove dead/ashes condition
DeleteLocalInt(oTarget, "CONDITION_DEAD");
DeleteLocalInt(oTarget, "CONDITION_ASHES");
// Remove all negative conditions
DeleteLocalInt(oTarget, "CONDITION_PARALYZED");
DeleteLocalInt(oTarget, "CONDITION_POISONED");
DeleteLocalInt(oTarget, "CONDITION_SLEEPING");
DeleteLocalInt(oTarget, "CONDITION_SILENCED");
DeleteLocalInt(oTarget, "CONDITION_BLINDED");
DeleteLocalInt(oTarget, "CONDITION_CONFUSED");
DeleteLocalInt(oTarget, "CONDITION_DISEASED");
// Apply resurrection effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
// Notify success
FloatingTextStringOnCreature("KADORTO: " + GetName(oTarget) + " has been resurrected!", oCaster, TRUE);
}
else
{
// Failure - Character is permanently lost
// Apply visual effect for failure
effect eFailVis = EffectVisualEffect(45); // Death/Decay visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eFailVis, oTarget);
// Mark as permanently lost
SetLocalInt(oTarget, "PERMANENTLY_LOST", 1);
// Notify failure
FloatingTextStringOnCreature("KADORTO: " + GetName(oTarget) + " has been permanently lost!", oCaster, TRUE);
}
}

50
Content/spells/kalki.nss Normal file
View File

@ -0,0 +1,50 @@
//::///////////////////////////////////////////////
//:: Kalki (Blessings)
//:: kalki.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of all party members by 1
for the duration of the combat.
Level 1 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Priest support spell that targets
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce AC of all party members by 1
// 1. Get all party members
object oCaster = OBJECT_SELF;
object oTarget = GetFirstPC();
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 1;
float fDuration = RoundsToSeconds(nCasterLevel);
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(1); // Reduce AC by 1 (lower AC is better)
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
// 4. Apply to all party members
while (GetIsObjectValid(oTarget))
{
// Apply visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
// Apply AC reduction for the duration
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, fDuration);
// Get next party member
oTarget = GetNextPC();
}
}

94
Content/spells/kandi.nss Normal file
View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Kandi (Locate Soul)
//:: kandi.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Identifies the location of missing/dead party members
in the dungeon.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest field spell that helps
locate lost party members.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Locate missing/dead party members
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Create the divination effect
effect eVis = EffectVisualEffect(14); // Divination visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
// 3. Get current dungeon level and coordinates
int nCurrentLevel = GetLocalInt(GetArea(oCaster), "DUNGEON_LEVEL");
vector vCurrentPos = GetPosition(oCaster);
// 4. Search for missing party members
object oMember = GetFirstPC();
int nFound = 0;
while (GetIsObjectValid(oMember))
{
// Check if member is dead or missing
if (GetLocalInt(oMember, "CONDITION_DEAD") == 1 ||
GetLocalInt(oMember, "CONDITION_ASHES") == 1 ||
GetLocalInt(oMember, "CONDITION_MISSING") == 1)
{
nFound++;
// Get member's last known location
int nMemberLevel = GetLocalInt(oMember, "LAST_KNOWN_LEVEL");
vector vMemberPos = Vector(
GetLocalFloat(oMember, "LAST_KNOWN_X"),
GetLocalFloat(oMember, "LAST_KNOWN_Y"),
GetLocalFloat(oMember, "LAST_KNOWN_Z")
);
// Calculate relative direction and distance
float fDist = GetDistanceBetweenLocations(
Location(GetArea(oCaster), vCurrentPos, 0.0),
Location(GetArea(oCaster), vMemberPos, 0.0)
);
string sDirection = "";
if (vMemberPos.x > vCurrentPos.x) sDirection += "east";
else if (vMemberPos.x < vCurrentPos.x) sDirection += "west";
if (vMemberPos.y > vCurrentPos.y) sDirection += "north";
else if (vMemberPos.y < vCurrentPos.y) sDirection += "south";
// Build location description
string sStatus = GetLocalInt(oMember, "CONDITION_DEAD") == 1 ? "dead" :
GetLocalInt(oMember, "CONDITION_ASHES") == 1 ? "ashes" : "missing";
string sLocation = GetName(oMember) + " (" + sStatus + ") is ";
if (nMemberLevel != nCurrentLevel)
{
sLocation += IntToString(abs(nMemberLevel - nCurrentLevel)) + " level";
sLocation += nMemberLevel > nCurrentLevel ? " below" : " above";
sLocation += ", ";
}
sLocation += IntToString(FloatToInt(fDist)) + " steps " + sDirection;
// Display the location information
FloatingTextStringOnCreature(sLocation, oCaster, FALSE);
}
oMember = GetNextPC();
}
// 5. Notify if no one was found
if (nFound == 0)
{
FloatingTextStringOnCreature("KANDI: No missing or dead party members found", oCaster, TRUE);
}
}

107
Content/spells/katino.nss Normal file
View File

@ -0,0 +1,107 @@
//::///////////////////////////////////////////////
//:: Katino (Bad Air)
//:: katino.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to put to sleep a monster group.
Level 1 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Mage disable spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Put monster group to sleep
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate save DC based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 1;
int nDC = 10 + nCasterLevel;
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create sleep visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eSleepVis = EffectVisualEffect(39); // Sleep cloud visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eSleepVis, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 33)); // Sleep spell ID
// Allow saving throw to resist
if (!WillSave(oMember, nDC, 2)) // 2 = Sleep saving throw type
{
// Create the sleep effect
effect eSleep = EffectSleep();
effect eVis = EffectVisualEffect(38); // Sleep visual effect
effect eLink = EffectLinkEffects(eSleep, eVis);
// Apply the sleep effect
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, RoundsToSeconds(nCasterLevel));
// Set sleep condition flag
SetLocalInt(oMember, "CONDITION_SLEEPING", 1);
// Notify success
FloatingTextStringOnCreature(GetName(oMember) + " falls asleep!", oCaster, TRUE);
nAffected++;
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oMember) + " resisted sleep!", oCaster, TRUE);
}
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("KATINO: Put " + IntToString(nAffected) + " enemies to sleep!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("KATINO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("KATINO: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Lahalito (Torch)
//:: lahalito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 6d6 (6-36) points of fire damage to a
monster group.
Level 4 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Mage attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 6d6 fire damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the fire burst visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eFireBurst = EffectVisualEffect(44); // Fire burst visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireBurst, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d6(6); // 6d6 fire damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
effect eVis = EffectVisualEffect(44); // Fire visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 31)); // Fireball spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("LAHALITO: " + IntToString(nDamage) + " fire damage to " + GetName(oMember), oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("LAHALITO: Hit " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("LAHALITO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("LAHALITO: No valid target found", oCaster, TRUE);
}
}

113
Content/spells/lakanito.nss Normal file
View File

@ -0,0 +1,113 @@
//::///////////////////////////////////////////////
//:: Lakanito (Suffocation)
//:: lakanito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Kills a monster group. May be resisted at rate of
6% per monster hit point die.
Level 6 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Mage attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Kill monster group with HP-based resistance
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create suffocation visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eSuffocateVis = EffectVisualEffect(47); // Death visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eSuffocateVis, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
int nResisted = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate resistance chance based on hit dice
int nHitDice = GetHitDice(oMember);
int nResistChance = nHitDice * 6; // 6% per hit die
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 39)); // Death spell ID
// Check if monster resists
if (Random(100) < nResistChance)
{
// Monster resisted
FloatingTextStringOnCreature(GetName(oMember) + " resisted suffocation!", oCaster, TRUE);
nResisted++;
}
else
{
// Create the death effect
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(45); // Death visual effect
// Apply the visual and death effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oMember);
// Notify kill
FloatingTextStringOnCreature(GetName(oMember) + " is suffocated!", oCaster, TRUE);
nAffected++;
}
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0 || nResisted > 0)
{
string sResult = "LAKANITO: ";
if (nAffected > 0)
sResult += IntToString(nAffected) + " killed";
if (nAffected > 0 && nResisted > 0)
sResult += ", ";
if (nResisted > 0)
sResult += IntToString(nResisted) + " resisted";
FloatingTextStringOnCreature(sResult, oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("LAKANITO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("LAKANITO: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,88 @@
//::///////////////////////////////////////////////
//:: Latumapic (Identification)
//:: latumapic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Identifies a monster group.
Level 3 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Priest disable spell that targets
a monster group, revealing their true identity.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Identify a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Create the identification effect
effect eVis = EffectVisualEffect(14); // Identification visual effect
// 4. Apply to all monsters in the group
if (GetIsObjectValid(oTarget))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 32, FALSE)); // Identify spell ID
// Apply the visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
// Mark as identified
SetLocalInt(oMember, "IDENTIFIED", 1);
// Get monster information
string sName = GetName(oMember);
int nLevel = GetHitDice(oMember);
int nHP = GetCurrentHitPoints(oMember);
int nMaxHP = GetMaxHitPoints(oMember);
// Display monster information to the caster
string sInfo = sName + " (Level " + IntToString(nLevel) + ")\n";
sInfo += "HP: " + IntToString(nHP) + "/" + IntToString(nMaxHP) + "\n";
// Add special abilities or resistances if any
if (GetLocalInt(oMember, "ABILITY_UNDEAD") == 1)
sInfo += "Undead\n";
if (GetLocalInt(oMember, "ABILITY_SPELLCASTER") == 1)
sInfo += "Spellcaster\n";
if (GetLocalInt(oMember, "RESISTANCE_FIRE") == 1)
sInfo += "Fire Resistant\n";
if (GetLocalInt(oMember, "RESISTANCE_COLD") == 1)
sInfo += "Cold Resistant\n";
// Display the information
FloatingTextStringOnCreature(sInfo, oCaster, FALSE);
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
}
}

View File

@ -0,0 +1,70 @@
//::///////////////////////////////////////////////
//:: Latumofis (Cure Poison)
//:: latumofis.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Cures poison for a party member.
Level 4 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Priest healing spell that targets
one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Cure poison
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, target self
oTarget = oCaster;
}
// 3. Check if target is valid and is a party member
if (GetIsObjectValid(oTarget) && !GetIsEnemy(oTarget, oCaster))
{
// 4. Check if target is poisoned
int bPoisoned = GetLocalInt(oTarget, "CONDITION_POISONED");
if (bPoisoned)
{
// 5. Create the cure effect
effect eCure = EffectVisualEffect(14); // Healing visual effect
// 6. Apply the effects
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 75, FALSE)); // Neutralize Poison spell ID
// Remove the poison condition
DeleteLocalInt(oTarget, "CONDITION_POISONED");
// Apply the visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eCure, oTarget);
// 7. Notify the caster
FloatingTextStringOnCreature("LATUMOFIS: Cured poison for " + GetName(oTarget), oCaster, TRUE);
}
else
{
// Notify if target is not poisoned
FloatingTextStringOnCreature(GetName(oTarget) + " is not poisoned.", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("LATUMOFIS: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,81 @@
//::///////////////////////////////////////////////
//:: Litokan (Flame Tower)
//:: litokan.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 3d8 (3-24) points of fire damage to a
monster group.
Level 5 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Priest attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 3d8 fire damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d8(3); // 3d8 fire damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
effect eVis = EffectVisualEffect(44); // Fire visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 31)); // Fireball spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("LITOKAN: " + IntToString(nDamage) + " fire damage to " + GetName(oMember), oCaster, TRUE);
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("LITOKAN: No valid target found", oCaster, TRUE);
}
// Create the flame tower visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eTower = EffectVisualEffect(43); // Column of fire visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eTower, lTarget);
}

View File

@ -0,0 +1,70 @@
//::///////////////////////////////////////////////
//:: Loktofeit (Recall)
//:: loktofeit.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes all party members to be transported back to
town, minus all of their equipment and most of
their gold.
Level 6 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Priest field spell that affects
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Transport party to town
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Create the teleport effect
effect eVis = EffectVisualEffect(46); // Teleport visual effect
// 3. Process each party member
object oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Apply visual effect before teleport
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
// Remove equipment
object oItem = GetFirstItemInInventory(oMember);
while (GetIsObjectValid(oItem))
{
// Remove the item
DestroyObject(oItem);
oItem = GetNextItemInInventory(oMember);
}
// Remove most gold (leave 10%)
int nGold = GetGold(oMember);
int nGoldToKeep = nGold / 10; // Keep 10%
TakeGoldFromCreature(nGold, oMember, TRUE);
GiveGoldToCreature(oMember, nGoldToKeep);
// Set location to town
location lTown = GetLocation(GetWaypointByTag("WP_TOWN_ENTRANCE"));
// Teleport to town
AssignCommand(oMember, JumpToLocation(lTown));
// Notify the player
string sLostGold = IntToString(nGold - nGoldToKeep);
FloatingTextStringOnCreature("Lost " + sLostGold + " gold and all equipment!", oMember, TRUE);
// Get next party member
oMember = GetNextPC();
}
// Final notification
FloatingTextStringOnCreature("LOKTOFEIT: Party recalled to town!", oCaster, TRUE);
}

View File

@ -0,0 +1,77 @@
//::///////////////////////////////////////////////
//:: Lomilwa (More Light)
//:: lomilwa.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
More powerful MILWA spell that lasts for the entire
expedition, but is terminated in darkness areas.
Level 3 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Priest field/support spell that
targets the party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Create stronger light and reveal secret doors
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 3; // Minimum level 3 for this spell
float fDuration = HoursToSeconds(24); // Lasts for 24 hours (entire expedition)
// 3. Create the light effect
effect eLight = EffectVisualEffect(59); // Stronger light visual effect
effect eVis = EffectVisualEffect(14); // Cast visual effect
// 4. Remove any existing light effects
// This would typically involve removing any existing light effects
// from the MILWA spell
if (GetLocalInt(oCaster, "MILWA_ACTIVE") == 1)
{
DeleteLocalInt(oCaster, "MILWA_ACTIVE");
// The game engine would handle removing the visual effect
}
// 5. Apply to the caster (light follows the party)
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLight, oCaster, fDuration);
// 6. Set the LOMILWA flag
SetLocalInt(oCaster, "LOMILWA_ACTIVE", 1);
// 7. Reveal secret doors in the area
// This would typically involve a search check or revealing
// hidden objects in the area around the party
object oArea = GetArea(oCaster);
object oDoor = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oDoor))
{
// If the object is a secret door
if (GetObjectType(oDoor) == OBJECT_TYPE_DOOR && GetLocalInt(oDoor, "SECRET_DOOR"))
{
// Make it visible/discoverable
SetLocalInt(oDoor, "REVEALED", TRUE);
// Visual effect at door location
location lDoor = GetLocation(oDoor);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(14), lDoor);
}
oDoor = GetNextObjectInArea(oArea);
}
// 8. Notify the caster
FloatingTextStringOnCreature("LOMILWA: Enhanced light spell active for 24 hours!", oCaster, TRUE);
}

80
Content/spells/lorto.nss Normal file
View File

@ -0,0 +1,80 @@
//::///////////////////////////////////////////////
//:: Lorto (Blades)
//:: lorto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 6d6 (6-36) points of damage to a monster group.
Level 6 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Priest attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 6d6 damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the blade storm visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eStorm = EffectVisualEffect(41); // Blade storm visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStorm, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d6(6); // 6d6 damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING);
effect eVis = EffectVisualEffect(42); // Blade impact visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 35)); // Blade Barrier spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("LORTO: " + IntToString(nDamage) + " blade damage to " + GetName(oMember), oCaster, TRUE);
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("LORTO: No valid target found", oCaster, TRUE);
}
}

86
Content/spells/mabadi.nss Normal file
View File

@ -0,0 +1,86 @@
//::///////////////////////////////////////////////
//:: Mabadi (Harming)
//:: mabadi.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes all but 1d8 (1-8) hit points to be removed
from a monster.
Level 6 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Priest attack spell that targets
one monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Remove all but 1d8 HP from a monster
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate save DC based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 6; // Minimum level 6 for this spell
int nDC = 10 + nCasterLevel;
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 27)); // Harm spell ID
// Allow saving throw to resist
if (!FortitudeSave(oTarget, nDC, 3)) // 3 = Death/Harm saving throw type
{
// 5. Calculate remaining HP
int nCurrentHP = GetCurrentHitPoints(oTarget);
int nRemainingHP = d8(1); // 1d8 HP will remain
int nDamage = nCurrentHP - nRemainingHP;
if (nDamage > 0) // Only apply if we're actually reducing HP
{
// 6. Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
effect eVis = EffectVisualEffect(40); // Negative energy visual effect
// 7. Apply the effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// 8. Notify the caster
FloatingTextStringOnCreature("MABADI: " + GetName(oTarget) + " reduced to " +
IntToString(nRemainingHP) + " hit points!", oCaster, TRUE);
}
else
{
// Target already has very low HP
FloatingTextStringOnCreature("MABADI: " + GetName(oTarget) + " already near death!", oCaster, TRUE);
}
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oTarget) + " resisted the harming!", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MABADI: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Madalto (Frost)
//:: madalto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 8d8 (8-64) points of cold damage to a
monster group.
Level 5 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Mage attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 8d8 cold damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the frost burst visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eFrostBurst = EffectVisualEffect(35); // Ice/Cold burst visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFrostBurst, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d8(8); // 8d8 cold damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_COLD);
effect eVis = EffectVisualEffect(35); // Ice/Cold visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 36)); // Cone of Cold spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("MADALTO: " + IntToString(nDamage) + " cold damage to " + GetName(oMember), oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("MADALTO: Hit " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MADALTO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MADALTO: No valid target found", oCaster, TRUE);
}
}

94
Content/spells/madi.nss Normal file
View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Madi (Healing)
//:: madi.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Restores all hit points and cures all conditions
except death for a party member.
Level 6 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Priest healing spell that targets
one character.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Full heal and cure conditions
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, target self
oTarget = oCaster;
}
// 3. Check if target is valid and is a party member
if (GetIsObjectValid(oTarget) && !GetIsEnemy(oTarget, oCaster))
{
// Check if target is dead
if (GetLocalInt(oTarget, "CONDITION_DEAD") == 1)
{
FloatingTextStringOnCreature("MADI cannot cure death. Use DI or KADORTO instead.", oCaster, TRUE);
return;
}
// 4. Create the healing effects
effect eHeal = EffectHeal(GetMaxHitPoints(oTarget)); // Full heal
effect eVis = EffectVisualEffect(14); // Healing visual effect
// 5. Apply healing
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 17, FALSE)); // Heal spell ID
// Apply the visual and healing effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
// 6. Cure conditions
// Remove paralysis
if (GetLocalInt(oTarget, "CONDITION_PARALYZED") == 1)
{
DeleteLocalInt(oTarget, "CONDITION_PARALYZED");
FloatingTextStringOnCreature("Paralysis cured!", oTarget, TRUE);
}
// Remove poison
if (GetLocalInt(oTarget, "CONDITION_POISONED") == 1)
{
DeleteLocalInt(oTarget, "CONDITION_POISONED");
FloatingTextStringOnCreature("Poison cured!", oTarget, TRUE);
}
// Remove sleep
if (GetLocalInt(oTarget, "CONDITION_SLEEPING") == 1)
{
DeleteLocalInt(oTarget, "CONDITION_SLEEPING");
FloatingTextStringOnCreature("Sleep removed!", oTarget, TRUE);
}
// Remove any other negative conditions
DeleteLocalInt(oTarget, "CONDITION_SILENCED");
DeleteLocalInt(oTarget, "CONDITION_BLINDED");
DeleteLocalInt(oTarget, "CONDITION_CONFUSED");
DeleteLocalInt(oTarget, "CONDITION_DISEASED");
// 7. Notify the caster
FloatingTextStringOnCreature("MADI: " + GetName(oTarget) + " fully healed and cured!", oCaster, TRUE);
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MADI: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Mahalito (Big Fire)
//:: mahalito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 4d6 (4-24) points of fire damage to a
monster group.
Level 3 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Mage attack spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 4d6 fire damage to a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the fire burst visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eFireBurst = EffectVisualEffect(44); // Fire burst visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireBurst, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d6(4); // 4d6 fire damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
effect eVis = EffectVisualEffect(44); // Fire visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 31)); // Fireball spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("MAHALITO: " + IntToString(nDamage) + " fire damage to " + GetName(oMember), oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("MAHALITO: Hit " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MAHALITO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MAHALITO: No valid target found", oCaster, TRUE);
}
}

187
Content/spells/mahaman.nss Normal file
View File

@ -0,0 +1,187 @@
//::///////////////////////////////////////////////
//:: Mahaman (Great Change)
//:: mahaman.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Has random effects with more options than HAMAN.
Drains the caster one experience level and is
forgotten when cast.
Level 7 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 7 Mage support/disable spell with
enhanced random effects. Requires caster level 13+.
Possible effects:
- Augmented magic: party spells cause more damage
- Cure party: cures all conditions
- Heal party: MADI on all members
- Protect party: -20 AC for all members
- Raise the dead: DI on all dead members
- Silence enemies: all monsters silenced
- Teleport enemies: monsters teleported away
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Enhanced random effects with level drain
// Declare variables used in switch cases
object oCaster = OBJECT_SELF;
object oMember;
object oArea;
object oTarget;
effect eHeal;
effect eSilence;
effect eTeleport;
effect eProtect;
// Check minimum level requirement
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 13)
{
FloatingTextStringOnCreature("MAHAMAN requires level 13+ to cast!", oCaster, TRUE);
return;
}
// Apply level drain to caster
effect eDrain = EffectNegativeLevel(1);
effect eVis = EffectVisualEffect(47); // Negative energy visual effect
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oCaster);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
// Remove spell from memory
SetLocalInt(oCaster, "SPELL_MAHAMAN_FORGOTTEN", 1);
// Roll for random effect
int nEffect = Random(7); // 0-6 for seven possible effects
// Apply the random effect
switch(nEffect)
{
case 0: // Augmented magic
{
SetLocalInt(oCaster, "SPELL_DAMAGE_BONUS", 4); // Enhanced bonus
FloatingTextStringOnCreature("MAHAMAN: Party spells greatly enhanced!", oCaster, TRUE);
break;
}
case 1: // Cure party
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Remove negative conditions
DeleteLocalInt(oMember, "CONDITION_PARALYZED");
DeleteLocalInt(oMember, "CONDITION_POISONED");
DeleteLocalInt(oMember, "CONDITION_SLEEPING");
DeleteLocalInt(oMember, "CONDITION_SILENCED");
DeleteLocalInt(oMember, "CONDITION_FEARED");
// Visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(14), oMember);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MAHAMAN: Party conditions cured!", oCaster, TRUE);
break;
}
case 2: // Heal party
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Full heal
eHeal = EffectHeal(GetMaxHitPoints(oMember));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(14), oMember);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MAHAMAN: Party fully healed!", oCaster, TRUE);
break;
}
case 3: // Protect party
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Major AC reduction
eProtect = EffectACDecrease(20);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eProtect, oMember, RoundsToSeconds(nCasterLevel));
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(21), oMember);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MAHAMAN: Party heavily protected!", oCaster, TRUE);
break;
}
case 4: // Raise the dead
{
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
if (GetLocalInt(oMember, "CONDITION_DEAD") == 1)
{
// Resurrect with 1 HP
DeleteLocalInt(oMember, "CONDITION_DEAD");
eHeal = EffectHeal(1);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(14), oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oMember);
}
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MAHAMAN: Dead party members resurrected!", oCaster, TRUE);
break;
}
case 5: // Silence enemies
{
oArea = GetArea(oCaster);
oTarget = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oTarget))
{
if (GetIsEnemy(oTarget, oCaster))
{
eSilence = EffectSilence();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSilence, oTarget);
SetLocalInt(oTarget, "CONDITION_SILENCED", 1);
}
oTarget = GetNextObjectInArea(oArea);
}
FloatingTextStringOnCreature("MAHAMAN: All enemies silenced!", oCaster, TRUE);
break;
}
case 6: // Teleport enemies
{
oArea = GetArea(oCaster);
oTarget = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oTarget))
{
if (GetIsEnemy(oTarget, oCaster))
{
eTeleport = EffectVisualEffect(46); // Teleport visual effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oTarget);
SetLocalInt(oTarget, "TELEPORTED_AWAY", 1);
}
oTarget = GetNextObjectInArea(oArea);
}
FloatingTextStringOnCreature("MAHAMAN: All enemies teleported away!", oCaster, TRUE);
break;
}
}
// Notify level drain and spell loss
FloatingTextStringOnCreature("Lost one experience level!", oCaster, TRUE);
FloatingTextStringOnCreature("MAHAMAN spell forgotten!", oCaster, TRUE);
}

View File

@ -0,0 +1,84 @@
//::///////////////////////////////////////////////
//:: Makanito (Deadly Air)
//:: makanito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Kills all monsters with 7 or fewer hit point dice.
Level 5 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Mage attack spell that targets
all monsters.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Kill all weak monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Create the deadly air visual effect
effect eDeadlyAir = EffectVisualEffect(47); // Death visual effect
location lCaster = GetLocation(oCaster);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eDeadlyAir, lCaster);
// 3. Get all creatures in the area
object oArea = GetArea(oCaster);
object oTarget = GetFirstObjectInArea(oArea);
int nKilled = 0;
while (GetIsObjectValid(oTarget))
{
// Check if target is a valid enemy
if (GetIsEnemy(oTarget, oCaster) &&
GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
{
// Get creature's hit dice
int nHitDice = GetHitDice(oTarget);
// Check if creature is weak enough to be affected
if (nHitDice <= 7)
{
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 39)); // Death spell ID
// Create the death effect
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(45); // Death visual effect
// Apply the visual and death effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
// Notify kill
FloatingTextStringOnCreature("MAKANITO: " + GetName(oTarget) + " is killed!", oCaster, TRUE);
nKilled++;
}
else
{
// Notify too strong
FloatingTextStringOnCreature(GetName(oTarget) + " is too powerful!", oCaster, TRUE);
}
}
// Get next target in area
oTarget = GetNextObjectInArea(oArea);
}
// Final notification
if (nKilled > 0)
{
FloatingTextStringOnCreature("MAKANITO: Killed " + IntToString(nKilled) + " weak enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MAKANITO: No enemies were weak enough to affect", oCaster, TRUE);
}
}

View File

@ -0,0 +1,79 @@
//::///////////////////////////////////////////////
//:: Malikto (Word of Death)
//:: malikto.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 12d6 (12-72) points of damage to all monsters.
Level 7 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 7 Priest attack spell that targets
all monsters.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 12d6 damage to all monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Create the word of death visual effect
effect eWordVis = EffectVisualEffect(47); // Global death effect
location lCaster = GetLocation(oCaster);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWordVis, lCaster);
// 3. Get all enemies in the area
object oArea = GetArea(oCaster);
object oTarget = GetFirstObjectInArea(oArea);
int nEnemiesHit = 0;
while (GetIsObjectValid(oTarget))
{
// Check if target is a valid enemy
// Consider target alive if they're not marked as dead or permanently lost
if (GetIsEnemy(oTarget, oCaster) &&
GetObjectType(oTarget) == OBJECT_TYPE_CREATURE &&
!GetLocalInt(oTarget, "CONDITION_DEAD") &&
!GetLocalInt(oTarget, "PERMANENTLY_LOST"))
{
// Calculate damage
int nDamage = d6(12); // 12d6 damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
effect eVis = EffectVisualEffect(40); // Negative energy visual effect
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 39)); // Word of Death spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// Notify damage
FloatingTextStringOnCreature("MALIKTO: " + IntToString(nDamage) + " damage to " + GetName(oTarget), oCaster, TRUE);
nEnemiesHit++;
}
// Get next target in area
oTarget = GetNextObjectInArea(oArea);
}
// Final notification
if (nEnemiesHit > 0)
{
FloatingTextStringOnCreature("MALIKTO: Hit " + IntToString(nEnemiesHit) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MALIKTO: No enemies found in range", oCaster, TRUE);
}
}

138
Content/spells/malor.nss Normal file
View File

@ -0,0 +1,138 @@
//::///////////////////////////////////////////////
//:: Malor (Apport)
//:: malor.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Teleports the party to a random location in combat,
or to a selected dungeon level and location when
used in camp. If a party teleports into stone it
is lost forever, so the spell is best used in
conjunction with DUMAPIC.
Level 7 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 7 Mage field/support spell that
affects the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Teleport party
// 1. Get caster information
object oCaster = OBJECT_SELF;
object oMember; // Declare party member variable
object oArea;
object oTargetArea;
location lNewLoc;
location lTargetLoc;
vector vNewPos;
vector vTargetPos;
// 2. Check if in combat
int bInCombat = GetLocalInt(oCaster, "IN_COMBAT");
// 3. Create teleport visual effect
effect eTeleport = EffectVisualEffect(46); // Teleport visual effect
if (bInCombat)
{
// Random teleport during combat
// Get current area
oArea = GetArea(oCaster);
// Generate random coordinates within the area
float fAreaWidth = 100.0; // Example area size
float fAreaHeight = 100.0;
vNewPos.x = IntToFloat(Random(FloatToInt(fAreaWidth)));
vNewPos.y = IntToFloat(Random(FloatToInt(fAreaHeight)));
vNewPos.z = 0.0;
lNewLoc = Location(oArea, vNewPos, 0.0);
// Check if location is safe (not in stone)
if (!GetLocalInt(oArea, "LOCATION_SOLID"))
{
// Teleport each party member
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Apply teleport effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oMember);
// Move to new location
AssignCommand(oMember, JumpToLocation(lNewLoc));
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MALOR: Party teleported to random location!", oCaster, TRUE);
}
else
{
// Teleport into stone - party is lost
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Apply teleport effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oMember);
// Mark as permanently lost
SetLocalInt(oMember, "PERMANENTLY_LOST", 1);
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MALOR: Party teleported into stone and was lost forever!", oCaster, TRUE);
}
}
else
{
// Targeted teleport during camp
// Get target level and coordinates from user input
int nTargetLevel = GetLocalInt(oCaster, "TELEPORT_TARGET_LEVEL");
float fTargetX = GetLocalFloat(oCaster, "TELEPORT_TARGET_X");
float fTargetY = GetLocalFloat(oCaster, "TELEPORT_TARGET_Y");
// Create target location
oTargetArea = GetObjectByTag("DUNGEON_LEVEL_" + IntToString(nTargetLevel));
vTargetPos.x = fTargetX;
vTargetPos.y = fTargetY;
vTargetPos.z = 0.0;
lTargetLoc = Location(oTargetArea, vTargetPos, 0.0);
// Check if location is safe
if (!GetLocalInt(oTargetArea, "LOCATION_SOLID"))
{
// Teleport each party member
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Apply teleport effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oMember);
// Move to target location
AssignCommand(oMember, JumpToLocation(lTargetLoc));
oMember = GetNextPC();
}
FloatingTextStringOnCreature("MALOR: Party teleported to level " +
IntToString(nTargetLevel) + " at (" +
FloatToString(fTargetX, 0, 0) + "," +
FloatToString(fTargetY, 0, 0) + ")!", oCaster, TRUE);
}
else
{
// Notify unsafe location
FloatingTextStringOnCreature("MALOR: Target location is in solid stone!", oCaster, TRUE);
}
}
}

View File

@ -0,0 +1,92 @@
//::///////////////////////////////////////////////
//:: Mamorlis (Terror)
//:: mamorlis.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to frighten and disperse all monsters.
Level 5 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 5 Mage disable spell that targets
all monsters.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Frighten and disperse all monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate save DC based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 5; // Minimum level 5 for this spell
int nDC = 10 + nCasterLevel;
float fDuration = RoundsToSeconds(nCasterLevel);
// 3. Create global terror visual effect
effect eTerrorVis = EffectVisualEffect(48); // Fear visual effect
location lCaster = GetLocation(oCaster);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eTerrorVis, lCaster);
// 4. Get all creatures in the area
object oArea = GetArea(oCaster);
object oTarget = GetFirstObjectInArea(oArea);
int nAffected = 0;
while (GetIsObjectValid(oTarget))
{
// Check if target is a valid enemy
if (GetIsEnemy(oTarget, oCaster) &&
GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
{
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 28)); // Fear spell ID
// Allow saving throw to resist
if (!WillSave(oTarget, nDC, 2)) // 2 = Fear saving throw type
{
// Create the fear effects
effect eFear = EffectFrightened();
effect eVis = EffectVisualEffect(48); // Fear visual effect
effect eDur = EffectVisualEffect(15); // Negative duration visual effect
effect eLink = EffectLinkEffects(eFear, eDur);
// Apply the fear effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
// Set fear condition flag
SetLocalInt(oTarget, "CONDITION_FEARED", 1);
// Notify success
FloatingTextStringOnCreature(GetName(oTarget) + " is terrified!", oCaster, TRUE);
nAffected++;
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oTarget) + " resisted terror!", oCaster, TRUE);
}
}
// Get next target in area
oTarget = GetNextObjectInArea(oArea);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("MAMORLIS: Terrified " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MAMORLIS: No enemies affected", oCaster, TRUE);
}
}

83
Content/spells/manifo.nss Normal file
View File

@ -0,0 +1,83 @@
//::///////////////////////////////////////////////
//:: Manifo (Statue)
//:: manifo.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to paralyze a monster group.
Level 2 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Priest disable spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Paralyze a group of monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration and save DC (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
int nDC = 10 + nCasterLevel;
// 3. Create the paralysis effect
effect eParalyze = EffectParalyze();
effect eVis = EffectVisualEffect(16); // Generic hold/paralyze visual effect
effect eLink = EffectLinkEffects(eParalyze, EffectVisualEffect(59)); // Paralyzed visual effect
// 4. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 5. Apply to all monsters in the group
if (GetIsObjectValid(oTarget))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 38)); // Hold Monster spell ID
// Allow saving throw to resist
if (!FortitudeSave(oMember, nDC, 4)) // 4 = Paralysis saving throw type
{
// Apply paralysis effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, fDuration);
// Notify success
FloatingTextStringOnCreature(GetName(oMember) + " is paralyzed!", oCaster, TRUE);
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oMember) + " resisted paralysis!", oCaster, TRUE);
}
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
}
}

View File

@ -0,0 +1,74 @@
//::///////////////////////////////////////////////
//:: Maporfic (Big Shield)
//:: maporfic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of all party members by 2
for the entire expedition.
Level 4 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Priest support spell that targets
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce AC of all party members by 2 for the entire expedition
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 4; // Minimum level 4 for this spell
float fDuration = HoursToSeconds(24); // Lasts for 24 hours (entire expedition)
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(2); // Reduce AC by 2 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Shield visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 4. Remove any existing PORFIC effects
// This would typically involve removing any existing shield effects
// from the PORFIC spell
object oPartyMember = GetFirstPC();
while (GetIsObjectValid(oPartyMember))
{
if (GetLocalInt(oPartyMember, "PORFIC_ACTIVE") == 1)
{
DeleteLocalInt(oPartyMember, "PORFIC_ACTIVE");
// The game engine would handle removing the effect
}
oPartyMember = GetNextPC();
}
// 5. Apply to all party members
oPartyMember = GetFirstPC();
while (GetIsObjectValid(oPartyMember))
{
// Signal spell cast at event
SignalEvent(oPartyMember, EventSpellCastAt(oCaster, 58, FALSE)); // Mage Armor spell ID
// Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPartyMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPartyMember, fDuration);
// Set the MAPORFIC flag
SetLocalInt(oPartyMember, "MAPORFIC_ACTIVE", 1);
// Notify the target
FloatingTextStringOnCreature("MAPORFIC: AC reduced by 2 for 24 hours", oPartyMember, TRUE);
// Get next party member
oPartyMember = GetNextPC();
}
}

View File

@ -0,0 +1,79 @@
//::///////////////////////////////////////////////
//:: Masopic (Big Glass)
//:: masopic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of all party members by 4
for the duration of the combat.
Level 6 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Mage support spell that targets
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce party's AC by 4
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 6; // Minimum level 6 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Remove any existing MOGREF/SOPIC effects
object oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
if (GetLocalInt(oMember, "MOGREF_ACTIVE") == 1)
{
DeleteLocalInt(oMember, "MOGREF_ACTIVE");
// The game engine would handle removing the effect
}
if (GetLocalInt(oMember, "SOPIC_ACTIVE") == 1)
{
DeleteLocalInt(oMember, "SOPIC_ACTIVE");
// The game engine would handle removing the effect
}
oMember = GetNextPC();
}
// 4. Create the AC reduction effect
effect eAC = EffectACDecrease(4); // Reduce AC by 4 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Shield visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 5. Apply to all party members
oMember = GetFirstPC();
while (GetIsObjectValid(oMember))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 58, FALSE)); // Mage Armor spell ID
// Apply the visual and AC effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, fDuration);
// Set the MASOPIC flag
SetLocalInt(oMember, "MASOPIC_ACTIVE", 1);
// Notify the target
FloatingTextStringOnCreature("AC reduced by 4", oMember, TRUE);
// Get next party member
oMember = GetNextPC();
}
// 6. Final notification
FloatingTextStringOnCreature("MASOPIC: Party AC reduced by 4", oCaster, TRUE);
}

56
Content/spells/matu.nss Normal file
View File

@ -0,0 +1,56 @@
//::///////////////////////////////////////////////
//:: Matu (Blessing)
//:: matu.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of all party members by 2
for the duration of the combat.
Level 2 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Priest support spell that targets
the entire party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce AC of all party members by 2
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(2); // Reduce AC by 2 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Generic blessing visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 4. Apply to all party members
object oTarget = GetFirstPC();
while (GetIsObjectValid(oTarget))
{
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 7, FALSE)); // Bless spell ID
// Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
// Notify the target
FloatingTextStringOnCreature("Blessed: AC reduced by 2", oTarget, TRUE);
// Get next party member
oTarget = GetNextPC();
}
}

62
Content/spells/milwa.nss Normal file
View File

@ -0,0 +1,62 @@
//::///////////////////////////////////////////////
//:: Milwa (Light)
//:: milwa.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Summons a softly glowing light that increases vision
and reveals secret doors.
Level 1 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Priest field/support spell that
targets the party.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Create light and reveal secret doors
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 1;
float fDuration = HoursToSeconds(nCasterLevel); // Lasts for hours equal to caster level
// 3. Create the light effect
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_WHITE_20);
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
// 4. Apply to the caster (light follows the party)
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLight, oCaster, fDuration);
// 5. Reveal secret doors in the area
// This would typically involve a search check or revealing
// hidden objects in the area around the party
object oArea = GetArea(oCaster);
object oDoor = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oDoor))
{
// If the object is a secret door
if (GetObjectType(oDoor) == OBJECT_TYPE_DOOR && GetLocalInt(oDoor, "SECRET_DOOR"))
{
// Make it visible/discoverable
SetLocalInt(oDoor, "REVEALED", TRUE);
// Visual effect at door location
location lDoor = GetLocation(oDoor);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DISPEL), lDoor);
}
oDoor = GetNextObjectInArea(oArea);
}
}

49
Content/spells/mogref.nss Normal file
View File

@ -0,0 +1,49 @@
//::///////////////////////////////////////////////
//:: Mogref (Body Iron)
//:: mogref.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of the caster by 2
for the duration of the combat.
Level 1 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Mage support spell that targets
the caster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce caster's AC by 2
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 1;
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(2); // Reduce AC by 2 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Shield visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 4. Apply to the caster
// Signal spell cast at event
SignalEvent(oCaster, EventSpellCastAt(oCaster, 58, FALSE)); // Mage Armor spell ID
// Apply the visual and AC effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oCaster, fDuration);
// 5. Notify the caster
FloatingTextStringOnCreature("MOGREF: AC reduced by 2", oCaster, TRUE);
}

110
Content/spells/molito.nss Normal file
View File

@ -0,0 +1,110 @@
//::///////////////////////////////////////////////
//:: Molito (Spark Storm)
//:: molito.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 3d6 (3-18) points of damage to half of a
monster group.
Level 3 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 3 Mage attack spell that targets
half of a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal 3d6 damage to half of a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create the spark storm visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eStormVis = EffectVisualEffect(42); // Lightning visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStormVis, lTarget);
// Count total enemies in group
int nTotalEnemies = 0;
object oCounter = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oCounter))
{
if (GetIsEnemy(oCounter, oCaster))
{
nTotalEnemies++;
}
oCounter = GetNextFactionMember(oFaction);
}
// Calculate how many to affect (half, rounded up)
int nToAffect = (nTotalEnemies + 1) / 2;
// Apply to half of the faction/group members
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember) && nAffected < nToAffect)
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Calculate damage
int nDamage = d6(3); // 3d6 damage
// Create the damage effect
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
effect eVis = EffectVisualEffect(42); // Lightning visual effect
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 37)); // Lightning Bolt spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oMember);
// Notify damage
FloatingTextStringOnCreature("MOLITO: " + IntToString(nDamage) + " spark damage to " + GetName(oMember), oCaster, TRUE);
nAffected++;
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("MOLITO: Hit " + IntToString(nAffected) + " out of " +
IntToString(nTotalEnemies) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MOLITO: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MOLITO: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,84 @@
//::///////////////////////////////////////////////
//:: Montino (Still Air)
//:: montino.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to silence a monster group, making it
impossible for them to cast spells.
Level 2 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Priest disable spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Silence a group of monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration and save DC (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
int nDC = 10 + nCasterLevel;
// 3. Create the silence effect
effect eSilence = EffectSilence();
effect eVis = EffectVisualEffect(56); // Generic silence visual effect
effect eLink = EffectLinkEffects(eSilence, EffectVisualEffect(78)); // Silence duration visual
// 4. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 5. Apply to all monsters in the group
if (GetIsObjectValid(oTarget))
{
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 85)); // Silence spell ID
// Allow saving throw to resist
if (!WillSave(oMember, nDC, 1)) // 1 = Spell saving throw type
{
// Apply silence effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, fDuration);
// Notify success
FloatingTextStringOnCreature(GetName(oMember) + " is silenced!", oCaster, TRUE);
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oMember) + " resisted silence!", oCaster, TRUE);
}
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
}
}

110
Content/spells/morlis.nss Normal file
View File

@ -0,0 +1,110 @@
//::///////////////////////////////////////////////
//:: Morlis (Fear)
//:: morlis.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Attempts to frighten and disperse a monster group.
Level 4 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 4 Mage disable spell that targets
a monster group.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Frighten and disperse a monster group
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target monster group
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Calculate save DC based on caster level
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 4; // Minimum level 4 for this spell
int nDC = 10 + nCasterLevel;
float fDuration = RoundsToSeconds(nCasterLevel);
// Get the faction/group of the target
object oFaction = GetFactionLeader(oTarget);
// Create fear visual effect at the target location
location lTarget = GetLocation(oTarget);
effect eFearVis = EffectVisualEffect(48); // Fear visual effect
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFearVis, lTarget);
// Apply to all members of the faction/group
object oMember = GetFirstFactionMember(oFaction);
int nAffected = 0;
while (GetIsObjectValid(oMember))
{
// Only affect enemies
if (GetIsEnemy(oMember, oCaster))
{
// Signal spell cast at event
SignalEvent(oMember, EventSpellCastAt(oCaster, 28)); // Fear spell ID
// Allow saving throw to resist
if (!WillSave(oMember, nDC, 2)) // 2 = Fear saving throw type
{
// Create the fear effects
effect eFear = EffectFrightened();
effect eVis = EffectVisualEffect(48); // Fear visual effect
effect eDur = EffectVisualEffect(15); // Negative duration visual effect
effect eLink = EffectLinkEffects(eFear, eDur);
// Apply the fear effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMember);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oMember, fDuration);
// Set fear condition flag
SetLocalInt(oMember, "CONDITION_FEARED", 1);
// Notify success
FloatingTextStringOnCreature(GetName(oMember) + " is frightened!", oCaster, TRUE);
nAffected++;
}
else
{
// Notify resistance
FloatingTextStringOnCreature(GetName(oMember) + " resisted fear!", oCaster, TRUE);
}
}
// Get next faction member
oMember = GetNextFactionMember(oFaction);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("MORLIS: Frightened " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("MORLIS: No enemies affected", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("MORLIS: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,39 @@
//::///////////////////////////////////////////////
//:: Example Spell
//:: NW_SX_Example.nss
//:: Copyright (c) 2025 User Project
//::///////////////////////////////////////////////
/*
TODO: Describe spell effect here
(e.g., "Deals XdY [TYPE] damage to all targets in a [SHAPE] area.")
*/
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_[TO_BE_DEFINED]); // e.g., EVOCATION, DIVINATION
if (!X2PreSpellCastCode())
{
return;
}
// End of Spell Cast Hook
// Declare major variables
object oCaster = OBJECT_SELF;
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
// TODO: Define spell-specific variables here (e.g., damage types, skill boosts)
// TODO: Implement spell logic here, using examples from nw_s0_icestorm.nss and nw_s0_identify.nss as guides
// ...
// Example Placeholder for Visual and Damage Effects
effect eExampleVis = EffectVisualEffect(VFX_[TO_BE_DEFINED]); // Choose appropriate VFX
effect eExampleDam = PRCEffectDamage(OBJECT_TARGET, [DAMAGE_VALUE], [DAMAGE_TYPE]);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eExampleVis, OBJECT_TARGET);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eExampleDam, OBJECT_TARGET);
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
}

45
Content/spells/porfic.nss Normal file
View File

@ -0,0 +1,45 @@
//::///////////////////////////////////////////////
//:: Porfic (Shield)
//:: porfic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of the caster by 4
for the duration of the combat.
Level 1 Priest spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 1 Priest support spell that targets
the caster only.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce AC of caster by 4
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
if (nCasterLevel < 1) nCasterLevel = 1;
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Create the AC reduction effect
effect eAC = EffectACDecrease(4); // Reduce AC by 4 (lower AC is better)
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
effect eShield = EffectVisualEffect(VFX_DUR_GLOBE_MINOR);
effect eLink = EffectLinkEffects(eAC, eShield);
// 4. Apply to the caster
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oCaster, fDuration);
// 5. Notify the caster
FloatingTextStringOnCreature("Shield spell active: AC reduced by 4", oCaster, TRUE);
}

61
Content/spells/sopic.nss Normal file
View File

@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Sopic (Glass)
//:: sopic.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Reduces the armor class of the caster by 4
for the duration of the combat.
Level 2 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 2 Mage support spell that targets
the caster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Reduce caster's AC by 4
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Calculate duration (based on caster level)
int nCasterLevel = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster);
if (nCasterLevel < 1) nCasterLevel = 2; // Minimum level 2 for this spell
float fDuration = RoundsToSeconds(nCasterLevel); // Lasts for rounds equal to caster level
// 3. Remove any existing MOGREF effects
// This would typically involve removing any existing shield effects
// from the MOGREF spell
if (GetLocalInt(oCaster, "MOGREF_ACTIVE") == 1)
{
DeleteLocalInt(oCaster, "MOGREF_ACTIVE");
// The game engine would handle removing the effect
}
// 4. Create the AC reduction effect
effect eAC = EffectACDecrease(4); // Reduce AC by 4 (lower AC is better)
effect eVis = EffectVisualEffect(21); // Shield visual effect
effect eDur = EffectVisualEffect(14); // Duration visual effect
effect eLink = EffectLinkEffects(eAC, eDur);
// 5. Apply to the caster
// Signal spell cast at event
SignalEvent(oCaster, EventSpellCastAt(oCaster, 58, FALSE)); // Mage Armor spell ID
// Apply the visual and AC effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oCaster, fDuration);
// Set the SOPIC flag
SetLocalInt(oCaster, "SOPIC_ACTIVE", 1);
// 6. Notify the caster
FloatingTextStringOnCreature("SOPIC: AC reduced by 4", oCaster, TRUE);
}

View File

@ -0,0 +1,87 @@
//::///////////////////////////////////////////////
//:: Tiltowait (Explosion)
//:: tiltowait.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Causes 10d15 (10-150) points of damage to all
monsters.
Level 7 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 7 Mage attack spell that targets
all monsters.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Deal massive damage to all monsters
// 1. Get caster information
object oCaster = OBJECT_SELF;
object oArea;
object oTarget;
effect eDamage;
effect eVis;
int nDamage;
int nAffected;
// 2. Create explosion visual effect
effect eExplosion = EffectVisualEffect(43); // Explosion visual effect
location lCaster = GetLocation(oCaster);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplosion, lCaster);
// 3. Get all creatures in the area
oArea = GetArea(oCaster);
oTarget = GetFirstObjectInArea(oArea);
nAffected = 0;
while (GetIsObjectValid(oTarget))
{
// Check if target is a valid enemy
if (GetIsEnemy(oTarget, oCaster) &&
GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
{
// Calculate damage (10d15)
nDamage = 0;
int i;
for (i = 0; i < 10; i++)
{
nDamage += Random(15) + 1; // 1-15 per die
}
// Create the damage effect
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
eVis = EffectVisualEffect(43); // Explosion visual effect
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 55)); // Meteor Swarm spell ID
// Apply the visual and damage effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
// Notify damage
FloatingTextStringOnCreature("TILTOWAIT: " + IntToString(nDamage) + " damage to " + GetName(oTarget), oCaster, TRUE);
nAffected++;
}
// Get next target in area
oTarget = GetNextObjectInArea(oArea);
}
// Final notification
if (nAffected > 0)
{
FloatingTextStringOnCreature("TILTOWAIT: Hit " + IntToString(nAffected) + " enemies!", oCaster, TRUE);
}
else
{
FloatingTextStringOnCreature("TILTOWAIT: No enemies affected", oCaster, TRUE);
}
}

68
Content/spells/zilwan.nss Normal file
View File

@ -0,0 +1,68 @@
//::///////////////////////////////////////////////
//:: Zilwan (Dispel)
//:: zilwan.nss
//:: Copyright (c) 2025 WizardryEE Project
//:://////////////////////////////////////////////
/*
Kills an undead monster.
Level 6 Mage spell.
In Wizardry: Proving Grounds of the Mad Overlord,
this is a Level 6 Mage attack spell that targets
one undead monster.
*/
//:://////////////////////////////////////////////
//:: Created By: WizardryEE Project
//:: Created On: April 26, 2025
//:://////////////////////////////////////////////
void main()
{
// Spell implementation for WizardryEE
// Core functionality: Kill an undead monster
// 1. Get caster information
object oCaster = OBJECT_SELF;
// 2. Get the target
object oTarget = GetSpellTargetObject();
if (!GetIsObjectValid(oTarget))
{
// If no specific target, get the nearest enemy
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oCaster, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
}
// 3. Check if target is valid and is an enemy
if (GetIsObjectValid(oTarget) && GetIsEnemy(oTarget, oCaster))
{
// 4. Check if target is undead
int bIsUndead = GetLocalInt(oTarget, "ABILITY_UNDEAD");
if (bIsUndead)
{
// Create the dispel effects
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(47); // Holy/Dispel visual effect
// Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, 40)); // Destroy Undead spell ID
// Apply the visual and death effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
// Notify success
FloatingTextStringOnCreature("ZILWAN: " + GetName(oTarget) + " is destroyed!", oCaster, TRUE);
}
else
{
// Notify target is not undead
FloatingTextStringOnCreature("ZILWAN: " + GetName(oTarget) + " is not undead!", oCaster, TRUE);
}
}
else
{
// Notify if no valid target
FloatingTextStringOnCreature("ZILWAN: No valid target found", oCaster, TRUE);
}
}

View File

@ -0,0 +1,18 @@
'use strict';(function(){var cmpFile='noModule'in HTMLScriptElement.prototype?'cmp2.js':'cmp2-polyfilled.js';(function(){var cmpScriptElement=document.createElement('script');var firstScript=document.getElementsByTagName('script')[0];cmpScriptElement.async=true;cmpScriptElement.type='text/javascript';var cmpUrl;var tagUrl=document.currentScript.src;cmpUrl='https://cmp.inmobi.com/tcfv2/53/CMP_FILE?referer=strategywiki.org'.replace('CMP_FILE',cmpFile);cmpScriptElement.src=cmpUrl;firstScript.parentNode.insertBefore(cmpScriptElement,firstScript);})();(function(){var css=""
+" .qc-cmp-button.qc-cmp-secondary-button:hover { "
+" background-color: #368bd6 !important; "
+" border-color: transparent !important; "
+" } "
+" .qc-cmp-button.qc-cmp-secondary-button:hover { "
+" color: #ffffff !important; "
+" } "
+" .qc-cmp-button.qc-cmp-secondary-button { "
+" color: #368bd6 !important; "
+" } "
+" .qc-cmp-button.qc-cmp-secondary-button { "
+" background-color: #eee !important; "
+" border-color: transparent !important; "
+" } "
+""
+"";var stylesElement=document.createElement('style');var re=new RegExp('&quote;','g');css=css.replace(re,'"');stylesElement.type='text/css';if(stylesElement.styleSheet){stylesElement.styleSheet.cssText=css;}else{stylesElement.appendChild(document.createTextNode(css));}
var head=document.head||document.getElementsByTagName('head')[0];head.appendChild(stylesElement);})();var autoDetectedLanguage='en';var gvlVersion=2;function splitLang(lang){return lang.length>2?lang.split('-')[0]:lang;};function isSupported(lang){var langs=['en','fr','de','it','es','da','nl','el','hu','pt','pt-br','pt-pt','ro','fi','pl','sk','sv','no','ru','bg','ca','cs','et','hr','lt','lv','mt','sl','tr','uk','zh'];return langs.indexOf(lang)===-1?false:true;};if(gvlVersion===2&&isSupported(splitLang(document.documentElement.lang))){autoDetectedLanguage=splitLang(document.documentElement.lang);}else if(gvlVersion===3&&isSupported(document.documentElement.lang)){autoDetectedLanguage=document.documentElement.lang;}else if(isSupported(splitLang(navigator.language))){autoDetectedLanguage=splitLang(navigator.language);};var choiceMilliSeconds=(new Date).getTime();window.__tcfapi('init',2,function(){},{"coreConfig":{"uspVersion":1,"uspJurisdiction":["CA"],"uspLspact":"N","siteUuid":"229a3cb7-f758-42c7-ad7b-cf8783a299f9","themeUuid":"b9225594-f97a-45ec-af26-0f23eb2e36d4","uspDeleteDataLink":"https://www.quantcast.com/protect/p-qExupB7aAA026/themes/edit/63210","suppressCcpaLinks":true,"inmobiAccountId":"qExupB7aAA026","privacyMode":["GDPR","USP"],"cmpVersion":"53","hashCode":"q5fBBFnsoRsF4PMRIkrV1w","publisherCountryCode":"US","publisherName":"StrategyWiki","vendorPurposeIds":[2,4,6,7,9,10,1,3,5,8],"vendorFeaturesIds":[1,2,3],"vendorPurposeLegitimateInterestIds":[7,8,9,2,10,3,4,5,6],"vendorSpecialFeaturesIds":[2,1],"vendorSpecialPurposesIds":[1,2],"googleEnabled":true,"consentScope":"service","thirdPartyStorageType":"iframe","consentOnSafari":false,"displayUi":"inEU","defaultToggleValue":"off","initScreenRejectButtonShowing":false,"initScreenCloseButtonShowing":false,"softOptInEnabled":false,"showSummaryView":true,"persistentConsentLinkLocation":4,"displayPersistentConsentLink":true,"uiLayout":"banner","vendorListUpdateFreq":365,"publisherPurposeIds":[1,3,4,5,6],"initScreenBodyTextOption":1,"publisherConsentRestrictionIds":[],"publisherLIRestrictionIds":[],"publisherPurposeLegitimateInterestIds":[2,7,8,9,10],"publisherSpecialPurposesIds":[1,2],"publisherFeaturesIds":[3],"stacks":[1,42],"lang_":"en","gvlVersion":2,"legitimateInterestOptIn":true},"premiumUiLabels":{"uspDnsText":[""],"uspDeleteDataLinkText":"https://www.quantcast.com/protect/p-qExupB7aAA026/themes/edit/63210"},"premiumProperties":{"googleWhitelist":[1]},"coreUiLabels":{},"theme":{},"nonIabVendorsInfo":{}});})();

View File

@ -0,0 +1,620 @@
// Copyright 2012 Google Inc. All rights reserved.
(function(){
var data = {
"resource": {
"version":"1",
"macros":[{"function":"__e"},{"function":"__c","vtp_value":"undefined"}],
"tags":[{"function":"__rep","vtp_containerId":"UA-84370-4","vtp_remoteConfig":["map"],"tag_id":1},{"function":"__zone","vtp_childContainers":["list",["map","publicId","G-F0NG8GFC2Y"]],"vtp_enableConfiguration":false,"tag_id":3}],
"predicates":[{"function":"_eq","arg0":["macro",0],"arg1":"gtm.js"}],
"rules":[[["if",0],["add",0,1]]]
},
"runtime":[ [50,"__c",[46,"a"],[36,[17,[15,"a"],"value"]]]
,[50,"__e",[46,"a"],[36,[13,[41,"$0"],[3,"$0",["require","internal.getEventData"]],["$0","event"]]]]
]
,"entities":{
"__c":{"2":true,"4":true}
,
"__e":{"2":true,"4":true}
}
,"blob":{"1":"1"}
,"permissions":{
"__c":{}
,
"__e":{"read_event_data":{"eventDataAccess":"specific","keyPatterns":["event"]}}
}
,"security_groups":{
"google":[
"__c"
,
"__e"
]
}
};
var k,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a},ca=function(a){for(var b=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global],c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");
},da=ca(this),ea=function(a,b){if(b)a:{for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}var g=d[d.length-1],h=c[g],m=b(h);m!=h&&m!=null&&ba(c,g,{configurable:!0,writable:!0,value:m})}};
ea("Symbol",function(a){if(a)return a;var b=function(f,g){this.C=f;ba(this,"description",{configurable:!0,writable:!0,value:g})};b.prototype.toString=function(){return this.C};var c="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",d=0,e=function(f){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(f||"")+"_"+d++,f)};return e});var fa=typeof Object.create=="function"?Object.create:function(a){var b=function(){};b.prototype=a;return new b},ka;
if(typeof Object.setPrototypeOf=="function")ka=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}ka=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var pa=ka,qa=function(a,b){a.prototype=fa(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Yo=b.prototype},l=function(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");},ra=function(a){for(var b,
c=[];!(b=a.next()).done;)c.push(b.value);return c},sa=function(a){return a instanceof Array?a:ra(l(a))},ua=function(a){return ta(a,a)},ta=function(a,b){a.raw=b;Object.freeze&&(Object.freeze(a),Object.freeze(b));return a},va=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||va});
var wa=function(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b};/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var xa=this||self;var ya=function(a,b){this.type=a;this.data=b};var za=function(){this.map={};this.C={}};za.prototype.get=function(a){return this.map["dust."+a]};za.prototype.set=function(a,b){var c="dust."+a;this.C.hasOwnProperty(c)||(this.map[c]=b)};za.prototype.has=function(a){return this.map.hasOwnProperty("dust."+a)};za.prototype.remove=function(a){var b="dust."+a;this.C.hasOwnProperty(b)||delete this.map[b]};
var Ba=function(a,b){var c=[],d;for(d in a.map)if(a.map.hasOwnProperty(d)){var e=d.substring(5);switch(b){case 1:c.push(e);break;case 2:c.push(a.map[d]);break;case 3:c.push([e,a.map[d]])}}return c};za.prototype.qa=function(){return Ba(this,1)};za.prototype.bc=function(){return Ba(this,2)};za.prototype.Gb=function(){return Ba(this,3)};var Ca=function(){};Ca.prototype.reset=function(){};var Da=function(a,b){this.O=a;this.parent=b;this.C=this.H=void 0;this.Ac=!1;this.N=function(c,d,e){return c.apply(d,e)};this.values=new za};Da.prototype.add=function(a,b){Ea(this,a,b,!1)};var Ea=function(a,b,c,d){if(!a.Ac)if(d){var e=a.values;e.set(b,c);e.C["dust."+b]=!0}else a.values.set(b,c)};Da.prototype.set=function(a,b){this.Ac||(!this.values.has(a)&&this.parent&&this.parent.has(a)?this.parent.set(a,b):this.values.set(a,b))};
Da.prototype.get=function(a){return this.values.has(a)?this.values.get(a):this.parent?this.parent.get(a):void 0};Da.prototype.has=function(a){return!!this.values.has(a)||!(!this.parent||!this.parent.has(a))};var Fa=function(a){var b=new Da(a.O,a);a.H&&(b.H=a.H);b.N=a.N;b.C=a.C;return b};Da.prototype.Id=function(){return this.O};Da.prototype.Qa=function(){this.Ac=!0};var Ga=function(a,b,c){var d;d=Error.call(this,a.message);this.message=d.message;"stack"in d&&(this.stack=d.stack);this.yk=a;this.kk=c===void 0?!1:c;this.debugInfo=[];this.C=b};qa(Ga,Error);var Ha=function(a){return a instanceof Ga?a:new Ga(a,void 0,!0)};function Ja(a,b){for(var c,d=l(b),e=d.next();!e.done&&!(c=Ka(a,e.value),c instanceof ya);e=d.next());return c}function Ka(a,b){try{var c=l(b),d=c.next().value,e=ra(c),f=a.get(String(d));if(!f||typeof f.invoke!=="function")throw Ha(Error("Attempting to execute non-function "+b[0]+"."));return f.invoke.apply(f,[a].concat(sa(e)))}catch(h){var g=a.H;g&&g(h,b.context?{id:b[0],line:b.context.line}:null);throw h;}};var La=function(){this.H=new Ca;this.C=new Da(this.H)};k=La.prototype;k.Id=function(){return this.H};k.execute=function(a){return this.Ai([a].concat(sa(wa.apply(1,arguments))))};k.Ai=function(){for(var a,b=l(wa.apply(0,arguments)),c=b.next();!c.done;c=b.next())a=Ka(this.C,c.value);return a};k.Zl=function(a){var b=wa.apply(1,arguments),c=Fa(this.C);c.C=a;for(var d,e=l(b),f=e.next();!f.done;f=e.next())d=Ka(c,f.value);return d};k.Qa=function(){this.C.Qa()};var Ma=function(){this.sa=!1;this.W=new za};k=Ma.prototype;k.get=function(a){return this.W.get(a)};k.set=function(a,b){this.sa||this.W.set(a,b)};k.has=function(a){return this.W.has(a)};k.remove=function(a){this.sa||this.W.remove(a)};k.qa=function(){return this.W.qa()};k.bc=function(){return this.W.bc()};k.Gb=function(){return this.W.Gb()};k.Qa=function(){this.sa=!0};k.Ac=function(){return this.sa};function Na(){for(var a=Oa,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function Pa(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}var Oa,Ra;function Sa(a){Oa=Oa||Pa();Ra=Ra||Na();for(var b=[],c=0;c<a.length;c+=3){var d=c+1<a.length,e=c+2<a.length,f=a.charCodeAt(c),g=d?a.charCodeAt(c+1):0,h=e?a.charCodeAt(c+2):0,m=f>>2,n=(f&3)<<4|g>>4,p=(g&15)<<2|h>>6,q=h&63;e||(q=64,d||(p=64));b.push(Oa[m],Oa[n],Oa[p],Oa[q])}return b.join("")}
function Ta(a){function b(m){for(;d<a.length;){var n=a.charAt(d++),p=Ra[n];if(p!=null)return p;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n);}return m}Oa=Oa||Pa();Ra=Ra||Na();for(var c="",d=0;;){var e=b(-1),f=b(0),g=b(64),h=b(64);if(h===64&&e===-1)return c;c+=String.fromCharCode(e<<2|f>>4);g!==64&&(c+=String.fromCharCode(f<<4&240|g>>2),h!==64&&(c+=String.fromCharCode(g<<6&192|h)))}};var Ua={};function Wa(a,b){Ua[a]=Ua[a]||[];Ua[a][b]=!0}function Xa(a){var b=Ua[a];if(!b||b.length===0)return"";for(var c=[],d=0,e=0;e<b.length;e++)e%8===0&&e>0&&(c.push(String.fromCharCode(d)),d=0),b[e]&&(d|=1<<e%8);d>0&&c.push(String.fromCharCode(d));return Sa(c.join("")).replace(/\.+$/,"")}function Ya(){for(var a=[],b=Ua.fdr||[],c=0;c<b.length;c++)b[c]&&a.push(c);return a.length>0?a:void 0};function Za(){}function $a(a){return typeof a==="function"}function ab(a){return typeof a==="string"}function bb(a){return typeof a==="number"&&!isNaN(a)}function cb(a){return Array.isArray(a)?a:[a]}function eb(a,b){if(a&&Array.isArray(a))for(var c=0;c<a.length;c++)if(a[c]&&b(a[c]))return a[c]}function fb(a,b){if(!bb(a)||!bb(b)||a>b)a=0,b=2147483647;return Math.floor(Math.random()*(b-a+1)+a)}
function gb(a,b){for(var c=new hb,d=0;d<a.length;d++)c.set(a[d],!0);for(var e=0;e<b.length;e++)if(c.get(b[e]))return!0;return!1}function ib(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])}function jb(a){return!!a&&(Object.prototype.toString.call(a)==="[object Arguments]"||Object.prototype.hasOwnProperty.call(a,"callee"))}function kb(a){return Math.round(Number(a))||0}function lb(a){return"false"===String(a).toLowerCase()?!1:!!a}
function mb(a){var b=[];if(Array.isArray(a))for(var c=0;c<a.length;c++)b.push(String(a[c]));return b}function nb(a){return a?a.replace(/^\s+|\s+$/g,""):""}function ob(){return new Date(Date.now())}function pb(){return ob().getTime()}var hb=function(){this.prefix="gtm.";this.values={}};hb.prototype.set=function(a,b){this.values[this.prefix+a]=b};hb.prototype.get=function(a){return this.values[this.prefix+a]};hb.prototype.contains=function(a){return this.get(a)!==void 0};
function qb(a,b,c){return a&&a.hasOwnProperty(b)?a[b]:c}function rb(a){var b=a;return function(){if(b){var c=b;b=void 0;try{c()}catch(d){}}}}function sb(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function tb(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),c.push.apply(c,b[a[d]]||[]);return c}function ub(a,b){return a.length>=b.length&&a.substring(0,b.length)===b}
function vb(a,b){var c=z;b=b||[];for(var d=c,e=0;e<a.length-1;e++){if(!d.hasOwnProperty(a[e]))return;d=d[a[e]];if(b.indexOf(d)>=0)return}return d}function wb(a,b){for(var c={},d=c,e=a.split("."),f=0;f<e.length-1;f++)d=d[e[f]]={};d[e[e.length-1]]=b;return c}var xb=/^\w{1,9}$/;function yb(a,b){a=a||{};b=b||",";var c=[];ib(a,function(d,e){xb.test(d)&&e&&c.push(d)});return c.join(b)}function Ab(a,b){function c(){e&&++d===b&&(e(),e=null,c.done=!0)}var d=0,e=a;c.done=!1;return c}
function Bb(a){if(!a)return a;var b=a;try{b=decodeURIComponent(a)}catch(d){}var c=b.split(",");return c.length===2&&c[0]===c[1]?c[0]:a}
function Cb(a,b,c){function d(n){var p=n.split("=")[0];if(a.indexOf(p)<0)return n;if(c!==void 0)return p+"="+c}function e(n){return n.split("&").map(d).filter(function(p){return p!==void 0}).join("&")}var f=b.href.split(/[?#]/)[0],g=b.search,h=b.hash;g[0]==="?"&&(g=g.substring(1));h[0]==="#"&&(h=h.substring(1));g=e(g);h=e(h);g!==""&&(g="?"+g);h!==""&&(h="#"+h);var m=""+f+g+h;m[m.length-1]==="/"&&(m=m.substring(0,m.length-1));return m}
function Db(a){for(var b=0;b<3;++b)try{var c=decodeURIComponent(a).replace(/\+/g," ");if(c===a)break;a=c}catch(d){return""}return a};/*
Copyright Google LLC
SPDX-License-Identifier: Apache-2.0
*/
var Eb=globalThis.trustedTypes,Fb;function Gb(){var a=null;if(!Eb)return a;try{var b=function(c){return c};a=Eb.createPolicy("goog#html",{createHTML:b,createScript:b,createScriptURL:b})}catch(c){}return a}function Hb(){Fb===void 0&&(Fb=Gb());return Fb};var Ib=function(a){this.C=a};Ib.prototype.toString=function(){return this.C+""};function Jb(a){var b=a,c=Hb(),d=c?c.createScriptURL(b):b;return new Ib(d)}function Kb(a){if(a instanceof Ib)return a.C;throw Error("");};var Lb=ua([""]),Mb=ta(["\x00"],["\\0"]),Nb=ta(["\n"],["\\n"]),Ob=ta(["\x00"],["\\u0000"]);function Pb(a){return a.toString().indexOf("`")===-1}Pb(function(a){return a(Lb)})||Pb(function(a){return a(Mb)})||Pb(function(a){return a(Nb)})||Pb(function(a){return a(Ob)});var Qb=function(a){this.C=a};Qb.prototype.toString=function(){return this.C};var Rb=function(a){this.Bn=a};function Sb(a){return new Rb(function(b){return b.substr(0,a.length+1).toLowerCase()===a+":"})}var Tb=[Sb("data"),Sb("http"),Sb("https"),Sb("mailto"),Sb("ftp"),new Rb(function(a){return/^[^:]*([/?#]|$)/.test(a)})];function Ub(a){var b;b=b===void 0?Tb:b;if(a instanceof Qb)return a;for(var c=0;c<b.length;++c){var d=b[c];if(d instanceof Rb&&d.Bn(a))return new Qb(a)}}var Vb=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;
function Wb(a){var b;if(a instanceof Qb)if(a instanceof Qb)b=a.C;else throw Error("");else b=Vb.test(a)?a:void 0;return b};function Xb(a,b){var c=Wb(b);c!==void 0&&(a.action=c)};function Yb(a,b){throw Error(b===void 0?"unexpected value "+a+"!":b);};var Zb=function(a){this.C=a};Zb.prototype.toString=function(){return this.C+""};var ac=function(){this.C=$b[0].toLowerCase()};ac.prototype.toString=function(){return this.C};function bc(a,b){var c=[new ac];if(c.length===0)throw Error("");var d=c.map(function(f){var g;if(f instanceof ac)g=f.C;else throw Error("");return g}),e=b.toLowerCase();if(d.every(function(f){return e.indexOf(f)!==0}))throw Error('Attribute "'+b+'" does not match any of the allowed prefixes.');a.setAttribute(b,"true")};var cc=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};"ARTICLE SECTION NAV ASIDE H1 H2 H3 H4 H5 H6 HEADER FOOTER ADDRESS P HR PRE BLOCKQUOTE OL UL LH LI DL DT DD FIGURE FIGCAPTION MAIN DIV EM STRONG SMALL S CITE Q DFN ABBR RUBY RB RT RTC RP DATA TIME CODE VAR SAMP KBD SUB SUP I B U MARK BDI BDO SPAN BR WBR NOBR INS DEL PICTURE PARAM TRACK MAP TABLE CAPTION COLGROUP COL TBODY THEAD TFOOT TR TD TH SELECT DATALIST OPTGROUP OPTION OUTPUT PROGRESS METER FIELDSET LEGEND DETAILS SUMMARY MENU DIALOG SLOT CANVAS FONT CENTER ACRONYM BASEFONT BIG DIR HGROUP STRIKE TT".split(" ").concat(["BUTTON",
"INPUT"]);function dc(a){return a===null?"null":a===void 0?"undefined":a};var z=window,ec=window.history,A=document,fc=navigator;function gc(){var a;try{a=fc.serviceWorker}catch(b){return}return a}var hc=A.currentScript,ic=hc&&hc.src;function jc(a,b){var c=z[a];z[a]=c===void 0?b:c;return z[a]}function kc(a){return(fc.userAgent||"").indexOf(a)!==-1}function lc(){return kc("Firefox")||kc("FxiOS")}function mc(){return(kc("GSA")||kc("GoogleApp"))&&(kc("iPhone")||kc("iPad"))}function nc(){return kc("Edg/")||kc("EdgA/")||kc("EdgiOS/")}
var oc={async:1,nonce:1,onerror:1,onload:1,src:1,type:1},pc={onload:1,src:1,width:1,height:1,style:1};function qc(a,b,c){b&&ib(b,function(d,e){d=d.toLowerCase();c.hasOwnProperty(d)||a.setAttribute(d,e)})}
function rc(a,b,c,d,e){var f=A.createElement("script");qc(f,d,oc);f.type="text/javascript";f.async=d&&d.async===!1?!1:!0;var g;g=Jb(dc(a));f.src=Kb(g);var h,m=f.ownerDocument;m=m===void 0?document:m;var n,p,q=(p=(n=m).querySelector)==null?void 0:p.call(n,"script[nonce]");(h=q==null?"":q.nonce||q.getAttribute("nonce")||"")&&f.setAttribute("nonce",h);b&&(f.onload=b);c&&(f.onerror=c);if(e)e.appendChild(f);else{var r=A.getElementsByTagName("script")[0]||A.body||A.head;r.parentNode.insertBefore(f,r)}return f}
function sc(){if(ic){var a=ic.toLowerCase();if(a.indexOf("https://")===0)return 2;if(a.indexOf("http://")===0)return 3}return 1}function tc(a,b,c,d,e,f){f=f===void 0?!0:f;var g=e,h=!1;g||(g=A.createElement("iframe"),h=!0);qc(g,c,pc);d&&ib(d,function(n,p){g.dataset[n]=p});f&&(g.height="0",g.width="0",g.style.display="none",g.style.visibility="hidden");a!==void 0&&(g.src=a);if(h){var m=A.body&&A.body.lastChild||A.body||A.head;m.parentNode.insertBefore(g,m)}b&&(g.onload=b);return g}
function uc(a,b,c,d){return vc(a,b,c,d)}function wc(a,b,c,d){a.addEventListener&&a.addEventListener(b,c,!!d)}function xc(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}function D(a){z.setTimeout(a,0)}function yc(a,b){return a&&b&&a.attributes&&a.attributes[b]?a.attributes[b].value:null}function zc(a){var b=a.innerText||a.textContent||"";b&&b!==" "&&(b=b.replace(/^[\s\xa0]+/g,""),b=b.replace(/[\s\xa0]+$/g,""));b&&(b=b.replace(/(\xa0+|\s{2,}|\n|\r\t)/g," "));return b}
function Ac(a){var b=A.createElement("div"),c=b,d,e=dc("A<div>"+a+"</div>"),f=Hb(),g=f?f.createHTML(e):e;d=new Zb(g);if(c.nodeType===1&&/^(script|style)$/i.test(c.tagName))throw Error("");var h;if(d instanceof Zb)h=d.C;else throw Error("");c.innerHTML=h;b=b.lastChild;for(var m=[];b&&b.firstChild;)m.push(b.removeChild(b.firstChild));return m}
function Bc(a,b,c){c=c||100;for(var d={},e=0;e<b.length;e++)d[b[e]]=!0;for(var f=a,g=0;f&&g<=c;g++){if(d[String(f.tagName).toLowerCase()])return f;f=f.parentElement}return null}function Cc(a,b,c){var d;try{d=fc.sendBeacon&&fc.sendBeacon(a)}catch(e){Wa("TAGGING",15)}d?b==null||b():vc(a,b,c)}function Dc(a,b){try{return fc.sendBeacon(a,b)}catch(c){Wa("TAGGING",15)}return!1}var Ec={cache:"no-store",credentials:"include",keepalive:!0,method:"POST",mode:"no-cors",redirect:"follow"};
function Fc(a,b,c,d,e){if(Gc()){var f=Object.assign({},Ec);b&&(f.body=b);c&&(c.attributionReporting&&(f.attributionReporting=c.attributionReporting),c.browsingTopics&&(f.browsingTopics=c.browsingTopics),c.credentials&&(f.credentials=c.credentials),c.mode&&(f.mode=c.mode),c.method&&(f.method=c.method));try{var g=z.fetch(a,f);if(g)return g.then(function(m){m&&(m.ok||m.status===0)?d==null||d():e==null||e()}).catch(function(){e==null||e()}),!0}catch(m){}}if(c&&c.ji)return e==null||e(),!1;if(b){var h=
Dc(a,b);h?d==null||d():e==null||e();return h}Hc(a,d,e);return!0}function Gc(){return typeof z.fetch==="function"}function Ic(a,b){var c=a[b];c&&typeof c.animVal==="string"&&(c=c.animVal);return c}function Jc(){var a=z.performance;if(a&&$a(a.now))return a.now()}
function Kc(){var a,b=z.performance;if(b&&b.getEntriesByType)try{var c=b.getEntriesByType("navigation");c&&c.length>0&&(a=c[0].type)}catch(d){return"e"}if(!a)return"u";switch(a){case "navigate":return"n";case "back_forward":return"h";case "reload":return"r";case "prerender":return"p";default:return"x"}}function Lc(){return z.performance||void 0}function Mc(){var a=z.webPixelsManager;return a?a.createShopifyExtend!==void 0:!1}
var vc=function(a,b,c,d){var e=new Image(1,1);qc(e,d,{});e.onload=function(){e.onload=null;b&&b()};e.onerror=function(){e.onerror=null;c&&c()};e.src=a;return e},Hc=Cc;function Nc(a,b){return this.evaluate(a)&&this.evaluate(b)}function Oc(a,b){return this.evaluate(a)===this.evaluate(b)}function Pc(a,b){return this.evaluate(a)||this.evaluate(b)}function Qc(a,b){var c=this.evaluate(a),d=this.evaluate(b);return String(c).indexOf(String(d))>-1}function Rc(a,b){var c=String(this.evaluate(a)),d=String(this.evaluate(b));return c.substring(0,d.length)===d}
function Sc(a,b){var c=this.evaluate(a),d=this.evaluate(b);switch(c){case "pageLocation":var e=z.location.href;d instanceof Ma&&d.get("stripProtocol")&&(e=e.replace(/^https?:\/\//,""));return e}};/*
jQuery (c) 2005, 2012 jQuery Foundation, Inc. jquery.org/license.
*/
var Tc=/\[object (Boolean|Number|String|Function|Array|Date|RegExp)\]/,Uc=function(a){if(a==null)return String(a);var b=Tc.exec(Object.prototype.toString.call(Object(a)));return b?b[1].toLowerCase():"object"},Vc=function(a,b){return Object.prototype.hasOwnProperty.call(Object(a),b)},Wc=function(a){if(!a||Uc(a)!="object"||a.nodeType||a==a.window)return!1;try{if(a.constructor&&!Vc(a,"constructor")&&!Vc(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}for(var b in a);return b===void 0||
Vc(a,b)},Xc=function(a,b){var c=b||(Uc(a)=="array"?[]:{}),d;for(d in a)if(Vc(a,d)){var e=a[d];Uc(e)=="array"?(Uc(c[d])!="array"&&(c[d]=[]),c[d]=Xc(e,c[d])):Wc(e)?(Wc(c[d])||(c[d]={}),c[d]=Xc(e,c[d])):c[d]=e}return c};function Yc(a){if(a==void 0||Array.isArray(a)||Wc(a))return!0;switch(typeof a){case "boolean":case "number":case "string":case "function":return!0}return!1}function Zc(a){return typeof a==="number"&&a>=0&&isFinite(a)&&a%1===0||typeof a==="string"&&a[0]!=="-"&&a===""+parseInt(a)};var $c=function(a){a=a===void 0?[]:a;this.W=new za;this.values=[];this.sa=!1;for(var b in a)a.hasOwnProperty(b)&&(Zc(b)?this.values[Number(b)]=a[Number(b)]:this.W.set(b,a[b]))};k=$c.prototype;k.toString=function(a){if(a&&a.indexOf(this)>=0)return"";for(var b=[],c=0;c<this.values.length;c++){var d=this.values[c];d===null||d===void 0?b.push(""):d instanceof $c?(a=a||[],a.push(this),b.push(d.toString(a)),a.pop()):b.push(String(d))}return b.join(",")};
k.set=function(a,b){if(!this.sa)if(a==="length"){if(!Zc(b))throw Ha(Error("RangeError: Length property must be a valid integer."));this.values.length=Number(b)}else Zc(a)?this.values[Number(a)]=b:this.W.set(a,b)};k.get=function(a){return a==="length"?this.length():Zc(a)?this.values[Number(a)]:this.W.get(a)};k.length=function(){return this.values.length};k.qa=function(){for(var a=this.W.qa(),b=0;b<this.values.length;b++)this.values.hasOwnProperty(b)&&a.push(String(b));return a};
k.bc=function(){for(var a=this.W.bc(),b=0;b<this.values.length;b++)this.values.hasOwnProperty(b)&&a.push(this.values[b]);return a};k.Gb=function(){for(var a=this.W.Gb(),b=0;b<this.values.length;b++)this.values.hasOwnProperty(b)&&a.push([String(b),this.values[b]]);return a};k.remove=function(a){Zc(a)?delete this.values[Number(a)]:this.sa||this.W.remove(a)};k.pop=function(){return this.values.pop()};k.push=function(){return this.values.push.apply(this.values,sa(wa.apply(0,arguments)))};k.shift=function(){return this.values.shift()};
k.splice=function(a,b){var c=wa.apply(2,arguments);return b===void 0&&c.length===0?new $c(this.values.splice(a)):new $c(this.values.splice.apply(this.values,[a,b||0].concat(sa(c))))};k.unshift=function(){return this.values.unshift.apply(this.values,sa(wa.apply(0,arguments)))};k.has=function(a){return Zc(a)&&this.values.hasOwnProperty(a)||this.W.has(a)};k.Qa=function(){this.sa=!0;Object.freeze(this.values)};k.Ac=function(){return this.sa};
function ad(a){for(var b=[],c=0;c<a.length();c++)a.has(c)&&(b[c]=a.get(c));return b};var bd=function(a,b){this.functionName=a;this.Hd=b;this.W=new za;this.sa=!1};k=bd.prototype;k.toString=function(){return this.functionName};k.getName=function(){return this.functionName};k.getKeys=function(){return new $c(this.qa())};k.invoke=function(a){return this.Hd.call.apply(this.Hd,[new cd(this,a)].concat(sa(wa.apply(1,arguments))))};k.kb=function(a){var b=wa.apply(1,arguments);try{return this.invoke.apply(this,[a].concat(sa(b)))}catch(c){}};k.get=function(a){return this.W.get(a)};
k.set=function(a,b){this.sa||this.W.set(a,b)};k.has=function(a){return this.W.has(a)};k.remove=function(a){this.sa||this.W.remove(a)};k.qa=function(){return this.W.qa()};k.bc=function(){return this.W.bc()};k.Gb=function(){return this.W.Gb()};k.Qa=function(){this.sa=!0};k.Ac=function(){return this.sa};var dd=function(a,b){bd.call(this,a,b)};qa(dd,bd);var ed=function(a,b){bd.call(this,a,b)};qa(ed,bd);var cd=function(a,b){this.Hd=a;this.J=b};
cd.prototype.evaluate=function(a){var b=this.J;return Array.isArray(a)?Ka(b,a):a};cd.prototype.getName=function(){return this.Hd.getName()};cd.prototype.Id=function(){return this.J.Id()};var fd=function(){this.map=new Map};fd.prototype.set=function(a,b){this.map.set(a,b)};fd.prototype.get=function(a){return this.map.get(a)};var gd=function(){this.keys=[];this.values=[]};gd.prototype.set=function(a,b){this.keys.push(a);this.values.push(b)};gd.prototype.get=function(a){var b=this.keys.indexOf(a);if(b>-1)return this.values[b]};function hd(){try{return Map?new fd:new gd}catch(a){return new gd}};var id=function(a){if(a instanceof id)return a;if(Yc(a))throw Error("Type of given value has an equivalent Pixie type.");this.value=a};id.prototype.getValue=function(){return this.value};id.prototype.toString=function(){return String(this.value)};var kd=function(a){this.promise=a;this.sa=!1;this.W=new za;this.W.set("then",jd(this));this.W.set("catch",jd(this,!0));this.W.set("finally",jd(this,!1,!0))};k=kd.prototype;k.get=function(a){return this.W.get(a)};k.set=function(a,b){this.sa||this.W.set(a,b)};k.has=function(a){return this.W.has(a)};k.remove=function(a){this.sa||this.W.remove(a)};k.qa=function(){return this.W.qa()};k.bc=function(){return this.W.bc()};k.Gb=function(){return this.W.Gb()};
var jd=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;return new dd("",function(d,e){b&&(e=d,d=void 0);c&&(e=d);d instanceof dd||(d=void 0);e instanceof dd||(e=void 0);var f=Fa(this.J),g=function(m){return function(n){try{return c?(m.invoke(f),a.promise):m.invoke(f,n)}catch(p){return Promise.reject(p instanceof Error?new id(p):String(p))}}},h=a.promise.then(d&&g(d),e&&g(e));return new kd(h)})};kd.prototype.Qa=function(){this.sa=!0};kd.prototype.Ac=function(){return this.sa};function ld(a,b,c){var d=hd(),e=function(g,h){for(var m=g.qa(),n=0;n<m.length;n++)h[m[n]]=f(g.get(m[n]))},f=function(g){if(g===null||g===void 0)return g;var h=d.get(g);if(h)return h;if(g instanceof $c){var m=[];d.set(g,m);for(var n=g.qa(),p=0;p<n.length;p++)m[n[p]]=f(g.get(n[p]));return m}if(g instanceof kd)return g.promise.then(function(u){return ld(u,b,1)},function(u){return Promise.reject(ld(u,b,1))});if(g instanceof Ma){var q={};d.set(g,q);e(g,q);return q}if(g instanceof dd){var r=function(){for(var u=
wa.apply(0,arguments),v=[],w=0;w<u.length;w++)v[w]=md(u[w],b,c);var x=new Da(b?b.Id():new Ca);b&&(x.C=b.C);return f(g.invoke.apply(g,[x].concat(sa(v))))};d.set(g,r);e(g,r);return r}var t=!1;switch(c){case 1:t=!0;break;case 2:t=!1;break;case 3:t=!1;break;default:}if(g instanceof id&&t)return g.getValue();switch(typeof g){case "boolean":case "number":case "string":case "undefined":return g;
case "object":if(g===null)return null}};return f(a)}
function md(a,b,c){var d=hd(),e=function(g,h){for(var m in g)g.hasOwnProperty(m)&&h.set(m,f(g[m]))},f=function(g){var h=d.get(g);if(h)return h;if(Array.isArray(g)||jb(g)){var m=new $c;d.set(g,m);for(var n in g)g.hasOwnProperty(n)&&m.set(n,f(g[n]));return m}if(Wc(g)){var p=new Ma;d.set(g,p);e(g,p);return p}if(typeof g==="function"){var q=new dd("",function(){for(var u=wa.apply(0,arguments),v=[],w=0;w<u.length;w++)v[w]=ld(this.evaluate(u[w]),b,c);return f((0,this.J.N)(g,g,v))});d.set(g,q);e(g,q);return q}var r=typeof g;if(g===null||r==="string"||r==="number"||r==="boolean")return g;var t=!1;switch(c){case 1:t=!0;break;case 2:t=!1;break;default:}if(g!==void 0&&t)return new id(g)};return f(a)};var nd={supportedMethods:"concat every filter forEach hasOwnProperty indexOf join lastIndexOf map pop push reduce reduceRight reverse shift slice some sort splice unshift toString".split(" "),concat:function(a){for(var b=[],c=0;c<this.length();c++)b.push(this.get(c));for(var d=1;d<arguments.length;d++)if(arguments[d]instanceof $c)for(var e=arguments[d],f=0;f<e.length();f++)b.push(e.get(f));else b.push(arguments[d]);return new $c(b)},every:function(a,b){for(var c=this.length(),d=0;d<this.length()&&
d<c;d++)if(this.has(d)&&!b.invoke(a,this.get(d),d,this))return!1;return!0},filter:function(a,b){for(var c=this.length(),d=[],e=0;e<this.length()&&e<c;e++)this.has(e)&&b.invoke(a,this.get(e),e,this)&&d.push(this.get(e));return new $c(d)},forEach:function(a,b){for(var c=this.length(),d=0;d<this.length()&&d<c;d++)this.has(d)&&b.invoke(a,this.get(d),d,this)},hasOwnProperty:function(a,b){return this.has(b)},indexOf:function(a,b,c){var d=this.length(),e=c===void 0?0:Number(c);e<0&&(e=Math.max(d+e,0));for(var f=
e;f<d;f++)if(this.has(f)&&this.get(f)===b)return f;return-1},join:function(a,b){for(var c=[],d=0;d<this.length();d++)c.push(this.get(d));return c.join(b)},lastIndexOf:function(a,b,c){var d=this.length(),e=d-1;c!==void 0&&(e=c<0?d+c:Math.min(c,e));for(var f=e;f>=0;f--)if(this.has(f)&&this.get(f)===b)return f;return-1},map:function(a,b){for(var c=this.length(),d=[],e=0;e<this.length()&&e<c;e++)this.has(e)&&(d[e]=b.invoke(a,this.get(e),e,this));return new $c(d)},pop:function(){return this.pop()},push:function(a){return this.push.apply(this,
sa(wa.apply(1,arguments)))},reduce:function(a,b,c){var d=this.length(),e,f=0;if(c!==void 0)e=c;else{if(d===0)throw Ha(Error("TypeError: Reduce on List with no elements."));for(var g=0;g<d;g++)if(this.has(g)){e=this.get(g);f=g+1;break}if(g===d)throw Ha(Error("TypeError: Reduce on List with no elements."));}for(var h=f;h<d;h++)this.has(h)&&(e=b.invoke(a,e,this.get(h),h,this));return e},reduceRight:function(a,b,c){var d=this.length(),e,f=d-1;if(c!==void 0)e=c;else{if(d===0)throw Ha(Error("TypeError: ReduceRight on List with no elements."));
for(var g=1;g<=d;g++)if(this.has(d-g)){e=this.get(d-g);f=d-(g+1);break}if(g>d)throw Ha(Error("TypeError: ReduceRight on List with no elements."));}for(var h=f;h>=0;h--)this.has(h)&&(e=b.invoke(a,e,this.get(h),h,this));return e},reverse:function(){for(var a=ad(this),b=a.length-1,c=0;b>=0;b--,c++)a.hasOwnProperty(b)?this.set(c,a[b]):this.remove(c);return this},shift:function(){return this.shift()},slice:function(a,b,c){var d=this.length();b===void 0&&(b=0);b=b<0?Math.max(d+b,0):Math.min(b,d);c=c===
void 0?d:c<0?Math.max(d+c,0):Math.min(c,d);c=Math.max(b,c);for(var e=[],f=b;f<c;f++)e.push(this.get(f));return new $c(e)},some:function(a,b){for(var c=this.length(),d=0;d<this.length()&&d<c;d++)if(this.has(d)&&b.invoke(a,this.get(d),d,this))return!0;return!1},sort:function(a,b){var c=ad(this);b===void 0?c.sort():c.sort(function(e,f){return Number(b.invoke(a,e,f))});for(var d=0;d<c.length;d++)c.hasOwnProperty(d)?this.set(d,c[d]):this.remove(d);return this},splice:function(a,b,c){return this.splice.apply(this,
[b,c].concat(sa(wa.apply(3,arguments))))},toString:function(){return this.toString()},unshift:function(a){return this.unshift.apply(this,sa(wa.apply(1,arguments)))}};var od={charAt:1,concat:1,indexOf:1,lastIndexOf:1,match:1,replace:1,search:1,slice:1,split:1,substring:1,toLowerCase:1,toLocaleLowerCase:1,toString:1,toUpperCase:1,toLocaleUpperCase:1,trim:1},pd=new ya("break"),qd=new ya("continue");function rd(a,b){return this.evaluate(a)+this.evaluate(b)}function sd(a,b){return this.evaluate(a)&&this.evaluate(b)}
function td(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c);if(!(f instanceof $c))throw Error("Error: Non-List argument given to Apply instruction.");if(d===null||d===void 0)throw Ha(Error("TypeError: Can't read property "+e+" of "+d+"."));var g=typeof d==="number";if(typeof d==="boolean"||g){if(e==="toString"){if(g&&f.length()){var h=ld(f.get(0));try{return d.toString(h)}catch(v){}}return d.toString()}throw Ha(Error("TypeError: "+d+"."+e+" is not a function."));}if(typeof d===
"string"){if(od.hasOwnProperty(e)){var m=2;m=1;var n=ld(f,void 0,m);return md(d[e].apply(d,n),this.J)}throw Ha(Error("TypeError: "+e+" is not a function"));}if(d instanceof $c){if(d.has(e)){var p=d.get(String(e));if(p instanceof dd){var q=ad(f);return p.invoke.apply(p,[this.J].concat(sa(q)))}throw Ha(Error("TypeError: "+e+" is not a function"));}if(nd.supportedMethods.indexOf(e)>=
0){var r=ad(f);return nd[e].call.apply(nd[e],[d,this.J].concat(sa(r)))}}if(d instanceof dd||d instanceof Ma||d instanceof kd){if(d.has(e)){var t=d.get(e);if(t instanceof dd){var u=ad(f);return t.invoke.apply(t,[this.J].concat(sa(u)))}throw Ha(Error("TypeError: "+e+" is not a function"));}if(e==="toString")return d instanceof dd?d.getName():d.toString();if(e==="hasOwnProperty")return d.has(f.get(0))}if(d instanceof id&&e==="toString")return d.toString();throw Ha(Error("TypeError: Object has no '"+
e+"' property."));}function ud(a,b){a=this.evaluate(a);if(typeof a!=="string")throw Error("Invalid key name given for assignment.");var c=this.J;if(!c.has(a))throw Error("Attempting to assign to undefined value "+b);var d=this.evaluate(b);c.set(a,d);return d}function vd(){var a=wa.apply(0,arguments),b=Fa(this.J),c=Ja(b,a);if(c instanceof ya)return c}function wd(){return pd}function xd(a){for(var b=this.evaluate(a),c=0;c<b.length;c++){var d=this.evaluate(b[c]);if(d instanceof ya)return d}}
function yd(){for(var a=this.J,b=0;b<arguments.length-1;b+=2){var c=arguments[b];if(typeof c==="string"){var d=this.evaluate(arguments[b+1]);Ea(a,c,d,!0)}}}function zd(){return qd}function Ad(a,b){return new ya(a,this.evaluate(b))}function Bd(a,b){for(var c=wa.apply(2,arguments),d=new $c,e=this.evaluate(b),f=0;f<e.length;f++)d.push(e[f]);var g=[51,a,d].concat(sa(c));this.J.add(a,this.evaluate(g))}function Cd(a,b){return this.evaluate(a)/this.evaluate(b)}
function Dd(a,b){var c=this.evaluate(a),d=this.evaluate(b),e=c instanceof id,f=d instanceof id;return e||f?e&&f?c.getValue()===d.getValue():!1:c==d}function Ed(){for(var a,b=0;b<arguments.length;b++)a=this.evaluate(arguments[b]);return a}function Fd(a,b,c,d){for(var e=0;e<b();e++){var f=a(c(e)),g=Ja(f,d);if(g instanceof ya){if(g.type==="break")break;if(g.type==="return")return g}}}
function Gd(a,b,c){if(typeof b==="string")return Fd(a,function(){return b.length},function(f){return f},c);if(b instanceof Ma||b instanceof kd||b instanceof $c||b instanceof dd){var d=b.qa(),e=d.length;return Fd(a,function(){return e},function(f){return d[f]},c)}}function Hd(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Gd(function(h){g.set(d,h);return g},e,f)}
function Id(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Gd(function(h){var m=Fa(g);Ea(m,d,h,!0);return m},e,f)}function Jd(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Gd(function(h){var m=Fa(g);m.add(d,h);return m},e,f)}function Kd(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Md(function(h){g.set(d,h);return g},e,f)}
function Nd(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Md(function(h){var m=Fa(g);Ea(m,d,h,!0);return m},e,f)}function Od(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c),g=this.J;return Md(function(h){var m=Fa(g);m.add(d,h);return m},e,f)}
function Md(a,b,c){if(typeof b==="string")return Fd(a,function(){return b.length},function(d){return b[d]},c);if(b instanceof $c)return Fd(a,function(){return b.length()},function(d){return b.get(d)},c);throw Ha(Error("The value is not iterable."));}
function Pd(a,b,c,d){function e(q,r){for(var t=0;t<f.length();t++){var u=f.get(t);r.add(u,q.get(u))}}var f=this.evaluate(a);if(!(f instanceof $c))throw Error("TypeError: Non-List argument given to ForLet instruction.");var g=this.J,h=this.evaluate(d),m=Fa(g);for(e(g,m);Ka(m,b);){var n=Ja(m,h);if(n instanceof ya){if(n.type==="break")break;if(n.type==="return")return n}var p=Fa(g);e(m,p);Ka(p,c);m=p}}
function Qd(a,b){var c=wa.apply(2,arguments),d=this.J,e=this.evaluate(b);if(!(e instanceof $c))throw Error("Error: non-List value given for Fn argument names.");return new dd(a,function(){return function(){var f=wa.apply(0,arguments),g=Fa(d);g.C===void 0&&(g.C=this.J.C);for(var h=[],m=0;m<f.length;m++){var n=this.evaluate(f[m]);h[m]=n}for(var p=e.get("length"),q=0;q<p;q++)q<h.length?g.add(e.get(q),h[q]):g.add(e.get(q),void 0);g.add("arguments",new $c(h));var r=Ja(g,c);if(r instanceof ya)return r.type===
"return"?r.data:r}}())}function Rd(a){var b=this.evaluate(a),c=this.J;if(Sd&&!c.has(b))throw new ReferenceError(b+" is not defined.");return c.get(b)}
function Td(a,b){var c,d=this.evaluate(a),e=this.evaluate(b);if(d===void 0||d===null)throw Ha(Error("TypeError: Cannot read properties of "+d+" (reading '"+e+"')"));if(d instanceof Ma||d instanceof kd||d instanceof $c||d instanceof dd)c=d.get(e);else if(typeof d==="string")e==="length"?c=d.length:Zc(e)&&(c=d[e]);else if(d instanceof id)return;return c}function Ud(a,b){return this.evaluate(a)>this.evaluate(b)}function Vd(a,b){return this.evaluate(a)>=this.evaluate(b)}
function Wd(a,b){var c=this.evaluate(a),d=this.evaluate(b);c instanceof id&&(c=c.getValue());d instanceof id&&(d=d.getValue());return c===d}function Xd(a,b){return!Wd.call(this,a,b)}function Yd(a,b,c){var d=[];this.evaluate(a)?d=this.evaluate(b):c&&(d=this.evaluate(c));var e=Ja(this.J,d);if(e instanceof ya)return e}var Sd=!1;
function Zd(a,b){return this.evaluate(a)<this.evaluate(b)}function $d(a,b){return this.evaluate(a)<=this.evaluate(b)}function ae(){for(var a=new $c,b=0;b<arguments.length;b++){var c=this.evaluate(arguments[b]);a.push(c)}return a}function be(){for(var a=new Ma,b=0;b<arguments.length-1;b+=2){var c=String(this.evaluate(arguments[b])),d=this.evaluate(arguments[b+1]);a.set(c,d)}return a}function ce(a,b){return this.evaluate(a)%this.evaluate(b)}
function de(a,b){return this.evaluate(a)*this.evaluate(b)}function ee(a){return-this.evaluate(a)}function fe(a){return!this.evaluate(a)}function ge(a,b){return!Dd.call(this,a,b)}function he(){return null}function ie(a,b){return this.evaluate(a)||this.evaluate(b)}function je(a,b){var c=this.evaluate(a);this.evaluate(b);return c}function ke(a){return this.evaluate(a)}function le(){return wa.apply(0,arguments)}function me(a){return new ya("return",this.evaluate(a))}
function ne(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c);if(d===null||d===void 0)throw Ha(Error("TypeError: Can't set property "+e+" of "+d+"."));(d instanceof dd||d instanceof $c||d instanceof Ma)&&d.set(String(e),f);return f}function oe(a,b){return this.evaluate(a)-this.evaluate(b)}
function pe(a,b,c){var d=this.evaluate(a),e=this.evaluate(b),f=this.evaluate(c);if(!Array.isArray(e)||!Array.isArray(f))throw Error("Error: Malformed switch instruction.");for(var g,h=!1,m=0;m<e.length;m++)if(h||d===this.evaluate(e[m]))if(g=this.evaluate(f[m]),g instanceof ya){var n=g.type;if(n==="break")return;if(n==="return"||n==="continue")return g}else h=!0;if(f.length===e.length+1&&(g=this.evaluate(f[f.length-1]),g instanceof ya&&(g.type==="return"||g.type==="continue")))return g}
function qe(a,b,c){return this.evaluate(a)?this.evaluate(b):this.evaluate(c)}function re(a){var b=this.evaluate(a);return b instanceof dd?"function":typeof b}function se(){for(var a=this.J,b=0;b<arguments.length;b++){var c=arguments[b];typeof c!=="string"||a.add(c,void 0)}}
function te(a,b,c,d){var e=this.evaluate(d);if(this.evaluate(c)){var f=Ja(this.J,e);if(f instanceof ya){if(f.type==="break")return;if(f.type==="return")return f}}for(;this.evaluate(a);){var g=Ja(this.J,e);if(g instanceof ya){if(g.type==="break")break;if(g.type==="return")return g}this.evaluate(b)}}function ue(a){return~Number(this.evaluate(a))}function ve(a,b){return Number(this.evaluate(a))<<Number(this.evaluate(b))}function we(a,b){return Number(this.evaluate(a))>>Number(this.evaluate(b))}
function xe(a,b){return Number(this.evaluate(a))>>>Number(this.evaluate(b))}function ye(a,b){return Number(this.evaluate(a))&Number(this.evaluate(b))}function ze(a,b){return Number(this.evaluate(a))^Number(this.evaluate(b))}function Ae(a,b){return Number(this.evaluate(a))|Number(this.evaluate(b))}function Be(){}
function Ce(a,b,c){try{var d=this.evaluate(b);if(d instanceof ya)return d}catch(h){if(!(h instanceof Ga&&h.kk))throw h;var e=Fa(this.J);a!==""&&(h instanceof Ga&&(h=h.yk),e.add(a,new id(h)));var f=this.evaluate(c),g=Ja(e,f);if(g instanceof ya)return g}}function De(a,b){var c,d;try{d=this.evaluate(a)}catch(f){if(!(f instanceof Ga&&f.kk))throw f;c=f}var e=this.evaluate(b);if(e instanceof ya)return e;if(c)throw c;if(d instanceof ya)return d};var Fe=function(){this.C=new La;Ee(this)};Fe.prototype.execute=function(a){return this.C.Ai(a)};var Ee=function(a){var b=function(c,d){var e=new ed(String(c),d);e.Qa();a.C.C.set(String(c),e)};b("map",be);b("and",Nc);b("contains",Qc);b("equals",Oc);b("or",Pc);b("startsWith",Rc);b("variable",Sc)};var He=function(){this.H=!1;this.C=new La;Ge(this);this.H=!0};He.prototype.execute=function(a){return Ie(this.C.Ai(a))};var Je=function(a,b,c){return Ie(a.C.Zl(b,c))};He.prototype.Qa=function(){this.C.Qa()};
var Ge=function(a){var b=function(c,d){var e=String(c),f=new ed(e,d);f.Qa();a.C.C.set(e,f)};b(0,rd);b(1,sd);b(2,td);b(3,ud);b(56,ye);b(57,ve);b(58,ue);b(59,Ae);b(60,we);b(61,xe);b(62,ze);b(53,vd);b(4,wd);b(5,xd);b(68,Ce);b(52,yd);b(6,zd);b(49,Ad);b(7,ae);b(8,be);b(9,xd);b(50,Bd);b(10,Cd);b(12,Dd);b(13,Ed);b(67,De);b(51,Qd);b(47,Hd);b(54,Id);b(55,Jd);b(63,Pd);b(64,Kd);b(65,Nd);b(66,Od);b(15,Rd);b(16,Td);b(17,Td);b(18,Ud);b(19,Vd);b(20,Wd);b(21,Xd);b(22,Yd);b(23,Zd);b(24,$d);b(25,ce);b(26,de);b(27,
ee);b(28,fe);b(29,ge);b(45,he);b(30,ie);b(32,je);b(33,je);b(34,ke);b(35,ke);b(46,le);b(36,me);b(43,ne);b(37,oe);b(38,pe);b(39,qe);b(40,re);b(44,Be);b(41,se);b(42,te)};He.prototype.Id=function(){return this.C.Id()};function Ie(a){if(a instanceof ya||a instanceof dd||a instanceof $c||a instanceof Ma||a instanceof kd||a instanceof id||a===null||a===void 0||typeof a==="string"||typeof a==="number"||typeof a==="boolean")return a};var Ke=function(a){this.message=a};function Le(a){var b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[a];return b===void 0?new Ke("Value "+a+" can not be encoded in web-safe base64 dictionary."):b};function Me(a){switch(a){case 1:return"1";case 2:case 4:return"0";default:return"-"}};var Ne=/^[1-9a-zA-Z_-][1-9a-c][1-9a-v]\d$/;function Oe(a,b){for(var c="",d=!0;a>7;){var e=a&31;a>>=5;d?d=!1:e|=32;c=""+Le(e)+c}a<<=2;d||(a|=32);return c=""+Le(a|b)+c};var Pe=function(){function a(b){return{toString:function(){return b}}}return{Vk:a("consent"),Ki:a("convert_case_to"),Li:a("convert_false_to"),Mi:a("convert_null_to"),Ni:a("convert_true_to"),Oi:a("convert_undefined_to"),vo:a("debug_mode_metadata"),za:a("function"),sh:a("instance_name"),dm:a("live_only"),fm:a("malware_disabled"),METADATA:a("metadata"),im:a("original_activity_id"),Ho:a("original_vendor_template_id"),Go:a("once_on_load"),hm:a("once_per_event"),Sj:a("once_per_load"),Io:a("priority_override"),
Jo:a("respected_consent_types"),Zj:a("setup_tags"),og:a("tag_id"),dk:a("teardown_tags")}}();var nf;var of=[],pf=[],qf=[],rf=[],sf=[],tf,uf,vf;function wf(a){vf=vf||a}
function xf(){for(var a=data.resource||{},b=a.macros||[],c=0;c<b.length;c++)of.push(b[c]);for(var d=a.tags||[],e=0;e<d.length;e++)rf.push(d[e]);for(var f=a.predicates||[],g=0;g<f.length;g++)qf.push(f[g]);for(var h=a.rules||[],m=0;m<h.length;m++){for(var n=h[m],p={},q=0;q<n.length;q++){var r=n[q][0];p[r]=Array.prototype.slice.call(n[q],1);r!=="if"&&r!=="unless"||yf(p[r])}pf.push(p)}}
function yf(a){}var zf,Af=[],Bf=[];function Cf(a,b){var c={};c[Pe.za]="__"+a;for(var d in b)b.hasOwnProperty(d)&&(c["vtp_"+d]=b[d]);return c}
function Df(a,b,c){try{return uf(Ef(a,b,c))}catch(d){JSON.stringify(a)}return 2}function Ff(a){var b=a[Pe.za];if(!b)throw Error("Error: No function name given for function call.");return!!tf[b]}
var Ef=function(a,b,c){c=c||[];var d={},e;for(e in a)a.hasOwnProperty(e)&&(d[e]=Gf(a[e],b,c));return d},Gf=function(a,b,c){if(Array.isArray(a)){var d;switch(a[0]){case "function_id":return a[1];case "list":d=[];for(var e=1;e<a.length;e++)d.push(Gf(a[e],b,c));return d;case "macro":var f=a[1];if(c[f])return;var g=of[f];if(!g||b.isBlocked(g))return;c[f]=!0;var h=String(g[Pe.sh]);try{var m=Ef(g,b,c);m.vtp_gtmEventId=b.id;b.priorityId&&(m.vtp_gtmPriorityId=b.priorityId);d=Hf(m,{event:b,index:f,type:2,
name:h});zf&&(d=zf.Cm(d,m))}catch(y){b.logMacroError&&b.logMacroError(y,Number(f),h),d=!1}c[f]=!1;return d;case "map":d={};for(var n=1;n<a.length;n+=2)d[Gf(a[n],b,c)]=Gf(a[n+1],b,c);return d;case "template":d=[];for(var p=!1,q=1;q<a.length;q++){var r=Gf(a[q],b,c);vf&&(p=p||vf.yn(r));d.push(r)}return vf&&p?vf.Hm(d):d.join("");case "escape":d=Gf(a[1],b,c);if(vf&&Array.isArray(a[1])&&a[1][0]==="macro"&&vf.zn(a))return vf.Sn(d);d=String(d);for(var t=2;t<a.length;t++)Ye[a[t]]&&(d=Ye[a[t]](d));return d;
case "tag":var u=a[1];if(!rf[u])throw Error("Unable to resolve tag reference "+u+".");return{pk:a[2],index:u};case "zb":var v={arg0:a[2],arg1:a[3],ignore_case:a[5]};v[Pe.za]=a[1];var w=Df(v,b,c),x=!!a[4];return x||w!==2?x!==(w===1):null;default:throw Error("Attempting to expand unknown Value type: "+a[0]+".");}}return a},Hf=function(a,b){var c=a[Pe.za],d=b&&b.event;if(!c)throw Error("Error: No function name given for function call.");var e=tf[c],f=b&&b.type===2&&(d==null?void 0:d.reportMacroDiscrepancy)&&
e&&Af.indexOf(c)!==-1,g={},h={},m;for(m in a)a.hasOwnProperty(m)&&ub(m,"vtp_")&&(e&&(g[m]=a[m]),!e||f)&&(h[m.substring(4)]=a[m]);e&&d&&d.cachedModelValues&&(g.vtp_gtmCachedValues=d.cachedModelValues);if(b){if(b.name==null){var n;a:{var p=b.type,q=b.index;if(q==null)n="";else{var r;switch(p){case 2:r=of[q];break;case 1:r=rf[q];break;default:n="";break a}var t=r&&r[Pe.sh];n=t?String(t):""}}b.name=n}e&&(g.vtp_gtmEntityIndex=b.index,g.vtp_gtmEntityName=b.name)}var u,v,w;if(f&&Bf.indexOf(c)===-1){Bf.push(c);
var x=pb();u=e(g);var y=pb()-x,B=pb();v=nf(c,h,b);w=y-(pb()-B)}else if(e&&(u=e(g)),!e||f)v=nf(c,h,b);f&&d&&(d.reportMacroDiscrepancy(d.id,c,void 0,!0),Yc(u)?(Array.isArray(u)?Array.isArray(v):Wc(u)?Wc(v):typeof u==="function"?typeof v==="function":u===v)||d.reportMacroDiscrepancy(d.id,c):u!==v&&d.reportMacroDiscrepancy(d.id,c),w!==void 0&&d.reportMacroDiscrepancy(d.id,c,w));return e?u:v};var If=function(a,b,c){var d;d=Error.call(this,c);this.message=d.message;"stack"in d&&(this.stack=d.stack);this.permissionId=a;this.parameters=b;this.name="PermissionError"};qa(If,Error);If.prototype.getMessage=function(){return this.message};function Jf(a,b){if(Array.isArray(a)){Object.defineProperty(a,"context",{value:{line:b[0]}});for(var c=1;c<a.length;c++)Jf(a[c],b[c])}};function Kf(){return function(a,b){var c;var d=Lf;a instanceof Ga?(a.C=d,c=a):c=new Ga(a,d);var e=c;b&&e.debugInfo.push(b);throw e;}}function Lf(a){if(!a.length)return a;a.push({id:"main",line:0});for(var b=a.length-1;b>0;b--)bb(a[b].id)&&a.splice(b++,1);for(var c=a.length-1;c>0;c--)a[c].line=a[c-1].line;a.splice(0,1);return a};function Mf(a){function b(r){for(var t=0;t<r.length;t++)d[r[t]]=!0}for(var c=[],d=[],e=Nf(a),f=0;f<pf.length;f++){var g=pf[f],h=Of(g,e);if(h){for(var m=g.add||[],n=0;n<m.length;n++)c[m[n]]=!0;b(g.block||[])}else h===null&&b(g.block||[]);}for(var p=[],q=0;q<rf.length;q++)c[q]&&!d[q]&&(p[q]=!0);return p}
function Of(a,b){for(var c=a["if"]||[],d=0;d<c.length;d++){var e=b(c[d]);if(e===0)return!1;if(e===2)return null}for(var f=a.unless||[],g=0;g<f.length;g++){var h=b(f[g]);if(h===2)return null;if(h===1)return!1}return!0}function Nf(a){var b=[];return function(c){b[c]===void 0&&(b[c]=Df(qf[c],a));return b[c]}};function Pf(a,b){b[Pe.Ki]&&typeof a==="string"&&(a=b[Pe.Ki]===1?a.toLowerCase():a.toUpperCase());b.hasOwnProperty(Pe.Mi)&&a===null&&(a=b[Pe.Mi]);b.hasOwnProperty(Pe.Oi)&&a===void 0&&(a=b[Pe.Oi]);b.hasOwnProperty(Pe.Ni)&&a===!0&&(a=b[Pe.Ni]);b.hasOwnProperty(Pe.Li)&&a===!1&&(a=b[Pe.Li]);return a};var Qf=function(){this.C={}},Sf=function(a,b){var c=Rf.C,d;(d=c.C)[a]!=null||(d[a]=[]);c.C[a].push(function(){return b.apply(null,sa(wa.apply(0,arguments)))})};function Tf(a,b,c,d){if(a)for(var e=0;e<a.length;e++){var f=void 0,g="A policy function denied the permission request";try{f=a[e](b,c,d),g+="."}catch(h){g=typeof h==="string"?g+(": "+h):h instanceof Error?g+(": "+h.message):g+"."}if(!f)throw new If(c,d,g);}}
function Uf(a,b,c){return function(d){if(d){var e=a.C[d],f=a.C.all;if(e||f){var g=c.apply(void 0,[d].concat(sa(wa.apply(1,arguments))));Tf(e,b,d,g);Tf(f,b,d,g)}}}};var Yf=function(){var a=data.permissions||{},b=Vf.ctid,c=this;this.H={};this.C=new Qf;var d={},e={},f=Uf(this.C,b,function(g){return g&&d[g]?d[g].apply(void 0,[g].concat(sa(wa.apply(1,arguments)))):{}});ib(a,function(g,h){function m(p){var q=wa.apply(1,arguments);if(!n[p])throw Wf(p,{},"The requested additional permission "+p+" is not configured.");f.apply(null,[p].concat(sa(q)))}var n={};ib(h,function(p,q){var r=Xf(p,q);n[p]=r.assert;d[p]||(d[p]=r.P);r.hk&&!e[p]&&(e[p]=r.hk)});c.H[g]=function(p,
q){var r=n[p];if(!r)throw Wf(p,{},"The requested permission "+p+" is not configured.");var t=Array.prototype.slice.call(arguments,0);r.apply(void 0,t);f.apply(void 0,t);var u=e[p];u&&u.apply(null,[m].concat(sa(t.slice(1))))}})},Zf=function(a){return Rf.H[a]||function(){}};
function Xf(a,b){var c=Cf(a,b);c.vtp_permissionName=a;c.vtp_createPermissionError=Wf;try{return Hf(c)}catch(d){return{assert:function(e){throw new If(e,{},"Permission "+e+" is unknown.");},P:function(){throw new If(a,{},"Permission "+a+" is unknown.");}}}}function Wf(a,b,c){return new If(a,b,c)};var $f=!1;var ag={};ag.Nk=lb('');ag.Nm=lb('');function fg(a,b){if(a==="")return b;var c=Number(a);return isNaN(c)?b:c};var gg=[],hg={};function ig(a){return gg[a]===void 0?!1:gg[a]};var jg=[];function kg(a){switch(a){case 0:return 0;case 38:return 14;case 50:return 10;case 51:return 11;case 52:return 1;case 53:return 2;case 54:return 7;case 73:return 3;case 74:return 12;case 113:return 13;case 114:return 4;case 116:return 5;case 134:return 9;case 135:return 6}}function lg(a,b){jg[a]=b;var c=kg(a);c!==void 0&&(gg[c]=b)}function G(a){lg(a,!0)}G(39);G(34);G(35);G(36);
G(56);G(145);G(18);
G(153);G(144);G(75);G(119);
G(58);G(6);G(110);
G(139);G(101);G(90);G(74);
G(115);G(159);G(131);
G(20);G(71);G(112);
G(154);G(116);
lg(23,!1),G(24);
hg[1]=fg('1',6E4);hg[3]=fg('10',1);hg[2]=fg('',50);
G(29);
G(10);G(89);
G(140);G(122);
G(157);G(158);G(70);
G(135);G(137);
G(126);G(27);
G(68);G(69);G(134);
G(51);G(50);G(93);
G(100);G(111);
G(62);
G(152);G(99);
G(133);G(114);G(94);G(31);G(22);G(55);G(14);
G(150);G(151);G(57);
G(95);G(12);
G(15);G(148);
G(86);
G(96);G(76);G(77);G(28);
G(80);G(88);G(117);function H(a){return!!jg[a]}function mg(a,b){for(var c=!1,d=!1,e=0;c===d;)if(c=((Math.random()*4294967296|0)&1)===0,d=((Math.random()*4294967296|0)&1)===0,e++,e>30)return;c?G(b):G(a)};var og={},pg=(og.uaa=!0,og.uab=!0,og.uafvl=!0,og.uamb=!0,og.uam=!0,og.uap=!0,og.uapv=!0,og.uaw=!0,og);
var xg=function(a,b){for(var c=0;c<b.length;c++){var d=a,e=b[c];if(!vg.exec(e))throw Error("Invalid key wildcard");var f=e.indexOf(".*"),g=f!==-1&&f===e.length-2,h=g?e.slice(0,e.length-2):e,m;a:if(d.length===0)m=!1;else{for(var n=d.split("."),p=0;p<n.length;p++)if(!wg.exec(n[p])){m=!1;break a}m=!0}if(!m||h.length>d.length||!g&&d.length!==e.length?0:g?ub(d,h)&&(d===h||d.charAt(h.length)==="."):d===h)return!0}return!1},wg=/^[a-z$_][\w-$]*$/i,vg=/^(?:[a-z_$][a-z-_$0-9]*\.)*[a-z_$][a-z-_$0-9]*(?:\.\*)?$/i;
var yg=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"];function zg(a,b){var c=String(a),d=String(b),e=c.length-d.length;return e>=0&&c.indexOf(d,e)===e}function Ag(a,b){return String(a).split(",").indexOf(String(b))>=0}var Bg=new hb;function Cg(a,b,c){var d=c?"i":void 0;try{var e=String(b)+String(d),f=Bg.get(e);f||(f=new RegExp(b,d),Bg.set(e,f));return f.test(a)}catch(g){return!1}}function Dg(a,b){return String(a).indexOf(String(b))>=0}
function Eg(a,b){return String(a)===String(b)}function Fg(a,b){return Number(a)>=Number(b)}function Gg(a,b){return Number(a)<=Number(b)}function Hg(a,b){return Number(a)>Number(b)}function Ig(a,b){return Number(a)<Number(b)}function Jg(a,b){return ub(String(a),String(b))};var Qg=/^([a-z][a-z0-9]*):(!|\?)(\*|string|boolean|number|Fn|PixieMap|List|OpaqueValue)$/i,Rg={Fn:"function",PixieMap:"Object",List:"Array"};
function Sg(a,b){for(var c=["input:!*"],d=0;d<c.length;d++){var e=Qg.exec(c[d]);if(!e)throw Error("Internal Error in "+a);var f=e[1],g=e[2]==="!",h=e[3],m=b[d];if(m==null){if(g)throw Error("Error in "+a+". Required argument "+f+" not supplied.");}else if(h!=="*"){var n=typeof m;m instanceof dd?n="Fn":m instanceof $c?n="List":m instanceof Ma?n="PixieMap":m instanceof kd?n="PixiePromise":m instanceof id&&(n="OpaqueValue");if(n!==h)throw Error("Error in "+a+". Argument "+f+" has type "+((Rg[n]||n)+", which does not match required type ")+
((Rg[h]||h)+"."));}}}function I(a,b,c){for(var d=[],e=l(c),f=e.next();!f.done;f=e.next()){var g=f.value;g instanceof dd?d.push("function"):g instanceof $c?d.push("Array"):g instanceof Ma?d.push("Object"):g instanceof kd?d.push("Promise"):g instanceof id?d.push("OpaqueValue"):d.push(typeof g)}return Error("Argument error in "+a+". Expected argument types ["+(b.join(",")+"], but received [")+(d.join(",")+"]."))}function Tg(a){return a instanceof Ma}function Ug(a){return Tg(a)||a===null||Vg(a)}
function Wg(a){return a instanceof dd}function Xg(a){return Wg(a)||a===null||Vg(a)}function Yg(a){return a instanceof $c}function Zg(a){return a instanceof id}function $g(a){return typeof a==="string"}function ah(a){return $g(a)||a===null||Vg(a)}function bh(a){return typeof a==="boolean"}function ch(a){return bh(a)||Vg(a)}function dh(a){return bh(a)||a===null||Vg(a)}function eh(a){return typeof a==="number"}function Vg(a){return a===void 0};function fh(a){return""+a}
function gh(a,b){var c=[];return c};function hh(a,b){var c=new dd(a,function(){for(var d=Array.prototype.slice.call(arguments,0),e=0;e<d.length;e++)d[e]=this.evaluate(d[e]);try{return b.apply(this,d)}catch(g){throw Ha(g);}});c.Qa();return c}
function ih(a,b){var c=new Ma,d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];$a(e)?c.set(d,hh(a+"_"+d,e)):Wc(e)?c.set(d,ih(a+"_"+d,e)):(bb(e)||ab(e)||typeof e==="boolean")&&c.set(d,e)}c.Qa();return c};function jh(a,b){if(!$g(a))throw I(this.getName(),["string"],arguments);if(!ah(b))throw I(this.getName(),["string","undefined"],arguments);var c={},d=new Ma;return d=ih("AssertApiSubject",
c)};function kh(a,b){if(!ah(b))throw I(this.getName(),["string","undefined"],arguments);if(a instanceof kd)throw Error("Argument actual cannot have type Promise. Assertions on asynchronous code aren't supported.");var c={},d=new Ma;return d=ih("AssertThatSubject",c)};function lh(a){return function(){for(var b=wa.apply(0,arguments),c=[],d=this.J,e=0;e<b.length;++e)c.push(ld(b[e],d));return md(a.apply(null,c))}}function mh(){for(var a=Math,b=nh,c={},d=0;d<b.length;d++){var e=b[d];a.hasOwnProperty(e)&&(c[e]=lh(a[e].bind(a)))}return c};function oh(a){return a!=null&&ub(a,"__cvt_")};function ph(a){var b;return b};function qh(a){var b;return b};function rh(a){try{return encodeURI(a)}catch(b){}};function sh(a){try{return encodeURIComponent(String(a))}catch(b){}};function xh(a){if(!ah(a))throw I(this.getName(),["string|undefined"],arguments);};function yh(a,b){if(!eh(a)||!eh(b))throw I(this.getName(),["number","number"],arguments);return fb(a,b)};function zh(){return(new Date).getTime()};function Ah(a){if(a===null)return"null";if(a instanceof $c)return"array";if(a instanceof dd)return"function";if(a instanceof id){var b=a.getValue();if((b==null?void 0:b.constructor)===void 0||b.constructor.name===void 0){var c=String(b);return c.substring(8,c.length-1)}return String(b.constructor.name)}return typeof a};function Bh(a){function b(c){return function(d){try{return c(d)}catch(e){($f||ag.Nk)&&a.call(this,e.message)}}}return{parse:b(function(c){return md(JSON.parse(c))}),stringify:b(function(c){return JSON.stringify(ld(c))}),publicName:"JSON"}};function Ch(a){return kb(ld(a,this.J))};function Dh(a){return Number(ld(a,this.J))};function Eh(a){return a===null?"null":a===void 0?"undefined":a.toString()};function Fh(a,b,c){var d=null,e=!1;return e?d:null};var nh="floor ceil round max min abs pow sqrt".split(" ");function Gh(){var a={};return{Zm:function(b){return a.hasOwnProperty(b)?a[b]:void 0},Kk:function(b,c){a[b]=c},reset:function(){a={}}}}function Hh(a,b){return function(){return dd.prototype.invoke.apply(a,[b].concat(sa(wa.apply(0,arguments))))}}
function Ih(a,b){if(!$g(a))throw I(this.getName(),["string","any"],arguments);}
function Jh(a,b){if(!$g(a)||!Tg(b))throw I(this.getName(),["string","PixieMap"],arguments);};var Kh={};
Kh.keys=function(a){return new $c};
Kh.values=function(a){return new $c};
Kh.entries=function(a){return new $c};
Kh.freeze=function(a){return a};Kh.delete=function(a,b){return!1};function M(a,b){var c=wa.apply(2,arguments),d=a.J.C;if(!d)throw Error("Missing program state.");if(d.Yn){try{d.ik.apply(null,[b].concat(sa(c)))}catch(e){throw Wa("TAGGING",21),e;}return}d.ik.apply(null,[b].concat(sa(c)))};var Mh=function(){this.H={};this.C={};this.N=!0;};Mh.prototype.get=function(a,b){var c=this.contains(a)?this.H[a]:void 0;return c};Mh.prototype.contains=function(a){return this.H.hasOwnProperty(a)};
Mh.prototype.add=function(a,b,c){if(this.contains(a))throw Error("Attempting to add a function which already exists: "+a+".");if(this.C.hasOwnProperty(a))throw Error("Attempting to add an API with an existing private API name: "+a+".");this.H[a]=c?void 0:$a(b)?hh(a,b):ih(a,b)};function Nh(a,b){var c=void 0;return c};function Oh(a,b){}Oh.K="internal.safeInvoke";function Ph(){var a={};
return a};var N={m:{Ca:"ad_personalization",T:"ad_storage",U:"ad_user_data",Z:"analytics_storage",Mb:"region",kc:"consent_updated",Cf:"wait_for_update",al:"app_remove",bl:"app_store_refund",fl:"app_store_subscription_cancel",il:"app_store_subscription_convert",jl:"app_store_subscription_renew",kl:"consent_update",Ri:"add_payment_info",Si:"add_shipping_info",hd:"add_to_cart",jd:"remove_from_cart",Ti:"view_cart",Cc:"begin_checkout",kd:"select_item",Ob:"view_item_list",mc:"select_promotion",Pb:"view_promotion",
Va:"purchase",ld:"refund",hb:"view_item",Ui:"add_to_wishlist",ml:"exception",nl:"first_open",ol:"first_visit",ka:"gtag.config",mb:"gtag.get",pl:"in_app_purchase",Dc:"page_view",ql:"screen_view",rl:"session_start",sl:"source_update",tl:"timing_complete",vl:"track_social",md:"user_engagement",wl:"user_id_update",Ud:"gclid_link_decoration_source",Vd:"gclid_storage_source",Qb:"gclgb",Wa:"gclid",Vi:"gclid_len",nd:"gclgs",od:"gcllp",pd:"gclst",na:"ads_data_redaction",Wd:"gad_source",Xd:"gad_source_src",
Ec:"gclid_url",Wi:"gclsrc",Yd:"gbraid",rd:"wbraid",xa:"allow_ad_personalization_signals",Gf:"allow_custom_scripts",Zd:"allow_direct_google_requests",Hf:"allow_display_features",If:"allow_enhanced_conversions",nb:"allow_google_signals",Ia:"allow_interest_groups",xl:"app_id",yl:"app_installer_id",zl:"app_name",Al:"app_version",Rb:"auid",Bl:"auto_detection_enabled",Fc:"aw_remarketing",Ng:"aw_remarketing_only",Jf:"discount",Kf:"aw_feed_country",Lf:"aw_feed_language",la:"items",Mf:"aw_merchant_id",Xi:"aw_basket_type",
ae:"campaign_content",be:"campaign_id",ce:"campaign_medium",de:"campaign_name",ee:"campaign",fe:"campaign_source",he:"campaign_term",wb:"client_id",Yi:"rnd",Og:"consent_update_type",Cl:"content_group",Dl:"content_type",xb:"conversion_cookie_prefix",ie:"conversion_id",Fa:"conversion_linker",Pg:"conversion_linker_disabled",Gc:"conversion_api",Nf:"cookie_deprecation",Xa:"cookie_domain",Ya:"cookie_expires",ib:"cookie_flags",Hc:"cookie_name",yb:"cookie_path",Ta:"cookie_prefix",nc:"cookie_update",sd:"country",
Ja:"currency",Qg:"customer_buyer_stage",je:"customer_lifetime_value",Rg:"customer_loyalty",Sg:"customer_ltv_bucket",ke:"custom_map",Tg:"gcldc",Ic:"dclid",Zi:"debug_mode",oa:"developer_id",El:"disable_merchant_reported_purchases",Jc:"dc_custom_params",Fl:"dc_natural_search",aj:"dynamic_event_settings",bj:"affiliation",Of:"checkout_option",Ug:"checkout_step",cj:"coupon",me:"item_list_name",Vg:"list_name",Gl:"promotions",ne:"shipping",Wg:"tax",Pf:"engagement_time_msec",Qf:"enhanced_client_id",Rf:"enhanced_conversions",
dj:"enhanced_conversions_automatic_settings",Sf:"estimated_delivery_date",Xg:"euid_logged_in_state",oe:"event_callback",Hl:"event_category",zb:"event_developer_id_string",Il:"event_label",Kc:"event",Tf:"event_settings",Uf:"event_timeout",Jl:"description",Kl:"fatal",Ll:"experiments",Yg:"firebase_id",ud:"first_party_collection",Vf:"_x_20",Tb:"_x_19",ej:"fledge_drop_reason",fj:"fledge",gj:"flight_error_code",ij:"flight_error_message",jj:"fl_activity_category",kj:"fl_activity_group",Zg:"fl_advertiser_id",
lj:"fl_ar_dedupe",pe:"match_id",mj:"fl_random_number",nj:"tran",oj:"u",Wf:"gac_gclid",vd:"gac_wbraid",pj:"gac_wbraid_multiple_conversions",qj:"ga_restrict_domain",rj:"ga_temp_client_id",Ml:"ga_temp_ecid",Lc:"gdpr_applies",sj:"geo_granularity",oc:"value_callback",Ub:"value_key",Mc:"google_analysis_params",wd:"_google_ng",xd:"google_signals",tj:"google_tld",qe:"gpp_sid",se:"gpp_string",Xf:"groups",uj:"gsa_experiment_id",te:"gtag_event_feature_usage",vj:"gtm_up",qc:"iframe_state",ue:"ignore_referrer",
ah:"internal_traffic_results",rc:"is_legacy_converted",sc:"is_legacy_loaded",Yf:"is_passthrough",Nc:"_lps",jb:"language",Zf:"legacy_developer_id_string",Ga:"linker",yd:"accept_incoming",Vb:"decorate_forms",da:"domains",uc:"url_position",cg:"merchant_feed_label",dg:"merchant_feed_language",eg:"merchant_id",wj:"method",Nl:"name",xj:"navigation_type",ve:"new_customer",fg:"non_interaction",Ol:"optimize_id",yj:"page_hostname",we:"page_path",Ka:"page_referrer",ob:"page_title",zj:"passengers",Aj:"phone_conversion_callback",
Pl:"phone_conversion_country_code",Bj:"phone_conversion_css_class",Ql:"phone_conversion_ids",Cj:"phone_conversion_number",Dj:"phone_conversion_options",Rl:"_platinum_request_status",bh:"_protected_audience_enabled",xe:"quantity",gg:"redact_device_info",eh:"referral_exclusion_definition",xo:"_request_start_time",Bb:"restricted_data_processing",Sl:"retoken",Tl:"sample_rate",fh:"screen_name",vc:"screen_resolution",Ej:"_script_source",Ul:"search_term",Za:"send_page_view",Oc:"send_to",Pc:"server_container_url",
ye:"session_duration",hg:"session_engaged",gh:"session_engaged_time",Wb:"session_id",ig:"session_number",ze:"_shared_user_id",Ae:"delivery_postal_code",yo:"_tag_firing_delay",zo:"_tag_firing_time",Ao:"temporary_client_id",hh:"_timezone",ih:"topmost_url",Vl:"tracking_id",jh:"traffic_type",La:"transaction_id",Xb:"transport_url",Fj:"trip_type",Rc:"update",pb:"url_passthrough",Gj:"uptgs",Be:"_user_agent_architecture",Ce:"_user_agent_bitness",De:"_user_agent_full_version_list",Ee:"_user_agent_mobile",
Fe:"_user_agent_model",Ge:"_user_agent_platform",He:"_user_agent_platform_version",Ie:"_user_agent_wow64",Ma:"user_data",kh:"user_data_auto_latency",lh:"user_data_auto_meta",mh:"user_data_auto_multi",nh:"user_data_auto_selectors",oh:"user_data_auto_status",Cb:"user_data_mode",jg:"user_data_settings",Ha:"user_id",Db:"user_properties",Hj:"_user_region",Je:"us_privacy_string",ya:"value",Ij:"wbraid_multiple_conversions",zd:"_fpm_parameters",qh:"_host_name",Pj:"_in_page_command",Qj:"_ip_override",Rj:"_is_passthrough_cid",
Yb:"non_personalized_ads",Qe:"_sst_parameters",Sb:"conversion_label",ra:"page_location",Ab:"global_developer_id_string",Qc:"tc_privacy_string"}};var Qh={},Rh=Object.freeze((Qh[N.m.xa]=1,Qh[N.m.Hf]=1,Qh[N.m.If]=1,Qh[N.m.nb]=1,Qh[N.m.la]=1,Qh[N.m.Xa]=1,Qh[N.m.Ya]=1,Qh[N.m.ib]=1,Qh[N.m.Hc]=1,Qh[N.m.yb]=1,Qh[N.m.Ta]=1,Qh[N.m.nc]=1,Qh[N.m.ke]=1,Qh[N.m.oa]=1,Qh[N.m.aj]=1,Qh[N.m.oe]=1,Qh[N.m.Tf]=1,Qh[N.m.Uf]=1,Qh[N.m.ud]=1,Qh[N.m.qj]=1,Qh[N.m.Mc]=1,Qh[N.m.xd]=1,Qh[N.m.tj]=1,Qh[N.m.Xf]=1,Qh[N.m.ah]=1,Qh[N.m.rc]=1,Qh[N.m.sc]=1,Qh[N.m.Ga]=1,Qh[N.m.eh]=1,Qh[N.m.Bb]=1,Qh[N.m.Za]=1,Qh[N.m.Oc]=1,Qh[N.m.Pc]=1,Qh[N.m.ye]=1,Qh[N.m.gh]=1,Qh[N.m.Ae]=1,Qh[N.m.Xb]=
1,Qh[N.m.Rc]=1,Qh[N.m.jg]=1,Qh[N.m.Db]=1,Qh[N.m.Qe]=1,Qh));Object.freeze([N.m.ra,N.m.Ka,N.m.ob,N.m.jb,N.m.fh,N.m.Ha,N.m.Yg,N.m.Cl]);
var Sh={},Th=Object.freeze((Sh[N.m.al]=1,Sh[N.m.bl]=1,Sh[N.m.fl]=1,Sh[N.m.il]=1,Sh[N.m.jl]=1,Sh[N.m.nl]=1,Sh[N.m.ol]=1,Sh[N.m.pl]=1,Sh[N.m.rl]=1,Sh[N.m.md]=1,Sh)),Uh={},Vh=Object.freeze((Uh[N.m.Ri]=1,Uh[N.m.Si]=1,Uh[N.m.hd]=1,Uh[N.m.jd]=1,Uh[N.m.Ti]=1,Uh[N.m.Cc]=1,Uh[N.m.kd]=1,Uh[N.m.Ob]=1,Uh[N.m.mc]=1,Uh[N.m.Pb]=1,Uh[N.m.Va]=1,Uh[N.m.ld]=1,Uh[N.m.hb]=1,Uh[N.m.Ui]=1,Uh)),Wh=Object.freeze([N.m.xa,N.m.Zd,N.m.nb,N.m.nc,N.m.ud,N.m.ue,N.m.Za,N.m.Rc]),Xh=Object.freeze([].concat(sa(Wh))),Yh=Object.freeze([N.m.Ya,
N.m.Uf,N.m.ye,N.m.gh,N.m.Pf]),Zh=Object.freeze([].concat(sa(Yh))),$h={},ai=($h[N.m.T]="1",$h[N.m.Z]="2",$h[N.m.U]="3",$h[N.m.Ca]="4",$h),bi={},ci=Object.freeze((bi.search="s",bi.youtube="y",bi.playstore="p",bi.shopping="h",bi.ads="a",bi.maps="m",bi));Object.freeze(N.m);var di={},ei=(di[N.m.kc]="gcu",di[N.m.Qb]="gclgb",di[N.m.Wa]="gclaw",di[N.m.Vi]="gclid_len",di[N.m.nd]="gclgs",di[N.m.od]="gcllp",di[N.m.pd]="gclst",di[N.m.Rb]="auid",di[N.m.Jf]="dscnt",di[N.m.Kf]="fcntr",di[N.m.Lf]="flng",di[N.m.Mf]="mid",di[N.m.Xi]="bttype",di[N.m.wb]="gacid",di[N.m.Sb]="label",di[N.m.Gc]="capi",di[N.m.Nf]="pscdl",di[N.m.Ja]="currency_code",di[N.m.Qg]="clobs",di[N.m.je]="vdltv",di[N.m.Rg]="clolo",di[N.m.Sg]="clolb",di[N.m.Zi]="_dbg",di[N.m.Sf]="oedeld",di[N.m.zb]="edid",di[N.m.ej]=
"fdr",di[N.m.fj]="fledge",di[N.m.Wf]="gac",di[N.m.vd]="gacgb",di[N.m.pj]="gacmcov",di[N.m.Lc]="gdpr",di[N.m.Ab]="gdid",di[N.m.wd]="_ng",di[N.m.qe]="gpp_sid",di[N.m.se]="gpp",di[N.m.uj]="gsaexp",di[N.m.te]="_tu",di[N.m.qc]="frm",di[N.m.Yf]="gtm_up",di[N.m.Nc]="lps",di[N.m.Zf]="did",di[N.m.cg]="fcntr",di[N.m.dg]="flng",di[N.m.eg]="mid",di[N.m.ve]=void 0,di[N.m.ob]="tiba",di[N.m.Bb]="rdp",di[N.m.Wb]="ecsid",di[N.m.ze]="ga_uid",di[N.m.Ae]="delopc",di[N.m.Qc]="gdpr_consent",di[N.m.La]="oid",di[N.m.Gj]=
"uptgs",di[N.m.Be]="uaa",di[N.m.Ce]="uab",di[N.m.De]="uafvl",di[N.m.Ee]="uamb",di[N.m.Fe]="uam",di[N.m.Ge]="uap",di[N.m.He]="uapv",di[N.m.Ie]="uaw",di[N.m.kh]="ec_lat",di[N.m.lh]="ec_meta",di[N.m.mh]="ec_m",di[N.m.nh]="ec_sel",di[N.m.oh]="ec_s",di[N.m.Cb]="ec_mode",di[N.m.Ha]="userId",di[N.m.Je]="us_privacy",di[N.m.ya]="value",di[N.m.Ij]="mcov",di[N.m.qh]="hn",di[N.m.Pj]="gtm_ee",di[N.m.Yb]="npa",di[N.m.ie]=null,di[N.m.vc]=null,di[N.m.jb]=null,di[N.m.la]=null,di[N.m.ra]=null,di[N.m.Ka]=null,di[N.m.ih]=
null,di[N.m.zd]=null,di[N.m.Ud]=null,di[N.m.Vd]=null,di[N.m.Mc]=null,di);function fi(a,b){if(a){var c=a.split("x");c.length===2&&(gi(b,"u_w",c[0]),gi(b,"u_h",c[1]))}}
function hi(a){var b=ii;b=b===void 0?ji:b;var c;var d=b;if(a&&a.length){for(var e=[],f=0;f<a.length;++f){var g=a[f];g&&e.push({item_id:d(g),quantity:g.quantity,value:g.price,start_date:g.start_date,end_date:g.end_date})}c=e}else c=[];var h;var m=c;if(m){for(var n=[],p=0;p<m.length;p++){var q=m[p],r=[];q&&(r.push(ki(q.value)),r.push(ki(q.quantity)),r.push(ki(q.item_id)),r.push(ki(q.start_date)),r.push(ki(q.end_date)),n.push("("+r.join("*")+")"))}h=n.length>0?n.join(""):""}else h="";return h}
function ji(a){return li(a.item_id,a.id,a.item_name)}function li(){for(var a=l(wa.apply(0,arguments)),b=a.next();!b.done;b=a.next()){var c=b.value;if(c!==null&&c!==void 0)return c}}function mi(a){if(a&&a.length){for(var b=[],c=0;c<a.length;++c){var d=a[c];d&&d.estimated_delivery_date?b.push(""+d.estimated_delivery_date):b.push("")}return b.join(",")}}function gi(a,b,c){c===void 0||c===null||c===""&&!pg[b]||(a[b]=c)}function ki(a){return typeof a!=="number"&&typeof a!=="string"?"":a.toString()};function pi(a){return qi?A.querySelectorAll(a):null}
function ri(a,b){if(!qi)return null;if(Element.prototype.closest)try{return a.closest(b)}catch(e){return null}var c=Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector,d=a;if(!A.documentElement.contains(d))return null;do{try{if(c.call(d,b))return d}catch(e){break}d=d.parentElement||d.parentNode}while(d!==null&&d.nodeType===1);return null}var si=!1;
if(A.querySelectorAll)try{var ti=A.querySelectorAll(":root");ti&&ti.length==1&&ti[0]==A.documentElement&&(si=!0)}catch(a){}var qi=si;function ui(a){switch(a){case 0:break;case 9:return"e4";case 6:return"e5";case 14:return"e6";default:return"e7"}};var xi=/^[0-9A-Fa-f]{64}$/;function yi(a){try{return(new TextEncoder).encode(a)}catch(e){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?b.push(192|d>>6,128|d&63):d<55296||d>=57344?b.push(224|d>>12,128|d>>6&63,128|d&63):(d=65536+((d&1023)<<10|a.charCodeAt(++c)&1023),b.push(240|d>>18,128|d>>12&63,128|d>>6&63,128|d&63))}return new Uint8Array(b)}}
function zi(a){if(a===""||a==="e0")return Promise.resolve(a);var b;if((b=z.crypto)==null?0:b.subtle){if(xi.test(a))return Promise.resolve(a);try{var c=yi(a);return z.crypto.subtle.digest("SHA-256",c).then(function(d){var e=Array.from(new Uint8Array(d)).map(function(f){return String.fromCharCode(f)}).join("");return z.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}).catch(function(){return"e2"})}catch(d){return Promise.resolve("e2")}}else return Promise.resolve("e1")};var Ai={Xk:'100',Yk:'100',Zk:'1000',qm:'102887800~103051953~103077950~103106314~103106316~103116026~103130360~103130362~103200004'},Bi={Rh:Number(Ai.Xk)||0,Ye:Number(Ai.Yk)||0,Mm:Number(Ai.Zk)||0,ro:Ai.qm};function O(a){Wa("GTM",a)};var hj={},ij=(hj[N.m.Ia]=1,hj[N.m.Pc]=2,hj[N.m.Xb]=2,hj[N.m.na]=3,hj[N.m.je]=4,hj[N.m.Gf]=5,hj[N.m.nc]=6,hj[N.m.Ta]=6,hj[N.m.Xa]=6,hj[N.m.Hc]=6,hj[N.m.yb]=6,hj[N.m.ib]=6,hj[N.m.Ya]=7,hj[N.m.Bb]=9,hj[N.m.Hf]=10,hj[N.m.nb]=11,hj),jj={},kj=(jj.unknown=13,jj.standard=14,jj.unique=15,jj.per_session=16,jj.transactions=17,jj.items_sold=18,jj);var lj=[];function mj(a,b){b=b===void 0?!1:b;for(var c=Object.keys(a),d=l(Object.keys(ij)),e=d.next();!e.done;e=d.next()){var f=e.value;if(c.includes(f)){var g=ij[f],h=b;h=h===void 0?!1:h;Wa("GTAG_EVENT_FEATURE_CHANNEL",g);h&&(lj[g]=!0)}}};var nj=function(){this.C=new Set},pj=function(a){var b=oj.Da;a=a===void 0?[]:a;return Array.from(b.C).concat(a)},qj=function(){var a=oj.Da,b=Bi.ro;a.C=new Set;if(b!=="")for(var c=l(b.split("~")),d=c.next();!d.done;d=c.next()){var e=Number(d.value);isNaN(e)||a.C.add(e)}};var rj={xh:"54n0"};rj.wh=Number("0")||0;rj.vb="dataLayer";rj.uo="ChAI8IiywAYQ1OLKiJ/f6ddAEiMA31nefD35zLVcub/0SkD249Asqnyim5+nN8KW28lkIdzc6hoCmcc\x3d";var sj={__cl:1,__ecl:1,__ehl:1,__evl:1,__fal:1,__fil:1,__fsl:1,__hl:1,__jel:1,__lcl:1,__sdl:1,__tl:1,__ytl:1},tj={__paused:1,__tg:1},uj;for(uj in sj)sj.hasOwnProperty(uj)&&(tj[uj]=1);var vj=lb(""),wj=!1,xj,yj=!1;yj=!0;xj=yj;var zj,Aj=!1;zj=Aj;var Bj,Cj=!1;Bj=Cj;rj.Ff="www.googletagmanager.com";var Dj=""+rj.Ff+(xj?"/gtag/js":"/gtm.js"),Ej=null,Fj=null,Gj={},Hj={};rj.Wk="";var Ij="";rj.yh=Ij;
var oj=new function(){this.Da=new nj;this.C=!1;this.H=0;this.fa=this.ia=this.ab=this.O="";this.R=this.N=!1};function Jj(){var a;a=a===void 0?[]:a;return pj(a).join("~")}function Kj(){var a=oj.O.length;return oj.O[a-1]==="/"?oj.O.substring(0,a-1):oj.O}function Lj(){return oj.C?H(84)?oj.H===0:oj.H!==1:!1}function Mj(a){for(var b={},c=l(a.split("|")),d=c.next();!d.done;d=c.next())b[d.value]=!0;return b};var Nj=new hb,Oj={},Pj={},Sj={name:rj.vb,set:function(a,b){Xc(wb(a,b),Oj);Qj()},get:function(a){return Rj(a,2)},reset:function(){Nj=new hb;Oj={};Qj()}};function Rj(a,b){return b!=2?Nj.get(a):Tj(a)}function Tj(a,b){var c=a.split(".");b=b||[];for(var d=Oj,e=0;e<c.length;e++){if(d===null)return!1;if(d===void 0)break;d=d[c[e]];if(b.indexOf(d)!==-1)return}return d}function Uj(a,b){Pj.hasOwnProperty(a)||(Nj.set(a,b),Xc(wb(a,b),Oj),Qj())}
function Vj(){for(var a=["gtm.allowlist","gtm.blocklist","gtm.whitelist","gtm.blacklist","tagTypeBlacklist"],b=0;b<a.length;b++){var c=a[b],d=Rj(c,1);if(Array.isArray(d)||Wc(d))d=Xc(d,null);Pj[c]=d}}function Qj(a){ib(Pj,function(b,c){Nj.set(b,c);Xc(wb(b),Oj);Xc(wb(b,c),Oj);a&&delete Pj[b]})}function Wj(a,b){var c,d=(b===void 0?2:b)!==1?Tj(a):Nj.get(a);Uc(d)==="array"||Uc(d)==="object"?c=Xc(d,null):c=d;return c};var bk=/:[0-9]+$/,ck=/^\d+\.fls\.doubleclick\.net$/;function dk(a,b,c,d){for(var e=[],f=l(a.split("&")),g=f.next();!g.done;g=f.next()){var h=l(g.value.split("=")),m=h.next().value,n=ra(h);if(decodeURIComponent(m.replace(/\+/g," "))===b){var p=n.join("=");if(!c)return d?p:decodeURIComponent(p.replace(/\+/g," "));e.push(d?p:decodeURIComponent(p.replace(/\+/g," ")))}}return c?e:void 0}function ek(a){try{return decodeURIComponent(a)}catch(b){}}
function fk(a,b,c,d,e){b&&(b=String(b).toLowerCase());if(b==="protocol"||b==="port")a.protocol=gk(a.protocol)||gk(z.location.protocol);b==="port"?a.port=String(Number(a.hostname?a.port:z.location.port)||(a.protocol==="http"?80:a.protocol==="https"?443:"")):b==="host"&&(a.hostname=(a.hostname||z.location.hostname).replace(bk,"").toLowerCase());return hk(a,b,c,d,e)}
function hk(a,b,c,d,e){var f,g=gk(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":f=ik(a);break;case "protocol":f=g;break;case "host":f=a.hostname.replace(bk,"").toLowerCase();if(c){var h=/^www\d*\./.exec(f);h&&h[0]&&(f=f.substring(h[0].length))}break;case "port":f=String(Number(a.port)||(g==="http"?80:g==="https"?443:""));break;case "path":a.pathname||a.hostname||Wa("TAGGING",1);f=a.pathname.substring(0,1)==="/"?a.pathname:"/"+a.pathname;var m=f.split("/");(d||[]).indexOf(m[m.length-
1])>=0&&(m[m.length-1]="");f=m.join("/");break;case "query":f=a.search.replace("?","");e&&(f=dk(f,e,!1));break;case "extension":var n=a.pathname.split(".");f=n.length>1?n[n.length-1]:"";f=f.split("/")[0];break;case "fragment":f=a.hash.replace("#","");break;default:f=a&&a.href}return f}function gk(a){return a?a.replace(":","").toLowerCase():""}function ik(a){var b="";if(a&&a.href){var c=a.href.indexOf("#");b=c<0?a.href:a.href.substring(0,c)}return b}var jk={},kk=0;
function lk(a){var b=jk[a];if(!b){var c=A.createElement("a");a&&(c.href=a);var d=c.pathname;d[0]!=="/"&&(a||Wa("TAGGING",1),d="/"+d);var e=c.hostname.replace(bk,"");b={href:c.href,protocol:c.protocol,host:c.host,hostname:e,pathname:d,search:c.search,hash:c.hash,port:c.port};kk<5&&(jk[a]=b,kk++)}return b}function mk(a,b,c){var d=lk(a);return Cb(b,d,c)}
function nk(a){var b=lk(z.location.href),c=fk(b,"host",!1);if(c&&c.match(ck)){var d=fk(b,"path");if(d){var e=d.split(a+"=");if(e.length>1)return e[1].split(";")[0].split("?")[0]}}};var ok={"https://www.google.com":"/g","https://www.googleadservices.com":"/as","https://pagead2.googlesyndication.com":"/gs"},pk=["/as/d/ccm/conversion","/g/d/ccm/conversion","/gs/ccm/conversion","/d/ccm/form-data"];function qk(a,b){if(a){var c=""+a;c.indexOf("http://")!==0&&c.indexOf("https://")!==0&&(c="https://"+c);c[c.length-1]==="/"&&(c=c.substring(0,c.length-1));return lk(""+c+b).href}}function rk(a,b){if(Lj()||zj)return qk(a,b)}
function sk(){return!!rj.yh&&rj.yh.split("@@").join("")!=="SGTM_TOKEN"}function tk(a){for(var b=l([N.m.Pc,N.m.Xb]),c=b.next();!c.done;c=b.next()){var d=P(a,c.value);if(d)return d}}function uk(a,b,c){c=c===void 0?"":c;if(!Lj())return a;var d=b?ok[a]||"":"";d==="/gs"&&(c="");return""+Kj()+d+c}function vk(a){if(!Lj())return a;for(var b=l(pk),c=b.next();!c.done;c=b.next())if(ub(a,""+Kj()+c.value))return a+"&_uip="+encodeURIComponent("::");return a};function wk(a){var b=String(a[Pe.za]||"").replace(/_/g,"");return ub(b,"cvt")?"cvt":b}var xk=z.location.search.indexOf("?gtm_latency=")>=0||z.location.search.indexOf("&gtm_latency=")>=0;var yk={sampleRate:"0.005000",Sk:"",qo:"0.01"},zk=Math.random(),Ak;if(!(Ak=xk)){var Bk=yk.sampleRate;Ak=zk<Number(Bk)}var Ck=Ak,Dk=(ic==null?void 0:ic.includes("gtm_debug=d"))||xk||zk>=1-Number(yk.qo);var Ek,Fk;a:{for(var Gk=["CLOSURE_FLAGS"],Hk=xa,Ik=0;Ik<Gk.length;Ik++)if(Hk=Hk[Gk[Ik]],Hk==null){Fk=null;break a}Fk=Hk}var Jk=Fk&&Fk[610401301];Ek=Jk!=null?Jk:!1;function Kk(){var a=xa.navigator;if(a){var b=a.userAgent;if(b)return b}return""}var Lk,Nk=xa.navigator;Lk=Nk?Nk.userAgentData||null:null;function Ok(a){if(!Ek||!Lk)return!1;for(var b=0;b<Lk.brands.length;b++){var c=Lk.brands[b].brand;if(c&&c.indexOf(a)!=-1)return!0}return!1}function Pk(a){return Kk().indexOf(a)!=-1};function Qk(){return Ek?!!Lk&&Lk.brands.length>0:!1}function Rk(){return Qk()?!1:Pk("Opera")}function Sk(){return Pk("Firefox")||Pk("FxiOS")}function Tk(){return Qk()?Ok("Chromium"):(Pk("Chrome")||Pk("CriOS"))&&!(Qk()?0:Pk("Edge"))||Pk("Silk")};function Uk(){return Ek?!!Lk&&!!Lk.platform:!1}function Vk(){return Pk("iPhone")&&!Pk("iPod")&&!Pk("iPad")}function Wk(){Vk()||Pk("iPad")||Pk("iPod")};var Xk=function(a){Xk[" "](a);return a};Xk[" "]=function(){};Rk();Qk()||Pk("Trident")||Pk("MSIE");Pk("Edge");!Pk("Gecko")||Kk().toLowerCase().indexOf("webkit")!=-1&&!Pk("Edge")||Pk("Trident")||Pk("MSIE")||Pk("Edge");Kk().toLowerCase().indexOf("webkit")!=-1&&!Pk("Edge")&&Pk("Mobile");Uk()||Pk("Macintosh");Uk()||Pk("Windows");(Uk()?Lk.platform==="Linux":Pk("Linux"))||Uk()||Pk("CrOS");Uk()||Pk("Android");Vk();Pk("iPad");Pk("iPod");Wk();Kk().toLowerCase().indexOf("kaios");var Yk=function(a,b){var c=function(){};c.prototype=a.prototype;var d=new c;a.apply(d,Array.prototype.slice.call(arguments,1));return d},Zk=function(a){var b=a;return function(){if(b){var c=b;b=null;c()}}};var $k=function(a){return decodeURIComponent(a.replace(/\+/g," "))};var al=function(a,b,c,d){for(var e=b,f=c.length;(e=a.indexOf(c,e))>=0&&e<d;){var g=a.charCodeAt(e-1);if(g==38||g==63){var h=a.charCodeAt(e+f);if(!h||h==61||h==38||h==35)return e}e+=f+1}return-1},bl=/#|$/,cl=function(a,b){var c=a.search(bl),d=al(a,0,b,c);if(d<0)return null;var e=a.indexOf("&",d);if(e<0||e>c)e=c;d+=b.length+1;return $k(a.slice(d,e!==-1?e:0))},dl=/[?&]($|#)/,el=function(a,b,c){for(var d,e=a.search(bl),f=0,g,h=[];(g=al(a,f,b,e))>=0;)h.push(a.substring(f,g)),f=Math.min(a.indexOf("&",g)+
1||e,e);h.push(a.slice(f));d=h.join("").replace(dl,"$1");var m,n=c!=null?"="+encodeURIComponent(String(c)):"";var p=b+n;if(p){var q,r=d.indexOf("#");r<0&&(r=d.length);var t=d.indexOf("?"),u;t<0||t>r?(t=r,u=""):u=d.substring(t+1,r);q=[d.slice(0,t),u,d.slice(r)];var v=q[1];q[1]=p?v?v+"&"+p:p:v;m=q[0]+(q[1]?"?"+q[1]:"")+q[2]}else m=d;return m};var fl=function(a){try{var b;if(b=!!a&&a.location.href!=null)a:{try{Xk(a.foo);b=!0;break a}catch(c){}b=!1}return b}catch(c){return!1}},gl=function(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)},hl=function(a,b){for(var c=a,d=0;d<50;++d){var e;try{e=!(!c.frames||!c.frames[b])}catch(h){e=!1}if(e)return c;var f;a:{try{var g=c.parent;if(g&&g!=c){f=g;break a}}catch(h){}f=null}if(!(c=f))break}return null},il=function(a){if(z.top==z)return 0;if(a===void 0?0:a){var b=z.location.ancestorOrigins;
if(b)return b[b.length-1]==z.location.origin?1:2}return fl(z.top)?1:2},jl=function(a){a=a===void 0?document:a;return a.createElement("img")},kl=function(){for(var a=z,b=a;a&&a!=a.parent;)a=a.parent,fl(a)&&(b=a);return b};function ll(a){var b;b=b===void 0?document:b;var c;return!((c=b.featurePolicy)==null||!c.allowedFeatures().includes(a))};function ml(){return ll("join-ad-interest-group")&&$a(fc.joinAdInterestGroup)}
function nl(a,b,c){var d=hg[3]===void 0?1:hg[3],e='iframe[data-tagging-id="'+b+'"]',f=[];try{if(d===1){var g=A.querySelector(e);g&&(f=[g])}else f=Array.from(A.querySelectorAll(e))}catch(r){}var h;a:{try{h=A.querySelectorAll('iframe[allow="join-ad-interest-group"][data-tagging-id*="-"]');break a}catch(r){}h=void 0}var m=h,n=((m==null?void 0:m.length)||0)>=(hg[2]===void 0?50:hg[2]),p;if(p=f.length>=1){var q=Number(f[f.length-1].dataset.loadTime);q!==void 0&&pb()-q<(hg[1]===void 0?6E4:hg[1])?(Wa("TAGGING",
9),p=!0):p=!1}if(p)return!1;if(d===1)if(f.length>=1)ol(f[0]);else{if(n)return Wa("TAGGING",10),!1}else f.length>=d?ol(f[0]):n&&ol(m[0]);tc(a,c,{allow:"join-ad-interest-group"},{taggingId:b,loadTime:pb()});return!0}function ol(a){try{a.parentNode.removeChild(a)}catch(b){}}function pl(){return"https://td.doubleclick.net"};function ql(a,b,c){var d,e=a.GooglebQhCsO;e||(e={},a.GooglebQhCsO=e);d=e;if(d[b])return!1;d[b]=[];d[b][0]=c;return!0};var rl=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);e<128?b[c++]=e:(e<2048?b[c++]=e>>6|192:((e&64512)==55296&&d+1<a.length&&(a.charCodeAt(d+1)&64512)==56320?(e=65536+((e&1023)<<10)+(a.charCodeAt(++d)&1023),b[c++]=e>>18|240,b[c++]=e>>12&63|128):b[c++]=e>>12|224,b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b};Sk();Vk()||Pk("iPod");Pk("iPad");!Pk("Android")||Tk()||Sk()||Rk()||Pk("Silk");Tk();!Pk("Safari")||Tk()||(Qk()?0:Pk("Coast"))||Rk()||(Qk()?0:Pk("Edge"))||(Qk()?Ok("Microsoft Edge"):Pk("Edg/"))||(Qk()?Ok("Opera"):Pk("OPR"))||Sk()||Pk("Silk")||Pk("Android")||Wk();var sl={},tl=null,ul=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);e>255&&(b[c++]=e&255,e>>=8);b[c++]=e}var f=4;f===void 0&&(f=0);if(!tl){tl={};for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),h=["+/=","+/","-_=","-_.","-_"],m=0;m<5;m++){var n=g.concat(h[m].split(""));sl[m]=n;for(var p=0;p<n.length;p++){var q=n[p];tl[q]===void 0&&(tl[q]=p)}}}for(var r=sl[f],t=Array(Math.floor(b.length/3)),u=r[64]||"",v=0,w=0;v<b.length-2;v+=3){var x=b[v],
y=b[v+1],B=b[v+2],C=r[x>>2],E=r[(x&3)<<4|y>>4],F=r[(y&15)<<2|B>>6],K=r[B&63];t[w++]=""+C+E+F+K}var L=0,U=u;switch(b.length-v){case 2:L=b[v+1],U=r[(L&15)<<2]||u;case 1:var J=b[v];t[w]=""+r[J>>2]+r[(J&3)<<4|L>>4]+U+u}return t.join("")};function vl(a,b,c,d,e,f){var g=cl(c,"fmt");if(d){var h=cl(c,"random"),m=cl(c,"label")||"";if(!h)return!1;var n=ul($k(m)+":"+$k(h));if(!ql(a,n,d))return!1}g&&Number(g)!==4&&(c=el(c,"rfmt",g));var p=el(c,"fmt",4);rc(p,function(){a.google_noFurtherRedirects&&d&&(a.google_noFurtherRedirects=null,d())},e,f,b.getElementsByTagName("script")[0].parentElement||void 0);return!0};var wl={},xl=(wl[1]={},wl[2]={},wl[3]={},wl[4]={},wl);function yl(a,b,c){var d=zl(b,c);if(d){var e=xl[b][d];e||(e=xl[b][d]=[]);e.push(Object.assign({},a))}}function Al(a,b){var c=zl(a,b);if(c){var d=xl[a][c];d&&(xl[a][c]=d.filter(function(e){return!e.Fk}))}}function Bl(a){switch(a){case "script-src":case "script-src-elem":return 1;case "frame-src":return 4;case "connect-src":return 2;case "img-src":return 3}}
function zl(a,b){var c=b;if(b[0]==="/"){var d;c=((d=z.location)==null?void 0:d.origin)+b}try{var e=new URL(c);return a===4?e.origin:e.origin+e.pathname}catch(f){}}function Cl(a){var b=wa.apply(1,arguments);H(55)&&Dk&&(yl(a,2,b[0]),yl(a,3,b[0]));Cc.apply(null,sa(b))}function Dl(a){var b=wa.apply(1,arguments);H(55)&&Dk&&yl(a,2,b[0]);return Dc.apply(null,sa(b))}function El(a){var b=wa.apply(1,arguments);H(55)&&Dk&&yl(a,3,b[0]);uc.apply(null,sa(b))}
function Fl(a){var b=wa.apply(1,arguments),c=b[0];H(55)&&Dk&&(yl(a,2,c),yl(a,3,c));return Fc.apply(null,sa(b))}function Gl(a){var b=wa.apply(1,arguments);H(55)&&Dk&&yl(a,1,b[0]);rc.apply(null,sa(b))}function Hl(a){var b=wa.apply(1,arguments);b[0]&&H(55)&&Dk&&yl(a,4,b[0]);tc.apply(null,sa(b))}function Il(a){var b=wa.apply(1,arguments);H(55)&&Dk&&yl(a,1,b[2]);return vl.apply(null,sa(b))}function Jl(a){var b=wa.apply(1,arguments);H(55)&&Dk&&yl(a,4,b[0]);nl.apply(null,sa(b))};var Kl=/gtag[.\/]js/,Ll=/gtm[.\/]js/,Ml=!1;function Nl(a){if(Ml)return"1";var b,c=(b=a.scriptElement)==null?void 0:b.src;if(c){if(Kl.test(c))return"3";if(Ll.test(c))return"2"}return"0"};function Ol(a,b){var c=Pl();c.pending||(c.pending=[]);eb(c.pending,function(d){return d.target.ctid===a.ctid&&d.target.isDestination===a.isDestination})||c.pending.push({target:a,onLoad:b})}function Ql(){var a=z.google_tags_first_party;Array.isArray(a)||(a=[]);for(var b={},c=l(a),d=c.next();!d.done;d=c.next())b[d.value]=!0;return Object.freeze(b)}
var Rl=function(){this.container={};this.destination={};this.canonical={};this.pending=[];this.siloed=[];this.injectedFirstPartyContainers={};this.injectedFirstPartyContainers=Ql()};
function Pl(){var a=jc("google_tag_data",{}),b=a.tidr;b&&typeof b==="object"||(b=new Rl,a.tidr=b);var c=b;c.container||(c.container={});c.destination||(c.destination={});c.canonical||(c.canonical={});c.pending||(c.pending=[]);c.siloed||(c.siloed=[]);c.injectedFirstPartyContainers||(c.injectedFirstPartyContainers=Ql());return c};var Sl={},Tl=!1,Ul=void 0,Vf={ctid:"UA-84370-4",canonicalContainerId:"",zk:"UA-84370-4",Ak:"UA-84370-4"};Sl.Le=lb("");function Vl(){return Sl.Le&&Wl().some(function(a){return a===Vf.ctid})}function Xl(){var a=Yl();return Tl?a.map(Zl):a}function $l(){var a=Wl();return Tl?a.map(Zl):a}
function am(){var a=$l();if(!Tl)for(var b=l([].concat(sa(a))),c=b.next();!c.done;c=b.next()){var d=Zl(c.value),e=Pl().destination[d];e&&e.state!==0||a.push(d)}return a}function bm(){return cm(Vf.ctid)}function dm(){return cm(Vf.canonicalContainerId||"_"+Vf.ctid)}function Yl(){return Vf.zk?Vf.zk.split("|"):[Vf.ctid]}function Wl(){return Vf.Ak?Vf.Ak.split("|").filter(function(a){return H(107)?a.indexOf("GTM-")!==0:!0}):[]}function em(){var a=fm(gm()),b=a&&a.parent;if(b)return fm(b)}
function fm(a){var b=Pl();return a.isDestination?b.destination[a.ctid]:b.container[a.ctid]}function cm(a){return Tl?Zl(a):a}function Zl(a){return"siloed_"+a}function hm(a){a=String(a);return ub(a,"siloed_")?a.substring(7):a}function im(){if(oj.N){var a=Pl();if(a.siloed){for(var b=[],c=Yl().map(Zl),d=Wl().map(Zl),e={},f=0;f<a.siloed.length;e={sg:void 0},f++)e.sg=a.siloed[f],!Tl&&eb(e.sg.isDestination?d:c,function(g){return function(h){return h===g.sg.ctid}}(e))?Tl=!0:b.push(e.sg);a.siloed=b}}}
function jm(){var a=Pl();if(a.pending){for(var b,c=[],d=!1,e=Xl(),f=Ul?Ul:am(),g={},h=0;h<a.pending.length;g={uf:void 0},h++)g.uf=a.pending[h],eb(g.uf.target.isDestination?f:e,function(m){return function(n){return n===m.uf.target.ctid}}(g))?d||(b=g.uf.onLoad,d=!0):c.push(g.uf);a.pending=c;if(b)try{b(dm())}catch(m){}}}
function km(){var a=Vf.ctid,b=Xl(),c=am();Ul=c;for(var d=function(n,p){var q={canonicalContainerId:Vf.canonicalContainerId,scriptContainerId:a,state:2,containers:b.slice(),destinations:c.slice()};hc&&(q.scriptElement=hc);ic&&(q.scriptSource=ic);if(em()===void 0){var r;a:{if((q.scriptContainerId||"").indexOf("GTM-")>=0){var t;b:{var u,v=(u=q.scriptElement)==null?void 0:u.src;if(v){for(var w=oj.C,x=lk(v),y=w?x.pathname:""+x.hostname+x.pathname,B=A.scripts,C="",E=0;E<B.length;++E){var F=B[E];if(!(F.innerHTML.length===
0||!w&&F.innerHTML.indexOf(q.scriptContainerId||"SHOULD_NOT_BE_SET")<0||F.innerHTML.indexOf(y)<0)){if(F.innerHTML.indexOf("(function(w,d,s,l,i)")>=0){t=String(E);break b}C=String(E)}}if(C){t=C;break b}}t=void 0}var K=t;if(K){Ml=!0;r=K;break a}}var L=[].slice.call(A.scripts);r=q.scriptElement?String(L.indexOf(q.scriptElement)):"-1"}q.htmlLoadOrder=r;q.loadScriptType=Nl(q)}var U=p?e.destination:e.container,J=U[n];J?(p&&J.state===0&&O(93),Object.assign(J,q)):U[n]=q},e=Pl(),f=l(b),g=f.next();!g.done;g=
f.next())d(g.value,!1);for(var h=l(c),m=h.next();!m.done;m=h.next())d(m.value,!0);e.canonical[dm()]={};jm()}function lm(){var a=dm();return!!Pl().canonical[a]}function mm(a){return!!Pl().container[a]}function nm(a){var b=Pl().destination[a];return!!b&&!!b.state}function gm(){return{ctid:bm(),isDestination:Sl.Le}}function om(a,b,c){b.siloed&&pm({ctid:a,isDestination:!1});var d=gm();Pl().container[a]={state:1,context:b,parent:d};Ol({ctid:a,isDestination:!1},c)}
function pm(a){var b=Pl();(b.siloed=b.siloed||[]).push(a)}function qm(){var a=Pl().container,b;for(b in a)if(a.hasOwnProperty(b)&&a[b].state===1)return!0;return!1}function rm(){var a={};ib(Pl().destination,function(b,c){c.state===0&&(a[hm(b)]=c)});return a}function sm(a){return!!(a&&a.parent&&a.context&&a.context.source===1&&a.parent.ctid.indexOf("GTM-")!==0)}function tm(){for(var a=Pl(),b=l(Xl()),c=b.next();!c.done;c=b.next())if(a.injectedFirstPartyContainers[c.value])return!0;return!1}
function um(a){var b=Pl();return b.destination[a]?1:b.destination[Zl(a)]?2:0};var vm={Aa:{Bd:0,Cd:1,uh:2}};vm.Aa[vm.Aa.Bd]="FULL_TRANSMISSION";vm.Aa[vm.Aa.Cd]="LIMITED_TRANSMISSION";vm.Aa[vm.Aa.uh]="NO_TRANSMISSION";var wm={V:{qb:0,wa:1,jc:2,wc:3}};wm.V[wm.V.qb]="NO_QUEUE";wm.V[wm.V.wa]="ADS";wm.V[wm.V.jc]="ANALYTICS";wm.V[wm.V.wc]="MONITORING";function xm(){var a=jc("google_tag_data",{});return a.ics=a.ics||new ym}var ym=function(){this.entries={};this.waitPeriodTimedOut=this.wasSetLate=this.accessedAny=this.accessedDefault=this.usedImplicit=this.usedUpdate=this.usedDefault=this.usedDeclare=this.active=!1;this.C=[]};
ym.prototype.default=function(a,b,c,d,e,f,g){this.usedDefault||this.usedDeclare||!this.accessedDefault&&!this.accessedAny||(this.wasSetLate=!0);this.usedDefault=this.active=!0;Wa("TAGGING",19);b==null?Wa("TAGGING",18):zm(this,a,b==="granted",c,d,e,f,g)};ym.prototype.waitForUpdate=function(a,b,c){for(var d=0;d<a.length;d++)zm(this,a[d],void 0,void 0,"","",b,c)};
var zm=function(a,b,c,d,e,f,g,h){var m=a.entries,n=m[b]||{},p=n.region,q=d&&ab(d)?d.toUpperCase():void 0;e=e.toUpperCase();f=f.toUpperCase();if(e===""||q===f||(q===e?p!==f:!q&&!p)){var r=!!(g&&g>0&&n.update===void 0),t={region:q,declare_region:n.declare_region,implicit:n.implicit,default:c!==void 0?c:n.default,declare:n.declare,update:n.update,quiet:r};if(e!==""||n.default!==!1)m[b]=t;r&&z.setTimeout(function(){m[b]===t&&t.quiet&&(Wa("TAGGING",2),a.waitPeriodTimedOut=!0,a.clearTimeout(b,void 0,h),
a.notifyListeners())},g)}};k=ym.prototype;k.clearTimeout=function(a,b,c){var d=[a],e=c.delegatedConsentTypes,f;for(f in e)e.hasOwnProperty(f)&&e[f]===a&&d.push(f);var g=this.entries[a]||{},h=this.getConsentState(a,c);if(g.quiet){g.quiet=!1;for(var m=l(d),n=m.next();!n.done;n=m.next())Am(this,n.value)}else if(b!==void 0&&h!==b)for(var p=l(d),q=p.next();!q.done;q=p.next())Am(this,q.value)};
k.update=function(a,b,c){this.usedDefault||this.usedDeclare||this.usedUpdate||!this.accessedAny||(this.wasSetLate=!0);this.usedUpdate=this.active=!0;if(b!=null){var d=this.getConsentState(a,c),e=this.entries;(e[a]=e[a]||{}).update=b==="granted";this.clearTimeout(a,d,c)}};
k.declare=function(a,b,c,d,e){this.usedDeclare=this.active=!0;var f=this.entries,g=f[a]||{},h=g.declare_region,m=c&&ab(c)?c.toUpperCase():void 0;d=d.toUpperCase();e=e.toUpperCase();if(d===""||m===e||(m===d?h!==e:!m&&!h)){var n={region:g.region,declare_region:m,declare:b==="granted",implicit:g.implicit,default:g.default,update:g.update,quiet:g.quiet};if(d!==""||g.declare!==!1)f[a]=n}};
k.implicit=function(a,b){this.usedImplicit=!0;var c=this.entries,d=c[a]=c[a]||{};d.implicit!==!1&&(d.implicit=b==="granted")};
k.getConsentState=function(a,b){var c=this.entries,d=c[a]||{},e=d.update;if(e!==void 0)return e?1:2;if(b.usedContainerScopedDefaults){var f=b.containerScopedDefaults[a];if(f===3)return 1;if(f===2)return 2}else if(e=d.default,e!==void 0)return e?1:2;if(b==null?0:b.delegatedConsentTypes.hasOwnProperty(a)){var g=b.delegatedConsentTypes[a],h=c[g]||{};e=h.update;if(e!==void 0)return e?1:2;if(b.usedContainerScopedDefaults){var m=b.containerScopedDefaults[g];if(m===3)return 1;if(m===2)return 2}else if(e=
h.default,e!==void 0)return e?1:2}e=d.declare;if(e!==void 0)return e?1:2;e=d.implicit;return e!==void 0?e?3:4:0};k.addListener=function(a,b){this.C.push({consentTypes:a,Hd:b})};var Am=function(a,b){for(var c=0;c<a.C.length;++c){var d=a.C[c];Array.isArray(d.consentTypes)&&d.consentTypes.indexOf(b)!==-1&&(d.Bk=!0)}};ym.prototype.notifyListeners=function(a,b){for(var c=0;c<this.C.length;++c){var d=this.C[c];if(d.Bk){d.Bk=!1;try{d.Hd({consentEventId:a,consentPriorityId:b})}catch(e){}}}};var Bm=!1,Cm=!1,Dm={},Em={delegatedConsentTypes:{},corePlatformServices:{},usedCorePlatformServices:!1,selectedAllCorePlatformServices:!1,containerScopedDefaults:(Dm.ad_storage=1,Dm.analytics_storage=1,Dm.ad_user_data=1,Dm.ad_personalization=1,Dm),usedContainerScopedDefaults:!1};function Fm(a){var b=xm();b.accessedAny=!0;return(ab(a)?[a]:a).every(function(c){switch(b.getConsentState(c,Em)){case 1:case 3:return!0;case 2:case 4:return!1;default:return!0}})}
function Gm(a){var b=xm();b.accessedAny=!0;return b.getConsentState(a,Em)}function Hm(a){for(var b={},c=l(a),d=c.next();!d.done;d=c.next()){var e=d.value;b[e]=Em.corePlatformServices[e]!==!1}return b}function Im(a){var b=xm();b.accessedAny=!0;return!(b.entries[a]||{}).quiet}
function Jm(){if(!ig(8))return!1;var a=xm();a.accessedAny=!0;if(a.active)return!0;if(!Em.usedContainerScopedDefaults)return!1;for(var b=l(Object.keys(Em.containerScopedDefaults)),c=b.next();!c.done;c=b.next())if(Em.containerScopedDefaults[c.value]!==1)return!0;return!1}function Km(a,b){xm().addListener(a,b)}function Lm(a,b){xm().notifyListeners(a,b)}
function Mm(a,b){function c(){for(var e=0;e<b.length;e++)if(!Im(b[e]))return!0;return!1}if(c()){var d=!1;Km(b,function(e){d||c()||(d=!0,a(e))})}else a({})}
function Nm(a,b){function c(){for(var h=[],m=0;m<e.length;m++){var n=e[m];Fm(n)&&!f[n]&&h.push(n)}return h}function d(h){for(var m=0;m<h.length;m++)f[h[m]]=!0}var e=ab(b)?[b]:b,f={},g=c();g.length!==e.length&&(d(g),Km(e,function(h){function m(q){q.length!==0&&(d(q),h.consentTypes=q,a(h))}var n=c();if(n.length!==0){var p=Object.keys(f).length;n.length+p>=e.length?m(n):z.setTimeout(function(){m(c())},500)}}))};var Om={},Pm=(Om[wm.V.qb]=vm.Aa.Bd,Om[wm.V.wa]=vm.Aa.Bd,Om[wm.V.jc]=vm.Aa.Bd,Om[wm.V.wc]=vm.Aa.Bd,Om),Qm=function(a,b){this.C=a;this.consentTypes=b};Qm.prototype.isConsentGranted=function(){switch(this.C){case 0:return this.consentTypes.every(function(a){return Fm(a)});case 1:return this.consentTypes.some(function(a){return Fm(a)});default:Yb(this.C,"consentsRequired had an unknown type")}};
var Rm={},Sm=(Rm[wm.V.qb]=new Qm(0,[]),Rm[wm.V.wa]=new Qm(0,["ad_storage"]),Rm[wm.V.jc]=new Qm(0,["analytics_storage"]),Rm[wm.V.wc]=new Qm(1,["ad_storage","analytics_storage"]),Rm);var Um=function(a){var b=this;this.type=a;this.C=[];Km(Sm[a].consentTypes,function(){Tm(b)||b.flush()})};Um.prototype.flush=function(){for(var a=l(this.C),b=a.next();!b.done;b=a.next()){var c=b.value;c()}this.C=[]};var Tm=function(a){return Pm[a.type]===vm.Aa.uh&&!Sm[a.type].isConsentGranted()},Vm=function(a,b){Tm(a)?a.C.push(b):b()},Wm=new Map;function Xm(a){Wm.has(a)||Wm.set(a,new Um(a));return Wm.get(a)};var Ym="/td?id="+Vf.ctid,Zm="v t pid dl tdp exp".split(" "),$m=["mcc"],an={},bn={},cn=!1;function dn(a,b,c){bn[a]=b;(c===void 0||c)&&en(a)}function en(a,b){if(an[a]===void 0||(b===void 0?0:b))an[a]=!0}function fn(a){a=a===void 0?!1:a;var b=Object.keys(an).filter(function(c){return an[c]===!0&&bn[c]!==void 0&&(a||!$m.includes(c))}).map(function(c){var d=bn[c];typeof d==="function"&&(d=d());return d?"&"+c+"="+d:""}).join("");return""+uk("https://www.googletagmanager.com")+Ym+(""+b+"&z=0")}
function gn(){Object.keys(an).forEach(function(a){Zm.indexOf(a)<0&&(an[a]=!1)})}function hn(a){a=a===void 0?!1:a;if(oj.R&&Dk&&Vf.ctid){var b=Xm(wm.V.wc);if(Tm(b))cn||(cn=!0,Vm(b,hn));else{var c=fn(a),d={destinationId:Vf.ctid,endpoint:56};a?Fl(d,c):El(d,c);gn();cn=!1}}}var jn={};function kn(){Object.keys(an).filter(function(a){return an[a]&&!Zm.includes(a)}).length>0&&hn(!0)}var ln=fb();function mn(){ln=fb()}
function nn(){dn("v","3");dn("t","t");dn("pid",function(){return String(ln)});dn("exp",Jj());wc(z,"pagehide",kn);z.setInterval(mn,864E5)};var on=["ad_storage","analytics_storage","ad_user_data","ad_personalization"],pn=[N.m.Pc,N.m.Xb,N.m.ud,N.m.wb,N.m.Wb,N.m.Ha,N.m.Ga,N.m.Ta,N.m.Xa,N.m.yb],qn=!1,rn=!1,sn={},tn={};function un(){!rn&&qn&&(on.some(function(a){return Em.containerScopedDefaults[a]!==1})||vn("mbc"));rn=!0}function vn(a){Dk&&(dn(a,"1"),hn())}function wn(a,b){if(!sn[b]&&(sn[b]=!0,tn[b]))for(var c=l(pn),d=c.next();!d.done;d=c.next())if(a.hasOwnProperty(d.value)){vn("erc");break}};function xn(a){Wa("HEALTH",a)};var yn={Yj:"service_worker_endpoint",zh:"shared_user_id",Ah:"shared_user_id_requested",Re:"shared_user_id_source",Ef:"cookie_deprecation_label",Tk:"aw_user_data_cache",Xl:"ga4_user_data_cache",Wl:"fl_user_data_cache",Tj:"pt_listener_set",Pe:"pt_data",th:"ip_geo_fetch_in_progress",Ke:"ip_geo_data_cache"},zn;function An(a){if(!zn){zn={};for(var b=l(Object.keys(yn)),c=b.next();!c.done;c=b.next())zn[yn[c.value]]=!0}return!!zn[a]}
function Bn(a,b){b=b===void 0?!1:b;if(An(a)){var c,d,e=(d=(c=jc("google_tag_data",{})).xcd)!=null?d:c.xcd={};if(e[a])return e[a];if(b){var f=void 0,g=1,h={},m={set:function(n){f=n;m.notify()},get:function(){return f},subscribe:function(n){h[String(g)]=n;return g++},unsubscribe:function(n){var p=String(n);return h.hasOwnProperty(p)?(delete h[p],!0):!1},notify:function(){for(var n=l(Object.keys(h)),p=n.next();!p.done;p=n.next()){var q=p.value;try{h[q](a,f)}catch(r){}}}};return e[a]=m}}}
function Cn(a,b){var c=Bn(a,!0);c&&c.set(b)}function Dn(a){var b;return(b=Bn(a))==null?void 0:b.get()}function En(a,b){if(typeof b==="function"){var c;return(c=Bn(a,!0))==null?void 0:c.subscribe(b)}}function Fn(a,b){var c=Bn(a);return c?c.unsubscribe(b):!1};var Gn={Ym:"eyIwIjoiVVMiLCIxIjoiVVMtUEEiLCIyIjpmYWxzZSwiMyI6IiIsIjQiOiIiLCI1Ijp0cnVlLCI2IjpmYWxzZSwiNyI6ImFkX3N0b3JhZ2V8YW5hbHl0aWNzX3N0b3JhZ2V8YWRfdXNlcl9kYXRhfGFkX3BlcnNvbmFsaXphdGlvbiJ9"},Hn={},In=!1;function Jn(){function a(){c!==void 0&&Fn(yn.Ke,c);try{var e=Dn(yn.Ke);Hn=JSON.parse(e)}catch(f){O(123),xn(2),Hn={}}In=!0;b()}var b=Kn,c=void 0,d=Dn(yn.Ke);d?a(d):(c=En(yn.Ke,a),Ln())}
function Ln(){function a(c){Cn(yn.Ke,c||"{}");Cn(yn.th,!1)}if(!Dn(yn.th)){Cn(yn.th,!0);var b="";try{z.fetch(b,{method:"GET",cache:"no-store",mode:"cors",credentials:"omit"}).then(function(c){c.ok?c.text().then(function(d){a(d)},function(){a()}):a()},function(){a()})}catch(c){a()}}}
function Mn(){var a=Gn.Ym;try{return JSON.parse(Ta(a))}catch(b){return O(123),xn(2),{}}}function Nn(){return Hn["0"]||""}function On(){return Hn["1"]||""}function Pn(){var a=!1;return a}function Qn(){return Hn["6"]!==!1}function Rn(){var a="";return a}
function Sn(){var a=!1;return a}function Tn(){var a="";return a};function Un(a){return a&&a.indexOf("pending:")===0?Vn(a.substr(8)):!1}function Vn(a){if(a==null||a.length===0)return!1;var b=Number(a),c=pb();return b<c+3E5&&b>c-9E5};var Wn=!1,Xn=!1,Yn=!1,Zn=0,$n=!1,ao=[];function bo(a){if(Zn===0)$n&&ao&&(ao.length>=100&&ao.shift(),ao.push(a));else if(co()){var b=jc('google.tagmanager.ta.prodqueue',[]);b.length>=50&&b.shift();b.push(a)}}function eo(){fo();xc(A,"TAProdDebugSignal",eo)}function fo(){if(!Xn){Xn=!0;go();var a=ao;ao=void 0;a==null||a.forEach(function(b){bo(b)})}}
function go(){var a=A.documentElement.getAttribute("data-tag-assistant-prod-present");Vn(a)?Zn=1:!Un(a)||Wn||Yn?Zn=2:(Yn=!0,wc(A,"TAProdDebugSignal",eo,!1),z.setTimeout(function(){fo();Wn=!0},200))}function co(){if(!$n)return!1;switch(Zn){case 1:case 0:return!0;case 2:return!1;default:return!1}};var ho=!1;function io(a,b){var c=Yl(),d=Wl();if(co()){var e=jo("INIT");e.containerLoadSource=a!=null?a:0;b&&(e.parentTargetReference=b);e.aliases=c;e.destinations=d;bo(e)}}function ko(a){var b,c,d,e;b=a.targetId;c=a.request;d=a.Na;e=a.isBatched;if(co()){var f=jo("GTAG_HIT",{eventId:d.eventId,priorityId:d.priorityId});f.target=b;f.url=c.url;c.postBody&&(f.postBody=c.postBody);f.parameterEncoding=c.parameterEncoding;f.endpoint=c.endpoint;e!==void 0&&(f.isBatched=e);bo(f)}}
function lo(a){co()&&ko(a())}function jo(a,b){b=b===void 0?{}:b;b.groupId=mo;var c,d=b,e={publicId:no};d.eventId!=null&&(e.eventId=d.eventId);d.priorityId!=null&&(e.priorityId=d.priorityId);d.eventName&&(e.eventName=d.eventName);d.groupId&&(e.groupId=d.groupId);d.tagName&&(e.tagName=d.tagName);c={containerProduct:"GTM",key:e,version:'1',messageType:a};c.containerProduct=ho?"OGT":"GTM";c.key.targetRef=oo;return c}var no="",oo={ctid:"",isDestination:!1},mo;
function po(a){var b=Vf.ctid,c=Vl();Zn=0;$n=!0;go();mo=a;no=b;ho=xj;oo={ctid:b,isDestination:c}};var qo=[N.m.T,N.m.Z,N.m.U,N.m.Ca],ro,so;function to(a){for(var b=a[N.m.Mb],c=Array.isArray(b)?b:[b],d={ff:0};d.ff<c.length;d={ff:d.ff},++d.ff)ib(a,function(e){return function(f,g){if(f!==N.m.Mb){var h=c[e.ff],m=Nn(),n=On();Cm=!0;Bm&&Wa("TAGGING",20);xm().declare(f,g,h,m,n)}}}(d))}
function uo(a){un();!so&&ro&&vn("crc");so=!0;var b=a[N.m.Mb];b&&O(40);var c=a[N.m.Cf];c&&O(41);for(var d=Array.isArray(b)?b:[b],e={hf:0};e.hf<d.length;e={hf:e.hf},++e.hf)ib(a,function(f){return function(g,h){if(g!==N.m.Mb&&g!==N.m.Cf){var m=d[f.hf],n=Number(c),p=Nn(),q=On();n=n===void 0?0:n;Bm=!0;Cm&&Wa("TAGGING",20);xm().default(g,h,m,p,q,n,Em)}}}(e))}
function vo(a){Em.usedContainerScopedDefaults=!0;var b=a[N.m.Mb];if(b){var c=Array.isArray(b)?b:[b];if(!c.includes(On())&&!c.includes(Nn()))return}ib(a,function(d,e){switch(d){case "ad_storage":case "analytics_storage":case "ad_user_data":case "ad_personalization":break;default:return}Em.usedContainerScopedDefaults=!0;Em.containerScopedDefaults[d]=e==="granted"?3:2})}function wo(a,b){un();ro=!0;ib(a,function(c,d){Bm=!0;Cm&&Wa("TAGGING",20);xm().update(c,d,Em)});Lm(b.eventId,b.priorityId)}
function xo(a){a.hasOwnProperty("all")&&(Em.selectedAllCorePlatformServices=!0,ib(ci,function(b){Em.corePlatformServices[b]=a.all==="granted";Em.usedCorePlatformServices=!0}));ib(a,function(b,c){b!=="all"&&(Em.corePlatformServices[b]=c==="granted",Em.usedCorePlatformServices=!0)})}function yo(a){Array.isArray(a)||(a=[a]);return a.every(function(b){return Fm(b)})}function zo(a,b){Km(a,b)}function Ao(a,b){Nm(a,b)}function Bo(a,b){Mm(a,b)}
function Co(){var a=[N.m.T,N.m.Ca,N.m.U];xm().waitForUpdate(a,500,Em)}function Do(a){for(var b=l(a),c=b.next();!c.done;c=b.next()){var d=c.value;xm().clearTimeout(d,void 0,Em)}Lm()}function Eo(){if(!Bj)for(var a=Qn()?Mj(oj.ia):Mj(oj.ab),b=0;b<qo.length;b++){var c=qo[b],d=c,e=a[c]?"granted":"denied";xm().implicit(d,e)}};var Fo=!1,Go=[];function Ho(){if(!Fo){Fo=!0;for(var a=Go.length-1;a>=0;a--)Go[a]();Go=[]}};var Io=z.google_tag_manager=z.google_tag_manager||{};function Jo(a,b){return Io[a]=Io[a]||b()}function Ko(){var a=bm(),b=Lo;Io[a]=Io[a]||b}function Mo(){var a=rj.vb;return Io[a]=Io[a]||{}}function No(){var a=Io.sequence||1;Io.sequence=a+1;return a};function Oo(){if(Io.pscdl!==void 0)Dn(yn.Ef)===void 0&&Cn(yn.Ef,Io.pscdl);else{var a=function(c){Io.pscdl=c;Cn(yn.Ef,c)},b=function(){a("error")};try{fc.cookieDeprecationLabel?(a("pending"),fc.cookieDeprecationLabel.getValue().then(a).catch(b)):a("noapi")}catch(c){b(c)}}};function Po(a,b){b&&ib(b,function(c,d){typeof d!=="object"&&d!==void 0&&(a["1p."+c]=String(d))})};var Qo=/^(?:siloed_)?(?:AW|DC|G|GF|GT|HA|MC|UA)$/,Ro=/\s/;
function So(a,b){if(ab(a)){a=nb(a);var c=a.indexOf("-");if(!(c<0)){var d=a.substring(0,c);if(Qo.test(d)){var e=a.substring(c+1),f;if(b){var g=function(n){var p=n.indexOf("/");return p<0?[n]:[n.substring(0,p),n.substring(p+1)]};f=g(e);if(d==="DC"&&f.length===2){var h=g(f[1]);h.length===2&&(f[1]=h[0],f.push(h[1]))}}else{f=e.split("/");for(var m=0;m<f.length;m++)if(!f[m]||Ro.test(f[m])&&(d!=="AW"||m!==1))return}return{id:a,prefix:d,destinationId:d+"-"+f[0],ids:f}}}}}
function To(a,b){for(var c={},d=0;d<a.length;++d){var e=So(a[d],b);e&&(c[e.id]=e)}Uo(c);var f=[];ib(c,function(g,h){f.push(h)});return f}function Uo(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];d.prefix==="AW"&&d.ids[Vo[1]]&&b.push(d.destinationId)}for(var e=0;e<b.length;++e)delete a[b[e]]}var Wo={},Vo=(Wo[0]=0,Wo[1]=1,Wo[2]=2,Wo[3]=0,Wo[4]=1,Wo[5]=0,Wo[6]=0,Wo[7]=0,Wo);var Xo=Number('')||500,Yo={},Zo={},$o={initialized:11,complete:12,interactive:13},ep={},fp=Object.freeze((ep[N.m.Za]=!0,ep)),gp=void 0;function hp(a,b){if(b.length&&Dk){var c;(c=Yo)[a]!=null||(c[a]=[]);Zo[a]!=null||(Zo[a]=[]);var d=b.filter(function(e){return!Zo[a].includes(e)});Yo[a].push.apply(Yo[a],sa(d));Zo[a].push.apply(Zo[a],sa(d));!gp&&d.length>0&&(en("tdc",!0),gp=z.setTimeout(function(){hn();Yo={};gp=void 0},Xo))}}
function ip(a,b){var c={},d;for(d in b)b.hasOwnProperty(d)&&(c[d]=!0);for(var e in a)a.hasOwnProperty(e)&&(c[e]=!0);return c}
function jp(a,b,c,d){c=c===void 0?{}:c;d=d===void 0?"":d;if(a===b)return[];var e=function(r,t){var u;Uc(t)==="object"?u=t[r]:Uc(t)==="array"&&(u=t[r]);return u===void 0?fp[r]:u},f=ip(a,b),g;for(g in f)if(f.hasOwnProperty(g)){var h=(d?d+".":"")+g,m=e(g,a),n=e(g,b),p=Uc(m)==="object"||Uc(m)==="array",q=Uc(n)==="object"||Uc(n)==="array";if(p&&q)jp(m,n,c,h);else if(p||q||m!==n)c[h]=!0}return Object.keys(c)}
function kp(){dn("tdc",function(){gp&&(z.clearTimeout(gp),gp=void 0);var a=[],b;for(b in Yo)Yo.hasOwnProperty(b)&&a.push(b+"*"+Yo[b].join("."));return a.length?a.join("!"):void 0},!1)};var lp=function(a,b,c,d,e,f,g,h,m,n,p){this.eventId=a;this.priorityId=b;this.C=c;this.R=d;this.N=e;this.O=f;this.H=g;this.eventMetadata=h;this.onSuccess=m;this.onFailure=n;this.isGtmEvent=p},mp=function(a,b){var c=[];switch(b){case 3:c.push(a.C);c.push(a.R);c.push(a.N);c.push(a.O);c.push(a.H);break;case 2:c.push(a.C);break;case 1:c.push(a.R);c.push(a.N);c.push(a.O);c.push(a.H);break;case 4:c.push(a.C),c.push(a.R),c.push(a.N),c.push(a.O)}return c},P=function(a,b,c,d){for(var e=l(mp(a,d===void 0?3:
d)),f=e.next();!f.done;f=e.next()){var g=f.value;if(g[b]!==void 0)return g[b]}return c},np=function(a){for(var b={},c=mp(a,4),d=l(c),e=d.next();!e.done;e=d.next())for(var f=Object.keys(e.value),g=l(f),h=g.next();!h.done;h=g.next())b[h.value]=1;return Object.keys(b)},op=function(a,b,c){function d(n){Wc(n)&&ib(n,function(p,q){f=!0;e[p]=q})}var e={},f=!1,g=mp(a,c===void 0?3:c);g.reverse();for(var h=l(g),m=h.next();!m.done;m=h.next())d(m.value[b]);return f?e:void 0},pp=function(a){for(var b=[N.m.ee,N.m.ae,
N.m.be,N.m.ce,N.m.de,N.m.fe,N.m.he],c=mp(a,3),d=l(c),e=d.next();!e.done;e=d.next()){for(var f=e.value,g={},h=!1,m=l(b),n=m.next();!n.done;n=m.next()){var p=n.value;f[p]!==void 0&&(g[p]=f[p],h=!0)}var q=h?g:void 0;if(q)return q}return{}},qp=function(a,b){this.eventId=a;this.priorityId=b;this.H={};this.R={};this.C={};this.N={};this.fa={};this.O={};this.eventMetadata={};this.isGtmEvent=!1;this.onSuccess=function(){};this.onFailure=function(){}},rp=function(a,b){a.H=b;return a},sp=function(a,b){a.R=b;
return a},tp=function(a,b){a.C=b;return a},up=function(a,b){a.N=b;return a},vp=function(a,b){a.fa=b;return a},wp=function(a,b){a.O=b;return a},xp=function(a,b){a.eventMetadata=b||{};return a},yp=function(a,b){a.onSuccess=b;return a},zp=function(a,b){a.onFailure=b;return a},Ap=function(a,b){a.isGtmEvent=b;return a},Bp=function(a){return new lp(a.eventId,a.priorityId,a.H,a.R,a.C,a.N,a.O,a.eventMetadata,a.onSuccess,a.onFailure,a.isGtmEvent)};var Cp={Rk:Number("5"),Zo:Number("")},Dp=[],Ep=!1;function Fp(a){Dp.push(a)}var Gp="?id="+Vf.ctid,Hp=void 0,Ip={},Jp=void 0,Kp=new function(){var a=5;Cp.Rk>0&&(a=Cp.Rk);this.H=a;this.C=0;this.N=[]},Lp=1E3;
function Mp(a,b){var c=Hp;if(c===void 0)if(b)c=No();else return"";for(var d=[uk("https://www.googletagmanager.com"),"/a",Gp],e=l(Dp),f=e.next();!f.done;f=e.next())for(var g=f.value,h=g({eventId:c,gd:!!a}),m=l(h),n=m.next();!n.done;n=m.next()){var p=l(n.value),q=p.next().value,r=p.next().value;d.push("&"+q+"="+r)}d.push("&z=0");return d.join("")}
function Np(){if(oj.R&&(Jp&&(z.clearTimeout(Jp),Jp=void 0),Hp!==void 0&&Op)){var a=Xm(wm.V.wc);if(Tm(a))Ep||(Ep=!0,Vm(a,Np));else{var b;if(!(b=Ip[Hp])){var c=Kp;b=c.C<c.H?!1:pb()-c.N[c.C%c.H]<1E3}if(b||Lp--<=0)O(1),Ip[Hp]=!0;else{var d=Kp,e=d.C++%d.H;d.N[e]=pb();var f=Mp(!0);El({destinationId:Vf.ctid,endpoint:56,eventId:Hp},f);Ep=Op=!1}}}}function Pp(){if(Ck&&oj.R){var a=Mp(!0,!0);El({destinationId:Vf.ctid,endpoint:56,eventId:Hp},a)}}var Op=!1;
function Qp(a){Ip[a]||(a!==Hp&&(Np(),Hp=a),Op=!0,Jp||(Jp=z.setTimeout(Np,500)),Mp().length>=2022&&Np())}var Rp=fb();function Sp(){Rp=fb()}function Tp(){return[["v","3"],["t","t"],["pid",String(Rp)]]};var Up={};function Vp(a,b,c){Ck&&a!==void 0&&(Up[a]=Up[a]||[],Up[a].push(c+b),Qp(a))}function Wp(a){var b=a.eventId,c=a.gd,d=[],e=Up[b]||[];e.length&&d.push(["epr",e.join(".")]);c&&delete Up[b];return d};function Xp(a,b,c){var d=So(cm(a),!0);d&&Yp.register(d,b,c)}function Zp(a,b,c,d){var e=So(c,d.isGtmEvent);e&&(wj&&(d.deferrable=!0),Yp.push("event",[b,a],e,d))}function $p(a,b,c,d){var e=So(c,d.isGtmEvent);e&&Yp.push("get",[a,b],e,d)}function aq(a){var b=So(cm(a),!0),c;b?c=bq(Yp,b).C:c={};return c}function cq(a,b){var c=So(cm(a),!0);if(c){var d=Yp,e=Xc(b,null);Xc(bq(d,c).C,e);bq(d,c).C=e}}
var dq=function(){this.R={};this.C={};this.H={};this.fa=null;this.O={};this.N=!1;this.status=1},eq=function(a,b,c,d){this.H=pb();this.C=b;this.args=c;this.messageContext=d;this.type=a},fq=function(){this.destinations={};this.C={};this.commands=[]},bq=function(a,b){var c=b.destinationId;Tl||(c=hm(c));return a.destinations[c]=a.destinations[c]||new dq},gq=function(a,b,c,d){if(d.C){var e=bq(a,d.C),f=e.fa;if(f){var g=d.C.id;Tl||(g=hm(g));var h=Xc(c,null),m=Xc(e.R[g],null),n=Xc(e.O,null),p=Xc(e.C,null),
q=Xc(a.C,null),r={};if(Ck)try{r=Xc(Oj,null)}catch(x){O(72)}var t=d.C.prefix,u=function(x){Vp(d.messageContext.eventId,t,x)},v=Bp(Ap(zp(yp(xp(vp(up(wp(tp(sp(rp(new qp(d.messageContext.eventId,d.messageContext.priorityId),h),m),n),p),q),r),d.messageContext.eventMetadata),function(){if(u){var x=u;u=void 0;x("2");if(d.messageContext.onSuccess)d.messageContext.onSuccess()}}),function(){if(u){var x=u;u=void 0;x("3");if(d.messageContext.onFailure)d.messageContext.onFailure()}}),!!d.messageContext.isGtmEvent)),
w=function(){try{Vp(d.messageContext.eventId,t,"1");var x=d.type,y=d.C.id;if(Dk&&x==="config"){var B,C=(B=So(y))==null?void 0:B.ids;if(!(C&&C.length>1)){var E,F=jc("google_tag_data",{});F.td||(F.td={});E=F.td;var K=Xc(v.O);Xc(v.C,K);var L=[],U;for(U in E)E.hasOwnProperty(U)&&jp(E[U],K).length&&L.push(U);L.length&&(hp(y,L),Wa("TAGGING",$o[A.readyState]||14));E[y]=K}}f(d.C.id,b,d.H,v)}catch(J){Vp(d.messageContext.eventId,t,"4")}};b==="gtag.get"?w():Vm(e.ia,w)}}};
fq.prototype.register=function(a,b,c){var d=bq(this,a);d.status!==3&&(d.fa=b,d.status=3,d.ia=Xm(c),this.flush())};
fq.prototype.push=function(a,b,c,d){c!==void 0&&(bq(this,c).status===1&&(bq(this,c).status=2,this.push("require",[{}],c,{})),bq(this,c).N&&(d.deferrable=!1),d.eventMetadata||(d.eventMetadata={}),d.eventMetadata.send_to_destinations||(d.eventMetadata.send_to_destinations=[c.destinationId]),d.eventMetadata.send_to_targets||(d.eventMetadata.send_to_targets=[c.id]));this.commands.push(new eq(a,c,b,d));d.deferrable||this.flush()};
fq.prototype.flush=function(a){for(var b=this,c=[],d=!1,e={};this.commands.length;e={Zb:void 0,ug:void 0}){var f=this.commands[0],g=f.C;if(f.messageContext.deferrable)!g||bq(this,g).N?(f.messageContext.deferrable=!1,this.commands.push(f)):c.push(f),this.commands.shift();else{switch(f.type){case "require":if(bq(this,g).status!==3&&!a){this.commands.push.apply(this.commands,c);return}break;case "set":var h=f.args[0];ib(h,function(u,v){Xc(wb(u,v),b.C)});mj(h,!0);break;case "config":var m=bq(this,g);
e.Zb={};ib(f.args[0],function(u){return function(v,w){Xc(wb(v,w),u.Zb)}}(e));var n=!!e.Zb[N.m.Rc];delete e.Zb[N.m.Rc];var p=g.destinationId===g.id;mj(e.Zb,!0);n||(p?m.O={}:m.R[g.id]={});m.N&&n||gq(this,N.m.ka,e.Zb,f);m.N=!0;p?Xc(e.Zb,m.O):(Xc(e.Zb,m.R[g.id]),O(70));d=!0;wn(e.Zb,g.id);qn=!0;break;case "event":e.ug={};ib(f.args[0],function(u){return function(v,w){Xc(wb(v,w),u.ug)}}(e));mj(e.ug);gq(this,f.args[1],e.ug,f);var q=void 0;!f.C||((q=f.messageContext.eventMetadata)==null?0:q.em_event)||(tn[f.C.id]=
!0);qn=!0;break;case "get":var r={},t=(r[N.m.Ub]=f.args[0],r[N.m.oc]=f.args[1],r);gq(this,N.m.mb,t,f);qn=!0}this.commands.shift();hq(this,f)}}this.commands.push.apply(this.commands,c);d&&this.flush()};var hq=function(a,b){if(b.type!=="require")if(b.C)for(var c=bq(a,b.C).H[b.type]||[],d=0;d<c.length;d++)c[d]();else for(var e in a.destinations)if(a.destinations.hasOwnProperty(e)){var f=a.destinations[e];if(f&&f.H)for(var g=f.H[b.type]||[],h=0;h<g.length;h++)g[h]()}},Yp=new fq;var iq=function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),!0):!1},jq=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)};function kq(a,b,c,d){d=d===void 0?!1:d;a.google_image_requests||(a.google_image_requests=[]);var e=jl(a.document);if(c){var f=function(){if(c){var g=a.google_image_requests,h=cc(g,e);h>=0&&Array.prototype.splice.call(g,h,1)}jq(e,"load",f);jq(e,"error",f)};iq(e,"load",f);iq(e,"error",f)}d&&(e.attributionSrc="");e.src=b;a.google_image_requests.push(e)}
function lq(a){var b;b=b===void 0?!1:b;var c="https://pagead2.googlesyndication.com/pagead/gen_204?id=tcfe";gl(a,function(d,e){if(d||d===0)c+="&"+e+"="+encodeURIComponent(String(d))});mq(c,b)}
function mq(a,b){var c=window,d;b=b===void 0?!1:b;d=d===void 0?!1:d;if(c.fetch){var e={keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no-cors"};d&&(e.mode="cors","setAttributionReporting"in XMLHttpRequest.prototype?e.attributionReporting={eventSourceEligible:"true",triggerEligible:"false"}:e.headers={"Attribution-Reporting-Eligible":"event-source"});c.fetch(a,e)}else kq(c,a,b===void 0?!1:b,d===void 0?!1:d)};var nq=function(){this.fa=this.fa;this.O=this.O};nq.prototype.fa=!1;nq.prototype.dispose=function(){this.fa||(this.fa=!0,this.N())};nq.prototype[Symbol.dispose]=function(){this.dispose()};nq.prototype.addOnDisposeCallback=function(a,b){this.fa?b!==void 0?a.call(b):a():(this.O||(this.O=[]),b&&(a=a.bind(b)),this.O.push(a))};nq.prototype.N=function(){if(this.O)for(;this.O.length;)this.O.shift()()};function oq(a){a.addtlConsent!==void 0&&typeof a.addtlConsent!=="string"&&(a.addtlConsent=void 0);a.gdprApplies!==void 0&&typeof a.gdprApplies!=="boolean"&&(a.gdprApplies=void 0);return a.tcString!==void 0&&typeof a.tcString!=="string"||a.listenerId!==void 0&&typeof a.listenerId!=="number"?2:a.cmpStatus&&a.cmpStatus!=="error"?0:3}
var pq=function(a,b){b=b===void 0?{}:b;nq.call(this);this.C=null;this.ia={};this.xc=0;this.R=null;this.H=a;var c;this.ab=(c=b.timeoutMs)!=null?c:500;var d;this.Da=(d=b.Po)!=null?d:!1};qa(pq,nq);pq.prototype.N=function(){this.ia={};this.R&&(jq(this.H,"message",this.R),delete this.R);delete this.ia;delete this.H;delete this.C;nq.prototype.N.call(this)};var rq=function(a){return typeof a.H.__tcfapi==="function"||qq(a)!=null};
pq.prototype.addEventListener=function(a){var b=this,c={internalBlockOnErrors:this.Da},d=Zk(function(){return a(c)}),e=0;this.ab!==-1&&(e=setTimeout(function(){c.tcString="tcunavailable";c.internalErrorState=1;d()},this.ab));var f=function(g,h){clearTimeout(e);g?(c=g,c.internalErrorState=oq(c),c.internalBlockOnErrors=b.Da,h&&c.internalErrorState===0||(c.tcString="tcunavailable",h||(c.internalErrorState=3))):(c.tcString="tcunavailable",c.internalErrorState=3);a(c)};try{sq(this,"addEventListener",f)}catch(g){c.tcString=
"tcunavailable",c.internalErrorState=3,e&&(clearTimeout(e),e=0),d()}};pq.prototype.removeEventListener=function(a){a&&a.listenerId&&sq(this,"removeEventListener",null,a.listenerId)};
var uq=function(a,b,c){var d;d=d===void 0?"755":d;var e;a:{if(a.publisher&&a.publisher.restrictions){var f=a.publisher.restrictions[b];if(f!==void 0){e=f[d===void 0?"755":d];break a}}e=void 0}var g=e;if(g===0)return!1;var h=c;c===2?(h=0,g===2&&(h=1)):c===3&&(h=1,g===1&&(h=0));var m;if(h===0)if(a.purpose&&a.vendor){var n=tq(a.vendor.consents,d===void 0?"755":d);m=n&&b==="1"&&a.purposeOneTreatment&&a.publisherCC==="CH"?!0:n&&tq(a.purpose.consents,b)}else m=!0;else m=h===1?a.purpose&&a.vendor?tq(a.purpose.legitimateInterests,
b)&&tq(a.vendor.legitimateInterests,d===void 0?"755":d):!0:!0;return m},tq=function(a,b){return!(!a||!a[b])},sq=function(a,b,c,d){c||(c=function(){});var e=a.H;if(typeof e.__tcfapi==="function"){var f=e.__tcfapi;f(b,2,c,d)}else if(qq(a)){vq(a);var g=++a.xc;a.ia[g]=c;if(a.C){var h={};a.C.postMessage((h.__tcfapiCall={command:b,version:2,callId:g,parameter:d},h),"*")}}else c({},!1)},qq=function(a){if(a.C)return a.C;a.C=hl(a.H,"__tcfapiLocator");return a.C},vq=function(a){if(!a.R){var b=function(c){try{var d;
d=(typeof c.data==="string"?JSON.parse(c.data):c.data).__tcfapiReturn;a.ia[d.callId](d.returnValue,d.success)}catch(e){}};a.R=b;iq(a.H,"message",b)}},wq=function(a){if(a.gdprApplies===!1)return!0;a.internalErrorState===void 0&&(a.internalErrorState=oq(a));return a.cmpStatus==="error"||a.internalErrorState!==0?a.internalBlockOnErrors?(lq({e:String(a.internalErrorState)}),!1):!0:a.cmpStatus!=="loaded"||a.eventStatus!=="tcloaded"&&a.eventStatus!=="useractioncomplete"?!1:!0};var xq={1:0,3:0,4:0,7:3,9:3,10:3};function yq(){return Jo("tcf",function(){return{}})}var zq=function(){return new pq(z,{timeoutMs:-1})};
function Aq(){var a=yq(),b=zq();rq(b)&&!Bq()&&!Cq()&&O(124);if(!a.active&&rq(b)){Bq()&&(a.active=!0,a.purposes={},a.cmpId=0,a.tcfPolicyVersion=0,xm().active=!0,a.tcString="tcunavailable");Co();try{b.addEventListener(function(c){if(c.internalErrorState!==0)Dq(a),Do([N.m.T,N.m.Ca,N.m.U]),xm().active=!0;else if(a.gdprApplies=c.gdprApplies,a.cmpId=c.cmpId,a.enableAdvertiserConsentMode=c.enableAdvertiserConsentMode,Cq()&&(a.active=!0),!Eq(c)||Bq()||Cq()){a.tcfPolicyVersion=c.tcfPolicyVersion;var d;if(c.gdprApplies===
!1){var e={},f;for(f in xq)xq.hasOwnProperty(f)&&(e[f]=!0);d=e;b.removeEventListener(c)}else if(Eq(c)){var g={},h;for(h in xq)if(xq.hasOwnProperty(h))if(h==="1"){var m,n=c,p={Xm:!0};p=p===void 0?{}:p;m=wq(n)?n.gdprApplies===!1?!0:n.tcString==="tcunavailable"?!p.idpcApplies:(p.idpcApplies||n.gdprApplies!==void 0||p.Xm)&&(p.idpcApplies||typeof n.tcString==="string"&&n.tcString.length)?uq(n,"1",0):!0:!1;g["1"]=m}else g[h]=uq(c,h,xq[h]);d=g}if(d){a.tcString=c.tcString||"tcempty";a.purposes=d;var q={},
r=(q[N.m.T]=a.purposes["1"]?"granted":"denied",q);a.gdprApplies!==!0?(Do([N.m.T,N.m.Ca,N.m.U]),xm().active=!0):(r[N.m.Ca]=a.purposes["3"]&&a.purposes["4"]?"granted":"denied",typeof a.tcfPolicyVersion==="number"&&a.tcfPolicyVersion>=4?r[N.m.U]=a.purposes["1"]&&a.purposes["7"]?"granted":"denied":Do([N.m.U]),wo(r,{eventId:0},{gdprApplies:a?a.gdprApplies:void 0,tcString:Fq()||""}))}}else Do([N.m.T,N.m.Ca,N.m.U])})}catch(c){Dq(a),Do([N.m.T,N.m.Ca,N.m.U]),xm().active=!0}}}
function Dq(a){a.type="e";a.tcString="tcunavailable"}function Eq(a){return a.eventStatus==="tcloaded"||a.eventStatus==="useractioncomplete"||a.eventStatus==="cmpuishown"}function Bq(){return z.gtag_enable_tcf_support===!0}function Cq(){return yq().enableAdvertiserConsentMode===!0}function Fq(){var a=yq();if(a.active)return a.tcString}function Gq(){var a=yq();if(a.active&&a.gdprApplies!==void 0)return a.gdprApplies?"1":"0"}
function Hq(a){if(!xq.hasOwnProperty(String(a)))return!0;var b=yq();return b.active&&b.purposes?!!b.purposes[String(a)]:!0};var Iq=[N.m.T,N.m.Z,N.m.U,N.m.Ca],Jq={},Kq=(Jq[N.m.T]=1,Jq[N.m.Z]=2,Jq);function Lq(a){if(a===void 0)return 0;switch(P(a,N.m.xa)){case void 0:return 1;case !1:return 3;default:return 2}}function Mq(a){if(On()==="US-CO"&&fc.globalPrivacyControl===!0)return!1;var b=Lq(a);if(b===3)return!1;switch(Gm(N.m.Ca)){case 1:case 3:return!0;case 2:return!1;case 4:return b===2;case 0:return!0;default:return!1}}function Nq(){return Jm()||!Fm(N.m.T)||!Fm(N.m.Z)}
function Oq(){var a={},b;for(b in Kq)Kq.hasOwnProperty(b)&&(a[Kq[b]]=Gm(b));return"G1"+Me(a[1]||0)+Me(a[2]||0)}var Pq={},Qq=(Pq[N.m.T]=0,Pq[N.m.Z]=1,Pq[N.m.U]=2,Pq[N.m.Ca]=3,Pq);function Rq(a){switch(a){case void 0:return 1;case !0:return 3;case !1:return 2;default:return 0}}
function Sq(a){for(var b="1",c=0;c<Iq.length;c++){var d=b,e,f=Iq[c],g=Em.delegatedConsentTypes[f];e=g===void 0?0:Qq.hasOwnProperty(g)?12|Qq[g]:8;var h=xm();h.accessedAny=!0;var m=h.entries[f]||{};e=e<<2|Rq(m.implicit);b=d+(""+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[e]+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[Rq(m.declare)<<4|Rq(m.default)<<2|Rq(m.update)])}var n=b,p=(On()==="US-CO"&&fc.globalPrivacyControl===!0?1:0)<<3,q=(Jm()?1:0)<<2,r=Lq(a);b=
n+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[p|q|r];return b+=""+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[Em.containerScopedDefaults.ad_storage<<4|Em.containerScopedDefaults.analytics_storage<<2|Em.containerScopedDefaults.ad_user_data]+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[(Em.usedContainerScopedDefaults?1:0)<<2|Em.containerScopedDefaults.ad_personalization]}
function Tq(){if(!Fm(N.m.U))return"-";for(var a=Object.keys(ci),b=Hm(a),c="",d=l(a),e=d.next();!e.done;e=d.next()){var f=e.value;b[f]&&(c+=ci[f])}(Em.usedCorePlatformServices?Em.selectedAllCorePlatformServices:1)&&(c+="o");return c||"-"}function Uq(){return Qn()||(Bq()||Cq())&&Gq()==="1"?"1":"0"}function Vq(){return(Qn()?!0:!(!Bq()&&!Cq())&&Gq()==="1")||!Fm(N.m.U)}
function Wq(){var a="0",b="0",c;var d=yq();c=d.active?d.cmpId:void 0;typeof c==="number"&&c>=0&&c<=4095&&(a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[c>>6&63],b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[c&63]);var e="0",f;var g=yq();f=g.active?g.tcfPolicyVersion:void 0;typeof f==="number"&&f>=0&&f<=63&&(e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[f]);var h=0;Qn()&&(h|=1);Gq()==="1"&&(h|=2);Bq()&&(h|=4);var m;var n=yq();m=n.enableAdvertiserConsentMode!==
void 0?n.enableAdvertiserConsentMode?"1":"0":void 0;m==="1"&&(h|=8);xm().waitPeriodTimedOut&&(h|=16);return"1"+a+b+e+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[h]}function Xq(){return On()==="US-CO"};function Yq(){var a=!1;return a};var Zq={UA:1,AW:2,DC:3,G:4,GF:5,GT:12,GTM:14,HA:6,MC:7};
function $q(a){a=a===void 0?{}:a;var b=Vf.ctid.split("-")[0].toUpperCase(),c={ctid:Vf.ctid,Xn:rj.wh,Zn:rj.xh,Cn:Sl.Le?2:1,ho:a.Jk,Ve:Vf.canonicalContainerId};c.Ve!==a.Ea&&(c.Ea=a.Ea);var d=em();c.Ln=d?d.canonicalContainerId:void 0;xj?(c.Fg=Zq[b],c.Fg||(c.Fg=0)):c.Fg=Bj?13:10;oj.C?(c.Cg=0,c.ym=2):zj?c.Cg=1:Yq()?c.Cg=2:c.Cg=3;var e={};e[6]=Tl;oj.H===2?e[7]=!0:oj.H===1&&(e[2]=!0);if(ic){var f=fk(lk(ic),"host");f&&(e[8]=f.match(/^(www\.)?googletagmanager\.com$/)===null)}c.Bm=e;var g=a.pg,h;var m=c.Fg,
n=c.Cg;m===void 0?h="":(n||(n=0),h=""+Oe(1,1)+Le(m<<2|n));var p=c.ym,q="4"+h+(p?""+Oe(2,1)+Le(p):""),r,t=c.Zn;r=t&&Ne.test(t)?""+Oe(3,2)+t:"";var u,v=c.Xn;u=v?""+Oe(4,1)+Le(v):"";var w;var x=c.ctid;if(x&&g){var y=x.split("-"),B=y[0].toUpperCase();if(B!=="GTM"&&B!=="OPT")w="";else{var C=y[1];w=""+Oe(5,3)+Le(1+C.length)+(c.Cn||0)+C}}else w="";var E=c.ho,F=c.Ve,K=c.Ea,L=c.Wo,U=q+r+u+w+(E?""+Oe(6,1)+Le(E):"")+(F?""+Oe(7,3)+Le(F.length)+F:"")+(K?""+Oe(8,3)+Le(K.length)+K:"")+(L?""+Oe(9,3)+Le(L.length)+
L:""),J;var Z=c.Bm;Z=Z===void 0?{}:Z;for(var Y=[],ha=l(Object.keys(Z)),S=ha.next();!S.done;S=ha.next()){var Q=S.value;Y[Number(Q)]=Z[Q]}if(Y.length){var ja=Oe(10,3),ia;if(Y.length===0)ia=Le(0);else{for(var la=[],Ia=0,Qa=!1,Aa=0;Aa<Y.length;Aa++){Qa=!0;var Va=Aa%6;Y[Aa]&&(Ia|=1<<Va);Va===5&&(la.push(Le(Ia)),Ia=0,Qa=!1)}Qa&&la.push(Le(Ia));ia=la.join("")}var db=ia;J=""+ja+Le(db.length)+db}else J="";var zb=c.Ln;return U+J+(zb?""+Oe(11,3)+Le(zb.length)+zb:"")};function ar(a){var b=1,c,d,e;if(a)for(b=0,d=a.length-1;d>=0;d--)e=a.charCodeAt(d),b=(b<<6&268435455)+e+(e<<14),c=b&266338304,b=c!==0?b^c>>21:b;return b};var br={M:{km:0,Fi:1,Df:2,Ii:3,Jg:4,Gi:5,Hi:6,Ji:7,Kg:8,Kj:9,Jj:10,ph:11,Lj:12,kg:13,Nj:14,Ne:15,jm:16,Dd:17,Dh:18,Eh:19,Fh:20,bk:21,Gh:22,Lg:23,Qi:24}};br.M[br.M.km]="RESERVED_ZERO";br.M[br.M.Fi]="ADS_CONVERSION_HIT";br.M[br.M.Df]="CONTAINER_EXECUTE_START";br.M[br.M.Ii]="CONTAINER_SETUP_END";br.M[br.M.Jg]="CONTAINER_SETUP_START";br.M[br.M.Gi]="CONTAINER_BLOCKING_END";br.M[br.M.Hi]="CONTAINER_EXECUTE_END";br.M[br.M.Ji]="CONTAINER_YIELD_END";br.M[br.M.Kg]="CONTAINER_YIELD_START";br.M[br.M.Kj]="EVENT_EXECUTE_END";
br.M[br.M.Jj]="EVENT_EVALUATION_END";br.M[br.M.ph]="EVENT_EVALUATION_START";br.M[br.M.Lj]="EVENT_SETUP_END";br.M[br.M.kg]="EVENT_SETUP_START";br.M[br.M.Nj]="GA4_CONVERSION_HIT";br.M[br.M.Ne]="PAGE_LOAD";br.M[br.M.jm]="PAGEVIEW";br.M[br.M.Dd]="SNIPPET_LOAD";br.M[br.M.Dh]="TAG_CALLBACK_ERROR";br.M[br.M.Eh]="TAG_CALLBACK_FAILURE";br.M[br.M.Fh]="TAG_CALLBACK_SUCCESS";br.M[br.M.bk]="TAG_EXECUTE_END";br.M[br.M.Gh]="TAG_EXECUTE_START";br.M[br.M.Lg]="CUSTOM_PERFORMANCE_START";br.M[br.M.Qi]="CUSTOM_PERFORMANCE_END";var cr=[],dr={},er={};var fr=["1"];function gr(a){return a.origin!=="null"};function hr(a,b,c){for(var d=[],e=b.split(";"),f=function(p){return ig(13)?p.trim():p.replace(/^\s*|\s*$/g,"")},g=0;g<e.length;g++){var h=e[g].split("="),m=f(h[0]);if(m&&m===a){var n=f(h.slice(1).join("="));n&&c&&(n=decodeURIComponent(n));d.push(n)}}return d};function ir(a,b,c,d){if(!jr(d))return[];if(cr.includes("1")){var e;(e=Lc())==null||e.mark("1-"+br.M.Lg+"-"+(er["1"]||0))}var f=hr(a,String(b||kr()),c);if(cr.includes("1")){var g="1-"+br.M.Qi+"-"+(er["1"]||0),h={start:"1-"+br.M.Lg+"-"+(er["1"]||0),end:g},m;(m=Lc())==null||m.mark(g);var n,p,q=(p=(n=Lc())==null?void 0:n.measure(g,h))==null?void 0:p.duration;q!==void 0&&(er["1"]=(er["1"]||0)+1,dr["1"]=q+(dr["1"]||0))}return f}
function lr(a,b,c,d,e){if(jr(e)){var f=mr(a,d,e);if(f.length===1)return f[0];if(f.length!==0){f=nr(f,function(g){return g.Km},b);if(f.length===1)return f[0];f=nr(f,function(g){return g.Nn},c);return f[0]}}}function or(a,b,c,d){var e=kr(),f=window;gr(f)&&(f.document.cookie=a);var g=kr();return e!==g||c!==void 0&&ir(b,g,!1,d).indexOf(c)>=0}
function pr(a,b,c,d){function e(w,x,y){if(y==null)return delete h[x],w;h[x]=y;return w+"; "+x+"="+y}function f(w,x){if(x==null)return w;h[x]=!0;return w+"; "+x}if(!jr(c.Kb))return 2;var g;b==null?g=a+"=deleted; expires="+(new Date(0)).toUTCString():(c.encode&&(b=encodeURIComponent(b)),b=qr(b),g=a+"="+b);var h={};g=e(g,"path",c.path);var m;c.expires instanceof Date?m=c.expires.toUTCString():c.expires!=null&&(m=""+c.expires);g=e(g,"expires",m);g=e(g,"max-age",c.Hn);g=e(g,"samesite",c.ao);c.secure&&
(g=f(g,"secure"));var n=c.domain;if(n&&n.toLowerCase()==="auto"){for(var p=rr(),q=void 0,r=!1,t=0;t<p.length;++t){var u=p[t]!=="none"?p[t]:void 0,v=e(g,"domain",u);v=f(v,c.flags);try{d&&d(a,h)}catch(w){q=w;continue}r=!0;if(!sr(u,c.path)&&or(v,a,b,c.Kb))return 0}if(q&&!r)throw q;return 1}n&&n.toLowerCase()!=="none"&&(g=e(g,"domain",n));g=f(g,c.flags);d&&d(a,h);return sr(n,c.path)?1:or(g,a,b,c.Kb)?0:1}function tr(a,b,c){c.path==null&&(c.path="/");c.domain||(c.domain="auto");return pr(a,b,c)}
function nr(a,b,c){for(var d=[],e=[],f,g=0;g<a.length;g++){var h=a[g],m=b(h);m===c?d.push(h):f===void 0||m<f?(e=[h],f=m):m===f&&e.push(h)}return d.length>0?d:e}function mr(a,b,c){for(var d=[],e=ir(a,void 0,void 0,c),f=0;f<e.length;f++){var g=e[f].split("."),h=g.shift();if(!b||!h||b.indexOf(h)!==-1){var m=g.shift();if(m){var n=m.split("-");d.push({Dm:e[f],Em:g.join("."),Km:Number(n[0])||1,Nn:Number(n[1])||1})}}}return d}function qr(a){a&&a.length>1200&&(a=a.substring(0,1200));return a}
var ur=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,vr=/(^|\.)doubleclick\.net$/i;function sr(a,b){return a!==void 0&&(vr.test(window.document.location.hostname)||b==="/"&&ur.test(a))}function wr(a){if(!a)return 1;var b=a;ig(7)&&a==="none"&&(b=window.document.location.hostname);b=b.indexOf(".")===0?b.substring(1):b;return b.split(".").length}function xr(a){if(!a||a==="/")return 1;a[0]!=="/"&&(a="/"+a);a[a.length-1]!=="/"&&(a+="/");return a.split("/").length-1}
function yr(a,b){var c=""+wr(a),d=xr(b);d>1&&(c+="-"+d);return c}
var kr=function(){return gr(window)?window.document.cookie:""},jr=function(a){return a&&ig(8)?(Array.isArray(a)?a:[a]).every(function(b){return Im(b)&&Fm(b)}):!0},rr=function(){var a=[],b=window.document.location.hostname.split(".");if(b.length===4){var c=b[b.length-1];if(Number(c).toString()===c)return["none"]}for(var d=b.length-2;d>=0;d--)a.push(b.slice(d).join("."));var e=window.document.location.hostname;vr.test(e)||ur.test(e)||a.push("none");return a};function zr(a){var b=Math.round(Math.random()*2147483647);return a?String(b^ar(a)&2147483647):String(b)}function Ar(a){return[zr(a),Math.round(pb()/1E3)].join(".")}function Br(a,b,c,d,e){var f=wr(b),g;return(g=lr(a,f,xr(c),d,e))==null?void 0:g.Em}function Cr(a,b,c,d){return[b,yr(c,d),a].join(".")};function Dr(a,b,c,d){var e,f=Number(a.Jb!=null?a.Jb:void 0);f!==0&&(e=new Date((b||pb())+1E3*(f||7776E3)));return{path:a.path,domain:a.domain,flags:a.flags,encode:!!c,expires:e,Kb:d}};var Er=["ad_storage","ad_user_data"];function Fr(a,b){if(!a)return 10;if(b===null||b===void 0||b==="")return 11;var c=Gr(!1);if(c.error!==0)return c.error;if(!c.value)return 2;c.value[a]=b;return Hr(c)}function Ir(a){if(!a)return{error:10};var b=Gr();if(b.error!==0)return b;if(!b.value)return{error:2};if(!(a in b.value))return{value:void 0,error:15};var c=b.value[a];return c===null||c===void 0||c===""?{value:void 0,error:11}:{value:c,error:0}}
function Gr(a){a=a===void 0?!0:a;if(!Fm(Er))return{error:3};try{if(!z.localStorage)return{error:1}}catch(f){return{error:14}}var b={schema:"gcl",version:1},c=void 0;try{c=z.localStorage.getItem("_gcl_ls")}catch(f){return{error:13}}try{if(c){var d=JSON.parse(c);if(d&&typeof d==="object")b=d;else return{error:12}}}catch(f){return{error:8}}if(b.schema!=="gcl")return{error:4};if(b.version!==1)return{error:5};try{var e=Jr(b);a&&e&&Hr({value:b,error:0})}catch(f){return{error:8}}return{value:b,error:0}}
function Jr(a){if(!a||typeof a!=="object")return!1;if("expires"in a&&"value"in a){var b;typeof a.expires==="number"?b=a.expires:b=typeof a.expires==="string"?Number(a.expires):NaN;if(isNaN(b)||!(Date.now()<=b))return a.value=null,a.error=9,!0}else{for(var c=!1,d=l(Object.keys(a)),e=d.next();!e.done;e=d.next())c=Jr(a[e.value])||c;return c}return!1}
function Hr(a){if(a.error)return a.error;if(!a.value)return 2;var b=a.value,c;try{c=JSON.stringify(b)}catch(d){return 6}try{z.localStorage.setItem("_gcl_ls",c)}catch(d){return 7}return 0};function Kr(){if(!Lr())return-1;var a=Mr();return a!==-1&&Nr(a+1)?a+1:-1}function Mr(){if(!Lr())return-1;var a=Ir("gcl_ctr");if(!a||a.error!==0||!a.value||typeof a.value!=="object")return-1;var b=a.value;try{if(!("value"in b&&b.value)||typeof b.value!=="object")return-1;var c=b.value.value;return c==null||Number.isNaN(c)?-1:Number(c)}catch(d){return-1}}function Lr(){return Fm(["ad_storage","ad_user_data"])?ig(11):!1}
function Nr(a,b){b=b||{};var c=pb();return Fr("gcl_ctr",{value:{value:a,creationTimeMs:c},expires:Number(Dr(b,c,!0).expires)})===0?!0:!1};var Or;function Pr(){function a(g){c(g.target||g.srcElement||{})}function b(g){d(g.target||g.srcElement||{})}var c=Qr,d=Rr,e=Sr();if(!e.init){wc(A,"mousedown",a);wc(A,"keyup",a);wc(A,"submit",b);var f=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){d(this);f.call(this)};e.init=!0}}function Tr(a,b,c,d,e){var f={callback:a,domains:b,fragment:c===2,placement:c,forms:d,sameHost:e};Sr().decorators.push(f)}
function Ur(a,b,c){for(var d=Sr().decorators,e={},f=0;f<d.length;++f){var g=d[f],h;if(h=!c||g.forms)a:{var m=g.domains,n=a,p=!!g.sameHost;if(m&&(p||n!==A.location.hostname))for(var q=0;q<m.length;q++)if(m[q]instanceof RegExp){if(m[q].test(n)){h=!0;break a}}else if(n.indexOf(m[q])>=0||p&&m[q].indexOf(n)>=0){h=!0;break a}h=!1}if(h){var r=g.placement;r===void 0&&(r=g.fragment?2:1);r===b&&sb(e,g.callback())}}return e}
function Sr(){var a=jc("google_tag_data",{}),b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var Vr=/(.*?)\*(.*?)\*(.*)/,Wr=/^https?:\/\/([^\/]*?)\.?cdn\.ampproject\.org\/?(.*)/,Xr=/^(?:www\.|m\.|amp\.)+/,Yr=/([^?#]+)(\?[^#]*)?(#.*)?/;function Zr(a){var b=Yr.exec(a);if(b)return{oi:b[1],query:b[2],fragment:b[3]}}function $r(a){return new RegExp("(.*?)(^|&)"+a+"=([^&]*)&?(.*)")}
function as(a,b){var c=[fc.userAgent,(new Date).getTimezoneOffset(),fc.userLanguage||fc.language,Math.floor(pb()/60/1E3)-(b===void 0?0:b),a].join("*"),d;if(!(d=Or)){for(var e=Array(256),f=0;f<256;f++){for(var g=f,h=0;h<8;h++)g=g&1?g>>>1^3988292384:g>>>1;e[f]=g}d=e}Or=d;for(var m=4294967295,n=0;n<c.length;n++)m=m>>>8^Or[(m^c.charCodeAt(n))&255];return((m^-1)>>>0).toString(36)}
function bs(a){return function(b){var c=lk(z.location.href),d=c.search.replace("?",""),e=dk(d,"_gl",!1,!0)||"";b.query=cs(e)||{};var f=fk(c,"fragment"),g;var h=-1;if(ub(f,"_gl="))h=4;else{var m=f.indexOf("&_gl=");m>0&&(h=m+3+2)}if(h<0)g=void 0;else{var n=f.indexOf("&",h);g=n<0?f.substring(h):f.substring(h,n)}b.fragment=cs(g||"")||{};a&&ds(c,d,f)}}function es(a,b){var c=$r(a).exec(b),d=b;if(c){var e=c[2],f=c[4];d=c[1];f&&(d=d+e+f)}return d}
function ds(a,b,c){function d(g,h){var m=es("_gl",g);m.length&&(m=h+m);return m}if(ec&&ec.replaceState){var e=$r("_gl");if(e.test(b)||e.test(c)){var f=fk(a,"path");b=d(b,"?");c=d(c,"#");ec.replaceState({},"",""+f+b+c)}}}function fs(a,b){var c=bs(!!b),d=Sr();d.data||(d.data={query:{},fragment:{}},c(d.data));var e={},f=d.data;f&&(sb(e,f.query),a&&sb(e,f.fragment));return e}
var cs=function(a){try{var b=gs(a,3);if(b!==void 0){for(var c={},d=b?b.split("*"):[],e=0;e+1<d.length;e+=2){var f=d[e],g=Ta(d[e+1]);c[f]=g}Wa("TAGGING",6);return c}}catch(h){Wa("TAGGING",8)}};function gs(a,b){if(a){var c;a:{for(var d=a,e=0;e<3;++e){var f=Vr.exec(d);if(f){c=f;break a}d=decodeURIComponent(d)}c=void 0}var g=c;if(g&&g[1]==="1"){var h=g[3],m;a:{for(var n=g[2],p=0;p<b;++p)if(n===as(h,p)){m=!0;break a}m=!1}if(m)return h;Wa("TAGGING",7)}}}
function hs(a,b,c,d,e){function f(p){p=es(a,p);var q=p.charAt(p.length-1);p&&q!=="&"&&(p+="&");return p+n}d=d===void 0?!1:d;e=e===void 0?!1:e;var g=Zr(c);if(!g)return"";var h=g.query||"",m=g.fragment||"",n=a+"="+b;d?m.substring(1).length!==0&&e||(m="#"+f(m.substring(1))):h="?"+f(h.substring(1));return""+g.oi+h+m}
function is(a,b){function c(n,p,q){var r;a:{for(var t in n)if(n.hasOwnProperty(t)){r=!0;break a}r=!1}if(r){var u,v=[],w;for(w in n)if(n.hasOwnProperty(w)){var x=n[w];x!==void 0&&x===x&&x!==null&&x.toString()!=="[object Object]"&&(v.push(w),v.push(Sa(String(x))))}var y=v.join("*");u=["1",as(y),y].join("*");d?(ig(3)||ig(1)||!p)&&js("_gl",u,a,p,q):ks("_gl",u,a,p,q)}}var d=(a.tagName||"").toUpperCase()==="FORM",e=Ur(b,1,d),f=Ur(b,2,d),g=Ur(b,4,d),h=Ur(b,3,d);c(e,!1,!1);c(f,!0,!1);ig(1)&&c(g,!0,!0);for(var m in h)h.hasOwnProperty(m)&&
ls(m,h[m],a)}function ls(a,b,c){c.tagName.toLowerCase()==="a"?ks(a,b,c):c.tagName.toLowerCase()==="form"&&js(a,b,c)}function ks(a,b,c,d,e){d=d===void 0?!1:d;e=e===void 0?!1:e;var f;if(f=c.href){var g;if(!(g=!ig(5)||d)){var h=z.location.href,m=Zr(c.href),n=Zr(h);g=!(m&&n&&m.oi===n.oi&&m.query===n.query&&m.fragment)}f=g}if(f){var p=hs(a,b,c.href,d,e);Vb.test(p)&&(c.href=p)}}
function js(a,b,c,d,e){d=d===void 0?!1:d;e=e===void 0?!1:e;if(c){var f=(ig(12)?c.getAttribute("action"):c.action)||"";if(f){var g=(c.method||"").toLowerCase();if(g!=="get"||d){if(g==="get"||g==="post"){var h=hs(a,b,f,d,e);Vb.test(h)&&(c.action=h)}}else{for(var m=c.childNodes||[],n=!1,p=0;p<m.length;p++){var q=m[p];if(q.name===a){q.setAttribute("value",b);n=!0;break}}if(!n){var r=A.createElement("input");r.setAttribute("type","hidden");r.setAttribute("name",a);r.setAttribute("value",b);c.appendChild(r)}}}}}
function Qr(a){try{var b;a:{for(var c=a,d=100;c&&d>0;){if(c.href&&c.nodeName.match(/^a(?:rea)?$/i)){b=c;break a}c=c.parentNode;d--}b=null}var e=b;if(e){var f=e.protocol;f!=="http:"&&f!=="https:"||is(e,e.hostname)}}catch(g){}}function Rr(a){try{var b;if(b=ig(12)?a.getAttribute("action"):a.action){var c=fk(lk(b),"host");is(a,c)}}catch(d){}}function ms(a,b,c,d){Pr();var e=c==="fragment"?2:1;d=!!d;Tr(a,b,e,d,!1);e===2&&Wa("TAGGING",23);d&&Wa("TAGGING",24)}
function ns(a,b){Pr();Tr(a,[hk(z.location,"host",!0)],b,!0,!0)}function os(){var a=A.location.hostname,b=Wr.exec(A.referrer);if(!b)return!1;var c=b[2],d=b[1],e="";if(c){var f=c.split("/"),g=f[1];e=g==="s"?decodeURIComponent(f[2]):decodeURIComponent(g)}else if(d){if(d.indexOf("xn--")===0)return!1;e=d.replace(/-/g,".").replace(/\.\./g,"-")}var h=a.replace(Xr,""),m=e.replace(Xr,""),n;if(!(n=h===m)){var p="."+m;n=h.length>=p.length&&h.substring(h.length-p.length,h.length)===p}return n}
function ps(a,b){return a===!1?!1:a||b||os()};var qs=["1"],rs={},ss={};function ts(a,b){b=b===void 0?!0:b;var c=us(a.prefix);if(rs[c])vs(a);else if(ws(c,a.path,a.domain)){var d=ss[us(a.prefix)]||{id:void 0,Bg:void 0};b&&xs(a,d.id,d.Bg);vs(a)}else{var e=nk("auiddc");if(e)Wa("TAGGING",17),rs[c]=e;else if(b){var f=us(a.prefix),g=Ar();ys(f,g,a);ws(c,a.path,a.domain);vs(a,!0)}}}
function vs(a,b){if((b===void 0?0:b)&&Lr()){var c=Gr(!1);c.error===0&&c.value&&"gcl_ctr"in c.value&&(delete c.value.gcl_ctr,Hr(c))}Fm(["ad_storage","ad_user_data"])&&ig(10)&&Mr()===-1&&Nr(0,a)}function xs(a,b,c){var d=us(a.prefix),e=rs[d];if(e){var f=e.split(".");if(f.length===2){var g=Number(f[1])||0;if(g){var h=e;b&&(h=e+"."+b+"."+(c?c:Math.floor(pb()/1E3)));ys(d,h,a,g*1E3)}}}}function ys(a,b,c,d){var e=Cr(b,"1",c.domain,c.path),f=Dr(c,d);f.Kb=zs();tr(a,e,f)}
function ws(a,b,c){var d=Br(a,b,c,qs,zs());if(!d)return!1;As(a,d);return!0}function As(a,b){var c=b.split(".");c.length===5?(rs[a]=c.slice(0,2).join("."),ss[a]={id:c.slice(2,4).join("."),Bg:Number(c[4])||0}):c.length===3?ss[a]={id:c.slice(0,2).join("."),Bg:Number(c[2])||0}:rs[a]=b}function us(a){return(a||"_gcl")+"_au"}function Bs(a){function b(){Fm(c)&&a()}var c=zs();Mm(function(){b();Fm(c)||Nm(b,c)},c)}
function Cs(a){var b=fs(!0),c=us(a.prefix);Bs(function(){var d=b[c];if(d){As(c,d);var e=Number(rs[c].split(".")[1])*1E3;if(e){Wa("TAGGING",16);var f=Dr(a,e);f.Kb=zs();var g=Cr(d,"1",a.domain,a.path);tr(c,g,f)}}})}function Ds(a,b,c,d,e){e=e||{};var f=function(){var g={},h=Br(a,e.path,e.domain,qs,zs());h&&(g[a]=h);return g};Bs(function(){ms(f,b,c,d)})}function zs(){return["ad_storage","ad_user_data"]};var Es={},Fs=(Es.k={X:/^[\w-]+$/},Es.b={X:/^[\w-]+$/,yi:!0},Es.i={X:/^[1-9]\d*$/},Es.h={X:/^\d+$/},Es.t={X:/^[1-9]\d*$/},Es.d={X:/^[A-Za-z0-9_-]+$/},Es.j={X:/^\d+$/},Es.u={X:/^[1-9]\d*$/},Es.l={X:/^[01]$/},Es.o={X:/^[1-9]\d*$/},Es.g={X:/^[01]$/},Es.s={X:/^.+$/},Es);var Gs={},Ks=(Gs[5]={Hg:{2:Hs},hi:"2",qg:["k","i","b","u"]},Gs[4]={Hg:{2:Hs,GCL:Is},hi:"2",qg:["k","i","b"]},Gs[2]={Hg:{GS2:Hs,GS1:Js},hi:"GS2",qg:"sogtjlhd".split("")},Gs);function Ls(a,b,c){var d=Ks[b];if(d){var e=a.split(".")[0];c==null||c(e);if(e){var f=d.Hg[e];if(f)return f(a,b)}}}
function Hs(a,b){var c=a.split(".");if(c.length===3){var d={},e=Ks[b];if(e){for(var f=e.qg,g=l(c[2].split("$")),h=g.next();!h.done;h=g.next()){var m=h.value,n=m[0];if(f.indexOf(n)!==-1)try{var p=decodeURIComponent(m.substring(1)),q=Fs[n];q&&(q.yi?(d[n]=d[n]||[],d[n].push(p)):d[n]=p)}catch(r){}}return d}}}function Ms(a,b,c){var d=Ks[b];if(d)return[d.hi,c||"1",Ns(a,b)].join(".")}
function Ns(a,b){var c=Ks[b];if(c){for(var d=[],e=l(c.qg),f=e.next();!f.done;f=e.next()){var g=f.value,h=Fs[g];if(h){var m=a[g];if(m!==void 0)if(h.yi&&Array.isArray(m))for(var n=l(m),p=n.next();!p.done;p=n.next())d.push(encodeURIComponent(""+g+p.value));else d.push(encodeURIComponent(""+g+m))}}return d.join("$")}}function Is(a){var b=a.split(".");b.shift();var c=b.shift(),d=b.shift(),e={};return e.k=d,e.i=c,e.b=b,e}
function Js(a){var b=a.split(".").slice(2);if(!(b.length<5||b.length>7)){var c={};return c.s=b[0],c.o=b[1],c.g=b[2],c.t=b[3],c.j=b[4],c.l=b[5],c.h=b[6],c}};var Os=new Map([[5,"ad_storage"],[4,["ad_storage","ad_user_data"]],[2,"analytics_storage"]]);function Ps(a,b,c){if(Ks[b]){for(var d=[],e=ir(a,void 0,void 0,Os.get(b)),f=l(e),g=f.next();!g.done;g=f.next()){var h=Ls(g.value,b,c);h&&d.push(Qs(h))}return d}}function Rs(a,b,c,d,e){d=d||{};var f=yr(d.domain,d.path),g=Ms(b,c,f);if(!g)return 1;var h=Dr(d,e,void 0,Os.get(c));return tr(a,g,h)}function Ss(a,b){var c=b.X;return typeof c==="function"?c(a):c.test(a)}
function Qs(a){for(var b=l(Object.keys(a)),c=b.next(),d={};!c.done;d={Xe:void 0},c=b.next()){var e=c.value,f=a[e];d.Xe=Fs[e];d.Xe?d.Xe.yi?a[e]=Array.isArray(f)?f.filter(function(g){return function(h){return Ss(h,g.Xe)}}(d)):void 0:typeof f==="string"&&Ss(f,d.Xe)||(a[e]=void 0):a[e]=void 0}return a};function Ts(a){for(var b=[],c=A.cookie.split(";"),d=new RegExp("^\\s*"+(a||"_gac")+"_(UA-\\d+-\\d+)=\\s*(.+?)\\s*$"),e=0;e<c.length;e++){var f=c[e].match(d);f&&b.push({Di:f[1],value:f[2],timestamp:Number(f[2].split(".")[1])||0})}b.sort(function(g,h){return h.timestamp-g.timestamp});return b}
function Us(a,b){var c=Ts(a),d={};if(!c||!c.length)return d;for(var e=0;e<c.length;e++){var f=c[e].value.split(".");if(!(f[0]!=="1"||b&&f.length<3||!b&&f.length!==3)&&Number(f[1])){d[c[e].Di]||(d[c[e].Di]=[]);var g={version:f[0],timestamp:Number(f[1])*1E3,aa:f[2]};b&&f.length>3&&(g.labels=f.slice(3));d[c[e].Di].push(g)}}return d};function Vs(){var a=String,b=z.location.hostname,c=z.location.pathname,d=b=Db(b);d.split(".").length>2&&(d=d.replace(/^(www[0-9]*|web|ftp|wap|home|m|w|amp|mobile)\./,""));b=d;c=Db(c);var e=c.split(";")[0];e=e.replace(/\/(ar|slp|web|index)?\/?$/,"");return a(ar((""+b+e).toLowerCase()))};var Ws=/^\w+$/,Xs=/^[\w-]+$/,Ys={},Zs=(Ys.aw="_aw",Ys.dc="_dc",Ys.gf="_gf",Ys.gp="_gp",Ys.gs="_gs",Ys.ha="_ha",Ys.ag="_ag",Ys.gb="_gb",Ys);function $s(){return["ad_storage","ad_user_data"]}function at(a){return!ig(8)||Fm(a)}function bt(a,b){function c(){var d=at(b);d&&a();return d}Mm(function(){c()||Nm(c,b)},b)}function ct(a){return dt(a).map(function(b){return b.aa})}function et(a){return ft(a).filter(function(b){return b.aa}).map(function(b){return b.aa})}
function ft(a){var b=gt(a.prefix),c=ht("gb",b),d=ht("ag",b);if(!d||!c)return[];var e=function(h){return function(m){m.type=h;return m}},f=dt(c).map(e("gb")),g=it(d).map(e("ag"));return f.concat(g).sort(function(h,m){return m.timestamp-h.timestamp})}function jt(a,b,c,d,e,f){var g=eb(a,function(h){return h.aa===c});g?(g.timestamp<d&&(g.timestamp=d,g.Md=f),g.labels=kt(g.labels||[],e||[])):a.push({version:b,aa:c,timestamp:d,labels:e,Md:f})}
function it(a){for(var b=Ps(a,5)||[],c=[],d=l(b),e=d.next();!e.done;e=d.next()){var f=e.value,g=f,h=g.k,m=g.b,n=lt(f);if(n){var p=void 0;ig(9)&&(p=f.u);jt(c,"2",h,n,m||[],p)}}return c.sort(function(q,r){return r.timestamp-q.timestamp})}function dt(a){for(var b=[],c=ir(a,A.cookie,void 0,$s()),d=l(c),e=d.next();!e.done;e=d.next()){var f=mt(e.value);if(f!=null){var g=f;jt(b,g.version,g.aa,g.timestamp,g.labels)}}b.sort(function(h,m){return m.timestamp-h.timestamp});return nt(b)}
function ot(a,b){for(var c=[],d=l(a),e=d.next();!e.done;e=d.next()){var f=e.value;c.includes(f)||c.push(f)}for(var g=l(b),h=g.next();!h.done;h=g.next()){var m=h.value;c.includes(m)||c.push(m)}return c}function pt(a,b){var c=eb(a,function(d){return d.aa===b.aa});c?(c.Pa=c.Pa?b.Pa?c.timestamp<b.timestamp?b.Pa:c.Pa:c.Pa||0:b.Pa||0,c.timestamp<b.timestamp&&(c.timestamp=b.timestamp,c.Md=b.Md),c.labels=ot(c.labels||[],b.labels||[]),c.Bc=ot(c.Bc||[],b.Bc||[])):a.push(b)}
function qt(){var a=Ir("gclid");if(!a||a.error||!a.value||typeof a.value!=="object")return null;var b=a.value;try{if(!("value"in b&&b.value)||typeof b.value!=="object")return null;var c=b.value,d=c.value;return d&&d.match(Xs)?{version:"",aa:d,timestamp:Number(c.creationTimeMs)||0,labels:[],Pa:c.linkDecorationSource||0,Bc:[2]}:null}catch(e){return null}}
function rt(a){for(var b=[],c=ir(a,A.cookie,void 0,$s()),d=l(c),e=d.next();!e.done;e=d.next()){var f=mt(e.value);f!=null&&(f.Md=void 0,f.Pa=0,f.Bc=[1],pt(b,f))}var g=qt();g&&(g.Md=void 0,g.Pa=g.Pa||0,g.Bc=g.Bc||[2],pt(b,g));b.sort(function(h,m){return m.timestamp-h.timestamp});return nt(b)}function kt(a,b){if(!a.length)return b;if(!b.length)return a;var c={};return a.concat(b).filter(function(d){return c.hasOwnProperty(d)?!1:c[d]=!0})}
function gt(a){return a&&typeof a==="string"&&a.match(Ws)?a:"_gcl"}function st(a,b,c){var d=lk(a),e=fk(d,"query",!1,void 0,"gclsrc"),f={value:fk(d,"query",!1,void 0,"gclid"),Pa:c?4:2};if(b&&(!f.value||!e)){var g=d.hash.replace("#","");f.value||(f.value=dk(g,"gclid",!1),f.Pa=3);e||(e=dk(g,"gclsrc",!1))}return!f.value||e!==void 0&&e!=="aw"&&e!=="aw.ds"?[]:[f]}
function tt(a,b){var c=lk(a),d=fk(c,"query",!1,void 0,"gclid"),e=fk(c,"query",!1,void 0,"gclsrc"),f=fk(c,"query",!1,void 0,"wbraid");f=Bb(f);var g=fk(c,"query",!1,void 0,"gbraid"),h=fk(c,"query",!1,void 0,"gad_source"),m=fk(c,"query",!1,void 0,"dclid");if(b&&!(d&&e&&f&&g)){var n=c.hash.replace("#","");d=d||dk(n,"gclid",!1);e=e||dk(n,"gclsrc",!1);f=f||dk(n,"wbraid",!1);g=g||dk(n,"gbraid",!1);h=h||dk(n,"gad_source",!1)}return ut(d,e,m,f,g,h)}function vt(){return tt(z.location.href,!0)}
function ut(a,b,c,d,e,f){var g={},h=function(m,n){g[n]||(g[n]=[]);g[n].push(m)};g.gclid=a;g.gclsrc=b;g.dclid=c;if(a!==void 0&&a.match(Xs))switch(b){case void 0:h(a,"aw");break;case "aw.ds":h(a,"aw");h(a,"dc");break;case "ds":h(a,"dc");break;case "3p.ds":h(a,"dc");break;case "gf":h(a,"gf");break;case "ha":h(a,"ha")}c&&h(c,"dc");d!==void 0&&Xs.test(d)&&(g.wbraid=d,h(d,"gb"));e!==void 0&&Xs.test(e)&&(g.gbraid=e,h(e,"ag"));f!==void 0&&Xs.test(f)&&(g.gad_source=f,h(f,"gs"));return g}
function wt(a){for(var b=vt(),c=!0,d=l(Object.keys(b)),e=d.next();!e.done;e=d.next())if(b[e.value]!==void 0){c=!1;break}c&&(b=tt(z.document.referrer,!1),b.gad_source=void 0);xt(b,!1,a)}
function zt(a){wt(a);var b=st(z.location.href,!0,!1);b.length||(b=st(z.document.referrer,!1,!0));if(b.length){var c=b[0];a=a||{};var d=pb(),e=Dr(a,d,!0),f=$s(),g=function(){at(f)&&e.expires!==void 0&&Fr("gclid",{value:{value:c.value,creationTimeMs:d,linkDecorationSource:c.Pa},expires:Number(e.expires)})};Mm(function(){g();at(f)||Nm(g,f)},f)}}
function xt(a,b,c,d,e){c=c||{};e=e||[];var f=gt(c.prefix),g=d||pb(),h=Math.round(g/1E3),m=$s(),n=!1,p=!1,q=function(){if(at(m)){var r=Dr(c,g,!0);r.Kb=m;for(var t=function(L,U){var J=ht(L,f);J&&(tr(J,U,r),L!=="gb"&&(n=!0))},u=function(L){var U=["GCL",h,L];e.length>0&&U.push(e.join("."));return U.join(".")},v=l(["aw","dc","gf","ha","gp"]),w=v.next();!w.done;w=v.next()){var x=w.value;a[x]&&t(x,u(a[x][0]))}if(!n&&a.gb){var y=a.gb[0],B=ht("gb",f);!b&&dt(B).some(function(L){return L.aa===y&&L.labels&&L.labels.length>
0})||t("gb",u(y))}}if(!p&&a.gbraid&&at("ad_storage")&&(p=!0,!n)){var C=a.gbraid,E=ht("ag",f);if(b||!it(E).some(function(L){return L.aa===C&&L.labels&&L.labels.length>0})){var F={},K=(F.k=C,F.i=""+h,F.b=e,F);Rs(E,K,5,c,g)}}At(a,f,g,c)};Mm(function(){q();at(m)||Nm(q,m)},m)}
function At(a,b,c,d){if(a.gad_source!==void 0&&at("ad_storage")){if(ig(4)){var e=Kc();if(e==="r"||e==="h")return}var f=a.gad_source,g=ht("gs",b);if(g){var h=Math.floor((pb()-(Jc()||0))/1E3),m;if(ig(9)){var n=Vs(),p={};m=(p.k=f,p.i=""+h,p.u=n,p)}else{var q={};m=(q.k=f,q.i=""+h,q)}Rs(g,m,5,d,c)}}}
function Bt(a,b){var c=fs(!0);bt(function(){for(var d=gt(b.prefix),e=0;e<a.length;++e){var f=a[e];if(Zs[f]!==void 0){var g=ht(f,d),h=c[g];if(h){var m=Math.min(Ct(h),pb()),n;b:{for(var p=m,q=ir(g,A.cookie,void 0,$s()),r=0;r<q.length;++r)if(Ct(q[r])>p){n=!0;break b}n=!1}if(!n){var t=Dr(b,m,!0);t.Kb=$s();tr(g,h,t)}}}}xt(ut(c.gclid,c.gclsrc),!1,b)},$s())}
function Dt(a){var b=["ag"],c=fs(!0),d=gt(a.prefix);bt(function(){for(var e=0;e<b.length;++e){var f=ht(b[e],d);if(f){var g=c[f];if(g){var h=Ls(g,5);if(h){var m=lt(h);m||(m=pb());var n;a:{for(var p=m,q=Ps(f,5),r=0;r<q.length;++r)if(lt(q[r])>p){n=!0;break a}n=!1}if(n)break;h.i=""+Math.round(m/1E3);Rs(f,h,5,a,m)}}}}},["ad_storage"])}function ht(a,b){var c=Zs[a];if(c!==void 0)return b+c}function Ct(a){return Et(a.split(".")).length!==0?(Number(a.split(".")[1])||0)*1E3:0}
function lt(a){return a?(Number(a.i)||0)*1E3:0}function mt(a){var b=Et(a.split("."));return b.length===0?null:{version:b[0],aa:b[2],timestamp:(Number(b[1])||0)*1E3,labels:b.slice(3)}}function Et(a){return a.length<3||a[0]!=="GCL"&&a[0]!=="1"||!/^\d+$/.test(a[1])||!Xs.test(a[2])?[]:a}
function Ft(a,b,c,d,e){if(Array.isArray(b)&&gr(z)){var f=gt(e),g=function(){for(var h={},m=0;m<a.length;++m){var n=ht(a[m],f);if(n){var p=ir(n,A.cookie,void 0,$s());p.length&&(h[n]=p.sort()[p.length-1])}}return h};bt(function(){ms(g,b,c,d)},$s())}}
function Gt(a,b,c,d){if(Array.isArray(a)&&gr(z)){var e=["ag"],f=gt(d),g=function(){for(var h={},m=0;m<e.length;++m){var n=ht(e[m],f);if(!n)return{};var p=Ps(n,5);if(p.length){var q=p.sort(function(r,t){return lt(t)-lt(r)})[0];h[n]=Ms(q,5)}}return h};bt(function(){ms(g,a,b,c)},["ad_storage"])}}function nt(a){return a.filter(function(b){return Xs.test(b.aa)})}
function Ht(a,b){if(gr(z)){for(var c=gt(b.prefix),d={},e=0;e<a.length;e++)Zs[a[e]]&&(d[a[e]]=Zs[a[e]]);bt(function(){ib(d,function(f,g){var h=ir(c+g,A.cookie,void 0,$s());h.sort(function(t,u){return Ct(u)-Ct(t)});if(h.length){var m=h[0],n=Ct(m),p=Et(m.split(".")).length!==0?m.split(".").slice(3):[],q={},r;r=Et(m.split(".")).length!==0?m.split(".")[2]:void 0;q[f]=[r];xt(q,!0,b,n,p)}})},$s())}}
function It(a){var b=["ag"],c=["gbraid"];bt(function(){for(var d=gt(a.prefix),e=0;e<b.length;++e){var f=ht(b[e],d);if(!f)break;var g=Ps(f,5);if(g.length){var h=g.sort(function(q,r){return lt(r)-lt(q)})[0],m=lt(h),n=h.b,p={};p[c[e]]=h.k;xt(p,!0,a,m,n)}}},["ad_storage"])}function Jt(a,b){for(var c=0;c<b.length;++c)if(a[b[c]])return!0;return!1}
function Kt(a){function b(h,m,n){n&&(h[m]=n)}if(Jm()){var c=vt(),d;a.includes("gad_source")&&(d=c.gad_source!==void 0?c.gad_source:fs(!1)._gs);if(Jt(c,a)||d){var e={};b(e,"gclid",c.gclid);b(e,"dclid",c.dclid);b(e,"gclsrc",c.gclsrc);b(e,"wbraid",c.wbraid);b(e,"gbraid",c.gbraid);ns(function(){return e},3);var f={},g=(f._up="1",f);b(g,"_gs",d);ns(function(){return g},1)}}}
function Lt(a){if(!ig(1))return null;var b=fs(!0).gad_source;if(b!=null)return z.location.hash="",b;if(ig(2)){var c=lk(z.location.href);b=fk(c,"query",!1,void 0,"gad_source");if(b!=null)return b;var d=vt();if(Jt(d,a))return"0"}return null}function Mt(a){var b=Lt(a);b!=null&&ns(function(){var c={};return c.gad_source=b,c},4)}
function Nt(a,b,c){var d=[];if(b.length===0)return d;for(var e={},f=0;f<b.length;f++){var g=b[f],h=g.type?g.type:"gcl";(g.labels||[]).indexOf(c)===-1?(a.push(0),e[h]||d.push(g)):a.push(1);e[h]=!0}return d}function Ot(a,b,c,d){var e=[];c=c||{};if(!at($s()))return e;var f=dt(a),g=Nt(e,f,b);if(g.length&&!d)for(var h=l(g),m=h.next();!m.done;m=h.next()){var n=m.value,p=n.timestamp,q=[n.version,Math.round(p/1E3),n.aa].concat(n.labels||[],[b]).join("."),r=Dr(c,p,!0);r.Kb=$s();tr(a,q,r)}return e}
function Pt(a,b){var c=[];b=b||{};var d=ft(b),e=Nt(c,d,a);if(e.length)for(var f=l(e),g=f.next();!g.done;g=f.next()){var h=g.value,m=gt(b.prefix),n=ht(h.type,m);if(!n)break;var p=h,q=p.version,r=p.aa,t=p.labels,u=p.timestamp,v=Math.round(u/1E3);if(h.type==="ag"){var w={},x=(w.k=r,w.i=""+v,w.b=(t||[]).concat([a]),w);Rs(n,x,5,b,u)}else if(h.type==="gb"){var y=[q,v,r].concat(t||[],[a]).join("."),B=Dr(b,u,!0);B.Kb=$s();tr(n,y,B)}}return c}
function Qt(a,b){var c=gt(b),d=ht(a,c);if(!d)return 0;var e;e=a==="ag"?it(d):dt(d);for(var f=0,g=0;g<e.length;g++)f=Math.max(f,e[g].timestamp);return f}function Rt(a){for(var b=0,c=l(Object.keys(a)),d=c.next();!d.done;d=c.next())for(var e=a[d.value],f=0;f<e.length;f++)b=Math.max(b,Number(e[f].timestamp));return b}function St(a){var b=Math.max(Qt("aw",a),Rt(at($s())?Us():{})),c=Math.max(Qt("gb",a),Rt(at($s())?Us("_gac_gb",!0):{}));c=Math.max(c,Qt("ag",a));return c>b};function hu(){return Jo("dedupe_gclid",function(){return Ar()})};var iu=/^(www\.)?google(\.com?)?(\.[a-z]{2}t?)?$/,ju=/^www.googleadservices.com$/;function ku(a){a||(a=lu());return a.po?!1:a.nn||a.on||a.rn||a.pn||a.df||a.Wm||a.qn||a.dn?!0:!1}function lu(){var a={},b=fs(!0);a.po=!!b._up;var c=vt();a.nn=c.aw!==void 0;a.on=c.dc!==void 0;a.rn=c.wbraid!==void 0;a.pn=c.gbraid!==void 0;a.qn=c.gclsrc==="aw.ds";a.df=Vt().df;var d=A.referrer?fk(lk(A.referrer),"host"):"";a.dn=iu.test(d);a.Wm=ju.test(d);return a};var mu=["https://www.google.com","https://www.youtube.com","https://m.youtube.com"];
function nu(){if(H(118)){if(Dn(yn.Pe))return O(176),yn.Pe;if(Dn(yn.Tj))return O(170),yn.Pe;var a=kl();if(!a)O(171);else if(a.opener){var b=function(e){if(mu.includes(e.origin)){e.data.action==="gcl_transfer"&&e.data.gadSource?Cn(yn.Pe,{gadSource:e.data.gadSource}):O(173);var f;(f=e.stopImmediatePropagation)==null||f.call(e);jq(a,"message",b)}else O(172)};if(iq(a,"message",b)){Cn(yn.Tj,!0);for(var c=l(mu),d=c.next();!d.done;d=c.next())a.opener.postMessage({action:"gcl_setup"},d.value);O(174);return yn.Pe}O(175)}}}
;var ou=function(){this.C=this.gppString=void 0};ou.prototype.reset=function(){this.C=this.gppString=void 0};var pu=new ou;var qu=RegExp("^UA-\\d+-\\d+%3A[\\w-]+(?:%2C[\\w-]+)*(?:%3BUA-\\d+-\\d+%3A[\\w-]+(?:%2C[\\w-]+)*)*$"),ru=/^~?[\w-]+(?:\.~?[\w-]+)*$/,su=/^\d+\.fls\.doubleclick\.net$/,tu=/;gac=([^;?]+)/,uu=/;gacgb=([^;?]+)/;
function vu(a,b){if(su.test(A.location.host)){var c=A.location.href.match(b);return c&&c.length===2&&c[1].match(qu)?ek(c[1])||"":""}for(var d=[],e=l(Object.keys(a)),f=e.next();!f.done;f=e.next()){for(var g=f.value,h=[],m=a[g],n=0;n<m.length;n++)h.push(m[n].aa);d.push(g+":"+h.join(","))}return d.length>0?d.join(";"):""}
function wu(a,b,c){for(var d=at($s())?Us("_gac_gb",!0):{},e=[],f=!1,g=l(Object.keys(d)),h=g.next();!h.done;h=g.next()){var m=h.value,n=Ot("_gac_gb_"+m,a,b,c);f=f||n.length!==0&&n.some(function(p){return p===1});e.push(m+":"+n.join(","))}return{Vm:f?e.join(";"):"",Um:vu(d,uu)}}function xu(a){var b=A.location.href.match(new RegExp(";"+a+"=([^;?]+)"));return b&&b.length===2&&b[1].match(ru)?b[1]:void 0}
function yu(a){var b=ig(9),c={},d,e,f;su.test(A.location.host)&&(d=xu("gclgs"),e=xu("gclst"),b&&(f=xu("gcllp")));if(d&&e&&(!b||f))c.vg=d,c.xg=e,c.wg=f;else{var g=pb(),h=it((a||"_gcl")+"_gs"),m=h.map(function(q){return q.aa}),n=h.map(function(q){return g-q.timestamp}),p=[];b&&(p=h.map(function(q){return q.Md}));m.length>0&&n.length>0&&(!b||p.length>0)&&(c.vg=m.join("."),c.xg=n.join("."),b&&p.length>0&&(c.wg=p.join(".")))}return c}
function zu(a,b,c,d){d=d===void 0?!1:d;if(su.test(A.location.host)){var e=xu(c);if(e)return e.split(".").map(function(g){return{aa:g}})}else{if(b==="gclid"){var f=(a||"_gcl")+"_aw";return d?rt(f):dt(f)}if(b==="wbraid")return dt((a||"_gcl")+"_gb");if(b==="braids")return ft({prefix:a})}return[]}function Au(a){return su.test(A.location.host)?!(xu("gclaw")||xu("gac")):St(a)}
function Bu(a,b,c){var d;d=c?Pt(a,b):Ot((b&&b.prefix||"_gcl")+"_gb",a,b);return d.length===0||d.every(function(e){return e===0})?"":d.join(".")};function Cu(){var a=z.__uspapi;if($a(a)){var b="";try{a("getUSPData",1,function(c,d){if(d&&c){var e=c.uspString;e&&RegExp("^[\\da-zA-Z-]{1,20}$").test(e)&&(b=e)}})}catch(c){}return b}};
function Pu(a){var b=P(a.D,N.m.sc),c=P(a.D,N.m.rc);b&&!c?(a.eventName!==N.m.ka&&a.eventName!==N.m.md&&O(131),a.isAborted=!0):!b&&c&&(O(132),a.isAborted=!0)}function Qu(a){var b=yo(N.m.T)?Io.pscdl:"denied";b!=null&&V(a,N.m.Nf,b)}function Ru(a){var b=il(!0);V(a,N.m.qc,b)}function Su(a){Xq()&&V(a,N.m.wd,1)}function Gu(){var a=A.title;if(a===void 0||a==="")return"";a=encodeURIComponent(a);for(var b=256;b>0&&ek(a.substring(0,b))===void 0;)b--;return ek(a.substring(0,b))||""}
function Tu(a){Uu(a,"ce",P(a.D,N.m.Ya))}function Uu(a,b,c){Fu(a,N.m.zd)||V(a,N.m.zd,{});Fu(a,N.m.zd)[b]=c}function Vu(a){T(a,"transmission_type",wm.V.wa)}function Wu(a){var b=Xa("GTAG_EVENT_FEATURE_CHANNEL");b&&(V(a,N.m.te,b),Ua.GTAG_EVENT_FEATURE_CHANNEL=lj)}function Xu(a){if(H(86)){var b=op(a.D,N.m.Mc);b&&V(a,N.m.Mc,b)}}
function Yu(a,b){b=b===void 0?!1:b;if(H(107)){var c=R(a,"send_to_destinations");if(c)if(c.indexOf(a.target.destinationId)<0){if(T(a,"accept_by_default",!1),b||!Zu(a,"custom_event_accept_rules",!1))a.isAborted=!0}else T(a,"accept_by_default",!0)}};function jv(a,b,c,d){var e=sc(),f;if(e===1)a:{var g=Dj;g=g.toLowerCase();for(var h="https://"+g,m="http://"+g,n=1,p=A.getElementsByTagName("script"),q=0;q<p.length&&q<100;q++){var r=p[q].src;if(r){r=r.toLowerCase();if(r.indexOf(m)===0){f=3;break a}n===1&&r.indexOf(h)===0&&(n=2)}}f=n}else f=e;return(f===2||d||"http:"!==z.location.protocol?a:b)+c};function kv(a){return typeof a!=="object"||a===null?{}:a}function lv(a){return a===void 0||a===null?"":typeof a==="object"?a.toString():String(a)}function mv(a){if(a!==void 0&&a!==null)return lv(a)}function nv(a){return typeof a==="number"?a:mv(a)};
var sv=function(a,b){if(a)if(Yq()){}else if(a=ab(a)?So(hm(a)):So(hm(a.id))){var c=void 0,d=!1,e=P(b,N.m.Ql);if(e&&Array.isArray(e)){c=[];for(var f=0;f<e.length;f++){var g=So(e[f]);g&&(c.push(g),(a.id===g.id||a.id===a.destinationId&&a.destinationId===g.destinationId)&&(d=!0))}}if(!c||d){var h=P(b,N.m.Cj),m;if(h){m=Array.isArray(h)?h:[h];var n=P(b,N.m.Aj),p=P(b,N.m.Bj),q=P(b,N.m.Dj),r=mv(P(b,N.m.Pl)),t=n||p,u=1;a.prefix!==
"UA"||c||(u=5);for(var v=0;v<m.length;v++)if(v<u)if(c)ov(c,m[v],r,b,{hc:t,options:q});else if(a.prefix==="AW"&&a.ids[Vo[1]])H(155)?ov([a],m[v],r||"US",b,{hc:t,options:q}):pv(a.ids[Vo[0]],a.ids[Vo[1]],m[v],b,{hc:t,options:q});else if(a.prefix==="UA")if(H(155))ov([a],m[v],r||"US",b,{hc:t});else{var w=a.destinationId,x=m[v],y={hc:t};O(23);if(x){y=y||{};var B=qv(rv,y,w),C={};y.hc!==void 0?C.receiver=y.hc:C.replace=x;C.ga_wpid=w;C.destination=x;B(2,ob(),C)}}}}}},ov=function(a,b,c,d,e){O(21);if(b&&c){e=
e||{};for(var f={countryNameCode:c,destinationNumber:b,retrievalTime:ob()},g=0;g<a.length;g++){var h=a[g];tv[h.id]||(h&&h.prefix==="AW"&&!f.adData&&h.ids.length>=2?(f.adData={ak:h.ids[Vo[0]],cl:h.ids[Vo[1]]},uv(f.adData,d),tv[h.id]=!0):h&&h.prefix==="UA"&&!f.gaData&&(f.gaData={gaWpid:h.destinationId},tv[h.id]=!0))}(f.gaData||f.adData)&&qv(vv,e,void 0,d)(e.hc,f,e.options)}},pv=function(a,b,c,d,e){O(22);if(c){e=e||{};var f=qv(wv,e,a,d),g={ak:a,cl:b};e.hc===void 0&&(g.autoreplace=c);uv(g,d);f(2,e.hc,
g,c,0,ob(),e.options)}},uv=function(a,b){a.dma=Uq();Vq()&&(a.dmaCps=Tq());Mq(b)?a.npa="0":a.npa="1"},qv=function(a,b,c,d){if(z[a.functionName])return b.ni&&D(b.ni),z[a.functionName];var e=xv();z[a.functionName]=e;if(a.additionalQueues)for(var f=0;f<a.additionalQueues.length;f++)z[a.additionalQueues[f]]=z[a.additionalQueues[f]]||xv();a.idKey&&z[a.idKey]===void 0&&(z[a.idKey]=c);Gl({destinationId:Vf.ctid,endpoint:0,eventId:d==null?void 0:d.eventId,priorityId:d==null?void 0:d.priorityId},jv("https://",
"http://",a.scriptUrl),b.ni,b.Kn);return e},xv=function(){function a(){a.q=a.q||[];a.q.push(arguments)}return a},wv={functionName:"_googWcmImpl",idKey:"_googWcmAk",scriptUrl:"www.gstatic.com/wcm/loader.js"},rv={functionName:"_gaPhoneImpl",idKey:"ga_wpid",scriptUrl:"www.gstatic.com/gaphone/loader.js"},yv={Uk:"9",mm:"5"},vv={functionName:"_googCallTrackingImpl",additionalQueues:[rv.functionName,wv.functionName],scriptUrl:"www.gstatic.com/call-tracking/call-tracking_"+
(yv.Uk||yv.mm)+".js"},tv={};function zv(a){return{getDestinationId:function(){return a.target.destinationId},getEventName:function(){return a.eventName},setEventName:function(b){a.eventName=b},getHitData:function(b){return Fu(a,b)},setHitData:function(b,c){V(a,b,c)},setHitDataIfNotDefined:function(b,c){Fu(a,b)===void 0&&V(a,b,c)},copyToHitData:function(b,c){a.copyToHitData(b,c)},getMetadata:function(b){return R(a,b)},setMetadata:function(b,c){T(a,b,c)},isAborted:function(){return a.isAborted},abort:function(){a.isAborted=!0},
getFromEventContext:function(b){return P(a.D,b)},ac:function(){return a},getHitKeys:function(){return Object.keys(a.C)}}};function Gv(a,b){return arguments.length===1?Hv("set",a):Hv("set",a,b)}function Iv(a,b){return arguments.length===1?Hv("config",a):Hv("config",a,b)}function Jv(a,b,c){c=c||{};c[N.m.Oc]=a;return Hv("event",b,c)}function Hv(){return arguments};var Lv=function(){this.messages=[];this.C=[]};Lv.prototype.enqueue=function(a,b,c){var d=this.messages.length+1;a["gtm.uniqueEventId"]=b;a["gtm.priorityId"]=d;var e=Object.assign({},c,{eventId:b,priorityId:d,fromContainerExecution:!0}),f={message:a,notBeforeEventId:b,priorityId:d,messageContext:e};this.messages.push(f);for(var g=0;g<this.C.length;g++)try{this.C[g](f)}catch(h){}};Lv.prototype.listen=function(a){this.C.push(a)};
Lv.prototype.get=function(){for(var a={},b=0;b<this.messages.length;b++){var c=this.messages[b],d=a[c.notBeforeEventId];d||(d=[],a[c.notBeforeEventId]=d);d.push(c)}return a};Lv.prototype.prune=function(a){for(var b=[],c=[],d=0;d<this.messages.length;d++){var e=this.messages[d];e.notBeforeEventId===a?b.push(e):c.push(e)}this.messages=c;return b};function Mv(a,b,c){c.eventMetadata=c.eventMetadata||{};c.eventMetadata.source_canonical_id=Vf.canonicalContainerId;Nv().enqueue(a,b,c)}
function Ov(){var a=Pv;Nv().listen(a)}function Nv(){return Jo("mb",function(){return new Lv})};var Qv,Rv=!1;function Sv(){Rv=!0;Qv=Qv||{}}function Tv(a){Rv||Sv();return Qv[a]};function Uv(){var a=z.screen;return{width:a?a.width:0,height:a?a.height:0}}
function Vv(a){if(A.hidden)return!0;var b=a.getBoundingClientRect();if(b.top===b.bottom||b.left===b.right||!z.getComputedStyle)return!0;var c=z.getComputedStyle(a,null);if(c.visibility==="hidden")return!0;for(var d=a,e=c;d;){if(e.display==="none")return!0;var f=e.opacity,g=e.filter;if(g){var h=g.indexOf("opacity(");h>=0&&(g=g.substring(h+8,g.indexOf(")",h)),g.charAt(g.length-1)==="%"&&(g=g.substring(0,g.length-1)),f=String(Math.min(Number(g),Number(f))))}if(f!==void 0&&Number(f)<=0)return!0;(d=d.parentElement)&&
(e=z.getComputedStyle(d,null))}return!1}var Rf;var tx=Number('')||5,ux=Number('')||50,vx=fb();
var xx=function(a,b){a&&(wx("sid",a.targetId,b),wx("cc",a.clientCount,b),wx("tl",a.totalLifeMs,b),wx("hc",a.heartbeatCount,b),wx("cl",a.clientLifeMs,b))},wx=function(a,b,c){b!=null&&c.push(a+"="+b)},yx=function(){var a=A.referrer;if(a){var b;return fk(lk(a),"host")===((b=z.location)==null?void 0:b.host)?1:2}return 0},Ax=function(){this.R=zx;this.N=0};Ax.prototype.H=function(a,b,c,d){var e=yx(),f,g=[];f=z===z.top&&e!==0&&b?(b==null?void 0:b.clientCount)>
1?e===2?1:2:e===2?0:3:4;a&&wx("si",a.lf,g);wx("m",0,g);wx("iss",f,g);wx("if",c,g);xx(b,g);d&&wx("fm",encodeURIComponent(d.substring(0,ux)),g);this.O(g);};Ax.prototype.C=function(a,b,c,d,e){var f=[];wx("m",1,f);wx("s",a,f);wx("po",yx(),f);b&&(wx("st",b.state,f),wx("si",b.lf,f),wx("sm",b.yf,f));xx(c,f);wx("c",d,f);e&&wx("fm",encodeURIComponent(e.substring(0,ux)),f);this.O(f);};
Ax.prototype.O=function(a){a=a===void 0?[]:a;!Ck||this.N>=tx||(wx("pid",vx,a),wx("bc",++this.N,a),a.unshift("ctid="+Vf.ctid+"&t=s"),this.R("https://www.googletagmanager.com/a?"+a.join("&")))};var Bx=Number('')||500,Cx=Number('')||5E3,Dx=Number('20')||10,Ex=Number('')||5E3;function Fx(a){return a.performance&&a.performance.now()||Date.now()}
var Gx=function(a,b){var c;var d=function(e,f,g){g=g===void 0?{wk:function(){},xk:function(){},vk:function(){},onFailure:function(){}}:g;this.sm=e;this.C=f;this.N=g;this.fa=this.ia=this.heartbeatCount=this.rm=0;this.mg=!1;this.H={};this.id=String(Math.floor(Number.MAX_SAFE_INTEGER*Math.random()));this.state=0;this.lf=Fx(this.C);this.yf=Fx(this.C);this.R=10};d.prototype.init=function(){this.O(1);this.Da()};d.prototype.getState=function(){return{state:this.state,
lf:Math.round(Fx(this.C)-this.lf),yf:Math.round(Fx(this.C)-this.yf)}};d.prototype.O=function(e){this.state!==e&&(this.state=e,this.yf=Fx(this.C))};d.prototype.ek=function(){return String(this.rm++)};d.prototype.Da=function(){var e=this;this.heartbeatCount++;this.ab({type:0,clientId:this.id,requestId:this.ek(),maxDelay:this.ng()},function(f){if(f.type===0){var g;if(((g=f.failure)==null?void 0:g.failureType)!=null)if(f.stats&&(e.stats=f.stats),e.fa++,f.isDead||e.fa>Dx){var h=f.isDead&&f.failure.failureType;
e.R=h||10;e.O(4);e.om();var m,n;(n=(m=e.N).vk)==null||n.call(m,{failureType:h||10,data:f.failure.data})}else e.O(3),e.fk();else{if(e.heartbeatCount>f.stats.heartbeatCount+Dx){e.heartbeatCount=f.stats.heartbeatCount;var p,q;(q=(p=e.N).onFailure)==null||q.call(p,{failureType:13})}e.stats=f.stats;var r=e.state;e.O(2);if(r!==2)if(e.mg){var t,u;(u=(t=e.N).xk)==null||u.call(t)}else{e.mg=!0;var v,w;(w=(v=e.N).wk)==null||w.call(v)}e.fa=0;e.tm();e.fk()}}})};d.prototype.ng=function(){return this.state===2?
Cx:Bx};d.prototype.fk=function(){var e=this;this.C.setTimeout(function(){e.Da()},Math.max(0,this.ng()-(Fx(this.C)-this.ia)))};d.prototype.xm=function(e,f,g){var h=this;this.ab({type:1,clientId:this.id,requestId:this.ek(),command:e},function(m){if(m.type===1)if(m.result)f(m.result);else{var n,p,q,r={failureType:(q=(n=m.failure)==null?void 0:n.failureType)!=null?q:12,data:(p=m.failure)==null?void 0:p.data},t,u;(u=(t=h.N).onFailure)==null||u.call(t,r);g(r)}})};d.prototype.ab=function(e,f){var g=this;
if(this.state===4)e.failure={failureType:this.R},f(e);else{var h=this.state!==2&&e.type!==0,m=e.requestId,n,p=this.C.setTimeout(function(){var r=g.H[m];r&&g.Me(r,7)},(n=e.maxDelay)!=null?n:Ex),q={request:e,Hk:f,Ck:h,Gn:p};this.H[m]=q;h||this.sendRequest(q)}};d.prototype.sendRequest=function(e){this.ia=Fx(this.C);e.Ck=!1;this.sm(e.request)};d.prototype.tm=function(){for(var e=l(Object.keys(this.H)),f=e.next();!f.done;f=e.next()){var g=this.H[f.value];g.Ck&&this.sendRequest(g)}};d.prototype.om=function(){for(var e=
l(Object.keys(this.H)),f=e.next();!f.done;f=e.next())this.Me(this.H[f.value],this.R)};d.prototype.Me=function(e,f){this.xc(e);var g=e.request;g.failure={failureType:f};e.Hk(g)};d.prototype.xc=function(e){delete this.H[e.request.requestId];this.C.clearTimeout(e.Gn)};d.prototype.ln=function(e){this.ia=Fx(this.C);var f=this.H[e.requestId];if(f)this.xc(f),f.Hk(e);else{var g,h;(h=(g=this.N).onFailure)==null||h.call(g,{failureType:14})}};c=new d(a,z,b);return c};var Hx;
var Ix=function(){Hx||(Hx=new Ax);return Hx},zx=function(a){Vm(Xm(wm.V.wc),function(){vc(a)})},Jx=function(a){var b=a.substring(0,a.indexOf("/_/service_worker"));return"&1p=1"+(b?"&path="+encodeURIComponent(b):"")},Kx=function(a){var b=a,c=oj.fa;b?(b.charAt(b.length-1)!=="/"&&(b+="/"),a=b+c):a="https://www.googletagmanager.com/static/service_worker/"+c+"/";var d;try{d=new URL(a)}catch(e){return null}return d.protocol!=="https:"?null:d},Lx=function(a){var b=Dn(yn.Yj);return b&&b[a]},Mx=function(a,
b,c,d,e){var f=this;this.H=d;this.R=this.O=!1;this.fa=null;this.initTime=c;this.C=15;this.N=this.Gm(a);z.setTimeout(function(){f.initialize()},1E3);D(function(){f.vn(a,b,e)})};k=Mx.prototype;k.delegate=function(a,b,c){this.getState()!==2?(this.H.C(this.C,{state:this.getState(),lf:this.initTime,yf:Math.round(pb())-this.initTime},void 0,a.commandType),c({failureType:this.C})):this.N.xm(a,b,c)};k.getState=function(){return this.N.getState().state};k.vn=function(a,b,c){var d=z.location.origin,e=this,
f=tc();try{var g=f.contentDocument.createElement("iframe"),h=a.pathname,m=h[h.length-1]==="/"?a.toString():a.toString()+"/",n=b?Jx(h):"",p;H(132)&&(p={sandbox:"allow-same-origin allow-scripts"});tc(m+"sw_iframe.html?origin="+encodeURIComponent(d)+n+(c?"&e=1":""),void 0,p,void 0,g);var q=function(){f.contentDocument.body.appendChild(g);g.addEventListener("load",function(){e.fa=g.contentWindow;f.contentWindow.addEventListener("message",function(r){r.origin===a.origin&&e.N.ln(r.data)});e.initialize()})};
f.contentDocument.readyState==="complete"?q():f.contentWindow.addEventListener("load",function(){q()})}catch(r){f.parentElement.removeChild(f),this.C=11,this.H.H(void 0,void 0,this.C,r.toString())}};k.Gm=function(a){var b=this,c=Gx(function(d){var e;(e=b.fa)==null||e.postMessage(d,a.origin)},{wk:function(){b.O=!0;b.H.H(c.getState(),c.stats)},xk:function(){},vk:function(d){b.O?(b.C=(d==null?void 0:d.failureType)||10,b.H.C(b.C,c.getState(),c.stats,void 0,d==null?void 0:d.data)):(b.C=(d==null?void 0:
d.failureType)||4,b.H.H(c.getState(),c.stats,b.C,d==null?void 0:d.data))},onFailure:function(d){b.C=d.failureType;b.H.C(b.C,c.getState(),c.stats,d.command,d.data)}});return c};k.initialize=function(){this.R||this.N.init();this.R=!0};function Nx(){var a=Uf(Rf.C,"",function(){return{}});try{return a("internal_sw_allowed"),!0}catch(b){return!1}}
function Ox(a,b,c){c=c===void 0?!1:c;var d=z.location.origin;if(!d||!Nx())return;Lj()&&(a=""+d+Kj()+"/_/service_worker");var e=Kx(a);if(e===null||Lx(e.origin))return;if(!gc()){Ix().H(void 0,void 0,6);return}var f=new Mx(e,!!a,b||Math.round(pb()),Ix(),c),g;a:{var h=yn.Yj,m={},n=Bn(h);if(!n){n=Bn(h,!0);if(!n){g=void 0;break a}n.set(m)}g=n.get()}g[e.origin]=f;}
var Px=function(a,b,c,d){var e;if((e=Lx(a))==null||!e.delegate){var f=gc()?16:6;Ix().C(f,void 0,void 0,b.commandType);d({failureType:f});return}Lx(a).delegate(b,c,d);};
function Qx(a,b,c,d,e){var f=Kx();if(f===null){d(gc()?16:6);return}var g,h=(g=Lx(f.origin))==null?void 0:g.initTime,m=Math.round(pb()),n={commandType:0,params:{url:a,method:0,templates:b,body:"",processResponse:!1,sinceInit:h?m-h:void 0}};e&&(n.params.encryptionKeyString=e);Px(f.origin,n,function(p){c(p)},function(p){d(p.failureType)});}
function Rx(a,b,c,d){var e=Kx(a);if(e===null){d("_is_sw=f"+(gc()?16:6)+"te");return}var f=b?1:0,g=Math.round(pb()),h,m=(h=Lx(e.origin))==null?void 0:h.initTime,n=m?g-m:void 0;Px(e.origin,{commandType:0,params:{url:a,method:f,templates:c,body:b||"",processResponse:!0,sinceInit:n,attributionReporting:!0,referer:z.location.href}},function(){},function(p){var q="_is_sw=f"+p.failureType,r,t=(r=Lx(e.origin))==null?void 0:r.getState();t!==void 0&&(q+="s"+
t);d(n?q+("t"+n):q+"te")});};var Sx="platform platformVersion architecture model uaFullVersion bitness fullVersionList wow64".split(" ");function Tx(a){var b;return(b=a.google_tag_data)!=null?b:a.google_tag_data={}}function Ux(){var a=z.google_tag_data,b;if(a!=null&&a.uach){var c=a.uach,d=Object.assign({},c);c.fullVersionList&&(d.fullVersionList=c.fullVersionList.slice(0));b=d}else b=null;return b}function Vx(){var a,b;return(b=(a=z.google_tag_data)==null?void 0:a.uach_promise)!=null?b:null}
function Wx(a){var b,c;return typeof((b=a.navigator)==null?void 0:(c=b.userAgentData)==null?void 0:c.getHighEntropyValues)==="function"}function Xx(){var a=z;if(!Wx(a))return null;var b=Tx(a);if(b.uach_promise)return b.uach_promise;var c=a.navigator.userAgentData.getHighEntropyValues(Sx).then(function(d){b.uach!=null||(b.uach=d);return d});return b.uach_promise=c};function dy(a){var b=a.location.href;if(a===a.top)return{url:b,An:!0};var c=!1,d=a.document;d&&d.referrer&&(b=d.referrer,a.parent===a.top&&(c=!0));var e=a.location.ancestorOrigins;if(e){var f=e[e.length-1];f&&b.indexOf(f)===-1&&(c=!1,b=f)}return{url:b,An:c}};function Vy(a,b){var c=!!Lj();switch(a){case 45:return c&&!H(76)?Kj()+"/g/ccm/collect":"https://www.google.com/ccm/collect";case 46:return c?Kj()+"/gs/ccm/collect":"https://pagead2.googlesyndication.com/ccm/collect";case 51:return c&&!H(80)?Kj()+"/travel/flights/click/conversion":"https://www.google.com/travel/flights/click/conversion";case 9:return!H(77)&&c?Kj()+"/pagead/viewthroughconversion":"https://googleads.g.doubleclick.net/pagead/viewthroughconversion";case 17:return c&&!H(82)?(H(88)?Rn():
"").toLowerCase()==="region1"?""+Kj()+"/r1ag/g/c":""+Kj()+"/ag/g/c":Ty();case 16:return c?""+Kj()+(H(15)?"/ga/g/c":"/g/collect"):Uy();case 1:return!H(81)&&c?Kj()+"/activity;":"https://ad.doubleclick.net/activity;";case 2:return c?Kj()+"/ddm/activity/":"https://ade.googlesyndication.com/ddm/activity/";case 33:return!H(81)&&c?Kj()+"/activity;register_conversion=1;":"https://ad.doubleclick.net/activity;register_conversion=1;";case 11:return c?H(79)?Kj()+"/d/pagead/form-data":Kj()+"/pagead/form-data":
H(141)?"https://www.google.com/pagead/form-data":"https://google.com/pagead/form-data";case 3:return!H(81)&&c?Kj()+"/activityi/"+b+";":"https://"+b+".fls.doubleclick.net/activityi;";case 5:case 6:case 7:case 8:case 12:case 13:case 14:case 15:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 42:case 43:case 44:case 47:case 48:case 49:case 50:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 0:throw Error("Unsupported endpoint");
default:Yb(a,"Unknown endpoint")}};function Wy(a){a=a===void 0?[]:a;return pj(a).join("~")}function Xy(){if(!H(117))return"";var a,b;return(((a=fm(gm()))==null?void 0:(b=a.context)==null?void 0:b.loadExperiments)||[]).join("~")};var ez={};ez.M=br.M;var fz={Fo:"L",lm:"S",Mo:"Y",so:"B",Co:"E",Eo:"I",Lo:"TC",Do:"HTC"},gz={lm:"S",Bo:"V",wo:"E",Ko:"tag"},hz={},iz=(hz[ez.M.Eh]="6",hz[ez.M.Fh]="5",hz[ez.M.Dh]="7",hz);function jz(){function a(c,d){var e=Xa(d);e&&b.push([c,e])}var b=[];a("u","GTM");a("ut","TAGGING");a("h","HEALTH");return b};var kz=!1;function Az(a){}
function Bz(a){}function Cz(){}
function Dz(a){}function Ez(a){}
function Fz(a){}
function Gz(){}
function Hz(a,b){}
function Iz(a,b,c){}
function Jz(){};var Kz=Object.freeze({cache:"no-store",credentials:"include",method:"GET",keepalive:!0,redirect:"follow"});
function Lz(a,b,c,d,e,f,g){var h=Object.assign({},Kz);c&&(h.body=c,h.method="POST");Object.assign(h,e);z.fetch(b,h).then(function(m){if(!m.ok)g==null||g();else if(m.body){var n=m.body.getReader(),p=new TextDecoder;return new Promise(function(q){function r(){n.read().then(function(t){var u;u=t.done;var v=p.decode(t.value,{stream:!u});Mz(d,v);u?(f==null||f(),q()):r()}).catch(function(){q()})}r()})}}).catch(function(){g?g():H(127)&&(b+="&_z=retryFetch",c?Dl(a,b,c):Cl(a,b))})};var Nz=function(a){this.O=a;this.C=""},Oz=function(a,b){a.H=b;return a},Pz=function(a,b){a.N=b;return a},Mz=function(a,b){b=a.C+b;for(var c=b.indexOf("\n\n");c!==-1;){var d=a,e;a:{var f=l(b.substring(0,c).split("\n")),g=f.next().value,h=f.next().value;if(g.indexOf("event: message")===0&&h.indexOf("data: ")===0)try{e=JSON.parse(h.substring(h.indexOf(":")+1));break a}catch(m){}e=void 0}Qz(d,e);b=b.substring(c+2);c=b.indexOf("\n\n")}a.C=b},Rz=function(a,b){return function(){if(b.fallback_url&&b.fallback_url_method){var c=
{};Qz(a,(c[b.fallback_url_method]=[b.fallback_url],c.options={},c))}}},Qz=function(a,b){b&&(Sz(b.send_pixel,b.options,a.O),Sz(b.create_iframe,b.options,a.H),Sz(b.fetch,b.options,a.N))};function Tz(a){var b=a.search;return a.protocol+"//"+a.hostname+a.pathname+(b?b+"&richsstsse":"?richsstsse")}function Sz(a,b,c){if(a&&c){var d=a||[];if(Array.isArray(d))for(var e=Wc(b)?b:{},f=l(d),g=f.next();!g.done;g=f.next())c(g.value,e)}};function BA(a,b){if(data.entities){var c=data.entities[a];if(c)return c[b]}};function CA(a,b,c){c=c===void 0?!1:c;DA().addRestriction(0,a,b,c)}function EA(a,b,c){c=c===void 0?!1:c;DA().addRestriction(1,a,b,c)}function FA(){var a=dm();return DA().getRestrictions(1,a)}var GA=function(){this.container={};this.C={}},HA=function(a,b){var c=a.container[b];c||(c={_entity:{internal:[],external:[]},_event:{internal:[],external:[]}},a.container[b]=c);return c};
GA.prototype.addRestriction=function(a,b,c,d){d=d===void 0?!1:d;if(!d||!this.C[b]){var e=HA(this,b);a===0?d?e._entity.external.push(c):e._entity.internal.push(c):a===1&&(d?e._event.external.push(c):e._event.internal.push(c))}};
GA.prototype.getRestrictions=function(a,b){var c=HA(this,b);if(a===0){var d,e;return[].concat(sa((c==null?void 0:(d=c._entity)==null?void 0:d.internal)||[]),sa((c==null?void 0:(e=c._entity)==null?void 0:e.external)||[]))}if(a===1){var f,g;return[].concat(sa((c==null?void 0:(f=c._event)==null?void 0:f.internal)||[]),sa((c==null?void 0:(g=c._event)==null?void 0:g.external)||[]))}return[]};
GA.prototype.getExternalRestrictions=function(a,b){var c=HA(this,b),d,e;return a===0?(c==null?void 0:(d=c._entity)==null?void 0:d.external)||[]:(c==null?void 0:(e=c._event)==null?void 0:e.external)||[]};GA.prototype.removeExternalRestrictions=function(a){var b=HA(this,a);b._event&&(b._event.external=[]);b._entity&&(b._entity.external=[]);this.C[a]=!0};function DA(){return Jo("r",function(){return new GA})};var IA=new RegExp(/^(.*\.)?(google|youtube|blogger|withgoogle)(\.com?)?(\.[a-z]{2})?\.?$/),JA={cl:["ecl"],customPixels:["nonGooglePixels"],ecl:["cl"],ehl:["hl"],gaawc:["googtag"],hl:["ehl"],html:["customScripts","customPixels","nonGooglePixels","nonGoogleScripts","nonGoogleIframes"],customScripts:["html","customPixels","nonGooglePixels","nonGoogleScripts","nonGoogleIframes"],nonGooglePixels:[],nonGoogleScripts:["nonGooglePixels"],nonGoogleIframes:["nonGooglePixels"]},KA={cl:["ecl"],customPixels:["customScripts",
"html"],ecl:["cl"],ehl:["hl"],gaawc:["googtag"],hl:["ehl"],html:["customScripts"],customScripts:["html"],nonGooglePixels:["customPixels","customScripts","html","nonGoogleScripts","nonGoogleIframes"],nonGoogleScripts:["customScripts","html"],nonGoogleIframes:["customScripts","html","nonGoogleScripts"]},LA="google customPixels customScripts html nonGooglePixels nonGoogleScripts nonGoogleIframes".split(" ");
function MA(){var a=Rj("gtm.allowlist")||Rj("gtm.whitelist");a&&O(9);xj&&(a=["google","gtagfl","lcl","zone"],H(48)&&a.push("cmpPartners"));IA.test(z.location&&z.location.hostname)&&(xj?O(116):(O(117),NA&&(a=[],window.console&&window.console.log&&window.console.log("GTM blocked. See go/13687728."))));var b=a&&tb(mb(a),JA),c=Rj("gtm.blocklist")||Rj("gtm.blacklist");c||(c=Rj("tagTypeBlacklist"))&&O(3);c?O(8):c=[];IA.test(z.location&&z.location.hostname)&&(c=mb(c),c.push("nonGooglePixels","nonGoogleScripts",
"sandboxedScripts"));mb(c).indexOf("google")>=0&&O(2);var d=c&&tb(mb(c),KA),e={};return function(f){var g=f&&f[Pe.za];if(!g||typeof g!=="string")return!0;g=g.replace(/^_*/,"");if(e[g]!==void 0)return e[g];var h=Hj[g]||[],m=!0;if(a){var n;if(n=m)a:{if(b.indexOf(g)<0){if(H(48)&&xj&&h.indexOf("cmpPartners")>=0){n=!0;break a}if(h&&h.length>0)for(var p=0;p<h.length;p++){if(b.indexOf(h[p])<0){O(11);n=!1;break a}}else{n=!1;break a}}n=!0}m=n}var q=!1;if(c){var r=d.indexOf(g)>=0;if(r)q=r;else{var t=gb(d,h||
[]);t&&O(10);q=t}}var u=!m||q;!u&&(h.indexOf("sandboxedScripts")===-1?0:H(48)&&xj&&h.indexOf("cmpPartners")>=0?!OA():b&&b.indexOf("sandboxedScripts")!==-1?0:gb(d,LA))&&(u=!0);return e[g]=u}}function OA(){var a=Uf(Rf.C,bm(),function(){return{}});try{return a("inject_cmp_banner"),!0}catch(b){return!1}}var NA=!1;NA=!0;
function PA(){Tl&&CA(dm(),function(a){var b=Cf(a.entityId),c;if(Ff(b)){var d=b[Pe.za];if(!d)throw Error("Error: No function name given for function call.");var e=tf[d];c=!!e&&!!e.runInSiloedMode}else c=!!BA(b[Pe.za],4);return c})};function QA(a,b,c,d,e){if(!RA()){var f=d.siloed?Zl(a):a;if(!mm(f)){d.loadExperiments=pj();om(f,d,e);var g=SA(a),h=function(){Pl().container[f]&&(Pl().container[f].state=3);TA()},m={destinationId:f,endpoint:0};if(Lj())Gl(m,Kj()+"/"+g,void 0,h);else{var n=ub(a,"GTM-"),p=sk(),q=c?"/gtag/js":"/gtm.js",r=rk(b,q+g);if(!r){var t=rj.Ff+q;p&&ic&&n&&(t=ic.replace(/^(?:https?:\/\/)?/i,"").split(/[?#]/)[0]);r=jv("https://","http://",t+g)}Gl(m,r,void 0,h)}}}}
function TA(){qm()||ib(rm(),function(a,b){UA(a,b.transportUrl,b.context);O(92)})}
function UA(a,b,c,d){if(!RA()){var e=c.siloed?Zl(a):a;if(!nm(e))if(c.loadExperiments||(c.loadExperiments=pj()),qm())Pl().destination[e]={state:0,transportUrl:b,context:c,parent:gm()},Ol({ctid:e,isDestination:!0},d),O(91);else{c.siloed&&pm({ctid:e,isDestination:!0});Pl().destination[e]={state:1,context:c,parent:gm()};Ol({ctid:e,isDestination:!0},d);var f={destinationId:e,endpoint:0};if(Lj())Gl(f,Kj()+("/gtd"+SA(a,!0)));else{var g="/gtag/destination"+SA(a,!0),h=rk(b,g);h||(h=jv("https://","http://",
rj.Ff+g));Gl(f,h)}}}}function SA(a,b){b=b===void 0?!1:b;var c="?id="+encodeURIComponent(a);H(123)&&rj.vb==="dataLayer"||(c+="&l="+rj.vb);if(!ub(a,"GTM-")||b)c=H(129)?c+(Lj()?"&sc=1":"&cx=c"):c+"&cx=c";c+="&gtm="+$q();sk()&&(c+="&sign="+rj.yh);var d=oj.H;d===1?c+="&fps=fc":d===2&&(c+="&fps=fe");H(69)&&Jj()&&(c+="&tag_exp="+Jj());return c}function RA(){if(Yq()){return!0}return!1};var VA=function(){this.H=0;this.C={}};VA.prototype.addListener=function(a,b,c){var d=++this.H;this.C[a]=this.C[a]||{};this.C[a][String(d)]={listener:b,Lb:c};return d};VA.prototype.removeListener=function(a,b){var c=this.C[a],d=String(b);if(!c||!c[d])return!1;delete c[d];return!0};var XA=function(a,b){var c=[];ib(WA.C[a],function(d,e){c.indexOf(e.listener)<0&&(e.Lb===void 0||b.indexOf(e.Lb)>=0)&&c.push(e.listener)});return c};function YA(a,b,c){return{entityType:a,indexInOriginContainer:b,nameInOriginContainer:c,originContainerId:bm()}};var $A=function(a,b){this.C=!1;this.O=[];this.eventData={tags:[]};this.R=!1;this.H=this.N=0;ZA(this,a,b)},aB=function(a,b,c,d){if(tj.hasOwnProperty(b)||b==="__zone")return-1;var e={};Wc(d)&&(e=Xc(d,e));e.id=c;e.status="timeout";return a.eventData.tags.push(e)-1},bB=function(a,b,c,d){var e=a.eventData.tags[b];e&&(e.status=c,e.executionTime=d)},cB=function(a){if(!a.C){for(var b=a.O,c=0;c<b.length;c++)b[c]();a.C=!0;a.O.length=0}},ZA=function(a,b,c){b!==void 0&&a.Se(b);c&&z.setTimeout(function(){cB(a)},
Number(c))};$A.prototype.Se=function(a){var b=this,c=rb(function(){D(function(){a(bm(),b.eventData)})});this.C?c():this.O.push(c)};var dB=function(a){a.N++;return rb(function(){a.H++;a.R&&a.H>=a.N&&cB(a)})},eB=function(a){a.R=!0;a.H>=a.N&&cB(a)};var fB={};function gB(){return z[hB()]}var iB=function(a){if(Jm()){var b=gB();b(a+"require","linker");b(a+"linker:passthrough",!0)}},jB=function(a){z.GoogleAnalyticsObject||(z.GoogleAnalyticsObject=a||"ga");var b=z.GoogleAnalyticsObject;if(z[b])z.hasOwnProperty(b);else{var c=function(){var d=wa.apply(0,arguments);c.q=c.q||[];c.q.push(d)};c.l=Number(ob());z[b]=c}return z[b]};
function hB(){return z.GoogleAnalyticsObject||"ga"}function kB(){var a=bm();}
function lB(a,b){return function(){var c=gB(),d=c&&c.getByName&&c.getByName(a);if(d){var e=d.get("sendHitTask");d.set("sendHitTask",function(f){var g=f.get("hitPayload"),h=f.get("hitCallback"),m=g.indexOf("&tid="+b)<0;m&&(f.set("hitPayload",g.replace(/&tid=UA-[0-9]+-[0-9]+/,"&tid="+b),!0),f.set("hitCallback",void 0,!0));e(f);m&&(f.set("hitPayload",g,!0),f.set("hitCallback",h,!0),f.set("_x_19",void 0,!0),e(f))})}}};var rB=["es","1"],sB={},tB={};function uB(a,b){if(Ck){var c;c=b.match(/^(gtm|gtag)\./)?encodeURIComponent(b):"*";sB[a]=[["e",c],["eid",a]];Qp(a)}}function vB(a){var b=a.eventId,c=a.gd;if(!sB[b])return[];var d=[];tB[b]||d.push(rB);d.push.apply(d,sa(sB[b]));c&&(tB[b]=!0);return d};var wB={},xB={},yB={};function zB(a,b,c,d){Ck&&H(119)&&((d===void 0?0:d)?(yB[b]=yB[b]||0,++yB[b]):c!==void 0?(xB[a]=xB[a]||{},xB[a][b]=Math.round(c)):(wB[a]=wB[a]||{},wB[a][b]=(wB[a][b]||0)+1))}function AB(a){var b=a.eventId,c=a.gd,d=wB[b]||{},e=[],f;for(f in d)d.hasOwnProperty(f)&&e.push(""+f+d[f]);c&&delete wB[b];return e.length?[["md",e.join(".")]]:[]}
function BB(a){var b=a.eventId,c=a.gd,d=xB[b]||{},e=[],f;for(f in d)d.hasOwnProperty(f)&&e.push(""+f+d[f]);c&&delete xB[b];return e.length?[["mtd",e.join(".")]]:[]}function CB(){for(var a=[],b=l(Object.keys(yB)),c=b.next();!c.done;c=b.next()){var d=c.value;a.push(""+d+yB[d])}return a.length?[["mec",a.join(".")]]:[]};var DB={},EB={};function FB(a,b,c){if(Ck&&b){var d=wk(b);DB[a]=DB[a]||[];DB[a].push(c+d);var e=(Ff(b)?"1":"2")+d;EB[a]=EB[a]||[];EB[a].push(e);Qp(a)}}function GB(a){var b=a.eventId,c=a.gd,d=[],e=DB[b]||[];e.length&&d.push(["tr",e.join(".")]);var f=EB[b]||[];f.length&&d.push(["ti",f.join(".")]);c&&(delete DB[b],delete EB[b]);return d};function HB(a,b,c,d){var e=rf[a],f=IB(a,b,c,d);if(!f)return null;var g=Gf(e[Pe.Zj],c,[]);if(g&&g.length){var h=g[0];f=HB(h.index,{onSuccess:f,onFailure:h.pk===1?b.terminate:f,terminate:b.terminate},c,d)}return f}
function IB(a,b,c,d){function e(){function w(){xn(3);var K=pb()-F;FB(c.id,f,"7");bB(c.yc,C,"exception",K);H(108)&&Iz(c,f,ez.M.Dh);E||(E=!0,h())}if(f[Pe.fm])h();else{var x=Ef(f,c,[]),y=x[Pe.Vk];if(y!=null)for(var B=0;B<y.length;B++)if(!yo(y[B])){h();return}var C=aB(c.yc,String(f[Pe.za]),Number(f[Pe.og]),x[Pe.METADATA]),E=!1;x.vtp_gtmOnSuccess=function(){if(!E){E=!0;var K=pb()-F;FB(c.id,rf[a],"5");bB(c.yc,C,"success",K);H(108)&&Iz(c,f,ez.M.Fh);g()}};x.vtp_gtmOnFailure=function(){if(!E){E=!0;var K=pb()-
F;FB(c.id,rf[a],"6");bB(c.yc,C,"failure",K);H(108)&&Iz(c,f,ez.M.Eh);h()}};x.vtp_gtmTagId=f.tag_id;x.vtp_gtmEventId=c.id;c.priorityId&&(x.vtp_gtmPriorityId=c.priorityId);FB(c.id,f,"1");H(108)&&Hz(c,f);var F=pb();try{Hf(x,{event:c,index:a,type:1})}catch(K){w(K)}H(108)&&Iz(c,f,ez.M.bk)}}var f=rf[a],g=b.onSuccess,h=b.onFailure,m=b.terminate;if(c.isBlocked(f))return null;var n=Gf(f[Pe.dk],c,[]);if(n&&n.length){var p=n[0],q=HB(p.index,{onSuccess:g,onFailure:h,terminate:m},c,d);if(!q)return null;g=q;h=p.pk===
2?m:q}if(f[Pe.Sj]||f[Pe.hm]){var r=f[Pe.Sj]?sf:c.io,t=g,u=h;if(!r[a]){var v=JB(a,r,rb(e));g=v.onSuccess;h=v.onFailure}return function(){r[a](t,u)}}return e}function JB(a,b,c){var d=[],e=[];b[a]=KB(d,e,c);return{onSuccess:function(){b[a]=LB;for(var f=0;f<d.length;f++)d[f]()},onFailure:function(){b[a]=MB;for(var f=0;f<e.length;f++)e[f]()}}}function KB(a,b,c){return function(d,e){a.push(d);b.push(e);c()}}function LB(a){a()}function MB(a,b){b()};var PB=function(a,b){for(var c=[],d=0;d<rf.length;d++)if(a[d]){var e=rf[d];var f=dB(b.yc);try{var g=HB(d,{onSuccess:f,onFailure:f,terminate:f},b,d);if(g){var h=e[Pe.za];if(!h)throw Error("Error: No function name given for function call.");var m=tf[h];c.push({Mk:d,priorityOverride:(m?m.priorityOverride||0:0)||BA(e[Pe.za],1)||0,execute:g})}else NB(d,b),f()}catch(p){f()}}c.sort(OB);for(var n=0;n<c.length;n++)c[n].execute();
return c.length>0};function QB(a,b){if(!WA)return!1;var c=a["gtm.triggers"]&&String(a["gtm.triggers"]),d=XA(a.event,c?String(c).split(","):[]);if(!d.length)return!1;for(var e=0;e<d.length;++e){var f=dB(b);try{d[e](a,f)}catch(g){f()}}return!0}function OB(a,b){var c,d=b.priorityOverride,e=a.priorityOverride;c=d>e?1:d<e?-1:0;var f;if(c!==0)f=c;else{var g=a.Mk,h=b.Mk;f=g>h?1:g<h?-1:0}return f}
function NB(a,b){if(Ck){var c=function(d){var e=b.isBlocked(rf[d])?"3":"4",f=Gf(rf[d][Pe.Zj],b,[]);f&&f.length&&c(f[0].index);FB(b.id,rf[d],e);var g=Gf(rf[d][Pe.dk],b,[]);g&&g.length&&c(g[0].index)};c(a)}}var RB=!1,WA;function SB(){WA||(WA=new VA);return WA}
function TB(a){var b=a["gtm.uniqueEventId"],c=a["gtm.priorityId"],d=a.event;if(H(108)){}if(d==="gtm.js"){if(RB)return!1;RB=!0}var e=!1,f=FA(),g=Xc(a,null);if(!f.every(function(t){return t({originalEventData:g})})){if(d!=="gtm.js"&&d!=="gtm.init"&&d!=="gtm.init_consent")return!1;e=!0}uB(b,d);var h=a.eventCallback,m=
a.eventTimeout,n={id:b,priorityId:c,name:d,isBlocked:UB(g,e),io:[],logMacroError:function(){O(6);xn(0)},cachedModelValues:VB(),yc:new $A(function(){if(H(108)){}h&&h.apply(h,Array.prototype.slice.call(arguments,0))},m),
originalEventData:g};H(119)&&Ck&&(n.reportMacroDiscrepancy=zB);H(108)&&Ez(n.id);var p=Mf(n);H(108)&&Fz(n.id);e&&(p=WB(p));H(108)&&Dz(b);var q=PB(p,n),r=QB(a,n.yc);eB(n.yc);d!=="gtm.js"&&d!=="gtm.sync"||kB();return XB(p,q)||r}function VB(){var a={};a.event=Wj("event",1);a.ecommerce=Wj("ecommerce",1);a.gtm=Wj("gtm");a.eventModel=Wj("eventModel");return a}
function UB(a,b){var c=MA();return function(d){if(c(d))return!0;var e=d&&d[Pe.za];if(!e||typeof e!=="string")return!0;e=e.replace(/^_*/,"");var f,g=dm();f=DA().getRestrictions(0,g);var h=a;b&&(h=Xc(a,null),h["gtm.uniqueEventId"]=Number.MAX_SAFE_INTEGER);for(var m=Hj[e]||[],n=l(f),p=n.next();!p.done;p=n.next()){var q=p.value;try{if(!q({entityId:e,securityGroups:m,originalEventData:h}))return!0}catch(r){return!0}}return!1}}
function WB(a){for(var b=[],c=0;c<a.length;c++)if(a[c]){var d=String(rf[c][Pe.za]);if(sj[d]||rf[c][Pe.im]!==void 0||BA(d,2))b[c]=!0}return b}function XB(a,b){if(!b)return b;for(var c=0;c<a.length;c++)if(a[c]&&rf[c]&&!tj[String(rf[c][Pe.za])])return!0;return!1};function YB(){SB().addListener("gtm.init",function(a,b){oj.R=!0;hn();b()})};var ZB=!1,$B=0,aC=[];function bC(a){if(!ZB){var b=A.createEventObject,c=A.readyState==="complete",d=A.readyState==="interactive";if(!a||a.type!=="readystatechange"||c||!b&&d){ZB=!0;for(var e=0;e<aC.length;e++)D(aC[e])}aC.push=function(){for(var f=wa.apply(0,arguments),g=0;g<f.length;g++)D(f[g]);return 0}}}function cC(){if(!ZB&&$B<140){$B++;try{var a,b;(b=(a=A.documentElement).doScroll)==null||b.call(a,"left");bC()}catch(c){z.setTimeout(cC,50)}}}
function dC(){ZB=!1;$B=0;if(A.readyState==="interactive"&&!A.createEventObject||A.readyState==="complete")bC();else{wc(A,"DOMContentLoaded",bC);wc(A,"readystatechange",bC);if(A.createEventObject&&A.documentElement.doScroll){var a=!0;try{a=!z.frameElement}catch(b){}a&&cC()}wc(z,"load",bC)}}function eC(a){ZB?a():aC.push(a)};var fC=0;var gC={},hC={};function iC(a,b){for(var c=[],d=[],e={},f=0;f<a.length;e={si:void 0,Xh:void 0},f++){var g=a[f];if(g.indexOf("-")>=0){if(e.si=So(g,b),e.si){var h=Ul?Ul:am();eb(h,function(r){return function(t){return r.si.destinationId===t}}(e))?c.push(g):d.push(g)}}else{var m=gC[g]||[];e.Xh={};m.forEach(function(r){return function(t){r.Xh[t]=!0}}(e));for(var n=Xl(),p=0;p<n.length;p++)if(e.Xh[n[p]]){c=c.concat($l());break}var q=hC[g]||[];q.length&&(c=c.concat(q))}}return{En:c,In:d}}
function jC(a){ib(gC,function(b,c){var d=c.indexOf(a);d>=0&&c.splice(d,1)})}function kC(a){ib(hC,function(b,c){var d=c.indexOf(a);d>=0&&c.splice(d,1)})};var lC=!1,mC=!1;function nC(a,b){var c={},d=(c.event=a,c);b&&(d.eventModel=Xc(b,null),b[N.m.oe]&&(d.eventCallback=b[N.m.oe]),b[N.m.Uf]&&(d.eventTimeout=b[N.m.Uf]));return d}function oC(a,b){a.hasOwnProperty("gtm.uniqueEventId")||Object.defineProperty(a,"gtm.uniqueEventId",{value:No()});b.eventId=a["gtm.uniqueEventId"];b.priorityId=a["gtm.priorityId"];return{eventId:b.eventId,priorityId:b.priorityId}}
function pC(a,b){var c=a&&a[N.m.Oc];c===void 0&&(c=Rj(N.m.Oc,2),c===void 0&&(c="default"));if(ab(c)||Array.isArray(c)){var d;d=b.isGtmEvent?ab(c)?[c]:c:c.toString().replace(/\s+/g,"").split(",");var e=iC(d,b.isGtmEvent),f=e.En,g=e.In;if(g.length)for(var h=qC(a),m=0;m<g.length;m++){var n=So(g[m],b.isGtmEvent);if(n){var p=n.destinationId,q;if(!(q=ub(p,"siloed_"))){var r=n.destinationId,t=Pl().destination[r];q=!!t&&t.state===0}q||UA(p,h,{source:3,fromContainerExecution:b.fromContainerExecution})}}return To(f,
b.isGtmEvent)}}var rC=void 0,sC=void 0;function tC(a,b,c){var d=Xc(a,null);d.eventId=void 0;d.inheritParentConfig=void 0;Object.keys(b).some(function(f){return b[f]!==void 0})&&O(136);var e=Xc(b,null);Xc(c,e);Mv(Iv(Xl()[0],e),a.eventId,d)}function qC(a){for(var b=l([N.m.Pc,N.m.Xb]),c=b.next();!c.done;c=b.next()){var d=c.value,e=a&&a[d]||Yp.C[d];if(e)return e}}
var uC={config:function(a,b){var c=oC(a,b);if(!(a.length<2)&&ab(a[1])){var d={};if(a.length>2){if(a[2]!==void 0&&!Wc(a[2])||a.length>3)return;d=a[2]}var e=So(a[1],b.isGtmEvent);if(e){var f,g,h;a:{if(!Sl.Le){var m=fm(gm());if(sm(m)){var n=m.parent,p=n.isDestination;h={Mn:fm(n),Dn:p};break a}}h=void 0}var q=h;q&&(f=q.Mn,g=q.Dn);uB(c.eventId,"gtag.config");var r=e.destinationId,t=e.id!==r;if(t?$l().indexOf(r)===-1:Xl().indexOf(r)===-1){if(!b.inheritParentConfig&&!d[N.m.sc]){var u=qC(d);if(t)UA(r,u,{source:2,
fromContainerExecution:b.fromContainerExecution});else if(f!==void 0&&f.containers.indexOf(r)!==-1){var v=d;rC?tC(b,v,rC):sC||(sC=Xc(v,null))}else QA(r,u,!0,{source:2,fromContainerExecution:b.fromContainerExecution})}}else{if(f&&(O(128),g&&O(130),b.inheritParentConfig)){var w;var x=d;sC?(tC(b,sC,x),w=!1):(!x[N.m.Rc]&&vj&&rC||(rC=Xc(x,null)),w=!0);w&&f.containers&&f.containers.join(",");return}Dk&&(fC===1&&(an.mcc=!1),fC=2);if(vj&&!t&&!d[N.m.Rc]){var y=mC;mC=!0;if(y)return}lC||O(43);if(!b.noTargetGroup)if(t){kC(e.id);
var B=e.id,C=d[N.m.Xf]||"default";C=String(C).split(",");for(var E=0;E<C.length;E++){var F=hC[C[E]]||[];hC[C[E]]=F;F.indexOf(B)<0&&F.push(B)}}else{jC(e.id);var K=e.id,L=d[N.m.Xf]||"default";L=L.toString().split(",");for(var U=0;U<L.length;U++){var J=gC[L[U]]||[];gC[L[U]]=J;J.indexOf(K)<0&&J.push(K)}}delete d[N.m.Xf];var Z=b.eventMetadata||{};Z.hasOwnProperty("is_external_event")||(Z.is_external_event=!b.fromContainerExecution);b.eventMetadata=Z;delete d[N.m.oe];for(var Y=t?[e.id]:$l(),ha=0;ha<Y.length;ha++){var S=
d,Q=Y[ha],ja=Xc(b,null),ia=So(Q,ja.isGtmEvent);ia&&Yp.push("config",[S],ia,ja)}}}}},consent:function(a,b){if(a.length===3){O(39);var c=oC(a,b),d=a[1],e;if(H(137)){var f={},g=kv(a[2]),h;for(h in g)if(g.hasOwnProperty(h)){var m=g[h];f[h]=h===N.m.Cf?Array.isArray(m)?NaN:Number(m):h===N.m.Mb?(Array.isArray(m)?m:[m]).map(lv):mv(m)}e=f}else e=a[2];var n=e;b.fromContainerExecution||(n[N.m.U]&&O(139),n[N.m.Ca]&&O(140));d==="default"?uo(n):d==="update"?wo(n,c):d==="declare"&&b.fromContainerExecution&&to(n)}},
event:function(a,b){var c=a[1];if(!(a.length<2)&&ab(c)){var d=void 0;if(a.length>2){if(!Wc(a[2])&&a[2]!==void 0||a.length>3)return;d=a[2]}var e=nC(c,d),f=oC(a,b),g=f.eventId,h=f.priorityId;e["gtm.uniqueEventId"]=g;h&&(e["gtm.priorityId"]=h);if(c==="optimize.callback")return e.eventModel=e.eventModel||{},e;var m=pC(d,b);if(m){uB(g,c);var n=m.map(function(E){return E.id}),p=m.map(function(E){return E.destinationId}),q=n;if(!Tl&&H(107)){q=n.slice();for(var r=l(Ul?Ul:am()),t=r.next();!t.done;t=r.next()){var u=
t.value;!ub(u,"siloed_")&&p.indexOf(u)<0&&q.push(u)}}for(var v=l(q),w=v.next();!w.done;w=v.next()){var x=w.value,y=Xc(b,null),B=Xc(d,null);delete B[N.m.oe];var C=y.eventMetadata||{};C.hasOwnProperty("is_external_event")||(C.is_external_event=!y.fromContainerExecution);C.send_to_targets=n.slice();C.send_to_destinations=p.slice();y.eventMetadata=C;Zp(c,B,x,y);Dk&&C.source_canonical_id===void 0&&fC===0&&(dn("mcc","1"),fC=1)}e.eventModel=e.eventModel||{};n.length>0?e.eventModel[N.m.Oc]=n.join(","):delete e.eventModel[N.m.Oc];
lC||O(43);b.noGtmEvent===void 0&&b.eventMetadata&&b.eventMetadata.syn_or_mod&&(b.noGtmEvent=!0);e.eventModel[N.m.rc]&&(b.noGtmEvent=!0);return b.noGtmEvent?void 0:e}}},get:function(a,b){O(53);if(a.length===4&&ab(a[1])&&ab(a[2])&&$a(a[3])){var c=So(a[1],b.isGtmEvent),d=String(a[2]),e=a[3];if(c){lC||O(43);var f=qC();if(eb($l(),function(h){return c.destinationId===h})){oC(a,b);var g={};Xc((g[N.m.Ub]=d,g[N.m.oc]=e,g),null);$p(d,function(h){D(function(){e(h)})},c.id,b)}else UA(c.destinationId,f,{source:4,
fromContainerExecution:b.fromContainerExecution})}}},js:function(a,b){if(a.length===2&&a[1].getTime){lC=!0;var c=oC(a,b),d=c.eventId,e=c.priorityId,f={};return f.event="gtm.js",f["gtm.start"]=a[1].getTime(),f["gtm.uniqueEventId"]=d,f["gtm.priorityId"]=e,f}},policy:function(a){if(a.length===3&&ab(a[1])&&$a(a[2])){if(Sf(a[1],a[2]),O(74),a[1]==="all"){O(75);var b=!1;try{b=a[2](bm(),"unknown",{})}catch(c){}b||O(76)}}else O(73)},set:function(a,b){var c=void 0;a.length===2&&Wc(a[1])?c=Xc(a[1],null):a.length===
3&&ab(a[1])&&(c={},Wc(a[2])||Array.isArray(a[2])?c[a[1]]=Xc(a[2],null):c[a[1]]=a[2]);if(c){var d=oC(a,b),e=d.eventId,f=d.priorityId;Xc(c,null);var g=Xc(c,null);Yp.push("set",[g],void 0,b);c["gtm.uniqueEventId"]=e;f&&(c["gtm.priorityId"]=f);delete c.event;b.overwriteModelFields=!0;return c}}},vC={policy:!0};var xC=function(a){if(wC(a))return a;this.value=a};xC.prototype.getUntrustedMessageValue=function(){return this.value};var wC=function(a){return!a||Uc(a)!=="object"||Wc(a)?!1:"getUntrustedMessageValue"in a};xC.prototype.getUntrustedMessageValue=xC.prototype.getUntrustedMessageValue;var yC=!1,zC=[];function AC(){if(!yC){yC=!0;for(var a=0;a<zC.length;a++)D(zC[a])}}function BC(a){yC?D(a):zC.push(a)};var CC=0,DC={},EC=[],FC=[],GC=!1,HC=!1;function IC(a,b){return a.messageContext.eventId-b.messageContext.eventId||a.messageContext.priorityId-b.messageContext.priorityId}function JC(a,b,c){a.eventCallback=b;c&&(a.eventTimeout=c);return KC(a)}function LC(a,b){if(!bb(b)||b<0)b=0;var c=Io[rj.vb],d=0,e=!1,f=void 0;f=z.setTimeout(function(){e||(e=!0,a());f=void 0},b);return function(){var g=c?c.subscribers:1;++d===g&&(f&&(z.clearTimeout(f),f=void 0),e||(a(),e=!0))}}
function MC(a,b){var c=a._clear||b.overwriteModelFields;ib(a,function(e,f){e!=="_clear"&&(c&&Uj(e),Uj(e,f))});Ej||(Ej=a["gtm.start"]);var d=a["gtm.uniqueEventId"];if(!a.event)return!1;typeof d!=="number"&&(d=No(),a["gtm.uniqueEventId"]=d,Uj("gtm.uniqueEventId",d));return TB(a)}function NC(a){if(a==null||typeof a!=="object")return!1;if(a.event)return!0;if(jb(a)){var b=a[0];if(b==="config"||b==="event"||b==="js"||b==="get")return!0}return!1}
function OC(){var a;if(FC.length)a=FC.shift();else if(EC.length)a=EC.shift();else return;var b;var c=a;if(GC||!NC(c.message))b=c;else{GC=!0;var d=c.message["gtm.uniqueEventId"],e,f;typeof d==="number"?(e=d-2,f=d-1):(e=No(),f=No(),c.message["gtm.uniqueEventId"]=No());var g={},h={message:(g.event="gtm.init_consent",g["gtm.uniqueEventId"]=e,g),messageContext:{eventId:e}},m={},n={message:(m.event="gtm.init",m["gtm.uniqueEventId"]=f,m),messageContext:{eventId:f}};EC.unshift(n,c);b=h}return b}
function PC(){for(var a=!1,b;!HC&&(b=OC());){HC=!0;delete Oj.eventModel;Qj();var c=b,d=c.message,e=c.messageContext;if(d==null)HC=!1;else{e.fromContainerExecution&&Vj();try{if($a(d))try{d.call(Sj)}catch(u){}else if(Array.isArray(d)){if(ab(d[0])){var f=d[0].split("."),g=f.pop(),h=d.slice(1),m=Rj(f.join("."),2);if(m!=null)try{m[g].apply(m,h)}catch(u){}}}else{var n=void 0;if(jb(d))a:{if(d.length&&ab(d[0])){var p=uC[d[0]];if(p&&(!e.fromContainerExecution||!vC[d[0]])){n=p(d,e);break a}}n=void 0}else n=
d;n&&(a=MC(n,e)||a)}}finally{e.fromContainerExecution&&Qj(!0);var q=d["gtm.uniqueEventId"];if(typeof q==="number"){for(var r=DC[String(q)]||[],t=0;t<r.length;t++)FC.push(QC(r[t]));r.length&&FC.sort(IC);delete DC[String(q)];q>CC&&(CC=q)}HC=!1}}}return!a}
function RC(){if(H(108)){var a=!oj.N;}var c=PC();if(H(108)){}try{var e=bm(),f=z[rj.vb].hide;if(f&&f[e]!==void 0&&f.end){f[e]=
!1;var g=!0,h;for(h in f)if(f.hasOwnProperty(h)&&f[h]===!0){g=!1;break}g&&(f.end(),f.end=null)}}catch(m){}return c}function Pv(a){if(CC<a.notBeforeEventId){var b=String(a.notBeforeEventId);DC[b]=DC[b]||[];DC[b].push(a)}else FC.push(QC(a)),FC.sort(IC),D(function(){HC||PC()})}function QC(a){return{message:a.message,messageContext:a.messageContext}}
function SC(){function a(f){var g={};if(wC(f)){var h=f;f=wC(h)?h.getUntrustedMessageValue():void 0;g.fromContainerExecution=!0}return{message:f,messageContext:g}}var b=jc(rj.vb,[]),c=Mo();c.pruned===!0&&O(83);DC=Nv().get();Ov();eC(function(){if(!c.gtmDom){c.gtmDom=!0;var f={};b.push((f.event="gtm.dom",f))}});BC(function(){if(!c.gtmLoad){c.gtmLoad=!0;var f={};b.push((f.event="gtm.load",f))}});c.subscribers=(c.subscribers||0)+1;var d=b.push;b.push=function(){var f;if(Io.SANDBOXED_JS_SEMAPHORE>0){f=
[];for(var g=0;g<arguments.length;g++)f[g]=new xC(arguments[g])}else f=[].slice.call(arguments,0);var h=f.map(function(q){return a(q)});EC.push.apply(EC,h);var m=d.apply(b,f),n=Math.max(100,Number("1000")||300);if(this.length>n)for(O(4),c.pruned=!0;this.length>n;)this.shift();var p=typeof m!=="boolean"||m;return PC()&&p};var e=b.slice(0).map(function(f){return a(f)});EC.push.apply(EC,e);if(!oj.N){if(H(108)){}D(RC)}}var KC=function(a){return z[rj.vb].push(a)};function TC(a){KC(a)};function UC(){var a,b=lk(z.location.href);(a=b.hostname+b.pathname)&&dn("dl",encodeURIComponent(a));var c;var d=Vf.ctid;if(d){var e=Sl.Le?1:0,f,g=fm(gm());f=g&&g.context;c=d+";"+Vf.canonicalContainerId+";"+(f&&f.fromContainerExecution?1:0)+";"+(f&&f.source||0)+";"+e}else c=void 0;var h=c;h&&dn("tdp",h);var m=il(!0);m!==void 0&&dn("frm",String(m))};function VC(){H(55)&&Dk&&z.addEventListener("securitypolicyviolation",function(a){if(a.disposition==="enforce"){var b=Bl(a.effectiveDirective);if(b){var c;var d=zl(b,a.blockedURI);c=d?xl[b][d]:void 0;var e;if(e=c)a:{try{var f=new URL(a.blockedURI),g=f.pathname.indexOf(";");e=g>=0?f.origin+f.pathname.substring(0,g):f.origin+f.pathname;break a}catch(q){}e=void 0}if(e){for(var h=l(c),m=h.next();!m.done;m=h.next()){var n=m.value;if(!n.Fk){n.Fk=!0;var p=String(n.endpoint);jn.hasOwnProperty(p)||(jn[p]=
!0,dn("csp",Object.keys(jn).join("~")))}}Al(b,a.blockedURI)}}}})};function WC(){var a;var b=em();if(b)if(b.canonicalContainerId)a=b.canonicalContainerId;else{var c,d=b.scriptContainerId||((c=b.destinations)==null?void 0:c[0]);a=d?"_"+d:void 0}else a=void 0;var e=a;e&&dn("pcid",e)};var XC=/^(https?:)?\/\//;
function YC(){var a;var b=fm(gm());if(b){for(;b.parent;){var c=fm(b.parent);if(!c)break;b=c}a=b}else a=void 0;var d=a;if(d){var e;a:{var f,g=(f=d.scriptElement)==null?void 0:f.src;if(g){var h;try{var m;h=(m=Lc())==null?void 0:m.getEntriesByType("resource")}catch(u){}if(h){for(var n=-1,p=l(h),q=p.next();!q.done;q=p.next()){var r=q.value;if(r.initiatorType==="script"&&(n+=1,r.name.replace(XC,"")===g.replace(XC,""))){e=n;break a}}O(146)}else O(145)}e=void 0}var t=e;t!==void 0&&(d.canonicalContainerId&&
dn("rtg",String(d.canonicalContainerId)),dn("slo",String(t)),dn("hlo",d.htmlLoadOrder||"-1"),dn("lst",String(d.loadScriptType||"0")))}else O(144)};
function sD(){};var tD=function(){};tD.prototype.toString=function(){return"undefined"};var uD=new tD;function BD(a,b){function c(g){var h=lk(g),m=fk(h,"protocol"),n=fk(h,"host",!0),p=fk(h,"port"),q=fk(h,"path").toLowerCase().replace(/\/$/,"");if(m===void 0||m==="http"&&p==="80"||m==="https"&&p==="443")m="web",p="default";return[m,n,p,q]}for(var d=c(String(a)),e=c(String(b)),f=0;f<d.length;f++)if(d[f]!==e[f])return!1;return!0}
function CD(a){return DD(a)?1:0}
function DD(a){var b=a.arg0,c=a.arg1;if(a.any_of&&Array.isArray(c)){for(var d=0;d<c.length;d++){var e=Xc(a,{});Xc({arg1:c[d],any_of:void 0},e);if(CD(e))return!0}return!1}switch(a["function"]){case "_cn":return Dg(b,c);case "_css":var f;a:{if(b)try{for(var g=0;g<yg.length;g++){var h=yg[g];if(b[h]!=null){f=b[h](c);break a}}}catch(m){}f=!1}return f;case "_ew":return zg(b,c);case "_eq":return Eg(b,c);case "_ge":return Fg(b,c);case "_gt":return Hg(b,c);case "_lc":return Ag(b,c);case "_le":return Gg(b,
c);case "_lt":return Ig(b,c);case "_re":return Cg(b,c,a.ignore_case);case "_sw":return Jg(b,c);case "_um":return BD(b,c)}return!1};[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2].reduce(function(a,b){return a+b});var ED=function(a,b,c,d){nq.call(this);this.mg=b;this.Me=c;this.xc=d;this.ab=new Map;this.ng=0;this.ia=new Map;this.Da=new Map;this.R=void 0;this.H=a};qa(ED,nq);ED.prototype.N=function(){delete this.C;this.ab.clear();this.ia.clear();this.Da.clear();this.R&&(jq(this.H,"message",this.R),delete this.R);delete this.H;delete this.xc;nq.prototype.N.call(this)};
var FD=function(a){if(a.C)return a.C;a.Me&&a.Me(a.H)?a.C=a.H:a.C=hl(a.H,a.mg);var b;return(b=a.C)!=null?b:null},HD=function(a,b,c){if(FD(a))if(a.C===a.H){var d=a.ab.get(b);d&&d(a.C,c)}else{var e=a.ia.get(b);if(e&&e.ii){GD(a);var f=++a.ng;a.Da.set(f,{Eg:e.Eg,Jm:e.sk(c),persistent:b==="addEventListener"});a.C.postMessage(e.ii(c,f),"*")}}},GD=function(a){a.R||(a.R=function(b){try{var c;c=a.xc?a.xc(b):void 0;if(c){var d=c.Qn,e=a.Da.get(d);if(e){e.persistent||a.Da.delete(d);var f;(f=e.Eg)==null||f.call(e,
e.Jm,c.On)}}}catch(g){}},iq(a.H,"message",a.R))};var ID=function(a,b){var c=b.listener,d=(0,a.__gpp)("addEventListener",c);d&&c(d,!0)},JD=function(a,b){(0,a.__gpp)("removeEventListener",b.listener,b.listenerId)},KD={sk:function(a){return a.listener},ii:function(a,b){var c={};return c.__gppCall={callId:b,command:"addEventListener",version:"1.1"},c},Eg:function(a,b){var c=b.__gppReturn;a(c.returnValue,c.success)}},LD={sk:function(a){return a.listener},ii:function(a,b){var c={};return c.__gppCall={callId:b,command:"removeEventListener",version:"1.1",
parameter:a.listenerId},c},Eg:function(a,b){var c=b.__gppReturn,d=c.returnValue.data;a==null||a(d,c.success)}};function MD(a){var b={};typeof a.data==="string"?b=JSON.parse(a.data):b=a.data;return{On:b,Qn:b.__gppReturn.callId}}
var ND=function(a,b){var c;c=(b===void 0?{}:b).timeoutMs;nq.call(this);this.caller=new ED(a,"__gppLocator",function(d){return typeof d.__gpp==="function"},MD);this.caller.ab.set("addEventListener",ID);this.caller.ia.set("addEventListener",KD);this.caller.ab.set("removeEventListener",JD);this.caller.ia.set("removeEventListener",LD);this.timeoutMs=c!=null?c:500};qa(ND,nq);ND.prototype.N=function(){this.caller.dispose();nq.prototype.N.call(this)};
ND.prototype.addEventListener=function(a){var b=this,c=Zk(function(){a(OD,!0)}),d=this.timeoutMs===-1?void 0:setTimeout(function(){c()},this.timeoutMs);HD(this.caller,"addEventListener",{listener:function(e,f){clearTimeout(d);try{var g;var h;((h=e.pingData)==null?void 0:h.gppVersion)===void 0||e.pingData.gppVersion==="1"||e.pingData.gppVersion==="1.0"?(b.removeEventListener(e.listenerId),g={eventName:"signalStatus",data:"ready",pingData:{internalErrorState:1,gppString:"GPP_ERROR_STRING_IS_DEPRECATED_SPEC",
applicableSections:[-1]}}):Array.isArray(e.pingData.applicableSections)?g=e:(b.removeEventListener(e.listenerId),g={eventName:"signalStatus",data:"ready",pingData:{internalErrorState:2,gppString:"GPP_ERROR_STRING_EXPECTED_APPLICATION_SECTION_ARRAY",applicableSections:[-1]}});a(g,f)}catch(m){if(e==null?0:e.listenerId)try{b.removeEventListener(e.listenerId)}catch(n){a(PD,!0);return}a(QD,!0)}}})};
ND.prototype.removeEventListener=function(a){HD(this.caller,"removeEventListener",{listener:function(){},listenerId:a})};
var QD={eventName:"signalStatus",data:"ready",pingData:{internalErrorState:2,gppString:"GPP_ERROR_STRING_UNAVAILABLE",applicableSections:[-1]},listenerId:-1},OD={eventName:"signalStatus",data:"ready",pingData:{gppString:"GPP_ERROR_STRING_LISTENER_REGISTRATION_TIMEOUT",internalErrorState:2,applicableSections:[-1]},listenerId:-1},PD={eventName:"signalStatus",data:"ready",pingData:{gppString:"GPP_ERROR_STRING_REMOVE_EVENT_LISTENER_ERROR",internalErrorState:2,applicableSections:[-1]},listenerId:-1};function RD(a){var b;if(!(b=a.pingData.signalStatus==="ready")){var c=a.pingData.applicableSections;b=!c||c.length===1&&c[0]===-1}if(b){pu.gppString=a.pingData.gppString;var d=a.pingData.applicableSections.join(",");pu.C=d}}function SD(){try{if(H(105)){var a=new ND(z,{timeoutMs:-1});FD(a.caller)&&a.addEventListener(RD)}}catch(b){}};function TD(){var a;a=a===void 0?"":a;var b,c;return((b=data)==null?0:(c=b.blob)==null?0:c.hasOwnProperty(1))?String(data.blob[1]):a};function UD(){var a=[["cv",H(140)?TD():"1"],["rv",rj.xh],["tc",rf.filter(function(b){return b}).length]];rj.wh&&a.push(["x",rj.wh]);Jj()&&a.push(["tag_exp",Jj()]);return a};var VD={},WD={};function XD(a){var b=a.eventId,c=a.gd,d=[],e=VD[b]||[];e.length&&d.push(["hf",e.join(".")]);var f=WD[b]||[];f.length&&d.push(["ht",f.join(".")]);c&&(delete VD[b],delete WD[b]);return d};function YD(){return!1}function ZD(){var a={};return function(b,c,d){}};function $D(){var a=aE;return function(b,c,d){var e=d&&d.event;bE(c);var f=oh(b)?void 0:1,g=new Ma;ib(c,function(r,t){var u=md(t,void 0,f);u===void 0&&t!==void 0&&O(44);g.set(r,u)});a.C.C.H=Kf();var h={ik:Zf(b),eventId:e==null?void 0:e.id,priorityId:e!==void 0?e.priorityId:void 0,Se:e!==void 0?function(r){e.yc.Se(r)}:void 0,sb:function(){return b},log:function(){},Rm:{index:d==null?void 0:d.index,type:d==null?void 0:d.type,name:d==null?void 0:d.name},Yn:!!BA(b,3),originalEventData:e==null?void 0:
e.originalEventData};e&&e.cachedModelValues&&(h.cachedModelValues={gtm:e.cachedModelValues.gtm,ecommerce:e.cachedModelValues.ecommerce});if(YD()){var m=ZD(),n,p;h.fb={Ci:[],Te:{},Hb:function(r,t,u){t===1&&(n=r);t===7&&(p=u);m(r,t,u)},Dg:Gh()};h.log=function(r){var t=wa.apply(1,arguments);n&&m(n,4,{level:r,source:p,message:t})}}var q=
Je(a,h,[b,g]);a.C.C.H=void 0;q instanceof ya&&(q.type==="return"?q=q.data:q=void 0);return ld(q,void 0,f)}}function bE(a){var b=a.gtmOnSuccess,c=a.gtmOnFailure;$a(b)&&(a.gtmOnSuccess=function(){D(b)});$a(c)&&(a.gtmOnFailure=function(){D(c)})};function cE(a){}cE.K="internal.addAdsClickIds";function dE(a,b){var c=this;}dE.publicName="addConsentListener";var eE=!1;function fE(a){for(var b=0;b<a.length;++b)if(eE)try{a[b]()}catch(c){O(77)}else a[b]()}function gE(a,b,c){var d=this,e;return e}gE.K="internal.addDataLayerEventListener";function hE(a,b,c){}hE.publicName="addDocumentEventListener";function iE(a,b,c,d){}iE.publicName="addElementEventListener";function jE(a){return a.J.C};function kE(a){}kE.publicName="addEventCallback";
function AE(a){}AE.K="internal.addFormAbandonmentListener";function BE(a,b,c,d){}
BE.K="internal.addFormData";var CE={},DE=[],EE={},FE=0,GE=0;
function NE(a,b){}NE.K="internal.addFormInteractionListener";
function UE(a,b){}UE.K="internal.addFormSubmitListener";
function ZE(a){}ZE.K="internal.addGaSendListener";function $E(a){if(!a)return{};var b=a.Rm;return YA(b.type,b.index,b.name)}function aF(a){return a?{originatingEntity:$E(a)}:{}};
var cF=function(a,b,c){bF().updateZone(a,b,c)},eF=function(a,b,c,d,e,f){var g=bF();c=c&&tb(c,dF);for(var h=g.createZone(a,c),m=0;m<b.length;m++){var n=String(b[m]);if(g.registerChild(n,bm(),h)){var p=n,q=a,r=d,t=e,u=f;if(ub(p,"GTM-"))QA(p,void 0,!1,{source:1,fromContainerExecution:!0});else{var v=Hv("js",ob());QA(p,void 0,!0,{source:1,fromContainerExecution:!0});var w={originatingEntity:t,inheritParentConfig:u};H(146)||Mv(v,q,w);Mv(Iv(p,r),q,w)}}}return h},bF=function(){return Jo("zones",function(){return new fF})},
gF={zone:1,cn:1,css:1,ew:1,eq:1,ge:1,gt:1,lc:1,le:1,lt:1,re:1,sw:1,um:1},dF={cl:["ecl"],ecl:["cl"],ehl:["hl"],gaawc:["googtag"],hl:["ehl"]},fF=function(){this.C={};this.H={};this.N=0};k=fF.prototype;k.isActive=function(a,b){for(var c,d=0;d<a.length&&!(c=this.C[a[d]]);d++);if(!c)return!0;if(!this.isActive([c.ri],b))return!1;for(var e=0;e<c.Bf.length;e++)if(this.H[c.Bf[e]].Jd(b))return!0;return!1};k.getIsAllowedFn=function(a,b){if(!this.isActive(a,b))return function(){return!1};for(var c,d=0;d<a.length&&
!(c=this.C[a[d]]);d++);if(!c)return function(){return!0};for(var e=[],f=0;f<c.Bf.length;f++){var g=this.H[c.Bf[f]];g.Jd(b)&&e.push(g)}if(!e.length)return function(){return!1};var h=this.getIsAllowedFn([c.ri],b);return function(m,n){n=n||[];if(!h(m,n))return!1;for(var p=0;p<e.length;++p)if(e[p].N(m,n))return!0;return!1}};k.unregisterChild=function(a){for(var b=0;b<a.length;b++)delete this.C[a[b]]};k.createZone=function(a,b){var c=String(++this.N);this.H[c]=new hF(a,b);return c};k.updateZone=function(a,
b,c){var d=this.H[a];d&&d.O(b,c)};k.registerChild=function(a,b,c){var d=this.C[a];if(!d&&Io[a]||!d&&mm(a)||d&&d.ri!==b)return!1;if(d)return d.Bf.push(c),!1;this.C[a]={ri:b,Bf:[c]};return!0};var hF=function(a,b){this.H=null;this.C=[{eventId:a,Jd:!0}];if(b){this.H={};for(var c=0;c<b.length;c++)this.H[b[c]]=!0}};hF.prototype.O=function(a,b){var c=this.C[this.C.length-1];a<=c.eventId||c.Jd!==b&&this.C.push({eventId:a,Jd:b})};hF.prototype.Jd=function(a){for(var b=this.C.length-1;b>=0;b--)if(this.C[b].eventId<=
a)return this.C[b].Jd;return!1};hF.prototype.N=function(a,b){b=b||[];if(!this.H||gF[a]||this.H[a])return!0;for(var c=0;c<b.length;++c)if(this.H[b[c]])return!0;return!1};function iF(a){var b=Io.zones;return b?b.getIsAllowedFn(Xl(),a):function(){return!0}}function jF(){var a=Io.zones;a&&a.unregisterChild(Xl())}
function kF(){EA(dm(),function(a){var b=a.originalEventData["gtm.uniqueEventId"],c=Io.zones;return c?c.isActive(Xl(),b):!0});CA(dm(),function(a){var b,c;b=a.entityId;c=a.securityGroups;return iF(Number(a.originalEventData["gtm.uniqueEventId"]))(b,c)})};var lF=function(a,b){this.tagId=a;this.Ve=b};
function mF(a,b){var c=this,d=void 0;
return d}mF.K="internal.loadGoogleTag";function nF(a){return new dd("",function(b){var c=this.evaluate(b);if(c instanceof dd)return new dd("",function(){var d=wa.apply(0,arguments),e=this,f=Xc(jE(this),null);f.eventId=a.eventId;f.priorityId=a.priorityId;f.originalEventData=a.originalEventData;var g=d.map(function(m){return e.evaluate(m)}),h=Fa(this.J);h.C=f;return c.kb.apply(c,[h].concat(sa(g)))})})};function oF(a,b,c){var d=this;}oF.K="internal.addGoogleTagRestriction";var pF={},qF=[];
function xF(a,b){}
xF.K="internal.addHistoryChangeListener";function yF(a,b,c){}yF.publicName="addWindowEventListener";function zF(a,b){return!0}zF.publicName="aliasInWindow";function AF(a,b,c){}AF.K="internal.appendRemoteConfigParameter";function BF(a){var b;return b}
BF.publicName="callInWindow";function CF(a){}CF.publicName="callLater";function DF(a){}DF.K="callOnDomReady";function EF(a){}EF.K="callOnWindowLoad";function FF(a,b){var c;return c}FF.K="internal.computeGtmParameter";function GF(a,b){var c=this;}GF.K="internal.consentScheduleFirstTry";function HF(a,b){var c=this;}HF.K="internal.consentScheduleRetry";function IF(a){var b;return b}IF.K="internal.copyFromCrossContainerData";function JF(a,b){var c;var d=md(c,this.J,oh(jE(this).sb())?2:1);d===void 0&&c!==void 0&&O(45);return d}JF.publicName="copyFromDataLayer";
function KF(a){var b=void 0;return b}KF.K="internal.copyFromDataLayerCache";function LF(a){var b;return b}LF.publicName="copyFromWindow";function MF(a){var b=void 0;return md(b,this.J,1)}MF.K="internal.copyKeyFromWindow";var NF=function(a){this.C=a},OF=function(a,b,c,d){var e;return(e=a.C[b])!=null&&e[c]?a.C[b][c].some(function(f){return f(d)}):!1},PF=function(a){return a===wm.V.wa&&Pm[a]===vm.Aa.Cd&&!yo(N.m.T)};var QF=function(){return"0"},RF=function(a){if(typeof a!=="string")return"";var b=["gclid","dclid","wbraid","_gl"];H(102)&&b.push("gbraid");return mk(a,b,"0")};var SF={},TF={},UF={},VF={},WF={},XF={},YF={},ZF={},$F={},aG={},bG={},cG={},dG={},eG={},fG={},gG={},hG={},iG={},jG={},kG={},lG={},mG={},nG={},oG={},pG={},qG={},rG=(qG[N.m.Ha]=(SF[2]=[PF],SF),qG[N.m.ze]=(TF[2]=[PF],TF),qG[N.m.pe]=(UF[2]=[PF],UF),qG[N.m.kh]=(VF[2]=[PF],VF),qG[N.m.lh]=(WF[2]=[PF],WF),qG[N.m.mh]=(XF[2]=[PF],XF),qG[N.m.nh]=(YF[2]=[PF],YF),qG[N.m.oh]=(ZF[2]=[PF],ZF),qG[N.m.Cb]=($F[2]=[PF],$F),qG[N.m.Be]=(aG[2]=[PF],aG),qG[N.m.Ce]=(bG[2]=[PF],bG),qG[N.m.De]=(cG[2]=[PF],cG),qG[N.m.Ee]=(dG[2]=
[PF],dG),qG[N.m.Fe]=(eG[2]=[PF],eG),qG[N.m.Ge]=(fG[2]=[PF],fG),qG[N.m.He]=(gG[2]=[PF],gG),qG[N.m.Ie]=(hG[2]=[PF],hG),qG[N.m.Wa]=(iG[1]=[PF],iG),qG[N.m.Ec]=(jG[1]=[PF],jG),qG[N.m.Ic]=(kG[1]=[PF],kG),qG[N.m.rd]=(lG[1]=[PF],lG),qG[N.m.Yd]=(mG[1]=[function(a){return H(102)&&PF(a)}],mG),qG[N.m.Jc]=(nG[1]=[PF],nG),qG[N.m.ra]=(oG[1]=[PF],oG),qG[N.m.Ka]=(pG[1]=[PF],pG),qG),sG={},tG=(sG[N.m.Wa]=QF,sG[N.m.Ec]=QF,sG[N.m.Ic]=QF,sG[N.m.rd]=QF,sG[N.m.Yd]=QF,sG[N.m.Jc]=function(a){if(!Wc(a))return{};var b=Xc(a,
null);delete b.match_id;return b},sG[N.m.ra]=RF,sG[N.m.Ka]=RF,sG),uG={},vG={},wG=(vG.user_data=(uG[2]=[PF],uG),vG),xG={};var yG=function(a,b){this.conditions=a;this.C=b},zG=function(a,b,c,d){return OF(a.conditions,b,2,d)?{status:2}:OF(a.conditions,b,1,d)?a.C[b]===void 0?{status:2}:{status:1,value:a.C[b](c,d)}:{status:0,value:c}},AG=new yG(new NF(rG),tG),BG=new yG(new NF(wG),xG);function CG(a,b,c){return zG(AG,a,b,c)}function DG(a,b,c){return zG(BG,a,b,c)}var EG=function(a,b,c,d){this.C=a;this.N=b;this.O=c;this.R=d};
EG.prototype.getValue=function(a){a=a===void 0?wm.V.qb:a;if(!this.N.some(function(b){return b(a)}))return this.O.some(function(b){return b(a)})?this.R(this.C):this.C};EG.prototype.H=function(){return Uc(this.C)==="array"||Wc(this.C)?Xc(this.C,null):this.C};var FG=function(){},GG=function(a,b){this.conditions=a;this.C=b},HG=function(a,b,c){var d,e=((d=a.conditions[b])==null?void 0:d[2])||[],f,g=((f=a.conditions[b])==null?void 0:f[1])||[];return new EG(c,e,g,a.C[b]||FG)},IG,JG;function KG(a,b,c,d,e){if(b===void 0)c[a]=b;else{var f=d(a,b,e);f.status===2?delete c[a]:c[a]=f.value}}
var LG=function(a,b,c){this.eventName=b;this.D=c;this.C={};this.isAborted=!1;this.target=a;if(H(57)){this.metadata={};for(var d=c.eventMetadata||{},e=l(Object.keys(d)),f=e.next();!f.done;f=e.next()){var g=f.value;T(this,g,d[g])}}else this.metadata=Xc(c.eventMetadata||{},{})},Fu=function(a,b){if(H(57)){var c,d;return(c=a.C[b])==null?void 0:(d=c.getValue)==null?void 0:d.call(c,R(a,"transmission_type"))}return a.C[b]},V=function(a,b,c){if(H(57)){var d=a.C,e;c===void 0?e=void 0:(IG!=null||(IG=new GG(rG,
tG)),e=HG(IG,b,c));d[b]=e}else KG(b,c,a.C,CG,R(a,"transmission_type"))},MG=function(a,b){b=b===void 0?{}:b;if(H(57)){for(var c=l(Object.keys(a.C)),d=c.next();!d.done;d=c.next()){var e=d.value,f=void 0,g=void 0,h=void 0;b[e]=(f=a.C[e])==null?void 0:(h=(g=f).H)==null?void 0:h.call(g)}return b}return Xc(a.C,b)};LG.prototype.copyToHitData=function(a,b,c){var d=P(this.D,a);d===void 0&&(d=b);if(d!==void 0&&c!==void 0&&ab(d)&&H(90))try{d=c(d)}catch(e){}d!==void 0&&V(this,a,d)};
var R=function(a,b){if(H(57)){var c=a.metadata[b];if(b==="transmission_type"){var d;return c==null?void 0:(d=c.H)==null?void 0:d.call(c)}var e;return c==null?void 0:(e=c.getValue)==null?void 0:e.call(c,R(a,"transmission_type"))}return a.metadata[b]},T=function(a,b,c){if(H(57)){var d=a.metadata,e;c===void 0?e=void 0:(JG!=null||(JG=new GG(wG,xG)),e=HG(JG,b,c));d[b]=e}else if(KG(b,c,a.metadata,DG,R(a,"transmission_type")),b==="transmission_type"){for(var f=l(Object.keys(a.metadata)),g=f.next();!g.done;g=
f.next()){var h=g.value;h!=="transmission_type"&&T(a,h,R(a,h))}for(var m=l(Object.keys(a.C)),n=m.next();!n.done;n=m.next()){var p=n.value;V(a,p,Fu(a,p))}}},NG=function(a,b){b=b===void 0?{}:b;if(H(57)){for(var c=l(Object.keys(a.metadata)),d=c.next();!d.done;d=c.next()){var e=d.value,f=void 0,g=void 0,h=void 0;b[e]=(f=a.metadata[e])==null?void 0:(h=(g=f).H)==null?void 0:h.call(g)}return b}return Xc(a.metadata,b)},Zu=function(a,b,c){var d=a.target.destinationId;Tl||(d=hm(d));var e=Tv(d);return e&&e[b]!==
void 0?e[b]:c};function OG(a,b){var c;return c}OG.K="internal.copyPreHit";function PG(a,b){var c=null;return md(c,this.J,2)}PG.publicName="createArgumentsQueue";function QG(a){return md(function(c){var d=gB();if(typeof c==="function")d(function(){c(function(f,g,h){var m=
gB(),n=m&&m.getByName&&m.getByName(f);return(new z.gaplugins.Linker(n)).decorate(g,h)})});else if(Array.isArray(c)){var e=String(c[0]).split(".");b[e.length===1?e[0]:e[1]]&&d.apply(null,c)}else if(c==="isLoaded")return!!d.loaded},this.J,1)}QG.K="internal.createGaCommandQueue";function RG(a){return md(function(){if(!$a(e.push))throw Error("Object at "+a+" in window is not an array.");e.push.apply(e,Array.prototype.slice.call(arguments,0))},this.J,
oh(jE(this).sb())?2:1)}RG.publicName="createQueue";function SG(a,b){var c=null;return c}SG.K="internal.createRegex";function TG(){var a={};return a};function UG(a){}UG.K="internal.declareConsentState";function VG(a){var b="";return b}VG.K="internal.decodeUrlHtmlEntities";function WG(a,b,c){var d;return d}WG.K="internal.decorateUrlWithGaCookies";function XG(){}XG.K="internal.deferCustomEvents";function YG(a){var b;return b}YG.K="internal.detectUserProvidedData";
function cH(a,b){return f}cH.K="internal.enableAutoEventOnClick";
function kH(a,b){return p}kH.K="internal.enableAutoEventOnElementVisibility";function lH(){}lH.K="internal.enableAutoEventOnError";var mH={},nH=[],oH={},pH=0,qH=0;
function wH(a,b){var c=this;return d}wH.K="internal.enableAutoEventOnFormInteraction";
function BH(a,b){var c=this;return f}BH.K="internal.enableAutoEventOnFormSubmit";
function GH(){var a=this;}GH.K="internal.enableAutoEventOnGaSend";var HH={},IH=[];
function PH(a,b){var c=this;return f}PH.K="internal.enableAutoEventOnHistoryChange";var QH=["http://","https://","javascript:","file://"];
function UH(a,b){var c=this;return h}UH.K="internal.enableAutoEventOnLinkClick";var VH,WH;
function gI(a,b){var c=this;return d}gI.K="internal.enableAutoEventOnScroll";function hI(a){return function(){if(a.limit&&a.li>=a.limit)a.Ag&&z.clearInterval(a.Ag);else{a.li++;var b=pb();KC({event:a.eventName,"gtm.timerId":a.Ag,"gtm.timerEventNumber":a.li,"gtm.timerInterval":a.interval,"gtm.timerLimit":a.limit,"gtm.timerStartTime":a.Lk,"gtm.timerCurrentTime":b,"gtm.timerElapsedTime":b-a.Lk,"gtm.triggers":a.no})}}}
function iI(a,b){
return f}iI.K="internal.enableAutoEventOnTimer";var $b=ua(["data-gtm-yt-inspected-"]),kI=["www.youtube.com","www.youtube-nocookie.com"],lI,mI=!1;
function wI(a,b){var c=this;return e}wI.K="internal.enableAutoEventOnYouTubeActivity";mI=!1;function xI(a,b){if(!$g(a)||!Ug(b))throw I(this.getName(),["string","Object|undefined"],arguments);var c=b?ld(b):{},d=a,e=!1;return e}xI.K="internal.evaluateBooleanExpression";var yI;function zI(a){var b=!1;return b}zI.K="internal.evaluateMatchingRules";function iJ(){return Hq(7)&&Hq(9)&&Hq(10)};
var mJ=function(a,b){if(!b.isGtmEvent){var c=P(b,N.m.Ub),d=P(b,N.m.oc),e=P(b,c);if(e===void 0){var f=void 0;jJ.hasOwnProperty(c)?f=jJ[c]:kJ.hasOwnProperty(c)&&(f=kJ[c]);f===1&&(f=lJ(c));ab(f)?gB()(function(){var g,h,m,n=(m=(g=gB())==null?void 0:(h=g.getByName)==null?void 0:h.call(g,a))==null?void 0:m.get(f);d(n)}):d(void 0)}else d(e)}},nJ=function(a,b){var c=a[N.m.uc],d=b+".",e=a[N.m.da]||"",f=c===void 0?!!a.use_anchor:c==="fragment",g=!!a[N.m.Vb];e=String(e).replace(/\s+/g,"").split(",");var h=gB();
h(d+"require","linker");h(d+"linker:autoLink",e,f,g)},rJ=function(a,b,c){if(!c.isGtmEvent||!oJ[a]){var d=!yo(N.m.Z),e=function(f){var g="gtm"+String(No()),h,m=gB(),n=pJ(b,"",c),p,q=n.createOnlyFields._useUp;if(c.isGtmEvent||qJ(b,n.createOnlyFields)){c.isGtmEvent&&(h=n.createOnlyFields,n.gtmTrackerName&&(h.name=g));m(function(){var t,u=m==null?void 0:(t=m.getByName)==null?void 0:t.call(m,b);u&&(p=u.get("clientId"));if(!c.isGtmEvent){var v;m==null||(v=m.remove)==null||v.call(m,b)}});m("create",a,c.isGtmEvent?
h:n.createOnlyFields);d&&yo(N.m.Z)&&(d=!1,m(function(){var t,u,v=(t=gB())==null?void 0:(u=t.getByName)==null?void 0:u.call(t,c.isGtmEvent?g:b);!v||v.get("clientId")==p&&q||(c.isGtmEvent?(n.fieldsToSet["&gcu"]="1",n.fieldsToSet["&sst.gcut"]=ai[f]):(n.fieldsToSend["&gcu"]="1",n.fieldsToSend["&sst.gcut"]=ai[f]),v.set(n.fieldsToSet),
c.isGtmEvent?v.send("pageview"):v.send("pageview",n.fieldsToSend))}));c.isGtmEvent&&m(function(){var t;m==null||(t=m.remove)==null||t.call(m,g)})}};Ao(function(){return void e(N.m.Z)},N.m.Z);Ao(function(){return void e(N.m.T)},N.m.T);Ao(function(){return void e(N.m.U)},N.m.U);c.isGtmEvent&&(oJ[a]=!0)}},sJ=function(a,b){sk()&&b&&(a[N.m.Tb]=b)},BJ=function(a,b,c){function d(){var Y=wa.apply(0,arguments);Y[0]=w?w+"."+Y[0]:""+Y[0];u.apply(window,Y)}function e(Y){function ha(Ia,Qa){for(var Aa=0;Qa&&Aa<
Qa.length;Aa++)d(Ia,Qa[Aa])}var S=c.isGtmEvent,Q=S?tJ(x):uJ(b,c);if(Q){var ja={};sJ(ja,Y);d("require","ec","ec.js",ja);S&&Q.Nh&&d("set","&cu",Q.Nh);var ia=Q.action;if(S||ia==="impressions")if(ha("ec:addImpression",Q.rk),!S)return;if(ia==="promo_click"||ia==="promo_view"||S&&Q.wf){var la=Q.wf;ha("ec:addPromo",la);if(la&&la.length>0&&ia==="promo_click"){S?d("ec:setAction",ia,Q.Eb):d("ec:setAction",ia);return}if(!S)return}ia!=="promo_view"&&ia!=="impressions"&&(ha("ec:addProduct",Q.ed),d("ec:setAction",
ia,Q.Eb))}}function f(Y){if(Y){var ha={};if(Wc(Y))for(var S in vJ)vJ.hasOwnProperty(S)&&wJ(vJ[S],S,Y[S],ha);sJ(ha,C);d("require","linkid",ha)}}function g(){if(Yq()){}else{var Y=P(c,N.m.Ol);Y&&(d("require",Y,{dataLayer:rj.vb}),d("require","render"))}}function h(){var Y=P(c,N.m.ke);u(function(){if(!c.isGtmEvent&&Wc(Y)){var ha=x.fieldsToSend,S,Q,ja=(S=v())==null?void 0:(Q=S.getByName)==null?void 0:Q.call(S,w),ia;for(ia in Y)if(Y[ia]!=
null&&/^(dimension|metric)\d+$/.test(ia)){var la=void 0,Ia=(la=ja)==null?void 0:la.get(lJ(Y[ia]));xJ(ha,ia,Ia)}}})}function m(Y,ha,S){S&&(ha=String(ha));x.fieldsToSend[Y]=ha}function n(){if(x.displayfeatures){var Y="_dc_gtm_"+p.replace(/[^A-Za-z0-9-]/g,"");d("require","displayfeatures",void 0,{cookieName:Y})}}var p=a;if(H(107)){var q=So(a),r=c.eventMetadata.send_to_destinations;if(q&&r&&r.indexOf(q.destinationId)<0)return}var t,u=c.isGtmEvent?jB(P(c,"gaFunctionName")):jB();if($a(u)){var v=gB,w;w=
c.isGtmEvent?P(c,"name")||P(c,"gtmTrackerName"):"gtag_"+p.split("-").join("_");var x=pJ(w,b,c);!c.isGtmEvent&&qJ(w,x.createOnlyFields)&&(u(function(){var Y,ha;v()&&((Y=v())==null||(ha=Y.remove)==null||ha.call(Y,w))}),yJ[w]=!1);u("create",p,x.createOnlyFields);var y=c.isGtmEvent&&x.fieldsToSet[N.m.Tb];if(!c.isGtmEvent&&x.createOnlyFields[N.m.Tb]||y){var B=rk(c.isGtmEvent?x.fieldsToSet[N.m.Tb]:x.createOnlyFields[N.m.Tb],"/analytics.js");B&&(t=B)}var C=c.isGtmEvent?x.fieldsToSet[N.m.Tb]:x.createOnlyFields[N.m.Tb];
if(C){var E=c.isGtmEvent?x.fieldsToSet[N.m.Vf]:x.createOnlyFields[N.m.Vf];E&&!yJ[w]&&(yJ[w]=!0,u(lB(w,E)))}c.isGtmEvent?x.enableRecaptcha&&d("require","recaptcha","recaptcha.js"):(h(),f(x.linkAttribution));var F=x[N.m.Ga];F&&F[N.m.da]&&nJ(F,w);d("set",x.fieldsToSet);if(c.isGtmEvent){if(x.enableLinkId){var K={};sJ(K,C);d("require","linkid","linkid.js",K)}rJ(p,w,c)}if(b===N.m.Dc)if(c.isGtmEvent){n();if(x.remarketingLists){var L="_dc_gtm_"+p.replace(/[^A-Za-z0-9-]/g,"");d("require","adfeatures",{cookieName:L})}e(C);
d("send","pageview");x.createOnlyFields._useUp&&iB(w+".")}else g(),d("send","pageview",x.fieldsToSend);else b===N.m.ka?(g(),sv(p,c),P(c,N.m.pb)&&(Kt(["aw","dc"]),iB(w+".")),Mt(["aw","dc"]),x.sendPageView!=0&&d("send","pageview",x.fieldsToSend),rJ(p,w,c)):b===N.m.mb?mJ(w,c):b==="screen_view"?d("send","screenview",x.fieldsToSend):b==="timing_complete"?(x.fieldsToSend.hitType="timing",m("timingCategory",x.eventCategory,!0),c.isGtmEvent?m("timingVar",x.timingVar,!0):m("timingVar",x.name,!0),m("timingValue",
kb(x.value)),x.eventLabel!==void 0&&m("timingLabel",x.eventLabel,!0),d("send",x.fieldsToSend)):b==="exception"?d("send","exception",x.fieldsToSend):b===""&&c.isGtmEvent||(b==="track_social"&&c.isGtmEvent?(x.fieldsToSend.hitType="social",m("socialNetwork",x.socialNetwork,!0),m("socialAction",x.socialAction,!0),m("socialTarget",x.socialTarget,!0)):((c.isGtmEvent||zJ[b])&&e(C),c.isGtmEvent&&n(),x.fieldsToSend.hitType="event",m("eventCategory",x.eventCategory,!0),m("eventAction",x.eventAction||b,!0),
x.eventLabel!==void 0&&m("eventLabel",x.eventLabel,!0),x.value!==void 0&&m("eventValue",kb(x.value))),d("send",x.fieldsToSend));var U=t&&!c.eventMetadata.suppress_script_load;if(!AJ&&(!c.isGtmEvent||U)){t=t||"https://www.google-analytics.com/analytics.js";AJ=!0;var J=function(){c.onFailure()},Z=function(){var Y;((Y=v())==null?0:Y.loaded)||J()};Yq()?D(Z):rc(t,Z,J)}}else D(c.onFailure)},CJ=function(a,b,c,d){Bo(function(){BJ(a,b,d)},[N.m.Z,N.m.T])},qJ=function(a,b){var c=DJ[a];DJ[a]=Xc(b,null);if(!c)return!1;
for(var d in b)if(b.hasOwnProperty(d)&&b[d]!==c[d])return!0;for(var e in c)if(c.hasOwnProperty(e)&&c[e]!==b[e])return!0;return!1},uJ=function(a,b){function c(u){return{id:d(N.m.La),affiliation:d(N.m.bj),revenue:d(N.m.ya),tax:d(N.m.Wg),shipping:d(N.m.ne),coupon:d(N.m.cj),list:d(N.m.Vg)||d(N.m.me)||u}}for(var d=function(u){return P(b,u)},e=d(N.m.la),f,g=0;e&&g<e.length&&!(f=e[g][N.m.Vg]||e[g][N.m.me]);g++);var h=d(N.m.ke);if(Wc(h))for(var m=0;e&&m<e.length;++m){var n=e[m],p;for(p in h)h.hasOwnProperty(p)&&
/^(dimension|metric)\d+$/.test(p)&&h[p]!=null&&xJ(n,p,n[h[p]])}var q=null,r=d(N.m.Gl);if(a===N.m.Va||a===N.m.ld)q={action:a,Eb:c(),ed:EJ(e)};else if(a===N.m.hd)q={action:"add",Eb:c(),ed:EJ(e)};else if(a===N.m.jd)q={action:"remove",Eb:c(),ed:EJ(e)};else if(a===N.m.hb)q={action:"detail",Eb:c(f),ed:EJ(e)};else if(a===N.m.Ob)q={action:"impressions",rk:EJ(e)};else if(a===N.m.Pb)q={action:"promo_view",wf:EJ(r)||EJ(e)};else if(a==="select_content"&&r&&r.length>0||a===N.m.mc)q={action:"promo_click",wf:EJ(r)||
EJ(e)};else if(a==="select_content"||a===N.m.kd)q={action:"click",Eb:{list:d(N.m.Vg)||d(N.m.me)||f},ed:EJ(e)};else if(a===N.m.Cc||a==="checkout_progress"){var t={step:a===N.m.Cc?1:d(N.m.Ug),option:d(N.m.Of)};q={action:"checkout",ed:EJ(e),Eb:Xc(c(),t)}}else a==="set_checkout_option"&&(q={action:"checkout_option",Eb:{step:d(N.m.Ug),option:d(N.m.Of)}});q&&(q.Nh=d(N.m.Ja));return q},tJ=function(a){var b=a.gtmEcommerceData;if(!b)return null;var c={};b.currencyCode&&(c.Nh=b.currencyCode);if(b.impressions){c.action=
"impressions";var d=b.impressions;c.rk=b.translateIfKeyEquals==="impressions"?EJ(d):d}if(b.promoView){c.action="promo_view";var e=b.promoView.promotions;c.wf=b.translateIfKeyEquals==="promoView"?EJ(e):e}if(b.promoClick){var f=b.promoClick;c.action="promo_click";var g=f.promotions;c.wf=b.translateIfKeyEquals==="promoClick"?EJ(g):g;c.Eb=f.actionField;return c}for(var h in b)if(b[h]!==void 0&&h!=="translateIfKeyEquals"&&h!=="impressions"&&h!=="promoView"&&h!=="promoClick"&&h!=="currencyCode"){c.action=
h;var m=b[h].products;c.ed=b.translateIfKeyEquals==="products"?EJ(m):m;c.Eb=b[h].actionField;break}return Object.keys(c).length?c:null},EJ=function(a){function b(e){function f(h,m){for(var n=0;n<m.length;n++){var p=m[n];if(e[p]){g[h]=e[p];break}}}var g=Xc(e,null);f("id",["id","item_id","promotion_id"]);f("name",["name","item_name","promotion_name"]);f("brand",["brand","item_brand"]);f("variant",["variant","item_variant"]);f("list",["list_name","item_list_name"]);f("position",["list_position","creative_slot",
"index"]);(function(){if(e.category)g.category=e.category;else{for(var h="",m=0;m<FJ.length;m++)e[FJ[m]]!==void 0&&(h&&(h+="/"),h+=e[FJ[m]]);h&&(g.category=h)}})();f("listPosition",["list_position"]);f("creative",["creative_name"]);f("list",["list_name"]);f("position",["list_position","creative_slot"]);return g}for(var c=[],d=0;a&&d<a.length;d++)a[d]&&Wc(a[d])&&c.push(b(a[d]));return c.length?c:void 0},pJ=function(a,b,c){var d=function(J){return P(c,J)},e={},f={},g={},h={},m=GJ(d(N.m.Ll));!c.isGtmEvent&&
m&&xJ(f,"exp",m);g["&gtm"]=$q({Ea:c.eventMetadata.source_canonical_id,pg:!0});c.isGtmEvent||(g._no_slc=!0);Jm()&&(h._cs=HJ);var n=d(N.m.ke);if(!c.isGtmEvent&&Wc(n))for(var p in n)if(n.hasOwnProperty(p)&&/^(dimension|metric)\d+$/.test(p)&&n[p]!=null){var q=d(String(n[p]));q!==void 0&&xJ(f,p,q)}for(var r=!c.isGtmEvent,t=np(c),u=0;u<t.length;++u){var v=t[u];if(c.isGtmEvent){var w=d(v);IJ.hasOwnProperty(v)?e[v]=w:JJ.hasOwnProperty(v)?h[v]=w:g[v]=w}else{var x=void 0;v!==N.m.oa?x=d(v):x=op(c,v);if(KJ.hasOwnProperty(v))wJ(KJ[v],
v,x,e);else if(LJ.hasOwnProperty(v))wJ(LJ[v],v,x,g);else if(kJ.hasOwnProperty(v))wJ(kJ[v],v,x,f);else if(jJ.hasOwnProperty(v))wJ(jJ[v],v,x,h);else if(/^(dimension|metric|content_group)\d+$/.test(v))wJ(1,v,x,f);else if(v===N.m.oa){if(!MJ){var y=yb(x);y&&(f["&did"]=y)}var B=void 0,C=void 0;b===N.m.ka?B=yb(op(c,v),"."):(B=yb(op(c,v,1),"."),C=yb(op(c,v,2),"."));B&&(f["&gdid"]=B);C&&(f["&edid"]=C)}else v===N.m.Ta&&t.indexOf(N.m.Hc)<0&&(h.cookieName=String(x)+"_ga");H(153)&&NJ[v]&&(c.N.hasOwnProperty(v)||
b===N.m.ka&&c.C.hasOwnProperty(v))&&(r=!1)}}H(153)&&r&&(f["&jsscut"]="1");d(N.m.Hf)!==!1&&d(N.m.nb)!==!1&&iJ()||(g.allowAdFeatures=!1);g.allowAdPersonalizationSignals=Mq(c);!c.isGtmEvent&&d(N.m.pb)&&(h._useUp=!0);if(c.isGtmEvent){h.name=h.name||e.gtmTrackerName;var E=g.hitCallback;g.hitCallback=function(){$a(E)&&E();c.onSuccess()}}else{xJ(h,"cookieDomain","auto");xJ(g,"forceSSL",!0);xJ(e,"eventCategory",YJ(b));ZJ[b]&&xJ(f,"nonInteraction",!0);b==="login"||b==="sign_up"||b==="share"?xJ(e,"eventLabel",
d(N.m.wj)):b==="search"||b==="view_search_results"?xJ(e,"eventLabel",d(N.m.Ul)):b==="select_content"&&xJ(e,"eventLabel",d(N.m.Dl));var F=e[N.m.Ga]||{},K=F[N.m.yd];K||K!=0&&F[N.m.da]?h.allowLinker=!0:K===!1&&xJ(h,"useAmpClientId",!1);f.hitCallback=c.onSuccess;h.name=a}Nq()&&(g["&gcs"]=Oq());g["&gcd"]=Sq(c);Jm()&&(yo(N.m.Z)||(h.storage="none"),yo([N.m.T,N.m.U])||(g.allowAdFeatures=!1,h.storeGac=!1));Vq()&&(g["&dma_cps"]=Tq());g["&dma"]=Uq();rq(zq())&&(g["&tcfd"]=Wq());Jj()&&(g["&tag_exp"]=Jj());var L=
tk(c)||d(N.m.Tb),U=d(N.m.Vf);L&&(c.isGtmEvent||(h[N.m.Tb]=L),h._cd2l=!0);U&&!c.isGtmEvent&&(h[N.m.Vf]=U);e.fieldsToSend=f;e.fieldsToSet=g;e.createOnlyFields=h;return e},HJ=function(a){return yo(a)},GJ=function(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d!=null){var e=d.id,f=d.variant;e!=null&&f!=null&&b.push(String(e)+"."+String(f))}}return b.length>0?b.join("!"):void 0}},xJ=function(a,b,c){a.hasOwnProperty(b)||(a[b]=c)},YJ=function(a){var b="general";$J[a]?b="ecommerce":
aK[a]?b="engagement":a==="exception"&&(b="error");return b},lJ=function(a){return a&&ab(a)?a.replace(/(_[a-z])/g,function(b){return b[1].toUpperCase()}):a},wJ=function(a,b,c,d){if(c!==void 0)if(bK[b]&&(c=lb(c)),b!=="anonymize_ip"||c||(c=void 0),a===1)d[lJ(b)]=c;else if(ab(a))d[a]=c;else for(var e in a)a.hasOwnProperty(e)&&c[e]!==void 0&&(d[a[e]]=c[e])},MJ=!1;var AJ=!1,yJ={},oJ={},cK={},NJ=(cK[N.m.xa]=
1,cK[N.m.nb]=1,cK[N.m.Xa]=1,cK[N.m.Ya]=1,cK[N.m.ib]=1,cK[N.m.Hc]=1,cK[N.m.yb]=1,cK[N.m.Ta]=1,cK[N.m.nc]=1,cK[N.m.yj]=1,cK[N.m.ra]=1,cK[N.m.we]=1,cK[N.m.Ka]=1,cK[N.m.ob]=1,cK),dK={},jJ=(dK.client_storage="storage",dK.sample_rate=1,dK.site_speed_sample_rate=1,dK.store_gac=1,dK.use_amp_client_id=1,dK[N.m.wb]=1,dK[N.m.Fa]="storeGac",dK[N.m.Xa]=1,dK[N.m.Ya]=1,dK[N.m.ib]=1,dK[N.m.Hc]=1,dK[N.m.yb]=1,dK[N.m.nc]=1,dK),eK={},JJ=(eK._cs=1,eK._useUp=1,eK.allowAnchor=1,eK.allowLinker=1,eK.alwaysSendReferrer=1,
eK.clientId=1,eK.cookieDomain=1,eK.cookieExpires=1,eK.cookieFlags=1,eK.cookieName=1,eK.cookiePath=1,eK.cookieUpdate=1,eK.legacyCookieDomain=1,eK.legacyHistoryImport=1,eK.name=1,eK.sampleRate=1,eK.siteSpeedSampleRate=1,eK.storage=1,eK.storeGac=1,eK.useAmpClientId=1,eK._cd2l=1,eK),LJ={anonymize_ip:1},fK={},kJ=(fK.campaign={content:"campaignContent",id:"campaignId",medium:"campaignMedium",name:"campaignName",source:"campaignSource",term:"campaignKeyword"},fK.app_id=1,fK.app_installer_id=1,fK.app_name=
1,fK.app_version=1,fK.description="exDescription",fK.fatal="exFatal",fK.language=1,fK.page_hostname="hostname",fK.transport_type="transport",fK[N.m.Ja]="currencyCode",fK[N.m.fg]=1,fK[N.m.ra]="location",fK[N.m.we]="page",fK[N.m.Ka]="referrer",fK[N.m.ob]="title",fK[N.m.fh]=1,fK[N.m.Ha]=1,fK),gK={},KJ=(gK.content_id=1,gK.event_action=1,gK.event_category=1,gK.event_label=1,gK.link_attribution=1,gK.name=1,gK[N.m.Ga]=1,gK[N.m.wj]=1,gK[N.m.Za]=1,gK[N.m.ya]=1,gK),IJ={displayfeatures:1,enableLinkId:1,enableRecaptcha:1,
eventAction:1,eventCategory:1,eventLabel:1,gaFunctionName:1,gtmEcommerceData:1,gtmTrackerName:1,linker:1,remarketingLists:1,socialAction:1,socialNetwork:1,socialTarget:1,timingVar:1,value:1},FJ=["item_category","item_category2","item_category3","item_category4","item_category5"],hK={},vJ=(hK.levels=1,hK[N.m.Ya]="duration",hK[N.m.Hc]=1,hK),iK={},bK=(iK.anonymize_ip=1,iK.fatal=1,iK.send_page_view=1,iK.store_gac=1,iK.use_amp_client_id=1,iK[N.m.Fa]=1,iK[N.m.fg]=1,iK),jK={},zJ=(jK.checkout_progress=1,
jK.select_content=1,jK.set_checkout_option=1,jK[N.m.hd]=1,jK[N.m.jd]=1,jK[N.m.Cc]=1,jK[N.m.kd]=1,jK[N.m.Ob]=1,jK[N.m.mc]=1,jK[N.m.Pb]=1,jK[N.m.Va]=1,jK[N.m.ld]=1,jK[N.m.hb]=1,jK),kK={},$J=(kK.checkout_progress=1,kK.set_checkout_option=1,kK[N.m.Ri]=1,kK[N.m.Si]=1,kK[N.m.hd]=1,kK[N.m.jd]=1,kK[N.m.Ti]=1,kK[N.m.Cc]=1,kK[N.m.Va]=1,kK[N.m.ld]=1,kK[N.m.Ui]=1,kK),lK={},aK=(lK.generate_lead=1,lK.login=1,lK.search=1,lK.select_content=1,lK.share=1,lK.sign_up=1,lK.view_search_results=1,lK[N.m.kd]=1,lK[N.m.Ob]=
1,lK[N.m.mc]=1,lK[N.m.Pb]=1,lK[N.m.hb]=1,lK),mK={},ZJ=(mK.view_search_results=1,mK[N.m.Ob]=1,mK[N.m.Pb]=1,mK[N.m.hb]=1,mK),DJ={};function nK(a,b,c,d){}nK.K="internal.executeEventProcessor";function oK(a){var b;return md(b,this.J,1)}oK.K="internal.executeJavascriptString";function pK(a){var b;return b};function qK(a){var b={};return md(b)}qK.K="internal.getAdsCookieWritingOptions";function rK(a,b){var c=!1;return c}rK.K="internal.getAllowAdPersonalization";function sK(a,b){b=b===void 0?!0:b;var c;return c}sK.K="internal.getAuid";var tK=null;
function uK(){var a=new Ma;return a}
uK.publicName="getContainerVersion";function vK(a,b){b=b===void 0?!0:b;var c;return c}vK.publicName="getCookieValues";function wK(){var a="";return a}wK.K="internal.getCorePlatformServicesParam";function xK(){return Nn()}xK.K="internal.getCountryCode";function yK(){var a=[];return md(a)}yK.K="internal.getDestinationIds";function zK(a){var b=new Ma;return b}zK.K="internal.getDeveloperIds";function AK(a,b){var c=null;return c}AK.K="internal.getElementAttribute";function BK(a){var b=null;return b}BK.K="internal.getElementById";function CK(a){var b="";return b}CK.K="internal.getElementInnerText";function DK(a,b){var c=null;return md(c)}DK.K="internal.getElementProperty";function EK(a){var b;return b}EK.K="internal.getElementValue";function FK(a){var b=0;return b}FK.K="internal.getElementVisibilityRatio";function GK(a){var b=null;return b}GK.K="internal.getElementsByCssSelector";
function HK(a){var b;if(!$g(a))throw I(this.getName(),["string"],arguments);M(this,"read_event_data",a);var c;a:{var d=a,e=jE(this).originalEventData;if(e){for(var f=e,g={},h={},m={},n=[],p=d.split("\\\\"),q=0;q<p.length;q++){for(var r=p[q].split("\\."),t=0;t<r.length;t++){for(var u=r[t].split("."),v=0;v<u.length;v++)n.push(u[v]),v!==u.length-1&&n.push(m);t!==r.length-1&&n.push(h)}q!==p.length-1&&n.push(g)}for(var w=[],x="",y=l(n),B=y.next();!B.done;B=
y.next()){var C=B.value;C===m?(w.push(x),x=""):x=C===g?x+"\\":C===h?x+".":x+C}x&&w.push(x);for(var E=l(w),F=E.next();!F.done;F=E.next()){if(f==null){c=void 0;break a}f=f[F.value]}c=f}else c=void 0}b=md(c,this.J,1);return b}HK.K="internal.getEventData";var IK={};IK.enableAWFledge=H(34);IK.enableAdsConversionValidation=H(18);IK.enableAdsSupernovaParams=H(30);IK.enableAutoPhoneAndAddressDetection=H(32);IK.enableAutoPiiOnPhoneAndAddress=H(33);IK.enableCachedEcommerceData=H(40);IK.enableCcdSendTo=H(41);IK.enableCloudRecommentationsErrorLogging=H(42);IK.enableCloudRecommentationsSchemaIngestion=H(43);IK.enableCloudRetailInjectPurchaseMetadata=H(45);IK.enableCloudRetailLogging=H(44);IK.enableCloudRetailPageCategories=H(46);IK.enableDCFledge=H(56);
IK.enableDataLayerSearchExperiment=H(128);IK.enableDecodeUri=H(90);IK.enableDeferAllEnhancedMeasurement=H(58);IK.enableFormSkipValidation=H(75);IK.enableGa4OutboundClicksFix=H(94);IK.enableGaAdsConversions=H(121);IK.enableGaAdsConversionsClientId=H(120);IK.enableGppForAds=H(105);IK.enableMerchantRenameForBasketData=H(112);IK.enableUrlDecodeEventUsage=H(139);IK.enableZoneConfigInChildContainers=H(142);IK.useEnableAutoEventOnFormApis=H(156);function JK(){return md(IK)}JK.K="internal.getFlags";function KK(){return new id(uD)}KK.K="internal.getHtmlId";function LK(a){var b;return b}LK.K="internal.getIframingState";function MK(a,b){var c={};return md(c)}MK.K="internal.getLinkerValueFromLocation";function NK(){var a=new Ma;return a}NK.K="internal.getPrivacyStrings";function OK(a,b){var c;return c}OK.K="internal.getProductSettingsParameter";function PK(a,b){var c;return c}PK.publicName="getQueryParameters";function QK(a,b){var c;return c}QK.publicName="getReferrerQueryParameters";function RK(a){var b="";return b}RK.publicName="getReferrerUrl";function SK(){return On()}SK.K="internal.getRegionCode";function TK(a,b){var c;return c}TK.K="internal.getRemoteConfigParameter";function UK(){var a=new Ma;a.set("width",0);a.set("height",0);return a}UK.K="internal.getScreenDimensions";function VK(){var a="";return a}VK.K="internal.getTopSameDomainUrl";function WK(){var a="";return a}WK.K="internal.getTopWindowUrl";function XK(a){var b="";return b}XK.publicName="getUrl";function YK(){M(this,"get_user_agent");return fc.userAgent}YK.K="internal.getUserAgent";function ZK(){var a;return a?md(Yx(a)):a}ZK.K="internal.getUserAgentClientHints";function gL(){return z.gaGlobal=z.gaGlobal||{}}function hL(){var a=gL();a.hid=a.hid||fb();return a.hid}function iL(a,b){var c=gL();if(c.vid===void 0||b&&!c.from_cookie)c.vid=a,c.from_cookie=b};function IL(a){(rx(a)||Lj())&&V(a,N.m.Hj,On()||Nn());!rx(a)&&Lj()&&V(a,N.m.Qj,"::")}function JL(a){if(H(78)&&Lj()){Tu(a);Uu(a,"cpf",nv(P(a.D,N.m.Ta)));var b=P(a.D,N.m.nc);Uu(a,"cu",b===!0?1:b===!1?0:void 0);Uu(a,"cf",nv(P(a.D,N.m.ib)));Uu(a,"cd",yr(mv(P(a.D,N.m.Xa)),mv(P(a.D,N.m.yb))))}};var eM={AW:yn.Tk,G:yn.Xl,DC:yn.Wl};function fM(a){var b=Gi(a);return""+ar(b.map(function(c){return c.value}).join("!"))}function gM(a){var b=So(a);return b&&eM[b.prefix]}function hM(a,b){var c=a[b];c&&(c.clearTimerId&&z.clearTimeout(c.clearTimerId),c.clearTimerId=z.setTimeout(function(){delete a[b]},36E5))};var NM=window,OM=document,PM=function(a){var b=NM._gaUserPrefs;if(b&&b.ioo&&b.ioo()||OM.documentElement.hasAttribute("data-google-analytics-opt-out")||a&&NM["ga-disable-"+a]===!0)return!0;try{var c=NM.external;if(c&&c._gaUserPrefs&&c._gaUserPrefs=="oo")return!0}catch(p){}for(var d=[],e=String(OM.cookie).split(";"),f=0;f<e.length;f++){var g=e[f].split("="),h=g[0].replace(/^\s*|\s*$/g,"");if(h&&h=="AMP_TOKEN"){var m;(m=g.slice(1).join("=").replace(/^\s*|\s*$/g,""))&&(m=decodeURIComponent(m));d.push(m)}}for(var n=
0;n<d.length;n++)if(d[n]=="$OPT_OUT")return!0;return OM.getElementById("__gaOptOutExtension")?!0:!1};function $M(a){ib(a,function(c){c.charAt(0)==="_"&&delete a[c]});var b=a[N.m.Db]||{};ib(b,function(c){c.charAt(0)==="_"&&delete b[c]})};function GN(a,b){}function HN(a,b){var c=function(){};return c}
function IN(a,b,c){};var JN=HN;var KN=function(a,b,c){for(var d=0;d<b.length;d++)a.hasOwnProperty(b[d])&&(a[String(b[d])]=c(a[String(b[d])]))};function LN(a,b,c){var d=this;}LN.K="internal.gtagConfig";
function NN(a,b){}
NN.publicName="gtagSet";function ON(){var a={};return a};function PN(a,b){}PN.publicName="injectHiddenIframe";var QN=function(){var a=0;return function(b){switch(b){case 1:a|=1;break;case 2:a|=2;break;case 3:a|=4}return a}}();
function RN(a,b,c,d,e){}RN.K="internal.injectHtml";var VN={};
function XN(a,b,c,d){}var YN={dl:1,id:1},ZN={};
function $N(a,b,c,d){}H(160)?$N.publicName="injectScript":XN.publicName="injectScript";$N.K="internal.injectScript";function aO(){return Sn()}aO.K="internal.isAutoPiiEligible";function bO(a){var b=!0;return b}bO.publicName="isConsentGranted";function cO(a){var b=!1;return b}cO.K="internal.isDebugMode";function dO(){return Qn()}dO.K="internal.isDmaRegion";function eO(a){var b=!1;return b}eO.K="internal.isEntityInfrastructure";function fO(){var a=!1;return a}fO.K="internal.isLandingPage";function gO(){var a=Bh(function(b){jE(this).log("error",b)});a.publicName="JSON";return a};function hO(a){var b=void 0;return md(b)}hO.K="internal.legacyParseUrl";function iO(){return!1}
var jO={getItem:function(a){var b=null;return b},setItem:function(a,b){return!1},removeItem:function(a){}};function kO(){}kO.publicName="logToConsole";function lO(a,b){}lO.K="internal.mergeRemoteConfig";function mO(a,b,c){c=c===void 0?!0:c;var d=[];return md(d)}mO.K="internal.parseCookieValuesFromString";function nO(a){var b=void 0;return b}nO.publicName="parseUrl";function oO(a){}oO.K="internal.processAsNewEvent";function pO(a,b,c){var d;return d}pO.K="internal.pushToDataLayer";function qO(a){var b=wa.apply(1,arguments),c=!1;return c}qO.publicName="queryPermission";function rO(a){var b=this;}rO.K="internal.queueAdsTransmission";function sO(){var a="";return a}sO.publicName="readCharacterSet";function tO(){return rj.vb}tO.K="internal.readDataLayerName";function uO(){var a="";return a}uO.publicName="readTitle";function vO(a,b){var c=this;}vO.K="internal.registerCcdCallback";function wO(a){
return!0}wO.K="internal.registerDestination";var xO=["config","event","get","set"];function yO(a,b,c){}yO.K="internal.registerGtagCommandListener";function zO(a,b){var c=!1;return c}zO.K="internal.removeDataLayerEventListener";function AO(a,b){}
AO.K="internal.removeFormData";function BO(){}BO.publicName="resetDataLayer";function CO(a,b,c){var d=void 0;return d}CO.K="internal.scrubUrlParams";function DO(a){}DO.K="internal.sendAdsHit";function EO(a,b,c,d){}EO.K="internal.sendGtagEvent";function FO(a,b,c){}FO.publicName="sendPixel";function GO(a,b){}GO.K="internal.setAnchorHref";function HO(a){}HO.K="internal.setContainerConsentDefaults";function IO(a,b,c,d){var e=this;d=d===void 0?!0:d;var f=!1;
return f}IO.publicName="setCookie";function JO(a){}JO.K="internal.setCorePlatformServices";function KO(a,b){}KO.K="internal.setDataLayerValue";function LO(a){}LO.publicName="setDefaultConsentState";function MO(a,b){}MO.K="internal.setDelegatedConsentType";function NO(a,b){}NO.K="internal.setFormAction";function OO(a,b,c){c=c===void 0?!1:c;}OO.K="internal.setInCrossContainerData";function PO(a,b,c){return!1}PO.publicName="setInWindow";function QO(a,b,c){}QO.K="internal.setProductSettingsParameter";function RO(a,b,c){}RO.K="internal.setRemoteConfigParameter";function SO(a,b){}SO.K="internal.setTransmissionMode";function TO(a,b,c,d){var e=this;}TO.publicName="sha256";function UO(a,b,c){}
UO.K="internal.sortRemoteConfigParameters";function VO(a,b){var c=void 0;return c}VO.K="internal.subscribeToCrossContainerData";var WO={},XO={};WO.getItem=function(a){var b=null;return b};WO.setItem=function(a,b){};
WO.removeItem=function(a){};WO.clear=function(){};WO.publicName="templateStorage";function YO(a,b){var c=!1;return c}YO.K="internal.testRegex";function ZO(a){var b;return b};function $O(a){var b;return b}$O.K="internal.unsiloId";function aP(a,b){var c;return c}aP.K="internal.unsubscribeFromCrossContainerData";function bP(a){}bP.publicName="updateConsentState";var cP;function dP(a,b,c){cP=cP||new Mh;cP.add(a,b,c)}function eP(a,b){var c=cP=cP||new Mh;if(c.C.hasOwnProperty(a))throw Error("Attempting to add a private function which already exists: "+a+".");if(c.contains(a))throw Error("Attempting to add a private function with an existing API name: "+a+".");c.C[a]=$a(b)?hh(a,b):ih(a,b)}
function fP(){return function(a){var b;var c=cP;if(c.contains(a))b=c.get(a,this);else{var d;if(d=c.C.hasOwnProperty(a)){var e=this.J.C;if(e){var f=!1,g=e.sb();if(g){oh(g)||(f=!0);}d=f}else d=!0}if(d){var h=c.C.hasOwnProperty(a)?c.C[a]:void 0;
b=h}else throw Error(a+" is not a valid API name.");}return b}};function gP(){var a=function(c){return void eP(c.K,c)},b=function(c){return void dP(c.publicName,c)};b(dE);b(kE);b(zF);b(BF);b(CF);b(JF);b(LF);b(PG);b(gO());b(RG);b(uK);b(vK);b(PK);b(QK);b(RK);b(XK);b(NN);b(PN);b(bO);b(kO);b(nO);b(qO);b(sO);b(uO);b(FO);b(IO);b(LO);b(PO);b(TO);b(WO);b(bP);dP("Math",mh());dP("Object",Kh);dP("TestHelper",Ph());dP("assertApi",jh);dP("assertThat",kh);dP("decodeUri",ph);dP("decodeUriComponent",qh);dP("encodeUri",rh);dP("encodeUriComponent",sh);dP("fail",xh);dP("generateRandom",
yh);dP("getTimestamp",zh);dP("getTimestampMillis",zh);dP("getType",Ah);dP("makeInteger",Ch);dP("makeNumber",Dh);dP("makeString",Eh);dP("makeTableMap",Fh);dP("mock",Ih);dP("mockObject",Jh);dP("fromBase64",pK,!("atob"in z));dP("localStorage",jO,!iO());dP("toBase64",ZO,!("btoa"in z));a(cE);a(gE);a(BE);a(NE);a(UE);a(ZE);a(oF);a(xF);a(AF);a(DF);a(EF);a(FF);a(GF);a(HF);a(IF);a(KF);a(MF);a(OG);a(QG);a(SG);a(UG);a(VG);a(WG);a(XG);a(YG);a(cH);a(kH);a(lH);a(wH);a(BH);a(GH);a(PH);a(UH);a(gI);a(iI);a(wI);a(xI);
a(zI);a(nK);a(oK);a(qK);a(rK);a(sK);a(xK);a(yK);a(zK);a(AK);a(BK);a(CK);a(DK);a(EK);a(FK);a(GK);a(HK);a(JK);a(KK);a(LK);a(MK);a(NK);a(OK);a(SK);a(TK);a(UK);a(VK);a(WK);a(ZK);a(LN);a(RN);a($N);a(aO);a(cO);a(dO);a(eO);a(fO);a(hO);a(mF);a(lO);a(mO);a(oO);a(pO);a(rO);a(tO);a(vO);a(wO);a(yO);a(zO);a(AO);a(Oh);a(CO);a(DO);a(EO);a(GO);a(HO);a(JO);a(KO);a(MO);a(NO);a(OO);a(QO);a(RO);a(SO);a(UO);a(VO);a(YO);a($O);a(aP);eP("internal.CrossContainerSchema",TG());eP("internal.IframingStateSchema",ON());H(103)&&a(wK);H(160)?b($N):b(XN);return fP()};var aE;
function hP(){var a=data.sandboxed_scripts,b=data.security_groups;a:{var c=data.runtime||[],d=data.runtime_lines;aE=new He;iP();nf=$D();var e=aE,f=gP(),g=new ed("require",f);g.Qa();e.C.C.set("require",g);for(var h=[],m=0;m<c.length;m++){var n=c[m];if(!Array.isArray(n)||n.length<3){if(n.length===0)continue;break a}d&&d[m]&&d[m].length&&Jf(n,d[m]);try{aE.execute(n),H(119)&&Ck&&n[0]===50&&h.push(n[1])}catch(r){}}H(119)&&(Af=h)}if(a&&a.length)for(var p=0;p<a.length;p++){var q=a[p].replace(/^_*/,"");Hj[q]=
["sandboxedScripts"]}jP(b)}function iP(){aE.C.C.N=function(a,b,c){Io.SANDBOXED_JS_SEMAPHORE=Io.SANDBOXED_JS_SEMAPHORE||0;Io.SANDBOXED_JS_SEMAPHORE++;try{return a.apply(b,c)}finally{Io.SANDBOXED_JS_SEMAPHORE--}}}function jP(a){a&&ib(a,function(b,c){for(var d=0;d<c.length;d++){var e=c[d].replace(/^_*/,"");Hj[e]=Hj[e]||[];Hj[e].push(b)}})};function kP(a){Mv(Gv("developer_id."+a,!0),0,{})};var lP=Array.isArray;function mP(a,b){return Xc(a,b||null)}function W(a){return window.encodeURIComponent(a)}function nP(a,b,c){vc(a,b,c)}function oP(a,b){if(!a)return!1;var c=fk(lk(a),"host");if(!c)return!1;for(var d=0;b&&d<b.length;d++){var e=b[d]&&b[d].toLowerCase();if(e){var f=c.length-e.length;f>0&&e.charAt(0)!=="."&&(f--,e="."+e);if(f>=0&&c.indexOf(e,f)===f)return!0}}return!1}
function pP(a,b,c){for(var d={},e=!1,f=0;a&&f<a.length;f++)a[f]&&a[f].hasOwnProperty(b)&&a[f].hasOwnProperty(c)&&(d[a[f][b]]=a[f][c],e=!0);return e?d:null}var yP=z.clearTimeout,zP=z.setTimeout;function AP(a,b,c){if(Yq()){b&&D(b)}else return rc(a,b,c,void 0)}function BP(){return z.location.href}function CP(a,b){return Rj(a,b||2)}function DP(a,b){z[a]=b}function EP(a,b,c){b&&(z[a]===void 0||c&&!z[a])&&(z[a]=b);return z[a]}function FP(a,b){if(Yq()){b&&D(b)}else tc(a,b)}
var GP={};var X={securityGroups:{}};
X.securityGroups.v=["google"],X.__v=function(a){var b=a.vtp_name;if(!b||!b.replace)return!1;var c=CP(b.replace(/\\\./g,"."),a.vtp_dataLayerVersion||1);return c!==void 0?c:a.vtp_defaultValue},X.__v.F="v",X.__v.isVendorTemplate=!0,X.__v.priorityOverride=0,X.__v.isInfrastructure=!0,X.__v.runInSiloedMode=!1;
X.securityGroups.rep=["google"],X.__rep=function(a){var b=hm(a.vtp_containerId),c=So(b,!0);if(c){var d,e;switch(c.prefix){case "AW":d=DI;e=wm.V.wa;break;case "DC":d=UI;e=wm.V.wa;break;case "GF":d=ZI;e=wm.V.qb;break;case "HA":d=eJ;e=wm.V.qb;break;case "UA":d=CJ;e=wm.V.qb;break;case "MC":d=JN(c,a.vtp_gtmEventId);e=wm.V.jc;break;default:D(a.vtp_gtmOnFailure);return}d?(D(a.vtp_gtmOnSuccess),Xp(b,d,e),a.vtp_remoteConfig&&cq(b,a.vtp_remoteConfig||{})):D(a.vtp_gtmOnFailure)}else D(a.vtp_gtmOnFailure)},X.__rep.F=
"rep",X.__rep.isVendorTemplate=!0,X.__rep.priorityOverride=0,X.__rep.isInfrastructure=!1,X.__rep.runInSiloedMode=!0;
X.securityGroups.read_event_data=["google"],function(){function a(b,c){return{key:c}}(function(b){X.__read_event_data=b;X.__read_event_data.F="read_event_data";X.__read_event_data.isVendorTemplate=!0;X.__read_event_data.priorityOverride=0;X.__read_event_data.isInfrastructure=!1;X.__read_event_data.runInSiloedMode=!1})(function(b){var c=b.vtp_eventDataAccess,d=b.vtp_keyPatterns||[],e=b.vtp_createPermissionError;return{assert:function(f,g){if(g!=null&&!ab(g))throw e(f,{key:g},"Key must be a string.");
if(c!=="any"){try{if(c==="specific"&&g!=null&&xg(g,d))return}catch(h){throw e(f,{key:g},"Invalid key filter.");}throw e(f,{key:g},"Prohibited read from event data.");}},P:a}})}();
X.securityGroups.get=["google"],X.__get=function(a){var b=a.vtp_settings,c=b.eventParameters||{},d=String(a.vtp_eventName),e={};e.eventId=a.vtp_gtmEventId;e.priorityId=a.vtp_gtmPriorityId;a.vtp_deferrable&&(e.deferrable=!0);var f=Jv(String(b.streamId),d,c);Mv(f,e.eventId,e);a.vtp_gtmOnSuccess()},X.__get.F="get",X.__get.isVendorTemplate=!0,X.__get.priorityOverride=0,X.__get.isInfrastructure=!1,X.__get.runInSiloedMode=!1;
X.securityGroups.zone=[],function(){var a={},b=function(d){for(var e=0;e<d.length;e++)if(!d[e])return!1;return!0},c=function(d){var e=b(d.vtp_boundaries||[]);if(d.vtp_gtmTagId in a)cF(a[d.vtp_gtmTagId],d.vtp_gtmEventId,e);else if(e){var f=d.vtp_childContainers.map(function(n){return n.publicId}),g=d.vtp_enableTypeRestrictions?d.vtp_whitelistedTypes.map(function(n){return n.typeId}):null,h={};var m=eF(d.vtp_gtmEventId,f,g,h,YA(1,d.vtp_gtmEntityIndex,d.vtp_gtmEntityName),!!d.vtp_inheritParentConfig);a[d.vtp_gtmTagId]=m}D(d.vtp_gtmOnSuccess)};X.__zone=c;X.__zone.F="zone";X.__zone.isVendorTemplate=!0;X.__zone.priorityOverride=0;X.__zone.isInfrastructure=
!1;X.__zone.runInSiloedMode=!1}();
var Lo={dataLayer:Sj,callback:function(a){Gj.hasOwnProperty(a)&&$a(Gj[a])&&Gj[a]();delete Gj[a]},bootstrap:0};
function HP(){Ko();km();TA();sb(Hj,X.securityGroups);var a=fm(gm()),b,c=a==null?void 0:(b=a.context)==null?void 0:b.source;io(c,a==null?void 0:a.parent);c!==2&&c!==4&&c!==3||O(142);zf={Cm:Pf}}var IP=!1;
function Kn(){try{if(IP||!tm()){qj();oj.O="";oj.ab="ad_storage|analytics_storage|ad_user_data|ad_personalization";
oj.ia="ad_storage|analytics_storage|ad_user_data";oj.fa="54l0";oj.fa="54l0";im();if(H(108)){}gg[8]=
!0;var a=Jo("debugGroupId",function(){return String(Math.floor(Number.MAX_SAFE_INTEGER*Math.random()))});po(a);Ho();SD();Aq();Oo();if(lm()){jF();DA().removeExternalRestrictions(dm());}else{PA();xf();tf=X;uf=CD;Rf=new Yf;hP();HP();In||(Hn=Mn());Eo();SC();dC();yC=!1;A.readyState==="complete"?AC():wc(z,"load",AC);YB();Ck&&(Fp(Tp),z.setInterval(Sp,864E5),Fp(UD),Fp(vB),Fp(jz),Fp(Wp),Fp(XD),Fp(GB),H(119)&&(Fp(AB),Fp(BB),Fp(CB)));Dk&&(nn(),kp(),UC(),YC(),WC(),dn("bt",String(oj.C?2:zj?1:0)),dn("ct",String(oj.C?0:zj?1:Yq()?2:3)),VC());sD();xn(1);kF();Fj=pb();Lo.bootstrap=Fj;oj.N&&RC();H(108)&&Cz();H(133)&&(typeof z.name==="string"&&
ub(z.name,"web-pixel-sandbox-CUSTOM")&&Mc()?kP("dMDg0Yz"):z.Shopify&&(kP("dN2ZkMj"),Mc()&&kP("dNTU0Yz")))}}}catch(b){xn(4),Pp()}}
(function(a){function b(){n=A.documentElement.getAttribute("data-tag-assistant-present");Vn(n)&&(m=h.Mj)}function c(){m&&ic?g(m):a()}if(!z["__TAGGY_INSTALLED"]){var d=!1;if(A.referrer){var e=lk(A.referrer);d=hk(e,"host")==="cct.google"}if(!d){var f=ir("googTaggyReferrer");d=!(!f.length||!f[0].length)}d&&(z["__TAGGY_INSTALLED"]=!0,rc("https://cct.google/taggy/agent.js"))}var g=function(u){var v="GTM",w="GTM";xj&&(v="OGT",w="GTAG");var x=z["google.tagmanager.debugui2.queue"];x||(x=
[],z["google.tagmanager.debugui2.queue"]=x,rc("https://"+rj.Ff+"/debug/bootstrap?id="+Vf.ctid+"&src="+w+"&cond="+u+"&gtm="+$q()));var y={messageType:"CONTAINER_STARTING",data:{scriptSource:ic,containerProduct:v,debug:!1,id:Vf.ctid,targetRef:{ctid:Vf.ctid,isDestination:Vl()},aliases:Yl(),destinations:Wl()}};y.data.resume=function(){a()};rj.Wk&&(y.data.initialPublish=!0);x.push(y)},h={Yl:1,Oj:2,Wj:3,Pi:4,Mj:5};h[h.Yl]="GTM_DEBUG_LEGACY_PARAM";h[h.Oj]="GTM_DEBUG_PARAM";h[h.Wj]="REFERRER";h[h.Pi]="COOKIE";h[h.Mj]="EXTENSION_PARAM";
var m=void 0,n=void 0,p=fk(z.location,"query",!1,void 0,"gtm_debug");Vn(p)&&(m=h.Oj);if(!m&&A.referrer){var q=lk(A.referrer);hk(q,"host")==="tagassistant.google.com"&&(m=h.Wj)}if(!m){var r=ir("__TAG_ASSISTANT");r.length&&r[0].length&&(m=h.Pi)}m||b();if(!m&&Un(n)){var t=!1;wc(A,"TADebugSignal",function(){t||(t=!0,b(),c())},!1);z.setTimeout(function(){t||(t=!0,b(),c())},200)}else c()})(function(){H(83)&&IP&&!Mn()["0"]?Jn():Kn()});
})()

View File

@ -0,0 +1 @@
(function(){function g(a){try{if("sendBeacon"in navigator&&navigator.sendBeacon(a+"&beacon=1"))return}catch(f){}(new Image).src=a}if(!(-1<location.href.indexOf("mashed.com"))){try{for(var d="/dye?"+["_="+(new Date).getTime(),"type=latest:boot&ac=2&acm=g3l","h="+encodeURIComponent(location.hostname),"uri="+encodeURIComponent(location.pathname||""),"furl="+encodeURIComponent(location.href||"")].join("&"),c=["track","gtrack"],b=0;b<c.length;b++)g("https://"+c[b]+".kueezrtb.com"+d)}catch(a){}d=document.createElement("script");d.async=!0;d.type="text/javascript";c=Date.now();b="latest";try{window.sessionStorage&&(c=window.sessionStorage.getItem("latest_ts")||c,window.sessionStorage.setItem("latest_ts",c),b=window.sessionStorage.getItem("latest_fn"),"null"===b&&(window.sessionStorage.removeItem("latest_fn"),b=null),b||(function(){try{var a;if(!(a=!navigator.cookieEnabled)){try{document.cookie="cookietest=1";var f=-1!=document.cookie.indexOf("cookietest=");document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";var e=f}catch(h){e=!1}a=!e}if(a)return!0;var k=navigator.userAgent.toLowerCase();a=["ios","mac os","edg","firefox"];for(e=0;e<a.length;e++)if(-1<k.indexOf(a[e]))return!0}catch(h){return!0}return!1}()&&(b="latest_cls"),window.sessionStorage.setItem("latest_fn",b||"latest")))}catch(a){}d.src="https://static.kueezrtb.com/js/"+(b||"latest")+".js?_="+c;c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}})();

View File

@ -0,0 +1,43 @@
function isCompatible(){return!!('querySelector'in document&&'localStorage'in window&&typeof Promise==='function'&&Promise.prototype['finally']&&(function(){try{new Function('(a = 0) => a');return true;}catch(e){return false;}}())&&/./g.flags==='g');}if(!isCompatible()){document.documentElement.className=document.documentElement.className.replace(/(^|\s)client-js(\s|$)/,'$1client-nojs$2');while(window.NORLQ&&NORLQ[0]){NORLQ.shift()();}NORLQ={push:function(fn){fn();}};RLQ={push:function(){}};}else{if(window.performance&&performance.mark){performance.mark('mwStartup');}(function(){'use strict';var con=window.console;function logError(topic,data){var e=data.exception;var msg=(e?'Exception':'Error')+' in '+data.source+(data.module?' in module '+data.module:'')+(e?':':'.');con.log(msg);if(e){con.warn(e);}}function Map(){this.values=Object.create(null);}Map.prototype={constructor:Map,get:function(selection,fallback){if(arguments.length<2){fallback=null;}if(typeof selection==='string'){return selection
in this.values?this.values[selection]:fallback;}var results;if(Array.isArray(selection)){results={};for(var i=0;i<selection.length;i++){if(typeof selection[i]==='string'){results[selection[i]]=selection[i]in this.values?this.values[selection[i]]:fallback;}}return results;}if(selection===undefined){results={};for(var key in this.values){results[key]=this.values[key];}return results;}return fallback;},set:function(selection,value){if(arguments.length>1){if(typeof selection==='string'){this.values[selection]=value;return true;}}else if(typeof selection==='object'){for(var key in selection){this.values[key]=selection[key];}return true;}return false;},exists:function(selection){return typeof selection==='string'&&selection in this.values;}};var log=function(){};log.warn=Function.prototype.bind.call(con.warn,con);var mw={now:function(){var perf=window.performance;var navStart=perf&&perf.timing&&perf.timing.navigationStart;mw.now=navStart&&perf.now?function(){return navStart+perf.now();}:Date
.now;return mw.now();},trackQueue:[],track:function(topic,data){mw.trackQueue.push({topic:topic,data:data});},trackError:function(topic,data){mw.track(topic,data);logError(topic,data);},Map:Map,config:new Map(),messages:new Map(),templates:new Map(),log:log};window.mw=window.mediaWiki=mw;}());(function(){'use strict';var store,hasOwn=Object.hasOwnProperty;function fnv132(str){var hash=0x811C9DC5;for(var i=0;i<str.length;i++){hash+=(hash<<1)+(hash<<4)+(hash<<7)+(hash<<8)+(hash<<24);hash^=str.charCodeAt(i);}hash=(hash>>>0).toString(36).slice(0,5);while(hash.length<5){hash='0'+hash;}return hash;}var registry=Object.create(null),sources=Object.create(null),handlingPendingRequests=false,pendingRequests=[],queue=[],jobs=[],willPropagate=false,errorModules=[],baseModules=["jquery","mediawiki.base"],marker=document.querySelector('meta[name="ResourceLoaderDynamicStyles"]'),lastCssBuffer;function addToHead(el,nextNode){if(nextNode&&nextNode.parentNode){nextNode.parentNode.insertBefore(el,
nextNode);}else{document.head.appendChild(el);}}function newStyleTag(text,nextNode){var el=document.createElement('style');el.appendChild(document.createTextNode(text));addToHead(el,nextNode);return el;}function flushCssBuffer(cssBuffer){if(cssBuffer===lastCssBuffer){lastCssBuffer=null;}newStyleTag(cssBuffer.cssText,marker);for(var i=0;i<cssBuffer.callbacks.length;i++){cssBuffer.callbacks[i]();}}function addEmbeddedCSS(cssText,callback){if(!lastCssBuffer||cssText.startsWith('@import')){lastCssBuffer={cssText:'',callbacks:[]};requestAnimationFrame(flushCssBuffer.bind(null,lastCssBuffer));}lastCssBuffer.cssText+='\n'+cssText;lastCssBuffer.callbacks.push(callback);}function getCombinedVersion(modules){var hashes=modules.reduce(function(result,module){return result+registry[module].version;},'');return fnv132(hashes);}function allReady(modules){for(var i=0;i<modules.length;i++){if(mw.loader.getState(modules[i])!=='ready'){return false;}}return true;}function allWithImplicitReady(module){
return allReady(registry[module].dependencies)&&(baseModules.indexOf(module)!==-1||allReady(baseModules));}function anyFailed(modules){for(var i=0;i<modules.length;i++){var state=mw.loader.getState(modules[i]);if(state==='error'||state==='missing'){return modules[i];}}return false;}function doPropagation(){var didPropagate=true;var module;while(didPropagate){didPropagate=false;while(errorModules.length){var errorModule=errorModules.shift(),baseModuleError=baseModules.indexOf(errorModule)!==-1;for(module in registry){if(registry[module].state!=='error'&&registry[module].state!=='missing'){if(baseModuleError&&baseModules.indexOf(module)===-1){registry[module].state='error';didPropagate=true;}else if(registry[module].dependencies.indexOf(errorModule)!==-1){registry[module].state='error';errorModules.push(module);didPropagate=true;}}}}for(module in registry){if(registry[module].state==='loaded'&&allWithImplicitReady(module)){execute(module);didPropagate=true;}}for(var i=0;i<jobs.length;i++
){var job=jobs[i];var failed=anyFailed(job.dependencies);if(failed!==false||allReady(job.dependencies)){jobs.splice(i,1);i-=1;try{if(failed!==false&&job.error){job.error(new Error('Failed dependency: '+failed),job.dependencies);}else if(failed===false&&job.ready){job.ready();}}catch(e){mw.trackError('resourceloader.exception',{exception:e,source:'load-callback'});}didPropagate=true;}}}willPropagate=false;}function setAndPropagate(module,state){registry[module].state=state;if(state==='ready'){store.add(module);}else if(state==='error'||state==='missing'){errorModules.push(module);}else if(state!=='loaded'){return;}if(willPropagate){return;}willPropagate=true;mw.requestIdleCallback(doPropagation,{timeout:1});}function sortDependencies(module,resolved,unresolved){if(!(module in registry)){throw new Error('Unknown module: '+module);}if(typeof registry[module].skip==='string'){var skip=(new Function(registry[module].skip)());registry[module].skip=!!skip;if(skip){registry[module].
dependencies=[];setAndPropagate(module,'ready');return;}}if(!unresolved){unresolved=new Set();}var deps=registry[module].dependencies;unresolved.add(module);for(var i=0;i<deps.length;i++){if(resolved.indexOf(deps[i])===-1){if(unresolved.has(deps[i])){throw new Error('Circular reference detected: '+module+' -> '+deps[i]);}sortDependencies(deps[i],resolved,unresolved);}}resolved.push(module);}function resolve(modules){var resolved=baseModules.slice();for(var i=0;i<modules.length;i++){sortDependencies(modules[i],resolved);}return resolved;}function resolveStubbornly(modules){var resolved=baseModules.slice();for(var i=0;i<modules.length;i++){var saved=resolved.slice();try{sortDependencies(modules[i],resolved);}catch(err){resolved=saved;mw.log.warn('Skipped unavailable module '+modules[i]);if(modules[i]in registry){mw.trackError('resourceloader.exception',{exception:err,source:'resolve'});}}}return resolved;}function resolveRelativePath(relativePath,basePath){var relParts=relativePath.match
(/^((?:\.\.?\/)+)(.*)$/);if(!relParts){return null;}var baseDirParts=basePath.split('/');baseDirParts.pop();var prefixes=relParts[1].split('/');prefixes.pop();var prefix;while((prefix=prefixes.pop())!==undefined){if(prefix==='..'){baseDirParts.pop();}}return(baseDirParts.length?baseDirParts.join('/')+'/':'')+relParts[2];}function makeRequireFunction(moduleObj,basePath){return function require(moduleName){var fileName=resolveRelativePath(moduleName,basePath);if(fileName===null){return mw.loader.require(moduleName);}if(hasOwn.call(moduleObj.packageExports,fileName)){return moduleObj.packageExports[fileName];}var scriptFiles=moduleObj.script.files;if(!hasOwn.call(scriptFiles,fileName)){throw new Error('Cannot require undefined file '+fileName);}var result,fileContent=scriptFiles[fileName];if(typeof fileContent==='function'){var moduleParam={exports:{}};fileContent(makeRequireFunction(moduleObj,fileName),moduleParam,moduleParam.exports);result=moduleParam.exports;}else{result=fileContent;}
moduleObj.packageExports[fileName]=result;return result;};}function addScript(src,callback,modules){var script=document.createElement('script');script.src=src;function onComplete(){if(script.parentNode){script.parentNode.removeChild(script);}if(callback){callback();callback=null;}}script.onload=onComplete;script.onerror=function(){onComplete();if(modules){for(var i=0;i<modules.length;i++){setAndPropagate(modules[i],'error');}}};document.head.appendChild(script);return script;}function queueModuleScript(src,moduleName,callback){pendingRequests.push(function(){if(moduleName!=='jquery'){window.require=mw.loader.require;window.module=registry[moduleName].module;}addScript(src,function(){delete window.module;callback();if(pendingRequests[0]){pendingRequests.shift()();}else{handlingPendingRequests=false;}});});if(!handlingPendingRequests&&pendingRequests[0]){handlingPendingRequests=true;pendingRequests.shift()();}}function addLink(url,media,nextNode){var el=document.createElement('link');el.
rel='stylesheet';if(media){el.media=media;}el.href=url;addToHead(el,nextNode);return el;}function globalEval(code){var script=document.createElement('script');script.text=code;document.head.appendChild(script);script.parentNode.removeChild(script);}function indirectEval(code){(1,eval)(code);}function enqueue(dependencies,ready,error){if(allReady(dependencies)){if(ready){ready();}return;}var failed=anyFailed(dependencies);if(failed!==false){if(error){error(new Error('Dependency '+failed+' failed to load'),dependencies);}return;}if(ready||error){jobs.push({dependencies:dependencies.filter(function(module){var state=registry[module].state;return state==='registered'||state==='loaded'||state==='loading'||state==='executing';}),ready:ready,error:error});}dependencies.forEach(function(module){if(registry[module].state==='registered'&&queue.indexOf(module)===-1){queue.push(module);}});mw.loader.work();}function execute(module){if(registry[module].state!=='loaded'){throw new Error(
'Module in state "'+registry[module].state+'" may not execute: '+module);}registry[module].state='executing';var runScript=function(){var script=registry[module].script;var markModuleReady=function(){setAndPropagate(module,'ready');};var nestedAddScript=function(arr,offset){if(offset>=arr.length){markModuleReady();return;}queueModuleScript(arr[offset],module,function(){nestedAddScript(arr,offset+1);});};try{if(Array.isArray(script)){nestedAddScript(script,0);}else if(typeof script==='function'){if(module==='jquery'){script();}else{script(window.$,window.$,mw.loader.require,registry[module].module);}markModuleReady();}else if(typeof script==='object'&&script!==null){var mainScript=script.files[script.main];if(typeof mainScript!=='function'){throw new Error('Main file in module '+module+' must be a function');}mainScript(makeRequireFunction(registry[module],script.main),registry[module].module,registry[module].module.exports);markModuleReady();}else if(typeof script==='string'){
globalEval(script);markModuleReady();}else{markModuleReady();}}catch(e){setAndPropagate(module,'error');mw.trackError('resourceloader.exception',{exception:e,module:module,source:'module-execute'});}};if(registry[module].deprecationWarning){mw.log.warn(registry[module].deprecationWarning);}if(registry[module].messages){mw.messages.set(registry[module].messages);}if(registry[module].templates){mw.templates.set(module,registry[module].templates);}var cssPending=0;var cssHandle=function(){cssPending++;return function(){cssPending--;if(cssPending===0){var runScriptCopy=runScript;runScript=undefined;runScriptCopy();}};};var style=registry[module].style;if(style){if('css'in style){for(var i=0;i<style.css.length;i++){addEmbeddedCSS(style.css[i],cssHandle());}}if('url'in style){for(var media in style.url){var urls=style.url[media];for(var j=0;j<urls.length;j++){addLink(urls[j],media,marker);}}}}if(module==='user'){var siteDeps;var siteDepErr;try{siteDeps=resolve(['site']);}catch(e){siteDepErr=
e;runScript();}if(!siteDepErr){enqueue(siteDeps,runScript,runScript);}}else if(cssPending===0){runScript();}}function sortQuery(o){var sorted={};var list=[];for(var key in o){list.push(key);}list.sort();for(var i=0;i<list.length;i++){sorted[list[i]]=o[list[i]];}return sorted;}function buildModulesString(moduleMap){var str=[];var list=[];var p;function restore(suffix){return p+suffix;}for(var prefix in moduleMap){p=prefix===''?'':prefix+'.';str.push(p+moduleMap[prefix].join(','));list.push.apply(list,moduleMap[prefix].map(restore));}return{str:str.join('|'),list:list};}function makeQueryString(params){var str='';for(var key in params){str+=(str?'&':'')+encodeURIComponent(key)+'='+encodeURIComponent(params[key]);}return str;}function batchRequest(batch){if(!batch.length){return;}var sourceLoadScript,currReqBase,moduleMap;function doRequest(){var query=Object.create(currReqBase),packed=buildModulesString(moduleMap);query.modules=packed.str;query.version=getCombinedVersion(packed.list);
query=sortQuery(query);addScript(sourceLoadScript+'?'+makeQueryString(query),null,packed.list);}batch.sort();var reqBase={"lang":"en","skin":"dolphin"};var splits=Object.create(null);for(var b=0;b<batch.length;b++){var bSource=registry[batch[b]].source;var bGroup=registry[batch[b]].group;if(!splits[bSource]){splits[bSource]=Object.create(null);}if(!splits[bSource][bGroup]){splits[bSource][bGroup]=[];}splits[bSource][bGroup].push(batch[b]);}for(var source in splits){sourceLoadScript=sources[source];for(var group in splits[source]){var modules=splits[source][group];currReqBase=Object.create(reqBase);if(group===0&&mw.config.get('wgUserName')!==null){currReqBase.user=mw.config.get('wgUserName');}var currReqBaseLength=makeQueryString(currReqBase).length+23;var length=0;moduleMap=Object.create(null);for(var i=0;i<modules.length;i++){var lastDotIndex=modules[i].lastIndexOf('.'),prefix=modules[i].slice(0,Math.max(0,lastDotIndex)),suffix=modules[i].slice(lastDotIndex+1),bytesAdded=moduleMap[
prefix]?suffix.length+3:modules[i].length+3;if(length&&length+currReqBaseLength+bytesAdded>mw.loader.maxQueryLength){doRequest();length=0;moduleMap=Object.create(null);}if(!moduleMap[prefix]){moduleMap[prefix]=[];}length+=bytesAdded;moduleMap[prefix].push(suffix);}doRequest();}}}function asyncEval(implementations,cb,offset){if(!implementations.length){return;}offset=offset||0;mw.requestIdleCallback(function(deadline){asyncEvalTask(deadline,implementations,cb,offset);});}function asyncEvalTask(deadline,implementations,cb,offset){for(var i=offset;i<implementations.length;i++){if(deadline.timeRemaining()<=0){asyncEval(implementations,cb,i);return;}try{indirectEval(implementations[i]);}catch(err){cb(err);}}}function getModuleKey(module){return module in registry?(module+'@'+registry[module].version):null;}function splitModuleKey(key){var index=key.lastIndexOf('@');if(index===-1||index===0){return{name:key,version:''};}return{name:key.slice(0,index),version:key.slice(index+1)};}function
registerOne(module,version,dependencies,group,source,skip){if(module in registry){throw new Error('module already registered: '+module);}registry[module]={module:{exports:{}},packageExports:{},version:version||'',dependencies:dependencies||[],group:typeof group==='undefined'?null:group,source:typeof source==='string'?source:'local',state:'registered',skip:typeof skip==='string'?skip:null};}mw.loader={moduleRegistry:registry,maxQueryLength:2000,addStyleTag:newStyleTag,addScriptTag:addScript,addLinkTag:addLink,enqueue:enqueue,resolve:resolve,work:function(){store.init();var q=queue.length,storedImplementations=[],storedNames=[],requestNames=[],batch=new Set();while(q--){var module=queue[q];if(mw.loader.getState(module)==='registered'&&!batch.has(module)){registry[module].state='loading';batch.add(module);var implementation=store.get(module);if(implementation){storedImplementations.push(implementation);storedNames.push(module);}else{requestNames.push(module);}}}queue=[];asyncEval(
storedImplementations,function(err){store.stats.failed++;store.clear();mw.trackError('resourceloader.exception',{exception:err,source:'store-eval'});var failed=storedNames.filter(function(name){return registry[name].state==='loading';});batchRequest(failed);});batchRequest(requestNames);},addSource:function(ids){for(var id in ids){if(id in sources){throw new Error('source already registered: '+id);}sources[id]=ids[id];}},register:function(modules){if(typeof modules!=='object'){registerOne.apply(null,arguments);return;}function resolveIndex(dep){return typeof dep==='number'?modules[dep][0]:dep;}for(var i=0;i<modules.length;i++){var deps=modules[i][2];if(deps){for(var j=0;j<deps.length;j++){deps[j]=resolveIndex(deps[j]);}}registerOne.apply(null,modules[i]);}},implement:function(module,script,style,messages,templates,deprecationWarning){var split=splitModuleKey(module),name=split.name,version=split.version;if(!(name in registry)){mw.loader.register(name);}if(registry[name].script!==
undefined){throw new Error('module already implemented: '+name);}registry[name].version=version;registry[name].declarator=null;registry[name].script=script;registry[name].style=style;registry[name].messages=messages;registry[name].templates=templates;registry[name].deprecationWarning=deprecationWarning;if(registry[name].state!=='error'&&registry[name].state!=='missing'){setAndPropagate(name,'loaded');}},impl:function(declarator){var data=declarator(),module=data[0],script=data[1]||null,style=data[2]||null,messages=data[3]||null,templates=data[4]||null,deprecationWarning=data[5]||null,split=splitModuleKey(module),name=split.name,version=split.version;if(!(name in registry)){mw.loader.register(name);}if(registry[name].script!==undefined){throw new Error('module already implemented: '+name);}registry[name].version=version;registry[name].declarator=declarator;registry[name].script=script;registry[name].style=style;registry[name].messages=messages;registry[name].templates=templates;registry
[name].deprecationWarning=deprecationWarning;if(registry[name].state!=='error'&&registry[name].state!=='missing'){setAndPropagate(name,'loaded');}},load:function(modules,type){if(typeof modules==='string'&&/^(https?:)?\/?\//.test(modules)){if(type==='text/css'){addLink(modules);}else if(type==='text/javascript'||type===undefined){addScript(modules);}else{throw new Error('Invalid type '+type);}}else{modules=typeof modules==='string'?[modules]:modules;enqueue(resolveStubbornly(modules));}},state:function(states){for(var module in states){if(!(module in registry)){mw.loader.register(module);}setAndPropagate(module,states[module]);}},getState:function(module){return module in registry?registry[module].state:null;},require:function(moduleName){var path;if(window.QUnit){var paths=moduleName.startsWith('@')?/^(@[^/]+\/[^/]+)\/(.*)$/.exec(moduleName):/^([^/]+)\/(.*)$/.exec(moduleName);if(paths){moduleName=paths[1];path=paths[2];}}if(mw.loader.getState(moduleName)!=='ready'){throw new Error(
'Module "'+moduleName+'" is not loaded');}return path?makeRequireFunction(registry[moduleName],'')('./'+path):registry[moduleName].module.exports;}};var hasPendingFlush=false,hasPendingWrites=false;function flushWrites(){while(store.queue.length){store.set(store.queue.shift());}if(hasPendingWrites){store.prune();try{localStorage.removeItem(store.key);localStorage.setItem(store.key,JSON.stringify({items:store.items,vary:store.vary,asOf:Math.ceil(Date.now()/1e7)}));}catch(e){mw.trackError('resourceloader.exception',{exception:e,source:'store-localstorage-update'});}}hasPendingFlush=hasPendingWrites=false;}mw.loader.store=store={enabled:null,items:{},queue:[],stats:{hits:0,misses:0,expired:0,failed:0},key:"MediaWikiModuleStore:enstrategywiki",vary:"dolphin:2:1:en",init:function(){if(this.enabled===null){this.enabled=false;if(true){this.load();}else{this.clear();}}},load:function(){try{var raw=localStorage.getItem(this.key);this.enabled=true;var data=JSON.parse(raw);if(data&&data.vary===
this.vary&&data.items&&Date.now()<(data.asOf*1e7)+259e7){this.items=data.items;}}catch(e){}},get:function(module){if(this.enabled){var key=getModuleKey(module);if(key in this.items){this.stats.hits++;return this.items[key];}this.stats.misses++;}return false;},add:function(module){if(this.enabled){this.queue.push(module);this.requestUpdate();}},set:function(module){var descriptor=registry[module],key=getModuleKey(module);if(key in this.items||!descriptor||descriptor.state!=='ready'||!descriptor.version||descriptor.group===1||descriptor.group===0||!descriptor.declarator){return;}var script=String(descriptor.declarator);if(script.length>1e5){return;}var srcParts=['mw.loader.impl(',script,');\n'];if(true){srcParts.push('// Saved in localStorage at ',(new Date()).toISOString(),'\n');var sourceLoadScript=sources[descriptor.source];var query=Object.create({"lang":"en","skin":"dolphin"});query.modules=module;query.version=getCombinedVersion([module]);query=sortQuery(query);srcParts.push(
'//# sourceURL=',(new URL(sourceLoadScript,location)).href,'?',makeQueryString(query),'\n');query.sourcemap='1';query=sortQuery(query);srcParts.push('//# sourceMappingURL=',sourceLoadScript,'?',makeQueryString(query));}this.items[key]=srcParts.join('');hasPendingWrites=true;},prune:function(){for(var key in this.items){if(getModuleKey(splitModuleKey(key).name)!==key){this.stats.expired++;delete this.items[key];}}},clear:function(){this.items={};try{localStorage.removeItem(this.key);}catch(e){}},requestUpdate:function(){if(!hasPendingFlush){hasPendingFlush=setTimeout(function(){mw.requestIdleCallback(flushWrites);},2000);}}};}());mw.requestIdleCallbackInternal=function(callback){setTimeout(function(){var start=mw.now();callback({didTimeout:false,timeRemaining:function(){return Math.max(0,50-(mw.now()-start));}});},1);};mw.requestIdleCallback=window.requestIdleCallback?window.requestIdleCallback.bind(window):mw.requestIdleCallbackInternal;(function(){var queue;mw.loader.addSource({
"local":"/w/load.php"});mw.loader.register([["site","119yo",[1]],["site.styles","ij8ti",[],2],["filepage","1ljys"],["user","1tdkc",[],0],["user.styles","18fec",[],0],["user.options","12s5i",[],1],["mediawiki.skinning.interface","szx0k"],["jquery.makeCollapsible.styles","1hqt2"],["mediawiki.skinning.content.parsoid","1vp3i"],["jquery","xt2am"],["es6-polyfills","19txf"],["web2017-polyfills","174re",[],null,null,"return'IntersectionObserver'in window\u0026\u0026typeof fetch==='function'\u0026\u0026typeof URL==='function'\u0026\u0026'toJSON'in URL.prototype;"],["mediawiki.base","hle5f",[9]],["jquery.chosen","1ft2a"],["jquery.client","5k8ja"],["jquery.confirmable","avzer",[104]],["jquery.cookie","19txf",[81]],["jquery.highlightText","1ngov",[78]],["jquery.i18n","za1bp",[103]],["jquery.lengthLimit","cpf4p",[62]],["jquery.makeCollapsible","1460b",[7,78]],["jquery.spinner","1fpma",[22]],["jquery.spinner.styles","1x3bp"],["jquery.suggestions","4y593",[17]],["jquery.tablesorter","1eocb",[25,105,
78]],["jquery.tablesorter.styles","12bkj"],["jquery.textSelection","1u87x",[14]],["jquery.ui","1kya8"],["moment","19ogg",[101,78]],["vue","1h1lm",[112]],["@vue/composition-api","xn7y3",[29]],["vuex","qipuu",[29]],["pinia","vdffm",[29]],["@wikimedia/codex","1e3mk",[34,29]],["codex-styles","fgqfc"],["@wikimedia/codex-search","12acw",[36,29]],["codex-search-styles","vehm3"],["mediawiki.template","1t0tr"],["mediawiki.template.mustache","wayx5",[37]],["mediawiki.apipretty","1xqb5"],["mediawiki.api","5z789",[68,104]],["mediawiki.content.json","ujwnk"],["mediawiki.confirmCloseWindow","69mix"],["mediawiki.debug","7s8yn",[188]],["mediawiki.diff","s4j7n",[40,187]],["mediawiki.diff.styles","b5qat"],["mediawiki.feedback","wcvc0",[457,196]],["mediawiki.feedlink","1666g"],["mediawiki.filewarning","1gubd",[188,200]],["mediawiki.ForeignApi","r63m6",[50]],["mediawiki.ForeignApi.core","6jema",[75,40,185]],["mediawiki.helplink","4rkp9"],["mediawiki.hlist","13txa"],["mediawiki.htmlform","q7y01",[19,78]],[
"mediawiki.htmlform.ooui","1j5od",[188]],["mediawiki.htmlform.styles","azhph"],["mediawiki.htmlform.ooui.styles","pounx"],["mediawiki.icon","bkxq6"],["mediawiki.inspect","wrjhi",[62,78]],["mediawiki.notification","x20lq",[78,84]],["mediawiki.notification.convertmessagebox","ruy11",[59]],["mediawiki.notification.convertmessagebox.styles","15u5e"],["mediawiki.String","1r7s8"],["mediawiki.pager.styles","b562x"],["mediawiki.pager.tablePager","19ie6"],["mediawiki.pulsatingdot","1l0fb"],["mediawiki.searchSuggest","1heao",[23,40]],["mediawiki.storage","1dg9k",[78]],["mediawiki.Title","2y9g2",[62,78]],["mediawiki.Upload","5crw7",[40]],["mediawiki.ForeignUpload","ikhl9",[49,69]],["mediawiki.Upload.Dialog","39a41",[72]],["mediawiki.Upload.BookletLayout","np47q",[69,76,28,191,196,201,202]],["mediawiki.ForeignStructuredUpload.BookletLayout","5olhw",[70,72,108,167,161]],["mediawiki.toc","181be",[81]],["mediawiki.Uri","lfzhm",[78]],["mediawiki.user","1badl",[40,81]],["mediawiki.userSuggest","30e7i",
[23,40]],["mediawiki.util","tu2xp",[14,11]],["mediawiki.checkboxtoggle","1mzw8"],["mediawiki.checkboxtoggle.styles","10qw3"],["mediawiki.cookie","18ezj"],["mediawiki.experiments","eisq8"],["mediawiki.editfont.styles","1pu4s"],["mediawiki.visibleTimeout","ninyh"],["mediawiki.action.edit","1dcuy",[26,86,40,83,163]],["mediawiki.action.edit.styles","1wsjp"],["mediawiki.action.edit.collapsibleFooter","8vkp6",[20,57,67]],["mediawiki.action.edit.preview","qc8c6",[21,114]],["mediawiki.action.history","hk6ix",[20]],["mediawiki.action.history.styles","14qma"],["mediawiki.action.protect","1e87u",[19,188]],["mediawiki.action.view.metadata","1dlqz",[99]],["mediawiki.editRecovery.postEdit","1u5ak"],["mediawiki.editRecovery.edit","1iqzy",[160]],["mediawiki.action.view.postEdit","16qms",[104,59,67,188,207]],["mediawiki.action.view.redirect","15khb"],["mediawiki.action.view.redirectPage","mhld0"],["mediawiki.action.edit.editWarning","1ecjl",[26,42,104]],["mediawiki.action.view.filepage","1fftv"],[
"mediawiki.action.styles","1mkyx"],["mediawiki.language","10c65",[102]],["mediawiki.cldr","14ymm",[103]],["mediawiki.libs.pluralruleparser","169fz"],["mediawiki.jqueryMsg","1g95e",[62,101,78,5]],["mediawiki.language.months","4pd6w",[101]],["mediawiki.language.names","c7v2g",[101]],["mediawiki.language.specialCharacters","1264d",[101]],["mediawiki.libs.jpegmeta","1eqhm"],["mediawiki.page.gallery","sztb8",[110,78]],["mediawiki.page.gallery.styles","1qxc9"],["mediawiki.page.gallery.slideshow","1u3zk",[40,191,210,212]],["mediawiki.page.ready","11ux3",[40]],["mediawiki.page.watch.ajax","jsn4c",[76]],["mediawiki.page.preview","1l4ev",[20,26,44,45,76]],["mediawiki.page.image.pagination","1y6ke",[21,78]],["mediawiki.page.media","9pyrn"],["mediawiki.rcfilters.filters.base.styles","1o2i8"],["mediawiki.rcfilters.highlightCircles.seenunseen.styles","9bvgl"],["mediawiki.rcfilters.filters.ui","1tp83",[20,75,76,158,197,204,206,207,208,210,211]],["mediawiki.interface.helpers.styles","ubtgj"],[
"mediawiki.special","1ev6j"],["mediawiki.special.apisandbox","cu4le",[20,75,178,164,187]],["mediawiki.special.block","1b95d",[53,161,177,168,178,175,204]],["mediawiki.misc-authed-ooui","17i3u",[21,54,158,163]],["mediawiki.misc-authed-pref","96xwo",[5]],["mediawiki.misc-authed-curate","kbnx4",[13,15,19,21,40]],["mediawiki.special.changeslist","1uugg"],["mediawiki.special.changeslist.watchlistexpiry","hgsma",[121,207]],["mediawiki.special.changeslist.enhanced","1ochv"],["mediawiki.special.changeslist.legend","12aan"],["mediawiki.special.changeslist.legend.js","p77yn",[20,81]],["mediawiki.special.contributions","974kc",[20,104,161,187]],["mediawiki.special.import.styles.ooui","1c2il"],["mediawiki.special.changecredentials","1sapc"],["mediawiki.special.changeemail","1y1sl"],["mediawiki.special.preferences.ooui","1kgfw",[42,83,60,67,168,163,196]],["mediawiki.special.preferences.styles.ooui","8yp0j"],["mediawiki.special.search","htvtd",[180]],[
"mediawiki.special.search.commonsInterwikiWidget","e32r6",[75,40]],["mediawiki.special.search.interwikiwidget.styles","1i1br"],["mediawiki.special.search.styles","cu426"],["mediawiki.special.unwatchedPages","kuc3k",[40]],["mediawiki.special.upload","8691l",[21,40,42,108,121,37]],["mediawiki.special.userlogin.common.styles","1cgin"],["mediawiki.special.userlogin.login.styles","1sitc"],["mediawiki.special.createaccount","p7z77",[40]],["mediawiki.special.userlogin.signup.styles","g6ngi"],["mediawiki.special.userrights","p0nyw",[19,60]],["mediawiki.special.watchlist","3lbks",[40,188,207]],["mediawiki.tempUserBanner.styles","ivd3g"],["mediawiki.tempUserBanner","1ezx5",[104]],["mediawiki.ui","15way"],["mediawiki.ui.checkbox","bs9q1"],["mediawiki.ui.radio","62zik"],["mediawiki.ui.button","wkvye"],["mediawiki.ui.input","1esyl"],["mediawiki.ui.icon","1o5n9"],["mediawiki.widgets","9r1k8",[40,159,191,201,202]],["mediawiki.widgets.styles","nqb2p"],["mediawiki.widgets.AbandonEditDialog","1pvqj",[
196]],["mediawiki.widgets.DateInputWidget","qyu0n",[162,28,191,212]],["mediawiki.widgets.DateInputWidget.styles","dvkgq"],["mediawiki.widgets.visibleLengthLimit","rvt0f",[19,188]],["mediawiki.widgets.datetime","trasr",[78,188,207,211,212]],["mediawiki.widgets.expiry","1gyax",[164,28,191]],["mediawiki.widgets.CheckMatrixWidget","vikuc",[188]],["mediawiki.widgets.CategoryMultiselectWidget","1t5m1",[49,191]],["mediawiki.widgets.SelectWithInputWidget","1hxs2",[169,191]],["mediawiki.widgets.SelectWithInputWidget.styles","a4qqf"],["mediawiki.widgets.SizeFilterWidget","15n5h",[171,191]],["mediawiki.widgets.SizeFilterWidget.styles","llen7"],["mediawiki.widgets.MediaSearch","1wive",[49,76,191]],["mediawiki.widgets.Table","19yf2",[191]],["mediawiki.widgets.TagMultiselectWidget","bie00",[191]],["mediawiki.widgets.UserInputWidget","1r1yk",[40,191]],["mediawiki.widgets.UsersMultiselectWidget","18j98",[40,191]],["mediawiki.widgets.NamespacesMultiselectWidget","1h8i4",[191]],[
"mediawiki.widgets.TitlesMultiselectWidget","xw4q2",[158]],["mediawiki.widgets.TagMultiselectWidget.styles","z8nel"],["mediawiki.widgets.SearchInputWidget","6moew",[66,158,207]],["mediawiki.widgets.SearchInputWidget.styles","1784o"],["mediawiki.widgets.ToggleSwitchWidget","3uryx",[191]],["mediawiki.watchstar.widgets","s3ta5",[187]],["mediawiki.deflate","1pqsh"],["oojs","1u2cw"],["mediawiki.router","u2kz5",[185]],["oojs-ui","19txf",[194,191,196]],["oojs-ui-core","15hqd",[101,185,190,189,198]],["oojs-ui-core.styles","1041b"],["oojs-ui-core.icons","2qvsi"],["oojs-ui-widgets","1ya9x",[188,193]],["oojs-ui-widgets.styles","14ykv"],["oojs-ui-widgets.icons","vadod"],["oojs-ui-toolbars","1506w",[188,195]],["oojs-ui-toolbars.icons","m22lo"],["oojs-ui-windows","efbw5",[188,197]],["oojs-ui-windows.icons","vmuyo"],["oojs-ui.styles.indicators","1nazi"],["oojs-ui.styles.icons-accessibility","tryj8"],["oojs-ui.styles.icons-alerts","qam44"],["oojs-ui.styles.icons-content","hjdva"],[
"oojs-ui.styles.icons-editing-advanced","gb5ts"],["oojs-ui.styles.icons-editing-citation","j9mev"],["oojs-ui.styles.icons-editing-core","b92xr"],["oojs-ui.styles.icons-editing-list","1o5ti"],["oojs-ui.styles.icons-editing-styling","1avtp"],["oojs-ui.styles.icons-interactions","16ajj"],["oojs-ui.styles.icons-layout","1qvzk"],["oojs-ui.styles.icons-location","3621v"],["oojs-ui.styles.icons-media","nxami"],["oojs-ui.styles.icons-moderation","rsvuw"],["oojs-ui.styles.icons-movement","fzleq"],["oojs-ui.styles.icons-user","krnnp"],["oojs-ui.styles.icons-wikimedia","1um93"],["skins.minerva.base.styles","7nccm"],["skins.minerva.content.styles.images","a72pv"],["skins.minerva.amc.styles","g3usv"],["skins.minerva.overflow.icons","k7b6q"],["skins.minerva.icons.wikimedia","qn9d1"],["skins.minerva.icons.images.scripts.misc","1ksu9"],["skins.minerva.icons.page.issues.uncolored","18imr"],["skins.minerva.icons.page.issues.default.color","juee7"],["skins.minerva.icons.page.issues.medium.color","1bpm7"]
,["skins.minerva.mainPage.styles","q27zv"],["skins.minerva.userpage.styles","117gb"],["skins.minerva.personalMenu.icons","1534n"],["skins.minerva.mainMenu.advanced.icons","qphtw"],["skins.minerva.mainMenu.icons","1ho4c"],["skins.minerva.mainMenu.styles","127qy"],["skins.minerva.loggedin.styles","1ssdd"],["skins.minerva.scripts","6vx5h",[75,82,332,220,222,223,221,228,229,232]],["skins.minerva.messageBox.styles","1sx2t"],["skins.minerva.categories.styles","1fks3"],["skins.monobook.styles","jz4u4"],["skins.monobook.scripts","8rt2r",[76,200]],["skins.timeless","1ha0h"],["skins.timeless.js","d56ub"],["skins.vector.user","1b93e",[],0],["skins.vector.user.styles","1rlz1",[],0],["skins.vector.search","c1kae",[35,75]],["skins.vector.styles.legacy","1duhl"],["skins.vector.styles","5yqei"],["skins.vector.zebra.styles","ryjru"],["skins.vector.icons.js","1djj8"],["skins.vector.icons","l8dcd"],["skins.vector.clientPreferences","1bv2t",[76]],["skins.vector.js","1yv7w",[82,112,113,67,246,244]],[
"skins.vector.legacy.js","1ryb3",[112]],["skins.vector.typographySurvey","1car0",[67,29]],["skins.dolphin.user","q3mkd",[],0],["skins.dolphin.user.styles","hbajz",[],0],["skins.dolphin.styles.legacy","1qff1"],["skins.dolphin.legacy.js","1udcv",[81,112]],["ext.abuseFilter","oe9q0"],["ext.abuseFilter.edit","8wlpv",[21,26,40,42,191]],["ext.abuseFilter.tools","15c6u",[21,40]],["ext.abuseFilter.examine","1jp7l",[21,40]],["ext.abuseFilter.ace","wrtt4",[274]],["ext.abuseFilter.visualEditor","1r9cz"],["ext.charinsert","qauuu",[26]],["ext.charinsert.styles","17hc7"],["ext.checkUser.clientHints","t21ha",[40,12]],["ext.checkUser","1oxxt",[24,75,63,67,76,158,175,204,207,209,211,213]],["ext.checkUser.styles","1w5l5"],["ext.cite.styles","1wuiv"],["ext.cite.parsoid.styles","1nm53"],["ext.cite.visualEditor.core","q2owz",[421]],["ext.cite.visualEditor","1i1db",[266,265,267,200,203,207]],["ext.cite.wikiEditor","1j8ir",[439]],["ext.cite.ux-enhancements","11t6e"],["ext.codeEditor","1wkn2",[272],3],[
"jquery.codeEditor","1kw8x",[274,273,439,196],3],["ext.codeEditor.icons","1nauz"],["ext.codeEditor.ace","y4e2h",[],4],["ext.codeEditor.ace.modes","o879q",[274],4],["ext.confirmEdit.editPreview.ipwhitelist.styles","nwoqf"],["ext.confirmEdit.visualEditor","1oxt5",[443]],["ext.confirmEdit.simpleCaptcha","11oss"],["ext.discussionTools.init.styles","163of"],["ext.discussionTools.debug.styles","zoxn7"],["ext.discussionTools.init","13as7",[279,282,400,67,76,28,196,379]],["ext.discussionTools.minervaicons","1xww8"],["ext.discussionTools.debug","197ip",[281]],["ext.discussionTools.ReplyWidget","pmm1r",[443,281,160,163,191]],["ext.discussionTools.ReplyWidgetPlain","13beg",[284,412,83]],["ext.discussionTools.ReplyWidgetVisual","16zpe",[284,404,434,432]],["ext.dismissableSiteNotice","rfldl",[81,78]],["ext.dismissableSiteNotice.styles","iqoef"],["ext.echo.ui.desktop","1dkb0",[296,290]],["ext.echo.ui","gskny",[291,445,191,200,201,204,207,211,212,213]],["ext.echo.dm","c3tye",[294,28]],["ext.echo.api"
,"fttpd",[49]],["ext.echo.mobile","e1wpo",[290,186]],["ext.echo.init","1kwd4",[292]],["ext.echo.centralauth","1w35w"],["ext.echo.styles.badge","1q67f"],["ext.echo.styles.notifications","6dvqt"],["ext.echo.styles.alert","qw8a4"],["ext.echo.special","7rpyd",[300,290]],["ext.echo.styles.special","u64ss"],["ext.embedVideo.messages","72ujb"],["ext.embedVideo.videolink","v0908"],["ext.embedVideo.consent","1ah1q"],["ext.embedVideo.overlay","1ntjt"],["ext.embedVideo.styles","25bva"],["ext.ForcePreview.livePreview","tvr27",[188]],["ext.gametools.fzeromv","ckrvp",[188]],["ext.gametools.lomax","qwlod",[188]],["ext.gametools.megaman2","f5z7w",[188]],["ext.gametools.megaman4","1v8u7",[188]],["ext.gametools.megaman5","15x5d",[188]],["ext.imagemap","pugeb",[313]],["ext.imagemap.styles","4n9wd"],["ext.interwiki.specialpage","12v1m"],["ext.LinkSuggest","1xv33",[27,40]],["ext.linter.edit","4rnx9",[26]],["ext.math.styles","feelp"],["ext.math.popup","1e32u",[40]],["mw.widgets.MathWbEntitySelector","1x2de"
,[49,158,"mw.config.values.wbRepo",196]],["ext.math.visualEditor","uj0q6",[317,413]],["ext.math.visualEditor.mathSymbols","1n8qd"],["ext.math.visualEditor.chemSymbols","2fqex"],["mobile.pagelist.styles","1ty54"],["mobile.pagesummary.styles","1j9n6"],["mobile.placeholder.images","9ywf0"],["mobile.userpage.styles","1dwzp"],["mobile.startup.images","1rhi5"],["mobile.init.styles","1lnmt"],["mobile.init","5goot",[332]],["mobile.ooui.icons","82xkd"],["mobile.user.icons","1809t"],["mobile.startup","hxdc8",[36,113,186,67,38,330,323,324,325,327]],["mobile.editor.overlay","1g7yx",[95,42,83,160,334,332,331,187,204]],["mobile.editor.images","1wj3y"],["mobile.mediaViewer","14p6s",[332]],["mobile.languages.structured","ibtae",[332]],["mobile.special.styles","9kiuy"],["mobile.special.watchlist.scripts","7v4hm",[332]],["mobile.special.mobileoptions.styles","sy20o"],["mobile.special.mobileoptions.scripts","t9rjz",[332]],["mobile.special.userlogin.scripts","edjqk"],["mobile.special.history.styles",
"octbx"],["mobile.special.pagefeed.styles","1mprd"],["mobile.special.mobilediff.images","1qu3u"],["mobile.special.mobilediff.styles","4vrsy"],["ext.nuke.confirm","38myg",[104]],["ext.oath.totp.showqrcode","1cxk8"],["ext.oath.totp.showqrcode.styles","ip630"],["ext.ReplaceText","avyd4"],["ext.ReplaceTextStyles","ncige"],["ext.scribunto.errors","1s7wq",[191]],["ext.scribunto.logs","7b36r"],["ext.scribunto.edit","1l0vc",[21,40]],["ext.spamBlacklist.visualEditor","11z86"],["ext.pygments","6jc5l"],["ext.pygments.linenumbers","9cpvs",[78]],["ext.geshi.visualEditor","w0vyp",[413]],["ext.templateData","15a30"],["ext.templateDataGenerator.editPage","8oiwy"],["ext.templateDataGenerator.data","rnqvl",[185]],["ext.templateDataGenerator.editTemplatePage.loading","1fb90"],["ext.templateDataGenerator.editTemplatePage","f19nc",[358,363,360,26,456,76,191,196,207,208,211]],["ext.templateData.images","pj55v"],["ext.TemplateSandbox.top","wnclz"],["ext.TemplateSandbox","4hpwm",[364]],[
"ext.TemplateSandbox.visualeditor","11f59",[158,187]],["ext.thanks.images","1ylmt"],["ext.thanks","1e3xd",[40,81]],["ext.thanks.corethank","bjohy",[368,15,196]],["ext.thanks.mobilediff","14r94",[367,332]],["ext.thanks.flowthank","17xal",[368,196]],["mediawiki.api.titleblacklist","rtmmp",[40]],["ext.titleblacklist.visualEditor","9cn1x"],["socket.io","f0oz7"],["dompurify","1x96n"],["color-picker","1udyk"],["unicodejs","1pa89"],["papaparse","1b87h"],["rangefix","py825"],["spark-md5","1ewgr"],["ext.visualEditor.supportCheck","uf1gn",[],5],["ext.visualEditor.sanitize","1fii1",[375,401],5],["ext.visualEditor.progressBarWidget","hu9em",[],5],["ext.visualEditor.tempWikitextEditorWidget","af7xj",[83,76],5],["ext.visualEditor.desktopArticleTarget.init","11i0o",[383,381,384,397,26,112,67],5],["ext.visualEditor.desktopArticleTarget.noscript","14oyf"],["ext.visualEditor.targetLoader","17dsn",[400,397,26,67,76],5],["ext.visualEditor.desktopTarget","1fs2v",[],5],[
"ext.visualEditor.desktopArticleTarget","yfbm7",[404,409,388,415],5],["ext.visualEditor.mobileArticleTarget","1wvl7",[404,410],5],["ext.visualEditor.collabTarget","1wxo4",[402,408,83,158,207,208],5],["ext.visualEditor.collabTarget.desktop","7ap5t",[391,409,388,415],5],["ext.visualEditor.collabTarget.mobile","h40k5",[391,410,414],5],["ext.visualEditor.collabTarget.init","12yub",[381,158,187],5],["ext.visualEditor.collabTarget.init.styles","g5nhw"],["ext.visualEditor.ve","8qjs3",[],5],["ext.visualEditor.track","1m39p",[396],5],["ext.visualEditor.editCheck","1n36a",[403],5],["ext.visualEditor.core.utils","k4kvh",[397,187],5],["ext.visualEditor.core.utils.parsing","ujaqc",[396],5],["ext.visualEditor.base","1yeiz",[399,400,377],5],["ext.visualEditor.mediawiki","1kitf",[401,387,24,456],5],["ext.visualEditor.mwsave","y5cvx",[413,19,21,44,45,207],5],["ext.visualEditor.articleTarget","nbvcn",[414,403,95,160],5],["ext.visualEditor.data","tcbw9",[402]],["ext.visualEditor.core","178q6",[382,381,14
,378,379,380],5],["ext.visualEditor.commentAnnotation","9an5d",[406],5],["ext.visualEditor.rebase","zgmao",[376,424,407,213,374],5],["ext.visualEditor.core.desktop","1u3y7",[406],5],["ext.visualEditor.core.mobile","11tom",[406],5],["ext.visualEditor.welcome","ll5kq",[187],5],["ext.visualEditor.switching","fiwum",[40,187,199,202,204],5],["ext.visualEditor.mwcore","qdahu",[425,402,412,411,120,65,8,158],5],["ext.visualEditor.mwextensions","19txf",[405,435,429,431,416,433,418,430,419,421],5],["ext.visualEditor.mwextensions.desktop","19txf",[414,420,73],5],["ext.visualEditor.mwformatting","1sxfe",[413],5],["ext.visualEditor.mwimage.core","1xlqj",[413],5],["ext.visualEditor.mwimage","sub36",[436,417,172,28,210],5],["ext.visualEditor.mwlink","1na7r",[413],5],["ext.visualEditor.mwmeta","120ui",[419,97],5],["ext.visualEditor.mwtransclusion","sxkqa",[413,175],5],["treeDiffer","xiskm"],["diffMatchPatch","1e4bb"],["ext.visualEditor.checkList","12vws",[406],5],["ext.visualEditor.diffing","yqw3s",[
423,406,422],5],["ext.visualEditor.diffPage.init.styles","t3o0g"],["ext.visualEditor.diffLoader","1ilmz",[387],5],["ext.visualEditor.diffPage.init","xy6wf",[427,426,187,199,202],5],["ext.visualEditor.language","m0hjt",[406,456,106],5],["ext.visualEditor.mwlanguage","yblae",[406],5],["ext.visualEditor.mwalienextension","jlh9c",[413],5],["ext.visualEditor.mwwikitext","msrxu",[419,83],5],["ext.visualEditor.mwgallery","lg0oo",[413,110,172,210],5],["ext.visualEditor.mwsignature","cp2yg",[421],5],["ext.visualEditor.icons","19txf",[437,438,200,201,202,204,205,206,207,208,211,212,213,198],5],["ext.visualEditor.icons-licenses","v7fvt"],["ext.visualEditor.moduleIcons","fl0zj"],["ext.visualEditor.moduleIndicators","11fcq"],["ext.wikiEditor","1w1nu",[26,27,107,76,158,203,204,205,206,210,37],3],["ext.wikiEditor.styles","pgt7x",[],3],["ext.wikiEditor.images","1ui4a"],["ext.wikiEditor.realtimepreview","1mm6l",[439,441,114,65,67,207]],["ext.confirmEdit.CaptchaInputWidget","1ysyj",[188]],[
"ext.echo.emailicons","1hn5a"],["ext.echo.secondaryicons","1dkh9"],["ext.gadget.Navigation_popups","1v2uk",[76],2],["ext.gadget.defaultsummaries","r8z0d",[],2],["ext.gadget.charinsert","1krrh",[],2],["ext.gadget.charinsert-core","jisx3",[26,3,67],2],["ext.gadget.purgetab","zd6y3",[78],2],["ext.gadget.ExternalSearch","m4k88",[],2],["ext.gadget.ControlSelector","zv3ba",[67],2],["ext.gadget.Tabs","1a5kc",[],2],["ext.gadget.multiupload","1srpe",[78],2],["ext.gadget.AjaxPatrol","1w60q",[],2],["jquery.uls.data","d5v5j"],["mediawiki.messagePoster","4svzv",[49]]]);mw.config.set(window.RLCONF||{});mw.loader.state(window.RLSTATE||{});mw.loader.load(window.RLPAGEMODULES||[]);queue=window.RLQ||[];RLQ=[];RLQ.push=function(fn){if(typeof fn==='function'){fn();}else{RLQ[RLQ.length]=fn;}};while(queue[0]){RLQ.push(queue.shift());}NORLQ={push:function(){}};}());}

View File

@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

40
Notes/nw_s0_fireball.nss Normal file
View File

@ -0,0 +1,40 @@
//::///////////////////////////////////////////////
//:: Fireball
//:: NW_S0_Fireball
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
// Testing summoning spell
void main()
{
// Create summon effect
string sResRef = "phs_kobold";
string sResRef2 = "phs_balor";
effect eSummon = EffectSummonCreature(sResRef, VFX_FNF_SUMMON_MONSTER_1);
effect eSummon2 = EffectSummonCreature(sResRef2, VFX_FNF_SUMMON_MONSTER_2);
effect eLink = EffectLinkEffects(eSummon, eSummon2);
location lTarget = GetSpellTargetLocation();
SpeakString("Summoning monster: Kobold");
// Set the associates (summons) to destroyable: FALSE for a sec.
int nCnt = 1;
object oAssociate = GetAssociate(ASSOCIATE_TYPE_SUMMONED, OBJECT_SELF, nCnt);
while(GetIsObjectValid(oAssociate))
{
SpeakString("Summon: " + GetName(oAssociate) + ". changing to destroyable");
AssignCommand(oAssociate, SetIsDestroyable(FALSE));
DelayCommand(0.1, AssignCommand(oAssociate, SetIsDestroyable(TRUE)));
nCnt++;
oAssociate = GetAssociate(ASSOCIATE_TYPE_SUMMONED, OBJECT_SELF, nCnt);
}
// Apply it for 10 minutes
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eLink, lTarget, TurnsToSeconds(10));
// Apply it for 10 minutes
//ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lTarget, TurnsToSeconds(10));
// 2 of them - Apply it for 10 minutes
//ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon2, lTarget, TurnsToSeconds(10));
}

1204
Notes/spell.html Normal file

File diff suppressed because one or more lines are too long

19400
Notes/spells.2da Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,152 @@
//::///////////////////////////////////////////////
//:: Vampiric Drain
//:: PRC_vampdrain.nss
//:://////////////////////////////////////////////
/*
Drain living, caster heals
Drain dead, caster dies
*/
//:://////////////////////////////////////////////
//:: Created By: Zedium
//:: Created On: April 5, 2004
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_add_spell_dc"
//------------------------------------------------------------------------------
// GZ: gets rids of temporary hit points so that they will not stack
//------------------------------------------------------------------------------
void PRCRemoveTempHitPoints()
{
effect eProtection;
int nCnt = 0;
eProtection = GetFirstEffect(OBJECT_SELF);
while (GetIsEffectValid(eProtection))
{
if(GetEffectType(eProtection) == EFFECT_TYPE_TEMPORARY_HITPOINTS)
RemoveEffect(OBJECT_SELF, eProtection);
eProtection = GetNextEffect(OBJECT_SELF);
}
}
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
/*
Spellcast Hook Code
Added 2003-06-23 by GeorgZ
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables
object oTarget = PRCGetSpellTargetObject();
int nMetaMagic = PRCGetMetaMagicFeat();
int nCasterLevel = PRCGetCasterLevel(OBJECT_SELF);
int nDDice = nCasterLevel /4;
if ((nDDice) == 0)
{
nDDice = 1;
}
//Damage Limit
else if (nDDice>5)
{
nDDice = 5;
}
int nDamage = d6(nDDice);
//--------------------------------------------------------------------------
//Enter Metamagic conditions
//--------------------------------------------------------------------------
nDamage = PRCMaximizeOrEmpower(6,nDDice,nMetaMagic);
nDamage += SpellDamagePerDice(OBJECT_SELF, nDDice);
int nDuration = nCasterLevel/3;
if ((nMetaMagic & METAMAGIC_EXTEND))
{
nDuration *= 2;
}
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF);
//--------------------------------------------------------------------------
//Limit damage to max hp + 10
//--------------------------------------------------------------------------
int nMax = GetCurrentHitPoints(oTarget) + 10;
if(nMax < nDamage)
{
nDamage = nMax;
}
effect eHeal = EffectTemporaryHitpoints(nDamage/2);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eHeal, eDur);
effect eHurt = PRCEffectDamage(oTarget, nDamage/2);
effect eBad =EffectTemporaryHitpoints(nDamage);
effect eNegLink = EffectLinkEffects(eBad, eDur);
effect eDamage = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE);
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M);
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_10);
float fDelay;
nCasterLevel +=SPGetPenetr();
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation());
//Get first target in shape
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, PRCGetSpellTargetLocation());
while (GetIsObjectValid(oTarget))
{
int iTombTainted = GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD;
//Check if the target is undead
if( MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || iTombTainted || GetLocalInt(oTarget, "AcererakHealing"))
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHurt, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oTarget);
PRCRemoveTempHitPoints();
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(1));
}
//Check if the target is hostile, and not an undead or construct
//or protected by a spell
if(!GetIsReactionTypeFriendly(oTarget) &&
MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD &&
!iTombTainted &&
MyPRCGetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT &&
!GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget))
{
if(PRCDoResistSpell(OBJECT_SELF, oTarget,nCasterLevel) == 0)
{
if(/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, (PRCGetSaveDC(oTarget,OBJECT_SELF)), SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
{
nDamage = nDamage/2;
if (GetHasMettle(oTarget, SAVING_THROW_WILL)) // Ignores partial effects
{
nDamage = 0;
}
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
PRCBonusDamage(oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, OBJECT_SELF);
PRCRemoveTempHitPoints();
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(1));
}
}
//Get next target in spell area
oTarget = GetNextInPersistentObject();
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the integer used to hold the spells spell school
}

View File

@ -0,0 +1,113 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT7
/*
Default OnDeath event handler for NPCs.
Adjusts killer's alignment if appropriate and
alerts allies to our death.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
//:://////////////////////////////////////////////////
//:: Modified By: Deva Winblood
//:: Modified On: April 1st, 2008
//:: Added Support for Dying Wile Mounted
//:://///////////////////////////////////////////////
const string sHenchSummonedFamiliar = "HenchSummonedFamiliar";
const string sHenchSummonedAniComp = "HenchSummonedAniComp";
const string sHenchLastHeardOrSeen = "LastSeenOrHeard";
#include "x2_inc_compon"
#include "x0_i0_spawncond"
// Clears the last unheard, unseen enemy location
void ClearEnemyLocation();
void main()
{
object oKiller = GetLastKiller();
object oMaster = GetMaster();
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
if(GetLocalInt(GetModule(), "X3_ENABLE_MOUNT_DB") && GetIsObjectValid(oMaster))
SetLocalInt(oMaster, "bX3_STORE_MOUNT_INFO", TRUE);
// If we're a good/neutral commoner,
// adjust the killer's alignment evil
if(GetLevelByClass(CLASS_TYPE_COMMONER)
&& (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
//Start Hench AI
if(GetLocalInt(OBJECT_SELF, "GaveHealing"))
{
// Pausanias: destroy potions of healing
object oItem = GetFirstItemInInventory();
while(GetIsObjectValid(oItem))
{
if(GetTag(oItem) == "NW_IT_MPOTION003")
DestroyObject(oItem);
oItem = GetNextItemInInventory();
}
}
if(GetLocalInt(OBJECT_SELF, sHenchSummonedFamiliar))
{
object oFam = GetLocalObject(OBJECT_SELF, sHenchSummonedFamiliar);
if(GetIsObjectValid(oFam))
{
//if(DEBUG) DoDebug(GetName(OBJECT_SELF) + " destroy familiar");
DestroyObject(oFam, 0.1);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oFam));
}
}
if(GetLocalInt(OBJECT_SELF, sHenchSummonedAniComp))
{
object oAni = GetLocalObject(OBJECT_SELF, sHenchSummonedAniComp);
if(GetIsObjectValid(oAni))
{
//if(DEBUG) DoDebug(GetName(OBJECT_SELF) + " destroy ani comp");
DestroyObject(oAni, 0.1);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oAni));
}
}
ClearEnemyLocation();
//End Hench AI
// Call to allies to let them know we're dead
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
// NOTE: the OnDeath user-defined event does not
// trigger reliably and should probably be removed
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
craft_drop_items(oKiller);
ExecuteScript("prc_npc_death", OBJECT_SELF);
ExecuteScript("prc_pwondeath", OBJECT_SELF);
}
void ClearEnemyLocation()
{
DeleteLocalInt(OBJECT_SELF, sHenchLastHeardOrSeen);
DeleteLocalLocation(OBJECT_SELF, sHenchLastHeardOrSeen);
object oInvisTarget = GetLocalObject(OBJECT_SELF, sHenchLastHeardOrSeen);
if (GetIsObjectValid(oInvisTarget))
{
DestroyObject(oInvisTarget);
DeleteLocalObject(OBJECT_SELF, sHenchLastHeardOrSeen);
}
}

View File

@ -0,0 +1,24 @@
//::///////////////////////////////////////////////
//:: Pit Fiend Payload
//:: NW_S0_2PitFiend
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
DEATH --- DEATH --- BO HA HA HA
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 11, 2002
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
object oTarget = OBJECT_SELF;
effect eDrain = EffectDeath();
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDrain, oTarget);
}

View File

@ -0,0 +1,165 @@
/*
nw_s0_abilbuff.nss
Ability buffs, ultravision and
mass versions thereof
By: Flaming_Sword
Created: Jul 1, 2006
Modified: Jul 2, 2006
*/
#include "prc_sp_func"
void StripBuff(object oTarget, int nBuffSpellID, int nMassBuffSpellID)
{
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
int nSpellID = GetEffectSpellId(eEffect);
if (nBuffSpellID == nSpellID || nMassBuffSpellID == nSpellID)
RemoveEffect(oTarget, eEffect);
eEffect = GetNextEffect(oTarget);
}
}
//Implements the spell impact, put code here
// if called in many places, return TRUE if
// stored charges should be decreased
// eg. touch attack hits
//
// Variables passed may be changed if necessary
int DoSpell(object oCaster, object oTarget, int nSpellID, int nCasterLevel, int nEvent)
{
int nMetaMagic = PRCGetMetaMagicFeat();
int bVision = (nSpellID == SPELL_DARKVISION) || (nSpellID == SPELL_MASS_ULTRAVISION);
int bMass = (nSpellID >= SPELL_MASS_BULLS_STRENGTH) && (nSpellID <= SPELL_MASS_ULTRAVISION);
effect eVis, eDur;
int nAbility, nAltSpellID;
if(bVision)
{
eDur = EffectVisualEffect(VFX_DUR_ULTRAVISION);
eDur = EffectLinkEffects(eDur, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
eDur = EffectLinkEffects(eDur, EffectVisualEffect(VFX_DUR_MAGICAL_SIGHT));
}
else
{
eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
if((nSpellID == SPELL_BULLS_STRENGTH) || (nSpellID == SPELL_MASS_BULLS_STRENGTH))
{
nAbility = ABILITY_STRENGTH;
eVis = EffectVisualEffect(VFX_IMP_BONUS_STRENGTH);
if(nSpellID == SPELL_BULLS_STRENGTH)
nAltSpellID = SPELL_MASS_BULLS_STRENGTH;
else
nAltSpellID = SPELL_BULLS_STRENGTH;
}
else if((nSpellID == SPELL_CATS_GRACE) || (nSpellID == SPELL_MASS_CATS_GRACE))
{
nAbility = ABILITY_DEXTERITY;
eVis = EffectVisualEffect(VFX_IMP_BONUS_DEXTERITY);
if(nSpellID == SPELL_CATS_GRACE)
nAltSpellID = SPELL_MASS_CATS_GRACE;
else
nAltSpellID = SPELL_CATS_GRACE;
}
else if((nSpellID == SPELL_ENDURANCE) || (nSpellID == SPELL_MASS_ENDURANCE))
{
nAbility = ABILITY_CONSTITUTION;
eVis = EffectVisualEffect(VFX_IMP_BONUS_CONSTITUTION);
if(nSpellID == SPELL_ENDURANCE)
nAltSpellID = SPELL_MASS_ENDURANCE;
else
nAltSpellID = SPELL_ENDURANCE;
}
else if((nSpellID == SPELL_EAGLE_SPLEDOR) || (nSpellID == SPELL_MASS_EAGLES_SPLENDOR))
{
nAbility = ABILITY_CHARISMA;
eVis = EffectVisualEffect(VFX_IMP_BONUS_CHARISMA);
if(nSpellID == SPELL_EAGLE_SPLEDOR)
nAltSpellID = SPELL_MASS_EAGLES_SPLENDOR;
else
nAltSpellID = SPELL_EAGLE_SPLEDOR;
}
else if((nSpellID == SPELL_OWLS_WISDOM) || (nSpellID == SPELL_MASS_OWLS_WISDOM))
{
nAbility = ABILITY_WISDOM;
eVis = EffectVisualEffect(VFX_IMP_BONUS_WISDOM);
if(nSpellID == SPELL_OWLS_WISDOM)
nAltSpellID = SPELL_MASS_OWLS_WISDOM;
else
nAltSpellID = SPELL_OWLS_WISDOM;
}
else if((nSpellID == SPELL_FOXS_CUNNING) || (nSpellID == SPELL_MASS_FOXS_CUNNING))
{
nAbility = ABILITY_INTELLIGENCE;
eVis = EffectVisualEffect(VFX_IMP_BONUS_INTELLIGENCE);
if(nSpellID == SPELL_FOXS_CUNNING)
nAltSpellID = SPELL_MASS_FOXS_CUNNING;
else
nAltSpellID = SPELL_FOXS_CUNNING;
}
}
float fDuration = HoursToSeconds(nCasterLevel);
if(nMetaMagic & METAMAGIC_EXTEND) fDuration *= 2;
location lTarget;
if(bMass)
{
lTarget = PRCGetSpellTargetLocation();
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
while(GetIsObjectValid(oTarget))
{
if((!bMass) || (spellsIsTarget(oTarget, SPELL_TARGET_ALLALLIES, oCaster)))
{
PRCSignalSpellEvent(oTarget, FALSE);
//if(bMass) fDelay = PRCGetSpellEffectDelay(lTarget, oTarget);
int nStatMod = d4() + 1;
if(nMetaMagic & METAMAGIC_MAXIMIZE) nStatMod = 5;
if(nMetaMagic & METAMAGIC_EMPOWER) nStatMod += (nStatMod / 2);
effect eBuff;
if(bVision)
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectLinkEffects(EffectUltravision(), eDur), oTarget, fDuration,TRUE,-1,nCasterLevel);
else
{
StripBuff(oTarget, nSpellID, nAltSpellID);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectLinkEffects(EffectAbilityIncrease(nAbility, nStatMod), eDur), oTarget, fDuration,TRUE,-1,nCasterLevel);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
if(!bMass) break;
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
return TRUE; //return TRUE if spell charges should be decremented
}
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nSpellID = PRCGetSpellId();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
if(!nEvent) //normal cast
{
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget && IsTouchSpell(nSpellID))
{ //holding the charge, casting spell on self
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
return;
}
DoSpell(oCaster, oTarget, nSpellID, nCasterLevel, nEvent);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(oCaster, oTarget, nSpellID, nCasterLevel, nEvent))
DecrementSpellCharges(oCaster);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,149 @@
//::///////////////////////////////////////////////
//:: Name Melf's Acid Arrow
//:: Greater Shadow Conjuration: Melf's Acid Arrow
//:: FileName nw_s0_acidarrow.nss
//:: Copyright (c) 2000 Bioware Corp.
/*:://////////////////////////////////////////////
Melf's Acid Arrow
Conjuration (Creation) [Acid]
Level: Sor/Wiz 2
Components: V, S, M, F
Casting Time: 1 standard action
Range: Long (400 ft. + 40 ft./level)
Effect: One arrow of acid
Duration: 1 round + 1 round per three levels
Saving Throw: None
Spell Resistance: No
A magical arrow of acid springs from your hand and
speeds to its target. You must succeed on a ranged
touch attack to hit your target. The arrow deals
2d4 points of acid damage with no splash damage.
For every three caster levels (to a maximum of 18th),
the acid, unless somehow neutralized, lasts for
another round, dealing another 2d4 points of damage
in that round.
Material Component
Powdered rhubarb leaf and an adders stomach.
Focus
A dart.
//:://////////////////////////////////////////////
//:: Created By: xwarren
//:: Created On: 2011-01-07
//::*/////////////////////////////////////////////
#include "prc_inc_sp_tch"
void ArrowImpact(object oTarget, object oCaster, int nDuration, int nMetaMagic, int iAttackRoll, int nSpellID);
void PerRoundDamage(object oTarget, object oCaster, int nDuration, int nMetamagic, int EleDmg, int nSpellID);
void main()
{
if(!X2PreSpellCastCode()) return;
int nSpellID = PRCGetSpellId();
int nSchool;
switch(nSpellID)
{
case SPELL_MELFS_ACID_ARROW: nSchool = SPELL_SCHOOL_CONJURATION; break;
case SPELL_GREATER_SHADOW_CONJURATION_ACID_ARROW: nSchool = SPELL_SCHOOL_ILLUSION; break;
}
PRCSetSchool(nSchool);
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int CasterLvl = PRCGetCasterLevel(oCaster);
int nMetaMagic = PRCGetMetaMagicFeat();
effect eArrow = EffectVisualEffect(VFX_DUR_MIRV_ACID);
int nDuration = (CasterLvl / 3);
if(nDuration > 6) nDuration = 6;
if(nMetaMagic & METAMAGIC_EXTEND)
nDuration *= 2;
CasterLvl += SPGetPenetr();
if(!GetIsReactionTypeFriendly(oTarget, oCaster))
{
SignalEvent(oTarget, EventSpellCastAt(oCaster, nSpellID));
int iAttackRoll = PRCDoRangedTouchAttack(oTarget);
if(iAttackRoll > 0)
{
float fDelay = GetDistanceToObject(oTarget) / 25.0f;
if(!PRCDoResistSpell(oCaster, oTarget, CasterLvl, fDelay))
{
DelayCommand(fDelay, ArrowImpact(oTarget, oCaster, nDuration, nMetaMagic, iAttackRoll, nSpellID));
}
else
{
// Indicate Failure
effect eSmoke = EffectVisualEffect(VFX_IMP_REFLEX_SAVE_THROW_USE);
DelayCommand(fDelay+0.1f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSmoke, oTarget));
}
}
}
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eArrow, oTarget);
PRCSetSchool();
}
void ArrowImpact(object oTarget, object oCaster, int nDuration, int nMetaMagic, int iAttackRoll, int nSpellID)
{
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_ACID);
// Setup VFX
effect eVis = EffectVisualEffect(VFX_IMP_ACID_L);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
// Set the VFX to be non dispelable, because the acid is not magic
eDur = ExtraordinaryEffect(eDur);
// Calculate damage
int nDamage = d4(2);
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 8;
if(nMetaMagic & METAMAGIC_EMPOWER)
nDamage += nDamage / 2;
// Acid Sheath adds +1 damage per die to acid descriptor spells
if (GetHasDescriptor(nSpellID, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, oCaster))
nDamage += 2;
nDamage += SpellDamagePerDice(oCaster, 2);
// Apply the VFX and initial damage
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration), FALSE);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyTouchAttackDamage(oCaster, oTarget, iAttackRoll, nDamage, EleDmg);
PRCBonusDamage(oTarget);
nDuration--;
DelayCommand(6.0f, PerRoundDamage(oTarget, oCaster, nDuration, nMetaMagic, EleDmg, nSpellID));
}
void PerRoundDamage(object oTarget, object oCaster, int nDuration, int nMetaMagic, int EleDmg, int nSpellID)
{
if(GetIsDead(oTarget))
return;
// Calculate damage
int nDamage = d4(2);
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 8;
if(nMetaMagic & METAMAGIC_EMPOWER)
nDamage += nDamage / 2;
// Acid Sheath adds +1 damage per die to acid descriptor spells
if (GetHasDescriptor(nSpellID, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, oCaster))
nDamage += 2;
nDamage += SpellDamagePerDice(oCaster, 2);
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
effect eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
eDam = EffectLinkEffects(eVis, eDam);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
if(nDuration--)
DelayCommand(6.0f, PerRoundDamage(oTarget, oCaster, nDuration, nMetaMagic, EleDmg, nSpellID));
}

View File

@ -0,0 +1,66 @@
//::///////////////////////////////////////////////
//:: Acid Fog
//:: NW_S0_AcidFog.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Acid Fog
Conjuration (Creation) [Acid]
Level: Sor/Wiz 6, Water 7
Components: V, S, M/DF
Casting Time: 1 standard action
Range: Medium (100 ft. + 10 ft./level)
Effect: Fog spreads in 20-ft. radius, 20 ft. high
Duration: 1 round/level
Saving Throw: None
Spell Resistance: No
Acid fog creates a billowing mass of misty vapors
similar to that produced by a solid fog spell. In
addition to slowing creatures down and obscuring
sight, this spells vapors are highly acidic. Each
round on your turn, starting when you cast the
spell, the fog deals 2d6 points of acid damage to
each creature and object within it.
Arcane Material Component
A pinch of dried, powdered peas combined with
powdered animal hoof.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
//:: Update Pass By: Preston W, On: July 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
//Declare major variables including Area of Effect Object
location lTarget = PRCGetSpellTargetLocation();
int CasterLvl = PRCGetCasterLevel();
int nMetaMagic = PRCGetMetaMagicFeat();
int nDuration = CasterLvl / 2;
if(nDuration < 1) nDuration = 1;
if(nMetaMagic & METAMAGIC_EXTEND)
nDuration *= 2;
effect eAOE = EffectAreaOfEffect(AOE_PER_FOGACID);
effect eImpact = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_ACID);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lTarget);
//Create an instance of the AOE Object using the Apply Effect function
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
object oAoE = GetAreaOfEffectObject(lTarget, "VFX_PER_FOGACID");
SetAllAoEInts(SPELL_ACID_FOG, oAoE, PRCGetSpellSaveDC(SPELL_ACID_FOG, SPELL_SCHOOL_CONJURATION), 0, CasterLvl);
SetLocalInt(oAoE, "Acid_Fog_Damage", ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_ACID));
PRCSetSchool();
}

View File

@ -0,0 +1,144 @@
//::///////////////////////////////////////////////
//:: Acid Fog: On Enter
//:: NW_S0_AcidFogA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All creatures within the AoE take 2d6 acid damage
per round and upon entering if they fail a Fort Save
their movement is halved.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://///////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
//:: This spell isn't supposed to have a saving throw.
//:: modified by Jaysyn: 2024-08-25 14:41:58
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nMetaMagic = PRCGetMetaMagicFeat();
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
effect eSlow = EffectMovementSpeedDecrease(50);
float fDelay = PRCGetRandomDelay(1.0, 2.2);
int nPenetr = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level") + SPGetPenetr(oCaster);
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
{
//Fire cast spell at event for the target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_ACID_FOG));
//Spell resistance check
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
{
//Roll Damage
//Enter Metamagic conditions
int nDamage = d6(2);
if (nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 12;//Damage is at max
if (nMetaMagic & METAMAGIC_EMPOWER)
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
// Acid Sheath adds +1 damage per die to acid descriptor spells
if (GetHasDescriptor(SPELL_ACID_FOG, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, oCaster))
nDamage += 2;
nDamage += SpellDamagePerDice(oCaster, 2);
//slowing effect
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oTarget,0.0f,FALSE);
// * BK: Removed this because it reduced damage, didn't make sense nDamage = d6();
//Set Damage Effect with the modified damage
effect eDam = PRCEffectDamage(oTarget, nDamage, GetLocalInt(OBJECT_SELF, "Acid_Fog_Damage"));
//Apply damage and visuals
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
PRCBonusDamage(oTarget);
}
}
PRCSetSchool();
}
//::///////////////////////////////////////////////
//:: Acid Fog: On Enter
//:: NW_S0_AcidFogA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All creatures within the AoE take 2d6 acid damage
per round and upon entering if they fail a Fort Save
their movement is halved.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://///////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
/* #include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nMetaMagic = PRCGetMetaMagicFeat();
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
effect eSlow = EffectMovementSpeedDecrease(50);
float fDelay = PRCGetRandomDelay(1.0, 2.2);
int nPenetr = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level") + SPGetPenetr(oCaster);
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
{
//Fire cast spell at event for the target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_ACID_FOG));
//Spell resistance check
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
{
//Roll Damage
//Enter Metamagic conditions
int nDamage = d6(2);
if (nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 12;//Damage is at max
if (nMetaMagic & METAMAGIC_EMPOWER)
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
// Acid Sheath adds +1 damage per die to acid descriptor spells
if (GetHasDescriptor(SPELL_ACID_FOG, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, oCaster))
nDamage += 2;
nDamage += SpellDamagePerDice(oCaster, 2);
//Make a Fortitude Save to avoid the effects of the movement hit.
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (PRCGetSaveDC(oTarget,oCaster)), SAVING_THROW_TYPE_ACID, oCaster, fDelay))
{
//slowing effect
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oTarget,0.0f,FALSE);
// * BK: Removed this because it reduced damage, didn't make sense nDamage = d6();
}
//Set Damage Effect with the modified damage
effect eDam = PRCEffectDamage(oTarget, nDamage, GetLocalInt(OBJECT_SELF, "Acid_Fog_Damage"));
//Apply damage and visuals
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
PRCBonusDamage(oTarget);
}
}
PRCSetSchool();
} */

View File

@ -0,0 +1,58 @@
//::///////////////////////////////////////////////
//:: Acid Fog: On Exit
//:: NW_S0_AcidFogB.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All creatures within the AoE take 2d6 acid damage
per round and their movement is halved.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
//:: Update Pass By: Preston W, On: July 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
//:: This spell isn't supposed to have a saving throw.
//:: modified by Jaysyn: 2024-08-25 14:41:58
void main()
{
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
//Declare major variables
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
int bValid = FALSE;
effect eAOE;
if(GetHasSpellEffect(SPELL_ACID_FOG, oTarget))
{
//Search through the valid effects on the target.
eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE) && bValid == FALSE)
{
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
{
if(GetEffectType(eAOE) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE)
{
//If the effect was created by the Acid_Fog then remove it
if(GetEffectSpellId(eAOE) == SPELL_ACID_FOG)
{
RemoveEffect(oTarget, eAOE);
bValid = TRUE;
}
}
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,83 @@
//::///////////////////////////////////////////////
//:: Acid Fog: Heartbeat
//:: NW_S0_AcidFogC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All creatures within the AoE take 2d6 acid damage
per round and their movement is halved.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
//:: This spell isn't supposed to have a saving throw.
//:: modified by Jaysyn: 2024-08-25 14:41:58
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
// When the caster is no longer there, all functions calling
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
object oCaster = GetAreaOfEffectCreator();
if(!GetIsObjectValid(oCaster))
{
DestroyObject(OBJECT_SELF);
return;
}
//Declare major variables
int nMetaMagic = PRCGetMetaMagicFeat();
int nDamage = d6(2);
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
//Enter Metamagic conditions
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
nDamage = 12;//Damage is at max
if ((nMetaMagic & METAMAGIC_EMPOWER))
nDamage = nDamage + (nDamage/2);
// Acid Sheath adds +1 damage per die to acid descriptor spells
if (GetHasDescriptor(SPELL_ACID_FOG, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, oCaster))
nDamage += 2;
nDamage += SpellDamagePerDice(oCaster, 2);
int nPenetr = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level") + SPGetPenetr(oCaster);
//Start cycling through the AOE Object for viable targets including doors and placable objects.
object oTarget = GetFirstInPersistentObject(OBJECT_SELF);
while(GetIsObjectValid(oTarget))
{
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
{
int nDC = PRCGetSaveDC(oTarget, oCaster);
int nDamageType = GetLocalInt(OBJECT_SELF, "Acid_Fog_Damage");
int nSaveType = ChangedSaveType(nDamageType);
float fDelay = PRCGetRandomDelay(0.4, 1.2);
//Fire cast spell at event for the affected target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_ACID_FOG));
//Spell resistance check
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
{
//Set the damage effect
effect eDam = PRCEffectDamage(oTarget, nDamage, nDamageType);
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
PRCBonusDamage(oTarget);
}
}
//Get next target.
oTarget = GetNextInPersistentObject(OBJECT_SELF);
}
PRCSetSchool();
}

131
Notes/spells/nw_s0_aid.nss Normal file
View File

@ -0,0 +1,131 @@
//::///////////////////////////////////////////////
//:: Name Aid/Mass Aid
//:: FileName nw_s0_aid.nss
/*:://////////////////////////////////////////////
Aid
Enchantment (Compulsion) [Mind-Affecting]
Level: Clr 2, Good 2, Luck 2
Components: V, S, DF
Casting Time: 1 standard action
Range: Touch
Target: Living creature touched
Duration: 1 min./level
Saving Throw: None
Spell Resistance: Yes (harmless)
Aid grants the target a +1 morale bonus on attack
rolls and saves against fear effects, plus
temporary hit points equal to 1d8 + caster level
(to a maximum of 1d8 + 10 temporary hit points at
caster level 10th).
Mass Aid
Enchantment (Compulsion) [Mind-Affecting]
Level: Clr 3
Range: Close (25 ft. + 5 ft./2 levels)
Targets: One or more creatures within a 30 ft. range.
Components: V, S, DF
Casting Time: 1 standard action
Duration: 1 min./level
Saving Throw: None
Spell Resistance: Yes (harmless)
Subjects gain +1 morale bonus on attack rolls and
saves against fear effects, plus temporary hit
points equal to 1d8 + caster level (to a maximum
of 1d8 + 15 at caster level 15).
//::*/////////////////////////////////////////////
#include "prc_sp_func"
void StripBuff(object oTarget, int nBuffSpellID, int nMassBuffSpellID)
{
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
int nSpellID = GetEffectSpellId(eEffect);
if (nBuffSpellID == nSpellID || nMassBuffSpellID == nSpellID)
RemoveEffect(oTarget, eEffect);
eEffect = GetNextEffect(oTarget);
}
}
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nSpellID)
{
//Declare major variables
location lTarget;
int nMetaMagic = PRCGetMetaMagicFeat();
int bMass = nSpellID == SPELL_MASS_AID;
int nBonusLimit = bMass ? 15 : 10;
float fDuration = TurnsToSeconds(nCasterLevel);
if(nMetaMagic & METAMAGIC_EXTEND) fDuration *= 2;
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
effect eAttack = EffectAttackIncrease(1);
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eAttack, eSave);
eLink = EffectLinkEffects(eLink, eDur);
if(bMass)
{
lTarget = PRCGetSpellTargetLocation();
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
while(GetIsObjectValid(oTarget))
{
if(((!bMass) || (spellsIsTarget(oTarget, SPELL_TARGET_ALLALLIES, oCaster))) && PRCGetIsAliveCreature(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, nSpellID, FALSE));
int nBonus = d8(1);
if(nMetaMagic & METAMAGIC_MAXIMIZE) nBonus = 8;
if(nMetaMagic & METAMAGIC_EMPOWER) nBonus += (nBonus / 2);
nBonus += nBonusLimit > nCasterLevel ? nCasterLevel : nBonusLimit;
effect eHP = EffectTemporaryHitpoints(nBonus);
// Remove pervious castings of it
StripBuff(oTarget, SPELL_AID, SPELL_MASS_AID);
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel, oCaster);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, fDuration);
}
if(!bMass) break;
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
return TRUE; //return TRUE if spell charges should be decremented
}
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nSpellID = PRCGetSpellId();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
if(!nEvent) //normal cast
{
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget && IsTouchSpell(nSpellID))
{ //holding the charge, casting spell on self
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
return;
}
DoSpell(oCaster, oTarget, nCasterLevel, nSpellID);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(oCaster, oTarget, nCasterLevel, nSpellID))
DecrementSpellCharges(oCaster);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,101 @@
//::///////////////////////////////////////////////
//:: Animate Dead
//:: NW_S0_AnimDead.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Summons a powerful skeleton or zombie depending
on caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 11, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_inc_template"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
//Declare major variables
object oCaster = OBJECT_SELF;
int nLichHD = GetHitDice(oCaster);
location lTarget = PRCGetSpellTargetLocation();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nMetaMagic = PRCGetMetaMagicFeat();
float fDuration = HoursToSeconds(24);
//Metamagic extension if needed
if(nMetaMagic & METAMAGIC_EXTEND)
fDuration *= 2; //Duration is +100%
string sResRef;
int nHD;
//Summon the appropriate creature based on the summoner level
if (nCasterLevel <= 5)
{
//Tyrant Fog Zombie
sResRef = "NW_S_ZOMBTYRANT";
nHD = 4;
}
else if ((nCasterLevel >= 6) && (nCasterLevel <= 9))
{
//Skeleton Warrior
sResRef = "NW_S_SKELWARR";
nHD = 6;
}
else
{
//Skeleton Chieftain
sResRef = "NW_S_SKELCHIEF";
nHD = 7;
}
effect eSummon = EffectSummonCreature(sResRef, VFX_FNF_SUMMON_UNDEAD);
MultisummonPreSummon();
if(GetPRCSwitch(PRC_PNP_ANIMATE_DEAD))
{
int nMaxHD = GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oCaster) >= 8 ?
nCasterLevel * (4 + GetAbilityModifier(ABILITY_CHARISMA, oCaster)) : nCasterLevel * 4;
if(GetHasSpellEffect(SPELL_DES_20) || GetHasSpellEffect(SPELL_DES_100) || GetHasSpellEffect(SPELL_DESECRATE))
nMaxHD *= 2;
if(GetHasTemplate(TEMPLATE_ARCHLICH, oCaster)) //: Archlich
nMaxHD = nLichHD;
int nTotalHD = GetControlledUndeadTotalHD();
int nGold = GetGold(oCaster);
int nCost = nHD * 25;
if((nTotalHD+nHD) <= nMaxHD)
{
if(nCost > nGold)
{
FloatingTextStringOnCreature("You have insufficient gold to animate this creature", oCaster, FALSE);
return;
}
else
{
TakeGoldFromCreature(nCost, oCaster, TRUE);
eSummon = SupernaturalEffect(eSummon);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eSummon, lTarget);
FloatingTextStringOnCreature("Currently have "+IntToString(nTotalHD+nHD)+"HD out of "+IntToString(nMaxHD)+"HD.", oCaster);
}
}
else
FloatingTextStringOnCreature("You cannot create more undead at this time.", oCaster);
}
else
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lTarget, fDuration);
PRCSetSchool();
}

View File

@ -0,0 +1,74 @@
//::///////////////////////////////////////////////
//:: Aura of Vitality
//:: NW_S0_AuraVital
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Transmutation
Level: Druid 7
Components: V, S
Casting Time: 1 standard action
Range: Close (25 ft. + 5 ft./2 levels)
Target: One creature/3 levels, no two of
which are more than 30 ft. apart
Duration: 1 round/level
Saving Throw: Will negates (harmless)
Spell Resistance: Yes (harmless)
All subjects recive a +4 morale bonus to Strength,
Dexterity and Constitution.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 29, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
//Declare major variables
object oCaster = OBJECT_SELF;
location lCaster = GetLocation(oCaster);
int CasterLvl = PRCGetCasterLevel(oCaster);
int nMetaMagic = PRCGetMetaMagicFeat();
float fDuration = RoundsToSeconds(CasterLvl);
if(nMetaMagic & METAMAGIC_EXTEND)
fDuration *= 2; //Duration is +100%
effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,4);
effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY,4);
effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION,4);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eStr, eDex);
eLink = EffectLinkEffects(eLink, eCon);
eLink = EffectLinkEffects(eLink, eDur);
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lCaster);
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lCaster);
while(GetIsObjectValid(oTarget))
{
if(GetFactionEqual(oTarget) || GetIsReactionTypeFriendly(oTarget))
{
float fDelay = PRCGetRandomDelay(0.4, 1.1);
//Signal the spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_AURA_OF_VITALITY, FALSE));
//Apply effects and VFX to target
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, SPELL_AURA_OF_VITALITY, CasterLvl));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lCaster);
}
PRCSetSchool();
}

View File

@ -0,0 +1,92 @@
/*
nw_s0_awaken
This spell makes an animal ally more
powerful, intelligent and robust for the
duration of the spell. Requires the caster to
make a Will save to succeed.
By: Preston Watamaniuk
Created: Aug 10, 2001
Modified: Jun 12, 2006
*/
#include "prc_sp_func"
#include "inc_npc"
//Implements the spell impact, put code here
// if called in many places, return TRUE if
// stored charges should be decreased
// eg. touch attack hits
//
// Variables passed may be changed if necessary
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
{
//Declare major variables
effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eInt;
effect eAttack = EffectAttackIncrease(2);
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
int nInt = d10();
//int nDuration = 24;
int nMetaMagic = PRCGetMetaMagicFeat();
if(GetAssociateTypeNPC(oTarget) == ASSOCIATE_TYPE_ANIMALCOMPANION && GetMasterNPC(oTarget) == oCaster)
{
if(!GetHasSpellEffect(SPELL_AWAKEN))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_AWAKEN, FALSE));
//Enter Metamagic conditions
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nInt = 10;//Damage is at max
if(nMetaMagic & METAMAGIC_EMPOWER)
nInt += (nInt/2); //Damage/Healing is +50%
//if(nMetaMagic & METAMAGIC_EXTEND)
// nDuration *= 2; //Duration is +100%
eInt = EffectAbilityIncrease(ABILITY_WISDOM, nInt);
effect eLink = EffectLinkEffects(eStr, eCon);
eLink = EffectLinkEffects(eLink, eAttack);
eLink = EffectLinkEffects(eLink, eInt);
eLink = EffectLinkEffects(eLink, eDur);
eLink = SupernaturalEffect(eLink);
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget, 0.0f, TRUE, SPELL_AWAKEN, nCasterLevel);
}
}
return TRUE; //return TRUE if spell charges should be decremented
}
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
if(!nEvent) //normal cast
{
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
{ //holding the charge, casting spell on self
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
return;
}
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
DecrementSpellCharges(oCaster);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,95 @@
//::///////////////////////////////////////////////
//:: Barkskin
//:: nw_s0_barkskin.nss
//::///////////////////////////////////////////////
/*
Transmutation
Level: Drd 2, Rgr 2, Plant 2
Components: V, S, DF
Casting Time: 1 standard action
Range: Touch
Target: Living creature touched
Duration: 10 min./level
Saving Throw: None
Spell Resistance: Yes (harmless)
Barkskin toughens a creatures skin. The effect
grants a +2 enhancement bonus to the creatures
existing natural armor bonus. This enhancement
bonus increases by 1 for every three caster levels
above 3rd, to a maximum of +5 at caster level 12th.
The enhancement bonus provided by barkskin stacks
with the targets natural armor bonus, but not with
other enhancement bonuses to natural armor. A
creature without natural armor has an effective
natural armor bonus of +0.
*/
//:://////////////////////////////////////////////
//:: By: Preston Watamaniuk
//:: Created: Feb 21, 2001
//:: Modified: Jun 12, 2006
//:://////////////////////////////////////////////
#include "prc_sp_func"
int DoSpell(object oCaster, object oTarget, int nCasterLevel)
{
if(!PRCGetIsAliveCreature(oTarget))
{
FloatingTextStringOnCreature("Selected target is not a living creature.", oCaster, FALSE);
return FALSE;
}
float fDuration = TurnsToSeconds(nCasterLevel) * 10;
//Enter Metamagic conditions
int nMetaMagic = PRCGetMetaMagicFeat();
if(nMetaMagic & METAMAGIC_EXTEND) //Duration is +100%
fDuration *= 2;
//Determine AC Bonus based Level.
int nBonus = (nCasterLevel / 3) + 1;
if(nBonus > 5)
nBonus = 5;
//Make sure the Armor Bonus is of type Natural
effect eLink = EffectACIncrease(nBonus, AC_NATURAL_BONUS);
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_PROT_BARKSKIN));
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
effect eHead = EffectVisualEffect(VFX_IMP_HEAD_NATURE);
//Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BARKSKIN, FALSE));
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, SPELL_BARKSKIN, nCasterLevel);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHead, oTarget);
return TRUE; //return TRUE if spell charges should be decremented
}
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
object oTarget = PRCGetSpellTargetObject();
int nCasterLevel = PRCGetCasterLevel();
int nEvent = GetLocalInt(OBJECT_SELF, PRC_SPELL_EVENT); //use bitwise & to extract flags
if(!nEvent) //normal cast
{
if(GetLocalInt(OBJECT_SELF, PRC_SPELL_HOLD) && OBJECT_SELF == oTarget)
{ //holding the charge, casting spell on self
SetLocalSpellVariables(OBJECT_SELF, 1); //change 1 to number of charges
return;
}
DoSpell(OBJECT_SELF, oTarget, nCasterLevel);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(OBJECT_SELF, oTarget, nCasterLevel))
DecrementSpellCharges(OBJECT_SELF);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,119 @@
//::///////////////////////////////////////////////
//:: Bestow Curse
//:: Greater Bestow Curse
//:: nw_s0_bescurse.nss
//::///////////////////////////////////////////////
/*
Bestow Curse
Necromancy
Level: Clr 3, Sor/Wiz 4
Components: V, S
Casting Time: 1 standard action
Range: Touch
Target: Creature touched
Duration: Permanent
Saving Throw: Will negates
Spell Resistance: Yes
You place a curse on the subject. Choose one of the
following three effects:
-6 decrease to an ability score (minimum 1).
-4 penalty on attack rolls, saves, ability checks,
and skill checks.
Each turn, the target has a 50% chance to act
normally; otherwise, it takes no action.
You may also invent your own curse, but it should
be no more powerful than those described above.
The curse bestowed by this spell cannot be dispelled,
but it can be removed with a break enchantment,
limited wish, miracle, remove curse, or wish spell.
Bestow curse counters remove curse.
Greater Bestow Curse
???
*/
//:://////////////////////////////////////////////
//:: NWN version:
//:: Afflicted creature must save or suffer a -2 penalty
//:: to all ability scores. This is a supernatural effect.
//:://////////////////////////////////////////////
//:: By: Bob McCabe
//:: Created: March 6, 2001
//:: Modified: Jun 12, 2006
//:://////////////////////////////////////////////
//:: Flaming_Sword: Added touch attack roll
//:://////////////////////////////////////////////
#include "prc_inc_sp_tch"
#include "prc_sp_func"
#include "prc_add_spell_dc"
int DoSpell(object oCaster, object oTarget, int nCasterLevel)
{
int nSpellID = PRCGetSpellId();
int iAttackRoll = PRCDoMeleeTouchAttack(oTarget);
if (iAttackRoll > 0)
{
int nPenetr = nCasterLevel + SPGetPenetr();
int nPenalty = nSpellID == SPELL_GREATER_BESTOW_CURSE ? 4 : 2;
nPenalty *= iAttackRoll;//can score a *Critical Hit*
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
effect eCurse = EffectCurse(nPenalty, //str
nPenalty, //dex
nPenalty, //con
nPenalty, //int
nPenalty, //wis
nPenalty);//cha
//Make sure that curse is of type supernatural not magical
eCurse = SupernaturalEffect(eCurse);
//Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oTarget, nSpellID));
//Make SR Check
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr))
{
//Make Will Save
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oCaster)))
{
//Apply Effect and VFX
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget, 0.0f, TRUE, nSpellID, nCasterLevel);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
return iAttackRoll; //return TRUE if spell charges should be decremented
}
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
if(!nEvent) //normal cast
{
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
{ //holding the charge, casting spell on self
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
return;
}
DoSpell(oCaster, oTarget, nCasterLevel);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(oCaster, oTarget, nCasterLevel))
DecrementSpellCharges(oCaster);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,66 @@
//::///////////////////////////////////////////////
//:: Blade Barrier
//:: NW_S0_BladeBar.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a wall 10m long and 2m thick of whirling
blades that hack and slice anything moving into
them. Anything caught in the blades takes
2d6 per caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables including Area of Effect Object
effect eAOE = EffectAreaOfEffect(AOE_PER_WALLBLADE);
location lTarget = PRCGetSpellTargetLocation();
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
int nDuration = CasterLvl;
int nMetaMagic = PRCGetMetaMagicFeat();
//Check Extend metamagic feat.
if (nMetaMagic & METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
//Create an instance of the AOE Object using the Apply Effect function
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
object oAoE = GetAreaOfEffectObject(lTarget, "VFX_PER_WALLBLADE");
SetAllAoEInts(SPELL_BLADE_BARRIER, oAoE, PRCGetSpellSaveDC(SPELL_BLADE_BARRIER, SPELL_SCHOOL_EVOCATION), 0, CasterLvl);
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

View File

@ -0,0 +1,81 @@
//::///////////////////////////////////////////////
//:: Blade Barrier: On Enter
//:: NW_S0_BladeBarA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a wall 10m long and 2m thick of whirling
blades that hack and slice anything moving into
them. Anything caught in the blades takes
2d6 per caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
//Declare major variables
object oTarget = GetEnteringObject();
effect eDam;
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED);
object aoeCreator = GetAreaOfEffectCreator();
int nMetaMagic = PRCGetMetaMagicFeat();
int nLevel = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
int CasterLvl = nLevel;
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
//Make level check
if (nLevel > 20)
{
nLevel = 20;
}
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
{
//Fire spell cast at event
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_BLADE_BARRIER));
//Roll Damage
int nDamage = d6(nLevel);
//Enter Metamagic conditions
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
{
nDamage = nLevel * 6;//Damage is at max
}
if ((nMetaMagic & METAMAGIC_EMPOWER))
{
nDamage = nDamage + (nDamage/2);
}
nDamage += SpellDamagePerDice(aoeCreator, nLevel);
//Make SR Check
if (!PRCDoResistSpell(aoeCreator, oTarget,nPenetr) )
{
// 1.69 change
//Adjust damage according to Reflex Save, Evasion or Improved Evasion
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget,aoeCreator),SAVING_THROW_TYPE_SPELL);
//Set damage effect
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_SLASHING);
//Apply damage and VFX
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

View File

@ -0,0 +1,102 @@
//::///////////////////////////////////////////////
//:: Blade Barrier: Heartbeat
//:: NW_S0_BladeBarA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a wall 10m long and 2m thick of whirling
blades that hack and slice anything moving into
them. Anything caught in the blades takes
2d6 per caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
//Declare major variables
object oTarget;
effect eDam;
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED);
object aoeCreator = GetAreaOfEffectCreator();
int nMetaMagic = PRCGetMetaMagicFeat();
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
int nLevel = CasterLvl;
//Make level check
if (nLevel > 20)
{
nLevel = 20;
}
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
//--------------------------------------------------------------------------
// GZ 2003-Oct-15
// Add damage to placeables/doors now that the command support bit fields
//--------------------------------------------------------------------------
oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR);
//--------------------------------------------------------------------------
// GZ 2003-Oct-15
// When the caster is no longer there, all functions calling
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
//--------------------------------------------------------------------------
if (!GetIsObjectValid(aoeCreator))
{
DestroyObject(OBJECT_SELF);
return;
}
while(GetIsObjectValid(oTarget))
{
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
{
//Fire spell cast at event
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_BLADE_BARRIER));
//Make SR Check
if (!PRCDoResistSpell(aoeCreator, oTarget,CasterLvl) )
{
int nDC = PRCGetSaveDC(oTarget,aoeCreator);
//Roll Damage
int nDamage = d6(nLevel);
//Enter Metamagic conditions
if((nMetaMagic & METAMAGIC_MAXIMIZE))
{
nDamage = nLevel * 6;//Damage is at max
}
if ((nMetaMagic & METAMAGIC_EMPOWER))
{
nDamage = nDamage + (nDamage/2);
}
nDamage += SpellDamagePerDice(aoeCreator, nLevel);
// 1.69 change
//Adjust damage according to Reflex Save, Evasion or Improved Evasion
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget,aoeCreator),SAVING_THROW_TYPE_SPELL);
//Set damage effect
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_SLASHING);
//Apply damage and VFX
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR);
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

View File

@ -0,0 +1,111 @@
//::///////////////////////////////////////////////
//:: Bless
//:: NW_S0_Bless.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Bless
Enchantment (Compulsion) [Mind-Affecting]
Level: Clr 1, Pal 1
Components: V, S, DF
Casting Time: 1 standard action
Range: 50 ft.
Area: The caster and all allies within
a 50-ft. burst, centered on the caster
Duration: 1 min./level
Saving Throw: None
Spell Resistance: Yes (harmless)
Bless fills your allies with courage. Each ally
gains a +1 morale bonus on attack rolls and on
saving throws against fear effects.
Bless counters and dispels bane.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 24, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Added Bless item ability: Georg Z, On: June 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
//Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nCasterLvl = PRCGetCasterLevel(oCaster);
int nMetaMagic = PRCGetMetaMagicFeat();
float fDuration = TurnsToSeconds(nCasterLvl);
if(nMetaMagic & METAMAGIC_EXTEND)
fDuration *= 2; //Duration is +100%
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
// ---------------- TARGETED ON BOLT -------------------
if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
{
// special handling for blessing crossbow bolts that can slay rakshasa's
if (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
{
object oPossessor = GetItemPossessor(oTarget);
SignalEvent(oPossessor, EventSpellCastAt(oCaster, SPELL_BLESS, FALSE));
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_SLAYRAKSHASA, 1), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPossessor);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oPossessor, fDuration, FALSE);
PRCSetSchool();
return;
}
}
location lCaster = GetLocation(oCaster);
float fRange = FeetToMeters(50.0);
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
//Apply Impact
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lCaster);
//Get the first target in the radius around the caster
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRange, lCaster);
while(GetIsObjectValid(oTarget))
{
if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget))
{
//Fire spell cast at event for target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BLESS, FALSE));
float fDelay = PRCGetRandomDelay(0.4, 1.1);
if(GetHasSpellEffect(SPELL_BANE, oTarget))
//Remove Bane spell
DelayCommand(fDelay, PRCRemoveEffectsFromSpell(oTarget, SPELL_BANE));
else
{
effect eAttack = EffectAttackIncrease(1);
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
effect eLink = EffectLinkEffects(eAttack, eSave);
eLink = EffectLinkEffects(eLink, eDur);
//Apply bonus effects
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, SPELL_BLESS, nCasterLvl));
}
//Apply VFX impact
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
//Get the next target in the specified area around the caster
oTarget = MyNextObjectInShape(SHAPE_SPHERE, fRange, lCaster);
}
PRCSetSchool();
}

View File

@ -0,0 +1,76 @@
//::///////////////////////////////////////////////
//:: Blindness/Deafness
//:: [NW_S0_BlindDead.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
/*
Necromancy
Level: Brd 2, Clr 3, Sor/Wiz 2
Components: V
Casting Time: 1 standard action
Range: Medium (100 ft. + 10 ft./level)
Target: One living creature
Duration: Permanent (D)
Saving Throw: Fortitude negates
Spell Resistance: Yes
You call upon the powers of unlife to render the
subject blinded or deafened, as you choose.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 12, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
//TODO: convert to subradials
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
//Declare major varibles
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nMetaMagic = PRCGetMetaMagicFeat();
int CasterLvl = PRCGetCasterLevel(oCaster);
int nPenetr = CasterLvl + SPGetPenetr();
float fDuration = RoundsToSeconds(CasterLvl);
//Metamagic check for duration
if(nMetaMagic & METAMAGIC_EXTEND)
fDuration *= 2;
effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M);
effect eBlind = EffectBlindness();
effect eDeaf = EffectDeaf();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eBlind, eDeaf);
eLink = EffectLinkEffects(eLink, eDur);
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BLINDNESS_AND_DEAFNESS));
//Do SR check
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr) && PRCGetIsAliveCreature(oTarget))
{
// Make Fortitude save to negate
if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, oCaster)))
{
//Apply visual and effects
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, SPELL_BLINDNESS_AND_DEAFNESS, CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,99 @@
//::///////////////////////////////////////////////
//:: Burning Hands
//:: NW_S0_BurnHand
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Evocation [Fire]
Level: Fire 1, Sor/Wiz 1
Components: V, S
Casting Time: 1 standard action
Range: 15 ft.
Area: Cone-shaped burst
Duration: Instantaneous
Saving Throw: Reflex half
Spell Resistance: Yes
A cone of searing flame shoots from your fingertips.
Any creature in the area of the flames takes 1d4
points of fire damage per caster level (maximum 5d4).
Flammable materials burn if the flames touch them.
A character can extinguish burning items as a
full-round action.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 5, 2001
//:://////////////////////////////////////////////
//:: Last Updated On: April 5th, 2001
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Update Pass By: Preston W, On: July 23, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
//Declare major variables
object oCaster = OBJECT_SELF;
location lTarget = PRCGetSpellTargetLocation();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nPenetr = nCasterLevel + SPGetPenetr();
int nMetaMagic = PRCGetMetaMagicFeat();
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE);
int nSaveType = ChangedSaveType(EleDmg);
int nDice = PRCMin(5, nCasterLevel);
int nDamage;
float fDist;
//Declare and assign personal impact visual effect.
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
//Declare the spell shape, size and the location. Capture the first target object in the shape.
object oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
//Cycle through the targets within the spell shape until an invalid object is captured.
while(GetIsObjectValid(oTarget))
{
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
{
//Signal spell cast at event to fire.
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BURNING_HANDS));
//Calculate the delay time on the application of effects based on the distance
//between the caster and the target
fDist = GetDistanceBetween(oCaster, oTarget)/20;
//Make SR check, and appropriate saving throw.
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDist) && oTarget != oCaster)
{
nDamage = d4(nDice);
//Enter Metamagic conditions
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 4 * nDice;//Damage is at max
if(nMetaMagic & METAMAGIC_EMPOWER)
nDamage += nDamage / 2; //Damage/Healing is +50%
nDamage += SpellDamagePerDice(oCaster, nDice);
//Run the damage through the various reflex save and evasion feats
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget, oCaster), nSaveType);
if(nDamage > 0)
{
effect eFire = PRCEffectDamage(oTarget, nDamage, EleDmg);
// Apply effects to the currently selected target.
DelayCommand(fDist, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDist, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
PRCBonusDamage(oTarget);
}
}
}
//Select the next target within the spell shape.
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
PRCSetSchool();
}

View File

@ -0,0 +1,113 @@
//::///////////////////////////////////////////////
//:: Call Lightning
//:: NW_S0_CallLghtn.nss
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Evocation [Electricity]
Level: Drd 3
Components: V, S
Casting Time: 1 round
Range: Medium (100 ft. + 10 ft./level)
Effect: One or more 30-ft.-long vertical lines of lightning
Duration: 1 min./level
Saving Throw: Reflex half
Spell Resistance: Yes
Immediately upon completion of the spell, and once
per round thereafter, you may call down a 5-foot-wide,
30-foot-long, vertical bolt of lightning that deals
3d6 points of electricity damage. The bolt of lightning
flashes down in a vertical stroke at whatever target
point you choose within the spells range (measured
from your position at the time). Any creature in the
target square or in the path of the bolt is affected.
You need not call a bolt of lightning immediately;
other actions, even spellcasting, can be performed.
However, each round after the first you may use a
standard action (concentrating on the spell) to call
a bolt. You may call a total number of bolts equal to
your caster level (maximum 10 bolts).
If you are outdoors and in a stormy area—a rain shower,
clouds and wind, hot and cloudy conditions, or even a
tornado (including a whirlwind formed by a djinni or an
air elemental of at least Large size)—each bolt deals
3d10 points of electricity damage instead of 3d6.
This spell functions indoors or underground but not
underwater.
*/
//:://////////////////////////////////////////////
//:: Notes: totally not like PnP version,
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 22, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
//Declare major variables
object oCaster = OBJECT_SELF;
location lTarget = PRCGetSpellTargetLocation();
int nCasterLvl = PRCGetCasterLevel(oCaster);
int nPenetr = nCasterLvl + SPGetPenetr();
int nMetaMagic = PRCGetMetaMagicFeat();
int nDice = PRCMin(10, nCasterLvl);
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_ELECTRICAL);
int nSaveType = ChangedSaveType(EleDmg);
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
//Declare the spell shape, size and the location. Capture the first target object in the shape.
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
//Cycle through the targets within the spell shape until an invalid object is captured.
while (GetIsObjectValid(oTarget))
{
if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oCaster))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CALL_LIGHTNING));
//Get the distance between the explosion and the target to calculate delay
float fDelay = PRCGetRandomDelay(0.4, 1.75);
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
{
//Roll damage for each target
int nDamage = d6(nDice);
//Resolve metamagic
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nDamage = 6 * nDice;
if(nMetaMagic & METAMAGIC_EMPOWER)
nDamage += nDamage / 2;
nDamage += SpellDamagePerDice(oCaster, nDice);
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget, oCaster), nSaveType);
if(nDamage > 0)
{
//Set the damage effect
effect eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
// Apply effects to the currently selected target.
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
PRCBonusDamage(oTarget);
}
}
}
//Select the next target within the spell shape.
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
PRCSetSchool();
}

View File

@ -0,0 +1,102 @@
//::///////////////////////////////////////////////
//:: [Charm Person or Animal]
//:: [nw_s0_charmani.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
/*
Charm Person
Enchantment (Charm) [Mind-Affecting]
Level: Brd 1, Sor/Wiz 1
Components: V, S
Casting Time: 1 standard action
Range: Close (25 ft. + 5 ft./2 levels)
Target: One humanoid creature
Duration: 1 hour/level
Saving Throw: Will negates
Spell Resistance: Yes
This charm makes a humanoid creature regard you as
its trusted friend and ally (treat the targets
attitude as friendly). If the creature is currently
being threatened or attacked by you or your allies,
however, it receives a +5 bonus on its saving throw.
The spell does not enable you to control the
charmed person as if it were an automaton, but it
perceives your words and actions in the most
favorable way. You can try to give the subject
orders, but you must win an opposed Charisma check
to convince it to do anything it wouldnt
ordinarily do. (Retries are not allowed.) An
affected creature never obeys suicidal or obviously
harmful orders, but it might be convinced that
something very dangerous is worth doing. Any act by
you or your apparent allies that threatens the
charmed person breaks the spell. You must speak the
persons language to communicate your commands, or
else be good at pantomiming.
*/
//:://////////////////////////////////////////////
//:: Will save or the target is dominated for 1 round
//:: per caster level.
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 29, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
//Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int CasterLvl = PRCGetCasterLevel(oCaster);
int nPenetr = CasterLvl + SPGetPenetr();
int nRacial = MyPRCGetRacialType(oTarget);
int nMetaMagic = PRCGetMetaMagicFeat();
int nDuration = 2 + CasterLvl/3;
nDuration = PRCGetScaledDuration(nDuration, oTarget);
//Meta magic duration check
if(nMetaMagic & METAMAGIC_EXTEND)
nDuration *= 2;
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
effect eCharm = EffectCharmed();
eCharm = PRCGetScaledEffect(eCharm, oTarget);
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
//Link the charm and duration visual effects
effect eLink = EffectLinkEffects(eMind, eCharm);
eLink = EffectLinkEffects(eLink, eDur);
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire spell cast at event to fire on the target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CHARM_PERSON_OR_ANIMAL, FALSE));
//Make SR Check
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr))
{
//Make sure the racial type of the target is applicable
if(PRCAmIAHumanoid(oTarget) ||
nRacial == RACIAL_TYPE_ANIMAL)
{
//Make Will Save
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oCaster), SAVING_THROW_TYPE_MIND_SPELLS))
{
//Apply impact effects and linked duration and charm effect
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration), TRUE, SPELL_CHARM_PERSON_OR_ANIMAL, CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,62 @@
//::///////////////////////////////////////////////
//:: [Charm Monster]
//:: [NW_S0_CharmMon.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
//:: Will save or the target is charmed for 1 round
//:: per 2 caster levels.
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 29, 2001
//:://////////////////////////////////////////////
//:: Update Pass By: Preston W, On: July 25, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
//Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int CasterLvl = PRCGetCasterLevel(oCaster);
int nPenetr = CasterLvl + SPGetPenetr();
int nMetaMagic = PRCGetMetaMagicFeat();
int nDuration = 3 + CasterLvl/2;
nDuration = PRCGetScaledDuration(nDuration, oTarget);
//Metamagic extend check
if(nMetaMagic & METAMAGIC_EXTEND)
nDuration *= 2;
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
effect eCharm = EffectCharmed();
eCharm = PRCGetScaledEffect(eCharm, oTarget);
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
//Link effects
effect eLink = EffectLinkEffects(eMind, eCharm);
eLink = EffectLinkEffects(eLink, eDur);
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CHARM_MONSTER, FALSE));
// Make SR Check
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr))
{
// Make Will save vs Mind-Affecting
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oCaster), SAVING_THROW_TYPE_MIND_SPELLS))
{
//Apply impact and linked effect
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration), TRUE, SPELL_CHARM_MONSTER, CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,71 @@
//::///////////////////////////////////////////////
//:: [Charm Person]
//:: [NW_S0_CharmPer.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
//:: Will save or the target is charmed for 1 round
//:: per caster level.
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 29, 2001
//:://////////////////////////////////////////////
//:: Last Updated By: Preston Watamaniuk, On: April 5, 2001
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if (!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
//Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nMetaMagic = PRCGetMetaMagicFeat();
int nCasterLvl = PRCGetCasterLevel(oCaster);
int nPenetr = nCasterLvl + SPGetPenetr();
int nDuration = 2 + nCasterLvl/3;
nDuration = PRCGetScaledDuration(nDuration, oTarget);
//Make Metamagic check for extend
if(nMetaMagic & METAMAGIC_EXTEND)
nDuration = nDuration * 2;
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
effect eCharm = EffectCharmed();
eCharm = PRCGetScaledEffect(eCharm, oTarget);
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
//Link persistant effects
effect eLink = EffectLinkEffects(eMind, eCharm);
eLink = EffectLinkEffects(eLink, eDur);
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CHARM_PERSON, FALSE));
//Make SR Check
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr))
{
//Verify that the Racial Type is humanoid
if(PRCAmIAHumanoid(oTarget))
{
//Make a Will Save check
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oCaster), SAVING_THROW_TYPE_MIND_SPELLS))
{
//Apply impact and linked effects
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration), TRUE, SPELL_CHARM_PERSON, nCasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,205 @@
//::///////////////////////////////////////////////
//:: Chain Lightning
//:: NW_S0_ChLightn
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
The primary target is struck with 1d6 per caster,
1/2 with a reflex save. 1 secondary target per
level is struck for 1d6 / 2 caster levels. No
repeat targets can be chosen.
*/
//:://////////////////////////////////////////////
//:: Created By: Brennon Holmes
//:: Created On: March 8, 2001
//:://////////////////////////////////////////////
//:: Last Updated By: Preston Watamaniuk, On: April 26, 2001
//:: Update Pass By: Preston W, On: July 26, 2001
/*
bugfix by Kovi 2002.07.28
- successful saving throw and (improved) evasion was ignored for
secondary targets,
- all secondary targets suffered exactly the same damage
2002.08.25
- primary target was not effected
*/
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
int nCasterLevel = CasterLvl;
//Limit caster level
// June 2/04 - Bugfix: Cap the level BEFORE the damage calculation, not after. Doh.
if (nCasterLevel > 20)
{
nCasterLevel = 20;
}
int nDamage = d6(nCasterLevel);
int nDamStrike;
int nNumAffected = 0;
int nMetaMagic = PRCGetMetaMagicFeat();
//Declare lightning effect connected the casters hands
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);;
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
effect eDamage;
object oFirstTarget = PRCGetSpellTargetObject();
object oHolder;
object oTarget;
location lSpellLocation;
//Enter Metamagic conditions
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
{
nDamage = 6 * nCasterLevel;//Damage is at max
}
if ((nMetaMagic & METAMAGIC_EMPOWER))
{
nDamage = nDamage + (nDamage/2); //Damage/is +50%
}
nDamage += SpellDamagePerDice(OBJECT_SELF, nCasterLevel);
CasterLvl +=SPGetPenetr();
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_ELECTRICAL);
//Damage the initial target
if (spellsIsTarget(oFirstTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
{
//Fire cast spell at event for the specified target
SignalEvent(oFirstTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING));
//Make an SR Check
if (!PRCDoResistSpell(OBJECT_SELF, oFirstTarget,CasterLvl))
{
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
//Adjust damage via Reflex Save or Evasion or Improved Evasion
nDamStrike = PRCGetReflexAdjustedDamage(nDamage, oFirstTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY);
//Set the damage effect for the first target
eDamage = PRCEffectDamage(oTarget, nDamStrike, EleDmg);
//Apply damage to the first target and the VFX impact.
if(nDamStrike > 0)
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oFirstTarget);
PRCBonusDamage(oFirstTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oFirstTarget);
}
}
}
//Apply the lightning stream effect to the first target, connecting it with the caster
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oFirstTarget,0.5,FALSE);
//Reinitialize the lightning effect so that it travels from the first target to the next target
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oFirstTarget, BODY_NODE_CHEST);
float fDelay = 0.2;
int nCnt = 0;
// *
// * Secondary Targets
// *
//Get the first target in the spell shape
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
while (GetIsObjectValid(oTarget) && nCnt < nCasterLevel)
{
//Make sure the caster's faction is not hit and the first target is not hit
if (oTarget != oFirstTarget && spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
{
//Connect the new lightning stream to the older target and the new target
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5,FALSE));
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING));
//Do an SR check
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
{
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
nDamage = d6(nCasterLevel) ;
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
{
nDamage = 6 * nCasterLevel;//Damage is at max
}
if ((nMetaMagic & METAMAGIC_EMPOWER))
{
nDamage = nDamage + (nDamage/2); //Damage/is +50%
}
nDamage += SpellDamagePerDice(OBJECT_SELF, nCasterLevel);
//Adjust damage via Reflex Save or Evasion or Improved Evasion
nDamStrike = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY);
//Apply the damage and VFX impact to the current target
eDamage = PRCEffectDamage(oTarget, nDamStrike /2, EleDmg);
if(nDamStrike > 0) //age > 0)
{
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget));
PRCBonusDamage(oTarget);
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget));
}
}
oHolder = oTarget;
//change the currect holder of the lightning stream to the current target
if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
{
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST);
}
else
{
// * April 2003 trying to make sure beams originate correctly
effect eNewLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST);
if(GetIsEffectValid(eNewLightning))
{
eLightning = eNewLightning;
}
}
fDelay = fDelay + 0.1f;
}
//Count the number of targets that have been hit.
if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
{
nCnt++;
}
// April 2003: Setting the new origin for the beam
// oFirstTarget = oTarget;
//Get the next target in the shape.
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
}

View File

@ -0,0 +1,36 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Good
//:: NW_S0_CircGoodA
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from good effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
if(GetIsFriend(oTarget, oCaster))
{
//Declare major variables
effect eLink = PRCCreateProtectionFromAlignmentLink(ALIGNMENT_CHAOTIC);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_MAGIC_CIRCLE_AGAINST_CHAOS, FALSE));
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget, 0.0f, FALSE);
}
PRCSetSchool();
}

View File

@ -0,0 +1,42 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Good
//:: NW_S0_CircGoodB
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from good effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
if(GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_CHAOS, oTarget))
{
int bValid = FALSE;
//Search through the valid effects on the target.
effect eAOE = GetFirstEffect(oTarget);
while(GetIsEffectValid(eAOE) && !bValid)
{
if(GetEffectCreator(eAOE) == GetAreaOfEffectCreator()
&& GetEffectSpellId(eAOE) == SPELL_MAGIC_CIRCLE_AGAINST_CHAOS
&& GetEffectType(eAOE) != EFFECT_TYPE_AREA_OF_EFFECT)
{
RemoveEffect(oTarget, eAOE);
bValid = TRUE;
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
PRCSetSchool();
}

View File

@ -0,0 +1,152 @@
//::///////////////////////////////////////////////
//:: Circle of Death
//:: NW_S0_CircDeath
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
The caster slays a number of HD worth of creatures
equal to 1d4 times level. The creature gets a
Fort Save or dies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: June 1, 2001
//:://////////////////////////////////////////////
//:: Last Updated By: Aidan Scanlan
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Update Pass By: Preston W, On: July 25, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
//Declare major variables
object oTarget;
object oLowest;
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_20);
int bContinueLoop = FALSE; //Used to determine if we have a next valid target
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
int nHD = d4(CasterLvl); //Roll to see how many HD worth of creature will be killed
int nMetaMagic = PRCGetMetaMagicFeat();
int nCurrentHD;
int bAlreadyAffected;
int nMax = 10;// maximun hd creature affected, set this to 9 so that a lower HD creature is chosen automatically
//Also 9 is the maximum HD a creature can have and still be affected by the spell
float fDelay;
string sIdentifier = GetTag(OBJECT_SELF);
//Enter Metamagic conditions
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
{
nHD = 4 * CasterLvl;
}
if ((nMetaMagic & METAMAGIC_EMPOWER))
{
nHD = nHD + (nHD/2); //Damage/Healing is +50%
}
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, PRCGetSpellTargetLocation());
//Check for at least one valid object to start the main loop
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
if (GetIsObjectValid(oTarget))
{
bContinueLoop = TRUE;
}
// The above checks to see if there is at least one valid target. If no value target exists we do not enter
// the loop.
CasterLvl +=SPGetPenetr();
while ((nHD > 0) && (bContinueLoop))
{
int nLow = nMax; //Set nLow to the lowest HD creature in the last pass through the loop
bContinueLoop = FALSE; //Set this to false so that the loop only continues in the case of new low HD creature
//Get first target creature in loop
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
while (GetIsObjectValid(oTarget))
{
//Make sure the currect target is not an enemy
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
{
//Get a local set on the creature that checks if the spell has already allowed them to save
bAlreadyAffected = GetLocalInt(oTarget, "bDEATH" + sIdentifier);
if (!bAlreadyAffected)
{
nCurrentHD = GetHitDice(oTarget);
//If the selected creature is of lower HD then the current nLow value and
//the HD of the creature is of less HD than the number of HD available for
//the spell to affect then set the creature as the currect primary target
if(nCurrentHD < nLow && nCurrentHD <= nHD)
{
nLow = nCurrentHD;
oLowest = oTarget;
bContinueLoop = TRUE;
}
}
}
//Get next target in shape to test for a new
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
}
//Check to make sure that oLowest has changed
if(bContinueLoop == TRUE)
{
//Fire cast spell at event for the specified target
SignalEvent(oLowest, EventSpellCastAt(OBJECT_SELF, SPELL_CIRCLE_OF_DEATH));
fDelay = PRCGetRandomDelay();
if(!PRCDoResistSpell(OBJECT_SELF, oLowest,CasterLvl, fDelay))
{
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
//Make a Fort Save versus death effects
if(!PRCMySavingThrow(SAVING_THROW_FORT, oLowest, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
{
DeathlessFrenzyCheck(oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oLowest);
//DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oLowest));
}
}
//Even if the target made their save mark them as having been affected by the spell
SetLocalInt(oLowest, "bDEATH" + sIdentifier, TRUE);
//Destroy the local after 1/4 of a second in case other Circles of Death are cast on
//the creature laster
DelayCommand(fDelay + 0.25, DeleteLocalInt(oLowest, "bDEATH" + sIdentifier));
//Adjust the number of HD that have been affected by the spell
nHD = nHD - GetHitDice(oLowest);
oLowest = OBJECT_INVALID;
}
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}

View File

@ -0,0 +1,130 @@
//::///////////////////////////////////////////////
//:: Circle of Doom
//:: nw_s0_circdoom.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Spell level: cleric 5
Innate level: 5
School: necromancy
Descriptor: negative
Components: verbal, somatic
Range: medium (20 meters)
Area of effect: huge (6.67 meter radius)
Duration: instant
Save: fortitude 1/2
Spell resistance: yes
Additional counterspells: healing circle
All enemies within the area of effect
are struck with negative energy that causes 1d8
points of negative energy damage, +1 point per
caster level. Negative energy spells have a
reverse effect on undead, healing them instead of
harming them.
*/
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk and Keith Soleski
//:: Created On: Jan 31, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Update Pass By: Preston W, On: July 25, 2001
//:: modified by mr_bumpkin Dec 4, 2003
//:: Added code to maximize for Faith Healing and Blast Infidel
//:: Aaon Graywolf - Jan 7, 2003
#include "prc_inc_function"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
//Declare major variables
object oCaster = OBJECT_SELF;
location lTarget = PRCGetSpellTargetLocation();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nMetaMagic = PRCGetMetaMagicFeat();
int nPenetr = nCasterLevel + SPGetPenetr();
int nDamage;
float fDelay;
//Limit Caster Level
if(nCasterLevel > 20)
nCasterLevel = 20;
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_M);
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_10);
effect eDam;
effect eHeal;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, lTarget);
//Get first target in the specified area
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget);
while(GetIsObjectValid(oTarget))
{
//Roll damage
nDamage = d8();
//Enter Metamagic conditions
int iBlastFaith = BlastInfidelOrFaithHeal(oCaster, oTarget, DAMAGE_TYPE_NEGATIVE, FALSE);
if((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
nDamage = 8;
if(nMetaMagic & METAMAGIC_EMPOWER)
nDamage = nDamage + (nDamage/2);
nDamage = nDamage + nCasterLevel;
fDelay = PRCGetRandomDelay();
//If the target is an allied undead it is healed
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD
|| (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD)
|| GetLocalInt(oTarget, "AcererakHealing"))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CIRCLE_OF_DOOM, FALSE));
//Set the heal effect
eHeal = PRCEffectHeal(nDamage, oTarget);
//Apply the impact VFX and healing effect
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
}
else
{
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
{
nDamage += SpellDamagePerDice(oCaster, 1);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CIRCLE_OF_DOOM));
//Make an SR Check
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
{
int nDC = PRCGetSaveDC(oTarget, oCaster);
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oCaster, fDelay))
{
if(GetHasMettle(oTarget, SAVING_THROW_FORT))
// This script does nothing if it has Mettle, bail
nDamage = 0;
else
nDamage = nDamage/2;
}
if(nDamage)
{
//Set Damage
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE);
//Apply impact VFX and damage
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
}
}
//Get next target in the specified area
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget);
}
PRCSetSchool();
}

View File

@ -0,0 +1,50 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Evil
//:: NW_S0_CircEvilA
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from evil effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
#include "prc_inc_template"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
object oAOE = OBJECT_SELF;
int nSpellID = GetLocalInt(oAOE, "X2_AoE_SpellID");
effect eLink;
if(GetIsFriend(oTarget, oCaster))
{
//Declare major variables
if (GetHasTemplate(TEMPLATE_SAINT, oCaster))
{
eLink = PRCCreateProtectionFromAlignmentLink(ALIGNMENT_EVIL, 2);
}
else
{
eLink = PRCCreateProtectionFromAlignmentLink(ALIGNMENT_EVIL);
}
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_MAGIC_CIRCLE_AGAINST_EVIL, FALSE));
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget, 0.0f, FALSE);
}
if (nSpellID == SPELL_HALLOW)
SetLocalInt(oTarget, "HallowTurn", TRUE);
PRCSetSchool();
}

View File

@ -0,0 +1,46 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Evil
//:: NW_S0_CircEvilB
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from evil effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
object oAOE = OBJECT_SELF;
int nSpellID = GetLocalInt(oAOE, "X2_AoE_SpellID");
if(GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL, oTarget))
{
int bValid = FALSE;
//Search through the valid effects on the target.
effect eAOE = GetFirstEffect(oTarget);
while(GetIsEffectValid(eAOE) && !bValid)
{
if(GetEffectCreator(eAOE) == GetAreaOfEffectCreator()
&& (GetEffectSpellId(eAOE) == SPELL_MAGIC_CIRCLE_AGAINST_EVIL || GetEffectSpellId(eAOE) == SPELL_HALLOW)
&& GetEffectType(eAOE) != EFFECT_TYPE_AREA_OF_EFFECT)
{
RemoveEffect(oTarget, eAOE);
bValid = TRUE;
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
if (nSpellID == SPELL_HALLOW)
DeleteLocalInt(oTarget, "HallowTurn");
PRCSetSchool();
}

View File

@ -0,0 +1,36 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Good
//:: NW_S0_CircGoodA
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from good effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
if(GetIsFriend(oTarget, oCaster))
{
//Declare major variables
effect eLink = PRCCreateProtectionFromAlignmentLink(ALIGNMENT_GOOD);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_MAGIC_CIRCLE_AGAINST_GOOD, FALSE));
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget, 0.0f, FALSE);
}
PRCSetSchool();
}

View File

@ -0,0 +1,42 @@
//::///////////////////////////////////////////////
//:: Magic Cirle Against Good
//:: NW_S0_CircGoodB
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Add basic protection from good effects to
entering allies.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 20, 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
if(GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_GOOD, oTarget))
{
int bValid = FALSE;
//Search through the valid effects on the target.
effect eAOE = GetFirstEffect(oTarget);
while(GetIsEffectValid(eAOE) && !bValid)
{
if(GetEffectCreator(eAOE) == GetAreaOfEffectCreator()
&& GetEffectSpellId(eAOE) == SPELL_MAGIC_CIRCLE_AGAINST_GOOD
&& GetEffectType(eAOE) != EFFECT_TYPE_AREA_OF_EFFECT)
{
RemoveEffect(oTarget, eAOE);
bValid = TRUE;
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
PRCSetSchool();
}

Some files were not shown because too many files have changed in this diff Show More