diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic.slx b/[ADM] Integrated Logic/ADM_Integrated_Logic.slx new file mode 100644 index 00000000..670899c3 Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic.slx differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic.slxc b/[ADM] Integrated Logic/ADM_Integrated_Logic.slxc new file mode 100644 index 00000000..235fde9b Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic.slxc differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.bat b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.bat new file mode 100644 index 00000000..13cad618 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.bat @@ -0,0 +1,16 @@ + +set skipSetupArg=%2 +if "%skipSetupArg%" NEQ "skip_setup_msvc" ( +call "setup_msvc.bat" +) + +cd . + +if "%1"=="" (nmake -f ADM_Integrated_Logic.mk all) else (nmake -f ADM_Integrated_Logic.mk %1) +@if errorlevel 1 goto error_exit + +exit /B 0 + +:error_exit +echo The make command returned an error of %errorlevel% +exit /B 1 \ No newline at end of file diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.c b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.c new file mode 100644 index 00000000..dcf43c27 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.c @@ -0,0 +1,1565 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ADM_Integrated_Logic.c + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#include "ADM_Integrated_Logic.h" +#include +#include "ADM_Integrated_Logic_private.h" +#include +#include + +/* Named constants for Chart: '/Chart' */ +#define ADM_Integrated_Logic_IN_HAC_OFF ((uint8_t)1U) +#define ADM_Integrated_Logic_IN_HAC_ON ((uint8_t)2U) + +/* Block signals and states (default storage) */ +DW_ADM_Integrated_Logic_T ADM_Integrated_Logic_DW; + +/* External inputs (root inport signals with default storage) */ +ExtU_ADM_Integrated_Logic_T ADM_Integrated_Logic_U; + +/* External outputs (root outports fed by signals with default storage) */ +ExtY_ADM_Integrated_Logic_T ADM_Integrated_Logic_Y; + +/* Real-time model */ +static RT_MODEL_ADM_Integrated_Logic_T ADM_Integrated_Logic_M_; +RT_MODEL_ADM_Integrated_Logic_T *const ADM_Integrated_Logic_M = + &ADM_Integrated_Logic_M_; +static void rate_scheduler(void); + +/* + * This function updates active task flag for each subrate. + * The function is called at model base rate, hence the + * generated code self-manages all its subrates. + */ +static void rate_scheduler(void) +{ + /* Compute which subrates run during the next base time step. Subrates + * are an integer multiple of the base rate counter. Therefore, the subtask + * counter is reset when it reaches its limit (zero means run). + */ + (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1])++; + if ((ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1]) > 499) {/* Sample time: [1.0s, 0.0s] */ + ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] = 0; + } +} + +/* + * Output and update for atomic system: + * '/Calculate_F_c' + * '/Calculate_F_c1' + */ +void ADM_Integrated_Lo_Calculate_F_c(double rtu_W, double rtu_theta, double + *rty_F_c) +{ + /* : F_c= W*sin(theta); */ + *rty_F_c = rtu_W * sin(rtu_theta); +} + +/* + * Output and update for atomic system: + * '/MATLAB Function1' + * '/MATLAB Function5' + */ +void ADM_Integrated__MATLABFunction1(double rtu_u, double *rty_y) +{ + *rty_y = rtu_u; + + /* : if u < 140 */ + if (rtu_u < 140.0) { + /* : u = 140; */ + *rty_y = 140.0; + } + + /* : y = u; */ +} + +/* + * Output and update for atomic system: + * '/MATLAB Function2' + * '/MATLAB Function6' + */ +void ADM_Integrated__MATLABFunction2(double rtu_u, double *rty_y) +{ + *rty_y = rtu_u; + + /* : if u > -140 */ + if (rtu_u > -140.0) { + /* : u = -140; */ + *rty_y = -140.0; + } + + /* : y = u; */ +} + +/* Model step function */ +void ADM_Integrated_Logic_step(void) +{ + double rtb_Add1; + double rtb_Add1_tmp; + double rtb_Add3; + double rtb_Add_e; + double rtb_Brake_Torque_Cmd; + double rtb_Desired_Torque; + double rtb_Error_m; + double rtb_Gain_c; + double rtb_Integrator_1; + double rtb_Product1_e; + double rtb_Product1_f; + double rtb_Product1_iz; + double rtb_Product1_m; + double rtb_Product1_pd; + double rtb_Sum1_aj; + double rtb_Sum1_i2; + double rtb_Sum1_lm; + double rtb_Sum1_o1; + double rtb_Sum1_p; + double rtb_Sum_f; + double rtb_Switch2; + double rtb_UkYk1; + double rtb_UkYk1_j; + double rtb_Vx_Cmd_R; + double rtb_Yk1_e; + double rtb_Yk1_p; + double rtb_deltafalllimit_m; + double rtb_output_a; + double rtb_output_p; + double rtb_y_l; + int32_t temp_gear; + bool rtb_Compare; + bool rtb_Compare_d; + + /* RelationalOperator: '/Compare' incorporates: + * Constant: '/Constant' + * Inport: '/GV_Operation_Mode' + */ + rtb_Compare = (ADM_Integrated_Logic_U.GV_Operation_Mode == 2.0); + if (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] == 0) { + /* Step: '/Step' incorporates: + * DigitalClock: '/Digital Clock' + */ + rtb_Add_e = ((ADM_Integrated_Logic_M->Timing.clockTick1) * 1.0); + if (rtb_Add_e < 0.0) { + temp_gear = 0; + } else { + temp_gear = 1000; + } + + /* Product: '/Product' incorporates: + * Step: '/Step' + */ + rtb_Integrator_1 = (double)temp_gear * rtb_Add_e; + + /* Saturate: '/Saturation' */ + if (rtb_Integrator_1 > 1000.0) { + /* Saturate: '/Saturation' */ + ADM_Integrated_Logic_DW.Saturation = 1000.0; + } else if (rtb_Integrator_1 < 0.0) { + /* Saturate: '/Saturation' */ + ADM_Integrated_Logic_DW.Saturation = 0.0; + } else { + /* Saturate: '/Saturation' */ + ADM_Integrated_Logic_DW.Saturation = rtb_Integrator_1; + } + + /* End of Saturate: '/Saturation' */ + } + + /* Product: '/delta rise limit' incorporates: + * Constant: '/Upper_Torq' + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Switch2 = 0.016; + + /* UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + rtb_Yk1_e = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_m; + + /* Product: '/delta rise limit' incorporates: + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Integrator_1 = 0.002; + + /* Saturate: '/Pitch_Saturation' incorporates: + * DiscreteIntegrator: '/Integrator_2' + */ + if (ADM_Integrated_Logic_DW.Integrator_2_DSTATE > 10.0) { + rtb_Add_e = 10.0; + } else if (ADM_Integrated_Logic_DW.Integrator_2_DSTATE < -10.0) { + rtb_Add_e = -10.0; + } else { + rtb_Add_e = ADM_Integrated_Logic_DW.Integrator_2_DSTATE; + } + + /* Sum: '/Difference Inputs1' incorporates: + * Saturate: '/Pitch_Saturation' + * + * Block description for '/Difference Inputs1': + * + * Add in CPU + */ + rtb_UkYk1 = rtb_Add_e - rtb_Yk1_e; + + /* Switch: '/Switch2' incorporates: + * RelationalOperator: '/LowerRelop1' + */ + if (rtb_UkYk1 <= 0.002) { + /* Switch: '/Switch' incorporates: + * RelationalOperator: '/UpperRelop' + */ + if (rtb_UkYk1 < -0.002) { + rtb_Integrator_1 = -0.002; + } else { + rtb_Integrator_1 = rtb_UkYk1; + } + + /* End of Switch: '/Switch' */ + } + + /* End of Switch: '/Switch2' */ + + /* Sum: '/Difference Inputs2' + * + * Block description for '/Difference Inputs2': + * + * Add in CPU + */ + rtb_Yk1_e += rtb_Integrator_1; + + /* MATLAB Function: '/Calculate_F_c' incorporates: + * Gain: '/Gain' + */ + ADM_Integrated_Lo_Calculate_F_c(ADM_Integrated_Logic_ConstB.W_value, + 0.017453292519943295 * rtb_Yk1_e, &rtb_UkYk1); + + /* Gain: '/Gain2' incorporates: + * Constant: '/Radius' + * Product: '/Multiply3' + * Sum: '/Required_Brake_Cal' + */ + /* : F_R= C_r*W*cos(theta); */ + rtb_Integrator_1 = rtb_UkYk1 * 0.292 * 0.083822296730930432; + + /* Saturate: '/Saturation' */ + if (rtb_Integrator_1 > 60.0) { + rtb_Integrator_1 = 60.0; + } else if (rtb_Integrator_1 < 0.0) { + rtb_Integrator_1 = 0.0; + } + + /* Sum: '/Difference Inputs1' incorporates: + * Saturate: '/Saturation' + * UnitDelay: '/Delay Input2' + * + * Block description for '/Difference Inputs1': + * + * Add in CPU + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + rtb_UkYk1 = rtb_Integrator_1 - ADM_Integrated_Logic_DW.DelayInput2_DSTATE; + + /* Switch: '/Switch2' incorporates: + * RelationalOperator: '/LowerRelop1' + */ + if (rtb_UkYk1 <= 0.016) { + /* Switch: '/Switch' incorporates: + * RelationalOperator: '/UpperRelop' + */ + if (rtb_UkYk1 < -0.16) { + rtb_Switch2 = -0.16; + } else { + rtb_Switch2 = rtb_UkYk1; + } + + /* End of Switch: '/Switch' */ + } + + /* End of Switch: '/Switch2' */ + + /* Sum: '/Difference Inputs2' incorporates: + * UnitDelay: '/Delay Input2' + * + * Block description for '/Difference Inputs2': + * + * Add in CPU + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + rtb_UkYk1 = rtb_Switch2 + ADM_Integrated_Logic_DW.DelayInput2_DSTATE; + + /* Gain: '/Grade_GAIN' */ + rtb_Desired_Torque = 0.8 * rtb_UkYk1; + + /* MATLAB Function: '/Vx_OutPut_Function' incorporates: + * Constant: '/Constant' + * Inport: '/GV_BrakeTorqueCommand' + * Inport: '/GV_Vx_Command' + * Inport: '/GV_Vx_Limit' + * RelationalOperator: '/Compare' + */ + /* : if Brake_Input == 0 */ + if (ADM_Integrated_Logic_U.GV_BrakeTorqueCommand < 50.0) { + /* : if Vx_Limit <= Vx_Kph */ + if (ADM_Integrated_Logic_U.GV_Vx_Limit <= + ADM_Integrated_Logic_U.GV_Vx_Command) { + /* : Vx_Output = Vx_Limit; */ + rtb_deltafalllimit_m = ADM_Integrated_Logic_U.GV_Vx_Limit; + } else { + /* : else */ + /* : Vx_Output = Vx_Kph; */ + rtb_deltafalllimit_m = ADM_Integrated_Logic_U.GV_Vx_Command; + } + } else { + /* : else */ + /* : Vx_Output = 0; */ + rtb_deltafalllimit_m = 0.0; + } + + /* End of MATLAB Function: '/Vx_OutPut_Function' */ + + /* RateLimiter: '/Input_Vx_RateLimiter' */ + rtb_output_a = rtb_deltafalllimit_m - ADM_Integrated_Logic_DW.PrevY; + if (rtb_output_a > 0.004) { + rtb_Vx_Cmd_R = ADM_Integrated_Logic_DW.PrevY + 0.004; + } else if (rtb_output_a < -0.008) { + rtb_Vx_Cmd_R = ADM_Integrated_Logic_DW.PrevY - 0.008; + } else { + rtb_Vx_Cmd_R = rtb_deltafalllimit_m; + } + + ADM_Integrated_Logic_DW.PrevY = rtb_Vx_Cmd_R; + + /* End of RateLimiter: '/Input_Vx_RateLimiter' */ + + /* RelationalOperator: '/Compare' incorporates: + * Constant: '/Constant' + * Inport: '/GV_BrakeTorqueCommand' + */ + rtb_Compare_d = (ADM_Integrated_Logic_U.GV_BrakeTorqueCommand >= 100.0); + + /* Delay: '/Memory' */ + rtb_deltafalllimit_m = ADM_Integrated_Logic_DW.Memory_DSTATE; + + /* MATLAB Function: '/Gear_FUNCTION1' incorporates: + * Inport: '/GV_VCU_GearSelStat' + * Inport: '/GV_Vx_Fbk' + */ + /* : SAFE_SPEED_THRESHOLD = 0; */ + /* ӵ(kph) */ + /* ⺻: */ + /* : output = Current_Gear; */ + /* 1. P û : ¿ 켱 ó */ + /* : if Gear_Cmd == 0 */ + if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 0.0) { + /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD && Brake_Torque_Cmd == 1 */ + if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) && rtb_Compare_d) { + /* : output = 0; */ + rtb_deltafalllimit_m = 0.0; + + /* P */ + } else { + /* : else */ + /* : output = Current_Gear; */ + /* */ + } + } else { + /* 2. ¿ ó */ + /* : switch Current_Gear */ + switch ((int32_t)rtb_deltafalllimit_m) { + case 0: + /* : case 0 */ + /* P */ + /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD */ + if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) && + ((ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 1.0) || + (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 3.0) || + (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0))) { + /* : if Gear_Cmd == 1 || Gear_Cmd == 3 || Gear_Cmd == 2 */ + /* : output = 2; */ + rtb_deltafalllimit_m = 2.0; + + /* P -> N ( N ľ ϹǷ) */ + } + break; + + case 1: + /* : case 1 */ + /* R */ + /* : if Gear_Cmd == 2 */ + if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0) { + /* : output = 2; */ + rtb_deltafalllimit_m = 2.0; + + /* R -> N */ + } + break; + + case 2: + /* : case 2 */ + /* N */ + /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD && Brake_Torque_Cmd == 1 */ + if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) && rtb_Compare_d) { + /* : if Gear_Cmd == 1 */ + if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 1.0) { + /* : output = 1; */ + rtb_deltafalllimit_m = 1.0; + + /* N -> R */ + } else if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 3.0) { + /* : elseif Gear_Cmd == 3 */ + /* : output = 3; */ + rtb_deltafalllimit_m = 3.0; + + /* N -> D */ + } + } + break; + + case 3: + /* : case 3 */ + /* D */ + /* : if Gear_Cmd == 2 */ + if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0) { + /* : output = 2; */ + rtb_deltafalllimit_m = 2.0; + + /* D -> N */ + } + break; + } + } + + /* End of MATLAB Function: '/Gear_FUNCTION1' */ + + /* Chart: '/Chart' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * Inport: '/GV_MCU_RPM' + */ + if (ADM_Integrated_Logic_DW.is_active_c6_ADM_Integrated_Log == 0U) { + ADM_Integrated_Logic_DW.is_active_c6_ADM_Integrated_Log = 1U; + ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic = + ADM_Integrated_Logic_IN_HAC_OFF; + + /* State HAC OFF */ + } else if (ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic == + ADM_Integrated_Logic_IN_HAC_OFF) { + /* : sf_internal_predicateOutput = RPM_Input < rpm_threshold_low; */ + if (ADM_Integrated_Logic_U.GV_MCU_RPM < -50.0) { + ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic = + ADM_Integrated_Logic_IN_HAC_ON; + + /* State HAC ON */ + } else { + /* Outport: '/Debug_HAC_RPM_Decision' */ + /* : HAC_Output = 0; */ + ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision = 0.0; + } + + /* case IN_HAC_ON: */ + /* : sf_internal_predicateOutput = RPM_Input > rpm_threshold_high; */ + } else if (ADM_Integrated_Logic_U.GV_MCU_RPM > 150.0) { + ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic = + ADM_Integrated_Logic_IN_HAC_OFF; + + /* State HAC OFF */ + } else { + /* Outport: '/Debug_HAC_RPM_Decision' */ + /* : HAC_Output = 1; */ + ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision = 1.0; + } + + /* End of Chart: '/Chart' */ + + /* MATLAB Function: '/HAC_OFF_OK_Func' */ + /* Input Parameters: */ + /* Desired_Brake_Torque_Cmd: Commanded brake torque when HAC is ON */ + /* Desired_Torque: Required torque at the slope */ + /* Feedback_Torque: Torque output from the motor */ + /* HAC_Flag: Current HAC state flag */ + /* Output Parameters: */ + /* Brake_Torque_Cmd: Actual brake torque command */ + /* HAC_ON_OFF_CHECK: Status of HAC (ON or OFF) */ + /* Persistent variable to track if HAC has ever been ON */ + /* Initialize HAC_ON_FLAG if it is empty */ + /* : if isempty(HAC_ON_FLAG) */ + /* Persistent variable for torque smoothing logic */ + /* : if isempty(Smoothed_Torque) */ + /* Persistent variable to store HAC ON Desired Torque */ + /* : if isempty(HAC_Desired_Torque) */ + /* Persistent variable to track HAC ON time */ + /* : if isempty(HAC_ON_Timer) */ + /* Initialize outputs */ + /* : Brake_Torque_Cmd = 0; */ + rtb_Brake_Torque_Cmd = 0.0; + + /* Outport: '/Debug_HAC_FLAG' incorporates: + * MATLAB Function: '/HAC_OFF_OK_Func' + */ + /* : HAC_ON_OFF_CHECK = 0; */ + ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 0.0; + + /* MATLAB Function: '/HAC_OFF_OK_Func' incorporates: + * Constant: '/Accel_Cmd ' + * Constant: '/Brake_Cmd' + * Constant: '/Gear_D' + * Inport: '/GV_BrakeTorqueCommand' + * Inport: '/GV_MCU_EstTrq' + * Outport: '/Debug_HAC_RPM_Decision' + * RelationalOperator: '/Relational Operator' + * RelationalOperator: '/Relational Operator1' + * RelationalOperator: '/Relational Operator2' + * Sum: '/HAC_Flags_Add' + */ + /* Check if HAC is ON (HAC_Flag >= 4) */ + /* : if HAC_Flag >= 4 */ + if ((double)(((ADM_Integrated_Logic_U.GV_BrakeTorqueCommand <= 20.0) + + (rtb_Vx_Cmd_R <= 2.0)) + (rtb_deltafalllimit_m == 3.0)) + + ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision >= 4.0) { + /* : if HAC_ON_FLAG == 0 */ + if (ADM_Integrated_Logic_DW.HAC_ON_FLAG == 0.0) { + /* : HAC_ON_Timer = 0; */ + ADM_Integrated_Logic_DW.HAC_ON_Timer = 0.0; + + /* Reset timer when HAC turns ON */ + } + + /* : HAC_ON_FLAG = 1; */ + ADM_Integrated_Logic_DW.HAC_ON_FLAG = 1.0; + + /* : Brake_Torque_Cmd = Desired_Brake_Torque_Cmd; */ + rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Saturation; + + /* : Smoothed_Torque = Desired_Brake_Torque_Cmd; */ + ADM_Integrated_Logic_DW.Smoothed_Torque = ADM_Integrated_Logic_DW.Saturation; + + /* : if HAC_ON_Timer < 3 */ + if (ADM_Integrated_Logic_DW.HAC_ON_Timer < 3.0) { + /* Update Desired Torque for the first 3 seconds */ + /* : HAC_Desired_Torque = Desired_Torque; */ + ADM_Integrated_Logic_DW.HAC_Desired_Torque = rtb_Desired_Torque; + + /* : HAC_ON_Timer = HAC_ON_Timer + 1/200; */ + ADM_Integrated_Logic_DW.HAC_ON_Timer += 0.005; + + /* Assuming 200 Hz update rate */ + } + + /* Outport: '/Debug_HAC_FLAG' */ + /* : HAC_ON_OFF_CHECK = 1; */ + ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 1.0; + + /* : else */ + /* If HAC has been ON and HAC_Flag drops below 4 */ + /* : if HAC_ON_FLAG == 1 */ + } else if (ADM_Integrated_Logic_DW.HAC_ON_FLAG == 1.0) { + /* Check if Feedback Torque exceeds Desired Torque */ + /* : if Feedback_Torque >= HAC_Desired_Torque */ + if (ADM_Integrated_Logic_U.GV_MCU_EstTrq >= + ADM_Integrated_Logic_DW.HAC_Desired_Torque) { + /* : HAC_ON_OFF_CHECK = 0; */ + /* Apply smoothing logic to reduce torque gradually */ + /* : Smoothed_Torque = Smoothed_Torque - 0.05 * Smoothed_Torque; */ + ADM_Integrated_Logic_DW.Smoothed_Torque -= 0.05 * + ADM_Integrated_Logic_DW.Smoothed_Torque; + + /* Adjust smoothing factor as needed */ + /* : if Smoothed_Torque < 0.01 */ + if (ADM_Integrated_Logic_DW.Smoothed_Torque < 0.01) { + /* Threshold to consider torque as zero */ + /* : Smoothed_Torque = 0; */ + ADM_Integrated_Logic_DW.Smoothed_Torque = 0.0; + + /* : HAC_ON_FLAG = 0; */ + ADM_Integrated_Logic_DW.HAC_ON_FLAG = 0.0; + + /* Reset HAC_ON_FLAG if fully off */ + /* : HAC_Desired_Torque = 0; */ + ADM_Integrated_Logic_DW.HAC_Desired_Torque = 0.0; + + /* Reset Desired Torque when HAC is OFF */ + /* : HAC_ON_Timer = 0; */ + ADM_Integrated_Logic_DW.HAC_ON_Timer = 0.0; + + /* Reset Timer */ + } + + /* : Brake_Torque_Cmd = Smoothed_Torque; */ + rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Smoothed_Torque; + } else { + /* : else */ + /* Keep the brake torque command if torque condition is not met */ + /* : Brake_Torque_Cmd = Desired_Brake_Torque_Cmd; */ + rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Saturation; + + /* : Smoothed_Torque = Desired_Brake_Torque_Cmd; */ + ADM_Integrated_Logic_DW.Smoothed_Torque = + ADM_Integrated_Logic_DW.Saturation; + + /* Outport: '/Debug_HAC_FLAG' */ + /* : HAC_ON_OFF_CHECK = 1; */ + ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 1.0; + } + } + + /* MATLAB Function: '/GearCondition_Brake' */ + /* : if data == 1 */ + if (rtb_deltafalllimit_m == 1.0) { + /* : output = -1; */ + rtb_output_a = -1.0; + } else if (rtb_deltafalllimit_m == 3.0) { + /* : elseif data == 3 */ + /* : output = 1; */ + rtb_output_a = 1.0; + } else { + /* : else */ + /* : output = 0; */ + rtb_output_a = 0.0; + } + + /* End of MATLAB Function: '/GearCondition_Brake' */ + + /* Gain: '/Brake_GAIN' incorporates: + * DiscreteTransferFcn: '/Discrete Transfer Fcn' + */ + rtb_Integrator_1 = 0.0625 * ADM_Integrated_Logic_DW.DiscreteTransferFcn_states + * -80.0; + + /* Saturate: '/Saturation' */ + if (rtb_Integrator_1 > 1000.0) { + rtb_Integrator_1 = 1000.0; + } else if (rtb_Integrator_1 < 0.0) { + rtb_Integrator_1 = 0.0; + } + + /* Product: '/Multiply2' incorporates: + * Saturate: '/Saturation' + */ + rtb_Integrator_1 *= rtb_output_a; + + /* RateLimiter: '/Brake_Out_RateLimiter' */ + rtb_output_a = rtb_Integrator_1 - ADM_Integrated_Logic_DW.PrevY_o; + if (rtb_output_a > 3.0) { + rtb_Integrator_1 = ADM_Integrated_Logic_DW.PrevY_o + 3.0; + } else if (rtb_output_a < -3.0) { + rtb_Integrator_1 = ADM_Integrated_Logic_DW.PrevY_o - 3.0; + } + + ADM_Integrated_Logic_DW.PrevY_o = rtb_Integrator_1; + + /* End of RateLimiter: '/Brake_Out_RateLimiter' */ + + /* Saturate: '/Brake_Saturation' */ + if (rtb_Integrator_1 > 1000.0) { + rtb_Integrator_1 = 1000.0; + } else if (rtb_Integrator_1 < 0.0) { + rtb_Integrator_1 = 0.0; + } + + /* End of Saturate: '/Brake_Saturation' */ + + /* MATLAB Function: '/Emergency_Brake_Func' incorporates: + * Inport: '/GV_Vx_Fbk' + * Sum: '/Add' + */ + /* : if Emergency_Flag == 1 */ + if (rtb_Compare) { + /* : Emergency_Brake_Output = Vehicle_Speed*100; */ + rtb_output_a = ADM_Integrated_Logic_U.GV_Vx_Fbk * 100.0; + } else { + /* : else */ + /* : Emergency_Brake_Output = Brake_Torque_Cmd; */ + rtb_output_a = rtb_Brake_Torque_Cmd + rtb_Integrator_1; + } + + /* End of MATLAB Function: '/Emergency_Brake_Func' */ + + /* Saturate: '/Brake_Saturation' */ + if (rtb_output_a > 1500.0) { + /* Outport: '/GV_Brake_Command' */ + ADM_Integrated_Logic_Y.GV_Brake_Command = 1500.0; + } else if (rtb_output_a < 0.0) { + /* Outport: '/GV_Brake_Command' */ + ADM_Integrated_Logic_Y.GV_Brake_Command = 0.0; + } else { + /* Outport: '/GV_Brake_Command' */ + ADM_Integrated_Logic_Y.GV_Brake_Command = rtb_output_a; + } + + /* End of Saturate: '/Brake_Saturation' */ + + /* Outport: '/Debug_CC_Brake_Output' */ + ADM_Integrated_Logic_Y.Debug_CC_Brake_Output = rtb_Integrator_1; + + /* Outport: '/Debug_HAC_Brake_Output' */ + ADM_Integrated_Logic_Y.Debug_HAC_Brake_Output = rtb_Brake_Torque_Cmd; + + /* MATLAB Function: '/Gear_pos_out' incorporates: + * MATLAB Function: '/Target_RPM' + */ + /* Gear R ܿ - target rpm */ + /* : if data == 0 */ + if (rtb_deltafalllimit_m == 0.0) { + /* : temp_gear = 0; */ + rtb_output_p = 0.0; + + /* : temp_gear = 0; */ + temp_gear = 0; + } else { + if (rtb_deltafalllimit_m == 2.0) { + /* : elseif data == 2 */ + /* : temp_gear = 0; */ + rtb_output_p = 0.0; + } else if (rtb_deltafalllimit_m == 1.0) { + /* : elseif data == 1 */ + /* : temp_gear = -1; */ + rtb_output_p = -1.0; + } else if (rtb_deltafalllimit_m == 3.0) { + /* : elseif data == 3 */ + /* : temp_gear = 1; */ + rtb_output_p = 1.0; + } else { + /* : else */ + /* : temp_gear = 0; */ + rtb_output_p = 0.0; + } + + if (rtb_deltafalllimit_m == 2.0) { + /* : elseif data == 2 */ + /* : temp_gear = 0; */ + temp_gear = 0; + } else if (rtb_deltafalllimit_m == 1.0) { + /* : elseif data == 1 */ + /* : temp_gear = -1; */ + temp_gear = -1; + } else if (rtb_deltafalllimit_m == 3.0) { + /* : elseif data == 3 */ + /* : temp_gear = 1; */ + temp_gear = 1; + } else { + /* : else */ + /* : temp_gear = 0; */ + temp_gear = 0; + } + } + + /* End of MATLAB Function: '/Gear_pos_out' */ + + /* MATLAB Function: '/Target_RPM' */ + /* : output = temp_gear; */ + /* : gear_ratio = 11.93; */ + /* : Radius = 0.270781; */ + /* : engine_eff = 1; */ + /* Gear R ܿ - target rpm */ + /* : if data == 0 */ + /* : speed_m_per_s = Vx_Kph * 1000/3600; */ + /* : Target_RPM = (speed_m_per_s * gear_ratio * 60) / (Radius*2*pi)*engine_eff*temp_gear; */ + rtb_Brake_Torque_Cmd = rtb_Vx_Cmd_R * 1000.0 / 3600.0 * 11.93 * 60.0 / + 1.7013672006633955 * (double)temp_gear; + + /* RateLimiter: '/TargetSpd_RateLimiter' */ + rtb_output_a = rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.PrevY_a; + if (rtb_output_a > 0.4) { + rtb_output_a = ADM_Integrated_Logic_DW.PrevY_a + 0.4; + } else if (rtb_output_a < -0.8) { + rtb_output_a = ADM_Integrated_Logic_DW.PrevY_a - 0.8; + } else { + rtb_output_a = rtb_Brake_Torque_Cmd; + } + + ADM_Integrated_Logic_DW.PrevY_a = rtb_output_a; + + /* End of RateLimiter: '/TargetSpd_RateLimiter' */ + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Brake_Torque_Cmd = ((rtb_output_a + ADM_Integrated_Logic_DW.d1_DSTATE) * + 0.002 + 0.1041032953945969 * ADM_Integrated_Logic_DW.d_DSTATE) / + 0.1081032953945969; + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Sum1_i2 = (rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.d_DSTATE_i) * + 1000.0 - ADM_Integrated_Logic_DW.d1_DSTATE_p; + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Sum1_o1 = (rtb_Sum1_i2 - ADM_Integrated_Logic_DW.d_DSTATE_c) * 1000.0 - + ADM_Integrated_Logic_DW.d1_DSTATE_h; + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Sum1_lm = (rtb_Sum1_o1 - ADM_Integrated_Logic_DW.d_DSTATE_d) * 1000.0 - + ADM_Integrated_Logic_DW.d1_DSTATE_l; + + /* Gain: '/Gain' incorporates: + * Constant: '/Constant3' + * Constant: '/Constant4' + * Constant: '/Constant5' + * Product: '/Product' + * Product: '/Product1' + * Product: '/Product2' + * Sum: '/Add5' + */ + rtb_Gain_c = (((156.8 * rtb_Brake_Torque_Cmd + 212.8 * rtb_Sum1_i2) + 21.8 * + rtb_Sum1_o1) + rtb_Sum1_lm) * 9.44822373393802E-6; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant2' + * Delay: '/Delay' + * Delay: '/Delay1' + * Delay: '/Delay2' + * Delay: '/Delay3' + * Gain: '/gain1' + * Gain: '/gain3' + * Product: '/x(n), x(n-1), x(n-2)' + * Product: '/y(n-1)' + * Product: '/y(n-2)' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * Sum: '/Sum5' + * Sum: '/Sum6' + */ + rtb_Product1_pd = ((((2.0 * ADM_Integrated_Logic_DW.Delay1_DSTATE + rtb_Gain_c) + + ADM_Integrated_Logic_DW.Delay_DSTATE[0]) * + 0.39478417604357435 - -7.2104316479128512 * + ADM_Integrated_Logic_DW.Delay2_DSTATE) - + 2.6178993711731877 * ADM_Integrated_Logic_DW.Delay3_DSTATE + [0]) / 6.1716689809139611; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Product1_m = ((rtb_Product1_pd + ADM_Integrated_Logic_DW.d1_DSTATE_e) * + 0.002 + 0.00861032953945969 * + ADM_Integrated_Logic_DW.d_DSTATE_ij) / 0.01261032953945969; + + /* Sum: '/Subtract' incorporates: + * Inport: '/GV_MCU_RPM' + * MultiPortSwitch: '/Multiport Switch1' + */ + rtb_Error_m = rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_U.GV_MCU_RPM; + + /* Saturate: '/Error_Saturation' incorporates: + * MultiPortSwitch: '/Multiport Switch1' + */ + if (rtb_Error_m > 2000.0) { + rtb_Error_m = 2000.0; + } else if (rtb_Error_m < -2000.0) { + rtb_Error_m = -2000.0; + } + + /* End of Saturate: '/Error_Saturation' */ + + /* DeadZone: '/Dead Zone' incorporates: + * MultiPortSwitch: '/Multiport Switch1' + */ + if (rtb_Error_m > 50.0) { + rtb_Add_e = rtb_Error_m - 50.0; + } else if (rtb_Error_m >= -50.0) { + rtb_Add_e = 0.0; + } else { + rtb_Add_e = rtb_Error_m - -50.0; + } + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Error_m = (rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.d_DSTATE_ir) * + 1000.0 - ADM_Integrated_Logic_DW.d1_DSTATE_o; + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Sum1_aj = (rtb_Error_m - ADM_Integrated_Logic_DW.d_DSTATE_m) * 1000.0 - + ADM_Integrated_Logic_DW.d1_DSTATE_hm; + + /* Sum: '/Sum1' incorporates: + * Gain: '/gain' + * Sum: '/Sum2' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Sum1_p = (rtb_Sum1_aj - ADM_Integrated_Logic_DW.d_DSTATE_mw) * 1000.0 - + ADM_Integrated_Logic_DW.d1_DSTATE_g; + + /* Sum: '/Add3' incorporates: + * Constant: '/Constant3' + * Constant: '/Constant4' + * Constant: '/Constant5' + * Gain: '/Gain' + * Memory: '/Memory' + * Product: '/Product2' + * Product: '/Product3' + * Product: '/Product4' + * Sum: '/Add2' + */ + rtb_Add3 = (((156.8 * rtb_Brake_Torque_Cmd + 212.8 * rtb_Error_m) + 21.8 * + rtb_Sum1_aj) + rtb_Sum1_p) * 9.44822373393802E-6 - + ADM_Integrated_Logic_DW.Memory_PreviousInput; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Product1_e = ((rtb_Add3 + ADM_Integrated_Logic_DW.d1_DSTATE_ej) * 0.002 + + 0.029830988618379066 * ADM_Integrated_Logic_DW.d_DSTATE_j) / + 0.03383098861837907; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant2' + * Delay: '/Delay' + * Delay: '/Delay1' + * Delay: '/Delay2' + * Delay: '/Delay3' + * Gain: '/gain1' + * Gain: '/gain3' + * Product: '/x(n), x(n-1), x(n-2)' + * Product: '/y(n-1)' + * Product: '/y(n-2)' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * Sum: '/Sum5' + * Sum: '/Sum6' + */ + rtb_Product1_iz = ((((2.0 * ADM_Integrated_Logic_DW.Delay1_DSTATE_c + + rtb_Product1_e) + + ADM_Integrated_Logic_DW.Delay_DSTATE_p[0]) * + 0.00035530575843921691 - -7.9992893884831213 * + ADM_Integrated_Logic_DW.Delay2_DSTATE_n) - + 3.9470487616123275 * + ADM_Integrated_Logic_DW.Delay3_DSTATE_h[0]) / + 4.0536618499045511; + + /* MATLAB Function: '/DOB_Gain' incorporates: + * Inport: '/GV_Vx_Fbk' + */ + /* : if vx < 5 */ + if (ADM_Integrated_Logic_U.GV_Vx_Fbk < 5.0) { + /* : gain = 0; */ + rtb_Switch2 = 0.0; + } else { + /* : else */ + /* : gain = (vx-5) * 0.2; */ + rtb_Switch2 = (ADM_Integrated_Logic_U.GV_Vx_Fbk - 5.0) * 0.2; + } + + /* : if gain >=1 */ + if (rtb_Switch2 >= 1.0) { + /* : gain =1; */ + rtb_Switch2 = 1.0; + } + + /* End of MATLAB Function: '/DOB_Gain' */ + + /* Product: '/Product1' incorporates: + * Constant: '/DOBFlag' + * Product: '/Product' + */ + rtb_Integrator_1 = -(rtb_Product1_iz * 0.9); + + /* Saturate: '/DOB_Saturation' */ + if (rtb_Integrator_1 > 30.0) { + rtb_Integrator_1 = 30.0; + } else if (rtb_Integrator_1 < -30.0) { + rtb_Integrator_1 = -30.0; + } + + /* Sum: '/Subtract2' incorporates: + * DeadZone: '/Dead Zone' + * MultiPortSwitch: '/Multiport Switch1' + * Product: '/Product' + * Product: '/Multiply1' + * Saturate: '/DOB_Saturation' + * Sum: '/Add' + */ + rtb_Add_e = (rtb_Add_e * 0.044648264844923756 + rtb_Product1_m) + + rtb_Integrator_1 * rtb_Switch2; + + /* Saturate: '/Torq_Saturation' */ + if (rtb_Add_e > 80.0) { + rtb_Add_e = 80.0; + } else if (rtb_Add_e < -80.0) { + rtb_Add_e = -80.0; + } + + /* End of Saturate: '/Torq_Saturation' */ + + /* MATLAB Function: '/Emergency_Motor_Func' */ + /* : if Emergency_Flag == 1 */ + if (rtb_Compare) { + /* Outport: '/GV_Motor_Torque_Cmd' */ + /* : Emergency_Motor_Output = 0; */ + ADM_Integrated_Logic_Y.GV_Motor_Torque_Cmd = 0.0; + } else { + /* Outport: '/GV_Motor_Torque_Cmd' incorporates: + * Product: '/Multiply' + */ + /* : else */ + /* : Emergency_Motor_Output = Motor_Torque_Cmd; */ + ADM_Integrated_Logic_Y.GV_Motor_Torque_Cmd = rtb_output_p * rtb_Add_e; + } + + /* End of MATLAB Function: '/Emergency_Motor_Func' */ + + /* Outport: '/GV_Gear_Postion_Out' */ + ADM_Integrated_Logic_Y.GV_Gear_Postion_Out = rtb_deltafalllimit_m; + + /* Sum: '/Add2' incorporates: + * Inport: '/GV_Vx_Fbk' + */ + rtb_Vx_Cmd_R -= ADM_Integrated_Logic_U.GV_Vx_Fbk; + + /* Outport: '/GV_Hill_Torque_Assist' */ + ADM_Integrated_Logic_Y.GV_Hill_Torque_Assist = rtb_Desired_Torque; + + /* Outport: '/Debug_HAC_Pitch_angle' */ + ADM_Integrated_Logic_Y.Debug_HAC_Pitch_angle = rtb_Yk1_e; + + /* MATLAB Function: '/Calculate_F_c1' incorporates: + * Gain: '/Gain3' + */ + ADM_Integrated_Lo_Calculate_F_c(ADM_Integrated_Logic_ConstB.W_Value_for_Brake, + 0.017453292519943295 * rtb_Yk1_e, &rtb_Switch2); + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Inport: '/GV_IMU_AX_Val' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Desired_Torque = ((ADM_Integrated_Logic_U.GV_IMU_AX_Val + + ADM_Integrated_Logic_DW.d1_DSTATE_ob) * 0.002 + 0.061661977236758134 * + ADM_Integrated_Logic_DW.d_DSTATE_e) / + 0.065661977236758137; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Inport: '/GV_IMU_AY_Val' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_output_p = ((ADM_Integrated_Logic_U.GV_IMU_AY_Val + + ADM_Integrated_Logic_DW.d1_DSTATE_i) * 0.002 + + 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_p) / + 0.065661977236758137; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Inport: '/GV_IMU_AZ_Val' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Integrator_1 = ((ADM_Integrated_Logic_U.GV_IMU_AZ_Val + + ADM_Integrated_Logic_DW.d1_DSTATE_o1) * 0.002 + + 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_n) + / 0.065661977236758137; + + /* MATLAB Function: '/Pitch_calculate' */ + /* This function calculates the pitch angle using accelerometer data. */ + /* Inputs: */ + /* ax - Acceleration in the x-axis */ + /* ay - Acceleration in the y-axis */ + /* az - Acceleration in the z-axis */ + /* Output: */ + /* pitch - Calculated pitch angle in degrees */ + /* Step 1: Calculate the denominator (sqrt(ay^2 + az^2)) */ + /* : denominator = sqrt(ay^2 + az^2); */ + rtb_Switch2 = sqrt(rtb_output_p * rtb_output_p + rtb_Integrator_1 * + rtb_Integrator_1); + + /* Step 2: Compute pitch in radians using arctan(ax / denominator) */ + /* Protect against division by zero */ + /* : if denominator == 0 */ + if (rtb_Switch2 != 0.0) { + /* : else */ + /* : pitch = atan(ax / denominator); */ + rtb_Switch2 = atan(rtb_Desired_Torque / rtb_Switch2); + + /* Calculate pitch in radians */ + } else { + /* : pitch = 0; */ + /* If ay and az are both zero, pitch is set to 0 */ + } + + /* Sum: '/Sum' incorporates: + * DiscreteIntegrator: '/Integrator_2' + * MATLAB Function: '/Pitch_calculate' + */ + /* Step 3: Convert radians to degrees */ + /* : pitch = pitch * (180 / pi); */ + /* Convert to degrees */ + rtb_Sum_f = ADM_Integrated_Logic_DW.Integrator_2_DSTATE - rtb_Switch2 * + 57.295779513082323; + + /* Product: '/Product1' incorporates: + * Constant: '/Constant' + * Gain: '/gain' + * Inport: '/GV_IMU_PitchRtVal' + * Product: '/Product11' + * Sum: '/Sum1' + * Sum: '/Sum2' + * Sum: '/Sum3' + * Sum: '/Sum4' + * UnitDelay: '/d' + * UnitDelay: '/d1' + */ + rtb_Product1_f = ((ADM_Integrated_Logic_U.GV_IMU_PitchRtVal + + ADM_Integrated_Logic_DW.d1_DSTATE_a) * 0.002 + + 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_d1) / + 0.065661977236758137; + + /* Sum: '/Add1' incorporates: + * Constant: '/Constant' + * Gain: '/Gain1' + * Inport: '/GV_Vx_Fbk' + * Sum: '/Add3' + */ + rtb_Add1_tmp = 400.0 - 6.5 * ADM_Integrated_Logic_U.GV_Vx_Fbk; + + /* MATLAB Function: '/MATLAB Function1' incorporates: + * Sum: '/Add1' + */ + ADM_Integrated__MATLABFunction1(rtb_Add1_tmp, &rtb_y_l); + + /* Product: '/delta rise limit' incorporates: + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Switch2 = rtb_y_l * 0.002; + + /* UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + rtb_Yk1_p = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_c; + + /* Sum: '/Difference Inputs1' incorporates: + * Inport: '/GV_RWA_RackAngleCommand' + * + * Block description for '/Difference Inputs1': + * + * Add in CPU + */ + rtb_UkYk1_j = ADM_Integrated_Logic_U.GV_RWA_RackAngleCommand - rtb_Yk1_p; + + /* MATLAB Function: '/MATLAB Function2' incorporates: + * Gain: '/Gain3' + * Sum: '/Add1' + */ + ADM_Integrated__MATLABFunction2(-rtb_Add1_tmp, &rtb_y_l); + + /* Switch: '/Switch2' incorporates: + * RelationalOperator: '/LowerRelop1' + */ + if (rtb_UkYk1_j <= rtb_Switch2) { + /* Product: '/delta fall limit' incorporates: + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Switch2 = rtb_y_l * 0.002; + + /* Switch: '/Switch' incorporates: + * RelationalOperator: '/UpperRelop' + */ + if (rtb_UkYk1_j >= rtb_Switch2) { + rtb_Switch2 = rtb_UkYk1_j; + } + + /* End of Switch: '/Switch' */ + } + + /* End of Switch: '/Switch2' */ + + /* Sum: '/Difference Inputs2' + * + * Block description for '/Difference Inputs2': + * + * Add in CPU + */ + rtb_Yk1_p += rtb_Switch2; + + /* Outport: '/GV_Master_Rack_Angle_Cmd' */ + ADM_Integrated_Logic_Y.GV_Master_Rack_Angle_Cmd = rtb_Yk1_p; + + /* MATLAB Function: '/MATLAB Function5' */ + ADM_Integrated__MATLABFunction1(rtb_Add1_tmp, &rtb_y_l); + + /* Product: '/delta rise limit' incorporates: + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Switch2 = rtb_y_l * 0.002; + + /* UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + rtb_UkYk1_j = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_i; + + /* Sum: '/Difference Inputs1' incorporates: + * Inport: '/GV_RWS_RackAngleCommand' + * + * Block description for '/Difference Inputs1': + * + * Add in CPU + */ + rtb_Add1 = ADM_Integrated_Logic_U.GV_RWS_RackAngleCommand - rtb_UkYk1_j; + + /* MATLAB Function: '/MATLAB Function6' incorporates: + * Gain: '/Gain5' + */ + ADM_Integrated__MATLABFunction2(-rtb_Add1_tmp, &rtb_y_l); + + /* Switch: '/Switch2' incorporates: + * RelationalOperator: '/LowerRelop1' + */ + if (rtb_Add1 <= rtb_Switch2) { + /* Product: '/delta fall limit' incorporates: + * SampleTimeMath: '/sample time' + * + * About '/sample time': + * y = K where K = ( w * Ts ) + * */ + rtb_Switch2 = rtb_y_l * 0.002; + + /* Switch: '/Switch' incorporates: + * RelationalOperator: '/UpperRelop' + */ + if (rtb_Add1 >= rtb_Switch2) { + rtb_Switch2 = rtb_Add1; + } + + /* End of Switch: '/Switch' */ + } + + /* End of Switch: '/Switch2' */ + + /* Sum: '/Difference Inputs2' + * + * Block description for '/Difference Inputs2': + * + * Add in CPU + */ + rtb_Switch2 += rtb_UkYk1_j; + + /* Outport: '/GV_RWS_RackAngleCmd1' */ + ADM_Integrated_Logic_Y.GV_RWS_RackAngleCmd1 = rtb_Switch2; + + /* Update for UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + ADM_Integrated_Logic_DW.DelayInput2_DSTATE = rtb_UkYk1; + + /* Update for UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + ADM_Integrated_Logic_DW.DelayInput2_DSTATE_m = rtb_Yk1_e; + + /* Update for DiscreteIntegrator: '/Integrator_2' incorporates: + * Constant: '/I_gain' + * Constant: '/P_gain' + * DiscreteIntegrator: '/Integrator_1' + * Product: '/Product' + * Product: '/Product1' + * Sum: '/Sum1' + * Sum: '/Sum2' + */ + ADM_Integrated_Logic_DW.Integrator_2_DSTATE += (rtb_Product1_f - + (ADM_Integrated_Logic_DW.Integrator_1_DSTATE * 5.0 + rtb_Sum_f * 100.0)) * + 0.002; + + /* Update for Delay: '/Memory' */ + ADM_Integrated_Logic_DW.Memory_DSTATE = rtb_deltafalllimit_m; + + /* Update for DiscreteTransferFcn: '/Discrete Transfer Fcn' */ + ADM_Integrated_Logic_DW.DiscreteTransferFcn_states = rtb_Vx_Cmd_R - -0.9375 * + ADM_Integrated_Logic_DW.DiscreteTransferFcn_states; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE = rtb_output_a; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE = rtb_Brake_Torque_Cmd; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_i = rtb_Brake_Torque_Cmd; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_p = rtb_Sum1_i2; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_c = rtb_Sum1_i2; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_h = rtb_Sum1_o1; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_d = rtb_Sum1_o1; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_l = rtb_Sum1_lm; + + /* Update for Delay: '/Delay1' */ + ADM_Integrated_Logic_DW.Delay1_DSTATE = rtb_Gain_c; + + /* Update for Delay: '/Delay' */ + ADM_Integrated_Logic_DW.Delay_DSTATE[0] = + ADM_Integrated_Logic_DW.Delay_DSTATE[1]; + ADM_Integrated_Logic_DW.Delay_DSTATE[1] = rtb_Gain_c; + + /* Update for Delay: '/Delay2' */ + ADM_Integrated_Logic_DW.Delay2_DSTATE = rtb_Product1_pd; + + /* Update for Delay: '/Delay3' */ + ADM_Integrated_Logic_DW.Delay3_DSTATE[0] = + ADM_Integrated_Logic_DW.Delay3_DSTATE[1]; + ADM_Integrated_Logic_DW.Delay3_DSTATE[1] = rtb_Product1_pd; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_e = rtb_Product1_pd; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_ij = rtb_Product1_m; + + /* Update for Memory: '/Memory' */ + ADM_Integrated_Logic_DW.Memory_PreviousInput = rtb_Add_e; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_ir = rtb_Brake_Torque_Cmd; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_o = rtb_Error_m; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_m = rtb_Error_m; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_hm = rtb_Sum1_aj; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_mw = rtb_Sum1_aj; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_g = rtb_Sum1_p; + + /* Update for UnitDelay: '/d1' */ + ADM_Integrated_Logic_DW.d1_DSTATE_ej = rtb_Add3; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_j = rtb_Product1_e; + + /* Update for Delay: '/Delay1' */ + ADM_Integrated_Logic_DW.Delay1_DSTATE_c = rtb_Product1_e; + + /* Update for Delay: '/Delay' */ + ADM_Integrated_Logic_DW.Delay_DSTATE_p[0] = + ADM_Integrated_Logic_DW.Delay_DSTATE_p[1]; + ADM_Integrated_Logic_DW.Delay_DSTATE_p[1] = rtb_Product1_e; + + /* Update for Delay: '/Delay2' */ + ADM_Integrated_Logic_DW.Delay2_DSTATE_n = rtb_Product1_iz; + + /* Update for Delay: '/Delay3' */ + ADM_Integrated_Logic_DW.Delay3_DSTATE_h[0] = + ADM_Integrated_Logic_DW.Delay3_DSTATE_h[1]; + ADM_Integrated_Logic_DW.Delay3_DSTATE_h[1] = rtb_Product1_iz; + + /* Update for UnitDelay: '/d1' incorporates: + * Inport: '/GV_IMU_AX_Val' + */ + ADM_Integrated_Logic_DW.d1_DSTATE_ob = ADM_Integrated_Logic_U.GV_IMU_AX_Val; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_e = rtb_Desired_Torque; + + /* Update for UnitDelay: '/d1' incorporates: + * Inport: '/GV_IMU_AY_Val' + */ + ADM_Integrated_Logic_DW.d1_DSTATE_i = ADM_Integrated_Logic_U.GV_IMU_AY_Val; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_p = rtb_output_p; + + /* Update for UnitDelay: '/d1' incorporates: + * Inport: '/GV_IMU_AZ_Val' + */ + ADM_Integrated_Logic_DW.d1_DSTATE_o1 = ADM_Integrated_Logic_U.GV_IMU_AZ_Val; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_n = rtb_Integrator_1; + + /* Update for DiscreteIntegrator: '/Integrator_1' */ + ADM_Integrated_Logic_DW.Integrator_1_DSTATE += 0.002 * rtb_Sum_f; + + /* Update for UnitDelay: '/d1' incorporates: + * Inport: '/GV_IMU_PitchRtVal' + */ + ADM_Integrated_Logic_DW.d1_DSTATE_a = ADM_Integrated_Logic_U.GV_IMU_PitchRtVal; + + /* Update for UnitDelay: '/d' */ + ADM_Integrated_Logic_DW.d_DSTATE_d1 = rtb_Product1_f; + + /* Update for UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + ADM_Integrated_Logic_DW.DelayInput2_DSTATE_c = rtb_Yk1_p; + + /* Update for UnitDelay: '/Delay Input2' + * + * Block description for '/Delay Input2': + * + * Store in Global RAM + */ + ADM_Integrated_Logic_DW.DelayInput2_DSTATE_i = rtb_Switch2; + if (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] == 0) { + /* Update absolute timer for sample time: [1.0s, 0.0s] */ + /* The "clockTick1" counts the number of times the code of this task has + * been executed. The resolution of this integer timer is 1.0, which is the step size + * of the task. Size of "clockTick1" ensures timer will not overflow during the + * application lifespan selected. + */ + ADM_Integrated_Logic_M->Timing.clockTick1++; + } + + rate_scheduler(); +} + +/* Model initialize function */ +void ADM_Integrated_Logic_initialize(void) +{ + /* : HAC_ON_FLAG = 0; */ + /* : Smoothed_Torque = 0; */ + /* : HAC_Desired_Torque = 0; */ + /* : HAC_ON_Timer = 0; */ +} + +/* Model terminate function */ +void ADM_Integrated_Logic_terminate(void) +{ + /* (no terminate code required) */ +} + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.h b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.h new file mode 100644 index 00000000..01ea5e39 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.h @@ -0,0 +1,287 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ADM_Integrated_Logic.h + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#ifndef ADM_Integrated_Logic_h_ +#define ADM_Integrated_Logic_h_ +#ifndef ADM_Integrated_Logic_COMMON_INCLUDES_ +#define ADM_Integrated_Logic_COMMON_INCLUDES_ +#include +#include +#include "complex_types.h" +#endif /* ADM_Integrated_Logic_COMMON_INCLUDES_ */ + +#include "ADM_Integrated_Logic_types.h" + +/* Block signals and states (default storage) for system '' */ +typedef struct { + double Delay_DSTATE[2]; /* '/Delay' */ + double Delay3_DSTATE[2]; /* '/Delay3' */ + double Delay_DSTATE_p[2]; /* '/Delay' */ + double Delay3_DSTATE_h[2]; /* '/Delay3' */ + double Saturation; /* '/Saturation' */ + double DelayInput2_DSTATE; /* '/Delay Input2' */ + double DelayInput2_DSTATE_m; /* '/Delay Input2' */ + double Integrator_2_DSTATE; /* '/Integrator_2' */ + double Memory_DSTATE; /* '/Memory' */ + double DiscreteTransferFcn_states; /* '/Discrete Transfer Fcn' */ + double d1_DSTATE; /* '/d1' */ + double d_DSTATE; /* '/d' */ + double d_DSTATE_i; /* '/d' */ + double d1_DSTATE_p; /* '/d1' */ + double d_DSTATE_c; /* '/d' */ + double d1_DSTATE_h; /* '/d1' */ + double d_DSTATE_d; /* '/d' */ + double d1_DSTATE_l; /* '/d1' */ + double Delay1_DSTATE; /* '/Delay1' */ + double Delay2_DSTATE; /* '/Delay2' */ + double d1_DSTATE_e; /* '/d1' */ + double d_DSTATE_ij; /* '/d' */ + double d_DSTATE_ir; /* '/d' */ + double d1_DSTATE_o; /* '/d1' */ + double d_DSTATE_m; /* '/d' */ + double d1_DSTATE_hm; /* '/d1' */ + double d_DSTATE_mw; /* '/d' */ + double d1_DSTATE_g; /* '/d1' */ + double d1_DSTATE_ej; /* '/d1' */ + double d_DSTATE_j; /* '/d' */ + double Delay1_DSTATE_c; /* '/Delay1' */ + double Delay2_DSTATE_n; /* '/Delay2' */ + double d1_DSTATE_ob; /* '/d1' */ + double d_DSTATE_e; /* '/d' */ + double d1_DSTATE_i; /* '/d1' */ + double d_DSTATE_p; /* '/d' */ + double d1_DSTATE_o1; /* '/d1' */ + double d_DSTATE_n; /* '/d' */ + double Integrator_1_DSTATE; /* '/Integrator_1' */ + double d1_DSTATE_a; /* '/d1' */ + double d_DSTATE_d1; /* '/d' */ + double DelayInput2_DSTATE_c; /* '/Delay Input2' */ + double DelayInput2_DSTATE_i; /* '/Delay Input2' */ + double PrevY; /* '/Input_Vx_RateLimiter' */ + double PrevY_o; /* '/Brake_Out_RateLimiter' */ + double PrevY_a; /* '/TargetSpd_RateLimiter' */ + double Memory_PreviousInput; /* '/Memory' */ + double HAC_ON_FLAG; /* '/HAC_OFF_OK_Func' */ + double Smoothed_Torque; /* '/HAC_OFF_OK_Func' */ + double HAC_Desired_Torque; /* '/HAC_OFF_OK_Func' */ + double HAC_ON_Timer; /* '/HAC_OFF_OK_Func' */ + uint8_t is_active_c6_ADM_Integrated_Log;/* '/Chart' */ + uint8_t is_c6_ADM_Integrated_Logic; /* '/Chart' */ +} DW_ADM_Integrated_Logic_T; + +/* Invariant block signals (default storage) */ +typedef struct { + const double W_value; /* '/Multiply' */ + const double W_Value_for_Brake; /* '/Multiply4' */ +} ConstB_ADM_Integrated_Logic_T; + +/* External inputs (root inport signals with default storage) */ +typedef struct { + double GV_MCU_RPM; /* '/GV_MCU_RPM' */ + double GV_BrakeTorqueCommand; /* '/GV_BrakeTorqueCommand' */ + double GV_IMU_AX_Val; /* '/GV_IMU_AX_Val' */ + double GV_IMU_AY_Val; /* '/GV_IMU_AY_Val' */ + double GV_IMU_AZ_Val; /* '/GV_IMU_AZ_Val' */ + double GV_IMU_PitchRtVal; /* '/GV_IMU_PitchRtVal' */ + double GV_Vx_Command; /* '/GV_Vx_Command' */ + double GV_VCU_GearSelStat; /* '/GV_VCU_GearSelStat' */ + double GV_MCU_EstTrq; /* '/GV_MCU_EstTrq' */ + double GV_Vx_Limit; /* '/GV_Vx_Limit' */ + double GV_Vx_Fbk; /* '/GV_Vx_Fbk' */ + double GV_RWA_RackAngleCommand; /* '/GV_RWA_RackAngleCommand' */ + double GV_RWS_RackAngleCommand; /* '/GV_RWS_RackAngleCommand' */ + double GV_RWA_Fault_Flag; /* '/GV_RWA_Fault_Flag' */ + double GV_Operation_Mode; /* '/GV_Operation_Mode' */ +} ExtU_ADM_Integrated_Logic_T; + +/* External outputs (root outports fed by signals with default storage) */ +typedef struct { + double GV_Brake_Command; /* '/GV_Brake_Command' */ + double GV_Master_Rack_Angle_Cmd; /* '/GV_Master_Rack_Angle_Cmd' */ + double GV_Hill_Torque_Assist; /* '/GV_Hill_Torque_Assist' */ + double GV_Motor_Torque_Cmd; /* '/GV_Motor_Torque_Cmd' */ + double Debug_HAC_FLAG; /* '/Debug_HAC_FLAG' */ + double Debug_HAC_RPM_Decision; /* '/Debug_HAC_RPM_Decision' */ + double Debug_HAC_Pitch_angle; /* '/Debug_HAC_Pitch_angle' */ + double Debug_HAC_Brake_Output; /* '/Debug_HAC_Brake_Output' */ + double Debug_CC_Brake_Output; /* '/Debug_CC_Brake_Output' */ + double GV_RWS_RackAngleCmd1; /* '/GV_RWS_RackAngleCmd1' */ + double GV_Speed_Limit; /* '/GV_Speed_Limit' */ + double GV_Gear_Postion_Out; /* '/GV_Gear_Postion_Out' */ +} ExtY_ADM_Integrated_Logic_T; + +/* Real-time Model Data Structure */ +struct tag_RTM_ADM_Integrated_Logic_T { + /* + * Timing: + * The following substructure contains information regarding + * the timing information for the model. + */ + struct { + uint32_t clockTick1; + struct { + uint16_t TID[2]; + } TaskCounters; + } Timing; +}; + +/* Block signals and states (default storage) */ +extern DW_ADM_Integrated_Logic_T ADM_Integrated_Logic_DW; + +/* External inputs (root inport signals with default storage) */ +extern ExtU_ADM_Integrated_Logic_T ADM_Integrated_Logic_U; + +/* External outputs (root outports fed by signals with default storage) */ +extern ExtY_ADM_Integrated_Logic_T ADM_Integrated_Logic_Y; +extern const ConstB_ADM_Integrated_Logic_T ADM_Integrated_Logic_ConstB;/* constant block i/o */ + +/* Model entry point functions */ +extern void ADM_Integrated_Logic_initialize(void); +extern void ADM_Integrated_Logic_step(void); +extern void ADM_Integrated_Logic_terminate(void); + +/* Real-time Model object */ +extern RT_MODEL_ADM_Integrated_Logic_T *const ADM_Integrated_Logic_M; + +/*- + * These blocks were eliminated from the model due to optimizations: + * + * Block '/BW_PI' : Unused code path elimination + * Block '/Constant1' : Unused code path elimination + * Block '/Constant16' : Unused code path elimination + * Block '/Constant17' : Unused code path elimination + * Block '/Constant2' : Unused code path elimination + * Block '/Data Type Conversion2' : Unused code path elimination + * Block '/Gain2' : Unused code path elimination + * Block '/Abs' : Unused code path elimination + * Block '/Brake_Saturation' : Unused code path elimination + * Block '/Multiply5' : Unused code path elimination + * Block '/Radius1' : Unused code path elimination + * Block '/FixPt Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Propagation' : Unused code path elimination + * Block '/FixPt Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Propagation' : Unused code path elimination + * Block '/Scope2' : Unused code path elimination + * Block '/FixPt Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Propagation' : Unused code path elimination + * Block '/FixPt Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Duplicate' : Unused code path elimination + * Block '/Data Type Propagation' : Unused code path elimination + * Block '/ControlFlag' : Eliminated nontunable gain of 1 + * Block '/FBGain' : Eliminated nontunable gain of 1 + * Block '/FFGain' : Eliminated nontunable gain of 1 + * Block '/Data Type Conversion1' : Eliminate redundant data type conversion + * Block '/Data Type Conversion3' : Eliminate redundant data type conversion + * Block '/HAC_Gain' : Eliminated nontunable gain of 1 + * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical + * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical + * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical + * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical + */ + +/*- + * The generated code includes comments that allow you to trace directly + * back to the appropriate location in the model. The basic format + * is /block_name, where system is the system number (uniquely + * assigned by Simulink) and block_name is the name of the block. + * + * Use the MATLAB hilite_system command to trace the generated code back + * to the model. For example, + * + * hilite_system('') - opens system 3 + * hilite_system('/Kp') - opens and selects block Kp which resides in S3 + * + * Here is the system hierarchy for this model + * + * '' : 'ADM_Integrated_Logic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Compare To Constant' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Brake_Func' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Motor_Func' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function2' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function5' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function6' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB_Gain' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/GearCondition_Brake' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Gear_pos_out' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/LPFM' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Target_RPM' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot3' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot4' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot5' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/LPFM' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Second order LPF' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB/P' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot2' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot3' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/LPFM' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Second order LPF' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Compare To Constant' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Gear_FUNCTION1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Chart' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/HAC_OFF_OK_Func' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM2' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM3' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Pitch_calculate' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Ramp' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_R' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c1' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic/Saturation Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1/Saturation Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic/Saturation Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1/Saturation Dynamic' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Compare To Constant' + * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Vx_OutPut_Function' + */ + +/*- + * Requirements for '': ADM_Integrated_Logic + + */ +#endif /* ADM_Integrated_Logic_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.mk b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.mk new file mode 100644 index 00000000..6c6cfb93 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.mk @@ -0,0 +1,474 @@ +########################################################################### +## Makefile generated for component 'ADM_Integrated_Logic'. +## +## Makefile : ADM_Integrated_Logic.mk +## Generated on : Tue Apr 29 10:59:09 2025 +## Final product: $(RELATIVE_PATH_TO_ANCHOR)\ADM_Integrated_Logic.exe +## Product type : executable +## +########################################################################### + +########################################################################### +## MACROS +########################################################################### + +# Macro Descriptions: +# PRODUCT_NAME Name of the system to build +# MAKEFILE Name of this makefile +# COMPILER_COMMAND_FILE Compiler command listing model reference header paths +# CMD_FILE Command file + +PRODUCT_NAME = ADM_Integrated_Logic +MAKEFILE = ADM_Integrated_Logic.mk +MATLAB_ROOT = C:\PROGRA~1\MATLAB\R2024a +MATLAB_BIN = C:\PROGRA~1\MATLAB\R2024a\bin +MATLAB_ARCH_BIN = $(MATLAB_BIN)\win64 +START_DIR = C:\Users\MSI\SYNOLO~1\3min_be\한자연\!과제\배송모~1\!진행~1\2025\25-04-~4 +SOLVER = +SOLVER_OBJ = +CLASSIC_INTERFACE = 0 +TGT_FCN_LIB = None +MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0 +RELATIVE_PATH_TO_ANCHOR = .. +COMPILER_COMMAND_FILE = ADM_Integrated_Logic_comp.rsp +CMD_FILE = ADM_Integrated_Logic.rsp +C_STANDARD_OPTS = +CPP_STANDARD_OPTS = +NODEBUG = 1 + +########################################################################### +## TOOLCHAIN SPECIFICATIONS +########################################################################### + +# Toolchain Name: Microsoft Visual C++ 2022 v17.0 | nmake (64-bit Windows) +# Supported Version(s): 17.0 +# ToolchainInfo Version: 2024a +# Specification Revision: 1.0 +# +#------------------------------------------- +# Macros assumed to be defined elsewhere +#------------------------------------------- + +# NODEBUG +# cvarsdll +# cvarsmt +# conlibsmt +# ldebug +# conflags +# cflags + +#----------- +# MACROS +#----------- + +MW_EXTERNLIB_DIR = $(MATLAB_ROOT)\extern\lib\win64\microsoft +MW_LIB_DIR = $(MATLAB_ROOT)\lib\win64 +CPU = AMD64 +APPVER = 5.02 +CVARSFLAG = $(cvarsmt) +CFLAGS_ADDITIONAL = -D_CRT_SECURE_NO_WARNINGS +CPPFLAGS_ADDITIONAL = -EHs -D_CRT_SECURE_NO_WARNINGS /wd4251 /Zc:__cplusplus +LIBS_TOOLCHAIN = $(conlibs) + +TOOLCHAIN_SRCS = +TOOLCHAIN_INCS = +TOOLCHAIN_LIBS = + +#------------------------ +# BUILD TOOL COMMANDS +#------------------------ + +# C Compiler: Microsoft Visual C Compiler +CC = cl + +# Linker: Microsoft Visual C Linker +LD = link + +# C++ Compiler: Microsoft Visual C++ Compiler +CPP = cl + +# C++ Linker: Microsoft Visual C++ Linker +CPP_LD = link + +# Archiver: Microsoft Visual C/C++ Archiver +AR = lib + +# MEX Tool: MEX Tool +MEX_PATH = $(MATLAB_ARCH_BIN) +MEX = "$(MEX_PATH)\mex" + +# Download: Download +DOWNLOAD = + +# Execute: Execute +EXECUTE = $(PRODUCT) + +# Builder: NMAKE Utility +MAKE = nmake + + +#------------------------- +# Directives/Utilities +#------------------------- + +CDEBUG = -Zi +C_OUTPUT_FLAG = -Fo +LDDEBUG = /DEBUG +OUTPUT_FLAG = -out: +CPPDEBUG = -Zi +CPP_OUTPUT_FLAG = -Fo +CPPLDDEBUG = /DEBUG +OUTPUT_FLAG = -out: +ARDEBUG = +STATICLIB_OUTPUT_FLAG = -out: +MEX_DEBUG = -g +RM = @del +ECHO = @echo +MV = @ren +RUN = @cmd /C + +#-------------------------------------- +# "Faster Runs" Build Configuration +#-------------------------------------- + +ARFLAGS = /nologo +CFLAGS = $(cflags) $(CVARSFLAG) $(CFLAGS_ADDITIONAL) \ + /O2 /Oy- +CPPFLAGS = /TP $(cflags) $(CVARSFLAG) $(CPPFLAGS_ADDITIONAL) \ + /O2 /Oy- +CPP_LDFLAGS = $(ldebug) $(conflags) $(LIBS_TOOLCHAIN) +CPP_SHAREDLIB_LDFLAGS = $(ldebug) $(conflags) $(LIBS_TOOLCHAIN) \ + -dll -def:$(DEF_FILE) +DOWNLOAD_FLAGS = +EXECUTE_FLAGS = +LDFLAGS = $(ldebug) $(conflags) $(LIBS_TOOLCHAIN) +MEX_CPPFLAGS = +MEX_CPPLDFLAGS = +MEX_CFLAGS = +MEX_LDFLAGS = +MAKE_FLAGS = -f $(MAKEFILE) +SHAREDLIB_LDFLAGS = $(ldebug) $(conflags) $(LIBS_TOOLCHAIN) \ + -dll -def:$(DEF_FILE) + + + +########################################################################### +## OUTPUT INFO +########################################################################### + +PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)\ADM_Integrated_Logic.exe +PRODUCT_TYPE = "executable" +BUILD_TYPE = "Top-Level Standalone Executable" + +########################################################################### +## INCLUDE PATHS +########################################################################### + +INCLUDES_BUILDINFO = + +INCLUDES = $(INCLUDES_BUILDINFO) + +########################################################################### +## DEFINES +########################################################################### + +DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 +DEFINES_CUSTOM = +DEFINES_OPTS = -DTID01EQ=0 +DEFINES_STANDARD = -DMODEL=ADM_Integrated_Logic -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 + +DEFINES = $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_STANDARD) + +########################################################################### +## SOURCE FILES +########################################################################### + +SRCS = $(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic.c $(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic_data.c + +MAIN_SRC = $(START_DIR)\ADM_Integrated_Logic_ert_rtw\ert_main.c + +ALL_SRCS = $(SRCS) $(MAIN_SRC) + +########################################################################### +## OBJECTS +########################################################################### + +OBJS = ADM_Integrated_Logic.obj ADM_Integrated_Logic_data.obj + +MAIN_OBJ = ert_main.obj + +ALL_OBJS = $(OBJS) $(MAIN_OBJ) + +########################################################################### +## PREBUILT OBJECT FILES +########################################################################### + +PREBUILT_OBJS = + +########################################################################### +## LIBRARIES +########################################################################### + +LIBS = + +########################################################################### +## SYSTEM LIBRARIES +########################################################################### + +SYSTEM_LIBS = + +########################################################################### +## ADDITIONAL TOOLCHAIN FLAGS +########################################################################### + +#--------------- +# C Compiler +#--------------- + +CFLAGS_BASIC = $(DEFINES) @$(COMPILER_COMMAND_FILE) + +CFLAGS = $(CFLAGS) $(CFLAGS_BASIC) + +#----------------- +# C++ Compiler +#----------------- + +CPPFLAGS_BASIC = $(DEFINES) @$(COMPILER_COMMAND_FILE) + +CPPFLAGS = $(CPPFLAGS) $(CPPFLAGS_BASIC) + +########################################################################### +## INLINED COMMANDS +########################################################################### + + +!include $(MATLAB_ROOT)\rtw\c\tools\vcdefs.mak + + +########################################################################### +## PHONY TARGETS +########################################################################### + +.PHONY : all build buildobj clean info prebuild download execute set_environment_variables + + +all : build + @cmd /C "@echo ### Successfully generated all binary outputs." + + +build : set_environment_variables prebuild $(PRODUCT) + + +buildobj : set_environment_variables prebuild $(OBJS) $(PREBUILT_OBJS) + @cmd /C "@echo ### Successfully generated all binary outputs." + + +prebuild : + + +download : $(PRODUCT) + + +execute : download + @cmd /C "@echo ### Invoking postbuild tool "Execute" ..." + $(EXECUTE) $(EXECUTE_FLAGS) + @cmd /C "@echo ### Done invoking postbuild tool." + + +set_environment_variables : + @set INCLUDE=$(INCLUDES);$(INCLUDE) + @set LIB=$(LIB) + + +########################################################################### +## FINAL TARGET +########################################################################### + +#------------------------------------------- +# Create a standalone executable +#------------------------------------------- + +$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(MAIN_OBJ) + @cmd /C "@echo ### Creating standalone executable "$(PRODUCT)" ..." + $(LD) $(LDFLAGS) -out:$(PRODUCT) @$(CMD_FILE) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS) + @cmd /C "@echo ### Created: $(PRODUCT)" + + +########################################################################### +## INTERMEDIATE TARGETS +########################################################################### + +#--------------------- +# SOURCE-TO-OBJECT +#--------------------- + +.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(RELATIVE_PATH_TO_ANCHOR)}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(RELATIVE_PATH_TO_ANCHOR)}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(RELATIVE_PATH_TO_ANCHOR)}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(RELATIVE_PATH_TO_ANCHOR)}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)\ADM_Integrated_Logic_ert_rtw}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)\ADM_Integrated_Logic_ert_rtw}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)\ADM_Integrated_Logic_ert_rtw}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(START_DIR)\ADM_Integrated_Logic_ert_rtw}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\rtw\c\src}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\rtw\c\src}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\rtw\c\src}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\rtw\c\src}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\simulink\src}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\simulink\src}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\simulink\src}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\simulink\src}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\toolbox\simulink\blocks\src}.c.obj : + $(CC) $(CFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\toolbox\simulink\blocks\src}.cpp.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\toolbox\simulink\blocks\src}.cc.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +{$(MATLAB_ROOT)\toolbox\simulink\blocks\src}.cxx.obj : + $(CPP) $(CPPFLAGS) -Fo"$@" "$<" + + +ADM_Integrated_Logic.obj : "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic.c" + $(CC) $(CFLAGS) -Fo"$@" "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic.c" + + +ADM_Integrated_Logic_data.obj : "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic_data.c" + $(CC) $(CFLAGS) -Fo"$@" "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ADM_Integrated_Logic_data.c" + + +ert_main.obj : "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ert_main.c" + $(CC) $(CFLAGS) -Fo"$@" "$(START_DIR)\ADM_Integrated_Logic_ert_rtw\ert_main.c" + + +########################################################################### +## DEPENDENCIES +########################################################################### + +$(ALL_OBJS) : rtw_proj.tmw $(COMPILER_COMMAND_FILE) $(MAKEFILE) + + +########################################################################### +## MISCELLANEOUS TARGETS +########################################################################### + +info : + @cmd /C "@echo ### PRODUCT = $(PRODUCT)" + @cmd /C "@echo ### PRODUCT_TYPE = $(PRODUCT_TYPE)" + @cmd /C "@echo ### BUILD_TYPE = $(BUILD_TYPE)" + @cmd /C "@echo ### INCLUDES = $(INCLUDES)" + @cmd /C "@echo ### DEFINES = $(DEFINES)" + @cmd /C "@echo ### ALL_SRCS = $(ALL_SRCS)" + @cmd /C "@echo ### ALL_OBJS = $(ALL_OBJS)" + @cmd /C "@echo ### LIBS = $(LIBS)" + @cmd /C "@echo ### MODELREF_LIBS = $(MODELREF_LIBS)" + @cmd /C "@echo ### SYSTEM_LIBS = $(SYSTEM_LIBS)" + @cmd /C "@echo ### TOOLCHAIN_LIBS = $(TOOLCHAIN_LIBS)" + @cmd /C "@echo ### CFLAGS = $(CFLAGS)" + @cmd /C "@echo ### LDFLAGS = $(LDFLAGS)" + @cmd /C "@echo ### SHAREDLIB_LDFLAGS = $(SHAREDLIB_LDFLAGS)" + @cmd /C "@echo ### CPPFLAGS = $(CPPFLAGS)" + @cmd /C "@echo ### CPP_LDFLAGS = $(CPP_LDFLAGS)" + @cmd /C "@echo ### CPP_SHAREDLIB_LDFLAGS = $(CPP_SHAREDLIB_LDFLAGS)" + @cmd /C "@echo ### ARFLAGS = $(ARFLAGS)" + @cmd /C "@echo ### MEX_CFLAGS = $(MEX_CFLAGS)" + @cmd /C "@echo ### MEX_CPPFLAGS = $(MEX_CPPFLAGS)" + @cmd /C "@echo ### MEX_LDFLAGS = $(MEX_LDFLAGS)" + @cmd /C "@echo ### MEX_CPPLDFLAGS = $(MEX_CPPLDFLAGS)" + @cmd /C "@echo ### DOWNLOAD_FLAGS = $(DOWNLOAD_FLAGS)" + @cmd /C "@echo ### EXECUTE_FLAGS = $(EXECUTE_FLAGS)" + @cmd /C "@echo ### MAKE_FLAGS = $(MAKE_FLAGS)" + + +clean : + $(ECHO) "### Deleting all derived files ..." + @if exist $(PRODUCT) $(RM) $(PRODUCT) + $(RM) $(ALL_OBJS) + $(ECHO) "### Deleted all derived files." + + diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.rsp b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.rsp new file mode 100644 index 00000000..c4be6e7f --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic.rsp @@ -0,0 +1,3 @@ +ADM_Integrated_Logic.obj +ADM_Integrated_Logic_data.obj +ert_main.obj diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_comp.rsp b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_comp.rsp new file mode 100644 index 00000000..142f0087 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_comp.rsp @@ -0,0 +1,7 @@ +-I"C:\Users\MSI\SynologyDrive\3min_be\한자연\!과제\배송모빌리티\!진행상황\2025\25-04-28-월 통합 로직 수정본 수신(시뮬링크)" +-I"C:\Users\MSI\SynologyDrive\3min_be\한자연\!과제\배송모빌리티\!진행상황\2025\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\ADM_Integrated_Logic_ert_rtw" +-I"C:\Program Files\MATLAB\R2024a\extern\include" +-I"C:\Program Files\MATLAB\R2024a\simulink\include" +-I"C:\Program Files\MATLAB\R2024a\rtw\c\src" +-I"C:\Program Files\MATLAB\R2024a\rtw\c\src\ext_mode\common" +-I"C:\Program Files\MATLAB\R2024a\rtw\c\ert" diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_data.c b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_data.c new file mode 100644 index 00000000..2af73abe --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_data.c @@ -0,0 +1,35 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ADM_Integrated_Logic_data.c + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#include "ADM_Integrated_Logic.h" + +/* Invariant block signals (default storage) */ +const ConstB_ADM_Integrated_Logic_T ADM_Integrated_Logic_ConstB = { + 12753.0, /* '/Multiply' */ + 12753.0 /* '/Multiply4' */ +}; + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_private.h b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_private.h new file mode 100644 index 00000000..f1f21c94 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_private.h @@ -0,0 +1,42 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ADM_Integrated_Logic_private.h + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#ifndef ADM_Integrated_Logic_private_h_ +#define ADM_Integrated_Logic_private_h_ +#include +#include +#include "complex_types.h" +#include "ADM_Integrated_Logic_types.h" +#include "ADM_Integrated_Logic.h" + +extern void ADM_Integrated_Lo_Calculate_F_c(double rtu_W, double rtu_theta, + double *rty_F_c); +extern void ADM_Integrated__MATLABFunction1(double rtu_u, double *rty_y); +extern void ADM_Integrated__MATLABFunction2(double rtu_u, double *rty_y); + +#endif /* ADM_Integrated_Logic_private_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_ref.rsp b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_ref.rsp new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_ref.rsp @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_types.h b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_types.h new file mode 100644 index 00000000..870cc7a8 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ADM_Integrated_Logic_types.h @@ -0,0 +1,35 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ADM_Integrated_Logic_types.h + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#ifndef ADM_Integrated_Logic_types_h_ +#define ADM_Integrated_Logic_types_h_ + +/* Forward declaration for rtModel */ +typedef struct tag_RTM_ADM_Integrated_Logic_T RT_MODEL_ADM_Integrated_Logic_T; + +#endif /* ADM_Integrated_Logic_types_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/buildInfo.mat b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/buildInfo.mat new file mode 100644 index 00000000..ec2b5be8 Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/buildInfo.mat differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codeInfo.mat b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codeInfo.mat new file mode 100644 index 00000000..a33c704d Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codeInfo.mat differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codedescriptor.dmr b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codedescriptor.dmr new file mode 100644 index 00000000..028a448a Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/codedescriptor.dmr differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/compileInfo.mat b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/compileInfo.mat new file mode 100644 index 00000000..28563020 Binary files /dev/null and b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/compileInfo.mat differ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/complex_types.h b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/complex_types.h new file mode 100644 index 00000000..177b43ed --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/complex_types.h @@ -0,0 +1,106 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: complex_types.h + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#ifndef COMPLEX_TYPES_H +#define COMPLEX_TYPES_H +#include + +/*===========================================================================* + * Complex number type definitions * + *===========================================================================*/ +#define CREAL_T + +typedef struct { + float re; + float im; +} creal32_T; + +typedef struct { + double re; + double im; +} creal_T; + +typedef creal_T creal64_T; + +#define CINT8_T + +typedef struct { + int8_t re; + int8_t im; +} cint8_T; + +#define CUINT8_T + +typedef struct { + uint8_t re; + uint8_t im; +} cuint8_T; + +#define CINT16_T + +typedef struct { + int16_t re; + int16_t im; +} cint16_T; + +#define CUINT16_T + +typedef struct { + uint16_t re; + uint16_t im; +} cuint16_T; + +#define CINT32_T + +typedef struct { + int32_t re; + int32_t im; +} cint32_T; + +#define CUINT32_T + +typedef struct { + uint32_t re; + uint32_t im; +} cuint32_T; + +#define CINT64_T + +typedef struct { + int64_t re; + int64_t im; +} cint64_T; + +#define CUINT64_T + +typedef struct { + uint64_t re; + uint64_t im; +} cuint64_T; + +#endif /* COMPLEX_TYPES_H */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ert_main.c b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ert_main.c new file mode 100644 index 00000000..317d977d --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/ert_main.c @@ -0,0 +1,111 @@ +/* + * Academic License - for use in teaching, academic research, and meeting + * course requirements at degree granting institutions only. Not for + * government, commercial, or other organizational use. + * + * File: ert_main.c + * + * Code generated for Simulink model 'ADM_Integrated_Logic'. + * + * Model version : 13.55 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Wed May 7 21:12:17 2025 + * + * Target selection: ert.tlc + * Embedded hardware selection: NXP->Cortex-M4 + * Code generation objectives: + * 1. Execution efficiency + * 2. RAM efficiency + * 3. Debugging + * Validation result: Not run + */ + +#include +#include /* This example main program uses printf/fflush */ +#include "ADM_Integrated_Logic.h" /* Model header file */ + +/* + * Associating rt_OneStep with a real-time clock or interrupt service routine + * is what makes the generated code "real-time". The function rt_OneStep is + * always associated with the base rate of the model. Subrates are managed + * by the base rate from inside the generated code. Enabling/disabling + * interrupts and floating point context switches are target specific. This + * example code indicates where these should take place relative to executing + * the generated code step function. Overrun behavior should be tailored to + * your application needs. This example simply sets an error status in the + * real-time model and returns from rt_OneStep. + */ +void rt_OneStep(void); +void rt_OneStep(void) +{ + static bool OverrunFlag = false; + + /* Disable interrupts here */ + + /* Check for overrun */ + if (OverrunFlag) { + return; + } + + OverrunFlag = true; + + /* Save FPU context here (if necessary) */ + /* Re-enable timer or interrupt here */ + /* Set model inputs here */ + + /* Step the model */ + ADM_Integrated_Logic_step(); + + /* Get model outputs here */ + + /* Indicate task complete */ + OverrunFlag = false; + + /* Disable interrupts here */ + /* Restore FPU context here (if necessary) */ + /* Enable interrupts here */ +} + +/* + * The example main function illustrates what is required by your + * application code to initialize, execute, and terminate the generated code. + * Attaching rt_OneStep to a real-time clock is target specific. This example + * illustrates how you do this relative to initializing the model. + */ +int main(int argc, const char *argv[]) +{ + /* Unused arguments */ + (void)(argc); + (void)(argv); + + /* Initialize model */ + ADM_Integrated_Logic_initialize(); + + /* Attach rt_OneStep to a timer or interrupt service routine with + * period 0.002 seconds (base rate of the model) here. + * The call syntax for rt_OneStep is + * + * rt_OneStep(); + */ + printf("Warning: The simulation will run forever. " + "Generated ERT main won't simulate model step behavior. " + "To change this behavior select the 'MAT-file logging' option.\n"); + fflush((NULL)); + while (1) { + /* Perform application tasks here */ + } + + /* The option 'Remove error status field in real-time model data structure' + * is selected, therefore the following code does not need to execute. + */ + + /* Terminate model */ + ADM_Integrated_Logic_terminate(); + return 0; +} + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/_internal.html b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/_internal.html new file mode 100644 index 00000000..5527bead --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/_internal.html @@ -0,0 +1,57 @@ + + + + + + + + + + + Code Generation Report + + + + + + + + + + +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ + + +
+ + + + + diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/data.js b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/data.js new file mode 100644 index 00000000..f6c78983 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/data.js @@ -0,0 +1 @@ +var dataJson = {"arch":{"ispc":true,"isunix":false,"ismac":false},"build":"ADM_Integrated_Logic","ref":false,"files":[{"name":"ert_main.c","type":"source","group":"main","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Main file","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ert_main.c\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#include \r\n#include /* This example main program uses printf/fflush */\r\n#include \"ADM_Integrated_Logic.h\" /* Model header file */\r\n\r\n/*\r\n * Associating rt_OneStep with a real-time clock or interrupt service routine\r\n * is what makes the generated code \"real-time\". The function rt_OneStep is\r\n * always associated with the base rate of the model. Subrates are managed\r\n * by the base rate from inside the generated code. Enabling/disabling\r\n * interrupts and floating point context switches are target specific. This\r\n * example code indicates where these should take place relative to executing\r\n * the generated code step function. Overrun behavior should be tailored to\r\n * your application needs. This example simply sets an error status in the\r\n * real-time model and returns from rt_OneStep.\r\n */\r\nvoid rt_OneStep(void);\r\nvoid rt_OneStep(void)\r\n{\r\n static bool OverrunFlag = false;\r\n\r\n /* Disable interrupts here */\r\n\r\n /* Check for overrun */\r\n if (OverrunFlag) {\r\n return;\r\n }\r\n\r\n OverrunFlag = true;\r\n\r\n /* Save FPU context here (if necessary) */\r\n /* Re-enable timer or interrupt here */\r\n /* Set model inputs here */\r\n\r\n /* Step the model */\r\n ADM_Integrated_Logic_step();\r\n\r\n /* Get model outputs here */\r\n\r\n /* Indicate task complete */\r\n OverrunFlag = false;\r\n\r\n /* Disable interrupts here */\r\n /* Restore FPU context here (if necessary) */\r\n /* Enable interrupts here */\r\n}\r\n\r\n/*\r\n * The example main function illustrates what is required by your\r\n * application code to initialize, execute, and terminate the generated code.\r\n * Attaching rt_OneStep to a real-time clock is target specific. This example\r\n * illustrates how you do this relative to initializing the model.\r\n */\r\nint main(int argc, const char *argv[])\r\n{\r\n /* Unused arguments */\r\n (void)(argc);\r\n (void)(argv);\r\n\r\n /* Initialize model */\r\n ADM_Integrated_Logic_initialize();\r\n\r\n /* Attach rt_OneStep to a timer or interrupt service routine with\r\n * period 0.002 seconds (base rate of the model) here.\r\n * The call syntax for rt_OneStep is\r\n *\r\n * rt_OneStep();\r\n */\r\n printf(\"Warning: The simulation will run forever. \"\r\n \"Generated ERT main won't simulate model step behavior. \"\r\n \"To change this behavior select the 'MAT-file logging' option.\\n\");\r\n fflush((NULL));\r\n while (1) {\r\n /* Perform application tasks here */\r\n }\r\n\r\n /* The option 'Remove error status field in real-time model data structure'\r\n * is selected, therefore the following code does not need to execute.\r\n */\r\n\r\n /* Terminate model */\r\n ADM_Integrated_Logic_terminate();\r\n return 0;\r\n}\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"ADM_Integrated_Logic.c","type":"source","group":"model","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Model files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ADM_Integrated_Logic.c\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#include \"ADM_Integrated_Logic.h\"\r\n#include \r\n#include \"ADM_Integrated_Logic_private.h\"\r\n#include \r\n#include \r\n\r\n/* Named constants for Chart: '/Chart' */\r\n#define ADM_Integrated_Logic_IN_HAC_OFF ((uint8_t)1U)\r\n#define ADM_Integrated_Logic_IN_HAC_ON ((uint8_t)2U)\r\n\r\n/* Block signals and states (default storage) */\r\nDW_ADM_Integrated_Logic_T ADM_Integrated_Logic_DW;\r\n\r\n/* External inputs (root inport signals with default storage) */\r\nExtU_ADM_Integrated_Logic_T ADM_Integrated_Logic_U;\r\n\r\n/* External outputs (root outports fed by signals with default storage) */\r\nExtY_ADM_Integrated_Logic_T ADM_Integrated_Logic_Y;\r\n\r\n/* Real-time model */\r\nstatic RT_MODEL_ADM_Integrated_Logic_T ADM_Integrated_Logic_M_;\r\nRT_MODEL_ADM_Integrated_Logic_T *const ADM_Integrated_Logic_M =\r\n &ADM_Integrated_Logic_M_;\r\nstatic void rate_scheduler(void);\r\n\r\n/*\r\n * This function updates active task flag for each subrate.\r\n * The function is called at model base rate, hence the\r\n * generated code self-manages all its subrates.\r\n */\r\nstatic void rate_scheduler(void)\r\n{\r\n /* Compute which subrates run during the next base time step. Subrates\r\n * are an integer multiple of the base rate counter. Therefore, the subtask\r\n * counter is reset when it reaches its limit (zero means run).\r\n */\r\n (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1])++;\r\n if ((ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1]) > 499) {/* Sample time: [1.0s, 0.0s] */\r\n ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] = 0;\r\n }\r\n}\r\n\r\n/*\r\n * Output and update for atomic system:\r\n * '/Calculate_F_c'\r\n * '/Calculate_F_c1'\r\n */\r\nvoid ADM_Integrated_Lo_Calculate_F_c(double rtu_W, double rtu_theta, double\r\n *rty_F_c)\r\n{\r\n /* : F_c= W*sin(theta); */\r\n *rty_F_c = rtu_W * sin(rtu_theta);\r\n}\r\n\r\n/*\r\n * Output and update for atomic system:\r\n * '/MATLAB Function1'\r\n * '/MATLAB Function5'\r\n */\r\nvoid ADM_Integrated__MATLABFunction1(double rtu_u, double *rty_y)\r\n{\r\n *rty_y = rtu_u;\r\n\r\n /* : if u < 140 */\r\n if (rtu_u < 140.0) {\r\n /* : u = 140; */\r\n *rty_y = 140.0;\r\n }\r\n\r\n /* : y = u; */\r\n}\r\n\r\n/*\r\n * Output and update for atomic system:\r\n * '/MATLAB Function2'\r\n * '/MATLAB Function6'\r\n */\r\nvoid ADM_Integrated__MATLABFunction2(double rtu_u, double *rty_y)\r\n{\r\n *rty_y = rtu_u;\r\n\r\n /* : if u > -140 */\r\n if (rtu_u > -140.0) {\r\n /* : u = -140; */\r\n *rty_y = -140.0;\r\n }\r\n\r\n /* : y = u; */\r\n}\r\n\r\n/* Model step function */\r\nvoid ADM_Integrated_Logic_step(void)\r\n{\r\n double rtb_Add1;\r\n double rtb_Add1_tmp;\r\n double rtb_Add3;\r\n double rtb_Add_e;\r\n double rtb_Brake_Torque_Cmd;\r\n double rtb_Desired_Torque;\r\n double rtb_Error_m;\r\n double rtb_Gain_c;\r\n double rtb_Integrator_1;\r\n double rtb_Product1_e;\r\n double rtb_Product1_f;\r\n double rtb_Product1_iz;\r\n double rtb_Product1_m;\r\n double rtb_Product1_pd;\r\n double rtb_Sum1_aj;\r\n double rtb_Sum1_i2;\r\n double rtb_Sum1_lm;\r\n double rtb_Sum1_o1;\r\n double rtb_Sum1_p;\r\n double rtb_Sum_f;\r\n double rtb_Switch2;\r\n double rtb_UkYk1;\r\n double rtb_UkYk1_j;\r\n double rtb_Vx_Cmd_R;\r\n double rtb_Yk1_e;\r\n double rtb_Yk1_p;\r\n double rtb_deltafalllimit_m;\r\n double rtb_output_a;\r\n double rtb_output_p;\r\n double rtb_y_l;\r\n int32_t temp_gear;\r\n bool rtb_Compare;\r\n bool rtb_Compare_d;\r\n\r\n /* RelationalOperator: '/Compare' incorporates:\r\n * Constant: '/Constant'\r\n * Inport: '/GV_Operation_Mode'\r\n */\r\n rtb_Compare = (ADM_Integrated_Logic_U.GV_Operation_Mode == 2.0);\r\n if (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] == 0) {\r\n /* Step: '/Step' incorporates:\r\n * DigitalClock: '/Digital Clock'\r\n */\r\n rtb_Add_e = ((ADM_Integrated_Logic_M->Timing.clockTick1) * 1.0);\r\n if (rtb_Add_e < 0.0) {\r\n temp_gear = 0;\r\n } else {\r\n temp_gear = 1000;\r\n }\r\n\r\n /* Product: '/Product' incorporates:\r\n * Step: '/Step'\r\n */\r\n rtb_Integrator_1 = (double)temp_gear * rtb_Add_e;\r\n\r\n /* Saturate: '/Saturation' */\r\n if (rtb_Integrator_1 > 1000.0) {\r\n /* Saturate: '/Saturation' */\r\n ADM_Integrated_Logic_DW.Saturation = 1000.0;\r\n } else if (rtb_Integrator_1 < 0.0) {\r\n /* Saturate: '/Saturation' */\r\n ADM_Integrated_Logic_DW.Saturation = 0.0;\r\n } else {\r\n /* Saturate: '/Saturation' */\r\n ADM_Integrated_Logic_DW.Saturation = rtb_Integrator_1;\r\n }\r\n\r\n /* End of Saturate: '/Saturation' */\r\n }\r\n\r\n /* Product: '/delta rise limit' incorporates:\r\n * Constant: '/Upper_Torq'\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Switch2 = 0.016;\r\n\r\n /* UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n rtb_Yk1_e = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_m;\r\n\r\n /* Product: '/delta rise limit' incorporates:\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Integrator_1 = 0.002;\r\n\r\n /* Saturate: '/Pitch_Saturation' incorporates:\r\n * DiscreteIntegrator: '/Integrator_2'\r\n */\r\n if (ADM_Integrated_Logic_DW.Integrator_2_DSTATE > 10.0) {\r\n rtb_Add_e = 10.0;\r\n } else if (ADM_Integrated_Logic_DW.Integrator_2_DSTATE < -10.0) {\r\n rtb_Add_e = -10.0;\r\n } else {\r\n rtb_Add_e = ADM_Integrated_Logic_DW.Integrator_2_DSTATE;\r\n }\r\n\r\n /* Sum: '/Difference Inputs1' incorporates:\r\n * Saturate: '/Pitch_Saturation'\r\n *\r\n * Block description for '/Difference Inputs1':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_UkYk1 = rtb_Add_e - rtb_Yk1_e;\r\n\r\n /* Switch: '/Switch2' incorporates:\r\n * RelationalOperator: '/LowerRelop1'\r\n */\r\n if (rtb_UkYk1 <= 0.002) {\r\n /* Switch: '/Switch' incorporates:\r\n * RelationalOperator: '/UpperRelop'\r\n */\r\n if (rtb_UkYk1 < -0.002) {\r\n rtb_Integrator_1 = -0.002;\r\n } else {\r\n rtb_Integrator_1 = rtb_UkYk1;\r\n }\r\n\r\n /* End of Switch: '/Switch' */\r\n }\r\n\r\n /* End of Switch: '/Switch2' */\r\n\r\n /* Sum: '/Difference Inputs2'\r\n *\r\n * Block description for '/Difference Inputs2':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_Yk1_e += rtb_Integrator_1;\r\n\r\n /* MATLAB Function: '/Calculate_F_c' incorporates:\r\n * Gain: '/Gain'\r\n */\r\n ADM_Integrated_Lo_Calculate_F_c(ADM_Integrated_Logic_ConstB.W_value,\r\n 0.017453292519943295 * rtb_Yk1_e, &rtb_UkYk1);\r\n\r\n /* Gain: '/Gain2' incorporates:\r\n * Constant: '/Radius'\r\n * Product: '/Multiply3'\r\n * Sum: '/Required_Brake_Cal'\r\n */\r\n /* : F_R= C_r*W*cos(theta); */\r\n rtb_Integrator_1 = rtb_UkYk1 * 0.292 * 0.083822296730930432;\r\n\r\n /* Saturate: '/Saturation' */\r\n if (rtb_Integrator_1 > 60.0) {\r\n rtb_Integrator_1 = 60.0;\r\n } else if (rtb_Integrator_1 < 0.0) {\r\n rtb_Integrator_1 = 0.0;\r\n }\r\n\r\n /* Sum: '/Difference Inputs1' incorporates:\r\n * Saturate: '/Saturation'\r\n * UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Difference Inputs1':\r\n *\r\n * Add in CPU\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n rtb_UkYk1 = rtb_Integrator_1 - ADM_Integrated_Logic_DW.DelayInput2_DSTATE;\r\n\r\n /* Switch: '/Switch2' incorporates:\r\n * RelationalOperator: '/LowerRelop1'\r\n */\r\n if (rtb_UkYk1 <= 0.016) {\r\n /* Switch: '/Switch' incorporates:\r\n * RelationalOperator: '/UpperRelop'\r\n */\r\n if (rtb_UkYk1 < -0.16) {\r\n rtb_Switch2 = -0.16;\r\n } else {\r\n rtb_Switch2 = rtb_UkYk1;\r\n }\r\n\r\n /* End of Switch: '/Switch' */\r\n }\r\n\r\n /* End of Switch: '/Switch2' */\r\n\r\n /* Sum: '/Difference Inputs2' incorporates:\r\n * UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Difference Inputs2':\r\n *\r\n * Add in CPU\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n rtb_UkYk1 = rtb_Switch2 + ADM_Integrated_Logic_DW.DelayInput2_DSTATE;\r\n\r\n /* Gain: '/Grade_GAIN' */\r\n rtb_Desired_Torque = 0.8 * rtb_UkYk1;\r\n\r\n /* MATLAB Function: '/Vx_OutPut_Function' incorporates:\r\n * Constant: '/Constant'\r\n * Inport: '/GV_BrakeTorqueCommand'\r\n * Inport: '/GV_Vx_Command'\r\n * Inport: '/GV_Vx_Limit'\r\n * RelationalOperator: '/Compare'\r\n */\r\n /* : if Brake_Input == 0 */\r\n if (ADM_Integrated_Logic_U.GV_BrakeTorqueCommand < 50.0) {\r\n /* : if Vx_Limit <= Vx_Kph */\r\n if (ADM_Integrated_Logic_U.GV_Vx_Limit <=\r\n ADM_Integrated_Logic_U.GV_Vx_Command) {\r\n /* : Vx_Output = Vx_Limit; */\r\n rtb_deltafalllimit_m = ADM_Integrated_Logic_U.GV_Vx_Limit;\r\n } else {\r\n /* : else */\r\n /* : Vx_Output = Vx_Kph; */\r\n rtb_deltafalllimit_m = ADM_Integrated_Logic_U.GV_Vx_Command;\r\n }\r\n } else {\r\n /* : else */\r\n /* : Vx_Output = 0; */\r\n rtb_deltafalllimit_m = 0.0;\r\n }\r\n\r\n /* End of MATLAB Function: '/Vx_OutPut_Function' */\r\n\r\n /* RateLimiter: '/Input_Vx_RateLimiter' */\r\n rtb_output_a = rtb_deltafalllimit_m - ADM_Integrated_Logic_DW.PrevY;\r\n if (rtb_output_a > 0.004) {\r\n rtb_Vx_Cmd_R = ADM_Integrated_Logic_DW.PrevY + 0.004;\r\n } else if (rtb_output_a < -0.008) {\r\n rtb_Vx_Cmd_R = ADM_Integrated_Logic_DW.PrevY - 0.008;\r\n } else {\r\n rtb_Vx_Cmd_R = rtb_deltafalllimit_m;\r\n }\r\n\r\n ADM_Integrated_Logic_DW.PrevY = rtb_Vx_Cmd_R;\r\n\r\n /* End of RateLimiter: '/Input_Vx_RateLimiter' */\r\n\r\n /* RelationalOperator: '/Compare' incorporates:\r\n * Constant: '/Constant'\r\n * Inport: '/GV_BrakeTorqueCommand'\r\n */\r\n rtb_Compare_d = (ADM_Integrated_Logic_U.GV_BrakeTorqueCommand >= 100.0);\r\n\r\n /* Delay: '/Memory' */\r\n rtb_deltafalllimit_m = ADM_Integrated_Logic_DW.Memory_DSTATE;\r\n\r\n /* MATLAB Function: '/Gear_FUNCTION1' incorporates:\r\n * Inport: '/GV_VCU_GearSelStat'\r\n * Inport: '/GV_Vx_Fbk'\r\n */\r\n /* : SAFE_SPEED_THRESHOLD = 0; */\r\n /* 안전 기어 변경 속도(kph) */\r\n /* 기본값: 현재 기어 유지 */\r\n /* : output = Current_Gear; */\r\n /* 1. P단 요청이 있을 경우: 모든 상태에서 우선 처리 */\r\n /* : if Gear_Cmd == 0 */\r\n if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 0.0) {\r\n /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD && Brake_Torque_Cmd == 1 */\r\n if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) && rtb_Compare_d) {\r\n /* : output = 0; */\r\n rtb_deltafalllimit_m = 0.0;\r\n\r\n /* P단 진입 허용 */\r\n } else {\r\n /* : else */\r\n /* : output = Current_Gear; */\r\n /* 조건 불충족 시 유지 */\r\n }\r\n } else {\r\n /* 2. 현재 기어 상태에 따라 처리 */\r\n /* : switch Current_Gear */\r\n switch ((int32_t)rtb_deltafalllimit_m) {\r\n case 0:\r\n /* : case 0 */\r\n /* P 상태 */\r\n /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD */\r\n if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) &&\r\n ((ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 1.0) ||\r\n (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 3.0) ||\r\n (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0))) {\r\n /* : if Gear_Cmd == 1 || Gear_Cmd == 3 || Gear_Cmd == 2 */\r\n /* : output = 2; */\r\n rtb_deltafalllimit_m = 2.0;\r\n\r\n /* P -> N (모든 경우 N을 거쳐야 하므로) */\r\n }\r\n break;\r\n\r\n case 1:\r\n /* : case 1 */\r\n /* R 상태 */\r\n /* : if Gear_Cmd == 2 */\r\n if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0) {\r\n /* : output = 2; */\r\n rtb_deltafalllimit_m = 2.0;\r\n\r\n /* R -> N 허용 */\r\n }\r\n break;\r\n\r\n case 2:\r\n /* : case 2 */\r\n /* N 상태 */\r\n /* : if Vehicle_Speed <= SAFE_SPEED_THRESHOLD && Brake_Torque_Cmd == 1 */\r\n if ((ADM_Integrated_Logic_U.GV_Vx_Fbk <= 0.0) && rtb_Compare_d) {\r\n /* : if Gear_Cmd == 1 */\r\n if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 1.0) {\r\n /* : output = 1; */\r\n rtb_deltafalllimit_m = 1.0;\r\n\r\n /* N -> R */\r\n } else if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 3.0) {\r\n /* : elseif Gear_Cmd == 3 */\r\n /* : output = 3; */\r\n rtb_deltafalllimit_m = 3.0;\r\n\r\n /* N -> D */\r\n }\r\n }\r\n break;\r\n\r\n case 3:\r\n /* : case 3 */\r\n /* D 상태 */\r\n /* : if Gear_Cmd == 2 */\r\n if (ADM_Integrated_Logic_U.GV_VCU_GearSelStat == 2.0) {\r\n /* : output = 2; */\r\n rtb_deltafalllimit_m = 2.0;\r\n\r\n /* D -> N 허용 */\r\n }\r\n break;\r\n }\r\n }\r\n\r\n /* End of MATLAB Function: '/Gear_FUNCTION1' */\r\n\r\n /* Chart: '/Chart' incorporates:\r\n * Constant: '/Constant'\r\n * Constant: '/Constant1'\r\n * Inport: '/GV_MCU_RPM'\r\n */\r\n if (ADM_Integrated_Logic_DW.is_active_c6_ADM_Integrated_Log == 0U) {\r\n ADM_Integrated_Logic_DW.is_active_c6_ADM_Integrated_Log = 1U;\r\n ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic =\r\n ADM_Integrated_Logic_IN_HAC_OFF;\r\n\r\n /* State HAC OFF */\r\n } else if (ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic ==\r\n ADM_Integrated_Logic_IN_HAC_OFF) {\r\n /* : sf_internal_predicateOutput = RPM_Input < rpm_threshold_low; */\r\n if (ADM_Integrated_Logic_U.GV_MCU_RPM < -50.0) {\r\n ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic =\r\n ADM_Integrated_Logic_IN_HAC_ON;\r\n\r\n /* State HAC ON */\r\n } else {\r\n /* Outport: '/Debug_HAC_RPM_Decision' */\r\n /* : HAC_Output = 0; */\r\n ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision = 0.0;\r\n }\r\n\r\n /* case IN_HAC_ON: */\r\n /* : sf_internal_predicateOutput = RPM_Input > rpm_threshold_high; */\r\n } else if (ADM_Integrated_Logic_U.GV_MCU_RPM > 150.0) {\r\n ADM_Integrated_Logic_DW.is_c6_ADM_Integrated_Logic =\r\n ADM_Integrated_Logic_IN_HAC_OFF;\r\n\r\n /* State HAC OFF */\r\n } else {\r\n /* Outport: '/Debug_HAC_RPM_Decision' */\r\n /* : HAC_Output = 1; */\r\n ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision = 1.0;\r\n }\r\n\r\n /* End of Chart: '/Chart' */\r\n\r\n /* MATLAB Function: '/HAC_OFF_OK_Func' */\r\n /* Input Parameters: */\r\n /* Desired_Brake_Torque_Cmd: Commanded brake torque when HAC is ON */\r\n /* Desired_Torque: Required torque at the slope */\r\n /* Feedback_Torque: Torque output from the motor */\r\n /* HAC_Flag: Current HAC state flag */\r\n /* Output Parameters: */\r\n /* Brake_Torque_Cmd: Actual brake torque command */\r\n /* HAC_ON_OFF_CHECK: Status of HAC (ON or OFF) */\r\n /* Persistent variable to track if HAC has ever been ON */\r\n /* Initialize HAC_ON_FLAG if it is empty */\r\n /* : if isempty(HAC_ON_FLAG) */\r\n /* Persistent variable for torque smoothing logic */\r\n /* : if isempty(Smoothed_Torque) */\r\n /* Persistent variable to store HAC ON Desired Torque */\r\n /* : if isempty(HAC_Desired_Torque) */\r\n /* Persistent variable to track HAC ON time */\r\n /* : if isempty(HAC_ON_Timer) */\r\n /* Initialize outputs */\r\n /* : Brake_Torque_Cmd = 0; */\r\n rtb_Brake_Torque_Cmd = 0.0;\r\n\r\n /* Outport: '/Debug_HAC_FLAG' incorporates:\r\n * MATLAB Function: '/HAC_OFF_OK_Func'\r\n */\r\n /* : HAC_ON_OFF_CHECK = 0; */\r\n ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 0.0;\r\n\r\n /* MATLAB Function: '/HAC_OFF_OK_Func' incorporates:\r\n * Constant: '/Accel_Cmd '\r\n * Constant: '/Brake_Cmd'\r\n * Constant: '/Gear_D'\r\n * Inport: '/GV_BrakeTorqueCommand'\r\n * Inport: '/GV_MCU_EstTrq'\r\n * Outport: '/Debug_HAC_RPM_Decision'\r\n * RelationalOperator: '/Relational Operator'\r\n * RelationalOperator: '/Relational Operator1'\r\n * RelationalOperator: '/Relational Operator2'\r\n * Sum: '/HAC_Flags_Add'\r\n */\r\n /* Check if HAC is ON (HAC_Flag >= 4) */\r\n /* : if HAC_Flag >= 4 */\r\n if ((double)(((ADM_Integrated_Logic_U.GV_BrakeTorqueCommand <= 20.0) +\r\n (rtb_Vx_Cmd_R <= 2.0)) + (rtb_deltafalllimit_m == 3.0)) +\r\n ADM_Integrated_Logic_Y.Debug_HAC_RPM_Decision >= 4.0) {\r\n /* : if HAC_ON_FLAG == 0 */\r\n if (ADM_Integrated_Logic_DW.HAC_ON_FLAG == 0.0) {\r\n /* : HAC_ON_Timer = 0; */\r\n ADM_Integrated_Logic_DW.HAC_ON_Timer = 0.0;\r\n\r\n /* Reset timer when HAC turns ON */\r\n }\r\n\r\n /* : HAC_ON_FLAG = 1; */\r\n ADM_Integrated_Logic_DW.HAC_ON_FLAG = 1.0;\r\n\r\n /* : Brake_Torque_Cmd = Desired_Brake_Torque_Cmd; */\r\n rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Saturation;\r\n\r\n /* : Smoothed_Torque = Desired_Brake_Torque_Cmd; */\r\n ADM_Integrated_Logic_DW.Smoothed_Torque = ADM_Integrated_Logic_DW.Saturation;\r\n\r\n /* : if HAC_ON_Timer < 3 */\r\n if (ADM_Integrated_Logic_DW.HAC_ON_Timer < 3.0) {\r\n /* Update Desired Torque for the first 3 seconds */\r\n /* : HAC_Desired_Torque = Desired_Torque; */\r\n ADM_Integrated_Logic_DW.HAC_Desired_Torque = rtb_Desired_Torque;\r\n\r\n /* : HAC_ON_Timer = HAC_ON_Timer + 1/200; */\r\n ADM_Integrated_Logic_DW.HAC_ON_Timer += 0.005;\r\n\r\n /* Assuming 200 Hz update rate */\r\n }\r\n\r\n /* Outport: '/Debug_HAC_FLAG' */\r\n /* : HAC_ON_OFF_CHECK = 1; */\r\n ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 1.0;\r\n\r\n /* : else */\r\n /* If HAC has been ON and HAC_Flag drops below 4 */\r\n /* : if HAC_ON_FLAG == 1 */\r\n } else if (ADM_Integrated_Logic_DW.HAC_ON_FLAG == 1.0) {\r\n /* Check if Feedback Torque exceeds Desired Torque */\r\n /* : if Feedback_Torque >= HAC_Desired_Torque */\r\n if (ADM_Integrated_Logic_U.GV_MCU_EstTrq >=\r\n ADM_Integrated_Logic_DW.HAC_Desired_Torque) {\r\n /* : HAC_ON_OFF_CHECK = 0; */\r\n /* Apply smoothing logic to reduce torque gradually */\r\n /* : Smoothed_Torque = Smoothed_Torque - 0.05 * Smoothed_Torque; */\r\n ADM_Integrated_Logic_DW.Smoothed_Torque -= 0.05 *\r\n ADM_Integrated_Logic_DW.Smoothed_Torque;\r\n\r\n /* Adjust smoothing factor as needed */\r\n /* : if Smoothed_Torque < 0.01 */\r\n if (ADM_Integrated_Logic_DW.Smoothed_Torque < 0.01) {\r\n /* Threshold to consider torque as zero */\r\n /* : Smoothed_Torque = 0; */\r\n ADM_Integrated_Logic_DW.Smoothed_Torque = 0.0;\r\n\r\n /* : HAC_ON_FLAG = 0; */\r\n ADM_Integrated_Logic_DW.HAC_ON_FLAG = 0.0;\r\n\r\n /* Reset HAC_ON_FLAG if fully off */\r\n /* : HAC_Desired_Torque = 0; */\r\n ADM_Integrated_Logic_DW.HAC_Desired_Torque = 0.0;\r\n\r\n /* Reset Desired Torque when HAC is OFF */\r\n /* : HAC_ON_Timer = 0; */\r\n ADM_Integrated_Logic_DW.HAC_ON_Timer = 0.0;\r\n\r\n /* Reset Timer */\r\n }\r\n\r\n /* : Brake_Torque_Cmd = Smoothed_Torque; */\r\n rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Smoothed_Torque;\r\n } else {\r\n /* : else */\r\n /* Keep the brake torque command if torque condition is not met */\r\n /* : Brake_Torque_Cmd = Desired_Brake_Torque_Cmd; */\r\n rtb_Brake_Torque_Cmd = ADM_Integrated_Logic_DW.Saturation;\r\n\r\n /* : Smoothed_Torque = Desired_Brake_Torque_Cmd; */\r\n ADM_Integrated_Logic_DW.Smoothed_Torque =\r\n ADM_Integrated_Logic_DW.Saturation;\r\n\r\n /* Outport: '/Debug_HAC_FLAG' */\r\n /* : HAC_ON_OFF_CHECK = 1; */\r\n ADM_Integrated_Logic_Y.Debug_HAC_FLAG = 1.0;\r\n }\r\n }\r\n\r\n /* MATLAB Function: '/GearCondition_Brake' */\r\n /* : if data == 1 */\r\n if (rtb_deltafalllimit_m == 1.0) {\r\n /* : output = -1; */\r\n rtb_output_a = -1.0;\r\n } else if (rtb_deltafalllimit_m == 3.0) {\r\n /* : elseif data == 3 */\r\n /* : output = 1; */\r\n rtb_output_a = 1.0;\r\n } else {\r\n /* : else */\r\n /* : output = 0; */\r\n rtb_output_a = 0.0;\r\n }\r\n\r\n /* End of MATLAB Function: '/GearCondition_Brake' */\r\n\r\n /* Gain: '/Brake_GAIN' incorporates:\r\n * DiscreteTransferFcn: '/Discrete Transfer Fcn'\r\n */\r\n rtb_Integrator_1 = 0.0625 * ADM_Integrated_Logic_DW.DiscreteTransferFcn_states\r\n * -80.0;\r\n\r\n /* Saturate: '/Saturation' */\r\n if (rtb_Integrator_1 > 1000.0) {\r\n rtb_Integrator_1 = 1000.0;\r\n } else if (rtb_Integrator_1 < 0.0) {\r\n rtb_Integrator_1 = 0.0;\r\n }\r\n\r\n /* Product: '/Multiply2' incorporates:\r\n * Saturate: '/Saturation'\r\n */\r\n rtb_Integrator_1 *= rtb_output_a;\r\n\r\n /* RateLimiter: '/Brake_Out_RateLimiter' */\r\n rtb_output_a = rtb_Integrator_1 - ADM_Integrated_Logic_DW.PrevY_o;\r\n if (rtb_output_a > 3.0) {\r\n rtb_Integrator_1 = ADM_Integrated_Logic_DW.PrevY_o + 3.0;\r\n } else if (rtb_output_a < -3.0) {\r\n rtb_Integrator_1 = ADM_Integrated_Logic_DW.PrevY_o - 3.0;\r\n }\r\n\r\n ADM_Integrated_Logic_DW.PrevY_o = rtb_Integrator_1;\r\n\r\n /* End of RateLimiter: '/Brake_Out_RateLimiter' */\r\n\r\n /* Saturate: '/Brake_Saturation' */\r\n if (rtb_Integrator_1 > 1000.0) {\r\n rtb_Integrator_1 = 1000.0;\r\n } else if (rtb_Integrator_1 < 0.0) {\r\n rtb_Integrator_1 = 0.0;\r\n }\r\n\r\n /* End of Saturate: '/Brake_Saturation' */\r\n\r\n /* MATLAB Function: '/Emergency_Brake_Func' incorporates:\r\n * Inport: '/GV_Vx_Fbk'\r\n * Sum: '/Add'\r\n */\r\n /* : if Emergency_Flag == 1 */\r\n if (rtb_Compare) {\r\n /* : Emergency_Brake_Output = Vehicle_Speed*100; */\r\n rtb_output_a = ADM_Integrated_Logic_U.GV_Vx_Fbk * 100.0;\r\n } else {\r\n /* : else */\r\n /* : Emergency_Brake_Output = Brake_Torque_Cmd; */\r\n rtb_output_a = rtb_Brake_Torque_Cmd + rtb_Integrator_1;\r\n }\r\n\r\n /* End of MATLAB Function: '/Emergency_Brake_Func' */\r\n\r\n /* Saturate: '/Brake_Saturation' */\r\n if (rtb_output_a > 1500.0) {\r\n /* Outport: '/GV_Brake_Command' */\r\n ADM_Integrated_Logic_Y.GV_Brake_Command = 1500.0;\r\n } else if (rtb_output_a < 0.0) {\r\n /* Outport: '/GV_Brake_Command' */\r\n ADM_Integrated_Logic_Y.GV_Brake_Command = 0.0;\r\n } else {\r\n /* Outport: '/GV_Brake_Command' */\r\n ADM_Integrated_Logic_Y.GV_Brake_Command = rtb_output_a;\r\n }\r\n\r\n /* End of Saturate: '/Brake_Saturation' */\r\n\r\n /* Outport: '/Debug_CC_Brake_Output' */\r\n ADM_Integrated_Logic_Y.Debug_CC_Brake_Output = rtb_Integrator_1;\r\n\r\n /* Outport: '/Debug_HAC_Brake_Output' */\r\n ADM_Integrated_Logic_Y.Debug_HAC_Brake_Output = rtb_Brake_Torque_Cmd;\r\n\r\n /* MATLAB Function: '/Gear_pos_out' incorporates:\r\n * MATLAB Function: '/Target_RPM'\r\n */\r\n /* Gear R 단에서 - target rpm 값 */\r\n /* : if data == 0 */\r\n if (rtb_deltafalllimit_m == 0.0) {\r\n /* : temp_gear = 0; */\r\n rtb_output_p = 0.0;\r\n\r\n /* : temp_gear = 0; */\r\n temp_gear = 0;\r\n } else {\r\n if (rtb_deltafalllimit_m == 2.0) {\r\n /* : elseif data == 2 */\r\n /* : temp_gear = 0; */\r\n rtb_output_p = 0.0;\r\n } else if (rtb_deltafalllimit_m == 1.0) {\r\n /* : elseif data == 1 */\r\n /* : temp_gear = -1; */\r\n rtb_output_p = -1.0;\r\n } else if (rtb_deltafalllimit_m == 3.0) {\r\n /* : elseif data == 3 */\r\n /* : temp_gear = 1; */\r\n rtb_output_p = 1.0;\r\n } else {\r\n /* : else */\r\n /* : temp_gear = 0; */\r\n rtb_output_p = 0.0;\r\n }\r\n\r\n if (rtb_deltafalllimit_m == 2.0) {\r\n /* : elseif data == 2 */\r\n /* : temp_gear = 0; */\r\n temp_gear = 0;\r\n } else if (rtb_deltafalllimit_m == 1.0) {\r\n /* : elseif data == 1 */\r\n /* : temp_gear = -1; */\r\n temp_gear = -1;\r\n } else if (rtb_deltafalllimit_m == 3.0) {\r\n /* : elseif data == 3 */\r\n /* : temp_gear = 1; */\r\n temp_gear = 1;\r\n } else {\r\n /* : else */\r\n /* : temp_gear = 0; */\r\n temp_gear = 0;\r\n }\r\n }\r\n\r\n /* End of MATLAB Function: '/Gear_pos_out' */\r\n\r\n /* MATLAB Function: '/Target_RPM' */\r\n /* : output = temp_gear; */\r\n /* : gear_ratio = 11.93; */\r\n /* : Radius = 0.270781; */\r\n /* : engine_eff = 1; */\r\n /* Gear R 단에서 - target rpm 값 */\r\n /* : if data == 0 */\r\n /* : speed_m_per_s = Vx_Kph * 1000/3600; */\r\n /* : Target_RPM = (speed_m_per_s * gear_ratio * 60) / (Radius*2*pi)*engine_eff*temp_gear; */\r\n rtb_Brake_Torque_Cmd = rtb_Vx_Cmd_R * 1000.0 / 3600.0 * 11.93 * 60.0 /\r\n 1.7013672006633955 * (double)temp_gear;\r\n\r\n /* RateLimiter: '/TargetSpd_RateLimiter' */\r\n rtb_output_a = rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.PrevY_a;\r\n if (rtb_output_a > 0.4) {\r\n rtb_output_a = ADM_Integrated_Logic_DW.PrevY_a + 0.4;\r\n } else if (rtb_output_a < -0.8) {\r\n rtb_output_a = ADM_Integrated_Logic_DW.PrevY_a - 0.8;\r\n } else {\r\n rtb_output_a = rtb_Brake_Torque_Cmd;\r\n }\r\n\r\n ADM_Integrated_Logic_DW.PrevY_a = rtb_output_a;\r\n\r\n /* End of RateLimiter: '/TargetSpd_RateLimiter' */\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Brake_Torque_Cmd = ((rtb_output_a + ADM_Integrated_Logic_DW.d1_DSTATE) *\r\n 0.002 + 0.1041032953945969 * ADM_Integrated_Logic_DW.d_DSTATE) /\r\n 0.1081032953945969;\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Sum1_i2 = (rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.d_DSTATE_i) *\r\n 1000.0 - ADM_Integrated_Logic_DW.d1_DSTATE_p;\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Sum1_o1 = (rtb_Sum1_i2 - ADM_Integrated_Logic_DW.d_DSTATE_c) * 1000.0 -\r\n ADM_Integrated_Logic_DW.d1_DSTATE_h;\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Sum1_lm = (rtb_Sum1_o1 - ADM_Integrated_Logic_DW.d_DSTATE_d) * 1000.0 -\r\n ADM_Integrated_Logic_DW.d1_DSTATE_l;\r\n\r\n /* Gain: '/Gain' incorporates:\r\n * Constant: '/Constant3'\r\n * Constant: '/Constant4'\r\n * Constant: '/Constant5'\r\n * Product: '/Product'\r\n * Product: '/Product1'\r\n * Product: '/Product2'\r\n * Sum: '/Add5'\r\n */\r\n rtb_Gain_c = (((156.8 * rtb_Brake_Torque_Cmd + 212.8 * rtb_Sum1_i2) + 21.8 *\r\n rtb_Sum1_o1) + rtb_Sum1_lm) * 9.44822373393802E-6;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant1'\r\n * Constant: '/Constant2'\r\n * Delay: '/Delay'\r\n * Delay: '/Delay1'\r\n * Delay: '/Delay2'\r\n * Delay: '/Delay3'\r\n * Gain: '/gain1'\r\n * Gain: '/gain3'\r\n * Product: '/x(n), x(n-1), x(n-2)'\r\n * Product: '/y(n-1)'\r\n * Product: '/y(n-2)'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * Sum: '/Sum5'\r\n * Sum: '/Sum6'\r\n */\r\n rtb_Product1_pd = ((((2.0 * ADM_Integrated_Logic_DW.Delay1_DSTATE + rtb_Gain_c)\r\n + ADM_Integrated_Logic_DW.Delay_DSTATE[0]) *\r\n 0.39478417604357435 - -7.2104316479128512 *\r\n ADM_Integrated_Logic_DW.Delay2_DSTATE) -\r\n 2.6178993711731877 * ADM_Integrated_Logic_DW.Delay3_DSTATE\r\n [0]) / 6.1716689809139611;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Product1_m = ((rtb_Product1_pd + ADM_Integrated_Logic_DW.d1_DSTATE_e) *\r\n 0.002 + 0.00861032953945969 *\r\n ADM_Integrated_Logic_DW.d_DSTATE_ij) / 0.01261032953945969;\r\n\r\n /* Sum: '/Subtract' incorporates:\r\n * Inport: '/GV_MCU_RPM'\r\n * MultiPortSwitch: '/Multiport Switch1'\r\n */\r\n rtb_Error_m = rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_U.GV_MCU_RPM;\r\n\r\n /* Saturate: '/Error_Saturation' incorporates:\r\n * MultiPortSwitch: '/Multiport Switch1'\r\n */\r\n if (rtb_Error_m > 2000.0) {\r\n rtb_Error_m = 2000.0;\r\n } else if (rtb_Error_m < -2000.0) {\r\n rtb_Error_m = -2000.0;\r\n }\r\n\r\n /* End of Saturate: '/Error_Saturation' */\r\n\r\n /* DeadZone: '/Dead Zone' incorporates:\r\n * MultiPortSwitch: '/Multiport Switch1'\r\n */\r\n if (rtb_Error_m > 50.0) {\r\n rtb_Add_e = rtb_Error_m - 50.0;\r\n } else if (rtb_Error_m >= -50.0) {\r\n rtb_Add_e = 0.0;\r\n } else {\r\n rtb_Add_e = rtb_Error_m - -50.0;\r\n }\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Error_m = (rtb_Brake_Torque_Cmd - ADM_Integrated_Logic_DW.d_DSTATE_ir) *\r\n 1000.0 - ADM_Integrated_Logic_DW.d1_DSTATE_o;\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Sum1_aj = (rtb_Error_m - ADM_Integrated_Logic_DW.d_DSTATE_m) * 1000.0 -\r\n ADM_Integrated_Logic_DW.d1_DSTATE_hm;\r\n\r\n /* Sum: '/Sum1' incorporates:\r\n * Gain: '/gain'\r\n * Sum: '/Sum2'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Sum1_p = (rtb_Sum1_aj - ADM_Integrated_Logic_DW.d_DSTATE_mw) * 1000.0 -\r\n ADM_Integrated_Logic_DW.d1_DSTATE_g;\r\n\r\n /* Sum: '/Add3' incorporates:\r\n * Constant: '/Constant3'\r\n * Constant: '/Constant4'\r\n * Constant: '/Constant5'\r\n * Gain: '/Gain'\r\n * Memory: '/Memory'\r\n * Product: '/Product2'\r\n * Product: '/Product3'\r\n * Product: '/Product4'\r\n * Sum: '/Add2'\r\n */\r\n rtb_Add3 = (((156.8 * rtb_Brake_Torque_Cmd + 212.8 * rtb_Error_m) + 21.8 *\r\n rtb_Sum1_aj) + rtb_Sum1_p) * 9.44822373393802E-6 -\r\n ADM_Integrated_Logic_DW.Memory_PreviousInput;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Product1_e = ((rtb_Add3 + ADM_Integrated_Logic_DW.d1_DSTATE_ej) * 0.002 +\r\n 0.029830988618379066 * ADM_Integrated_Logic_DW.d_DSTATE_j) /\r\n 0.03383098861837907;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant1'\r\n * Constant: '/Constant2'\r\n * Delay: '/Delay'\r\n * Delay: '/Delay1'\r\n * Delay: '/Delay2'\r\n * Delay: '/Delay3'\r\n * Gain: '/gain1'\r\n * Gain: '/gain3'\r\n * Product: '/x(n), x(n-1), x(n-2)'\r\n * Product: '/y(n-1)'\r\n * Product: '/y(n-2)'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * Sum: '/Sum5'\r\n * Sum: '/Sum6'\r\n */\r\n rtb_Product1_iz = ((((2.0 * ADM_Integrated_Logic_DW.Delay1_DSTATE_c +\r\n rtb_Product1_e) +\r\n ADM_Integrated_Logic_DW.Delay_DSTATE_p[0]) *\r\n 0.00035530575843921691 - -7.9992893884831213 *\r\n ADM_Integrated_Logic_DW.Delay2_DSTATE_n) -\r\n 3.9470487616123275 *\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE_h[0]) /\r\n 4.0536618499045511;\r\n\r\n /* MATLAB Function: '/DOB_Gain' incorporates:\r\n * Inport: '/GV_Vx_Fbk'\r\n */\r\n /* : if vx < 5 */\r\n if (ADM_Integrated_Logic_U.GV_Vx_Fbk < 5.0) {\r\n /* : gain = 0; */\r\n rtb_Switch2 = 0.0;\r\n } else {\r\n /* : else */\r\n /* : gain = (vx-5) * 0.2; */\r\n rtb_Switch2 = (ADM_Integrated_Logic_U.GV_Vx_Fbk - 5.0) * 0.2;\r\n }\r\n\r\n /* : if gain >=1 */\r\n if (rtb_Switch2 >= 1.0) {\r\n /* : gain =1; */\r\n rtb_Switch2 = 1.0;\r\n }\r\n\r\n /* End of MATLAB Function: '/DOB_Gain' */\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/DOBFlag'\r\n * Product: '/Product'\r\n */\r\n rtb_Integrator_1 = -(rtb_Product1_iz * 0.9);\r\n\r\n /* Saturate: '/DOB_Saturation' */\r\n if (rtb_Integrator_1 > 30.0) {\r\n rtb_Integrator_1 = 30.0;\r\n } else if (rtb_Integrator_1 < -30.0) {\r\n rtb_Integrator_1 = -30.0;\r\n }\r\n\r\n /* Sum: '/Subtract2' incorporates:\r\n * DeadZone: '/Dead Zone'\r\n * MultiPortSwitch: '/Multiport Switch1'\r\n * Product: '/Product'\r\n * Product: '/Multiply1'\r\n * Saturate: '/DOB_Saturation'\r\n * Sum: '/Add'\r\n */\r\n rtb_Add_e = (rtb_Add_e * 0.044648264844923756 + rtb_Product1_m) +\r\n rtb_Integrator_1 * rtb_Switch2;\r\n\r\n /* Saturate: '/Torq_Saturation' */\r\n if (rtb_Add_e > 80.0) {\r\n rtb_Add_e = 80.0;\r\n } else if (rtb_Add_e < -80.0) {\r\n rtb_Add_e = -80.0;\r\n }\r\n\r\n /* End of Saturate: '/Torq_Saturation' */\r\n\r\n /* MATLAB Function: '/Emergency_Motor_Func' */\r\n /* : if Emergency_Flag == 1 */\r\n if (rtb_Compare) {\r\n /* Outport: '/GV_Motor_Torque_Cmd' */\r\n /* : Emergency_Motor_Output = 0; */\r\n ADM_Integrated_Logic_Y.GV_Motor_Torque_Cmd = 0.0;\r\n } else {\r\n /* Outport: '/GV_Motor_Torque_Cmd' incorporates:\r\n * Product: '/Multiply'\r\n */\r\n /* : else */\r\n /* : Emergency_Motor_Output = Motor_Torque_Cmd; */\r\n ADM_Integrated_Logic_Y.GV_Motor_Torque_Cmd = rtb_output_p * rtb_Add_e;\r\n }\r\n\r\n /* End of MATLAB Function: '/Emergency_Motor_Func' */\r\n\r\n /* Outport: '/GV_Gear_Postion_Out' */\r\n ADM_Integrated_Logic_Y.GV_Gear_Postion_Out = rtb_deltafalllimit_m;\r\n\r\n /* Sum: '/Add2' incorporates:\r\n * Inport: '/GV_Vx_Fbk'\r\n */\r\n rtb_Vx_Cmd_R -= ADM_Integrated_Logic_U.GV_Vx_Fbk;\r\n\r\n /* Outport: '/GV_Hill_Torque_Assist' */\r\n ADM_Integrated_Logic_Y.GV_Hill_Torque_Assist = rtb_Desired_Torque;\r\n\r\n /* Outport: '/Debug_HAC_Pitch_angle' */\r\n ADM_Integrated_Logic_Y.Debug_HAC_Pitch_angle = rtb_Yk1_e;\r\n\r\n /* MATLAB Function: '/Calculate_F_c1' incorporates:\r\n * Gain: '/Gain3'\r\n */\r\n ADM_Integrated_Lo_Calculate_F_c(ADM_Integrated_Logic_ConstB.W_Value_for_Brake,\r\n 0.017453292519943295 * rtb_Yk1_e, &rtb_Switch2);\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Inport: '/GV_IMU_AX_Val'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Desired_Torque = ((ADM_Integrated_Logic_U.GV_IMU_AX_Val +\r\n ADM_Integrated_Logic_DW.d1_DSTATE_ob) * 0.002 + 0.061661977236758134 *\r\n ADM_Integrated_Logic_DW.d_DSTATE_e) /\r\n 0.065661977236758137;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Inport: '/GV_IMU_AY_Val'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_output_p = ((ADM_Integrated_Logic_U.GV_IMU_AY_Val +\r\n ADM_Integrated_Logic_DW.d1_DSTATE_i) * 0.002 +\r\n 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_p) /\r\n 0.065661977236758137;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Inport: '/GV_IMU_AZ_Val'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Integrator_1 = ((ADM_Integrated_Logic_U.GV_IMU_AZ_Val +\r\n ADM_Integrated_Logic_DW.d1_DSTATE_o1) * 0.002 +\r\n 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_n)\r\n / 0.065661977236758137;\r\n\r\n /* MATLAB Function: '/Pitch_calculate' */\r\n /* This function calculates the pitch angle using accelerometer data. */\r\n /* Inputs: */\r\n /* ax - Acceleration in the x-axis */\r\n /* ay - Acceleration in the y-axis */\r\n /* az - Acceleration in the z-axis */\r\n /* Output: */\r\n /* pitch - Calculated pitch angle in degrees */\r\n /* Step 1: Calculate the denominator (sqrt(ay^2 + az^2)) */\r\n /* : denominator = sqrt(ay^2 + az^2); */\r\n rtb_Switch2 = sqrt(rtb_output_p * rtb_output_p + rtb_Integrator_1 *\r\n rtb_Integrator_1);\r\n\r\n /* Step 2: Compute pitch in radians using arctan(ax / denominator) */\r\n /* Protect against division by zero */\r\n /* : if denominator == 0 */\r\n if (rtb_Switch2 != 0.0) {\r\n /* : else */\r\n /* : pitch = atan(ax / denominator); */\r\n rtb_Switch2 = atan(rtb_Desired_Torque / rtb_Switch2);\r\n\r\n /* Calculate pitch in radians */\r\n } else {\r\n /* : pitch = 0; */\r\n /* If ay and az are both zero, pitch is set to 0 */\r\n }\r\n\r\n /* Sum: '/Sum' incorporates:\r\n * DiscreteIntegrator: '/Integrator_2'\r\n * MATLAB Function: '/Pitch_calculate'\r\n */\r\n /* Step 3: Convert radians to degrees */\r\n /* : pitch = pitch * (180 / pi); */\r\n /* Convert to degrees */\r\n rtb_Sum_f = ADM_Integrated_Logic_DW.Integrator_2_DSTATE - rtb_Switch2 *\r\n 57.295779513082323;\r\n\r\n /* Product: '/Product1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/gain'\r\n * Inport: '/GV_IMU_PitchRtVal'\r\n * Product: '/Product11'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n * Sum: '/Sum3'\r\n * Sum: '/Sum4'\r\n * UnitDelay: '/d'\r\n * UnitDelay: '/d1'\r\n */\r\n rtb_Product1_f = ((ADM_Integrated_Logic_U.GV_IMU_PitchRtVal +\r\n ADM_Integrated_Logic_DW.d1_DSTATE_a) * 0.002 +\r\n 0.061661977236758134 * ADM_Integrated_Logic_DW.d_DSTATE_d1) /\r\n 0.065661977236758137;\r\n\r\n /* Sum: '/Add1' incorporates:\r\n * Constant: '/Constant'\r\n * Gain: '/Gain1'\r\n * Inport: '/GV_Vx_Fbk'\r\n * Sum: '/Add3'\r\n */\r\n rtb_Add1_tmp = 400.0 - 6.5 * ADM_Integrated_Logic_U.GV_Vx_Fbk;\r\n\r\n /* MATLAB Function: '/MATLAB Function1' incorporates:\r\n * Sum: '/Add1'\r\n */\r\n ADM_Integrated__MATLABFunction1(rtb_Add1_tmp, &rtb_y_l);\r\n\r\n /* Product: '/delta rise limit' incorporates:\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Switch2 = rtb_y_l * 0.002;\r\n\r\n /* UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n rtb_Yk1_p = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_c;\r\n\r\n /* Sum: '/Difference Inputs1' incorporates:\r\n * Inport: '/GV_RWA_RackAngleCommand'\r\n *\r\n * Block description for '/Difference Inputs1':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_UkYk1_j = ADM_Integrated_Logic_U.GV_RWA_RackAngleCommand - rtb_Yk1_p;\r\n\r\n /* MATLAB Function: '/MATLAB Function2' incorporates:\r\n * Gain: '/Gain3'\r\n * Sum: '/Add1'\r\n */\r\n ADM_Integrated__MATLABFunction2(-rtb_Add1_tmp, &rtb_y_l);\r\n\r\n /* Switch: '/Switch2' incorporates:\r\n * RelationalOperator: '/LowerRelop1'\r\n */\r\n if (rtb_UkYk1_j <= rtb_Switch2) {\r\n /* Product: '/delta fall limit' incorporates:\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Switch2 = rtb_y_l * 0.002;\r\n\r\n /* Switch: '/Switch' incorporates:\r\n * RelationalOperator: '/UpperRelop'\r\n */\r\n if (rtb_UkYk1_j >= rtb_Switch2) {\r\n rtb_Switch2 = rtb_UkYk1_j;\r\n }\r\n\r\n /* End of Switch: '/Switch' */\r\n }\r\n\r\n /* End of Switch: '/Switch2' */\r\n\r\n /* Sum: '/Difference Inputs2'\r\n *\r\n * Block description for '/Difference Inputs2':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_Yk1_p += rtb_Switch2;\r\n\r\n /* Outport: '/GV_Master_Rack_Angle_Cmd' */\r\n ADM_Integrated_Logic_Y.GV_Master_Rack_Angle_Cmd = rtb_Yk1_p;\r\n\r\n /* MATLAB Function: '/MATLAB Function5' */\r\n ADM_Integrated__MATLABFunction1(rtb_Add1_tmp, &rtb_y_l);\r\n\r\n /* Product: '/delta rise limit' incorporates:\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Switch2 = rtb_y_l * 0.002;\r\n\r\n /* UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n rtb_UkYk1_j = ADM_Integrated_Logic_DW.DelayInput2_DSTATE_i;\r\n\r\n /* Sum: '/Difference Inputs1' incorporates:\r\n * Inport: '/GV_RWS_RackAngleCommand'\r\n *\r\n * Block description for '/Difference Inputs1':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_Add1 = ADM_Integrated_Logic_U.GV_RWS_RackAngleCommand - rtb_UkYk1_j;\r\n\r\n /* MATLAB Function: '/MATLAB Function6' incorporates:\r\n * Gain: '/Gain5'\r\n */\r\n ADM_Integrated__MATLABFunction2(-rtb_Add1_tmp, &rtb_y_l);\r\n\r\n /* Switch: '/Switch2' incorporates:\r\n * RelationalOperator: '/LowerRelop1'\r\n */\r\n if (rtb_Add1 <= rtb_Switch2) {\r\n /* Product: '/delta fall limit' incorporates:\r\n * SampleTimeMath: '/sample time'\r\n *\r\n * About '/sample time':\r\n * y = K where K = ( w * Ts )\r\n * */\r\n rtb_Switch2 = rtb_y_l * 0.002;\r\n\r\n /* Switch: '/Switch' incorporates:\r\n * RelationalOperator: '/UpperRelop'\r\n */\r\n if (rtb_Add1 >= rtb_Switch2) {\r\n rtb_Switch2 = rtb_Add1;\r\n }\r\n\r\n /* End of Switch: '/Switch' */\r\n }\r\n\r\n /* End of Switch: '/Switch2' */\r\n\r\n /* Sum: '/Difference Inputs2'\r\n *\r\n * Block description for '/Difference Inputs2':\r\n *\r\n * Add in CPU\r\n */\r\n rtb_Switch2 += rtb_UkYk1_j;\r\n\r\n /* Outport: '/GV_RWS_RackAngleCmd1' */\r\n ADM_Integrated_Logic_Y.GV_RWS_RackAngleCmd1 = rtb_Switch2;\r\n\r\n /* Update for UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n ADM_Integrated_Logic_DW.DelayInput2_DSTATE = rtb_UkYk1;\r\n\r\n /* Update for UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n ADM_Integrated_Logic_DW.DelayInput2_DSTATE_m = rtb_Yk1_e;\r\n\r\n /* Update for DiscreteIntegrator: '/Integrator_2' incorporates:\r\n * Constant: '/I_gain'\r\n * Constant: '/P_gain'\r\n * DiscreteIntegrator: '/Integrator_1'\r\n * Product: '/Product'\r\n * Product: '/Product1'\r\n * Sum: '/Sum1'\r\n * Sum: '/Sum2'\r\n */\r\n ADM_Integrated_Logic_DW.Integrator_2_DSTATE += (rtb_Product1_f -\r\n (ADM_Integrated_Logic_DW.Integrator_1_DSTATE * 5.0 + rtb_Sum_f * 100.0)) *\r\n 0.002;\r\n\r\n /* Update for Delay: '/Memory' */\r\n ADM_Integrated_Logic_DW.Memory_DSTATE = rtb_deltafalllimit_m;\r\n\r\n /* Update for DiscreteTransferFcn: '/Discrete Transfer Fcn' */\r\n ADM_Integrated_Logic_DW.DiscreteTransferFcn_states = rtb_Vx_Cmd_R - -0.9375 *\r\n ADM_Integrated_Logic_DW.DiscreteTransferFcn_states;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE = rtb_output_a;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE = rtb_Brake_Torque_Cmd;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_i = rtb_Brake_Torque_Cmd;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_p = rtb_Sum1_i2;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_c = rtb_Sum1_i2;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_h = rtb_Sum1_o1;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_d = rtb_Sum1_o1;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_l = rtb_Sum1_lm;\r\n\r\n /* Update for Delay: '/Delay1' */\r\n ADM_Integrated_Logic_DW.Delay1_DSTATE = rtb_Gain_c;\r\n\r\n /* Update for Delay: '/Delay' */\r\n ADM_Integrated_Logic_DW.Delay_DSTATE[0] =\r\n ADM_Integrated_Logic_DW.Delay_DSTATE[1];\r\n ADM_Integrated_Logic_DW.Delay_DSTATE[1] = rtb_Gain_c;\r\n\r\n /* Update for Delay: '/Delay2' */\r\n ADM_Integrated_Logic_DW.Delay2_DSTATE = rtb_Product1_pd;\r\n\r\n /* Update for Delay: '/Delay3' */\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE[0] =\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE[1];\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE[1] = rtb_Product1_pd;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_e = rtb_Product1_pd;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_ij = rtb_Product1_m;\r\n\r\n /* Update for Memory: '/Memory' */\r\n ADM_Integrated_Logic_DW.Memory_PreviousInput = rtb_Add_e;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_ir = rtb_Brake_Torque_Cmd;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_o = rtb_Error_m;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_m = rtb_Error_m;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_hm = rtb_Sum1_aj;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_mw = rtb_Sum1_aj;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_g = rtb_Sum1_p;\r\n\r\n /* Update for UnitDelay: '/d1' */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_ej = rtb_Add3;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_j = rtb_Product1_e;\r\n\r\n /* Update for Delay: '/Delay1' */\r\n ADM_Integrated_Logic_DW.Delay1_DSTATE_c = rtb_Product1_e;\r\n\r\n /* Update for Delay: '/Delay' */\r\n ADM_Integrated_Logic_DW.Delay_DSTATE_p[0] =\r\n ADM_Integrated_Logic_DW.Delay_DSTATE_p[1];\r\n ADM_Integrated_Logic_DW.Delay_DSTATE_p[1] = rtb_Product1_e;\r\n\r\n /* Update for Delay: '/Delay2' */\r\n ADM_Integrated_Logic_DW.Delay2_DSTATE_n = rtb_Product1_iz;\r\n\r\n /* Update for Delay: '/Delay3' */\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE_h[0] =\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE_h[1];\r\n ADM_Integrated_Logic_DW.Delay3_DSTATE_h[1] = rtb_Product1_iz;\r\n\r\n /* Update for UnitDelay: '/d1' incorporates:\r\n * Inport: '/GV_IMU_AX_Val'\r\n */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_ob = ADM_Integrated_Logic_U.GV_IMU_AX_Val;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_e = rtb_Desired_Torque;\r\n\r\n /* Update for UnitDelay: '/d1' incorporates:\r\n * Inport: '/GV_IMU_AY_Val'\r\n */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_i = ADM_Integrated_Logic_U.GV_IMU_AY_Val;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_p = rtb_output_p;\r\n\r\n /* Update for UnitDelay: '/d1' incorporates:\r\n * Inport: '/GV_IMU_AZ_Val'\r\n */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_o1 = ADM_Integrated_Logic_U.GV_IMU_AZ_Val;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_n = rtb_Integrator_1;\r\n\r\n /* Update for DiscreteIntegrator: '/Integrator_1' */\r\n ADM_Integrated_Logic_DW.Integrator_1_DSTATE += 0.002 * rtb_Sum_f;\r\n\r\n /* Update for UnitDelay: '/d1' incorporates:\r\n * Inport: '/GV_IMU_PitchRtVal'\r\n */\r\n ADM_Integrated_Logic_DW.d1_DSTATE_a = ADM_Integrated_Logic_U.GV_IMU_PitchRtVal;\r\n\r\n /* Update for UnitDelay: '/d' */\r\n ADM_Integrated_Logic_DW.d_DSTATE_d1 = rtb_Product1_f;\r\n\r\n /* Update for UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n ADM_Integrated_Logic_DW.DelayInput2_DSTATE_c = rtb_Yk1_p;\r\n\r\n /* Update for UnitDelay: '/Delay Input2'\r\n *\r\n * Block description for '/Delay Input2':\r\n *\r\n * Store in Global RAM\r\n */\r\n ADM_Integrated_Logic_DW.DelayInput2_DSTATE_i = rtb_Switch2;\r\n if (ADM_Integrated_Logic_M->Timing.TaskCounters.TID[1] == 0) {\r\n /* Update absolute timer for sample time: [1.0s, 0.0s] */\r\n /* The \"clockTick1\" counts the number of times the code of this task has\r\n * been executed. The resolution of this integer timer is 1.0, which is the step size\r\n * of the task. Size of \"clockTick1\" ensures timer will not overflow during the\r\n * application lifespan selected.\r\n */\r\n ADM_Integrated_Logic_M->Timing.clockTick1++;\r\n }\r\n\r\n rate_scheduler();\r\n}\r\n\r\n/* Model initialize function */\r\nvoid ADM_Integrated_Logic_initialize(void)\r\n{\r\n /* : HAC_ON_FLAG = 0; */\r\n /* : Smoothed_Torque = 0; */\r\n /* : HAC_Desired_Torque = 0; */\r\n /* : HAC_ON_Timer = 0; */\r\n}\r\n\r\n/* Model terminate function */\r\nvoid ADM_Integrated_Logic_terminate(void)\r\n{\r\n /* (no terminate code required) */\r\n}\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"ADM_Integrated_Logic.h","type":"header","group":"model","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Model files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ADM_Integrated_Logic.h\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#ifndef ADM_Integrated_Logic_h_\r\n#define ADM_Integrated_Logic_h_\r\n#ifndef ADM_Integrated_Logic_COMMON_INCLUDES_\r\n#define ADM_Integrated_Logic_COMMON_INCLUDES_\r\n#include \r\n#include \r\n#include \"complex_types.h\"\r\n#endif /* ADM_Integrated_Logic_COMMON_INCLUDES_ */\r\n\r\n#include \"ADM_Integrated_Logic_types.h\"\r\n\r\n/* Block signals and states (default storage) for system '' */\r\ntypedef struct {\r\n double Delay_DSTATE[2]; /* '/Delay' */\r\n double Delay3_DSTATE[2]; /* '/Delay3' */\r\n double Delay_DSTATE_p[2]; /* '/Delay' */\r\n double Delay3_DSTATE_h[2]; /* '/Delay3' */\r\n double Saturation; /* '/Saturation' */\r\n double DelayInput2_DSTATE; /* '/Delay Input2' */\r\n double DelayInput2_DSTATE_m; /* '/Delay Input2' */\r\n double Integrator_2_DSTATE; /* '/Integrator_2' */\r\n double Memory_DSTATE; /* '/Memory' */\r\n double DiscreteTransferFcn_states; /* '/Discrete Transfer Fcn' */\r\n double d1_DSTATE; /* '/d1' */\r\n double d_DSTATE; /* '/d' */\r\n double d_DSTATE_i; /* '/d' */\r\n double d1_DSTATE_p; /* '/d1' */\r\n double d_DSTATE_c; /* '/d' */\r\n double d1_DSTATE_h; /* '/d1' */\r\n double d_DSTATE_d; /* '/d' */\r\n double d1_DSTATE_l; /* '/d1' */\r\n double Delay1_DSTATE; /* '/Delay1' */\r\n double Delay2_DSTATE; /* '/Delay2' */\r\n double d1_DSTATE_e; /* '/d1' */\r\n double d_DSTATE_ij; /* '/d' */\r\n double d_DSTATE_ir; /* '/d' */\r\n double d1_DSTATE_o; /* '/d1' */\r\n double d_DSTATE_m; /* '/d' */\r\n double d1_DSTATE_hm; /* '/d1' */\r\n double d_DSTATE_mw; /* '/d' */\r\n double d1_DSTATE_g; /* '/d1' */\r\n double d1_DSTATE_ej; /* '/d1' */\r\n double d_DSTATE_j; /* '/d' */\r\n double Delay1_DSTATE_c; /* '/Delay1' */\r\n double Delay2_DSTATE_n; /* '/Delay2' */\r\n double d1_DSTATE_ob; /* '/d1' */\r\n double d_DSTATE_e; /* '/d' */\r\n double d1_DSTATE_i; /* '/d1' */\r\n double d_DSTATE_p; /* '/d' */\r\n double d1_DSTATE_o1; /* '/d1' */\r\n double d_DSTATE_n; /* '/d' */\r\n double Integrator_1_DSTATE; /* '/Integrator_1' */\r\n double d1_DSTATE_a; /* '/d1' */\r\n double d_DSTATE_d1; /* '/d' */\r\n double DelayInput2_DSTATE_c; /* '/Delay Input2' */\r\n double DelayInput2_DSTATE_i; /* '/Delay Input2' */\r\n double PrevY; /* '/Input_Vx_RateLimiter' */\r\n double PrevY_o; /* '/Brake_Out_RateLimiter' */\r\n double PrevY_a; /* '/TargetSpd_RateLimiter' */\r\n double Memory_PreviousInput; /* '/Memory' */\r\n double HAC_ON_FLAG; /* '/HAC_OFF_OK_Func' */\r\n double Smoothed_Torque; /* '/HAC_OFF_OK_Func' */\r\n double HAC_Desired_Torque; /* '/HAC_OFF_OK_Func' */\r\n double HAC_ON_Timer; /* '/HAC_OFF_OK_Func' */\r\n uint8_t is_active_c6_ADM_Integrated_Log;/* '/Chart' */\r\n uint8_t is_c6_ADM_Integrated_Logic; /* '/Chart' */\r\n} DW_ADM_Integrated_Logic_T;\r\n\r\n/* Invariant block signals (default storage) */\r\ntypedef struct {\r\n const double W_value; /* '/Multiply' */\r\n const double W_Value_for_Brake; /* '/Multiply4' */\r\n} ConstB_ADM_Integrated_Logic_T;\r\n\r\n/* External inputs (root inport signals with default storage) */\r\ntypedef struct {\r\n double GV_MCU_RPM; /* '/GV_MCU_RPM' */\r\n double GV_BrakeTorqueCommand; /* '/GV_BrakeTorqueCommand' */\r\n double GV_IMU_AX_Val; /* '/GV_IMU_AX_Val' */\r\n double GV_IMU_AY_Val; /* '/GV_IMU_AY_Val' */\r\n double GV_IMU_AZ_Val; /* '/GV_IMU_AZ_Val' */\r\n double GV_IMU_PitchRtVal; /* '/GV_IMU_PitchRtVal' */\r\n double GV_Vx_Command; /* '/GV_Vx_Command' */\r\n double GV_VCU_GearSelStat; /* '/GV_VCU_GearSelStat' */\r\n double GV_MCU_EstTrq; /* '/GV_MCU_EstTrq' */\r\n double GV_Vx_Limit; /* '/GV_Vx_Limit' */\r\n double GV_Vx_Fbk; /* '/GV_Vx_Fbk' */\r\n double GV_RWA_RackAngleCommand; /* '/GV_RWA_RackAngleCommand' */\r\n double GV_RWS_RackAngleCommand; /* '/GV_RWS_RackAngleCommand' */\r\n double GV_RWA_Fault_Flag; /* '/GV_RWA_Fault_Flag' */\r\n double GV_Operation_Mode; /* '/GV_Operation_Mode' */\r\n} ExtU_ADM_Integrated_Logic_T;\r\n\r\n/* External outputs (root outports fed by signals with default storage) */\r\ntypedef struct {\r\n double GV_Brake_Command; /* '/GV_Brake_Command' */\r\n double GV_Master_Rack_Angle_Cmd; /* '/GV_Master_Rack_Angle_Cmd' */\r\n double GV_Hill_Torque_Assist; /* '/GV_Hill_Torque_Assist' */\r\n double GV_Motor_Torque_Cmd; /* '/GV_Motor_Torque_Cmd' */\r\n double Debug_HAC_FLAG; /* '/Debug_HAC_FLAG' */\r\n double Debug_HAC_RPM_Decision; /* '/Debug_HAC_RPM_Decision' */\r\n double Debug_HAC_Pitch_angle; /* '/Debug_HAC_Pitch_angle' */\r\n double Debug_HAC_Brake_Output; /* '/Debug_HAC_Brake_Output' */\r\n double Debug_CC_Brake_Output; /* '/Debug_CC_Brake_Output' */\r\n double GV_RWS_RackAngleCmd1; /* '/GV_RWS_RackAngleCmd1' */\r\n double GV_Speed_Limit; /* '/GV_Speed_Limit' */\r\n double GV_Gear_Postion_Out; /* '/GV_Gear_Postion_Out' */\r\n} ExtY_ADM_Integrated_Logic_T;\r\n\r\n/* Real-time Model Data Structure */\r\nstruct tag_RTM_ADM_Integrated_Logic_T {\r\n /*\r\n * Timing:\r\n * The following substructure contains information regarding\r\n * the timing information for the model.\r\n */\r\n struct {\r\n uint32_t clockTick1;\r\n struct {\r\n uint16_t TID[2];\r\n } TaskCounters;\r\n } Timing;\r\n};\r\n\r\n/* Block signals and states (default storage) */\r\nextern DW_ADM_Integrated_Logic_T ADM_Integrated_Logic_DW;\r\n\r\n/* External inputs (root inport signals with default storage) */\r\nextern ExtU_ADM_Integrated_Logic_T ADM_Integrated_Logic_U;\r\n\r\n/* External outputs (root outports fed by signals with default storage) */\r\nextern ExtY_ADM_Integrated_Logic_T ADM_Integrated_Logic_Y;\r\nextern const ConstB_ADM_Integrated_Logic_T ADM_Integrated_Logic_ConstB;/* constant block i/o */\r\n\r\n/* Model entry point functions */\r\nextern void ADM_Integrated_Logic_initialize(void);\r\nextern void ADM_Integrated_Logic_step(void);\r\nextern void ADM_Integrated_Logic_terminate(void);\r\n\r\n/* Real-time Model object */\r\nextern RT_MODEL_ADM_Integrated_Logic_T *const ADM_Integrated_Logic_M;\r\n\r\n/*-\r\n * These blocks were eliminated from the model due to optimizations:\r\n *\r\n * Block '/BW_PI' : Unused code path elimination\r\n * Block '/Constant1' : Unused code path elimination\r\n * Block '/Constant16' : Unused code path elimination\r\n * Block '/Constant17' : Unused code path elimination\r\n * Block '/Constant2' : Unused code path elimination\r\n * Block '/Data Type Conversion2' : Unused code path elimination\r\n * Block '/Gain2' : Unused code path elimination\r\n * Block '/Abs' : Unused code path elimination\r\n * Block '/Brake_Saturation' : Unused code path elimination\r\n * Block '/Multiply5' : Unused code path elimination\r\n * Block '/Radius1' : Unused code path elimination\r\n * Block '/FixPt Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Propagation' : Unused code path elimination\r\n * Block '/FixPt Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Propagation' : Unused code path elimination\r\n * Block '/Scope2' : Unused code path elimination\r\n * Block '/FixPt Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Propagation' : Unused code path elimination\r\n * Block '/FixPt Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Duplicate' : Unused code path elimination\r\n * Block '/Data Type Propagation' : Unused code path elimination\r\n * Block '/ControlFlag' : Eliminated nontunable gain of 1\r\n * Block '/FBGain' : Eliminated nontunable gain of 1\r\n * Block '/FFGain' : Eliminated nontunable gain of 1\r\n * Block '/Data Type Conversion1' : Eliminate redundant data type conversion\r\n * Block '/Data Type Conversion3' : Eliminate redundant data type conversion\r\n * Block '/HAC_Gain' : Eliminated nontunable gain of 1\r\n * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical\r\n * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical\r\n * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical\r\n * Block '/Zero-Order Hold' : Eliminated since input and output rates are identical\r\n */\r\n\r\n/*-\r\n * The generated code includes comments that allow you to trace directly\r\n * back to the appropriate location in the model. The basic format\r\n * is /block_name, where system is the system number (uniquely\r\n * assigned by Simulink) and block_name is the name of the block.\r\n *\r\n * Use the MATLAB hilite_system command to trace the generated code back\r\n * to the model. For example,\r\n *\r\n * hilite_system('') - opens system 3\r\n * hilite_system('/Kp') - opens and selects block Kp which resides in S3\r\n *\r\n * Here is the system hierarchy for this model\r\n *\r\n * '' : 'ADM_Integrated_Logic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Compare To Constant'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Brake_Func'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Motor_Func'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function2'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function5'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function6'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB_Gain'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/GearCondition_Brake'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Gear_pos_out'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/LPFM'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Target_RPM'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot3'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot4'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot5'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/LPFM'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Second order LPF'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB/P'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot2'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot3'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/LPFM'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Second order LPF'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Compare To Constant'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Gear_FUNCTION1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Chart'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/HAC_OFF_OK_Func'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM2'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM3'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Pitch_calculate'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Ramp'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_R'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c1'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic/Saturation Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1/Saturation Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic/Saturation Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1/Saturation Dynamic'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Compare To Constant'\r\n * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Vx_OutPut_Function'\r\n */\r\n\r\n/*-\r\n * Requirements for '': ADM_Integrated_Logic\r\n\r\n */\r\n#endif /* ADM_Integrated_Logic_h_ */\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"ADM_Integrated_Logic_private.h","type":"header","group":"model","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Model files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ADM_Integrated_Logic_private.h\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#ifndef ADM_Integrated_Logic_private_h_\r\n#define ADM_Integrated_Logic_private_h_\r\n#include \r\n#include \r\n#include \"complex_types.h\"\r\n#include \"ADM_Integrated_Logic_types.h\"\r\n#include \"ADM_Integrated_Logic.h\"\r\n\r\nextern void ADM_Integrated_Lo_Calculate_F_c(double rtu_W, double rtu_theta,\r\n double *rty_F_c);\r\nextern void ADM_Integrated__MATLABFunction1(double rtu_u, double *rty_y);\r\nextern void ADM_Integrated__MATLABFunction2(double rtu_u, double *rty_y);\r\n\r\n#endif /* ADM_Integrated_Logic_private_h_ */\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"ADM_Integrated_Logic_types.h","type":"header","group":"model","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Model files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ADM_Integrated_Logic_types.h\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#ifndef ADM_Integrated_Logic_types_h_\r\n#define ADM_Integrated_Logic_types_h_\r\n\r\n/* Forward declaration for rtModel */\r\ntypedef struct tag_RTM_ADM_Integrated_Logic_T RT_MODEL_ADM_Integrated_Logic_T;\r\n\r\n#endif /* ADM_Integrated_Logic_types_h_ */\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"ADM_Integrated_Logic_data.c","type":"source","group":"data","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Data files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: ADM_Integrated_Logic_data.c\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#include \"ADM_Integrated_Logic.h\"\r\n\r\n/* Invariant block signals (default storage) */\r\nconst ConstB_ADM_Integrated_Logic_T ADM_Integrated_Logic_ConstB = {\r\n 12753.0, /* '/Multiply' */\r\n 12753.0 /* '/Multiply4' */\r\n};\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"},{"name":"complex_types.h","type":"header","group":"utility","path":"C:\\Users\\MSI\\SynologyDrive\\3min_be\\한자연\\!과제\\배송모빌리티\\!진행상황\\2025\\25-04-28-월 통합 로직 수정본 수신(시뮬링크)\\ADM_Integrated_Logic_ert_rtw","tag":"","groupDisplay":"Utility files","code":"/*\r\n * Academic License - for use in teaching, academic research, and meeting\r\n * course requirements at degree granting institutions only. Not for\r\n * government, commercial, or other organizational use.\r\n *\r\n * File: complex_types.h\r\n *\r\n * Code generated for Simulink model 'ADM_Integrated_Logic'.\r\n *\r\n * Model version : 13.55\r\n * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023\r\n * C/C++ source code generated on : Wed May 7 21:12:17 2025\r\n *\r\n * Target selection: ert.tlc\r\n * Embedded hardware selection: NXP->Cortex-M4\r\n * Code generation objectives:\r\n * 1. Execution efficiency\r\n * 2. RAM efficiency\r\n * 3. Debugging\r\n * Validation result: Not run\r\n */\r\n\r\n#ifndef COMPLEX_TYPES_H\r\n#define COMPLEX_TYPES_H\r\n#include \r\n\r\n/*===========================================================================*\r\n * Complex number type definitions *\r\n *===========================================================================*/\r\n#define CREAL_T\r\n\r\ntypedef struct {\r\n float re;\r\n float im;\r\n} creal32_T;\r\n\r\ntypedef struct {\r\n double re;\r\n double im;\r\n} creal_T;\r\n\r\ntypedef creal_T creal64_T;\r\n\r\n#define CINT8_T\r\n\r\ntypedef struct {\r\n int8_t re;\r\n int8_t im;\r\n} cint8_T;\r\n\r\n#define CUINT8_T\r\n\r\ntypedef struct {\r\n uint8_t re;\r\n uint8_t im;\r\n} cuint8_T;\r\n\r\n#define CINT16_T\r\n\r\ntypedef struct {\r\n int16_t re;\r\n int16_t im;\r\n} cint16_T;\r\n\r\n#define CUINT16_T\r\n\r\ntypedef struct {\r\n uint16_t re;\r\n uint16_t im;\r\n} cuint16_T;\r\n\r\n#define CINT32_T\r\n\r\ntypedef struct {\r\n int32_t re;\r\n int32_t im;\r\n} cint32_T;\r\n\r\n#define CUINT32_T\r\n\r\ntypedef struct {\r\n uint32_t re;\r\n uint32_t im;\r\n} cuint32_T;\r\n\r\n#define CINT64_T\r\n\r\ntypedef struct {\r\n int64_t re;\r\n int64_t im;\r\n} cint64_T;\r\n\r\n#define CUINT64_T\r\n\r\ntypedef struct {\r\n uint64_t re;\r\n uint64_t im;\r\n} cuint64_T;\r\n\r\n#endif /* COMPLEX_TYPES_H */\r\n\r\n/*\r\n * File trailer for generated code.\r\n *\r\n * [EOF]\r\n */\r\n"}],"coverage":[{"id":"SimulinkCoverage","name":"Simulink Coverage","files":[]},{"id":"Bullseye","name":"Bullseye Coverage","files":[]},{"id":"LDRA","name":"LDRA Testbed","files":[]}],"features":{"annotation":false,"coverage":true,"profiling":true,"tooltip":true,"coverageTooltip":true,"showJustificationLinks":true,"useMWTable":false,"showProfilingInfo":true,"showTaskSummary":true,"showProtectedV2Report":true}}; \ No newline at end of file diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/model.js b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/model.js new file mode 100644 index 00000000..b0ccf8e3 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/model.js @@ -0,0 +1 @@ +var modelInfo = {model:"ADM_Integrated_Logic"};var modelHierarchy=[{model:"ADM_Integrated_Logic",relativePath:"_internal.html",parent:"null"},];var AddCode = true; \ No newline at end of file diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/pages.js b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/pages.js new file mode 100644 index 00000000..80f710dd --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/data/pages.js @@ -0,0 +1 @@ +var reportPages = [["Summary","ADM_Integrated_Logic_survey.html"],["Subsystem Report","ADM_Integrated_Logic_subsystems.html"],["Code Interface Report","ADM_Integrated_Logic_interface.html"],["Traceability Report","ADM_Integrated_Logic_trace.html"],["Static Code Metrics Report","ADM_Integrated_Logic_metrics.html"],["Eliminated Blocks","ADM_Integrated_Logic_reducedblocks.html"],["Code Replacements Report","ADM_Integrated_Logic_replacements.html"],["Coder Assumptions","ADM_Integrated_Logic_coderassumptions.html"]]; \ No newline at end of file diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/index.html b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/index.html new file mode 100644 index 00000000..e02b2a06 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/index.html @@ -0,0 +1,32 @@ + + + + + + + + + + + Code Generation Report + + + + + + +
+ +
+ +
+
+ +
+ + + + diff --git a/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/lib/bundle.index.js b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/lib/bundle.index.js new file mode 100644 index 00000000..cadc38a9 --- /dev/null +++ b/[ADM] Integrated Logic/ADM_Integrated_Logic_ert_rtw/html/lib/bundle.index.js @@ -0,0 +1,634 @@ +(()=>{var __webpack_modules__={72904:(_,P,l)=>{var b,S;b=[l(80675),l(69961),l(30673),l(27420),l(55701)],S=l.dj.d(b,function(C,A,p,d,n){"use strict";var e=0,t=1,r=2,i="This deferred has already been fulfilled.",s=Object.freeze||function(){},a=function(v,f,g,m,E){C("config-deferredInstrumentation")&&f===r&&h.instrumentRejected&&v.length===0&&h.instrumentRejected(g,!1,m,E);for(var w=0;w"u"?T:F}if(I=!0,m){if(m===r&&E===T)return T}else return typeof T>"u"&&(T=new p),R(T),T}},s(f)};return h.prototype.toString=function(){return"[object Deferred]"},n&&n(h),h},_,P),_.exports=S},57574:(_,P,l)=>{var b,S;b=[l(76873),l(86560)],S=l.dj.d(b,function(C,A){"use strict";var p=C.after;function d(){}return d.prototype={on:function(n,e){return A.parse(this,n,e,function(t,r){return p(t,"on"+r,e,!0)})},emit:function(n,e){var t=[this];return t.push.apply(t,arguments),A.emit.apply(A,t)}},d},_,P),_.exports=S},51937:(_,P,l)=>{var b,S;b=[l(74786),l(69961),l(33659),l(27754)],S=l.dj.d(b,function(C,A,p,d){return C("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(n){var e=this._attrPairNames;return e[n]?e[n]:e[n]={s:"_"+n+"Setter",g:"_"+n+"Getter"}},postscript:function(n){n&&this.set(n)},_get:function(n,e){return typeof this[e.g]=="function"?this[e.g]():this[n]},get:function(n){return this._get(n,this._getAttrNames(n))},set:function(n,e){if(typeof n=="object"){for(var t in n)n.hasOwnProperty(t)&&t!="_watchCallbacks"&&this.set(t,n[t]);return this}var r=this._getAttrNames(n),i=this._get(n,r),s=this[r.s],a;if(typeof s=="function"?a=s.apply(this,Array.prototype.slice.call(arguments,1)):this[n]=e,this._watchCallbacks){var o=this;d(a,function(){o._watchCallbacks(n,i,e)})}return this},_changeAttrValue:function(n,e){var t=this.get(n);return this[n]=e,this._watchCallbacks&&this._watchCallbacks(n,t,e),this},watch:function(n,e){var t=this._watchCallbacks;if(!t){var r=this;t=this._watchCallbacks=function(a,o,u,c){var h=function(v){if(v){v=v.slice();for(var f=0,g=v.length;f-1&&i.splice(a,1)},s}})},_,P),_.exports=S},36586:(_,P,l)=>{var b,S;b=[l(57987),l(69961),l(33659),l(69196)],S=l.dj.d(b,function(C,A,p,d){var n=C.Color=function(e){e&&this.setColor(e)};return n.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.transparentColor||[0,0,0,0]},A.extend(n,{r:255,g:255,b:255,a:1,_set:function(e,t,r,i){var s=this;s.r=e,s.g=t,s.b=r,s.a=i},setColor:function(e){return A.isString(e)?n.fromString(e,this):A.isArray(e)?n.fromArray(e,this):(this._set(e.r,e.g,e.b,e.a),e instanceof n||this.sanitize()),this},sanitize:function(){return this},toRgb:function(){var e=this;return[e.r,e.g,e.b]},toRgba:function(){var e=this;return[e.r,e.g,e.b,e.a]},toHex:function(){var e=p.map(["r","g","b"],function(t){var r=this[t].toString(16);return r.length<2?"0"+r:r},this);return"#"+e.join("")},toCss:function(e){var t=this,r=t.r+", "+t.g+", "+t.b;return(e?"rgba("+r+", "+t.a:"rgb("+r)+")"},toString:function(){return this.toCss(!0)}}),n.blendColors=C.blendColors=function(e,t,r,i){var s=i||new n;return s.r=Math.round(e.r+(t.r-e.r)*r),s.g=Math.round(e.g+(t.g-e.g)*r),s.b=Math.round(e.b+(t.b-e.b)*r),s.a=e.a+(t.a-e.a)*r,s.sanitize()},n.fromRgb=C.colorFromRgb=function(e,t){var r=e.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return r&&n.fromArray(r[1].split(/\s*,\s*/),t)},n.fromHex=C.colorFromHex=function(e,t){var r=t||new n,i=e.length==4?4:8,s=(1<>=i,r[a]=i==4?17*o:o}),r.a=1,r)},n.fromArray=C.colorFromArray=function(e,t){var r=t||new n;return r._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(r.a)&&(r.a=1),r.sanitize()},n.fromString=C.colorFromString=function(e,t){var r=n.named[e];return r&&n.fromArray(r,t)||n.fromRgb(e,t)||n.fromHex(e,t)},n},_,P),_.exports=S},67324:(_,P,l)=>{var b,S;b=[l(57987),l(72904),l(27420),l(30673),l(80675),l(69961),l(27754)],S=l.dj.d(b,function(C,A,p,d,n,e,t){var r=function(){},i=Object.freeze||function(){},s=C.Deferred=function(a){var o,u,c,h,v,f,g,m=this.promise=new p;function E(M){if(u)throw new Error("This deferred has already been resolved");o=M,u=!0,w()}function w(){for(var M;!M&&g;){var R=g;g=g.next,(M=R.progress==r)&&(u=!1);var T=v?R.error:R.resolved;if(n("config-useDeferredInstrumentation")&&v&&A.instrumentRejected&&A.instrumentRejected(o,!!T),T)try{var N=T(o);if(N&&typeof N.then=="function"){N.then(e.hitch(R.deferred,"resolve"),e.hitch(R.deferred,"reject"),e.hitch(R.deferred,"progress"));continue}var F=M&&N===void 0;M&&!F&&(v=N instanceof Error),R.deferred[F&&v?"reject":"resolve"](F?o:N)}catch(y){R.deferred.reject(y)}else v?R.deferred.reject(o):R.deferred.resolve(o)}}this.isResolved=m.isResolved=function(){return h==0},this.isRejected=m.isRejected=function(){return h==1},this.isFulfilled=m.isFulfilled=function(){return h>=0},this.isCanceled=m.isCanceled=function(){return c},this.resolve=this.callback=function(M){this.fired=h=0,this.results=[M,null],E(M)},this.reject=this.errback=function(M){v=!0,this.fired=h=1,n("config-useDeferredInstrumentation")&&A.instrumentRejected&&A.instrumentRejected(M,!!g),E(M),this.results=[null,M]},this.progress=function(M){for(var R=g;R;){var T=R.progress;T&&T(M),R=R.next}},this.addCallbacks=function(M,R){return this.then(M,R,r),this},m.then=this.then=function(M,R,T){var N=T==r?this:new s(m.cancel),F={resolved:M,error:R,progress:T,deferred:N};return g?f=f.next=F:g=f=F,u&&w(),N.promise};var I=this;m.cancel=this.cancel=function(){if(!u){var M=a&&a(I);u||(M instanceof Error||(M=new d(M)),M.log=!1,I.reject(M))}c=!0},i(m)};return e.extend(s,{addCallback:function(a){return this.addCallbacks(e.hitch.apply(C,arguments))},addErrback:function(a){return this.addCallbacks(null,e.hitch.apply(C,arguments))},addBoth:function(a){var o=e.hitch.apply(C,arguments);return this.addCallbacks(o,o)},fired:-1}),s.when=C.when=t,s},_,P),_.exports=S},33659:(_,P,l)=>{var b,S;b=[l(57987),l(80675),l(69961)],S=l.dj.d(b,function(C,A,p){var d={},n,e;A("csp-restrictions")||(e=function(s){return d[s]=new Function("item","index","array",s)});function t(s){var a=!s;return function(o,u,c){var h=0,v=o&&o.length||0,f;if(v&&typeof o=="string"&&(o=o.split("")),typeof u=="string"){if(A("csp-restrictions"))throw new TypeError("callback must be a function");u=d[u]||e(u)}if(c){for(;h0)return i.lastIndexOf(c,h,v);var g=c&&c.length||0,m=s?g+u:o,E;for(v===n?E=s?o:g+u:v<0?(E=g+v,E<0&&(E=o)):E=v>=g?g+u:v,g&&typeof c=="string"&&(c=c.split(""));E!=m;E+=a)if(c[E]==h)return E;return-1}}var i={every:t(!1),some:t(!0),indexOf:r(!0),lastIndexOf:r(!1),forEach:function(s,a,o){var u=0,c=s&&s.length||0;if(c&&typeof s=="string"&&(s=s.split("")),typeof a=="string"){if(A("csp-restrictions"))throw new TypeError("callback must be a function");a=d[a]||e(a)}if(o)for(;u{var b,S;b=[l(79359),l(80675),l.dj.c(_)],S=l.dj.d(b,function(C,A,p){var d={};if(A("dojo-config-api")){var n=p.rawConfig,e;for(e in n)d[e]=n[e]}else{var t=function(i,s,a){for(e in i)e!="has"&&A.add(s+e,i[e],0,a)};d=A("dojo-loader")?p.rawConfig:C.dojoConfig||C.djConfig||{},t(d,"config",1),t(d.has,"",1)}if(d.updateLocale=function(i,s){var a,o,u="en-us";if(i.indexOf(s)>=0&&s!=="zh"){d.locale=s;return}if(a=s.split("-")[0],a==="zh"){d.locale=u.toLocaleLowerCase();return}for(var c=0;c{var b,S;b=[l(57987),l(86560),l(48309),l(76873),l(67711),l(72875),l(18203),l(69961),l(75145)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r){t.add("events-keypress-typed",function(){var f={charCode:0};try{f=document.createEvent("KeyboardEvent"),(f.initKeyboardEvent||f.initKeyEvent).call(f,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(g){}return f.charCode==0&&!t("opera")});function i(f,g,m,E,w){if(E=r.hitch(m,E),!f||!(f.addEventListener||f.attachEvent))return d.after(f||C.global,g,E,!0);if(typeof g=="string"&&g.substring(0,2)=="on"&&(g=g.substring(2)),f||(f=C.global),!w)switch(g){case"keypress":g=c;break;case"mouseenter":g=e.enter;break;case"mouseleave":g=e.leave;break}return A(f,g,E,w)}var s={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},a=t("mac")?"metaKey":"ctrlKey",o=function(f,g){var m=r.mixin({},f,g);return u(m),m.preventDefault=function(){f.preventDefault()},m.stopPropagation=function(){f.stopPropagation()},m};function u(f){f.keyChar=f.charCode?String.fromCharCode(f.charCode):"",f.charOrCode=f.keyChar||f.keyCode}var c;if(t("events-keypress-typed")){var h=function(f,g){try{return f.keyCode=g}catch(m){return 0}};c=function(f,g){var m=A(f,"keydown",function(w){var I=w.keyCode,M=I!=13&&I!=32&&(I!=27||!t("ie"))&&(I<48||I>90)&&(I<96||I>111)&&(I<186||I>192)&&(I<219||I>222)&&I!=229;if(M||w.ctrlKey){var R=M?0:I;if(w.ctrlKey){if(I==3||I==13)return g.call(w.currentTarget,w);R>95&&R<106?R-=48:!w.shiftKey&&R>=65&&R<=90?R+=32:R=s[R]||R}var T=o(w,{type:"keypress",faux:!0,charCode:R});g.call(w.currentTarget,T),t("ie")&&h(w,T.keyCode)}}),E=A(f,"keypress",function(w){var I=w.charCode;return I=I>=32?I:0,w=o(w,{charCode:I,faux:!0}),g.call(this,w)});return{remove:function(){m.remove(),E.remove()}}}}else t("opera")?c=function(f,g){return A(f,"keypress",function(m){var E=m.which;return E==3&&(E=99),E=E<32&&!m.shiftKey?0:E,m.ctrlKey&&!m.shiftKey&&E>=65&&E<=90&&(E+=32),g.call(this,o(m,{charCode:E}))})}:c=function(f,g){return A(f,"keypress",function(m){return u(m),g.call(this,m)})};var v={_keypress:c,connect:function(f,g,m,E,w){var I=arguments,M=[],R=0;M.push(typeof I[0]=="string"?null:I[R++],I[R++]);var T=I[R+1];M.push(typeof T=="string"||typeof T=="function"?I[R++]:null,I[R++]);for(var N=I.length;R{var b,S;b=[l(57987),l(80675),l(69961)],S=l.dj.d(b,function(C,A,p){var d=p.mixin,n=Object.prototype,e=n.toString,t,r=0,i="constructor";A("csp-restrictions")?t=function(){}:t=new Function;function s(y,x){throw new Error("declare"+(x?" "+x:"")+": "+y)}function a(y,x){for(var O=[],L=[{cls:0,refs:[]}],W={},j=1,H=y.length,K=0,$,V,z,X,Z,Y,Q,q;K=0;--$)Z=V[$].prototype,Z.hasOwnProperty("declaredClass")||(Z.declaredClass="uniqName_"+r++),Q=Z.declaredClass,W.hasOwnProperty(Q)||(W[Q]={count:0,refs:[],cls:V[$]},++j),Y=W[Q],X&&X!==Y&&(Y.refs.push(X),++X.count),X=Y;++X.count,L[0].refs.push(X)}for(;L.length;){for(X=L.pop(),O.push(X.cls),--j;q=X.refs,q.length==1;){if(X=q[0],!X||--X.count){X=0;break}O.push(X.cls),--j}if(X)for(K=0,H=q.length;K=0;--H)j=y[H],K=j._meta,j=K?K.ctor:j,j&&j.apply(this,V?V[H]:O);j=this.postscript,j&&j.apply(this,L)}}function I(y,x){return function(){var O=arguments,L=O,W=O[0],j;if(!(this instanceof O.callee))return N(O);x&&(W&&(j=W.preamble,j&&(L=j.apply(this,L)||L)),j=this.preamble,j&&j.apply(this,L)),y&&y.apply(this,O),j=this.postscript,j&&j.apply(this,O)}}function M(y){return function(){var x=arguments,O=0,L,W;if(!(this instanceof x.callee))return N(x);for(;L=y[O];++O)if(W=L._meta,L=W?W.ctor:L,L){L.apply(this,x);break}L=this.postscript,L&&L.apply(this,x)}}function R(y,x,O){return function(){var L,W,j,H=0,K=1;for(O&&(H=x.length-1,K=-1);L=x[H];H+=K)W=L._meta,j=(W?W.hidden:L.prototype)[y],j&&j.apply(this,arguments)}}function T(y){t.prototype=y.prototype;var x=new t;return t.prototype=null,x}function N(y){var x=y.callee,O=T(x);return x.apply(O,y),O}function F(y,x,O){typeof y!="string"&&(O=x,x=y,y=""),O=O||{};var L,W,j,H,K,$,V,z=1,X=x;if(e.call(x)=="[object Array]"?($=a(x,y),j=$[0],z=$.length-j,x=$[z]):($=[0],x?e.call(x)=="[object Function]"?(j=x._meta,$=$.concat(j?j.bases:x)):s("base class is not a callable constructor.",y):x!==null&&s("unknown base class. Did you use dojo.require to pull it in?",y)),x)for(W=z-1;L=T(x),!!W;--W)j=$[W],(j._meta?f:d)(L,j.prototype),A("csp-restrictions")?H=function(){}:H=new Function,H.superclass=x,H.prototype=L,x=L.constructor=H;else L={};for(F.safeMixin(L,O),j=O.constructor,j!==n.constructor&&(j.nom=i,L.constructor=j),W=z-1;W;--W)j=$[W]._meta,j&&j.chains&&(V=d(V||{},j.chains));if(L["-chains-"]&&(V=d(V||{},L["-chains-"])),x&&x.prototype&&x.prototype["-chains-"]&&(V=d(V||{},x.prototype["-chains-"])),j=!V||!V.hasOwnProperty(i),$[0]=H=V&&V.constructor==="manual"?M($):$.length==1?I(O.constructor,j):w($,j),H._meta={bases:$,hidden:O,chains:V,parents:X,ctor:O.constructor},H.superclass=x&&x.prototype,H.extend=m,H.createSubclass=E,H.prototype=L,L.constructor=H,L.getInherited=u,L.isInstanceOf=v,L.inherited=h,L.__inherited=o,y&&(L.declaredClass=y,p.setObject(y,H)),V)for(K in V)L[K]&&typeof V[K]=="string"&&K!=i&&(j=L[K]=R(K,$,V[K]==="after"),j.nom=K);return H}return C.safeMixin=F.safeMixin=g,C.declare=F,F},_,P),_.exports=S},67711:(_,P,l)=>{var b,S;b=[l(57987),l(86560),l(80675),l(20849)],S=l.dj.d(b,function(C,A,p,d){if(A._fixEvent){var n=A._fixEvent;A._fixEvent=function(t,r){return t=n(t,r),t&&d.normalizeEvent(t),t}}var e={fix:function(t,r){return A._fixEvent?A._fixEvent(t,r):t},stop:function(t){p("dom-addeventlistener")||t&&t.preventDefault?(t.preventDefault(),t.stopPropagation()):(t=t||window.event,t.cancelBubble=!0,A._preventDefault.call(t))}};return p("extend-dojo")&&(C.fixEvent=e.fix,C.stopEvent=e.stop),e},_,P),_.exports=S},90554:(_,P,l)=>{var b,S;b=[l(57987),l(69196),l(69961),l(57574),l(36586),l(76873),l(23702),l(7835),l(37672)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r,i){var s=p.mixin,a={},o=a._Line=function(m,E){this.start=m,this.end=E};o.prototype.getValue=function(m){return(this.end-this.start)*m+this.start};var u=a.Animation=function(m){s(this,m),p.isArray(this.curve)&&(this.curve=new o(this.curve[0],this.curve[1]))};u.prototype=new d,p.extend(u,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var m=this._percent,E=this.easing;return E?E(m):m},_fire:function(m,E){var w=E||[];if(this[m])if(A.debugAtAllCosts)this[m].apply(this,w);else try{this[m].apply(this,w)}catch(I){console.error("exception in animation handler for:",m),console.error(I)}return this},play:function(m,E){var w=this;if(w._delayTimer&&w._clearTimer(),E)w._stopTimer(),w._active=w._paused=!1,w._percent=0;else if(w._active&&!w._paused)return w;w._fire("beforeBegin",[w.node]);var I=m||w.delay,M=p.hitch(w,"_play",E);return I>0?(w._delayTimer=setTimeout(M,I),w):(M(),w)},_play:function(m){var E=this;E._delayTimer&&E._clearTimer(),E._startTime=new Date().valueOf(),E._paused&&(E._startTime-=E.duration*E._percent),E._active=!0,E._paused=!1;var w=E.curve.getValue(E._getStep());return E._percent||(E._startRepeatCount||(E._startRepeatCount=E.repeat),E._fire("onBegin",[w])),E._fire("onPlay",[w]),E._cycle(),E},pause:function(){var m=this;return m._delayTimer&&m._clearTimer(),m._stopTimer(),m._active&&(m._paused=!0,m._fire("onPause",[m.curve.getValue(m._getStep())])),m},gotoPercent:function(m,E){var w=this;return w._stopTimer(),w._active=w._paused=!0,w._percent=m,E&&w.play(),w},stop:function(m){var E=this;return E._delayTimer&&E._clearTimer(),E._timer&&(E._stopTimer(),m&&(E._percent=1),E._fire("onStop",[E.curve.getValue(E._getStep())]),E._active=E._paused=!1),E},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){var m=this;if(m._active){var E=new Date().valueOf(),w=m.duration===0?1:(E-m._startTime)/m.duration;w>=1&&(w=1),m._percent=w,m.easing&&(w=m.easing(w)),m._fire("onAnimate",[m.curve.getValue(w)]),m._percent<1?m._startTimer():(m._active=!1,m.repeat>0?(m.repeat--,m.play(null,!0)):m.repeat==-1?m.play(null,!0):m._startRepeatCount&&(m.repeat=m._startRepeatCount,m._startRepeatCount=0),m._percent=0,m._fire("onEnd",[m.node]),!m.repeat&&m._stopTimer())}return m},_clearTimer:function(){clearTimeout(this._delayTimer),delete this._delayTimer}});var c=0,h=null,v={run:function(){}};p.extend(u,{_startTimer:function(){this._timer||(this._timer=e.after(v,"run",p.hitch(this,"_cycle"),!0),c++),h||(h=setInterval(p.hitch(v,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,c--),c<=0&&(clearInterval(h),h=null,c=0)}});var f=t("ie")?function(m){var E=m.style;!E.width.length&&i.get(m,"width")=="auto"&&(E.width="auto")}:function(){};a._fade=function(m){m.node=r.byId(m.node);var E=s({properties:{}},m),w=E.properties.opacity={};w.start="start"in E?E.start:function(){return+i.get(E.node,"opacity")||0},w.end=E.end;var I=a.animateProperty(E);return e.after(I,"beforeBegin",p.partial(f,E.node),!0),I},a.fadeIn=function(m){return a._fade(s({end:1},m))},a.fadeOut=function(m){return a._fade(s({end:0},m))},a._defaultEasing=function(m){return .5+Math.sin((m+1.5)*Math.PI)/2};var g=function(m){this._properties=m;for(var E in m){var w=m[E];w.start instanceof n&&(w.tempColor=new n)}};return g.prototype.getValue=function(m){var E={};for(var w in this._properties){var I=this._properties[w],M=I.start;M instanceof n?E[w]=n.blendColors(M,I.end,m,I.tempColor).toCss():p.isArray(M)||(E[w]=(I.end-M)*m+M+(w!="opacity"?I.units||"px":0))}return E},a.animateProperty=function(m){var E=m.node=r.byId(m.node);m.easing||(m.easing=C._defaultEasing);var w=new u(m);return e.after(w,"beforeBegin",p.hitch(w,function(){var I={};for(var M in this.properties){(M=="width"||M=="height")&&(this.node.display="block");var R=this.properties[M];p.isFunction(R)&&(R=R(E)),R=I[M]=s({},p.isObject(R)?R:{end:R}),p.isFunction(R.start)&&(R.start=R.start(E)),p.isFunction(R.end)&&(R.end=R.end(E));var T=M.toLowerCase().indexOf("color")>=0,N=function(y,x){var O={height:y.offsetHeight,width:y.offsetWidth}[x];return O!==void 0?O:(O=i.get(y,x),x=="opacity"?+O:T?O:parseFloat(O))};"end"in R?"start"in R||(R.start=N(E,M)):R.end=N(E,M),T?(R.start=new n(R.start),R.end=new n(R.end)):R.start=M=="opacity"?+R.start:parseFloat(R.start)}this.curve=new g(I)}),!0),e.after(w,"onAnimate",p.hitch(i,"set",w.node),!0),w},a.anim=function(m,E,w,I,M,R){return a.animateProperty({node:m,duration:w||u.prototype.duration,properties:E,easing:I,onEnd:M}).play(R||0)},t("extend-dojo")&&(s(C,a),C._Animation=u),a},_,P),_.exports=S},84664:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(57987),__webpack_require__(685)],__WEBPACK_AMD_DEFINE_RESULT__=__webpack_require__.dj.d(__WEBPACK_AMD_DEFINE_ARRAY__,function(dojo,json){return dojo.fromJson=function(js){return eval("("+js+")")},dojo._escapeString=json.stringify,dojo.toJsonIndentStr=" ",dojo.toJson=function(_,P){return json.stringify(_,function(l,b){if(b){var S=b.__json__||b.json;if(typeof S=="function")return S.call(b)}return b},P&&dojo.toJsonIndentStr)},dojo},module,exports),module.exports=__WEBPACK_AMD_DEFINE_RESULT__},57987:(_,P,l)=>{var b,S;b=[l(79359),l(80675),l(69196),l.dj.c(_),l.dj.m(_)],S=l.dj.d(b,function(C,A,p,d,n){var e,t,r={},i={},s={config:p,global:C,dijit:r,dojox:i},a={dojo:["dojo",s],dijit:["dijit",r],dojox:["dojox",i]},o=d.map&&d.map[n.id.match(/[^\/]+/)[0]],u;for(t in o)a[t]?a[t][0]=o[t]:a[t]=[o[t],{}];for(t in a)u=a[t],u[1]._scopeName=u[0],p.noGlobals||(C[u[0]]=u[1]);s.scopeMap=a,s.baseUrl=s.config.baseUrl=d.baseUrl,s.isAsync=!A("dojo-loader")||d.async,s.locale=p.locale;var c="$Rev:$".match(/[0-9a-f]{7,}/);if(s.version={major:1,minor:17,patch:1,flag:"",revision:c?c[0]:NaN,toString:function(){var g=s.version;return g.major+"."+g.minor+"."+g.patch+g.flag+" ("+g.revision+")"}},A.add("extend-dojo",1),A("csp-restrictions")||Function("d","d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(s),A("host-rhino")?s.exit=function(g){quit(g)}:s.exit=function(){},A("host-webworker")||A.add("dojo-guarantee-console",1),A("dojo-guarantee-console")){A.add("console-as-object",function(){return Function.prototype.bind&&console&&typeof console.log=="object"}),typeof console<"u"||(console={});var h=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],v;for(e=0;v=h[e++];)console[v]?A("console-as-object")&&(console[v]=Function.prototype.bind.call(console[v],console)):function(){var g=v+"";console[g]="log"in console?function(){var m=Array.prototype.slice.call(arguments);m.unshift(g+":"),console.log(m.join(" "))}:function(){},console[g]._fake=!0}()}if(A.add("dojo-debug-messages",!!p.isDebug),s.deprecated=s.experimental=function(){},A("dojo-debug-messages")&&(s.deprecated=function(g,m,E){var w="DEPRECATED: "+g;m&&(w+=" "+m),E&&(w+=" -- will be removed in version: "+E),console.warn(w)},s.experimental=function(g,m){var E="EXPERIMENTAL: "+g+" -- APIs subject to change without notice.";m&&(E+=" "+m),console.warn(E)}),A.add("dojo-modulePaths",1),A("dojo-modulePaths")&&p.modulePaths){s.deprecated("dojo.modulePaths","use paths configuration");var f={};for(t in p.modulePaths)f[t.replace(/\./g,"/")]=p.modulePaths[t];d({paths:f})}return A.add("dojo-moduleUrl",1),A("dojo-moduleUrl")&&(s.moduleUrl=function(g,m){s.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var E=null;return g&&(E=d.toUrl(g.replace(/\./g,"/")+(m?"/"+m:"")+"/*.*").replace(/\/\*\.\*/,"")+(m?"":"/")),E}),s._hasResource={},s},_,P),_.exports=S},69961:(_,P,l)=>{var b,S;b=[l(57987),l(80675),l(23702)],S=l.dj.d(b,function(C,A){A.add("bug-for-in-skips-shadowed",function(){for(var s in{toString:1})return 0;return 1});var p=A("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],d=p.length,n=function(s,a,o){o||(s[0]&&C.scopeMap[s[0]]?o=C.scopeMap[s.shift()][1]:o=C.global);try{for(var u=0;u2)return i._hitchArgs.apply(C,arguments);if(a||(a=s,s=null),i.isString(a)){if(s=s||C.global,!s[a])throw['lang.hitch: scope["',a,'"] is null (scope="',s,'")'].join("");return function(){return s[a].apply(s,arguments||[])}}return s?function(){return a.apply(s,arguments||[])}:a},delegate:function(){function s(){}return function(a,o){s.prototype=a;var u=new s;return s.prototype=null,o&&i._mixin(u,o),u}}(),_toArray:A("ie")?function(){function s(a,o,u){for(var c=u||[],h=o||0;h{var b,S;b=[l(57987),l(69961),l(23702)],S=l.dj.d(b,function(C,A,p){return p("host-browser")&&(C._name="browser",A.mixin(C,{isBrowser:!0,isFF:p("ff"),isIE:p("ie"),isKhtml:p("khtml"),isWebKit:p("webkit"),isMozilla:p("mozilla"),isMoz:p("mozilla"),isOpera:p("opera"),isSafari:p("safari"),isChrome:p("chrome"),isMac:p("mac"),isIos:p("ios"),isAndroid:p("android"),isWii:p("wii"),isQuirks:p("quirks"),isAir:p("air")})),p},_,P),_.exports=S},84035:(_,P,l)=>{var b,S;b=[l(57987)],S=l.dj.d(b,function(C){var A=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),p=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),d=function(){for(var n=null,e=arguments,t=[e[0]],r=1;r0&&!(u==1&&o[0]=="")&&o[u]==".."&&o[u-1]!=".."&&(u==o.length-1?(o.splice(u,1),o[u-1]=""):(o.splice(u-1,2),u-=2));i.path=o.join("/")}t=[],i.scheme&&t.push(i.scheme,":"),i.authority&&t.push("//",i.authority),t.push(i.path),i.query&&t.push("?",i.query),i.fragment&&t.push("#",i.fragment)}this.uri=t.join("");var c=this.uri.match(A);this.scheme=c[2]||(c[1]?"":n),this.authority=c[4]||(c[3]?"":n),this.path=c[5],this.query=c[7]||(c[6]?"":n),this.fragment=c[9]||(c[8]?"":n),this.authority!=n&&(c=this.authority.match(p),this.user=c[3]||n,this.password=c[4]||n,this.host=c[6]||c[7],this.port=c[9]||n)};return d.prototype.toString=function(){return this.uri},C._Url=d},_,P),_.exports=S},69174:(_,P,l)=>{var b,S;b=[l(57987),l(69961),l(23702)],S=l.dj.d(b,function(C,A,p){var d={global:C.global,doc:C.global.document||null,body:function(n){return n=n||C.doc,n.body||n.getElementsByTagName("body")[0]},setContext:function(n,e){C.global=d.global=n,C.doc=d.doc=e},withGlobal:function(n,e,t,r){var i=C.global;try{return C.global=d.global=n,d.withDoc.call(null,n.document,e,t,r)}finally{C.global=d.global=i}},withDoc:function(n,e,t,r){var i=d.doc,s=p("quirks"),a=p("ie"),o,u,c;try{return C.doc=d.doc=n,C.isQuirks=p.add("quirks",C.doc.compatMode=="BackCompat",!0,!0),p("ie")&&(c=n.parentWindow)&&c.navigator&&(o=parseFloat(c.navigator.appVersion.split("MSIE ")[1])||void 0,u=n.documentMode,u&&u!=5&&Math.floor(o)!=u&&(o=u),C.isIE=p.add("ie",o,!0,!0)),t&&typeof e=="string"&&(e=t[e]),e.apply(t,r||[])}finally{C.doc=d.doc=i,C.isQuirks=p.add("quirks",s,!0,!0),C.isIE=p.add("ie",a,!0,!0)}}};return p("extend-dojo")&&A.mixin(C,d),d},_,P),_.exports=S},7755:(_,P,l)=>{var b,S;b=[l(57987),l(18203),l.dj.c(_),l(42372),l(7835),l(12509),l(67324),l(69196),l(84664),l(69961),l(33659),l(86560),l(76873),l(3513),l(13879),l(61061)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r,i,s,a,o,u,c,h,v){C._xhrObj=h._create;var f=C.config;C.objectToQuery=d.objectToQuery,C.queryToObject=d.queryToObject,C.fieldToObject=e.fieldToObject,C.formToObject=e.toObject,C.formToQuery=e.toQuery,C.formToJson=e.toJson,C._blockAsync=!1;var g=C._contentHandlers=C.contentHandlers={text:function(R){return R.responseText},json:function(R){return i.fromJson(R.responseText||null)},"json-comment-filtered":function(R){r.useCommentedJson||console.warn(`Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&& +Use djConfig.useCommentedJson=true to turn off this message.`);var T=R.responseText,N=T.indexOf("/*"),F=T.lastIndexOf("*/");if(N==-1||F==-1)throw new Error("JSON was not comment filtered");return i.fromJson(T.substring(N+2,F))},javascript:function(R){return C.eval(R.responseText)},xml:function(R){var T=R.responseXML;if(T&&A("dom-qsa2.1")&&!T.querySelectorAll&&A("dom-parser")&&(T=new DOMParser().parseFromString(R.responseText,"application/xml")),A("ie")&&(!T||!T.documentElement)){var N=function(y){return"MSXML"+y+".DOMDocument"},F=["Microsoft.XMLDOM",N(6),N(4),N(3),N(2)];a.some(F,function(y){try{var x=new ActiveXObject(y);x.async=!1,x.loadXML(R.responseText),T=x}catch(O){return!1}return!0})}return T},"json-comment-optional":function(R){return R.responseText&&/^[^{\[]*\/\*/.test(R.responseText)?g["json-comment-filtered"](R):g.json(R)}};C._ioSetArgs=function(R,T,N,F){var y={args:R,url:R.url},x=null;if(R.form){var O=n.byId(R.form),L=O.getAttributeNode("action");y.url=y.url||(L?L.value:C.doc?C.doc.URL:null),x=e.toObject(O)}var W={};x&&s.mixin(W,x),R.content&&s.mixin(W,R.content),R.preventCache&&(W["dojo.preventCache"]=new Date().valueOf()),y.query=d.objectToQuery(W),y.handleAs=R.handleAs||"text";var j=new t(function(V){V.canceled=!0,T&&T(V);var z=V.ioArgs.error;return z||(z=new Error("request cancelled"),z.dojoType="cancel",V.ioArgs.error=z),z});j.addCallback(N);var H=R.load;H&&s.isFunction(H)&&j.addCallback(function(V){return H.call(R,V,y)});var K=R.error;K&&s.isFunction(K)&&j.addErrback(function(V){return K.call(R,V,y)});var $=R.handle;return $&&s.isFunction($)&&j.addBoth(function(V){return $.call(R,V,y)}),j.addErrback(function(V){return F(V,j)}),f.ioPublish&&C.publish&&y.args.ioPublish!==!1&&(j.addCallbacks(function(V){return C.publish("/dojo/io/load",[j,V]),V},function(V){return C.publish("/dojo/io/error",[j,V]),V}),j.addBoth(function(V){return C.publish("/dojo/io/done",[j,V]),V})),j.ioArgs=y,j};var m=function(R){var T=g[R.ioArgs.handleAs](R.ioArgs.xhr);return T===void 0?null:T},E=function(R,T){return T.ioArgs.args.failOk||console.error(R),R},w=function(R){I<=0&&(I=0,f.ioPublish&&C.publish&&(!R||R&&R.ioArgs.args.ioPublish!==!1)&&C.publish("/dojo/io/stop"))},I=0;u.after(c,"_onAction",function(){I-=1}),u.after(c,"_onInFlight",w),C._ioCancelAll=c.cancelAll,C._ioNotifyStart=function(R){f.ioPublish&&C.publish&&R.ioArgs.args.ioPublish!==!1&&(I||C.publish("/dojo/io/start"),I+=1,C.publish("/dojo/io/send",[R]))},C._ioWatch=function(R,T,N,F){var y=R.ioArgs.options=R.ioArgs.args;s.mixin(R,{response:R.ioArgs,isValid:function(x){return T(R)},isReady:function(x){return N(R)},handleResponse:function(x){return F(R)}}),c(R),w(R)};var M="application/x-www-form-urlencoded";return C._ioAddQueryToUrl=function(R){R.query.length&&(R.url+=(R.url.indexOf("?")==-1?"?":"&")+R.query,R.query=null)},C.xhr=function(R,T,N){var F,y=C._ioSetArgs(T,function(L){F&&F.cancel()},m,E),x=y.ioArgs;"postData"in T?x.query=T.postData:"putData"in T?x.query=T.putData:"rawBody"in T?x.query=T.rawBody:(arguments.length>2&&!N||"POST|PUT".indexOf(R.toUpperCase())===-1)&&C._ioAddQueryToUrl(x);var O={method:R,handleAs:"text",timeout:T.timeout,withCredentials:T.withCredentials,ioArgs:x};typeof T.headers<"u"&&(O.headers=T.headers),typeof T.contentType<"u"&&(O.headers||(O.headers={}),O.headers["Content-Type"]=T.contentType),typeof x.query<"u"&&(O.data=x.query),typeof T.sync<"u"&&(O.sync=T.sync),C._ioNotifyStart(y);try{F=h(x.url,O,!0)}catch(L){return y.cancel(),y}return y.ioArgs.xhr=F.response.xhr,F.then(function(){y.resolve(y)}).otherwise(function(L){x.error=L,L.response&&(L.status=L.response.status,L.responseText=L.response.text,L.xhr=L.response.xhr),y.reject(L)}),y},C.xhrGet=function(R){return C.xhr("GET",R)},C.rawXhrPost=C.xhrPost=function(R){return C.xhr("POST",R,!0)},C.rawXhrPut=C.xhrPut=function(R){return C.xhr("PUT",R,!0)},C.xhrDelete=function(R){return C.xhr("DELETE",R)},C._isDocumentOk=function(R){return v.checkStatus(R.status)},C._getText=function(R){var T;return C.xhrGet({url:R,sync:!0,load:function(N){T=N}}),T},s.mixin(C.xhr,{_xhrObj:C._xhrObj,fieldToObject:e.fieldToObject,formToObject:e.toObject,objectToQuery:d.objectToQuery,formToQuery:e.toQuery,formToJson:e.toJson,queryToObject:d.queryToObject,contentHandlers:g,_ioSetArgs:C._ioSetArgs,_ioCancelAll:C._ioCancelAll,_ioNotifyStart:C._ioNotifyStart,_ioWatch:C._ioWatch,_ioAddQueryToUrl:C._ioAddQueryToUrl,_isDocumentOk:C._isDocumentOk,_getText:C._getText,get:C.xhrGet,post:C.xhrPost,put:C.xhrPut,del:C.xhrDelete}),C.xhr},_,P),_.exports=S},76873:(_,P,l)=>{var b,S;b=[],S=l.dj.d(b,function(){"use strict";var C;function A(t,r,i,s){var a=t[r],o=r=="around",u;if(o){var c=i(function(){return a.advice(this,arguments)});u={remove:function(){c&&(c=t=i=null)},advice:function(h,v){return c?c.apply(h,v):a.advice(h,v)}}}else u={remove:function(){if(u.advice){var h=u.previous,v=u.next;!v&&!h?delete t[r]:(h?h.next=v:t[r]=v,v&&(v.previous=h)),t=i=u.advice=null}},id:t.nextId++,advice:i,receiveArguments:s};if(a&&!o)if(r=="after"){for(;a.next&&(a=a.next););a.next=u,u.previous=a}else r=="before"&&(t[r]=u,u.next=a,a.previous=u);else t[r]=u;return u}function p(t){return function(r,i,s,a){var o=r[i],u;(!o||o.target!=r)&&(r[i]=u=function(){for(var h=u.nextId,v=arguments,f=u.before;f;)f.advice&&(v=f.advice.apply(this,v)||v),f=f.next;if(u.around)var g=u.around.advice(this,v);for(var m=u.after;m&&m.id{var b,S;b=[l(57987),l(37581)],S=l.dj.d(b,function(C){return C.cache},_,P),_.exports=S},8564:(_,P,l)=>{var b,S;b=[l(57987),l(89923)],S=l.dj.d(b,function(C,A){return C.cookie=function(p,d,n){var e=document.cookie,t;if(arguments.length==1){var r=e.match(new RegExp("(?:^|; )"+A.escapeString(p)+"=([^;]*)"));t=r?decodeURIComponent(r[1]):void 0}else{n=n||{};var i=n.expires;if(typeof i=="number"){var s=new Date;s.setTime(s.getTime()+i*24*60*60*1e3),i=n.expires=s}i&&i.toUTCString&&(n.expires=i.toUTCString()),d=encodeURIComponent(d);var a=p+"="+d,o;for(o in n){a+="; "+o;var u=n[o];u!==!0&&(a+="="+u)}document.cookie=a}return t},C.cookie.isSupported=function(){return"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed",navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1})),navigator.cookieEnabled},C.cookie},_,P),_.exports=S},58875:(_,P,l)=>{var b,S;b=[l(69961),l(33659)],S=l.dj.d(b,function(C,A){var p={};return C.setObject("dojo.date.stamp",p),p.fromISOString=function(d,n){p._isoRegExp||(p._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var e=p._isoRegExp.exec(d),t=null;if(e){e.shift(),e[1]&&e[1]--,e[6]&&(e[6]*=1e3),n&&(n=new Date(n),A.forEach(A.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(s){return n["get"+s]()}),function(s,a){e[a]=e[a]||s})),t=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0),e[0]<100&&t.setFullYear(e[0]||1970);var r=0,i=e[7]&&e[7].charAt(0);i!="Z"&&(r=(e[8]||0)*60+(Number(e[9])||0),i!="-"&&(r*=-1)),i&&(r-=t.getTimezoneOffset()),r&&t.setTime(t.getTime()+r*6e4)}return t},p.toISOString=function(d,n){var e=function(h){return h<10?"0"+h:h};n=n||{};var t=[],r=n.zulu?"getUTC":"get",i="";if(n.selector!="time"){var s=d[r+"FullYear"]();i=["0000".substr((s+"").length)+s,e(d[r+"Month"]()+1),e(d[r+"Date"]())].join("-")}if(t.push(i),n.selector!="date"){var a=[e(d[r+"Hours"]()),e(d[r+"Minutes"]()),e(d[r+"Seconds"]())].join(":"),o=d[r+"Milliseconds"]();if(n.milliseconds&&(a+="."+(o<100?"0":"")+e(o)),n.zulu)a+="Z";else if(n.selector!="time"){var u=d.getTimezoneOffset(),c=Math.abs(u);a+=(u>0?"-":"+")+e(Math.floor(c/60))+":"+e(c%60)}t.push(a)}return t.join("T")},p},_,P),_.exports=S},81070:(_,P,l)=>{var b,S;b=[P,l(23702),l(69961),l(7835),l(37672),l(38339)],S=l.dj.d(b,function(C,A,p,d,n,e){var t={innerHTML:1,textContent:1,className:1,htmlFor:A("ie")?1:0,value:1},r={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};function i(s,a){var o=s.getAttributeNode&&s.getAttributeNode(a);return!!o&&o.specified}C.has=function(a,o){var u=o.toLowerCase();return!!t[e.names[u]||o]||i(d.byId(a),r[u]||o)},C.get=function(a,o){a=d.byId(a);var u=o.toLowerCase(),c=e.names[u]||o,h=t[c],v=a[c];if(h&&typeof v<"u")return v;if(c=="textContent")return e.get(a,c);if(c!="href"&&(typeof v=="boolean"||p.isFunction(v)))return v;var f=r[u]||o;return i(a,f)?a.getAttribute(f):null},C.set=function(a,o,u){if(a=d.byId(a),arguments.length==2){for(var c in o)C.set(a,c,o[c]);return a}var h=o.toLowerCase(),v=e.names[h]||o,f=t[v];return v=="style"&&typeof u!="string"?(n.set(a,u),a):f||typeof u=="boolean"||p.isFunction(u)?e.set(a,o,u):(a.setAttribute(r[h]||o,u),a)},C.remove=function(a,o){d.byId(a).removeAttribute(r[o.toLowerCase()]||o)},C.getNodeProp=function(a,o){a=d.byId(a);var u=o.toLowerCase(),c=e.names[u]||o;if(c in a&&c!="href")return a[c];var h=r[u]||o;return i(a,h)?a.getAttribute(h):null}},_,P),_.exports=S},65724:(_,P,l)=>{var b,S;b=[l(69961),l(33659),l(7835)],S=l.dj.d(b,function(C,A,p){var d="className",n,e=/\s+/,t=[""];function r(s){if(typeof s=="string"||s instanceof String){if(s&&!e.test(s))return t[0]=s,t;var a=s.split(e);return a.length&&!a[0]&&a.shift(),a.length&&!a[a.length-1]&&a.pop(),a}return s?A.filter(s,function(o){return o}):[]}var i={};return n={contains:function(a,o){return(" "+p.byId(a)[d]+" ").indexOf(" "+o+" ")>=0},add:function(a,o){a=p.byId(a),o=r(o);var u=a[d],c;u=u?" "+u+" ":" ",c=u.length;for(var h=0,v=o.length,f;h{var b,S;b=[P,l(57987),l(23702),l(69174),l(7835),l(81070)],S=l.dj.d(b,function(C,A,p,d,n,e){var t={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},r=/<\s*([\w\:]+)/,i={},s=0,a="__"+A._scopeName+"ToDomId";for(var o in t)if(t.hasOwnProperty(o)){var u=t[o];u.pre=o=="option"?' +`},19346:_=>{_.exports=`
+`},42204:_=>{_.exports=`
+ + +
+`},64801:_=>{_.exports=`
`},9606:_=>{_.exports='
\n
\n
\n
\n
50%
\n
'},37314:_=>{_.exports=`
+
+
+
+
+
+`},25427:(_,P,l)=>{"use strict";(function(b,S){_.exports=S(l(66501))})(void 0,function(b){"use strict";var S='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}';function C(ye){var Ce=document.createElement("style");Ce.textContent=ye,Ce.setAttribute("data-tippy-stylesheet","");var Ie=document.head,Ke=document.querySelector("head>style,head>link");Ke?Ie.insertBefore(Ce,Ke):Ie.appendChild(Ce)}var A=typeof window<"u"&&typeof document<"u",p=A?!!window.msCrypto:!1,d='',n="tippy-box",e="tippy-content",t="tippy-backdrop",r="tippy-arrow",i="tippy-svg-arrow",s={passive:!0,capture:!0},a=function(){return document.body};function o(ye,Ce){return{}.hasOwnProperty.call(ye,Ce)}function u(ye,Ce,Ie){if(Array.isArray(ye)){var Ke=ye[Ce];return Ke==null?Array.isArray(Ie)?Ie[Ce]:Ie:Ke}return ye}function c(ye,Ce){var Ie={}.toString.call(ye);return Ie.indexOf("[object")===0&&Ie.indexOf(Ce+"]")>-1}function h(ye,Ce){return typeof ye=="function"?ye.apply(void 0,Ce):ye}function v(ye,Ce){if(Ce===0)return ye;var Ie;return function(Ke){clearTimeout(Ie),Ie=setTimeout(function(){ye(Ke)},Ce)}}function f(ye,Ce){var Ie=Object.assign({},ye);return Ce.forEach(function(Ke){delete Ie[Ke]}),Ie}function g(ye){return ye.split(/\s+/).filter(Boolean)}function m(ye){return[].concat(ye)}function E(ye,Ce){ye.indexOf(Ce)===-1&&ye.push(Ce)}function w(ye){return ye.filter(function(Ce,Ie){return ye.indexOf(Ce)===Ie})}function I(ye){return ye.split("-")[0]}function M(ye){return[].slice.call(ye)}function R(ye){return Object.keys(ye).reduce(function(Ce,Ie){return ye[Ie]!==void 0&&(Ce[Ie]=ye[Ie]),Ce},{})}function T(){return document.createElement("div")}function N(ye){return["Element","Fragment"].some(function(Ce){return c(ye,Ce)})}function F(ye){return c(ye,"NodeList")}function y(ye){return c(ye,"MouseEvent")}function x(ye){return!!(ye&&ye._tippy&&ye._tippy.reference===ye)}function O(ye){return N(ye)?[ye]:F(ye)?M(ye):Array.isArray(ye)?ye:M(document.querySelectorAll(ye))}function L(ye,Ce){ye.forEach(function(Ie){Ie&&(Ie.style.transitionDuration=Ce+"ms")})}function W(ye,Ce){ye.forEach(function(Ie){Ie&&Ie.setAttribute("data-state",Ce)})}function j(ye){var Ce,Ie=m(ye),Ke=Ie[0];return Ke!=null&&(Ce=Ke.ownerDocument)!=null&&Ce.body?Ke.ownerDocument:document}function H(ye,Ce){var Ie=Ce.clientX,Ke=Ce.clientY;return ye.every(function(Je){var Qe=Je.popperRect,Ge=Je.popperState,dt=Je.props,mt=dt.interactiveBorder,Dt=I(Ge.placement),bt=Ge.modifiersData.offset;if(!bt)return!0;var qt=Dt==="bottom"?bt.top.y:0,$t=Dt==="top"?bt.bottom.y:0,Ht=Dt==="right"?bt.left.x:0,Mt=Dt==="left"?bt.right.x:0,wt=Qe.top-Ke+qt>mt,At=Ke-Qe.bottom-$t>mt,it=Qe.left-Ie+Ht>mt,Ot=Ie-Qe.right-Mt>mt;return wt||At||it||Ot})}function K(ye,Ce,Ie){if(Ie){var Ke=Ce+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(Je){ye[Ke](Je,Ie)})}}function $(ye,Ce){for(var Ie=Ce;Ie;){var Ke;if(ye.contains(Ie))return!0;Ie=Ie.getRootNode==null||(Ke=Ie.getRootNode())==null?void 0:Ke.host}return!1}var V={isTouch:!1},z=0;function X(){V.isTouch||(V.isTouch=!0,window.performance&&document.addEventListener("mousemove",Z))}function Z(){var ye=performance.now();ye-z<20&&(V.isTouch=!1,document.removeEventListener("mousemove",Z)),z=ye}function Y(){var ye=document.activeElement;if(x(ye)){var Ce=ye._tippy;ye.blur&&!Ce.state.isVisible&&ye.blur()}}function Q(){document.addEventListener("touchstart",X,s),window.addEventListener("blur",Y)}function q(ye){var Ce=ye==="destroy"?"n already-":" ";return[ye+"() was called on a"+Ce+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ee(ye){var Ce=/[ \t]{2,}/g,Ie=/^[ \t]*/gm;return ye.replace(Ce," ").replace(Ie,"").trim()}function oe(ye){return ee(` + %ctippy.js + + %c`+ee(ye)+` + + %cThis is a development-only message. It will be removed in production. + `)}function se(ye){return[oe(ye),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var he;fe();function fe(){he=new Set}function le(ye,Ce){if(ye&&!he.has(Ce)){var Ie;he.add(Ce),(Ie=console).warn.apply(Ie,se(Ce))}}function ie(ye,Ce){if(ye&&!he.has(Ce)){var Ie;he.add(Ce),(Ie=console).error.apply(Ie,se(Ce))}}function re(ye){var Ce=!ye,Ie=Object.prototype.toString.call(ye)==="[object Object]"&&!ye.addEventListener;ie(Ce,["tippy() was passed","`"+String(ye)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ie(Ie,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ce={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ve={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ge=Object.assign({appendTo:a,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ce,ve),Te=Object.keys(ge),Pe=function(Ce){{var Ie=ge.plugins.concat(Ce.plugins||[]);ot(Ce,Ie)}var Ke=Object.keys(Ce);Ke.forEach(function(Je){ge[Je]=Ce[Je]})};function Le(ye){var Ce=ye.plugins||[],Ie=Ce.reduce(function(Ke,Je){var Qe=Je.name,Ge=Je.defaultValue;if(Qe){var dt;Ke[Qe]=ye[Qe]!==void 0?ye[Qe]:(dt=ge[Qe])!=null?dt:Ge}return Ke},{});return Object.assign({},ye,Ie)}function ct(ye,Ce){var Ie=Ce?Object.keys(Le(Object.assign({},ge,{plugins:Ce}))):Te,Ke=Ie.reduce(function(Je,Qe){var Ge=(ye.getAttribute("data-tippy-"+Qe)||"").trim();if(!Ge)return Je;if(Qe==="content")Je[Qe]=Ge;else try{Je[Qe]=JSON.parse(Ge)}catch(dt){Je[Qe]=Ge}return Je},{});return Ke}function st(ye,Ce){var Ie=Object.assign({},Ce,{content:h(Ce.content,[ye])},Ce.ignoreAttributes?{}:ct(ye,Ce.plugins));return Ie.aria=Object.assign({},ge.aria,Ie.aria),Ie.aria={expanded:Ie.aria.expanded==="auto"?Ce.interactive:Ie.aria.expanded,content:Ie.aria.content==="auto"?Ce.interactive?null:"describedby":Ie.aria.content},Ie}function ot(ye,Ce){ye===void 0&&(ye={}),Ce===void 0&&(Ce=[]);var Ie=Object.keys(ye);Ie.forEach(function(Ke){var Je=f(ge,Object.keys(ce)),Qe=!o(Je,Ke);Qe&&(Qe=Ce.filter(function(Ge){return Ge.name===Ke}).length===0),le(Qe,["`"+Ke+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",` + +`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/ +`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var nt=function(){return"innerHTML"};function Rt(ye,Ce){ye[nt()]=Ce}function Yt(ye){var Ce=T();return ye===!0?Ce.className=r:(Ce.className=i,N(ye)?Ce.appendChild(ye):Rt(Ce,ye)),Ce}function kt(ye,Ce){N(Ce.content)?(Rt(ye,""),ye.appendChild(Ce.content)):typeof Ce.content!="function"&&(Ce.allowHTML?Rt(ye,Ce.content):ye.textContent=Ce.content)}function Ft(ye){var Ce=ye.firstElementChild,Ie=M(Ce.children);return{box:Ce,content:Ie.find(function(Ke){return Ke.classList.contains(e)}),arrow:Ie.find(function(Ke){return Ke.classList.contains(r)||Ke.classList.contains(i)}),backdrop:Ie.find(function(Ke){return Ke.classList.contains(t)})}}function Bt(ye){var Ce=T(),Ie=T();Ie.className=n,Ie.setAttribute("data-state","hidden"),Ie.setAttribute("tabindex","-1");var Ke=T();Ke.className=e,Ke.setAttribute("data-state","hidden"),kt(Ke,ye.props),Ce.appendChild(Ie),Ie.appendChild(Ke),Je(ye.props,ye.props);function Je(Qe,Ge){var dt=Ft(Ce),mt=dt.box,Dt=dt.content,bt=dt.arrow;Ge.theme?mt.setAttribute("data-theme",Ge.theme):mt.removeAttribute("data-theme"),typeof Ge.animation=="string"?mt.setAttribute("data-animation",Ge.animation):mt.removeAttribute("data-animation"),Ge.inertia?mt.setAttribute("data-inertia",""):mt.removeAttribute("data-inertia"),mt.style.maxWidth=typeof Ge.maxWidth=="number"?Ge.maxWidth+"px":Ge.maxWidth,Ge.role?mt.setAttribute("role",Ge.role):mt.removeAttribute("role"),(Qe.content!==Ge.content||Qe.allowHTML!==Ge.allowHTML)&&kt(Dt,ye.props),Ge.arrow?bt?Qe.arrow!==Ge.arrow&&(mt.removeChild(bt),mt.appendChild(Yt(Ge.arrow))):mt.appendChild(Yt(Ge.arrow)):bt&&mt.removeChild(bt)}return{popper:Ce,onUpdate:Je}}Bt.$$tippy=!0;var me=1,Ne=[],Ve=[];function et(ye,Ce){var Ie=st(ye,Object.assign({},ge,Le(R(Ce)))),Ke,Je,Qe,Ge=!1,dt=!1,mt=!1,Dt=!1,bt,qt,$t,Ht=[],Mt=v(an,Ie.interactiveDebounce),wt,At=me++,it=null,Ot=w(Ie.plugins),en={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},Se={id:At,reference:ye,popper:T(),popperInstance:it,props:Ie,state:en,plugins:Ot,clearDelayTimeouts:Nn,setProps:dr,setContent:fr,show:Vn,hide:Tr,hideWithInteractivity:Ur,enable:Er,disable:ar,unmount:sr,destroy:hr};if(!Ie.render)return ie(!0,"render() function has not been supplied."),Se;var Tt=Ie.render(Se),te=Tt.popper,Ee=Tt.onUpdate;te.setAttribute("data-tippy-root",""),te.id="tippy-"+Se.id,Se.popper=te,ye._tippy=Se,te._tippy=Se;var ne=Ot.map(function(Me){return Me.fn(Se)}),ae=ye.hasAttribute("aria-expanded");return Lt(),zt(),ut(),Xe("onCreate",[Se]),Ie.showOnCreate&&An(),te.addEventListener("mouseenter",function(){Se.props.interactive&&Se.state.isVisible&&Se.clearDelayTimeouts()}),te.addEventListener("mouseleave",function(){Se.props.interactive&&Se.props.trigger.indexOf("mouseenter")>=0&&Oe().addEventListener("mousemove",Mt)}),Se;function de(){var Me=Se.props.touch;return Array.isArray(Me)?Me:[Me,0]}function De(){return de()[0]==="hold"}function be(){var Me;return!!((Me=Se.props.render)!=null&&Me.$$tippy)}function Be(){return wt||ye}function Oe(){var Me=Be().parentNode;return Me?j(Me):document}function ke(){return Ft(te)}function Ze(Me){return Se.state.isMounted&&!Se.state.isVisible||V.isTouch?0:u(Se.props.delay,Me?0:1,ge.delay)}function ut(Me){Me===void 0&&(Me=!1),te.style.pointerEvents=Se.props.interactive&&!Me?"":"none",te.style.zIndex=""+Se.props.zIndex}function Xe(Me,qe,_t){if(_t===void 0&&(_t=!0),ne.forEach(function(jt){jt[Me]&&jt[Me].apply(jt,qe)}),_t){var Ut;(Ut=Se.props)[Me].apply(Ut,qe)}}function Qt(){var Me=Se.props.aria;if(Me.content){var qe="aria-"+Me.content,_t=te.id,Ut=m(Se.props.triggerTarget||ye);Ut.forEach(function(jt){var ln=jt.getAttribute(qe);if(Se.state.isVisible)jt.setAttribute(qe,ln?ln+" "+_t:_t);else{var rn=ln&&ln.replace(_t,"").trim();rn?jt.setAttribute(qe,rn):jt.removeAttribute(qe)}})}}function zt(){if(!(ae||!Se.props.aria.expanded)){var Me=m(Se.props.triggerTarget||ye);Me.forEach(function(qe){Se.props.interactive?qe.setAttribute("aria-expanded",Se.state.isVisible&&qe===Be()?"true":"false"):qe.removeAttribute("aria-expanded")})}}function Pt(){Oe().removeEventListener("mousemove",Mt),Ne=Ne.filter(function(Me){return Me!==Mt})}function Wt(Me){if(!(V.isTouch&&(mt||Me.type==="mousedown"))){var qe=Me.composedPath&&Me.composedPath()[0]||Me.target;if(!(Se.props.interactive&&$(te,qe))){if(m(Se.props.triggerTarget||ye).some(function(_t){return $(_t,qe)})){if(V.isTouch||Se.state.isVisible&&Se.props.trigger.indexOf("click")>=0)return}else Xe("onClickOutside",[Se,Me]);Se.props.hideOnClick===!0&&(Se.clearDelayTimeouts(),Se.hide(),dt=!0,setTimeout(function(){dt=!1}),Se.state.isMounted||Re())}}}function tn(){mt=!0}function Kt(){mt=!1}function Gt(){var Me=Oe();Me.addEventListener("mousedown",Wt,!0),Me.addEventListener("touchend",Wt,s),Me.addEventListener("touchstart",Kt,s),Me.addEventListener("touchmove",tn,s)}function Re(){var Me=Oe();Me.removeEventListener("mousedown",Wt,!0),Me.removeEventListener("touchend",Wt,s),Me.removeEventListener("touchstart",Kt,s),Me.removeEventListener("touchmove",tn,s)}function Ue(Me,qe){tt(Me,function(){!Se.state.isVisible&&te.parentNode&&te.parentNode.contains(te)&&qe()})}function je(Me,qe){tt(Me,qe)}function tt(Me,qe){var _t=ke().box;function Ut(jt){jt.target===_t&&(K(_t,"remove",Ut),qe())}if(Me===0)return qe();K(_t,"remove",qt),K(_t,"add",Ut),qt=Ut}function xt(Me,qe,_t){_t===void 0&&(_t=!1);var Ut=m(Se.props.triggerTarget||ye);Ut.forEach(function(jt){jt.addEventListener(Me,qe,_t),Ht.push({node:jt,eventType:Me,handler:qe,options:_t})})}function Lt(){De()&&(xt("touchstart",vt,{passive:!0}),xt("touchend",nn,{passive:!0})),g(Se.props.trigger).forEach(function(Me){if(Me!=="manual")switch(xt(Me,vt),Me){case"mouseenter":xt("mouseleave",nn);break;case"focus":xt(p?"focusout":"blur",pn);break;case"focusin":xt("focusout",pn);break}})}function ft(){Ht.forEach(function(Me){var qe=Me.node,_t=Me.eventType,Ut=Me.handler,jt=Me.options;qe.removeEventListener(_t,Ut,jt)}),Ht=[]}function vt(Me){var qe,_t;Me&&Me.type==="focusin"&&Me.stopPropagation();var Ut=!1;if(!(!Se.state.isEnabled||un(Me)||dt)){var jt=((qe=bt)==null?void 0:qe.type)==="focus"||((_t=bt)==null?void 0:_t.type)==="focusin";bt=Me,wt=Me.currentTarget,zt(),!Se.state.isVisible&&y(Me)&&Ne.forEach(function(ln){return ln(Me)}),Me.type==="click"&&(Se.props.trigger.indexOf("mouseenter")<0||Ge)&&Se.props.hideOnClick!==!1&&Se.state.isVisible?Ut=!0:An(Me),Me.type==="click"&&(Ge=!Ut),Ut&&!jt&&En(Me)}}function an(Me){var qe=Me.target,_t=Be().contains(qe)||te.contains(qe);if(!(Me.type==="mousemove"&&_t)){var Ut=Dn().concat(te).map(function(jt){var ln,rn=jt._tippy,ur=(ln=rn.popperInstance)==null?void 0:ln.state;return ur?{popperRect:jt.getBoundingClientRect(),popperState:ur,props:Ie}:null}).filter(Boolean);H(Ut,Me)&&(Pt(),En(Me))}}function nn(Me){var qe=un(Me)||Se.props.trigger.indexOf("click")>=0&&Ge;if(!qe){if(Se.props.interactive){Se.hideWithInteractivity(Me);return}En(Me)}}function pn(Me){Se.props.trigger.indexOf("focusin")<0&&Me.target!==Be()||Se.props.interactive&&Me.relatedTarget&&te.contains(Me.relatedTarget)||En(Me)}function un(Me){return V.isTouch?De()!==Me.type.indexOf("touch")>=0:!1}function In(){dn();var Me=Se.props,qe=Me.popperOptions,_t=Me.placement,Ut=Me.offset,jt=Me.getReferenceClientRect,ln=Me.moveTransition,rn=be()?Ft(te).arrow:null,ur=jt?{getBoundingClientRect:jt,contextElement:jt.contextElement||Be()}:ye,Vr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ui){var $n=ui.state;if(be()){var Rr=ke(),$r=Rr.box;["placement","reference-hidden","escaped"].forEach(function(li){li==="placement"?$r.setAttribute("data-placement",$n.placement):$n.attributes.popper["data-popper-"+li]?$r.setAttribute("data-"+li,""):$r.removeAttribute("data-"+li)}),$n.attributes.popper={}}}},Sn=[{name:"offset",options:{offset:Ut}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ln}},Vr];be()&&rn&&Sn.push({name:"arrow",options:{element:rn,padding:3}}),Sn.push.apply(Sn,(qe==null?void 0:qe.modifiers)||[]),Se.popperInstance=b.createPopper(ur,te,Object.assign({},qe,{placement:_t,onFirstUpdate:$t,modifiers:Sn}))}function dn(){Se.popperInstance&&(Se.popperInstance.destroy(),Se.popperInstance=null)}function Cn(){var Me=Se.props.appendTo,qe,_t=Be();Se.props.interactive&&Me===a||Me==="parent"?qe=_t.parentNode:qe=h(Me,[_t]),qe.contains(te)||qe.appendChild(te),Se.state.isMounted=!0,In(),le(Se.props.interactive&&Me===ge.appendTo&&_t.nextElementSibling!==te,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",` + +`,"Using a wrapper
or tag around the reference element","solves this by creating a new parentNode context.",` + +`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",` + +`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dn(){return M(te.querySelectorAll("[data-tippy-root]"))}function An(Me){Se.clearDelayTimeouts(),Me&&Xe("onTrigger",[Se,Me]),Gt();var qe=Ze(!0),_t=de(),Ut=_t[0],jt=_t[1];V.isTouch&&Ut==="hold"&&jt&&(qe=jt),qe?Ke=setTimeout(function(){Se.show()},qe):Se.show()}function En(Me){if(Se.clearDelayTimeouts(),Xe("onUntrigger",[Se,Me]),!Se.state.isVisible){Re();return}if(!(Se.props.trigger.indexOf("mouseenter")>=0&&Se.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Me.type)>=0&&Ge)){var qe=Ze(!1);qe?Je=setTimeout(function(){Se.state.isVisible&&Se.hide()},qe):Qe=requestAnimationFrame(function(){Se.hide()})}}function Er(){Se.state.isEnabled=!0}function ar(){Se.hide(),Se.state.isEnabled=!1}function Nn(){clearTimeout(Ke),clearTimeout(Je),cancelAnimationFrame(Qe)}function dr(Me){if(le(Se.state.isDestroyed,q("setProps")),!Se.state.isDestroyed){Xe("onBeforeUpdate",[Se,Me]),ft();var qe=Se.props,_t=st(ye,Object.assign({},qe,R(Me),{ignoreAttributes:!0}));Se.props=_t,Lt(),qe.interactiveDebounce!==_t.interactiveDebounce&&(Pt(),Mt=v(an,_t.interactiveDebounce)),qe.triggerTarget&&!_t.triggerTarget?m(qe.triggerTarget).forEach(function(Ut){Ut.removeAttribute("aria-expanded")}):_t.triggerTarget&&ye.removeAttribute("aria-expanded"),zt(),ut(),Ee&&Ee(qe,_t),Se.popperInstance&&(In(),Dn().forEach(function(Ut){requestAnimationFrame(Ut._tippy.popperInstance.forceUpdate)})),Xe("onAfterUpdate",[Se,Me])}}function fr(Me){Se.setProps({content:Me})}function Vn(){le(Se.state.isDestroyed,q("show"));var Me=Se.state.isVisible,qe=Se.state.isDestroyed,_t=!Se.state.isEnabled,Ut=V.isTouch&&!Se.props.touch,jt=u(Se.props.duration,0,ge.duration);if(!(Me||qe||_t||Ut)&&!Be().hasAttribute("disabled")&&(Xe("onShow",[Se],!1),Se.props.onShow(Se)!==!1)){if(Se.state.isVisible=!0,be()&&(te.style.visibility="visible"),ut(),Gt(),Se.state.isMounted||(te.style.transition="none"),be()){var ln=ke(),rn=ln.box,ur=ln.content;L([rn,ur],0)}$t=function(){var Sn;if(!(!Se.state.isVisible||Dt)){if(Dt=!0,te.offsetHeight,te.style.transition=Se.props.moveTransition,be()&&Se.props.animation){var si=ke(),ui=si.box,$n=si.content;L([ui,$n],jt),W([ui,$n],"visible")}Qt(),zt(),E(Ve,Se),(Sn=Se.popperInstance)==null||Sn.forceUpdate(),Xe("onMount",[Se]),Se.props.animation&&be()&&je(jt,function(){Se.state.isShown=!0,Xe("onShown",[Se])})}},Cn()}}function Tr(){le(Se.state.isDestroyed,q("hide"));var Me=!Se.state.isVisible,qe=Se.state.isDestroyed,_t=!Se.state.isEnabled,Ut=u(Se.props.duration,1,ge.duration);if(!(Me||qe||_t)&&(Xe("onHide",[Se],!1),Se.props.onHide(Se)!==!1)){if(Se.state.isVisible=!1,Se.state.isShown=!1,Dt=!1,Ge=!1,be()&&(te.style.visibility="hidden"),Pt(),Re(),ut(!0),be()){var jt=ke(),ln=jt.box,rn=jt.content;Se.props.animation&&(L([ln,rn],Ut),W([ln,rn],"hidden"))}Qt(),zt(),Se.props.animation?be()&&Ue(Ut,Se.unmount):Se.unmount()}}function Ur(Me){le(Se.state.isDestroyed,q("hideWithInteractivity")),Oe().addEventListener("mousemove",Mt),E(Ne,Mt),Mt(Me)}function sr(){le(Se.state.isDestroyed,q("unmount")),Se.state.isVisible&&Se.hide(),Se.state.isMounted&&(dn(),Dn().forEach(function(Me){Me._tippy.unmount()}),te.parentNode&&te.parentNode.removeChild(te),Ve=Ve.filter(function(Me){return Me!==Se}),Se.state.isMounted=!1,Xe("onHidden",[Se]))}function hr(){le(Se.state.isDestroyed,q("destroy")),!Se.state.isDestroyed&&(Se.clearDelayTimeouts(),Se.unmount(),ft(),delete ye._tippy,Se.state.isDestroyed=!0,Xe("onDestroy",[Se]))}}function ze(ye,Ce){Ce===void 0&&(Ce={});var Ie=ge.plugins.concat(Ce.plugins||[]);re(ye),ot(Ce,Ie),Q();var Ke=Object.assign({},Ce,{plugins:Ie}),Je=O(ye);{var Qe=N(Ke.content),Ge=Je.length>1;le(Qe&&Ge,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",` + +`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",` + +`,`1) content: element.innerHTML +`,"2) content: () => element.cloneNode(true)"].join(" "))}var dt=Je.reduce(function(mt,Dt){var bt=Dt&&et(Dt,Ke);return bt&&mt.push(bt),mt},[]);return N(ye)?dt[0]:dt}ze.defaultProps=ge,ze.setDefaultProps=Pe,ze.currentInput=V;var pt=function(Ce){var Ie=Ce===void 0?{}:Ce,Ke=Ie.exclude,Je=Ie.duration;Ve.forEach(function(Qe){var Ge=!1;if(Ke&&(Ge=x(Ke)?Qe.reference===Ke:Qe.popper===Ke.popper),!Ge){var dt=Qe.props.duration;Qe.setProps({duration:Je}),Qe.hide(),Qe.state.isDestroyed||Qe.setProps({duration:dt})}})},Et=Object.assign({},b.applyStyles,{effect:function(Ce){var Ie=Ce.state,Ke={popper:{position:Ie.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(Ie.elements.popper.style,Ke.popper),Ie.styles=Ke,Ie.elements.arrow&&Object.assign(Ie.elements.arrow.style,Ke.arrow)}}),It=function(Ce,Ie){var Ke;Ie===void 0&&(Ie={}),ie(!Array.isArray(Ce),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(Ce)].join(" "));var Je=Ce,Qe=[],Ge=[],dt,mt=Ie.overrides,Dt=[],bt=!1;function qt(){Ge=Je.map(function(Se){return m(Se.props.triggerTarget||Se.reference)}).reduce(function(Se,Tt){return Se.concat(Tt)},[])}function $t(){Qe=Je.map(function(Se){return Se.reference})}function Ht(Se){Je.forEach(function(Tt){Se?Tt.enable():Tt.disable()})}function Mt(Se){return Je.map(function(Tt){var te=Tt.setProps;return Tt.setProps=function(Ee){te(Ee),Tt.reference===dt&&Se.setProps(Ee)},function(){Tt.setProps=te}})}function wt(Se,Tt){var te=Ge.indexOf(Tt);if(Tt!==dt){dt=Tt;var Ee=(mt||[]).concat("content").reduce(function(ne,ae){return ne[ae]=Je[te].props[ae],ne},{});Se.setProps(Object.assign({},Ee,{getReferenceClientRect:typeof Ee.getReferenceClientRect=="function"?Ee.getReferenceClientRect:function(){var ne;return(ne=Qe[te])==null?void 0:ne.getBoundingClientRect()}}))}}Ht(!1),$t(),qt();var At={fn:function(){return{onDestroy:function(){Ht(!0)},onHidden:function(){dt=null},onClickOutside:function(te){te.props.showOnCreate&&!bt&&(bt=!0,dt=null)},onShow:function(te){te.props.showOnCreate&&!bt&&(bt=!0,wt(te,Qe[0]))},onTrigger:function(te,Ee){wt(te,Ee.currentTarget)}}}},it=ze(T(),Object.assign({},f(Ie,["overrides"]),{plugins:[At].concat(Ie.plugins||[]),triggerTarget:Ge,popperOptions:Object.assign({},Ie.popperOptions,{modifiers:[].concat(((Ke=Ie.popperOptions)==null?void 0:Ke.modifiers)||[],[Et])})})),Ot=it.show;it.show=function(Se){if(Ot(),!dt&&Se==null)return wt(it,Qe[0]);if(!(dt&&Se==null)){if(typeof Se=="number")return Qe[Se]&&wt(it,Qe[Se]);if(Je.indexOf(Se)>=0){var Tt=Se.reference;return wt(it,Tt)}if(Qe.indexOf(Se)>=0)return wt(it,Se)}},it.showNext=function(){var Se=Qe[0];if(!dt)return it.show(0);var Tt=Qe.indexOf(dt);it.show(Qe[Tt+1]||Se)},it.showPrevious=function(){var Se=Qe[Qe.length-1];if(!dt)return it.show(Se);var Tt=Qe.indexOf(dt),te=Qe[Tt-1]||Se;it.show(te)};var en=it.setProps;return it.setProps=function(Se){mt=Se.overrides||mt,en(Se)},it.setInstances=function(Se){Ht(!0),Dt.forEach(function(Tt){return Tt()}),Je=Se,Ht(!1),$t(),qt(),Dt=Mt(it),it.setProps({triggerTarget:Ge})},Dt=Mt(it),it},Nt={mouseover:"mouseenter",focusin:"focus",click:"click"};function Vt(ye,Ce){ie(!(Ce&&Ce.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var Ie=[],Ke=[],Je=!1,Qe=Ce.target,Ge=f(Ce,["target"]),dt=Object.assign({},Ge,{trigger:"manual",touch:!1}),mt=Object.assign({touch:ge.touch},Ge,{showOnCreate:!0}),Dt=ze(ye,dt),bt=m(Dt);function qt(At){if(!(!At.target||Je)){var it=At.target.closest(Qe);if(it){var Ot=it.getAttribute("data-tippy-trigger")||Ce.trigger||ge.trigger;if(!it._tippy&&!(At.type==="touchstart"&&typeof mt.touch=="boolean")&&!(At.type!=="touchstart"&&Ot.indexOf(Nt[At.type])<0)){var en=ze(it,mt);en&&(Ke=Ke.concat(en))}}}}function $t(At,it,Ot,en){en===void 0&&(en=!1),At.addEventListener(it,Ot,en),Ie.push({node:At,eventType:it,handler:Ot,options:en})}function Ht(At){var it=At.reference;$t(it,"touchstart",qt,s),$t(it,"mouseover",qt),$t(it,"focusin",qt),$t(it,"click",qt)}function Mt(){Ie.forEach(function(At){var it=At.node,Ot=At.eventType,en=At.handler,Se=At.options;it.removeEventListener(Ot,en,Se)}),Ie=[]}function wt(At){var it=At.destroy,Ot=At.enable,en=At.disable;At.destroy=function(Se){Se===void 0&&(Se=!0),Se&&Ke.forEach(function(Tt){Tt.destroy()}),Ke=[],Mt(),it()},At.enable=function(){Ot(),Ke.forEach(function(Se){return Se.enable()}),Je=!1},At.disable=function(){en(),Ke.forEach(function(Se){return Se.disable()}),Je=!0},Ht(At)}return bt.forEach(wt),Dt}var cr={name:"animateFill",defaultValue:!1,fn:function(Ce){var Ie;if(!((Ie=Ce.props.render)!=null&&Ie.$$tippy))return ie(Ce.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var Ke=Ft(Ce.popper),Je=Ke.box,Qe=Ke.content,Ge=Ce.props.animateFill?wn():null;return{onCreate:function(){Ge&&(Je.insertBefore(Ge,Je.firstElementChild),Je.setAttribute("data-animatefill",""),Je.style.overflow="hidden",Ce.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(Ge){var mt=Je.style.transitionDuration,Dt=Number(mt.replace("ms",""));Qe.style.transitionDelay=Math.round(Dt/10)+"ms",Ge.style.transitionDuration=mt,W([Ge],"visible")}},onShow:function(){Ge&&(Ge.style.transitionDuration="0ms")},onHide:function(){Ge&&W([Ge],"hidden")}}}};function wn(){var ye=T();return ye.className=t,W([ye],"hidden"),ye}var On={clientX:0,clientY:0},Ln=[];function yn(ye){var Ce=ye.clientX,Ie=ye.clientY;On={clientX:Ce,clientY:Ie}}function or(ye){ye.addEventListener("mousemove",yn)}function cn(ye){ye.removeEventListener("mousemove",yn)}var wr={name:"followCursor",defaultValue:!1,fn:function(Ce){var Ie=Ce.reference,Ke=j(Ce.props.triggerTarget||Ie),Je=!1,Qe=!1,Ge=!0,dt=Ce.props;function mt(){return Ce.props.followCursor==="initial"&&Ce.state.isVisible}function Dt(){Ke.addEventListener("mousemove",$t)}function bt(){Ke.removeEventListener("mousemove",$t)}function qt(){Je=!0,Ce.setProps({getReferenceClientRect:null}),Je=!1}function $t(wt){var At=wt.target?Ie.contains(wt.target):!0,it=Ce.props.followCursor,Ot=wt.clientX,en=wt.clientY,Se=Ie.getBoundingClientRect(),Tt=Ot-Se.left,te=en-Se.top;(At||!Ce.props.interactive)&&Ce.setProps({getReferenceClientRect:function(){var ne=Ie.getBoundingClientRect(),ae=Ot,de=en;it==="initial"&&(ae=ne.left+Tt,de=ne.top+te);var De=it==="horizontal"?ne.top:de,be=it==="vertical"?ne.right:ae,Be=it==="horizontal"?ne.bottom:de,Oe=it==="vertical"?ne.left:ae;return{width:be-Oe,height:Be-De,top:De,right:be,bottom:Be,left:Oe}}})}function Ht(){Ce.props.followCursor&&(Ln.push({instance:Ce,doc:Ke}),or(Ke))}function Mt(){Ln=Ln.filter(function(wt){return wt.instance!==Ce}),Ln.filter(function(wt){return wt.doc===Ke}).length===0&&cn(Ke)}return{onCreate:Ht,onDestroy:Mt,onBeforeUpdate:function(){dt=Ce.props},onAfterUpdate:function(At,it){var Ot=it.followCursor;Je||Ot!==void 0&&dt.followCursor!==Ot&&(Mt(),Ot?(Ht(),Ce.state.isMounted&&!Qe&&!mt()&&Dt()):(bt(),qt()))},onMount:function(){Ce.props.followCursor&&!Qe&&(Ge&&($t(On),Ge=!1),mt()||Dt())},onTrigger:function(At,it){y(it)&&(On={clientX:it.clientX,clientY:it.clientY}),Qe=it.type==="focus"||it.type==="focusin"},onHidden:function(){Ce.props.followCursor&&(qt(),bt(),Ge=!0)}}}};function Kn(ye,Ce){var Ie;return{popperOptions:Object.assign({},ye.popperOptions,{modifiers:[].concat((((Ie=ye.popperOptions)==null?void 0:Ie.modifiers)||[]).filter(function(Ke){var Je=Ke.name;return Je!==Ce.name}),[Ce])})}}var sn={name:"inlinePositioning",defaultValue:!1,fn:function(Ce){var Ie=Ce.reference;function Ke(){return!!Ce.props.inlinePositioning}var Je,Qe=-1,Ge=!1,dt=[],mt={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(Ht){var Mt=Ht.state;Ke()&&(dt.indexOf(Mt.placement)!==-1&&(dt=[]),Je!==Mt.placement&&dt.indexOf(Mt.placement)===-1&&(dt.push(Mt.placement),Ce.setProps({getReferenceClientRect:function(){return Dt(Mt.placement)}})),Je=Mt.placement)}};function Dt($t){return Xn(I($t),Ie.getBoundingClientRect(),M(Ie.getClientRects()),Qe)}function bt($t){Ge=!0,Ce.setProps($t),Ge=!1}function qt(){Ge||bt(Kn(Ce.props,mt))}return{onCreate:qt,onAfterUpdate:qt,onTrigger:function(Ht,Mt){if(y(Mt)){var wt=M(Ce.reference.getClientRects()),At=wt.find(function(Ot){return Ot.left-2<=Mt.clientX&&Ot.right+2>=Mt.clientX&&Ot.top-2<=Mt.clientY&&Ot.bottom+2>=Mt.clientY}),it=wt.indexOf(At);Qe=it>-1?it:Qe}},onHidden:function(){Qe=-1}}}};function Xn(ye,Ce,Ie,Ke){if(Ie.length<2||ye===null)return Ce;if(Ie.length===2&&Ke>=0&&Ie[0].left>Ie[1].right)return Ie[Ke]||Ce;switch(ye){case"top":case"bottom":{var Je=Ie[0],Qe=Ie[Ie.length-1],Ge=ye==="top",dt=Je.top,mt=Qe.bottom,Dt=Ge?Je.left:Qe.left,bt=Ge?Je.right:Qe.right,qt=bt-Dt,$t=mt-dt;return{top:dt,bottom:mt,left:Dt,right:bt,width:qt,height:$t}}case"left":case"right":{var Ht=Math.min.apply(Math,Ie.map(function(te){return te.left})),Mt=Math.max.apply(Math,Ie.map(function(te){return te.right})),wt=Ie.filter(function(te){return ye==="left"?te.left===Ht:te.right===Mt}),At=wt[0].top,it=wt[wt.length-1].bottom,Ot=Ht,en=Mt,Se=en-Ot,Tt=it-At;return{top:At,bottom:it,left:Ot,right:en,width:Se,height:Tt}}default:return Ce}}var er={name:"sticky",defaultValue:!1,fn:function(Ce){var Ie=Ce.reference,Ke=Ce.popper;function Je(){return Ce.popperInstance?Ce.popperInstance.state.elements.reference:Ie}function Qe(Dt){return Ce.props.sticky===!0||Ce.props.sticky===Dt}var Ge=null,dt=null;function mt(){var Dt=Qe("reference")?Je().getBoundingClientRect():null,bt=Qe("popper")?Ke.getBoundingClientRect():null;(Dt&&Un(Ge,Dt)||bt&&Un(dt,bt))&&Ce.popperInstance&&Ce.popperInstance.update(),Ge=Dt,dt=bt,Ce.state.isMounted&&requestAnimationFrame(mt)}return{onMount:function(){Ce.props.sticky&&mt()}}}};function Un(ye,Ce){return ye&&Ce?ye.top!==Ce.top||ye.right!==Ce.right||ye.bottom!==Ce.bottom||ye.left!==Ce.left:!0}return A&&C(S),ze.setDefaultProps({plugins:[cr,wr,sn,er],render:Bt}),ze.createSingleton=It,ze.delegate=Vt,ze.hideAll=pt,ze.roundArrow=d,ze})},85646:(_,P,l)=>{var b,S;b=[l(78470)],S=l.dj.d(b,function(C){"use strict";var A={};return A.default=C.AckExtension=function(){let p,d=!1,n;function e(t,r){p._debug(t,r)}this.registered=(t,r)=>{p=r,e("AckExtension: executing registration callback")},this.unregistered=()=>{e("AckExtension: executing unregistration callback"),p=null},this.incoming=t=>{const r=t.channel,i=t.ext;if(r==="/meta/handshake"){if(i){const s=i.ack;if(typeof s=="object"){d=s.enabled===!0;const a=s.batch;typeof a=="number"&&(n=a)}else d=s===!0}e("AckExtension: server supports acknowledgements",d)}else r==="/meta/connect"&&t.successful&&d&&i&&typeof i.ack=="number"&&(n=i.ack,e("AckExtension: server sent batch",n));return t},this.outgoing=t=>{const r=t.channel;return t.ext||(t.ext={}),r==="/meta/handshake"?(t.ext.ack=p&&p.ackEnabled!==!1,d=!1,n=0):r==="/meta/connect"&&d&&(t.ext.ack=n,e("AckExtension: client sending batch",n)),t}},A.default},_,P),_.exports=S},78470:(_,P,l)=>{var b,S;b=[],S=l.dj.d(b,function(){"use strict";var C={};function A(){let h=0;const v={};this.register=f=>{const g=++h;return v[g]=f,g},this.unregister=f=>{const g=v[f];return delete v[f],g},this.setTimeout=(f,g)=>window.setTimeout(f,g),this.clearTimeout=f=>{window.clearTimeout(f)}}function p(){const h={};self.onmessage=v=>{const f=v.data,g=h[f.id];switch(f.type){case"setTimeout":h[f.id]=self.setTimeout(()=>{delete h[f.id],self.postMessage({id:f.id})},f.delay);break;case"clearTimeout":delete h[f.id],g&&self.clearTimeout(g);break;default:throw"Unknown command "+f.type}}}const d={isString:h=>h==null?!1:typeof h=="string"||h instanceof String};function n(){let h=[],v={};this.getTransportTypes=()=>h.slice(0),this.findTransportTypes=(f,g,m)=>{const E=[];for(let w=0;w{for(let w=0;w{let E=!1;for(let w=0;w{for(let g=0;g{for(let g=0;g{h=[],v={}},this.reset=f=>{for(let g=0;g{h=g,v=m},this.unregistered=()=>{h=null,v=null},this._notifyTransportTimeout=function(g){const m=v._getTransportListeners("timeout");if(m)for(let E=0;E0)return I}catch(I){this._info("Exception during execution of transport listener",w,I)}}return 0},this._debug=function(){v._debug.apply(v,arguments)},this._info=function(){v._info.apply(v,arguments)},this._mixin=function(){return v._mixin.apply(v,arguments)},this.getConfiguration=()=>v.getConfiguration(),this.getAdvice=()=>v.getAdvice(),this.setTimeout=(g,m)=>v.setTimeout(g,m),this.clearTimeout=g=>{v.clearTimeout(g)},this.convertToJSON=function(g){const m=this.getConfiguration().maxSendBayeuxMessageSize;let E="[";for(let w=0;w0&&(E+=",");const I=g[w],M=JSON.stringify(I);if(M.length>m)throw"maxSendBayeuxMessageSize "+m+" exceeded";E+=M}return E+="]",E},this.convertToMessages=function(g){if(d.isString(g))try{return JSON.parse(g)}catch(m){throw this._debug("Could not convert to JSON the following string",'"'+g+'"'),m}if(Array.isArray(g))return g;if(g==null)return[];if(g instanceof Object)return[g];throw"Conversion Error "+g+", typeof "+typeof g},this.accept=(g,m,E)=>{throw"Abstract"},this.getType=()=>h,this.getURL=()=>f,this.setURL=g=>{f=g},this.send=(g,m)=>{throw"Abstract"},this.reset=function(g){this._debug("Transport",h,"reset",g?"initial":"retry")},this.abort=function(){this._debug("Transport",h,"aborted")},this.toString=function(){return this.getType()}}e.derive=h=>{function v(){}return v.prototype=h,new v};function t(){const h=new e,v=e.derive(h);let f=0,g=null,m=[],E=[];function w(y){for(;E.length>0;){const x=E[0],O=x[0],L=x[1];if(O.url===y.url&&O.sync===y.sync){E.shift(),y.messages=y.messages.concat(O.messages),this._debug("Coalesced",O.messages.length,"messages from request",L.id);continue}break}}function I(y,x,O){const L=this._notifyTransportTimeout(y.messages);if(L>0)this._debug("Transport",this.getType(),"extended waiting for message replies of request",x.id,":",L,"ms"),x.timeout=this.setTimeout(()=>{I.call(this,y,x,O+L)},L);else{x.expired=!0;const W="Transport "+this.getType()+" expired waiting for message replies of request "+x.id+": "+O+" ms",j={reason:W},H=x.xhr;j.httpCode=this.xhrStatus(H),this.abortXHR(H),this._debug(W),this.complete(x,!1,x.metaConnect),y.onFailure(H,y.messages,j)}}function M(y,x){if(this.transportSend(y,x)&&(x.expired=!1,!y.sync)){let O=this.getConfiguration().maxNetworkDelay;x.metaConnect===!0&&(O+=this.getAdvice().timeout),this._debug("Transport",this.getType(),"started waiting for message replies of request",x.id,":",O,"ms"),x.timeout=this.setTimeout(()=>{I.call(this,y,x,O)},O)}}function R(y){const x=++f,O={id:x,metaConnect:!1,envelope:y};m.length=0&&m.splice(O,1),E.length>0){const L=E.shift(),W=L[0],j=L[1];this._debug("Transport dequeued request",j.id),x?(this.getConfiguration().autoBatch&&w.call(this,W),R.call(this,W),this._debug("Transport completed request",y.id,W)):this.setTimeout(()=>{this.complete(j,!1,j.metaConnect);const H={reason:"Previous request failed"},K=j.xhr;H.httpCode=this.xhrStatus(K),W.onFailure(K,W.messages,H)},0)}}v.complete=function(y,x,O){O?T.call(this,y):N.call(this,y,x)},v.transportSend=(y,x)=>{throw"Abstract"},v.transportSuccess=function(y,x,O){x.expired||(this.clearTimeout(x.timeout),this._debug("Transport",this.getType(),"cancelled waiting for message replies"),this.complete(x,!0,x.metaConnect),O&&O.length>0?y.onSuccess(O):y.onFailure(x.xhr,y.messages,{httpCode:204}))},v.transportFailure=function(y,x,O){x.expired||(this.clearTimeout(x.timeout),this._debug("Transport",this.getType(),"cancelled waiting for failed message replies"),this.complete(x,!1,x.metaConnect),y.onFailure(x.xhr,y.messages,O))};function F(y){if(g!==null)throw"Concurrent /meta/connect requests not allowed, request id="+g.id+" not yet completed";const x=++f;this._debug("Transport",this.getType(),"/meta/connect send, request",x,"envelope",y);const O={id:x,metaConnect:!0,envelope:y};M.call(this,y,O),g=O}return v.send=function(y,x){x?F.call(this,y):R.call(this,y)},v.abort=function(){h.abort();for(let x=0;x{h.reset(y),g=null,m=[],E=[]},v.abortXHR=function(y){if(y)try{const x=y.readyState;return y.abort(),x!==window.XMLHttpRequest.UNSENT}catch(x){this._debug(x)}return!1},v.xhrStatus=function(y){if(y)try{return y.status}catch(x){this._debug(x)}return-1},v}function r(){const h=new t,v=e.derive(h);let f=!0;v.accept=(m,E,w)=>f||!E,v.newXMLHttpRequest=()=>new window.XMLHttpRequest;function g(m){try{m.context=v.context}catch(E){v._debug("Could not copy transport context into XHR",E)}}return v.xhrSend=m=>{const E=v.newXMLHttpRequest();g(E),E.withCredentials=!0,E.open("POST",m.url,m.sync!==!0);const w=m.headers;if(w)for(let I in w)w.hasOwnProperty(I)&&E.setRequestHeader(I,w[I]);return E.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.onload=()=>{E.status===200?m.onSuccess(E.responseText):m.onError(E.statusText)},E.onabort=E.onerror=()=>{m.onError(E.statusText)},E.send(m.body),E},v.transportSend=function(m,E){this._debug("Transport",this.getType(),"sending request",E.id,"envelope",m);try{let w=!0;return E.xhr=this.xhrSend({transport:this,url:m.url,sync:m.sync,headers:this.getConfiguration().requestHeaders,body:this.convertToJSON(m.messages),onSuccess:I=>{this._debug("Transport",this.getType(),"received response",I);let M=!1;try{const R=this.convertToMessages(I);R.length===0?(f=!1,this.transportFailure(m,E,{httpCode:204})):(M=!0,this.transportSuccess(m,E,R))}catch(R){if(this._debug(R),!M){f=!1;const T={exception:R};T.httpCode=this.xhrStatus(E.xhr),this.transportFailure(m,E,T)}}},onError:(I,M)=>{this._debug("Transport",this.getType(),"received error",I,M),f=!1;const R={reason:I,exception:M};R.httpCode=this.xhrStatus(E.xhr),w?this.setTimeout(()=>{this.transportFailure(m,E,R)},0):this.transportFailure(m,E,R)}}),w=!1,!0}catch(w){return this._debug("Transport",this.getType(),"exception:",w),f=!1,this.setTimeout(()=>{this.transportFailure(m,E,{exception:w})},0),!1}},v.reset=m=>{h.reset(m),f=!0},v}function i(){const h=new t,v=e.derive(h);let f=0;v.accept=(m,E,w)=>!0,v.jsonpSend=m=>{const E=document.getElementsByTagName("head")[0],w=document.createElement("script"),I="_cometd_jsonp_"+f++;window[I]=R=>{E.removeChild(w),delete window[I],m.onSuccess(R)};let M=m.url;M+=M.indexOf("?")<0?"?":"&",M+="jsonp="+I,M+="&message="+encodeURIComponent(m.body),w.src=M,w.async=m.sync!==!0,w.type="application/javascript",w.onerror=R=>{m.onError("jsonp "+R.type)},E.appendChild(w)};function g(m,E,w){return()=>{this.transportFailure(m,E,"error",w)}}return v.transportSend=function(m,E){let w=0,I=m.messages.length;const M=[];for(;I>0;){const T=JSON.stringify(m.messages.slice(w,w+I)),N=m.url.length+encodeURI(T).length,F=this.getConfiguration().maxURILength;if(N>F){if(I===1){const y="Bayeux message too big ("+N+" bytes, max is "+F+") for transport "+this.getType();this.setTimeout(g.call(this,m,E,y),0);return}--I;continue}M.push(I),w+=I,I=m.messages.length-w}let R=m;if(M.length>1){let T=0,N=M[0];this._debug("Transport",this.getType(),"split",m.messages.length,"messages into",M.join(" + ")),R=this._mixin(!1,{},m),R.messages=m.messages.slice(T,N),R.onSuccess=m.onSuccess,R.onFailure=m.onFailure;for(let F=1;F{let F=!1;try{const y=this.convertToMessages(N);y.length===0?this.transportFailure(R,E,{httpCode:204}):(F=!0,this.transportSuccess(R,E,y))}catch(y){this._debug(y),F||this.transportFailure(R,E,{exception:y})}},onError:(N,F)=>{const y={reason:N,exception:F};T?this.setTimeout(()=>{this.transportFailure(R,E,y)},0):this.transportFailure(R,E,y)}}),T=!1,!0}catch(T){return this.setTimeout(()=>{this.transportFailure(R,E,{exception:T})},0),!1}},v}function s(){const h=new e,v=e.derive(h);let f,g=!0,m=!1,E=!0,w=null,I=null,M=!1,R=null;v.reset=j=>{h.reset(j),g=!0,j&&(m=!1),E=!0,j&&(w=null),I=null,M=!1};function T(j,H){j&&(this.webSocketClose(j,H.code,H.reason),this.onClose(j,H))}function N(j){return j===I||j===w}function F(j,H,K){const $=[];for(let V=0;V=0){K=!0,Z.splice(Y,1);const Q=$[X][0],q=$[X][1];delete $[X],Z.length>0&&($[Z.join(",")]=[Q,q]);break}}}K&&this._debug("Transport",this.getType(),"removed envelope, envelopes",$)}function x(j){if(I)return;const H=f.getURL().replace(/^http/,"ws");this._debug("Transport",this.getType(),"connecting to URL",H);try{const X=f.getConfiguration().protocol;j.webSocket=X?new window.WebSocket(H,X):new window.WebSocket(H),I=j}catch(X){throw g=!1,this._debug("Exception while creating WebSocket object",X),X}E=f.getConfiguration().stickyReconnect!==!1;const K=f.getConfiguration().connectTimeout;K>0&&(j.connectTimer=this.setTimeout(()=>{f._debug("Transport",this.getType(),"timed out while connecting to URL",H,":",K,"ms"),T.call(this,j,{code:1e3,reason:"Connect Timeout"})},K));const $=()=>{f._debug("WebSocket onopen",j),j.connectTimer&&this.clearTimeout(j.connectTimer),N(j)?(I=null,w=j,m=!0,this.onOpen(j)):(f._warn("Closing extra WebSocket connection",this,"active connection",w),T.call(this,j,{code:1e3,reason:"Extra Connection"}))},V=X=>{X=X||{code:1e3},f._debug("WebSocket onclose",j,X,"connecting",I,"current",w),j.connectTimer&&this.clearTimeout(j.connectTimer),this.onClose(j,X)},z=X=>{f._debug("WebSocket onmessage",X,j),this.onMessage(j,X)};j.webSocket.onopen=$,j.webSocket.onclose=V,j.webSocket.onerror=()=>{V({code:1e3,reason:"Error"})},j.webSocket.onmessage=z,this._debug("Transport",this.getType(),"configured callbacks on",j)}function O(j,H,K){const $=this._notifyTransportTimeout([H]);$>0?(this._debug("Transport",this.getType(),"extended waiting for message replies:",$,"ms"),j.timeouts[H.id]=this.setTimeout(()=>{O.call(this,j,H,K+$)},$)):(this._debug("Transport",this.getType(),"expired waiting for message reply",H.id,":",K,"ms"),T.call(this,j,{code:1e3,reason:"Message Timeout"}))}function L(j,H,K){let $;try{$=this.convertToJSON(H.messages)}catch(X){this._debug("Transport",this.getType(),"exception:",X);const Z=[];for(let Y=0;Y{this._notifyFailure(H.onFailure,j,H.messages,{exception:X})},0);return}j.webSocket.send($),this._debug("Transport",this.getType(),"sent",H,"/meta/connect =",K);let V=this.getConfiguration().maxNetworkDelay;K&&(V+=this.getAdvice().timeout,M=!0);const z=[];for(let X=0;X{O.call(this,j,Z,V)},V))}this._debug("Transport",this.getType(),"started waiting for message replies",V,"ms, messageIds:",z,", timeouts:",j.timeouts)}v._notifySuccess=function(j,H){j.call(this,H)},v._notifyFailure=function(j,H,K,$){j.call(this,H,K,$)};function W(j,H,K){try{j===null?(j=I||{envelopes:{},timeouts:{}},F.call(this,j,H,K),x.call(this,j)):(F.call(this,j,H,K),L.call(this,j,H,K))}catch($){this.setTimeout(()=>{T.call(this,j,{code:1e3,reason:"Exception",exception:$})},0)}}return v.onOpen=function(j){const H=j.envelopes;this._debug("Transport",this.getType(),"opened",j,"pending messages",H);for(let K in H)if(H.hasOwnProperty(K)){const $=H[K],V=$[0],z=$[1];R=V.onSuccess,L.call(this,j,V,z)}},v.onMessage=function(j,H){this._debug("Transport",this.getType(),"received websocket message",H,j);let K=!1;const $=this.convertToMessages(H.data),V=[];for(let z=0;z<$.length;++z){const X=$[z];if((/^\/meta\//.test(X.channel)||X.data===void 0)&&X.id){V.push(X.id);const Z=j.timeouts[X.id];Z&&(this.clearTimeout(Z),delete j.timeouts[X.id],this._debug("Transport",this.getType(),"removed timeout for message",X.id,", timeouts",j.timeouts))}X.channel==="/meta/connect"&&(M=!1),X.channel==="/meta/disconnect"&&!M&&(K=!0)}y.call(this,j,V),this._notifySuccess(R,$),K&&this.webSocketClose(j,1e3,"Disconnect")},v.onClose=function(j,H){this._debug("Transport",this.getType(),"closed",j,H),N(j)&&(g=E&&m,I=null,w=null);const K=j.timeouts;j.timeouts={};for(let V in K)K.hasOwnProperty(V)&&this.clearTimeout(K[V]);const $=j.envelopes;j.envelopes={};for(let V in $)if($.hasOwnProperty(V)){const z=$[V][0];$[V][1]&&(M=!1);const Z={websocketCode:H.code,reason:H.reason};H.exception&&(Z.exception=H.exception),this._notifyFailure(z.onFailure,j,z.messages,Z)}},v.registered=(j,H)=>{h.registered(j,H),f=H},v.accept=function(j,H,K){return this._debug("Transport",this.getType(),"accept, supported:",g),g&&!!window.WebSocket&&f.websocketEnabled!==!1},v.send=function(j,H){this._debug("Transport",this.getType(),"sending",j,"/meta/connect =",H),W.call(this,w,j,H)},v.webSocketClose=function(j,H,K){try{j.webSocket&&j.webSocket.close(H,K)}catch($){this._debug($)}},v.abort=function(){h.abort(),T.call(this,w,{code:1e3,reason:"Abort"}),this.reset(!0)},v}function a(h){const v=new A,f=this,g=h||"default";let m=!1;const E=new n;let w,I="disconnected",M=0,R=null,T=0,N=[],F=!1,y=0,x={};const O={};let L=0,W=null;const j=[];let H={},K,$;const V={},z={};let X=!1,Z=!1,Y=0,Q=0,q=null,ee={useWorkerScheduler:!0,protocol:null,stickyReconnect:!0,connectTimeout:0,maxConnections:2,backoffIncrement:1e3,maxBackoff:6e4,logLevel:"info",maxNetworkDelay:1e4,requestHeaders:{},appendMessageTypeToURL:!0,autoBatch:!1,urls:{},maxURILength:2e3,maxSendBayeuxMessageSize:8192,advice:{timeout:6e4,interval:0,reconnect:void 0,maxInterval:0}};function oe(te,Ee){try{return te[Ee]}catch(ne){return}}this._mixin=function(te,Ee,ne){const ae=Ee||{};for(let de=2;de="A"&&te<="Z"?!0:te>="a"&&te<="z"}function fe(te){return te>="0"&&te<="9"}function le(te){switch(te){case" ":case"!":case"#":case"$":case"(":case")":case"*":case"+":case"-":case".":case"/":case"@":case"_":case"{":case"~":case"}":case":":case"\\":case",":return!0;default:return!1}}function ie(te){if(!se(te)||te.length<2||te.charAt(0)!=="/")return!1;for(let Ee=1;Ee0&&!(te>=Math.pow(10,Ee));)ne+="0";return ne+=te,ne}function ve(te,Ee){if(window.console){const ne=window.console[te];if(re(ne)){const ae=new Date;[].splice.call(Ee,0,0,ce(ae.getHours(),2)+":"+ce(ae.getMinutes(),2)+":"+ce(ae.getSeconds(),2)+"."+ce(ae.getMilliseconds(),3)),ne.apply(window.console,Ee)}}}this._warn=function(){ve("warn",arguments)},this._info=function(){ee.logLevel!=="warn"&&ve("info",arguments)},this._debug=function(){ee.logLevel==="debug"&&ve("debug",arguments)};function ge(te){return new RegExp("(^https?://)?(((\\[[^\\]]+])|([^:/?#]+))(:(\\d+))?)?([^?#]*)(.*)?").exec(te)}this._isCrossDomain=te=>window.location&&window.location.host&&te?te!==window.location.host:!1;function Te(te){f._debug("Configuring cometd object with",te),se(te)&&(te={url:te}),te||(te={}),ee=f._mixin(!1,ee,te);const Ee=f.getURL();if(!Ee)throw"Missing required configuration parameter 'url' specifying the Bayeux server URL";const ne=ge(Ee),ae=ne[2],de=ne[8],De=ne[9];if(m=f._isCrossDomain(ae),ee.appendMessageTypeToURL)if(De!==void 0&&De.length>0)f._info("Appending message type to URI "+de+De+" is not supported, disabling 'appendMessageTypeToURL' configuration"),ee.appendMessageTypeToURL=!1;else{const be=de.split("/");let Be=be.length-1;de.match(/\/$/)&&(Be-=1),be[Be].indexOf(".")>=0&&(f._info("Appending message type to URI "+de+" is not supported, disabling 'appendMessageTypeToURL' configuration"),ee.appendMessageTypeToURL=!1)}if(window.Worker&&window.Blob&&window.URL&&ee.useWorkerScheduler){let be=p.toString();be=be.substring(be.indexOf("{")+1,be.lastIndexOf("}"));const Be=new window.Blob([be],{type:"application/json"}),Oe=window.URL.createObjectURL(Be),ke=new window.Worker(Oe);v.setTimeout=(Ze,ut)=>{const Xe=v.register(Ze);return ke.postMessage({id:Xe,type:"setTimeout",delay:ut}),Xe},v.clearTimeout=Ze=>{v.unregister(Ze),ke.postMessage({id:Ze,type:"clearTimeout"})},ke.onmessage=Ze=>{const ut=Ze.data.id,Xe=v.unregister(ut);Xe&&Xe()}}}function Pe(te){if(te){const Ee=x[te.channel];Ee&&Ee[te.id]&&(delete Ee[te.id],f._debug("Removed",te.listener?"listener":"subscription",te))}}function Le(te){te&&!te.listener&&Pe(te)}function ct(){for(let te in x)if(x.hasOwnProperty(te)){const Ee=x[te];if(Ee)for(let ne in Ee)Ee.hasOwnProperty(ne)&&Le(Ee[ne])}}function st(te){I!==te&&(f._debug("Status",I,"->",te),I=te)}function ot(){return I==="disconnecting"||I==="disconnected"}function nt(){return""+ ++M}function Rt(te,Ee,ne,ae,de){try{return Ee.call(te,ae)}catch(De){const be=f.onExtensionException;if(re(be)){f._debug("Invoking extension exception handler",ne,De);try{be.call(f,De,ne,de,ae)}catch(Be){f._info("Exception during execution of extension exception handler",ne,Be)}}else f._info("Exception during execution of extension",ne,De);return ae}}function Yt(te){for(let Ee=0;Ee=0&&te!=null;--Ee){const ne=j[Ee],ae=ne.extension.outgoing;if(re(ae)){const de=Rt(ne.extension,ae,ne.name,te,!0);te=de===void 0?te:de}}return te}function Ft(te,Ee){const ne=x[te];if(ne){for(let ae in ne)if(ne.hasOwnProperty(ae)){const de=ne[ae];if(de)try{de.callback.call(de.scope,Ee)}catch(De){const be=f.onListenerException;if(re(be)){f._debug("Invoking listener exception handler",de,De);try{be.call(f,De,de,de.listener,Ee)}catch(Be){f._info("Exception during execution of listener exception handler",de,Be)}}else f._info("Exception during execution of listener",de,Ee,De)}}}}function Bt(te,Ee){Ft(te,Ee);const ne=te.split("/"),ae=ne.length-1;for(let de=ae;de>0;--de){let De=ne.slice(0,de).join("/")+"/*";de===ae&&Ft(De,Ee),De+="*",Ft(De,Ee)}}function me(){W!==null&&f.clearTimeout(W),W=null}function Ne(te,Ee){me();const ne=H.interval+Ee;f._debug("Function scheduled in",ne,"ms, interval =",H.interval,"backoff =",L,te),W=f.setTimeout(te,ne)}let Ve,et;function ze(te,Ee,ne){for(let De=0;De{try{Ve.call(f,De)}catch(be){f._info("Exception during handling of messages",be)}},onFailure:(De,be,Be)=>{try{const Oe=f.getTransport();Be.connectionType=Oe?Oe.getType():"unknown",et.call(f,De,be,Be)}catch(Oe){f._info("Exception during handling of failure",Oe)}}};f._debug("Send",de),w.send(de,Ee)}function pt(te){T>0||F===!0?N.push(te):ze([te],!1)}this.send=pt;function Et(){L=0}function It(){return L0&&ze(te,!1)}function cr(){if(--T,f._debug("Ending batch, depth",T),T<0)throw"Calls to startBatch() and endBatch() are not paired";T===0&&!ot()&&!F&&Vt()}function wn(){if(!ot()){const te={id:nt(),channel:"/meta/connect",connectionType:w.getType()};Z||(te.advice={timeout:0}),st("connecting"),f._debug("Connect sent",te),ze([te],!0,"connect"),st("connected")}}function On(te){st("connecting"),Ne(()=>{wn()},te)}function Ln(te){te&&(H=f._mixin(!1,{},ee.advice,te),f._debug("New advice",H))}function yn(te){if(me(),te&&w&&w.abort(),m=!1,w=null,st("disconnected"),R=null,T=0,Et(),X=!1,Z=!1,Y=0,q=null,N.length>0){const Ee=N;N=[],et.call(f,void 0,Ee,{reason:"Disconnected"})}}function or(te,Ee,ne){const ae=f.onTransportException;if(re(ae)){f._debug("Invoking transport exception handler",te,Ee,ne);try{ae.call(f,ne,te,Ee)}catch(de){f._info("Exception during execution of transport exception handler",de)}}}function cn(te,Ee){re(te)&&(Ee=te,te=void 0),R=null,ct(),ot()&&E.reset(!0),Ln({}),T=0,F=!0,K=te,$=Ee;const ne="1.0",ae=f.getURL(),de=E.findTransportTypes(ne,m,ae),De={id:nt(),version:ne,minimumVersion:ne,channel:"/meta/handshake",supportedConnectionTypes:de,advice:{timeout:H.timeout,interval:H.interval}},be=f._mixin(!1,{},K,De);if(f._putCallback(be.id,Ee),!w&&(w=E.negotiateTransport(de,ne,m,ae),!w)){const Be="Could not find initial transport among: "+E.getTransportTypes();throw f._warn(Be),Be}f._debug("Initial transport is",w.getType()),st("handshaking"),f._debug("Handshake sent",be),ze([be],!1,"handshake")}function wr(te){st("handshaking"),F=!0,Ne(()=>{cn(K,$)},te)}function Kn(te,Ee){try{te.call(f,Ee)}catch(ne){const ae=f.onCallbackException;if(re(ae)){f._debug("Invoking callback exception handler",ne);try{ae.call(f,ne,Ee)}catch(de){f._info("Exception during execution of callback exception handler",de)}}else f._info("Exception during execution of message callback",ne)}}this._getCallback=te=>V[te],this._putCallback=function(te,Ee){const ne=this._getCallback(te);return re(Ee)&&(V[te]=Ee),ne};function sn(te){const Ee=f._getCallback([te.id]);re(Ee)&&(delete V[te.id],Kn(Ee,te))}function Xn(te){const Ee=z[te.id];if(delete z[te.id],Ee){f._debug("Handling remote call response for",te,"with context",Ee);const ne=Ee.timeout;ne&&f.clearTimeout(ne);const ae=Ee.callback;if(re(ae))return Kn(ae,te),!0}return!1}this.onTransportFailure=function(te,Ee,ne){this._debug("Transport failure",Ee,"for",te);const ae=this.getTransportRegistry(),de=this.getURL(),De=this._isCrossDomain(ge(de)[2]),be="1.0",Be=ae.findTransportTypes(be,De,de);if(Ee.action==="none"){if(te.channel==="/meta/handshake"&&!Ee.transport){const Oe="Could not negotiate transport, client=["+Be+"], server=["+te.supportedConnectionTypes+"]";this._warn(Oe),or(w.getType(),null,{reason:Oe,connectionType:w.getType(),transport:w})}}else if(Ee.delay=this.getBackoffPeriod(),te.channel==="/meta/handshake"){if(!Ee.transport){const Oe=w?w.getType():null,ke=ae.negotiateTransport(Be,be,De,de);if(!ke)this._warn("Could not negotiate transport, client=["+Be+"]"),or(Oe,null,te.failure),Ee.action="none";else{const Ze=ke.getType();this._debug("Transport",Oe,"->",Ze),or(Oe,Ze,te.failure),Ee.action="handshake",Ee.transport=ke}}Ee.action!=="none"&&this.increaseBackoffPeriod()}else{const Oe=new Date().getTime();if(Y===0&&(Y=Oe),Ee.action==="retry"){Ee.delay=this.increaseBackoffPeriod();const ke=H.maxInterval;if(ke>0){const Ze=H.timeout+H.interval+ke;Oe-Y+L>Ze&&(Ee.action="handshake")}}Ee.action==="handshake"&&(Ee.delay=0,ae.reset(!1),this.resetBackoffPeriod())}ne.call(f,Ee)};function er(te){f._debug("Transport failure handling",te),te.transport&&(w=te.transport),te.url&&w.setURL(te.url);const Ee=te.action,ne=te.delay||0;switch(Ee){case"handshake":wr(ne);break;case"retry":On(ne);break;case"none":yn(!0);break;default:throw"Unknown action "+Ee}}function Un(te,Ee){sn(te),Bt("/meta/handshake",te),Bt("/meta/unsuccessful",te),ot()&&(Ee.action="none"),f.onTransportFailure.call(f,te,Ee,er)}function ye(te){const Ee=f.getURL();if(te.successful){const ne=f._isCrossDomain(ge(Ee)[2]),ae=E.negotiateTransport(te.supportedConnectionTypes,te.version,ne,Ee);if(ae===null){te.successful=!1,Un(te,{cause:"negotiation",action:"none",transport:null});return}else w!==ae&&(f._debug("Transport",w.getType(),"->",ae.getType()),w=ae);R=te.clientId,F=!1,Vt(),te.reestablish=X,X=!0,sn(te),Bt("/meta/handshake",te),Q=te["x-messages"]||0;const de=ot()?"none":H.reconnect||"retry";switch(de){case"retry":Et(),Q===0?On(0):f._debug("Processing",Q,"handshake-delivered messages");break;case"none":yn(!0);break;default:throw"Unrecognized advice action "+de}}else Un(te,{cause:"unsuccessful",action:H.reconnect||"handshake",transport:w})}function Ce(te){Un(te,{cause:"failure",action:"handshake",transport:null})}function Ie(te){return I==="disconnected"?!0:q&&q.id===te.id?(q=null,!0):!1}function Ke(te,Ee){Bt("/meta/connect",te),Bt("/meta/unsuccessful",te),ot()&&(Ee.action="none"),f.onTransportFailure.call(f,te,Ee,er)}function Je(te){if(Ie(te))if(Z=te.successful,Z){Bt("/meta/connect",te);const Ee=ot()?"none":H.reconnect||"retry";switch(Ee){case"retry":Et(),On(L);break;case"none":yn(!1);break;default:throw"Unrecognized advice action "+Ee}}else Ke(te,{cause:"unsuccessful",action:H.reconnect||"retry",transport:w});else f._debug("Mismatched /meta/connect reply",te)}function Qe(te){Ie(te)?(Z=!1,Ke(te,{cause:"failure",action:"retry",transport:null})):f._debug("Mismatched /meta/connect failure",te)}function Ge(te){yn(!0),sn(te),Bt("/meta/disconnect",te),Bt("/meta/unsuccessful",te)}function dt(te){te.successful?(yn(!1),sn(te),Bt("/meta/disconnect",te)):Ge(te)}function mt(te){Ge(te)}function Dt(te){const Ee=x[te.subscription];if(Ee){for(let ne in Ee)if(Ee.hasOwnProperty(ne)){const ae=Ee[ne];ae&&!ae.listener&&(delete Ee[ne],f._debug("Removed failed subscription",ae))}}sn(te),Bt("/meta/subscribe",te),Bt("/meta/unsuccessful",te)}function bt(te){te.successful?(sn(te),Bt("/meta/subscribe",te)):Dt(te)}function qt(te){Dt(te)}function $t(te){sn(te),Bt("/meta/unsubscribe",te),Bt("/meta/unsuccessful",te)}function Ht(te){te.successful?(sn(te),Bt("/meta/unsubscribe",te)):$t(te)}function Mt(te){$t(te)}function wt(te){Xn(te)||(sn(te),Bt("/meta/publish",te),Bt("/meta/unsuccessful",te))}function At(te){te.data!==void 0?Xn(te)||(Bt(te.channel,te),Q>0&&(--Q,Q===0&&(f._debug("Processed last handshake-delivered message"),On(0)))):te.successful===void 0?f._warn("Unknown Bayeux Message",te):te.successful?(sn(te),Bt("/meta/publish",te)):wt(te)}function it(te){wt(te)}function Ot(te){if(Y=0,te=Yt(te),te==null)return;switch(Ln(te.advice),te.channel){case"/meta/handshake":ye(te);break;case"/meta/connect":Je(te);break;case"/meta/disconnect":dt(te);break;case"/meta/subscribe":bt(te);break;case"/meta/unsubscribe":Ht(te);break;default:At(te);break}}this.receive=Ot,Ve=te=>{f._debug("Received",te);for(let Ee=0;Ee{f._debug("handleFailure",te,Ee,ne),ne.transport=te;for(let ae=0;ae{E.clear()},this.getTransportTypes=()=>E.getTransportTypes(),this.findTransport=te=>E.find(te),this.getTransportRegistry=()=>E,this.configure=function(te){Te.call(this,te)},this.init=function(te,Ee){this.configure(te),this.handshake(Ee)},this.handshake=(te,Ee)=>{if(I!=="disconnected")throw"Illegal state: handshaken";cn(te,Ee)},this.disconnect=function(te,Ee){if(ot())return;re(te)&&(Ee=te,te=void 0);const ne={id:nt(),channel:"/meta/disconnect"},ae=this._mixin(!1,{},te,ne);f._putCallback(ae.id,Ee),st("disconnecting"),ze([ae],!1,"disconnect")},this.startBatch=()=>{Nt()},this.endBatch=()=>{cr()},this.batch=function(te,Ee){const ne=Se(te,Ee);this.startBatch();try{ne.method.call(ne.scope),this.endBatch()}catch(ae){throw this._info("Exception during execution of batch",ae),this.endBatch(),ae}},this.addTransportListener=(te,Ee)=>{if(te!=="timeout")throw"Unsupported event "+te;let ne=O[te];ne||(O[te]=ne=[]),ne.push(Ee)},this.removeTransportListener=(te,Ee)=>{const ne=O[te];if(ne){const ae=ne.indexOf(Ee);if(ae>=0)return ne.splice(ae,1),!0}return!1},this._getTransportListeners=te=>O[te],this.addListener=function(te,Ee,ne){if(arguments.length<2)throw"Illegal arguments number: required 2, got "+arguments.length;if(!se(te))throw"Illegal argument type: channel must be a string";return Tt(te,Ee,ne,!0)},this.removeListener=te=>{if(!te||!te.channel||!("id"in te))throw"Invalid argument: expected subscription, not "+te;Pe(te)},this.clearListeners=()=>{x={}},this.subscribe=function(te,Ee,ne,ae,de){if(arguments.length<2)throw"Illegal arguments number: required 2, got "+arguments.length;if(!ie(te))throw"Illegal argument: invalid channel "+te;if(ot())throw"Illegal state: disconnected";re(Ee)&&(de=ae,ae=ne,ne=Ee,Ee=void 0),re(ae)&&(de=ae,ae=void 0);const De=!en(te),be=Tt(te,Ee,ne,!1);if(De){const Be={id:nt(),channel:"/meta/subscribe",subscription:te},Oe=this._mixin(!1,{},ae,Be);f._putCallback(Oe.id,de),pt(Oe)}else re(de)&&f.setTimeout(()=>{Kn(de,{id:nt(),successful:!0,channel:"/meta/subscribe",subscription:te})},0);return be},this.unsubscribe=function(te,Ee,ne){if(arguments.length<1)throw"Illegal arguments number: required 1, got "+arguments.length;if(ot())throw"Illegal state: disconnected";re(Ee)&&(ne=Ee,Ee=void 0),this.removeListener(te);const ae=te.channel;if(en(ae))re(ne)&&f.setTimeout(()=>{Kn(ne,{id:nt(),successful:!0,channel:"/meta/unsubscribe",subscription:ae})},0);else{const de={id:nt(),channel:"/meta/unsubscribe",subscription:ae},De=this._mixin(!1,{},Ee,de);f._putCallback(De.id,ne),pt(De)}},this.resubscribe=function(te,Ee){if(Le(te),te)return this.subscribe(te.channel,te.scope,te.callback,Ee)},this.clearSubscriptions=()=>{ct()},this.publish=function(te,Ee,ne,ae){if(arguments.length<1)throw"Illegal arguments number: required 1, got "+arguments.length;if(!ie(te))throw"Illegal argument: invalid channel "+te;if(/^\/meta\//.test(te))throw"Illegal argument: cannot publish to meta channels";if(ot())throw"Illegal state: disconnected";re(Ee)?(ae=Ee,Ee={},ne=void 0):re(ne)&&(ae=ne,ne=void 0);const de={id:nt(),channel:te,data:Ee},De=this._mixin(!1,{},ne,de);f._putCallback(De.id,ae),pt(De)},this.publishBinary=function(te,Ee,ne,ae,de,De){re(Ee)?(De=Ee,Ee=new ArrayBuffer(0),ne=!0,ae=void 0,de=void 0):re(ne)?(De=ne,ne=!0,ae=void 0,de=void 0):re(ae)?(De=ae,ae=void 0,de=void 0):re(de)&&(De=de,de=void 0);const be={meta:ae,data:Ee,last:ne},Be=this._mixin(!1,de,{ext:{binary:{}}});this.publish(te,be,Be,De)},this.remoteCall=function(te,Ee,ne,ae,de){if(arguments.length<1)throw"Illegal arguments number: required 1, got "+arguments.length;if(!se(te))throw"Illegal argument type: target must be a string";if(ot())throw"Illegal state: disconnected";if(re(Ee)?(de=Ee,Ee={},ne=ee.maxNetworkDelay,ae=void 0):re(ne)?(de=ne,ne=ee.maxNetworkDelay,ae=void 0):re(ae)&&(de=ae,ae=void 0),typeof ne!="number")throw"Illegal argument type: timeout must be a number";te.match(/^\//)||(te="/"+te);const De="/service"+te;if(!ie(De))throw"Illegal argument: invalid target "+te;const be={id:nt(),channel:De,data:Ee},Be=this._mixin(!1,{},ae,be),Oe={callback:de};ne>0&&(Oe.timeout=f.setTimeout(()=>{f._debug("Timing out remote call",Be,"after",ne,"ms"),wt({id:Be.id,error:"406::timeout",successful:!1,failure:{message:Be,reason:"Remote Call Timeout"}})},ne),f._debug("Scheduled remote call timeout",Be,"in",ne,"ms")),z[Be.id]=Oe,pt(Be)},this.remoteCallBinary=function(te,Ee,ne,ae,de,De,be){re(Ee)?(be=Ee,Ee=new ArrayBuffer(0),ne=!0,ae=void 0,de=ee.maxNetworkDelay,De=void 0):re(ne)?(be=ne,ne=!0,ae=void 0,de=ee.maxNetworkDelay,De=void 0):re(ae)?(be=ae,ae=void 0,de=ee.maxNetworkDelay,De=void 0):re(de)?(be=de,de=ee.maxNetworkDelay,De=void 0):re(De)&&(be=De,De=void 0);const Be={meta:ae,data:Ee,last:ne},Oe=this._mixin(!1,De,{ext:{binary:{}}});this.remoteCall(te,Be,de,Oe,be)},this.getStatus=()=>I,this.isDisconnected=ot,this.setBackoffIncrement=te=>{ee.backoffIncrement=te},this.getBackoffIncrement=()=>ee.backoffIncrement,this.getBackoffPeriod=()=>L,this.increaseBackoffPeriod=()=>It(),this.resetBackoffPeriod=()=>{Et()},this.setLogLevel=te=>{ee.logLevel=te},this.registerExtension=function(te,Ee){if(arguments.length<2)throw"Illegal arguments number: required 2, got "+arguments.length;if(!se(te))throw"Illegal argument type: extension name must be a string";let ne=!1;for(let ae=0;ae{for(let Ee=0;Eeg,this.getClientId=()=>R,this.getURL=()=>{if(w){let te=w.getURL();if(te||(te=ee.urls[w.getType()],te))return te}return ee.url},this.getTransport=()=>w,this.getConfiguration=function(){return this._mixin(!0,{},ee)},this.getAdvice=function(){return this._mixin(!0,{},H)},this.setTimeout=(te,Ee)=>v.setTimeout(()=>{try{f._debug("Invoking timed function",te),te()}catch(ne){f._debug("Exception invoking timed function",te,ne)}},Ee),this.clearTimeout=te=>{v.clearTimeout(te)},window.WebSocket&&this.registerTransport("websocket",new s),this.registerTransport("long-polling",new r),this.registerTransport("callback-polling",new i)}const o=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",".","-",":","+","=","^","!","/","*","?","&","<",">","(",")","[","]","{","}","@","%","$","#"],u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],c={encode:h=>{let v=null;if(h instanceof ArrayBuffer?v=h:h.buffer instanceof ArrayBuffer?v=h.buffer:Array.isArray(h)&&(v=new Uint8Array(h).buffer),v==null)throw"Cannot Z85 encode "+h;const f=v.byteLength,g=f%4,m=4-(g===0?4:g),E=new DataView(v);let w="",I=0;for(let M=0;M=f;if(I=I*256+(R?0:E.getUint8(M)),(M+1)%4===0){let T=52200625;for(let N=5;N>0;--N){if(!R||N>m){const F=Math.floor(I/T)%85;w+=o[F]}T/=85}I=0}}return w},decode:h=>{const v=h.length%5,f=5-(v===0?5:v);for(let R=0;R=1;)M{var b,S;b=[l(57987),l(74786),l(7835),l(86560),l(80675),l(95702),l(78013),l(65874),l(60493),l(18203),l(78602)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r,i){r("mozilla","opera","webkit","ie","ie-6","ie-6-7","quirks","no-quirks","touch");var s="dgrid-row-odd",a="dgrid-row-even",o,u;function c(T){return document.getElementById(T)}function h(T){T.className="",document.body.removeChild(T)}function v(T,N){i(document.body,T,".dgrid-scrollbar-measure");var F=T["offset"+N]-T["client"+N];return h(T),F}n.add("dom-scrollbar-width",function(T,N,F){return v(F,"Width")}),n.add("dom-scrollbar-height",function(T,N,F){return v(F,"Height")}),n.add("dom-rtl-scrollbar-left",function(T,N,F){var y=i("div"),x;return i(document.body,F,".dgrid-scrollbar-measure[dir=rtl]"),i(F,y),x=!!n("ie")||!!n("trident")||y.offsetLeft>=n("dom-scrollbar-width"),h(F),i(y,"!"),F.removeAttribute("dir"),x});var f=0;function g(){return"dgrid_"+f++}var m=/ +/g;function E(T){var N=T?"."+T.replace(m,"."):"";this._class&&(N="!"+this._class.replace(m,"!")+N),i(this.domNode,N),this._class=T}function w(){return this._class}var I=n("ie")<7&&!n("quirks")?function(){var T,N,F,y;this._started&&(T=document.documentElement,N=T.clientWidth,F=T.clientHeight,y=this._prevWinDims||[],(y[0]!==N||y[1]!==F)&&(this.resize(),this._prevWinDims=[N,F]))}:function(){this._started&&this.resize()};function M(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}}function R(T){typeof T.x<"u"&&(this.bodyNode.scrollLeft=T.x),typeof T.y<"u"&&(this.bodyNode.scrollTop=T.y)}return A(n("touch")?t:null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,useTouchScroll:null,addUiClasses:!0,cleanEmptyObservers:!0,highlightDuration:250,postscript:function(T,N){var F=this;(this._Row=function(y,x,O){this.id=y,this.data=x,this.element=O}).prototype.remove=function(){F.removeRow(this.element)},N&&(this.srcNodeRef=N=N.nodeType?N:c(N)),this.create(T,N)},listType:"list",create:function(T,N){var F=this.domNode=N||i("div"),y;T?(this.params=T,A.safeMixin(this,T),y=T.class||T.className||F.className,this._sort=T.sort||[],delete this.sort):this._sort=[],this.observers=[],this._numObservers=0,this._listeners=[],this._rowIdToObject={},this.postMixInProperties&&this.postMixInProperties(),this.id=F.id=F.id||this.id||g(),this.useTouchScroll===null&&(this.useTouchScroll=!n("dom-scrollbar-width")),this.buildRendering(),y&&E.call(this,y),this.postCreate(),delete this.srcNodeRef,this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var T=this.domNode,N=this.addUiClasses,F=this,y,x,O,L,W;W=this.isRTL=(document.body.dir||document.documentElement.dir||document.body.style.direction).toLowerCase()=="rtl",T.className="",i(T,"[role=grid].dgrid.dgrid-"+this.listType+(N?".ui-widget":"")),y=this.headerNode=i(T,"div.dgrid-header.dgrid-header-row"+(N?".ui-widget-header":"")+(this.showHeader?"":".dgrid-header-hidden")),(n("quirks")||n("ie")<8)&&(x=i(T,"div.dgrid-spacer")),O=this.bodyNode=i(T,"div.dgrid-scroller"),n("ff")&&(O.tabIndex=-1),this.headerScrollNode=i(T,"div.dgrid-header.dgrid-header-scroll.dgrid-scrollbar-width"+(N?".ui-widget-header":"")),L=this.footerNode=i("div.dgrid-footer"+(this.showFooter?"":".dgrid-footer-hidden")),i(T,L),W&&(T.className+=" dgrid-rtl"+(n("dom-rtl-scrollbar-left")?" dgrid-rtl-swap":"")),d(O,"scroll",function(j){F.showHeader&&(y.scrollLeft=j.scrollLeft||O.scrollLeft),j.stopPropagation(),d.emit(T,"scroll",{scrollTarget:O})}),this.configStructure(),this.renderHeader(),this.contentNode=this.touchNode=i(this.bodyNode,"div.dgrid-content"+(N?".ui-widget-content":"")),this._listeners.push(this._resizeHandle=d(window,"resize",e.throttleDelayed(I,this)))},postCreate:n("touch")?function(){this.useTouchScroll&&this.inherited(arguments)}:function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this._sort))},configStructure:function(){},resize:function(){var T=this.bodyNode,N=this.headerNode,F=this.footerNode,y=N.offsetHeight,x=this.showFooter?F.offsetHeight:0,O=n("quirks")||n("ie")<7;this.headerScrollNode.style.height=T.style.marginTop=y+"px",T.style.marginBottom=x+"px",O&&(T.style.height="",T.style.height=Math.max(this.domNode.offsetHeight-y-x,0)+"px",x&&(F.style.bottom="1px",setTimeout(function(){F.style.bottom=""},0))),o||(o=n("dom-scrollbar-width"),u=n("dom-scrollbar-height"),n("ie")&&(o++,u++),e.addCssRule(".dgrid-scrollbar-width","width: "+o+"px"),e.addCssRule(".dgrid-scrollbar-height","height: "+u+"px"),o!=17&&!O&&(e.addCssRule(".dgrid-header-row","right: "+o+"px"),e.addCssRule(".dgrid-rtl-swap .dgrid-header-row","left: "+o+"px"))),O&&(N.style.width=T.clientWidth+"px",setTimeout(function(){N.scrollLeft=T.scrollLeft},0))},addCssRule:function(T,N){var F=e.addCssRule(T,N);return this.cleanAddedRules&&this._listeners.push(F),F},on:function(T,N){var F=d(this.domNode,T,N);return n("dom-addeventlistener")||this._listeners.push(F),F},cleanup:function(){var T=this.observers,N;for(N in this._rowIdToObject)if(this._rowIdToObject[N]!=this.columns){var F=c(N);F&&this.removeRow(F,!0)}for(N=0;N-1)do N.rowIndex>-1&&(this.maintainOddEven&&(N.className+" ").indexOf("dgrid-row ")>-1&&i(N,"."+(F%2==1?s:a)+"!"+(F%2==0?s:a)),N.rowIndex=F++);while((N=N.nextSibling)&&N.rowIndex!=F)},renderArray:function(T,N,F){F=F||{};var y=this,x=F.start||0,O=this.observers,L,W,j;if(N||(this._lastCollection=T),T.observe){y._numObservers++;var H=T.observe(function(oe,se,he){var fe,le,ie,re;function ce(){ie=(ie.connected||ie).nextSibling}if(se>-1&&L[se]&&(fe=L.splice(se,1)[0],fe.parentNode==W&&(le=fe.nextSibling,le&&se!=he&&le.rowIndex--,y.removeRow(fe)),F.count--,y._processScroll&&y._processScroll()),he>-1){if(L.length?he===0?(ie=L[he],ie=ie&&z(ie)):(ie=L[he-1],ie&&(ie=z(ie),ce())):ie=y._getFirstRowSibling&&y._getFirstRowSibling(W),fe&&ie&&fe.id===ie.id&&ce(),ie&&!ie.parentNode&&(ie=c(ie.id)),re=N&&N.parentNode||ie&&ie.parentNode||y.contentNode,fe=y.newRow(oe,re,ie,F.start+he,F),fe&&(fe.observerIndex=j,L.splice(he,0,fe),!le||he-1)for(var se=0;se-1){L=O,N+=N<0?1:-1;break}while(x=(!y||!O.hidden)&&O[N<0?"lastChild":"firstChild"]);else if(O=O.parentNode,!O||O===this.bodyNode||O===this.headerNode)break;while(N);return L},up:function(T,N,F){return T.element||(T=this.row(T)),this.row(this._move(T,-(N||1),"dgrid-row",F))},down:function(T,N,F){return T.element||(T=this.row(T)),this.row(this._move(T,N||1,"dgrid-row",F))},scrollTo:n("touch")?function(T){return this.useTouchScroll?this.inherited(arguments):R.call(this,T)}:R,getScrollPosition:n("touch")?function(){return this.useTouchScroll?this.inherited(arguments):M.call(this)}:M,get:function(T){var N="_get"+T.charAt(0).toUpperCase()+T.slice(1);return typeof this[N]=="function"?this[N].apply(this,[].slice.call(arguments,1)):(!n("dojo-built")&&typeof this[N+"Attr"]=="function"&&console.warn("dgrid: Use "+N+" instead of "+N+"Attr for getting "+T),this[T])},set:function(T,N){if(typeof T=="object")for(var F in T)this.set(F,T[F]);else{var y="_set"+T.charAt(0).toUpperCase()+T.slice(1);typeof this[y]=="function"?this[y].apply(this,[].slice.call(arguments,1)):(!n("dojo-built")&&typeof this[y+"Attr"]=="function"&&console.warn("dgrid: Use "+y+" instead of "+y+"Attr for setting "+T),this[T]=N)}return this},_getClass:w,_setClass:E,_getClassName:w,_setClassName:E,_setSort:function(T,N){this._sort=typeof T!="string"?T:[{attribute:T,descending:N}],this.refresh(),this._lastCollection&&(T.length&&(typeof T!="string"&&(N=T[0].descending,T=T[0].attribute),this._lastCollection.sort(function(F,y){var x=F[T],O=y[T];return x===void 0&&(x=""),O===void 0&&(O=""),x==O?0:x>O==!N?1:-1})),this.renderArray(this._lastCollection))},sort:function(T,N){C.deprecated("sort(...)",'use set("sort", ...) instead',"dgrid 0.4"),this.set("sort",T,N)},_getSort:function(){return this._sort},_setShowHeader:function(T){var N=this.headerNode;this.showHeader=T,i(N,(T?"!":".")+"dgrid-header-hidden"),this.renderHeader(),this.resize(),T&&(N.scrollLeft=this.getScrollPosition().x)},setShowHeader:function(T){C.deprecated("setShowHeader(...)",'use set("showHeader", ...) instead',"dgrid 0.4"),this.set("showHeader",T)},_setShowFooter:function(T){this.showFooter=T,i(this.footerNode,(T?"!":".")+"dgrid-footer-hidden"),this.resize()}})},_,P),_.exports=S},14678:(_,P,l)=>{var b,S;b=[l(6457),l(10571),l(74786),l(69961),l(67324),l(7835),l(86560),l(95702),l(60493)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r,i){return p([C,A],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:1/0,bufferRows:10,farOffRemoval:2e3,queryRowsOverlap:0,pagingMethod:"debounce",pagingDelay:r.defaultDelay,keepScrollPosition:!1,rowHeight:22,postCreate:function(){this.inherited(arguments);var s=this;t(this.bodyNode,"scroll",r[this.pagingMethod](function(a){s._processScroll(a)},null,this.pagingDelay))},renderQuery:function(s,a){var o=this,u=a&&a.container||this.contentNode,c={query:s,count:0,options:a},h,v=this.preload,f,g={node:i(u,"div.dgrid-preload",{rowIndex:0}),count:0,query:s,next:c,options:a};g.node.style.height="0",c.node=h=i(u,"div.dgrid-preload"),c.previous=g,h.rowIndex=this.minRowsPerPage,v?((c.next=v.next)&&h.offsetTop>=v.node.offsetTop?c.previous=v:(c.next=v,c.previous=v.previous),c.previous.next=c,c.next.previous=c):this.preload=c;var m=i(h,"-div.dgrid-loading"),E=i(m,"div.dgrid-below");E.innerHTML=this.loadingMessage;function w(I){if(i(m,"!"),I)throw o._refreshDeferred&&(o._refreshDeferred.reject(I),delete o._refreshDeferred),I}if(a=d.mixin(this.get("queryOptions"),a,{start:0,count:this.minRowsPerPage},"level"in s?{queryLevel:s.level}:null),this._trackError(function(){return f=s(a)}),typeof f>"u"){w();return}return n.when(o.renderArray(f,h,a),function(I){var M=typeof f.total>"u"?f.length:f.total;return n.when(M,function(R){var T=I.length,N=h.parentNode,F=o.noDataNode;i(m,"!"),"queryLevel"in a||(o._total=R),R===0&&(F&&(i(F,"!"),delete o.noDataNode),o.noDataNode=F=i("div.dgrid-no-data"),N.insertBefore(F,o._getFirstRowSibling(N)),F.innerHTML=o.noDataMessage);for(var y=0,x=0;x"u"&&(o=this.keepScrollPosition),o&&(this._previousScrollPosition=this.getScrollPosition()),this.inherited(arguments),this.store)return u=this._refreshDeferred=new n,c=a.renderQuery(function(h){return a.store.query(a.query,h)}),typeof c>"u"&&u.reject(),u.then(function(h){return setTimeout(function(){t.emit(a.domNode,"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:a,results:h})},0),delete a._refreshDeferred,h},function(h){throw delete a._refreshDeferred,h})},resize:function(){this.inherited(arguments),this._processScroll()},_getFirstRowSibling:function(s){return s.lastChild},_calcRowHeight:function(s){var a=s.nextSibling;return a&&!/\bdgrid-preload\b/.test(a.className)?a.offsetTop-s.offsetTop:s.offsetHeight},lastScrollTop:0,_processScroll:function(s){var a=this,o=a.bodyNode,u=s&&s.scrollTop||this.getScrollPosition().y,c=o.offsetHeight+u,h,v,f=a.preload,g=a.lastScrollTop,m=a.bufferRows*a.rowHeight,E=m-a.rowHeight,w,I,M,R=!0,T=1;a.lastScrollTop=u;function N(ee,oe,se,he){var fe=a.farOffRemoval,le=ee.node;if(oe>2*fe){for(var ie,re=le[se],ce=0,ve=0,ge=[];ie=re;){var Te=a._calcRowHeight(ie);if(ce+Te+fe>oe||re.className.indexOf("dgrid-row")<0&&re.className.indexOf("dgrid-loading")<0)break;var re=ie[se];ce+=Te,ve+=ie.count||1,a.removeRow(ie,!0),ge.push(ie)}ee.count+=ve,he?(le.rowIndex-=ve,F(ee)):le.style.height=le.offsetHeight+ce+"px";var Pe=i("div",ge);setTimeout(function(){i(Pe,"!")},1)}}function F(ee,oe){ee.node.style.height=Math.min(ee.count*a.rowHeight,oe?1/0:a.maxEmptySpace)+"px"}function y(ee,oe){do ee=oe?ee.next:ee.previous;while(ee&&!ee.node.offsetWidth);return ee}for(;f&&!f.node.offsetWidth;)f=f.previous;for(;f&&f!=h;){h=a.preload,a.preload=f,v=f.node;var x=v.offsetTop,O;if(c+T+Ex+(O=v.offsetHeight))f=y(f,R=!0);else{var L=((v.rowIndex?u-m:c)-x)/a.rowHeight,W=(c-u+2*m)/a.rowHeight,j=Math.max(Math.min((u-g)*a.rowHeight,a.maxRowsPerPage/2),a.maxRowsPerPage/-2);if(W+=Math.min(Math.abs(j),10),v.rowIndex==0&&(L-=W),L=Math.max(L,0),L<10&&L>0&&W+L0||v.offsetTop>u)&&f;if(z){var X=f.previous;X&&(N(X,u-(X.node.offsetTop+X.node.offsetHeight),"nextSibling"),L>0&&X.node==v.previousSibling?(L=Math.min(f.count,L),f.previous.count+=L,F(f.previous,!0),v.rowIndex+=L,V=0):W+=L,f.count-=L),H.start=v.rowIndex-V,H.count=Math.min(W+V,a.maxRowsPerPage),v.rowIndex=H.start+H.count}else{if(f.next){N(f.next,f.next.node.offsetTop-c,"previousSibling",!0);var K=v.nextSibling;K==f.next.node?(f.next.count+=f.count-L,f.next.node.rowIndex=L+W,F(f.next),f.count=L,V=0):$=!0}H.start=f.count,H.count=Math.min(W+V,a.maxRowsPerPage)}if($&&K&&K.offsetWidth&&($=K.offsetTop),F(f),"level"in f.query&&(H.queryLevel=f.query.level),!("queryLevel"in H)&&(H.start>a._total||H.count<0))continue;var Z=i(K,"-div.dgrid-loading[style=height:"+W*a.rowHeight+"px]"),Y=i(Z,"div.dgrid-"+(z?"below":"above"));Y.innerHTML=a.loadingMessage,Z.count=W;var Q=f.query(H),q=a._trackError(function(){return Q});if(q===void 0){i(Z,"!");return}(function(ee,oe,se,he){M=n.when(a.renderArray(he,ee,H),function(fe){if(I=he,K=ee.nextSibling,i(ee,"!"),se&&K&&K.offsetWidth){var le=a.getScrollPosition();a.scrollTo({x:le.x,y:le.y+K.offsetTop-se,preserveMomentum:!0})}return n.when(he.total||he.length,function(ie){"queryLevel"in H||(a._total=ie),oe&&(oe.count=ie-oe.node.rowIndex,oe.count===0&&H.count++,F(oe))}),a._processScroll(),fe},function(fe){throw i(ee,"!"),fe})}).call(this,Z,z,$,Q),f=f.previous}}M&&(w=this._refreshDeferred)&&(delete this._refreshDeferred,n.when(M,function(){w.resolve(I)}))},removeRow:function(s,a){function o(I,M){return I!=null?I:M}if(s){var u=s.previousSibling,c=s.nextSibling,h=u&&o(u.observerIndex,u.previousObserverIndex),v=c&&o(c.observerIndex,c.nextObserverIndex),f=s.observerIndex;if(s.observerIndex=void 0,a&&(s.nextObserverIndex=v,s.previousObserverIndex=h),this.cleanEmptyObservers&&f>-1&&f!==h&&f!==v){var g=this.observers,m=g[f];if(m){if(!a){for(var E=m.rows,w=0;w{var b,S;b=[l(57987),l(74786),l(67324),l(86560),l(80675),l(76873),l(6457),l(42241),l(86023),l(60493),l(11278),l(18203)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r,i,s){n.add("dom-comparedocumentposition",function(m,E,w){return!!w.compareDocumentPosition}),n.add("css-user-select",function(m,E,w){var I=w.style,M=["Khtml","O","ms","Moz","Webkit"],R=M.length,T="userSelect";do if(typeof I[T]<"u")return T;while(R--&&(T=M[R]+"UserSelect"));return!1}),n.add("dom-selectstart",typeof document.onselectstart<"u");var a=n("mac")?"metaKey":"ctrlKey",o=n("css-user-select"),u=r.pointer,c=r.MSPointer,h=u?u+(c?"Down":"down"):"mousedown",v=u?u+(c?"Up":"up"):"mouseup";function f(m,E){for(var w=m.unselectable=E?"on":"",I=m.getElementsByTagName("*"),M=I.length;--M;)I[M].tagName==="INPUT"||I[M].tagName==="TEXTAREA"||(I[M].unselectable=w)}function g(m,E){var w=m.bodyNode,I=E?"text":n("ff")<21?"-moz-none":"none";o&&o!=="msUserSelect"?w.style[o]=I:n("dom-selectstart")?!E&&!m._selectstartHandle?m._selectstartHandle=d(w,"selectstart",function(M){var R=M.target&&M.target.tagName;R!=="INPUT"&&R!=="TEXTAREA"&&M.preventDefault()}):E&&m._selectstartHandle&&(m._selectstartHandle.remove(),delete m._selectstartHandle):(f(w,!E),!E&&!m._unselectableHandle?m._unselectableHandle=e.after(m,"renderRow",function(M){return f(M,!0),M}):E&&m._unselectableHandle&&(m._unselectableHandle.remove(),delete m._unselectableHandle))}return A(null,{selectionDelegate:".dgrid-row",selectionEvents:h+","+v+",dgrid-cellfocusin",selectionTouchEvents:n("touch")?i.tap:null,deselectOnRefresh:!0,allowSelectAll:!1,selection:{},selectionMode:"extended",allowTextSelection:void 0,_selectionTargetType:"rows",create:function(){return this.selection={},this.inherited(arguments)},postCreate:function(){this.inherited(arguments),this._initSelectionEvents();var m=this.selectionMode;this.selectionMode="",this._setSelectionMode(m)},destroy:function(){this.inherited(arguments),this._selectstartHandle&&this._selectstartHandle.remove(),this._unselectableHandle&&this._unselectableHandle.remove(),this._removeDeselectSignals&&this._removeDeselectSignals()},_setSelectionMode:function(m){m!=this.selectionMode&&(this.clearSelection(),this.selectionMode=m,this._selectionHandlerName="_"+m+"SelectionHandler",this._setAllowTextSelection(this.allowTextSelection))},setSelectionMode:function(m){C.deprecated("setSelectionMode(...)",'use set("selectionMode", ...) instead',"dgrid 0.4"),this.set("selectionMode",m)},_setAllowTextSelection:function(m){typeof m<"u"?g(this,m):g(this,this.selectionMode==="none"),this.allowTextSelection=m},_handleSelect:function(m,E){!this[this._selectionHandlerName]||!this.allowSelect(this.row(E))||m.type==="dgrid-cellfocusin"&&m.parentType===h||m.type===v&&E!=this._waitForMouseUp||(this._waitForMouseUp=null,this._selectionTriggerEvent=m,(!m.keyCode||!m.ctrlKey||m.keyCode==32)&&(!m.shiftKey&&m.type===h&&this.isSelected(E)?this._waitForMouseUp=E:this[this._selectionHandlerName](m,E)),this._selectionTriggerEvent=null)},_singleSelectionHandler:function(m,E){var w=m.keyCode?m.ctrlKey:m[a];this._lastSelected===E?this.select(E,null,!w||!this.isSelected(E)):(this.clearSelection(),this.select(E),this._lastSelected=E)},_multipleSelectionHandler:function(m,E){var w=this._lastSelected,I=m.keyCode?m.ctrlKey:m[a],M;m.shiftKey||(M=I?null:!0,w=null),this.select(E,w,M),w||(this._lastSelected=E)},_extendedSelectionHandler:function(m,E){(m.button===2?!this.isSelected(E):!(m.keyCode?m.ctrlKey:m[a]))&&this.clearSelection(null,!0),this._multipleSelectionHandler(m,E)},_toggleSelectionHandler:function(m,E){this.select(E,null,null)},_initSelectionEvents:function(){var m=this,E=this.contentNode,w=this.selectionDelegate;this._selectionEventQueues={deselect:[],select:[]},n("touch")&&!n("pointer")&&this.selectionTouchEvents?(d(E,i.selector(w,this.selectionTouchEvents),function(I){m._handleSelect(I,this),m._ignoreMouseSelect=this}),d(E,d.selector(w,this.selectionEvents),function(I){m._ignoreMouseSelect!==this?m._handleSelect(I,this):I.type===v&&(m._ignoreMouseSelect=null)})):d(E,d.selector(w,this.selectionEvents),function(I){m._handleSelect(I,this)}),this.addKeyHandler&&this.addKeyHandler(32,function(I){m._handleSelect(I,I.target)}),this.allowSelectAll&&this.on("keydown",function(I){I[a]&&I.keyCode==65&&!/\bdgrid-input\b/.test(I.target.className)&&(I.preventDefault(),m[m.allSelected?"clearSelection":"selectAll"]())}),this._setStore&&e.after(this,"_setStore",function(){m._updateDeselectionAspect()}),this._updateDeselectionAspect()},_updateDeselectionAspect:function(){var m=this,E=this.store,w,I;function M(R,T,N){var F=T||R&&R[m.idProperty||"id"];if(F!=null){var y=m.row(F),x=y&&m.selection[y.id];x&&m[N](y,null,x)}}this._removeDeselectSignals&&this._removeDeselectSignals(),E&&E.notify?(w=e.before(E,"notify",function(R,T){R||M(R,T,"deselect")}),I=e.after(E,"notify",function(R,T){M(R,T,"select")},!0),this._removeDeselectSignals=function(){w.remove(),I.remove()}):(w=e.before(this,"removeRow",function(R,T){var N;T||(N=this.row(R),N&&N.id in this.selection&&this.deselect(N))}),this._removeDeselectSignals=function(){w.remove()})},allowSelect:function(m){return!0},_fireSelectionEvent:function(m){var E=this._selectionEventQueues[m],w=this._selectionTriggerEvent,I;I={bubbles:!0,grid:this},w&&(I.parentType=w.type),I[this._selectionTargetType]=E,d.emit(this.contentNode,"dgrid-"+m,I),this._selectionEventQueues[m]=[]},_fireSelectionEvents:function(){var m=this._selectionEventQueues,E;for(E in m)m[E].length&&this._fireSelectionEvent(E)},_select:function(m,E,w){var I,M,R,T,N;if(typeof w>"u"&&(w=!0),m.element||(m=this.row(m)),(w===!1||this.allowSelect(m))&&(I=this.selection,M=!!I[m.id],w===null&&(w=!M),R=m.element,!w&&!this.allSelected?delete this.selection[m.id]:I[m.id]=w,R&&(w?s(R,".dgrid-selected"+(this.addUiClasses?".ui-state-active":"")):s(R,"!dgrid-selected!ui-state-active")),w!==M&&R&&this._selectionEventQueues[(w?"":"de")+"select"].push(m),E)){if(E.element||(E=this.row(E)),!E){this._lastSelected=R,console.warn("The selection range has been reset because the beginning of the selection is no longer in the DOM. If you are using OnDemandList, you may wish to increase farOffRemoval to avoid this, but note that keeping more nodes in the DOM may impact performance.");return}if(T=E.element,T)for(N=this._determineSelectionDirection(R,T),N||(T=document.getElementById(T.id),N=this._determineSelectionDirection(R,T));m.element!=T&&(m=this[N](m));)this._select(m,null,w)}},_determineSelectionDirection:n("dom-comparedocumentposition")?function(m,E){var w=E.compareDocumentPosition(m);return w&1?!1:w===2?"down":"up"}:function(m,E){return E.sourceIndex<1?!1:E.sourceIndex>m.sourceIndex?"down":"up"},select:function(m,E,w){this._select(m,E,w),this._fireSelectionEvents()},deselect:function(m,E){this.select(m,E,!1)},clearSelection:function(m,E){this.allSelected=!1;for(var w in this.selection)m!==w&&this._select(w,null,!1);E||(this._lastSelected=null),this._fireSelectionEvents()},selectAll:function(){this.allSelected=!0,this.selection={};for(var m in this._rowIdToObject){var E=this.row(this._rowIdToObject[m]);this._select(E.id,null,!0)}this._fireSelectionEvents()},isSelected:function(m){return typeof m>"u"||m===null?!1:(m.element||(m=this.row(m)),m.id in this.selection?!!this.selection[m.id]:this.allSelected&&(!m.data||this.allowSelect(m)))},refresh:function(){return this.deselectOnRefresh&&this.clearSelection(),this._lastSelected=null,this.inherited(arguments)},renderArray:function(){var m=this,E=this.inherited(arguments);return p.when(E,function(w){var I=m.selection,M,R,T;for(M=0;M{var b,S;b=[l(74786),l(86560),l(86023),l(70659),l(60493),l(48286)],S=l.dj.d(b,function(C,A,p,d,n){var e=50,t=30,r={},i={},s=1,a=8,o=/^translate(?:3d)?\((-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,u=/^matrix\(1, 0, 0, 1, (-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,c=d("css-transitions"),h=d("transitionend"),v=d("css-transforms"),f=d("css-transforms3d"),g,m,E,w,I;if(f?(w="translate3d(",I=",0)"):v&&(w="translate(",I=")"),!c||!w)return console.warn("CSS3 features unavailable for touch scroll effects."),function(){};E=f||v,E=E===!0?"transform":E+"Transform",m=c===!0?"transition":c+"Transition",g=v===!0?"":"-"+v.toLowerCase()+"-";function M(H,K){var $=H.touchNode,V=$.parentNode,z=V.offsetWidth-a,X=V.offsetHeight-a,Z=K.scrollWidth=$.scrollWidth,Y=K.scrollHeight=$.scrollHeight,Q=K.parentWidth=V.offsetWidth,q=K.parentHeight=V.offsetHeight,ee;Z>Q?(H._scrollbarXNode||(ee=n(V,"div.touchscroll-x")),ee=H._scrollbarXNode=H._scrollbarXNode||n(ee,"div.touchscroll-bar"),ee.style.width=z*z/Z+"px",ee.style.left=$.offsetLeft+"px",n(V,".touchscroll-scrollable-x"),K.scrollableX=!0):n(V,"!touchscroll-scrollable-x"),Y>q?(H._scrollbarYNode||(ee=n(V,"div.touchscroll-y")),ee=H._scrollbarYNode=H._scrollbarYNode||n(ee,"div.touchscroll-bar"),ee.style.height=X*X/Y+"px",ee.style.top=$.offsetTop+"px",n(V,".touchscroll-scrollable-y"),K.scrollableY=!0):n(V,"!touchscroll-scrollable-y"),n(V,"!touchscroll-fadeout")}function R(H,K){var $=H.touchNode,V=r[H.id],z,X,Z,Y,Q;typeof K!="object"?(Y=K,Q=arguments[2],K=arguments[3],X=Z=!0):(X="x"in K,Z="y"in K,(!X||!Z)&&(z=H.getScrollPosition()),Y=X?K.x:z.x,Q=Z?K.y:z.y),$.style[E]=w+-Y+"px,"+-Q+"px"+I,V&&X&&H._scrollbarXNode&&(H._scrollbarXNode.style[E]=w+Y*V.parentWidth/V.scrollWidth+"px,0"+I),V&&Z&&H._scrollbarYNode&&(H._scrollbarYNode.style[E]=w+"0,"+Q*V.parentHeight/V.scrollHeight+"px"+I),A.emit(H.touchNode.parentNode,"scroll",{scrollLeft:Y,scrollTop:Q})}function T(H){return r[H.id]?u.exec(window.getComputedStyle(H.touchNode)[E]):o.exec(H.touchNode.style[E])}function N(H){var K=this.widget,$=[this.node,K._scrollbarXNode,K._scrollbarYNode],V=$.length;for(this.timer&&(clearTimeout(this.timer),this.timer=null),this.transitionHandler&&this.transitionHandler.remove();V--;)$[V]&&($[V].style[m+"Duration"]="0");(!H||!H.preserveScrollbars)&&n(this.node.parentNode,".touchscroll-fadeout"),delete this.resetEffects}function F(H){var K=H.widget,$=K.touchNode,V=K.id,z=0,X=0,Z,Y,Q;p.countCurrentTouches(H,$)===K.touchesToScroll&&(Y=T(K),Y&&(z=+Y[1],X=+Y[2]),(Q=r[V])&&(Q.resetEffects&&Q.resetEffects({preserveScrollbars:!0}),$.style[E]=w+z+"px,"+X+"px"+I,i[V]=Q),Z=H.targetTouches[0],Q=r[V]={widget:K,node:$,startX:z-Z.pageX,startY:X-Z.pageY,lastX:z,lastY:X,pageX:Z.pageX,pageY:Z.pageY,tickFunc:function(){O(V)}},Q.timer=setTimeout(Q.tickFunc,e))}function y(H){var K=H.widget,$=K.id,V=K.touchesToScroll,z=r[$],X,Z,Y,Q,q,ee,oe,se;if(!z||(X=p.countCurrentTouches(H,K.touchNode))!==V){X>V&&K.cancelTouchScroll();return}if(Z=H.targetTouches,Y=Z[0],!z.scrollbarsShown&&(i[$]||Math.abs(Y.pageX-z.pageX)>K.scrollThreshold||Math.abs(Y.pageY-z.pageY)>K.scrollThreshold))for(M(K,z),z.scrollbarsShown=!0,se=Z.length;se--;)Z[se].touchScrolled=!0;z.scrollbarsShown&&(z.scrollableX||z.scrollableY)&&(H.preventDefault(),Q=z.scrollableX?z.startX+Y.pageX:0,q=z.scrollableY?z.startY+Y.pageY:0,ee=z.scrollableX?-(z.scrollWidth-z.parentWidth):0,oe=z.scrollableY?-(z.scrollHeight-z.parentHeight):0,Q>0?Q=Q/2:Q0?q=q/2:qY?Z.style[E]=w+"0,0"+I:Z.style[E]=w+(Z.parentNode.offsetWidth-Z.offsetWidth)+"px,0"+I),Q!=$&&V.scrollableY&&(Z=V.widget._scrollbarYNode,Z.style[m+"Duration"]=z.bounceDuration+"ms",$>Q?Z.style[E]=w+"0,0"+I:Z.style[E]=w+"0,"+(Z.parentNode.offsetHeight-Z.offsetHeight)+"px"+I)):q()}function W(H){var K=r[H],$=i[H],V,z,X,Z=1.15;if(delete i[H],K.timer&&clearTimeout(K.timer),K.resetEffects=N,V=o.exec(K.node.style[E]),V?(z=+V[1],X=+V[2]):z=X=0,!K.velX&&!K.velY||(z>=0||z<=-(K.scrollWidth-K.parentWidth))&&(X>=0||X<=-(K.scrollHeight-K.parentHeight))){L(H,z,X);return}function Y(Q,q){return(Q.velX<=0&&q.velX<=0||Q.velX>=0&&q.velX>=0)&&(Q.velY<=0&&q.velY<=0||Q.velY>=0&&q.velY>=0)}$&&($.velX||$.velY)&&Y(K,$)&&(K.velX=(K.velX+$.velX)*Z,K.velY=(K.velY+$.velY)*Z),K.lastX=z,K.lastY=X,K.calcFunc=function(){j(H)},K.timer=setTimeout(K.calcFunc,t)}function j(H){var K=r[H],$,V,z,X,Z,Y,Q,q,ee=6;if(K)if($=K.node,V=$.parentNode,z=K.widget,Q=z.glideDecel(K.velX),q=z.glideDecel(K.velY),Math.abs(Q)>=s||Math.abs(q)>=s){if(Z=K.lastX+Q,Y=K.lastY+q,Z>0||Z<-(K.scrollWidth-K.parentWidth))for(X=ee;X--;)Q=z.glideDecel(Q);if(Y>0||Y<-(K.scrollHeight-K.parentHeight))for(X=ee;X--;)q=z.glideDecel(q);R(z,-Z,-Y),K.lastX=Z,K.lastY=Y,K.velX=Q,K.velY=q,K.timer=setTimeout(K.calcFunc,t)}else L(H,K.lastX,K.lastY)}return C(null,{touchesToScroll:1,touchNode:null,scrollThreshold:10,bounceDuration:300,postCreate:function(){this._initTouch(),this.inherited(arguments)},_initTouch:function(){var H=this.touchNode=this.touchNode||this.containerNode,K=this,$;if(!H||!H.parentNode){console.warn("TouchScroll requires a nested node upon which to operate.");return}$=H.parentNode,$.style.overflow="hidden",H.style[m+"Property"]=g+"transform",H.style[m+"TimingFunction"]="cubic-bezier(0.33, 0.66, 0.66, 1)";function V(){K.cancelTouchScroll()}function z(X){return function(Z){Z.widget=K,Z.cancelTouchScroll=V,X.call(this,Z)}}this._touchScrollListeners=[A($,"touchstart",z(F)),A($,"touchmove",z(y)),A($,"touchend,touchcancel",z(x))]},destroy:function(){for(var H=this._touchScrollListeners.length;H--;)this._touchScrollListeners[H].remove();delete r[this.id],this.inherited(arguments)},scrollTo:function(H){var K=r[this.id],$=this.touchNode,V=$.parentNode;!H.preserveMomentum&&K&&K.resetEffects&&K.resetEffects(),H.x&&(H.x=Math.max(0,Math.min(H.x,$.scrollWidth-V.offsetWidth))),H.y&&(H.y=Math.max(0,Math.min(H.y,$.scrollHeight-V.offsetHeight))),R(this,H)},getScrollPosition:function(){var H=T(this);return H?{x:-H[1],y:-H[2]}:{x:0,y:0}},cancelTouchScroll:function(){var H=r[this.id];H&&(H.resetEffects?H.resetEffects():(H.timer&&clearTimeout(H.timer),n(H.node.parentNode,".touchscroll-fadeout")),delete r[this.id])},glideDecel:function(H){return H*.9}})},_,P),_.exports=S},10571:(_,P,l)=>{var b,S;b=[l(57987),l(74786),l(69961),l(67324),l(86560),l(76873),l(60493)],S=l.dj.d(b,function(C,A,p,d,n,e,t){function r(s){return s}function i(s){if(typeof s!="object")s=new Error(s);else if(s.dojoType==="cancel")return;s.grid=this,n.emit(this.domNode,"dgrid-error",{grid:this,error:s,cancelable:!0,bubbles:!0})&&console.error(s)}return A(null,{store:null,query:null,queryOptions:null,getBeforePut:!0,noDataMessage:"",loadingMessage:"",constructor:function(){this.query={},this.queryOptions={},this.dirty={},this._updating={},this._columnsWithSet={},e.before(this,"configStructure",p.hitch(this,function(){this._columnsWithSet={}}))},postCreate:function(){this.inherited(arguments),this.store&&this._updateNotifyHandle(this.store)},destroy:function(){this.inherited(arguments),this._notifyHandle&&this._notifyHandle.remove()},_configColumn:function(s){s.set&&(this._columnsWithSet[s.field]=s),this.inherited(arguments)},_updateNotifyHandle:function(s){if(this._notifyHandle&&(this._notifyHandle.remove(),delete this._notifyHandle),s&&typeof s.notify=="function"){this._notifyHandle=e.after(s,"notify",p.hitch(this,"_onNotify"),!0);var a=this.get("sort");(!a||!a.length)&&console.warn("Observable store detected, but no sort order specified. You may experience quirks when adding/updating items. These can be resolved by setting a sort order on the list or grid.")}},_setStore:function(s,a,o){this._updateNotifyHandle(s),this.store=s,this.dirty={},this.set("query",a,o)},_setQuery:function(s,a){var o=a&&a.sort;this.query=s!==void 0?s:this.query,this.queryOptions=a||this.queryOptions,o?this.set("sort",o):this.refresh()},setStore:function(s,a,o){C.deprecated("setStore(...)",'use set("store", ...) instead',"dgrid 0.4"),this.set("store",s,a,o)},setQuery:function(s,a){C.deprecated("setQuery(...)",'use set("query", ...) instead',"dgrid 0.4"),this.set("query",s,a)},_getQueryOptions:function(){var s=p.delegate(this.queryOptions,{});return(typeof this._sort=="function"||this._sort.length)&&(s.sort=this._sort),s},_getQuery:function(){var s=this.query;return typeof s=="object"&&s!=null?p.delegate(s,{}):s},_setSort:function(s,a){this.store&&(this._lastCollection=null),this.inherited(arguments)},_onNotify:function(s,a){this.inherited(arguments),s&&this._numObservers<1&&this.refresh({keepScrollPosition:!0})},refresh:function(){var s=this.inherited(arguments);return this.store||(this.noDataNode=t(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage),s},renderArray:function(){var s=this,a=this.inherited(arguments);return this.store||d.when(a,function(o){o.length&&s.noDataNode&&t(s.noDataNode,"!")}),a},insertRow:function(s,a,o,u,c){var h=this.store,v=this.dirty,f=h&&h.getIdentity(s),g;return f in v&&!(f in this._updating)&&(g=v[f]),g&&(s=p.delegate(s,g)),this.inherited(arguments)},updateDirty:function(s,a,o){var u=this.dirty,c=u[s];c||(c=u[s]={}),c[a]=o},setDirty:function(s,a,o){C.deprecated("setDirty(...)","use updateDirty() instead","dgrid 0.4"),this.updateDirty(s,a,o)},save:function(){var s=this,a=this.store,o=this.dirty,u=new d,c=u.promise,h=function(m){var E;return s.getBeforePut||!(E=s.row(m).data)?function(){return a.get(m)}:function(){return E}};function v(m,E){return function(w){var I=s._columnsWithSet,M=s._updating,R,T;if(typeof w.set=="function")w.set(E);else for(R in E)w[R]=E[R];for(R in I)T=I[R].set(w),T!==void 0&&(w[R]=T);return M[m]=!0,d.when(a.put(w),function(){delete o[m],delete M[m]})}}for(var f in o){var g=v(f,o[f]);c=c.then(h(f)).then(g)}return u.resolve(),c},revert:function(){this.dirty={},this.refresh()},_trackError:function(s){var a;typeof s=="string"&&(s=p.hitch(this,s));try{a=s()}catch(o){i.call(this,o)}return d.when(a,r,p.hitch(this,i))},newRow:function(){var s=this.inherited(arguments);return this.noDataNode&&(t(this.noDataNode,"!"),delete this.noDataNode),s},removeRow:function(s,a){var o={element:s};return!a&&this.noDataMessage&&this.up(o).element===s&&this.down(o).element===s&&(this.noDataNode=t(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage),this.inherited(arguments)}})},_,P),_.exports=S},70659:(_,P,l)=>{var b,S;b=[l(80675)],S=l.dj.d(b,function(C){var A=["ms","O","Moz","Webkit"];function p(d,n){var e=d.style,t;if(n in e)return!0;for(n=n.slice(0,1).toUpperCase()+n.slice(1),t=A.length;t--;)if(A[t]+n in e)return A[t];return!1}return C.add("css-transitions",function(d,n,e){return p(e,"transitionProperty")}),C.add("css-transforms",function(d,n,e){return p(e,"transform")}),C.add("css-transforms3d",function(d,n,e){return p(e,"perspective")}),C.add("transitionend",function(){var d=C("css-transitions");return d?d===!0?"transitionend":{ms:"MSTransitionEnd",O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[d]:!1}),C},_,P),_.exports=S},42241:(_,P,l)=>{var b,S;b=[l(80675)],S=l.dj.d(b,function(C){C.add("pointer",function(n){return"PointerEvent"in n?"pointer":"MSPointerEvent"in n?"MSPointer":!1});var A=C("pointer"),p=A&&A.slice(0,2)==="MS",d={};return d.pointer=A,d.MSPointer=p,d},_,P),_.exports=S},95702:(_,P,l)=>{var b,S;b=[l(80675),l(60493)],S=l.dj.d(b,function(C,A){C.add("dom-contains",function(s,a,o){return!!o.contains});var p=[],d,n,e,t=/([^A-Za-z0-9_\u00A0-\uFFFF-])/g;function r(s){var a=p[s],o,u;if(a!==void 0)for(d[n](a),p[s]=void 0,o=s+1,u=p.length;oa&&p[o]--}var i={defaultDelay:15,throttle:function(s,a,o){var u=!1;return o=o||i.defaultDelay,function(){u||(u=!0,s.apply(a,arguments),setTimeout(function(){u=!1},o))}},throttleDelayed:function(s,a,o){var u=!1;return o=o||i.defaultDelay,function(){if(!u){u=!0;var c=arguments;setTimeout(function(){u=!1,s.apply(a,c)},o)}}},debounce:function(s,a,o){var u;return o=o||i.defaultDelay,function(){u&&(clearTimeout(u),u=null);var c=arguments;u=setTimeout(function(){s.apply(a,c)},o)}},each:function(s,a,o){var u,c;if(s)if(typeof s.length=="number")for(u=0,c=s.length;u{var b,S;b=[l(86560),l(11278)],S=l.dj.d(b,function(C,A){var p={tapRadius:10,dbltapTime:250,selector:function(t,r,i){return function(s,a){var o=r.bubble;return o?r=o:i!==!1&&(i=!0),C(s,r,function(u){var c=u.target;for(c.nodeType==3&&(c=c.parentNode);!A.matches(c,t,s);)if(c==s||!i||!(c=c.parentNode))return;return a.call(c,u)})}},countCurrentTouches:function(t,r){if(!("touches"in t))return-1;var i,s,a;for(i=0,s=0;a=t.touches[i];++i)r.contains(a.target)&&++s;return s}};function d(t,r,i,s){if(!(i.targetTouches.length>1)){var a=i.changedTouches[0],o=a.screenX,u=a.screenY;s&&i.preventDefault();var c=C(t,"touchend",function(h){var v=h.changedTouches[0];h.targetTouches.length||(Math.abs(v.screenX-o){var b,S;b=[l.dj.c(_),l(7240),l(69196),l(92087),l(37672),l(69961),l(86560),l(23702)],S=l.dj.d(b,function(C,A,p,d,n,e,t,r){r.add("config-bgIframe",(r("ie")||r("trident"))&&!/IEMobile\/10\.0/.test(navigator.userAgent));var i=new function(){var s=[];this.pop=function(){var a;if(s.length)a=s.pop(),a.style.display="";else{if(r("ie")<9){var o=p.dojoBlankHtmlUrl||C.toUrl("dojo/resources/blank.html")||'javascript:""',u="