@mchp-mcc/scf-pic8-pwm-v2 4.2.11 → 4.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://processor/webpack/bootstrap","webpack://processor/./generated_module/src/Utils.ts","webpack://processor/./generated_module/src/autoModule/AutoModuleHelpers.ts","webpack://processor/./generated_module/src/autoModule/AutoModuleTemplates.ts","webpack://processor/./generated_module/src/getUserData.ts","webpack://processor/./generated_module/src/pins/PCPHelper.ts","webpack://processor/./generated_module/src/processor.ts","webpack://processor/./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js","webpack://processor/./node_modules/@microchip/pin-standard/lib/index.js","webpack://processor/./node_modules/@microchip/pin-standard/lib/pin-standard.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/Analytics/AnalyticsHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/App/AppModel.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/Utils.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleAppModel.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHardware.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleTemplates.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/FrequencyComponentHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/RegisterFilterMode.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/TimeComponentHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/autoModuleView.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/autoModuleViewHelpers.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/formData.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/scfUiSchema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/schema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/uiSchema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/creator.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/index.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/createPrototypeExports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/createPrototypeImports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/exports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/imports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interrupts/InterruptActions.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/pins/PCPHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/pins/PCPStateActionBuilder.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/processor.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/tables/UidMapBuilder.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/pin-standard/lib/index.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/pin-standard/lib/pin-standard.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-common/lib/Processor.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/Model.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js","webpack://processor/./node_modules/@microchip/scf-common/lib/Processor.js","webpack://processor/./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js","webpack://processor/./node_modules/@microchip/scf-device/lib/Register.js","webpack://processor/./node_modules/@microchip/scf-device/lib/Setting.js","webpack://processor/./node_modules/@microchip/scf-device/lib/util/Arrays.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/c-function-types.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/helpers.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/index.js","webpack://processor/./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js","webpack://processor/./node_modules/@microchip/scf-validators/lib/index.js","webpack://processor/./node_modules/core-js/es/math/log10.js","webpack://processor/./node_modules/core-js/features/math/log10.js","webpack://processor/./node_modules/core-js/internals/an-object.js","webpack://processor/./node_modules/core-js/internals/array-includes.js","webpack://processor/./node_modules/core-js/internals/classof-raw.js","webpack://processor/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://processor/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://processor/./node_modules/core-js/internals/create-property-descriptor.js","webpack://processor/./node_modules/core-js/internals/descriptors.js","webpack://processor/./node_modules/core-js/internals/document-create-element.js","webpack://processor/./node_modules/core-js/internals/enum-bug-keys.js","webpack://processor/./node_modules/core-js/internals/export.js","webpack://processor/./node_modules/core-js/internals/fails.js","webpack://processor/./node_modules/core-js/internals/get-built-in.js","webpack://processor/./node_modules/core-js/internals/global.js","webpack://processor/./node_modules/core-js/internals/has.js","webpack://processor/./node_modules/core-js/internals/hidden-keys.js","webpack://processor/./node_modules/core-js/internals/ie8-dom-define.js","webpack://processor/./node_modules/core-js/internals/indexed-object.js","webpack://processor/./node_modules/core-js/internals/inspect-source.js","webpack://processor/./node_modules/core-js/internals/internal-state.js","webpack://processor/./node_modules/core-js/internals/is-forced.js","webpack://processor/./node_modules/core-js/internals/is-object.js","webpack://processor/./node_modules/core-js/internals/is-pure.js","webpack://processor/./node_modules/core-js/internals/native-weak-map.js","webpack://processor/./node_modules/core-js/internals/object-define-property.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://processor/./node_modules/core-js/internals/object-keys-internal.js","webpack://processor/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://processor/./node_modules/core-js/internals/own-keys.js","webpack://processor/./node_modules/core-js/internals/path.js","webpack://processor/./node_modules/core-js/internals/redefine.js","webpack://processor/./node_modules/core-js/internals/require-object-coercible.js","webpack://processor/./node_modules/core-js/internals/set-global.js","webpack://processor/./node_modules/core-js/internals/shared-key.js","webpack://processor/./node_modules/core-js/internals/shared-store.js","webpack://processor/./node_modules/core-js/internals/shared.js","webpack://processor/./node_modules/core-js/internals/to-absolute-index.js","webpack://processor/./node_modules/core-js/internals/to-indexed-object.js","webpack://processor/./node_modules/core-js/internals/to-integer.js","webpack://processor/./node_modules/core-js/internals/to-length.js","webpack://processor/./node_modules/core-js/internals/to-primitive.js","webpack://processor/./node_modules/core-js/internals/uid.js","webpack://processor/./node_modules/core-js/modules/es.math.log10.js","webpack://processor/(webpack)/buildin/global.js","webpack://processor/./src/CreatorFunctions.ts","webpack://processor/./src/DerivedData.ts","webpack://processor/./src/GeneratorModel.tsx","webpack://processor/./src/PinsLogic.ts","webpack://processor/./src/PwmCalculator.tsx","webpack://processor/./src/interfaces/pwm_general_parameters.tsx"],"names":["getKeys","obj","Object","getOwnPropertyNames","values","map","key","forEach","action","mapper","assertNotNull","val","msg","Error","toDictionary","arr","keyMapper","valueMapper","result","entry","castComponent","component","category","getDefaultValue","overrideDefaultValues","name","type","defaultValue","value","getComboOptions","overrideOptions","hasConfigBits","interfaceName","getFriendlyInterfaceId","indexOf","getRegisterValues","model","registers","config","getDerivedData","getModuleConfig","peripherals","peripheral","peripheralName","interfaceId","undefined","regName","registerValue","reg","getHardware","getPeripheral","comment","valueAsHex","alias","settings","registerVal","CalculateRegisterValue","comments","set","setting","push","getComponentValue","getSettingBits","getComponent","deviceType","withNumberValue","getOptionValueByName","Number","asNumber","toString","toUpperCase","sortComments","register","sort","a","b","settingA","split","settingB","mask","join","setValNumber","getOptionByAlias","settingValue","valueAsDescription","bitName","getRegisterFromComponent","hardware","registerName","replace","toLowerCase","modifiedRegName","getSettingFromComponent","description","desc","porDefault","optionName","optionValue","options","option","getSettingDefaultIfPresent","overrideDefaultValue","getOptionByName","displayOptionSetting","isInterface","idA","idB","getSettingOptionsIfPresent","masterComponentValue","filteredOptions","mode","filterModeOptions","operation","find","optionModes","match","length","filter","getProcessedHandle","handle","payload","label","customName","moduleName","providerId","exportId","DependencySelector","createOptionLabel","dropdownOptions","thisImport","getImports","importId","shouldAllowUnselectDependency","noneSelection","createOptionEntry","names","generateDropdownOptions","isUnassignable","getModuleDefaultDescription","getTemplatePayload","getName","templatePayload","uppercase","lowercase","instance","filename","source","header","components","getAutoModuleAppModel","getAllComponents","getComponentPayload","getTemplateSettings","interrupts","properties","getConfigBits","configModule","AutoModuleHelper","templateConfigBits","configName","configBits","configBit","componentValue","masterComponent","getDerivedFunctions","isComponentValue","getPinsDataFromFile","require","getPinsLogicFromFile","getModuleConfigFromFile","mockPinsLogic","getPinsData","getCompletePinData","appModel","getRowData","rowData","rows","getPinsLogic","pinsLogic","createProcessor","hook","initialModule","stage","derivedDataGetter","dataModel","autoProcess","process","getCreatorFunctions","shouldImport","getCreatorImportArgs","importKey","state","MyDerivedData","EmptyDerivedData","getCFunctionValidator","pwmCalculator","PwmCalculator","getTimerPrValue","getTimerPrescaler","getImportValue","fosc","overrideDefaultOptions","pinData","getMyPinData","alerts","getMyAlerts","pwm_general_parameters_payload","initializer_system_results","dutyCycleValidator","componentName","pwmdcValue","getPwmCalculator","getCCPRValue","pwmPeriod","getPwmPeriod","pwmFrequency","getPwmFrequency","pwmResolution","getPwmResolution","ctselCcptmrs1","ctselTimerSetting","ctselCcptmrs","ctselPwmtmrs","pwmdchPwmdch","pwmdclPwmdcl","templateData","getGeneratorModel","getHelpUrl","getSdlHelpOverride","filterImports","importName","friendlyImportName","componentNameValidator","getCustomUiErrors","pin_standard_args","getPinstandardArgs","pattern","cValidator","getRjsfValidation","message","getCustomErrorMessage","args","queryAdapters","QueryAdapterKey","PPS","APFCON","CCPTMRSREG","getPeripheralDescription","CCPTMRS1","CCPTMRS","PWMTMRSREG","PWMTMRS","CTSELSETT","CTSEL","eachoptn","timeroptnregex","optnmatch","correctOptnName","imports","filteredImports","ImportKeys","getModel","filterImportBySetting","rstSource","regexpNumber","inst","timerSelection","getAssignedImport","text","Processor","Warning","Hint","helpUrl","getAutoSdlHelp","interfaceApi","pwm_general","createFirmwareApi","getHeaderFiles","modulename","isdriverisr","ispwmi_enabled","ispwmpi_enabled","initializer","minimum","maximum","arg","getArg","pwmArg","groupmatch","timersuffix","periodRegisterValue","prescaleValue","id","exportInterface","getExportInterfaces","getInterface","getInterfaceId","keys","pwmInterface","templateSettings","registerValues","initRegisters","ctsel","CTSELvalue","getDerivedFunction","moduleNameLowerCase","moduleNameUpperCase","headerFiles","api","simpleApi","productName","productVersion","selectedDevice","compiler","tool","useWatchdog","CCPTMRSregname","CTSELsettingname","timerselpresence","path","ppsData","apfconData","module","aliasReEx","behaviour","getPinBehaviour","LOCK_UNLOCK","behaviourMeta","lockPinRegEx","rowActions","pwmxRegcomponent","pwmx0Regcomponent","pwmx1Regcomponent","pwmx2Regcomponent","pwmx3Regcomponent","concat","getPCPHelper","stateActionBuilder","rowWithName","forComponent","addIfLockedSetValue","addIfUnLockedSetValue","build","actions","ppsPins","apfconPins","pinRegEx","tempPinBehaviour","ppsPin","ppsOut","RegExp","apfconPin","prValue","prescaler","dutyCycle","Math","round","log10","floor","ccprValue","dutyCycleRatio","dcRatio","pulseWidth","version","createPrototypeImport","createPrototypeExport","interfaces","createMock","Interface","requestId","prefix","createApi","InterfaceTypes","Initialize","returns","LoadDutyValue","arguments"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AChFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,GAAD,EAA2B;AAC9C;AACA,SAAOC,MAAM,CAACC,mBAAP,CAA2BF,GAA3B,CAAP;AACH,CAHM;AAKA,IAAMG,MAAM,GAAG,SAATA,MAAS,CAAUH,GAAV,EAA6C;AAC/D,SAAOD,OAAO,CAACC,GAAD,CAAP,CAAaI,GAAb,CAAiB,UAACC,GAAD;AAAA,WAAoBL,GAAG,CAACK,GAAD,CAAvB;AAAA,GAAjB,CAAP;AACH,CAFM;AAIA,IAAMC,OAAO,GAAG,SAAVA,OAAU,CACnBN,GADmB,EAEnBO,MAFmB,EAGZ;AACPR,SAAO,CAACC,GAAD,CAAP,CAAaM,OAAb,CAAqB,UAACD,GAAD;AAAA,WAAuBE,MAAM,CAACF,GAAD,EAAML,GAAG,CAACK,GAAD,CAAT,CAA7B;AAAA,GAArB;AACH,CALM;AAOA,IAAMD,GAAG,GAAG,SAANA,GAAM,CACfJ,GADe,E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uBAAe,EAAEiI,oEAAuBA;AAD5C,SAEOlI,cAAc,CAACiJ,SAAD,CAFrB;AAIH,KALD;;AAMA,WAAOC,8EAAW,CAACJ,aAAD,EAAgBC,KAAhB,EAAuBC,iBAAvB,CAAlB;AACH,GAXD;;AAYA,SAAOH,IAAP;AACH;;AAEM,IAAMM,OAAO,GAAGP,eAAe,CAAC5I,2DAAD,CAA/B,C;;;;;;;;;;;;AC7BM;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D,kC;;;;;;;;;;;;ACRa;AACb,8CAA8C,cAAc;AAC5D,qBAAqB,mBAAO,CAAC,kFAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;ACXa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wFAAwF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,+EAA+E;AAChF;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,2BAA2B;AAC3B,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,wC;;;;;;;;;;;;ACtQa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D,8BAA8B,mBAAO,CAAC,8IAA2C;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,iHAAiH,gBAAgB;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH,gBAAgB;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,qCAAqC;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2C;;;;;;;;;;;;AC1La;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,oCAAoC,aAAa,EAAE,EAAE;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,6BAA6B,mBAAO,CAAC,8IAAqC;AAC1E,2BAA2B,mBAAO,CAAC,4HAAkC;AACrE,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D,gBAAgB,mBAAO,CAAC,sGAAuB;AAC/C,gBAAgB,mBAAO,CAAC,sGAAuB;AAC/C,kBAAkB,mBAAO,CAAC,8FAAmB;AAC7C,eAAe,mBAAO,CAAC,4FAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,8BAA8B;AACnE,uCAAuC,gCAAgC;AACvE,uCAAuC,gCAAgC;AACvE,uCAAuC,gCAAgC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB,EAAE;AACvE,0CAA0C,0BAA0B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,8CAA8C,0BAA0B,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,sDAAsD,4BAA4B;AAClF;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,0IAA0I,EAAE;AAC7M,oDAAoD,YAAY,2IAA2I,EAAE;AAC7M,8CAA8C,YAAY,8HAA8H,EAAE;AAC1L,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oC;;;;;;;;;;;;AC1Pa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iBAAiB,EAAE;AAC5E;AACA;AACA;AACA,sDAAsD,8BAA8B,EAAE;AACtF;AACA;AACA;AACA,yDAAyD,8BAA8B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iC;;;;;;;;;;;;ACvCa;AACb;AACA;AACA,kCAAkC,oCAAoC,aAAa,EAAE,EAAE;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,cAAc,mBAAO,CAAC,4EAAU;AAChC,oCAAoC,mBAAO,CAAC,8GAAqB;AACjE,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG;AACpG;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;;;;;;ACtXa;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,8IAAqC;AAC/D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,8GAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,8C;;;;;;;;;;;;AChCa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,cAAc,mBAAO,CAAC,4EAAU;AAChC,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8JAA8J;AAC9J,0FAA0F,gBAAgB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAsI,YAAY,oJAAoJ,EAAE;AACxS;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iLAAiL;AACjL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY,2dAA2d;AAC5gB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,iCAAiC,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6C;;;;;;;;;;;;ACzWa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,oCAAoC,aAAa,EAAE,EAAE;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,oCAAoC,mBAAO,CAAC,8GAAqB;AACjE,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C,cAAc,mBAAO,CAAC,4EAAU;AAChC,2BAA2B,mBAAO,CAAC,gHAAsB;AACzD,0BAA0B,mBAAO,CAAC,8GAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,uDAAuD,eAAe;AACtE,uDAAuD,eAAe;AACtE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC,qBAAqB;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+C;;;;;;;;;;;;AC/La;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,oBAAoB,aAAa;AACjC,oBAAoB,WAAW;AAC/B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA,0C;;;;;;;;;;;;AC/Ba;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA;AACA,iDAAiD,oBAAoB,+CAA+C;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,qFAAqF;AAC1J;AACA;AACA;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB,qDAAqD;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,sBAAsB;AAC3F;AACA;AACA;AACA,iDAAiD,oBAAoB,oBAAoB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,qCAAqC;AAC1F;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,oD;;;;;;;;;;;;AC3Oa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA,yDAAyD,wBAAwB,uBAAuB,iCAAiC;AACzI,sJAAsJ;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,sJAAsJ;AACtJ;AACA;AACA,uFAAuF,gBAAgB;AACvG;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,8C;;;;;;;;;;;;ACvEa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB,qDAAqD;AAC9H;AACA;AACA,qDAAqD,oBAAoB,yFAAyF;AAClK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA,iDAAiD,oBAAoB,0CAA0C;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,sBAAsB;AAC3F;AACA;AACA;AACA,iDAAiD,oBAAoB,oBAAoB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,0CAA0C;AAC/F;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,+C;;;;;;;;;;;;ACvQa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB,kBAAkB,EAAE;AAC7D,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yC;;;;;;;;;;;;AC3Da;AACb;AACA;AACA,kCAAkC,oCAAoC,aAAa,EAAE,EAAE;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,iCAAiC,mBAAO,CAAC,qKAAqC;AAC9E,cAAc,mBAAO,CAAC,+EAAa;AACnC,oCAAoC,mBAAO,CAAC,+GAAsB;AAClE,sBAAsB,mBAAO,CAAC,uGAAkB;AAChD,kCAAkC,mBAAO,CAAC,iHAAuB;AACjE,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D,iBAAiB,mBAAO,CAAC,kGAAY;AACrC,oBAAoB,mBAAO,CAAC,wGAAe;AAC3C,eAAe,mBAAO,CAAC,8FAAU;AACjC,iBAAiB,mBAAO,CAAC,kGAAY;AACrC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L,yDAAyD,YAAY,gIAAgI,EAAE;AACvM,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH;AACrH;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,oGAAoG;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,0C;;;;;;;;;;;;AC9Ia;AACb,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,iHAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iD;;;;;;;;;;;;AC1Da;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,eAAe,mBAAO,CAAC,8FAAU;AACjC,4BAA4B,mBAAO,CAAC,mHAAwB;AAC5D,iCAAiC,mBAAO,CAAC,6HAA6B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;ACjFa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,0BAA0B,mBAAO,CAAC,+GAAsB;AACxD,uBAAuB,mBAAO,CAAC,yGAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,uC;;;;;;;;;;;;ACpIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,0BAA0B,mBAAO,CAAC,+GAAsB;AACxD,4BAA4B,mBAAO,CAAC,mHAAwB;AAC5D,iCAAiC,mBAAO,CAAC,6HAA6B;AACtE,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,0BAA0B;AAC1B;AACA,2GAA2G;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,8EAA8E;AAC9E,SAAS;AACT;AACA,6FAA6F;AAC7F;AACA,6KAA6K;AAC7K;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,wCAAwC;AAC7F;AACA;AACA,yCAAyC,YAAY,0CAA0C;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,0FAA0F,wBAAwB,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;AC1Pa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,uCAAuC,EAAE;AACnF,6CAA6C,uBAAuB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,+CAA+C,SAAS,uFAAuF;AAC/I,iBAAiB;AACjB,4DAA4D,kCAAkC;AAC9F;AACA;AACA,gEAAgE,sCAAsC,2CAA2C;AACjJ;AACA,SAAS;AACT;AACA;AACA,sDAAsD,4BAA4B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,kIAAkI;AAClI;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B;AACpF;AACA;AACA;AACA;AACA,yDAAyD,+BAA+B;AACxF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,oC;;;;;;;;;;;;ACjLa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,+BAA+B,mBAAO,CAAC,mIAAqC;AAC5E,+BAA+B,mBAAO,CAAC,mIAAqC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;;;;;;AC9Ba;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,mFAAa;AACvC,2CAA2C,qCAAqC,4BAA4B,EAAE,EAAE;AAChH,gBAAgB,mBAAO,CAAC,+EAAW;AACnC,0CAA0C,qCAAqC,yBAAyB,EAAE,EAAE;AAC5G,iC;;;;;;;;;;;;ACPa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA,wIAAwI;AACxI;AACA;AACA;AACA;AACA,+CAA+C,SAAS,sDAAsD;AAC9G,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE,KAAK;AACL;AACA;AACA,kD;;;;;;;;;;;;ACpCa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,4HAAkC;AACrE,eAAe,mBAAO,CAAC,sGAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,6BAA6B,0CAA0C,qBAAqB,mBAAmB;AACtK;AACA,SAAS;AACT;AACA,yIAAyI;AACzI;AACA;AACA;AACA;AACA;AACA,mDAAmD,6BAA6B,gCAAgC,gBAAgB,aAAa;AAC7I;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kD;;;;;;;;;;;;AChDa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA,wDAAwD,0BAA0B,gCAAgC,wEAAwE,yLAAyL;AACnX;AACA;AACA;AACA;AACA,mFAAmF,wBAAwB,qKAAqK,wKAAwK,EAAE;AAC1b;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAkI,sEAAsE,EAAE;AAC1M;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;;;;;ACrIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE,yBAAyB,mBAAO,CAAC,wHAAgC;AACjE,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH;AACvH;AACA;AACA,uDAAuD,6BAA6B,yCAAyC,2BAA2B;AACxJ;AACA;AACA;AACA,mnBAAmnB;AACnnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,YAAY,6BAA6B,mBAAmB,iMAAiM,GAAG;AAC7T,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wLAAwL;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,oGAAoG,2CAA2C,EAAE;AACjJ,wDAAwD,sBAAsB,2CAA2C,qFAAqF,oDAAoD;AAClQ;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;;;;;ACxIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,2IAA2I;AACtM;AACA;AACA,8CAA8C,aAAa,iFAAiF;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,2IAA2I;AACtM;AACA;AACA,8CAA8C,aAAa,iFAAiF;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,+BAA+B,EAAE;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,+BAA+B,EAAE;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;;;;;ACrKa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,8BAA8B,mBAAO,CAAC,gHAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;;;;;AClFa;AACb,8CAA8C,cAAc;AAC5D;AACA,qBAAqB,mBAAO,CAAC,gIAAyB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iD;;;;;;;;;;;;AC/Ga;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,iBAAiB,mBAAO,CAAC,yFAAgB;AACzC,0BAA0B,mBAAO,CAAC,yHAAgC;AAClE,4BAA4B,mBAAO,CAAC,6HAAkC;AACtE,sBAAsB,mBAAO,CAAC,iHAA4B;AAC1D,uBAAuB,mBAAO,CAAC,+HAAmC;AAClE,wBAAwB,mBAAO,CAAC,mHAA6B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,4GAA4G;AAC5G;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,qaAAqa;AACra;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA,sDAAsD,qBAAqB,8BAA8B,2BAA2B,wOAAwO,+iCAA+iC;AAC35C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,SAAS;AACT,sDAAsD,oDAAoD,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;;;;;ACtEa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sIAAuD;AAC9E,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,kGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4CAA4C,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA,aAAa;AACb,2CAA2C,SAAS,yEAAyE;AAC7H;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA,mBAAmB,iBAAiB;AACpC,uCAAuC,mBAAmB,6DAA6D;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,YAAY,uDAAuD;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA,qDAAqD,wBAAwB,0BAA0B;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,4BAA4B,EAAE;AACtF,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,oBAAoB,EAAE;AACzE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,SAAS;AACT,KAAK;AACL,6DAA6D,YAAY,EAAE;AAC3E,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+HAA+H,uFAAuF,EAAE;AACxN;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,4CAA4C,KAAK,qHAAqH,sEAAsE,EAAE,8FAA8F;AACvX,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,+DAA+D,8BAA8B,iOAAiO;AAC9T;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,aAAa,uCAAuC;AAC1F;AACA;AACA,sCAAsC,aAAa,qCAAqC;AACxF;AACA;AACA,sCAAsC,aAAa,oHAAoH;AACvK;AACA;AACA,sCAAsC,aAAa,oHAAoH;AACvK;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;AC9iBa;AACb,8CAA8C,cAAc;AAC5D,qBAAqB,mBAAO,CAAC,8HAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;ACXa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wFAAwF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,+EAA+E;AAChF;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,2BAA2B;AAC3B,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,wC;;;;;;;;;;;;ACrQa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB,wDAAwD;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C,kCAAkC,WAAW,oBAAoB,kBAAkB,8BAA8B,GAAG;AACpH,aAAa,GAAG;AAChB;AACA;AACA;AACA;;;;;;;;;;;;;ACjFa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,oJAAqB;AACvD,cAAc,mBAAO,CAAC,4HAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2JAA2J;AAC3J;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,uCAAuC,EAAE;AAC/G;AACA;AACA;AACA,uEAAuE,wCAAwC,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,aAAa;AACb,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,aAAa;AACb,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;;;;;;ACpOa;AACb;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA,uCAAuC,QAAQ,iEAAiE;AAChH,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA,qEAAqE,sCAAsC,EAAE;AAC7G;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D,oCAAoC,4BAA4B;AAChE,2CAA2C,4BAA4B;AACvE,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,qDAAqD,mCAAmC,EAAE;AAC1F;AACA,4CAA4C,wEAAwE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA,0CAA0C,yBAAyB;AACnE,uCAAuC,sBAAsB;AAC7D,oCAAoC,2BAA2B;AAC/D,2CAA2C,kCAAkC;AAC7E,0CAA0C,yCAAyC;AACnF,oCAAoC,mCAAmC;AACvE;AACA;AACA;AACA;AACA,yFAAyF,oBAAoB,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iCAAiC,wDAAwD;AACzF,iC;;;;;;;;;;;;ACpKa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB,iCAAiC,mCAAmC,sCAAsC;AACrK,4CAA4C,0BAA0B;AACtE;AACA,gDAAgD,0BAA0B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,6C;;;;;;;;;;;;ACnIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB,wDAAwD;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD,2CAA2C,YAAY,6BAA6B,mBAAmB,8BAA8B,GAAG;AACxI,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;AChFa;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gBAAgB,mBAAO,CAAC,sEAAW;AACnC,iBAAiB,mBAAO,CAAC,wEAAY;AACrC,eAAe,mBAAO,CAAC,8EAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,wCAAwC;AACxC,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,qIAAqI,4DAA4D,uDAAuD,EAAE;AAC1P;AACA;AACA,wCAAwC,8DAA8D;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,oCAAoC,mCAAmC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,6CAA6C;AACzF,oCAAoC,2BAA2B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kD;;;;;;;;;;;;AC5Na;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;ACRa;AACb,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,8EAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+JAA+J,8BAA8B,EAAE;AAC/L;AACA;AACA;AACA;AACA,+JAA+J,4BAA4B,EAAE;AAC7L;AACA;AACA;AACA;AACA,6GAA6G,0CAA0C,EAAE;AACzJ;AACA;AACA;AACA;AACA,4GAA4G,oBAAoB,EAAE;AAClI;AACA;AACA;AACA;AACA,4GAA4G,2BAA2B,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;;;;;;AC9Ea;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,iBAAiB,EAAE;AAC3H;AACA;AACA,kC;;;;;;;;;;;;AC/Ca;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC,EAAE;AAC5E;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AMgE,SAAS,GAAG,SAAZA,SAAY,CAACD,MAAD,EAAyB;AACvC,SAAO;AACHG,cAAU,EAAE;AACR5V,UAAI,EAAEyV,MAAM,GAAG,aADP;AAERI,aAAO,EAAE;AAFD,KADT;AAKHC,iBAAa,EAAE;AACX9V,UAAI,EAAEyV,MAAM,GAAG,gBADJ;AAEXM,eAAS,EAAE,CACP;AACI/V,YAAI,EAAE,WADV;AAEIC,YAAI,EAAE;AAFV,OADO,CAFA;AAQX4V,aAAO,EAAE;AARE;AALZ,GAAP;AAgBH,CAjBD;;AA4BO,IAAMN,SAAoB,GAAG;AAChCH,uBAAqB,EAAEA,qBADS;AAEhCD,uBAAqB,EAAEA,qBAFS;AAGhCpE,gBAAc,EAAEA,cAHgB;AAIhCuE,YAAU,EAAEA,UAJoB;AAKhC3F,mBAAiB,EAAEA;AALa,CAA7B,C","file":"processor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./generated_module/src/processor.ts\");\n","export type Dictionary<T> = Record<string, T>;\n\n/** @returns the non-prototype keys of the given object */\nexport const getKeys = (obj: object): string[] => {\n /* eslint-disable-line */\n return Object.getOwnPropertyNames(obj);\n};\n\nexport const values = <T = any>(obj: { [key: string]: T }): T[] => {\n return getKeys(obj).map((key: string): T => obj[key]);\n};\n\nexport const forEach = <T>(\n obj: Dictionary<T>,\n action: (key: string, value: T) => void,\n): void => {\n getKeys(obj).forEach((key: string): void => action(key, obj[key]));\n};\n\nexport const map = <T, R>(\n obj: Dictionary<T>,\n mapper: (key: string, value: T) => R,\n): R[] => {\n return getKeys(obj).map((key: string): R => mapper(key, obj[key]));\n};\n\ntype NonNullAssertion = <T>(val: T, msg?: string) => asserts val is NonNullable<T>;\n\nexport const assertNotNull: NonNullAssertion = <T>(\n val: T,\n msg?: string,\n): asserts val is NonNullable<T> => {\n if (val == null) {\n throw new Error(msg);\n }\n};\n\nexport const toDictionary = <T, V>(\n arr: T[],\n keyMapper: (input: T) => string,\n valueMapper: (input: T) => V,\n): Dictionary<V> => {\n const result: Dictionary<V> = {};\n arr.forEach((entry) => {\n result[keyMapper(entry)] = valueMapper(entry);\n });\n return result;\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface\";\nimport {\n MyRegister,\n RegisterValue,\n RegisterValues,\n SettingValue,\n} from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\nimport { AppModel } from \"../types/AutoModuleTypes\";\nimport { SoftwareComboBoxComponent } from \"@microchip/melody-automodule-interface/lib/src/SoftwareComponents\";\nimport { Handle, InterfaceId } from \"@microchip/scf-common\";\nimport { Import, Option } from \"@microchip/scf-common/lib/Processor\";\nimport * as Device from \"@microchip/scf-device\";\nimport { Setting } from \"@microchip/scf-device\";\nimport CalculateRegisterValue from \"@microchip/scf-device/lib/CalculateRegisterValue\";\nimport { getOptionByAlias, getOptionByName } from \"@microchip/scf-device/lib/Setting\";\nimport { filter, find, map } from \"@microchip/scf-device/lib/util/Arrays\";\nimport { MyPeripheral } from \"../types\";\nimport { getKeys } from \"../Utils\";\n\nexport const castComponent = (\n component: ModuleConfig.Component,\n): ModuleConfig.Component => {\n switch (component.category) {\n case \"software\":\n return component;\n case \"import\":\n return component;\n case \"hardware\":\n return component;\n default:\n throw Error(\"Unsupported Component Type\");\n }\n};\n\nexport const getDefaultValue = (\n overrideDefaultValues: ((componentName: string) => any) | undefined,\n component: ModuleConfig.SoftwareComponent,\n): ModuleConfig.SoftwareComponent[\"defaultValue\"] => {\n return (\n overrideDefaultValues?.(component.name) ??\n (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue)\n );\n};\n\nexport const getComboOptions = (\n overrideOptions: ((componentName: string) => string[]) | undefined,\n component: SoftwareComboBoxComponent,\n): any[] => {\n return overrideOptions?.(component.name) ?? component?.defaultValue?.[\"options\"];\n};\n\nexport const hasConfigBits = (interfaceName: string): boolean => {\n return getFriendlyInterfaceId(interfaceName)?.indexOf(\"configuration_bits\") != -1;\n};\n\nexport const getRegisterValues = (\n model: AppModel,\n interfaceName?: string,\n): RegisterValues => {\n const registers: RegisterValues = {} as RegisterValues;\n const config = model.getDerivedData().getModuleConfig?.();\n interfaceName = getFriendlyInterfaceId(interfaceName);\n\n config?.peripherals?.forEach((peripheral) => {\n const peripheralName = getFriendlyInterfaceId(peripheral.interfaceId.name) ?? \"\";\n if (hasConfigBits(peripheralName)) return;\n if (\n (interfaceName != undefined && peripheralName !== interfaceName) ||\n !peripheral.registers\n )\n return;\n getKeys(peripheral.registers ?? {})?.forEach((regName) => {\n let registerValue: RegisterValue<string>;\n const reg = model.getHardware(peripheralName)?.getPeripheral().registers?.[\n regName\n ];\n if (reg) {\n registerValue = {\n comment: \"\",\n value: 0,\n valueAsHex: \"0x00\",\n name: reg?.name,\n alias: reg?.alias ?? reg?.name,\n settings: {},\n };\n } else {\n return;\n }\n\n const registerVal = CalculateRegisterValue.for(reg as Device.Register);\n const comments: string[] = [];\n peripheral.registers?.[regName].forEach((set) => {\n const setting: Device.Setting | undefined = reg.settings?.[set.setting];\n if (setting) {\n if (setting.type !== \"R\") {\n //Add Comments\n comments.push(\n `${set.setting} ${model.getComponentValue(set.name)}; `,\n );\n }\n if (registerValue?.settings) {\n registerValue.settings[setting.alias] = getSettingBits(\n reg,\n setting,\n model.getComponent(set.name)?.value as string,\n config?.deviceType ?? \"PIC\",\n );\n }\n switch (set.type) {\n case \"ComboBox\":\n case \"boolean\":\n registerVal.withNumberValue(\n setting,\n getOptionValueByName(\n setting,\n model.getComponent(set.name)?.value as string,\n ) ?? 0,\n );\n break;\n case \"number\":\n registerVal.withNumberValue(\n setting,\n model.getComponentValue(set.name as string) as number,\n );\n break;\n case \"register\":\n case \"string\":\n registerVal.withNumberValue(\n setting,\n Number(model.getComponentValue(set.name)),\n );\n break;\n default:\n break;\n }\n }\n });\n if (reg.settings) {\n registerValue.value = registerVal.asNumber();\n } else {\n registerValue.value = Number(\n model.getComponentValue(\n peripheral.registers?.[regName]?.[0]?.name ?? \"\",\n ) ?? 0,\n );\n comments.push(`${registerValue.name} ${registerValue.value}; `);\n }\n registerValue.valueAsHex =\n \"0x\" + registerValue.value.toString(16).toUpperCase();\n registerValue.comment = sortComments(comments, reg);\n\n registers[reg?.alias ?? reg.name] = registerValue;\n });\n });\n\n return registers;\n};\n\nconst sortComments = (comments: string[], register: MyRegister): string => {\n comments.sort((a, b): number => {\n const settingA = register.settings?.[a.split[\" \"]?.[0]];\n const settingB = register.settings?.[b.split(\" \")?.[0]];\n return Number(settingB?.mask) - Number(settingA?.mask);\n });\n\n return comments.join(\"\");\n};\n\nexport const getSettingBits = (\n register: MyRegister,\n setting: Device.Setting,\n value: string,\n deviceType: string,\n): SettingValue => {\n const setValNumber = Number(getOptionByAlias(value, setting)?.value ?? 0);\n const settingValue: SettingValue = {\n alias: setting.alias,\n name: setting.name,\n value: setValNumber ?? 0,\n valueAsHex: \"0x\" + setValNumber.toString(16).toUpperCase(),\n valueAsDescription: value,\n bitName:\n deviceType === \"PIC\"\n ? `${register.name}bits.${setting.name}`\n : `${register.name}.${setting.name}`,\n };\n return settingValue;\n};\n\nconst getRegisterFromComponent = (\n hardware: MyPeripheral | undefined,\n component: ModuleConfig.HardwareComponent,\n): MyRegister | undefined => {\n const registerName = component.name\n .replace(component.setting.toLowerCase(), \"\")\n ?.toUpperCase();\n const register = hardware?.registers?.[registerName];\n\n if (register) {\n return register;\n } else {\n const regName = component.name\n .replace(component.setting.toLowerCase(), \"\")\n ?.toUpperCase();\n const registers: string[] | undefined = getKeys(hardware?.registers ?? {});\n for (const reg of registers ?? []) {\n const modifiedRegName = reg.replace(/_/g, \"\");\n if (regName === modifiedRegName) {\n return hardware?.registers?.[reg];\n }\n }\n }\n};\n\nexport const getSettingFromComponent = (\n model: AppModel,\n component: ModuleConfig.HardwareComponent,\n): Device.Setting | undefined => {\n const config = model.getDerivedData().getModuleConfig?.();\n let setting: Device.Setting | undefined;\n\n if (model) {\n config?.peripherals?.forEach((peripheral) => {\n if (setting) return;\n const peripheralName = getFriendlyInterfaceId(peripheral.interfaceId.name);\n const hardware = model.getHardware(peripheralName)?.getPeripheral();\n const register = getRegisterFromComponent(hardware, component);\n if (register && !register.settings) {\n //No settings for this particular register. Create one\n setting = {\n alias: register.alias ?? register.name,\n name: register.name,\n defaultValue: register.defaultValue,\n type: register.type,\n description: register.desc,\n porDefault: register.defaultValue,\n };\n } else {\n setting = register?.settings?.[component.setting];\n }\n });\n }\n\n return setting;\n};\n\nexport const getOptionValueByName = (\n setting: Device.Setting,\n optionName: string,\n): number | undefined => {\n if (!setting) return undefined;\n\n let optionValue: string | undefined = setting.porDefault;\n if (setting.options) {\n setting.options.forEach((option) => {\n if (option.name === optionName || option.description === optionName) {\n optionValue = option.value;\n }\n });\n }\n return Number(optionValue);\n};\n\nexport const getSettingDefaultIfPresent = (\n component: ModuleConfig.HardwareComponent,\n setting: Setting | undefined,\n overrideDefaultValue: any | undefined,\n): string | undefined => {\n let defaultValue: string | undefined;\n if (overrideDefaultValue !== undefined) {\n return overrideDefaultValue;\n }\n if (component.overrideDefaultValue) {\n return component.overrideDefaultValue;\n }\n\n if (setting?.defaultValue) {\n const option = getOptionByName(setting.defaultValue, setting);\n defaultValue =\n option?.[component.displayOptionSetting ?? \"alias\"] ?? setting.defaultValue;\n }\n return defaultValue;\n};\n\nexport const isInterface = (idA: InterfaceId, idB: InterfaceId): boolean => {\n return idA.name == idB.name;\n};\n\nexport const getSettingOptionsIfPresent = (\n component: ModuleConfig.HardwareComponent,\n setting: Device.Setting | undefined,\n masterComponentValue?: string,\n): string[] => {\n let options = [\"\"];\n\n if (setting) {\n const filteredOptions = component.mode\n ? filterModeOptions(setting.options ?? [], component, masterComponentValue)\n : setting.options;\n options = map(\n filteredOptions ?? [],\n (option) => option[component.displayOptionSetting ?? \"alias\"] ?? option.alias,\n );\n }\n return options;\n};\n\nconst filterModeOptions = (\n options: Device.Option[],\n component: ModuleConfig.Component,\n masterComponentValue?: string,\n): Device.Option[] => {\n if (component.mode?.operation != \"filterOptions\" || masterComponentValue == undefined)\n return options;\n //Determine mode\n const mode = find(getKeys(component.mode?.optionModes ?? {}) ?? [], (mode) => {\n const match = component.mode?.optionModes?.[mode];\n if (match) {\n return (masterComponentValue?.match(match)?.length ?? -1) > 0;\n }\n return false;\n });\n const filteredOptions = filter(options ?? [], (option) => {\n if (option.mode && mode) {\n const match = component.mode?.optionModes?.[mode];\n if (match) {\n return (option.mode.match(match)?.length ?? -1) > 0;\n }\n }\n return true;\n });\n return filteredOptions;\n};\n\nexport const getProcessedHandle = (\n handle?: Handle,\n payload?: Import[\"payload\"],\n): Handle | undefined => {\n if (handle) {\n handle = {\n ...handle,\n label:\n payload?.customName ??\n handle?.label ??\n payload?.moduleName ??\n payload?.name ??\n handle.providerId + \" : \" + handle.exportId,\n };\n }\n\n return handle;\n};\n\nexport interface DependencyDropdownOption {\n label: string;\n value?: Option<any, any>;\n}\nexport class DependencySelector {\n private noneSelection: DependencyDropdownOption = { label: \"None\" };\n private model: AppModel;\n private component: ModuleConfig.DependencyComponent;\n\n constructor(model: AppModel, component: ModuleConfig.DependencyComponent) {\n this.model = model;\n this.component = component;\n }\n\n generateDropdownOptions(): DependencyDropdownOption[] {\n const dropdownOptions: DependencyDropdownOption[] = [];\n const thisImport: Import | undefined = this.model.getImports()[\n this.component.importId\n ];\n const options: Option<any, any>[] | undefined = thisImport?.options;\n\n if (this.shouldAllowUnselectDependency(thisImport, options)) {\n dropdownOptions.push(this.noneSelection);\n }\n if (options) {\n for (const option in options) {\n dropdownOptions.push(this.createOptionEntry(options[option]));\n }\n }\n\n return dropdownOptions;\n }\n\n getDropdownOptionNames(): string[] {\n const names: string[] = [];\n this.generateDropdownOptions().forEach((option) => names.push(option.label));\n return names;\n }\n\n private createOptionEntry = (option: Option): DependencyDropdownOption => {\n return {\n label: this.createOptionLabel(option.handle, option.payload),\n value: option,\n };\n };\n\n createOptionLabel = (handle: Handle, payload: Import[\"payload\"]): string => {\n return getProcessedHandle(handle, payload)?.label ?? \"\";\n };\n\n private shouldAllowUnselectDependency(\n thisImport: Import | undefined,\n options: Option<any, any>[] | undefined,\n ): boolean {\n return (\n thisImport != undefined &&\n thisImport.isUnassignable != false &&\n options !== undefined\n );\n }\n}\n\nexport function getModuleDefaultDescription(): string | undefined {\n //TODO: Need to refactor this so that gets it from the source.\n //Alternatively, we could get it during the automodule update process and fetch it from there...\n return undefined;\n}\n\nexport const getFriendlyInterfaceId = (\n interfaceName: string | undefined,\n): string | undefined => {\n interfaceName = interfaceName?.replace(/ /g, \"\").replace(/-/g, \"_\");\n\n return interfaceName;\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface\";\nimport { ConfigValues } from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\nimport { ComponentValueTypes } from \"@microchip/melody-automodule-interface/lib/src/ModuleConfig\";\nimport { SoftwareComboBoxComponent } from \"@microchip/melody-automodule-interface/lib/src/SoftwareComponents\";\nimport { ComponentValueList } from \"@microchip/melody-automodule-interface/lib/src/types\";\nimport { ComboBox } from \"@microchip/scf-autoview/lib/simpleForm/simpleForm-types\";\nimport { Setting } from \"@microchip/scf-device\";\nimport { find } from \"@microchip/scf-device/lib/util/Arrays\";\nimport { AppModel } from \"../types/AutoModuleTypes\";\nimport { getKeys, values } from \"../Utils\";\nimport * as AutoModuleHelper from \"./AutoModuleHelpers\";\nimport { getComboOptions } from \"./AutoModuleHelpers\";\n\nexport const getTemplatePayload = (model: AppModel | undefined): any => {\n if (!model) return undefined;\n const config = model.getDerivedData().getModuleConfig?.();\n const moduleName = model.getName();\n\n let templatePayload = {\n name: {\n uppercase: moduleName.toUpperCase(),\n lowercase: moduleName.toLowerCase(),\n instance: moduleName,\n },\n filename: {\n source: `${moduleName.toLowerCase()}.c`,\n header: `${moduleName.toLowerCase()}.h`,\n },\n };\n\n const components: ComponentValueList = model\n .getAutoModuleAppModel()\n .getAllComponents();\n\n values(components)?.forEach((entry) => {\n templatePayload[entry.component.name] = getComponentPayload(\n entry.component,\n model,\n );\n });\n\n templatePayload = {\n ...templatePayload,\n ...getTemplateSettings(model, config),\n };\n\n return templatePayload;\n};\n\nexport const getTemplateSettings = (\n model: AppModel,\n config?: ModuleConfig.ModuleConfig,\n): Record<string, any> | undefined => {\n if (!model?.getHardware()) return undefined;\n\n return {\n registers: model.getRegisterValues(undefined),\n interrupts: model.getHardware()?.getPeripheral().interrupts,\n properties: model.getHardware()?.getPeripheral().properties,\n };\n};\n\nexport const getConfigBits = (model: AppModel): ConfigValues => {\n const config = model.getDerivedData().getModuleConfig?.();\n const configModule = find(config?.peripherals ?? [], (peripheral) => {\n return AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name);\n });\n if (configModule) {\n const interfaceName = AutoModuleHelper.getFriendlyInterfaceId(\n configModule.interfaceId.name,\n );\n let templateConfigBits: ConfigValues = {};\n const registers = model.getHardware(interfaceName)?.getPeripheral().registers;\n getKeys(registers ?? [])?.forEach((configName) => {\n const configBits = configModule.registers?.[configName];\n templateConfigBits = {\n ...templateConfigBits,\n [configName]: {},\n };\n configBits?.forEach((configBit) => {\n const register = registers?.[configName];\n let value: string;\n if (register && !register.settings) {\n //missing settings for register\n value = model.getComponent(configBit.name)?.value ?? \"\";\n } else {\n const setting: Setting | undefined =\n registers?.[configName]?.settings?.[configBit.setting];\n value =\n find(\n setting?.options ?? [],\n (option) =>\n option.description ===\n model.getComponent(configBit.name)?.value ||\n option.alias ===\n model.getComponent(configBit.name)?.value ||\n option.name === model.getComponent(configBit.name)?.value,\n )?.name ?? \"\";\n }\n\n templateConfigBits[configName][configBit.setting] = {\n name: configBit.setting,\n value: value,\n description: configBit.description,\n valueAsDescription: model.getComponent(configBit.name)\n ?.value as string,\n };\n });\n });\n return templateConfigBits;\n } else {\n return {};\n }\n};\n\nconst getComponentPayload = (\n component: ModuleConfig.Component,\n model: AppModel,\n): ComponentValueTypes | ComboBox => {\n const componentValue = model.getComponentValue(component.name);\n switch (component.type) {\n case \"ComboBox\":\n if (component.category === \"hardware\") {\n const setting:\n | Setting\n | undefined = AutoModuleHelper.getSettingFromComponent(\n model,\n component,\n );\n return {\n value: componentValue,\n options: AutoModuleHelper.getSettingOptionsIfPresent(\n component,\n setting,\n model.getComponentValue(\n component.mode?.masterComponent ?? \"\",\n ) as string,\n ),\n };\n } else if (component.category === \"software\") {\n return {\n value: componentValue,\n options: getComboOptions(\n model.getDerivedFunctions().overrideOptions,\n component as SoftwareComboBoxComponent,\n ),\n };\n }\n break;\n case \"boolean\":\n return model.isComponentValue(component.name);\n case \"number\":\n case \"string\":\n case \"register\":\n default:\n return componentValue;\n }\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface/lib/src/ModuleConfig\";\nimport { PinsData } from \"@microchip/melody-automodule-interface/lib/src/pins\";\nimport { PinsLogic } from \"@microchip/melody-automodule-interface/lib/src/types\";\nexport { getCreatorFunctions } from \"../../src/CreatorFunctions\";\nexport { getDerivedData } from \"../../src/DerivedData\";\n\nexport const getPinsDataFromFile = (): PinsData | undefined => {\n try {\n return require(\"../../src/pinsdata.json\");\n } catch {\n return undefined;\n }\n};\n\nexport const getPinsLogicFromFile = (): PinsLogic | undefined => {\n try {\n return require(\"../../src/PinsLogic.ts\");\n } catch {\n return undefined;\n }\n};\n\nexport const getModuleConfigFromFile = (): ModuleConfig | undefined => {\n try {\n return require(\"../../src/moduleConfig.json\");\n } catch {\n return undefined;\n }\n};\n","import { pin_row } from \"@microchip/pin-standard\";\nimport { PinsData } from \"@microchip/melody-automodule-interface/lib/src/pins\";\nimport {\n AppModel,\n PinsLogic,\n} from \"@microchip/melody-automodule-interface/lib/src/types\";\nimport { getPinsDataFromFile, getPinsLogicFromFile } from \"../getUserData\";\n\nconst mockPinsLogic = (getPinsData: GetPinsData): PinsLogic => {\n const getCompletePinData = (appModel: AppModel): any => {\n return {};\n };\n const getRowData = (appModel: AppModel, rowData: pin_row): pin_row => {\n return rowData;\n };\n return {\n getCompletePinData: getCompletePinData,\n getRowData: getRowData,\n getPinsData: getPinsData,\n };\n};\n\ntype GetPinsData = typeof getPinsData;\nexport const getPinsData = (): PinsData => getPinsDataFromFile() ?? { rows: [] };\n\nexport const getPinsLogic = (): PinsLogic => {\n const pinsLogic = getPinsLogicFromFile();\n if (pinsLogic) {\n return {\n ...pinsLogic,\n getPinsData: getPinsData,\n };\n } else {\n return mockPinsLogic(getPinsData);\n }\n};\n","import { process as autoProcess } from \"@microchip/scf-automodule-impl\";\nimport { AppModel, DerivedData } from \"@microchip/melody-automodule-interface\";\nimport { ProcessorStages } from \"@microchip/melody-automodule-interface/lib/src/InterfaceTypes\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport { getModuleConfigFromFile, getDerivedData } from \"./getUserData\";\n\nexport type LegacyProcessFunction = (\n initialModule: Processor.Module,\n stage: ProcessorStages,\n) => Processor.ProcessedModule;\n\nfunction createProcessor(\n getDerivedData: (dataModel?: AppModel) => DerivedData,\n): LegacyProcessFunction {\n const hook = (\n initialModule: Processor.Module,\n stage: ProcessorStages,\n ): Processor.ProcessedModule => {\n const derivedDataGetter = (dataModel: AppModel): DerivedData => {\n return {\n getModuleConfig: getModuleConfigFromFile,\n ...getDerivedData(dataModel),\n };\n };\n return autoProcess(initialModule, stage, derivedDataGetter);\n };\n return hook;\n}\n\nexport const process = createProcessor(getDerivedData);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RowPrefix = void 0;\nvar RowPrefix;\n(function (RowPrefix) {\n RowPrefix[\"Default\"] = \"defaultRow_\";\n RowPrefix[\"Dynamic\"] = \"dynamicRow_\";\n})(RowPrefix = exports.RowPrefix || (exports.RowPrefix = {}));\n//# sourceMappingURL=Tables.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pin_standard_1 = require(\"./pin-standard\");\nexports.pin_standard = pin_standard_1.pin_standard;\nexports.pin_state = pin_standard_1.pin_state;\nexports.direction = pin_standard_1.direction;\nexports.behaviour = pin_standard_1.behaviour;\nexports.data_schema = pin_standard_1.data_schema;\nexports.pin_attribs_enum = pin_standard_1.pin_attribs_enum;\nexports.actiontype = pin_standard_1.actiontype;\nexports.QueryAdapterKey = pin_standard_1.QueryAdapterKey;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pin_standard = function () {\n return {\n interfaceId: {\n name: \"pin-standard\",\n version: \"0.1.0\",\n },\n };\n};\nvar QueryAdapterKey;\n(function (QueryAdapterKey) {\n QueryAdapterKey[\"ALLPINS\"] = \"allpins\";\n QueryAdapterKey[\"ALLPINS_FOR_ATTRIBS\"] = \"allpins_for_attribs\";\n QueryAdapterKey[\"PPS\"] = \"pps\";\n QueryAdapterKey[\"APFCON\"] = \"apfcon\";\n QueryAdapterKey[\"PORTMUX\"] = \"portmux\";\n QueryAdapterKey[\"HASPPS\"] = \"hasPPS\";\n})(QueryAdapterKey = exports.QueryAdapterKey || (exports.QueryAdapterKey = {}));\nvar pin_state;\n(function (pin_state) {\n pin_state[\"EMPTY\"] = \"E\";\n pin_state[\"LOCKED\"] = \"L\";\n pin_state[\"UNLOCK\"] = \"UL\";\n pin_state[\"DiSABLE_LOCK\"] = \"DL\";\n pin_state[\"UNLOCKED_DISABLED\"] = \"DUL\";\n pin_state[\"LOCKED_LINK\"] = \"LL\";\n pin_state[\"UNLOCKED_MUX\"] = \"MUL\";\n pin_state[\"LOCKED_CONFLICT\"] = \"CL\";\n})(pin_state = exports.pin_state || (exports.pin_state = {}));\nvar pin_interrupts_enum;\n(function (pin_interrupts_enum) {\n pin_interrupts_enum[\"INTDIS_BUFFEN\"] = \"INTDIS_BUFFEN\";\n pin_interrupts_enum[\"BOTH_EDGES\"] = \"BOTH_EDGES\";\n pin_interrupts_enum[\"RISING_EDGE\"] = \"RISING_EDGE\";\n pin_interrupts_enum[\"FALLING_EDGE\"] = \"FALLING_EDGE\";\n pin_interrupts_enum[\"NONE\"] = \"NONE\";\n pin_interrupts_enum[\"LOW_LEVEL\"] = \"LOW_LEVEL\";\n})(pin_interrupts_enum = exports.pin_interrupts_enum || (exports.pin_interrupts_enum = {}));\nvar pin_attribs_enum;\n(function (pin_attribs_enum) {\n pin_attribs_enum[\"aliasReEx\"] = \"aliasReEx\";\n pin_attribs_enum[\"cname\"] = \"cname\";\n pin_attribs_enum[\"high\"] = \"high\";\n pin_attribs_enum[\"inv\"] = \"inv\";\n pin_attribs_enum[\"wpu\"] = \"wpu\";\n pin_attribs_enum[\"wpd\"] = \"wpd\";\n pin_attribs_enum[\"od\"] = \"od\";\n pin_attribs_enum[\"analog\"] = \"analog\";\n pin_attribs_enum[\"ioc\"] = \"ioc\";\n pin_attribs_enum[\"intcallback\"] = \"intcallback\";\n pin_attribs_enum[\"alias\"] = \"alias\";\n pin_attribs_enum[\"advInpBuff\"] = \"advInpBuff\";\n})(pin_attribs_enum = exports.pin_attribs_enum || (exports.pin_attribs_enum = {}));\nvar actiontype;\n(function (actiontype) {\n actiontype[\"SETACTION\"] = \"SETACTION\";\n actiontype[\"ATTRIBACTION\"] = \"ATTRIBACTION\";\n})(actiontype = exports.actiontype || (exports.actiontype = {}));\nvar direction;\n(function (direction) {\n direction[\"output\"] = \"output\";\n direction[\"input\"] = \"input\";\n direction[\"bidirectional\"] = \"bidirectional\";\n})(direction = exports.direction || (exports.direction = {}));\nvar behaviour;\n(function (behaviour) {\n behaviour[\"LOCK_UNLOCK\"] = \"LOCK_UNLOCK\";\n behaviour[\"ALWAYS_LOCKED\"] = \"ALWAYS_LOCKED\";\n behaviour[\"SINGLE_PIN_MUX\"] = \"SINGLE_PIN_MUX\";\n behaviour[\"OPTIONAL_PIN_MUX\"] = \"OPTIONAL_PIN_MUX\";\n behaviour[\"PPS\"] = \"PPS\";\n behaviour[\"APFCON\"] = \"APFCON\";\n behaviour[\"PORTMUX\"] = \"PORTMUX\";\n behaviour[\"EXCLUSIVE_LOCK\"] = \"EXCLUSIVE_LOCK\";\n behaviour[\"LOCKED_DISABLED\"] = \"LOCKED_DISABLED\";\n})(behaviour = exports.behaviour || (exports.behaviour = {}));\n//------------------------------------ schema ------------------------------------//\nexports.data_schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n $ref: \"#/definitions/intf_data\",\n definitions: {\n intf_data: {\n type: \"object\",\n properties: {\n rows: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_row\",\n },\n },\n },\n required: [\"rows\"],\n additionalProperties: false,\n },\n pin_row: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n module: {\n type: \"string\",\n },\n function: {\n type: \"string\",\n },\n direction: {\n $ref: \"#/definitions/direction\",\n },\n filter: {\n $ref: \"#/definitions/filter\",\n },\n behaviour: {\n $ref: \"#/definitions/behaviour\",\n },\n behaviourMeta: {\n $ref: \"#/definitions/behaviourMeta\",\n },\n attribs: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_attribs\",\n },\n },\n groupsdata: {\n $ref: \"#/definitions/pingroups_data\",\n },\n actions: {},\n },\n required: [\"name\", \"module\", \"function\", \"direction\", \"filter\", \"behaviour\"],\n additionalProperties: false,\n },\n direction: {\n type: \"string\",\n enum: [\"output\", \"input\", \"bidirectional\"],\n },\n filter: {\n type: \"object\",\n properties: {\n module: {\n type: \"string\",\n },\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"module\", \"aliasReEx\"],\n additionalProperties: false,\n },\n behaviour: {\n type: \"string\",\n enum: [\n \"LOCK_UNLOCK\",\n \"ALWAYS_LOCKED\",\n \"SINGLE_PIN_MUX\",\n \"OPTIONAL_PIN_MUX\",\n \"PPS\",\n \"PORTMUX\",\n \"EXCLUSIVE_LOCK\",\n \"LOCKED_DISABLED\",\n ],\n },\n behaviourMeta: {\n type: \"object\",\n properties: {\n lockPinRegEx: {\n type: \"string\",\n },\n },\n required: [\"lockPinRegEx\"],\n additionalProperties: false,\n },\n pin_attribs: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n cname: {\n type: \"string\",\n },\n high: {\n type: \"boolean\",\n },\n inv: {\n type: \"boolean\",\n },\n wpu: {\n type: \"boolean\",\n },\n wpd: {\n type: \"boolean\",\n },\n od: {\n type: \"boolean\",\n },\n analog: {\n type: \"boolean\",\n },\n ioc: {\n $ref: \"#/definitions/pin_interrupts_enum\",\n },\n bidirection_out: {\n type: \"boolean\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n pin_interrupts_enum: {\n type: \"string\",\n enum: [\n \"INTDIS_BUFFEN\",\n \"BOTH_EDGES\",\n \"RISING_EDGE\",\n \"FALLING_EDGE\",\n \"NONE\",\n \"LOW_LEVEL\",\n ],\n },\n pingroups_data: {\n type: \"object\",\n properties: {\n groups: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pins_group\",\n },\n },\n },\n required: [\"groups\"],\n additionalProperties: false,\n },\n pins_group: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n filter: {\n $ref: \"#/definitions/grpfilter\",\n },\n datapath: {\n type: \"string\",\n },\n },\n required: [\"name\", \"filter\"],\n additionalProperties: false,\n },\n grpfilter: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=pin-standard.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logAnalytics = exports.getAnalyticsDefault = void 0;\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar autoModuleViewHelpers_1 = require(\"../autoModule/views/autoModuleViewHelpers\");\nvar getAnalyticsDefault = function (model) {\n var logAlwaysComps = [];\n var stateChangeComps = [];\n return (0, exports.logAnalytics)(model, stateChangeComps, logAlwaysComps);\n};\nexports.getAnalyticsDefault = getAnalyticsDefault;\nvar logAnalytics = function (model, logAlwaysComps, logOnChangeComps) {\n var _a, _b;\n var retData = {};\n var moduleconfig = (0, getConfigData_1.getConfigData)(model);\n var alwaysCompsDesired = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.logAlwaysComps.concat(logAlwaysComps !== null && logAlwaysComps !== void 0 ? logAlwaysComps : []);\n retData = logAlwaysStaticAndDynamicData(model, moduleconfig, alwaysCompsDesired);\n var onChangeCompsDesired = (_b = moduleconfig.analytics) === null || _b === void 0 ? void 0 : _b.logOnChangeComps.concat(logOnChangeComps !== null && logOnChangeComps !== void 0 ? logOnChangeComps : []);\n var moduleState = model.getState();\n retData = __assign(__assign({}, retData), logOnChangeStaticAndDynamicData(moduleconfig, model, moduleState, onChangeCompsDesired));\n return retData;\n};\nexports.logAnalytics = logAnalytics;\nvar logAlwaysStaticAndDynamicData = function (model, moduleconfig, alwaysCompsDesired) {\n var _a, _b, _c;\n var retData = {};\n for (var _i = 0, _d = alwaysCompsDesired !== null && alwaysCompsDesired !== void 0 ? alwaysCompsDesired : []; _i < _d.length; _i++) {\n var eachDesiredComp = _d[_i];\n var correctMapping = void 0;\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n var compObj = void 0;\n var resultantAnalyticsKey = void 0;\n if (eachDesiredComp !== \"*\") {\n compObj = (_a = allComps[eachDesiredComp]) === null || _a === void 0 ? void 0 : _a.component;\n if (compObj === undefined ||\n !isCompCategoryAllowed(compObj) ||\n (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))\n continue;\n correctMapping = (_b = moduleconfig.analytics) === null || _b === void 0 ? void 0 : _b.compMapping[eachDesiredComp];\n resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachDesiredComp\n : correctMapping;\n var value = model.getComponentValue(eachDesiredComp);\n if (value !== undefined) {\n retData[resultantAnalyticsKey] = value;\n }\n }\n else {\n for (var eachCompName in allComps) {\n correctMapping = (_c = moduleconfig.analytics) === null || _c === void 0 ? void 0 : _c.compMapping[eachCompName];\n compObj = allComps[eachCompName].component;\n if (!isCompCategoryAllowed(compObj) ||\n (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))\n continue;\n resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachCompName\n : correctMapping;\n retData[resultantAnalyticsKey] = model.getComponentValue(eachCompName);\n }\n break;\n }\n }\n return retData;\n};\nvar formRegUndercSettNameForComp = function (compObj) {\n var regUndcSettingName = \"\";\n var compCategory = compObj.category;\n var compSetting = compCategory === \"hardware\" ? compObj.setting : \"\";\n var regName = getRegNameFromCompSettName(compObj.name, compSetting);\n if (regName === \"\") {\n regUndcSettingName = compSetting;\n }\n else if (compSetting === \"\") {\n regUndcSettingName = regName;\n }\n else {\n regUndcSettingName = regName + \"_\" + compSetting;\n }\n return regUndcSettingName;\n};\nvar getRegNameFromCompSettName = function (compName, settingName) {\n var regNameCaps = \"\";\n var compNameCaps = compName.toUpperCase();\n var settingNameCaps = settingName.toUpperCase();\n regNameCaps = compNameCaps.replace(settingNameCaps, \"\");\n return regNameCaps;\n};\nvar logOnChangeStaticAndDynamicData = function (moduleconfig, model, moduleState, onChangeCompsDesired) {\n var _a, _b;\n if (!onChangeCompsDesired || onChangeCompsDesired.length === 0)\n return {};\n var retData = logOnChangeDependencyComps(onChangeCompsDesired, model, moduleconfig);\n for (var eachCategoryKey in moduleState) {\n for (var eachSubCategoryKey in moduleState[eachCategoryKey]) {\n for (var eachChangedCompKey in moduleState[eachCategoryKey][eachSubCategoryKey]) {\n if ((onChangeCompsDesired === null || onChangeCompsDesired === void 0 ? void 0 : onChangeCompsDesired.indexOf(eachChangedCompKey)) !== -1 ||\n (onChangeCompsDesired === null || onChangeCompsDesired === void 0 ? void 0 : onChangeCompsDesired.indexOf(\"*\")) !== -1) {\n var correctMapping = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.compMapping[eachChangedCompKey];\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n var compObj = (_b = allComps[eachChangedCompKey]) === null || _b === void 0 ? void 0 : _b.component;\n if (compObj === undefined ||\n !isCompCategoryAllowed(compObj) ||\n (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))\n continue;\n var resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachChangedCompKey\n : correctMapping;\n retData[resultantAnalyticsKey] =\n moduleState[eachCategoryKey][eachSubCategoryKey][eachChangedCompKey];\n }\n }\n }\n }\n return retData;\n};\nvar consolidateDependencyCompNames = function (onChangeCompsDesired, model) {\n var _a, _b;\n var consolidatedCompNames = [];\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n for (var _i = 0, _c = onChangeCompsDesired !== null && onChangeCompsDesired !== void 0 ? onChangeCompsDesired : []; _i < _c.length; _i++) {\n var eachDesCompName = _c[_i];\n var compObj = (_a = allComps[eachDesCompName]) === null || _a === void 0 ? void 0 : _a.component;\n if (eachDesCompName !== \"*\" && (compObj === null || compObj === void 0 ? void 0 : compObj.category) === \"import\") {\n consolidatedCompNames.push(eachDesCompName);\n }\n else if (eachDesCompName === \"*\") {\n consolidatedCompNames = [];\n for (var eachcompKey in allComps) {\n compObj = (_b = allComps[eachcompKey]) === null || _b === void 0 ? void 0 : _b.component;\n if ((compObj === null || compObj === void 0 ? void 0 : compObj.category) === \"import\") {\n consolidatedCompNames.push(compObj.name);\n }\n }\n break;\n }\n }\n return consolidatedCompNames;\n};\nvar logOnChangeDependencyComps = function (onChangeCompsDesired, model, moduleconfig) {\n var _a, _b, _c;\n var result = {};\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n //stage 1 - consolidating all desired comps\n var consolidatedCompNames = consolidateDependencyCompNames(onChangeCompsDesired, model);\n //stage 2 - populating the analytics data for consolidated dep comps - stage\n for (var _i = 0, consolidatedCompNames_1 = consolidatedCompNames; _i < consolidatedCompNames_1.length; _i++) {\n var eachCompName = consolidatedCompNames_1[_i];\n var correctMapping = (_b = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.compMapping[eachCompName]) !== null && _b !== void 0 ? _b : eachCompName;\n var compObj = (_c = allComps[eachCompName]) === null || _c === void 0 ? void 0 : _c.component;\n if ((compObj === null || compObj === void 0 ? void 0 : compObj.category) !== \"import\")\n continue;\n var value = getDependencyCompValueForOnChange(compObj, model);\n if (value)\n result[correctMapping] = value;\n }\n return result;\n};\nvar getDependencyCompValueForOnChange = function (compObj, model) {\n var _a;\n var result = (_a = model.getImports()[compObj.importId].handle) === null || _a === void 0 ? void 0 : _a.label;\n return result;\n};\nvar isCompCategoryAllowed = function (compObj) {\n return (compObj !== undefined &&\n (compObj.category === \"hardware\" ||\n compObj.category === \"software\" ||\n compObj.category === \"import\" ||\n compObj.category === \"table\"));\n};\n//# sourceMappingURL=AnalyticsHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getModel = void 0;\nvar Processor = __importStar(require(\"@microchip/scf-common/lib/Processor\"));\nvar AutoModuleAppModel_1 = require(\"../autoModule/AutoModuleAppModel\");\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar exports_1 = require(\"../interfaces/exports\");\nvar imports_1 = require(\"../interfaces/imports\");\nvar PCPHelper_1 = require(\"../pins/PCPHelper\");\nvar tables_1 = require(\"../tables/tables\");\nvar getModel = function (prototype, getDerivedData) {\n return new MyAppModel(prototype, getDerivedData);\n};\nexports.getModel = getModel;\nvar MyAppModel = /** @class */ (function () {\n function MyAppModel(prototype, getDerivedData) {\n var _this = this;\n this.getState = function () { return _this.prototype.state; };\n this.getPayload = function () { return _this.prototype.payload; };\n this.getImports = function () { return _this.prototype.imports; };\n this.getExports = function () { return _this.prototype.exports; };\n this.getName = function () {\n return _this.getAutoModuleAppModel().getModuleName();\n };\n this.getCategory = function () {\n return _this.getAutoModuleAppModel().getModuleCategory();\n };\n this.getActiveName = function () {\n var _a, _b, _c;\n return (_c = (_b = (_a = _this.getDerivedFunctions()).getActiveName) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : _this.getName();\n };\n this.getGlobalNames = function () {\n var _a, _b, _c;\n return (_c = (_b = (_a = _this.getDerivedFunctions()).getGlobalNames) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];\n };\n this.getAutoModuleAppModel = function () {\n if (_this.autoModuleAppModel)\n return _this.autoModuleAppModel;\n _this.autoModuleAppModel = (0, AutoModuleAppModel_1.createAutoModuleAppModel)(_this);\n return _this.autoModuleAppModel;\n };\n this.getPrototypeModule = function () {\n return _this.prototype;\n };\n this.getRegisterValues = function (interfaceName) {\n if (_this.registerValues)\n return _this.registerValues;\n _this.registerValues = (0, AutoModuleHelpers_1.getRegisterValues)(_this, interfaceName);\n return _this.registerValues;\n };\n this.getInterrupts = function () {\n var _a, _b;\n if (_this.interrupts)\n return _this.interrupts;\n _this.interrupts = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.interrupts;\n return _this.interrupts;\n };\n this.getProperties = function () {\n var _a, _b;\n if (_this.properties)\n return _this.properties;\n _this.properties = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.properties;\n return _this.properties;\n };\n this.getRegisters = function () {\n var _a, _b;\n if (_this.registers)\n return _this.registers;\n _this.registers = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.registers;\n return _this.registers;\n };\n this.getHardware = function (interfaceName) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n interfaceName = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)(interfaceName);\n if (interfaceName) {\n var peripheral_1 = (_c = (_b = (_a = _this.getPrototypeModule()) === null || _a === void 0 ? void 0 : _a.imports) === null || _b === void 0 ? void 0 : _b[interfaceName]) === null || _c === void 0 ? void 0 : _c.payload;\n if (!peripheral_1)\n return undefined;\n return {\n getPeripheral: function () { return peripheral_1; },\n getName: function () { return peripheral_1.name; },\n instanceNumber: Number((_d = peripheral_1.instance) !== null && _d !== void 0 ? _d : peripheral_1.name.replace(peripheral_1.group, \"\")),\n };\n }\n if (!_this.defaultHardware) {\n var peripheralName = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)((_g = (_f = (_e = (0, getConfigData_1.getConfigData)(_this)) === null || _e === void 0 ? void 0 : _e.peripherals) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.interfaceId.name);\n var peripheral_2 = (_k = (_j = (_h = _this.getPrototypeModule()) === null || _h === void 0 ? void 0 : _h.imports) === null || _j === void 0 ? void 0 : _j[peripheralName !== null && peripheralName !== void 0 ? peripheralName : \"\"]) === null || _k === void 0 ? void 0 : _k.payload;\n if (peripheral_2) {\n _this.defaultHardware = {\n getPeripheral: function () {\n return peripheral_2;\n },\n getName: function () { return peripheral_2.name; },\n instanceNumber: Number((_l = peripheral_2.instance) !== null && _l !== void 0 ? _l : peripheral_2.name.replace(peripheral_2.group, \"\")),\n };\n }\n }\n return _this.defaultHardware;\n };\n this.getPeripheralDescription = function () {\n var _a;\n return (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n };\n this.getDerivedData = function () {\n if (_this.derivedData)\n return _this.derivedData;\n _this.derivedData = _this.getDerivedDataFunction(_this);\n return _this.derivedData;\n };\n this.getDerivedFunctions = function () {\n return _this.getDerivedData().getMyFunctions();\n };\n this.getDerivedFunction = function (functionName) {\n var _a, _b;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return (_b = (_a = _this.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[functionName]) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([_a], args, false));\n };\n this.getExportInterfaces = function () {\n if (_this.exportInterfaces)\n return _this.exportInterfaces;\n _this.exportInterfaces = (0, exports_1.createExportInterfaces)(_this.prototype.exports, _this);\n return _this.exportInterfaces;\n };\n this.getImportInterfaces = function () {\n if (_this.importInterfaces)\n return _this.importInterfaces;\n _this.importInterfaces = (0, imports_1.createImportInterfaces)(_this.prototype.imports, _this);\n return _this.importInterfaces;\n };\n this.isControlledByInterface = function (componentName) {\n var _a;\n return ((_a = _this.getExportInterfaces()) === null || _a === void 0 ? void 0 : _a.isControlledByInterface(componentName)) == true;\n };\n this.getAssignedImport = function (importName) {\n var _a;\n if (((_a = _this.prototype.imports) === null || _a === void 0 ? void 0 : _a[importName]) &&\n Processor.isAssigned(_this.prototype.imports[importName])) {\n return _this.prototype.imports[importName];\n }\n return undefined;\n };\n this.getImportValue = function (importName) {\n var _a;\n return (_a = _this.getAssignedImport(importName)) === null || _a === void 0 ? void 0 : _a.payload;\n };\n this.filterImportBySetting = function (populatedImports, importKey, optionFilter) {\n var _a;\n var filteredImports = __assign({}, populatedImports);\n if (populatedImports[importKey]) {\n filteredImports = __assign(__assign({}, filteredImports), (_a = {}, _a[importKey] = Processor.filterOptions(populatedImports[importKey], function (option) {\n return optionFilter(option);\n }), _a));\n }\n return filteredImports;\n };\n this.isComponentValue = function (componentName) {\n var _a;\n var value = _this.getComponentValue(componentName);\n var regex = new RegExp(\"enabled?\");\n var isValue = false;\n if (value) {\n if (typeof value === \"string\") {\n if (value === \"true\") {\n isValue = true;\n }\n else if (value === \"false\") {\n isValue = false;\n }\n else {\n isValue = regex.test((_a = String(value)) === null || _a === void 0 ? void 0 : _a.toLowerCase());\n }\n }\n else if (typeof value === \"boolean\") {\n isValue = value;\n }\n else {\n isValue = false;\n }\n }\n else {\n isValue = false;\n }\n return isValue;\n };\n this.getComponent = function (componentName) {\n return _this.getAutoModuleAppModel().getComponent(componentName);\n };\n this.getPCPHelper = function () {\n if (!_this.pcpHelper) {\n _this.pcpHelper = new PCPHelper_1.PCPHelper();\n _this.pcpHelper.setCallbacks({\n getCompletePinData: function () { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getCompletePinData(_this); },\n getRowData: function (rowData) { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getRowData(_this, rowData); },\n getPinsData: function () { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getPinsData(); },\n });\n }\n return _this.pcpHelper;\n };\n this.getTableHelpers = tables_1.getTableHelpers;\n this.prototype = prototype;\n this.getDerivedDataFunction = getDerivedData;\n }\n MyAppModel.prototype.getComponentValue = function (componentName) {\n return this.getAutoModuleAppModel().getComponentValue(componentName);\n };\n return MyAppModel;\n}());\n//# sourceMappingURL=AppModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toDictionary = exports.assertNotNull = exports.map = exports.forEach = exports.values = exports.getKeys = void 0;\n/** @returns the non-prototype keys of the given object */\nvar getKeys = function (obj) {\n return Object.getOwnPropertyNames(obj);\n};\nexports.getKeys = getKeys;\n/**\n * Gets the values of a map as a list\n * @param obj\n * @returns\n */\nvar values = function (obj) {\n return (0, exports.getKeys)(obj).map(function (key) { return obj[key]; });\n};\nexports.values = values;\nvar forEach = function (obj, action) {\n (0, exports.getKeys)(obj).forEach(function (key) { return action(key, obj[key]); });\n};\nexports.forEach = forEach;\nvar map = function (obj, mapper) {\n return (0, exports.getKeys)(obj).map(function (key) { return mapper(key, obj[key]); });\n};\nexports.map = map;\nvar assertNotNull = function (val, msg) {\n if (val == null) {\n throw new Error(msg);\n }\n};\nexports.assertNotNull = assertNotNull;\nvar toDictionary = function (arr, keyMapper, valueMapper) {\n var result = {};\n arr.forEach(function (entry) {\n result[keyMapper(entry)] = valueMapper(entry);\n });\n return result;\n};\nexports.toDictionary = toDictionary;\n//# sourceMappingURL=Utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyAutoModuleAppModel = exports.createAutoModuleAppModel = void 0;\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Utils_1 = require(\"../Utils\");\nvar AutoModuleHelper = __importStar(require(\"./AutoModuleHelpers\"));\nvar getConfigData_1 = require(\"./getConfigData\");\nvar createAutoModuleAppModel = function (model, config) {\n return new MyAutoModuleAppModel(model, config);\n};\nexports.createAutoModuleAppModel = createAutoModuleAppModel;\nvar MyAutoModuleAppModel = /** @class */ (function () {\n function MyAutoModuleAppModel(model, config) {\n var _this = this;\n this.getModuleName = function () {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (_this.moduleName)\n return _this.moduleName;\n _this.moduleName =\n (_h = (_f = (_d = (_c = (_b = (_a = _this.model.getDerivedFunctions()).moduleName) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : _this.model.getComponentValue(\"componentName\")) !== null && _d !== void 0 ? _d : (_e = _this.model.getHardware()) === null || _e === void 0 ? void 0 : _e.getName()) !== null && _f !== void 0 ? _f : (_g = _this.config) === null || _g === void 0 ? void 0 : _g.moduleName) !== null && _h !== void 0 ? _h : \"Module\";\n return _this.moduleName;\n };\n this.getModuleCategory = function () {\n var _a, _b;\n return (_b = (_a = _this.model.getDerivedFunctions()).moduleCategory) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n this.createComponentList = function () {\n var componentList = {};\n var components = _this.getComponentList();\n var componentsWithDynamicDependencySelectors = __spreadArray(__spreadArray([], components, true), _this.getDefaultDependencySelectors(components), true);\n if (componentsWithDynamicDependencySelectors) {\n componentsWithDynamicDependencySelectors.forEach(function (component) {\n componentList[component.name] = {\n component: component,\n };\n });\n }\n return componentList;\n };\n this.getAllComponents = function () { return _this.componentList; };\n this.getComponentList = function () {\n var _a, _b, _c, _d, _e;\n var components = [];\n var config = _this.config;\n if (!config)\n return components;\n //Software Components\n (_b = (0, Utils_1.values)((_a = config.softwareData) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (entry) {\n components.push(entry);\n });\n //Hardware Components\n (_c = config.peripherals) === null || _c === void 0 ? void 0 : _c.forEach(function (peripheral) {\n var _a;\n if (peripheral.registers) {\n (_a = (0, Arrays_1.getKeys)(peripheral.registers)) === null || _a === void 0 ? void 0 : _a.forEach(function (registerName) {\n var _a, _b;\n (_b = (_a = peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName]) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {\n var _a, _b;\n //Only add hardware components that exist at runtime\n var hardwareRegister = (_b = (_a = _this.model.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral().registers) === null || _b === void 0 ? void 0 : _b[registerName];\n if (!(hardwareRegister === null || hardwareRegister === void 0 ? void 0 : hardwareRegister.settings) ||\n hardwareRegister.settings[setting.setting] ||\n hardwareRegister.type === \"register\") {\n components.push(setting);\n }\n });\n });\n }\n });\n //Custom Dynamic Components\n (_e = (_d = _this.model\n .getDerivedFunctions()).getDynamicComponents) === null || _e === void 0 ? void 0 : _e.call(_d).forEach(function (component) {\n components.push(component);\n });\n return components;\n };\n this.getActions = function (component) {\n var _a, _b, _c;\n return ((_c = (_b = (_a = _this.model.getDerivedFunctions()).getActions) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.actions);\n };\n this.getDefaultComponentAction = function (componentName) {\n var _a;\n var component = (_a = _this.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.component;\n return {\n type: \"[FORM] SUBMIT\",\n payload: {\n tabId: \"main\",\n path: \"\".concat(component === null || component === void 0 ? void 0 : component.group, \".\").concat(component === null || component === void 0 ? void 0 : component.name),\n value: \"%v\",\n },\n };\n };\n this.getSoftwareComponentValue = function (tab, component) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined && component.type === \"time\") {\n if (overriddenValue.defaultValue) {\n return overriddenValue.defaultValue;\n }\n else {\n return ((_d = (_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) !== null && _d !== void 0 ? _d : component.defaultValue);\n }\n }\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n return processedArg.value;\n }\n }\n return ((_h = (_g = (_f = (_e = _this.state) === null || _e === void 0 ? void 0 : _e[tab]) === null || _f === void 0 ? void 0 : _f[component.group]) === null || _g === void 0 ? void 0 : _g[component.name]) !== null && _h !== void 0 ? _h : AutoModuleHelper.getDefaultValue(_this.model.getDerivedFunctions().overrideDefaultValues, component));\n };\n this.getHardwareComponentValue = function (tab, component, setting) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (!_this.hardware)\n return undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n return processedArg.value;\n }\n }\n var overriddenCompValue = AutoModuleHelper.getOverrideDefaultValue(component, _this.model);\n var value; // value based on priority\n if (((_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) != null) {\n value = _this.state[tab][component.group][component.name];\n }\n else if (overriddenCompValue !== undefined) {\n value = overriddenCompValue;\n }\n else {\n value =\n setting !== undefined\n ? component.overrideDefaultValue\n ? component.overrideDefaultValue\n : _this.getDefaultValue(component.displayOptionSetting, setting)\n : (_d = component.overrideDefaultValue) !== null && _d !== void 0 ? _d : undefined;\n }\n //if filtered mode -> get options\n if (value != undefined && ((_e = component.mode) === null || _e === void 0 ? void 0 : _e.operation) === \"filterOptions\") {\n var options = AutoModuleHelper.getSettingOptionsIfPresent(component, setting, (_g = _this.model.getComponent((_f = component.mode) === null || _f === void 0 ? void 0 : _f.masterComponent)) === null || _g === void 0 ? void 0 : _g.value);\n if (options.indexOf(value) == -1) {\n value = options[0];\n }\n }\n return value;\n };\n this.getHardwareComponentBooleanValue = function (tab, component, setting) {\n var _a, _b, _c;\n if (!_this.hardware)\n return undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n if (setting &&\n setting.options &&\n typeof processedArg.value === \"boolean\") {\n var result_1 = \"\";\n if (processedArg.value === true) {\n var settingOptions = setting.options;\n settingOptions.forEach(function (eachOption) {\n if (eachOption.alias.toLowerCase().startsWith(\"enable\")) {\n result_1 = eachOption.alias;\n }\n });\n }\n else if (processedArg.value === false) {\n setting.options.forEach(function (eachOption) {\n if (eachOption.alias.toLowerCase().startsWith(\"disable\")) {\n result_1 = eachOption.alias;\n }\n });\n }\n return result_1;\n }\n return processedArg.value;\n }\n }\n var overriddenCompValue = AutoModuleHelper.getOverrideDefaultValue(component, _this.model);\n return ((_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) != null\n ? _this.state[tab][component.group][component.name]\n ? _this.config.booleanValues.true\n : _this.config.booleanValues.false\n : overriddenCompValue !== undefined\n ? overriddenCompValue\n : setting !== undefined\n ? component.overrideDefaultValue\n ? component.overrideDefaultValue\n : _this.getDefaultValue(component.displayOptionSetting, setting)\n : undefined;\n };\n this.getDependencyComponentValue = function (component) {\n var dependencySelector = new AutoModuleHelper.DependencySelector(_this.model, component);\n var imp = _this.model.getImports()[component.importId];\n if (imp === null || imp === void 0 ? void 0 : imp.handle) {\n return dependencySelector.createOptionLabel(imp.handle, imp.payload);\n }\n return \"None\";\n };\n this.getFileLoadComponentValue = function (component) {\n var _a;\n var fileContents;\n fileContents = (_a = _this.model.getPrototypeModule().loadedFiles) === null || _a === void 0 ? void 0 : _a[component.name];\n return fileContents;\n };\n this.getFileSaveComponentValue = function (component) {\n var _a;\n var fileContents = undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue !== undefined) {\n fileContents = overriddenValue;\n }\n else {\n fileContents = (_a = component.fileMeta) === null || _a === void 0 ? void 0 : _a.defaultContent;\n }\n return fileContents;\n };\n this.getDefaultValue = function (optionType, setting) {\n var _a;\n if (optionType == undefined)\n return setting.defaultValue;\n if (setting.defaultValue) {\n return (_a = (0, Setting_1.getOptionByName)(setting.defaultValue, setting)) === null || _a === void 0 ? void 0 : _a[optionType];\n }\n return undefined;\n };\n this.model = model;\n this.state = this.model.getState();\n this.hardware = this.model.getHardware();\n this.config = (0, getConfigData_1.getConfigData)(model);\n this.componentList = this.createComponentList();\n }\n MyAutoModuleAppModel.prototype.getDefaultDependencySelectors = function (components) {\n var dynamicDependencySelectors = [];\n var defaultTab = \"main\";\n var defaultGroup = \"software\";\n if (components.length > 0) {\n defaultTab = components[0].tabs[0];\n defaultGroup = components[0].group;\n }\n var imports = this.model.getImports();\n if (imports) {\n var importedNames = Object.keys(imports);\n importedNames.forEach(function (name) {\n var _a;\n var dependencySelectors = components.filter(function (component) {\n return component[\"importId\"] && component[\"importId\"] === name;\n });\n if (dependencySelectors.length === 0) {\n dynamicDependencySelectors.push({\n name: name + \" dependency selector\",\n importId: name,\n category: \"import\",\n type: \"ComboBox\",\n description: name + \" dependency selector\",\n group: defaultGroup,\n tabs: [defaultTab],\n uiBehavior: (_a = {},\n _a[\"ui:widget\"] = \"hidden\",\n _a),\n });\n }\n });\n }\n return dynamicDependencySelectors;\n };\n MyAutoModuleAppModel.prototype.isComponent = function (componentName) {\n var _a;\n var component = (_a = this.componentList[componentName]) === null || _a === void 0 ? void 0 : _a.component;\n var componentValue = this.getComponentValue(componentName);\n if (component.category === \"software\") {\n if (component.type === \"boolean\") {\n return this.getComponentValue(componentName);\n }\n return componentValue !== undefined;\n }\n else if (component.category === \"hardware\") {\n return componentValue === this.config.booleanValues.true;\n }\n return undefined;\n };\n MyAutoModuleAppModel.prototype.getComponentValue = function (componentName) {\n var _a;\n return (_a = this.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.value;\n };\n MyAutoModuleAppModel.prototype.getComponent = function (componentName) {\n var _this = this;\n var _a, _b;\n if (((_a = this.componentList[componentName]) === null || _a === void 0 ? void 0 : _a.value) != undefined)\n return this.componentList[componentName];\n var component = (_b = this.componentList[componentName]) === null || _b === void 0 ? void 0 : _b.component;\n component === null || component === void 0 ? void 0 : component.tabs.forEach(function (tab) {\n if (component) {\n if (component.category === \"software\") {\n _this.componentList[componentName].value =\n _this.getSoftwareComponentValue(tab, component);\n }\n else if (component.category === \"hardware\") {\n var setting = AutoModuleHelper.getSettingFromComponent(_this.model, component);\n if (component.type === \"boolean\") {\n _this.componentList[componentName].value =\n _this.getHardwareComponentBooleanValue(tab, component, setting);\n }\n else {\n _this.componentList[componentName].value =\n _this.getHardwareComponentValue(tab, component, setting);\n }\n }\n else if (component.category === \"import\") {\n _this.componentList[componentName].value =\n _this.getDependencyComponentValue(component);\n }\n else if (component.category === \"file_load\") {\n _this.componentList[componentName].value =\n _this.getFileLoadComponentValue(component);\n }\n else if (component.category === \"file_save\") {\n _this.componentList[componentName].value =\n _this.getFileSaveComponentValue(component);\n }\n _this.componentList[componentName].component.actions =\n _this.getActions(component);\n }\n });\n return this.componentList[componentName];\n };\n return MyAutoModuleAppModel;\n}());\nexports.MyAutoModuleAppModel = MyAutoModuleAppModel;\n//# sourceMappingURL=AutoModuleAppModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isFullyAssigned = exports.createPrototypeImport = void 0;\nvar Processor_1 = require(\"@microchip/scf-common/lib/Processor\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar AutoModuleHelpers_1 = require(\"./AutoModuleHelpers\");\nvar createPrototypeImport = function (interfaceName, config) {\n var _a, _b;\n return (_b = (_a = config === null || config === void 0 ? void 0 : config.imports) === null || _a === void 0 ? void 0 : _a[interfaceName]) === null || _b === void 0 ? void 0 : _b.import;\n};\nexports.createPrototypeImport = createPrototypeImport;\nvar isFullyAssigned = function (imports, config) {\n var _a;\n //get peripheral interfaces.\n var interfaces = getHardwareInterfaces((_a = config === null || config === void 0 ? void 0 : config.peripherals) !== null && _a !== void 0 ? _a : []);\n for (var i = 0; i < interfaces.length; i++) {\n var imp = imports === null || imports === void 0 ? void 0 : imports[interfaces[i]];\n if (!imp || !(0, Processor_1.isAssigned)(imp)) {\n return false;\n }\n }\n return true;\n};\nexports.isFullyAssigned = isFullyAssigned;\n//Assumes hardware import keys are the same as the interface IDs\nvar getHardwareInterfaces = function (peripherals) {\n var interfaces = (0, Arrays_1.map)(peripherals, function (peripheral) {\n var _a;\n return (_a = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)(peripheral.interfaceId.name)) !== null && _a !== void 0 ? _a : \"\";\n });\n return interfaces;\n};\n//# sourceMappingURL=AutoModuleHardware.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFriendlyInterfaceId = exports.getModuleDefaultDescription = exports.DependencySelector = exports.populateLoadedFiles = exports.getProcessedHandle = exports.getSettingOptionsIfPresent = exports.getOverrideDefaultValue = exports.getSettingDefaultIfPresent = exports.getOptionValueByName = exports.getSettingFromComponent = exports.getSettingBits = exports.getRegisterValues = exports.hasConfigBits = exports.getComboOptions = exports.getDefaultValue = exports.castComponent = void 0;\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Utils_1 = require(\"../Utils\");\nvar getConfigData_1 = require(\"./getConfigData\");\nvar castComponent = function (component) {\n switch (component.category) {\n case \"software\":\n return component;\n case \"import\":\n return component;\n case \"hardware\":\n return component;\n default:\n throw Error(\"Unsupported Component Type\");\n }\n};\nexports.castComponent = castComponent;\nvar getDefaultValue = function (overrideDefaultValues, component) {\n var _a;\n return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(component.name)) !== null && _a !== void 0 ? _a : (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue));\n};\nexports.getDefaultValue = getDefaultValue;\nvar getComboOptions = function (overrideOptions, component) {\n var _a, _b;\n return (_a = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(component.name)) !== null && _a !== void 0 ? _a : (_b = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _b === void 0 ? void 0 : _b[\"options\"];\n};\nexports.getComboOptions = getComboOptions;\nvar hasConfigBits = function (interfaceName) {\n var _a;\n return ((_a = (0, exports.getFriendlyInterfaceId)(interfaceName)) === null || _a === void 0 ? void 0 : _a.indexOf(\"configuration_bits\")) != -1;\n};\nexports.hasConfigBits = hasConfigBits;\nvar getRegisterValues = function (model, interfaceName) {\n var _a;\n var registers = {};\n var config = (0, getConfigData_1.getConfigData)(model);\n interfaceName = (0, exports.getFriendlyInterfaceId)(interfaceName);\n (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {\n var _a, _b, _c;\n var peripheralName = (_a = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name)) !== null && _a !== void 0 ? _a : \"\";\n if ((0, exports.hasConfigBits)(peripheralName))\n return;\n if ((interfaceName != undefined && peripheralName !== interfaceName) ||\n !peripheral.registers)\n return;\n (_c = (0, Utils_1.getKeys)((_b = peripheral.registers) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (regName) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var registerValue;\n var reg = (_b = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral().registers) === null || _b === void 0 ? void 0 : _b[regName];\n if (reg) {\n registerValue = {\n comment: \"\",\n value: 0,\n valueAsHex: \"0x00\",\n name: reg === null || reg === void 0 ? void 0 : reg.name,\n alias: (_c = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _c !== void 0 ? _c : reg === null || reg === void 0 ? void 0 : reg.name,\n settings: {},\n };\n }\n else {\n return;\n }\n var registerVal = CalculateRegisterValue_1.default.for(reg);\n var comments = [];\n (_d = peripheral.registers) === null || _d === void 0 ? void 0 : _d[regName].forEach(function (set) {\n var _a, _b, _c, _d, _e;\n var setting = (_a = reg.settings) === null || _a === void 0 ? void 0 : _a[set.setting];\n if (setting) {\n if (setting.type !== \"R\") {\n //Add Comments\n comments.push(\"\".concat(set.setting, \" \").concat(model.getComponentValue(set.name), \"; \"));\n }\n if (registerValue === null || registerValue === void 0 ? void 0 : registerValue.settings) {\n registerValue.settings[setting.alias] = (0, exports.getSettingBits)(reg, setting, (_b = model.getComponent(set.name)) === null || _b === void 0 ? void 0 : _b.value, (_c = config === null || config === void 0 ? void 0 : config.deviceType) !== null && _c !== void 0 ? _c : \"PIC\");\n }\n switch (set.type) {\n case \"ComboBox\":\n case \"boolean\":\n registerVal.withNumberValue(setting, (_e = (0, exports.getOptionValueByName)(setting, (_d = model.getComponent(set.name)) === null || _d === void 0 ? void 0 : _d.value)) !== null && _e !== void 0 ? _e : 0);\n break;\n case \"number\":\n registerVal.withNumberValue(setting, model.getComponentValue(set.name));\n break;\n case \"register\":\n case \"string\":\n registerVal.withNumberValue(setting, Number(model.getComponentValue(set.name)));\n break;\n default:\n break;\n }\n }\n });\n if (reg.settings) {\n registerValue.value = registerVal.asNumber();\n }\n else {\n registerValue.value = Number((_j = model.getComponentValue((_h = (_g = (_f = (_e = peripheral.registers) === null || _e === void 0 ? void 0 : _e[regName]) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.name) !== null && _h !== void 0 ? _h : \"\")) !== null && _j !== void 0 ? _j : 0);\n comments.push(\"\".concat(registerValue.name, \" \").concat(registerValue.value, \"; \"));\n }\n registerValue.valueAsHex =\n \"0x\" + registerValue.value.toString(16).toUpperCase();\n registerValue.comment = sortComments(comments, reg);\n registers[(_k = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _k !== void 0 ? _k : reg.name] = registerValue;\n });\n });\n return registers;\n};\nexports.getRegisterValues = getRegisterValues;\nvar sortComments = function (comments, register) {\n comments.sort(function (a, b) {\n var _a, _b, _c, _d;\n var settingA = (_a = register.settings) === null || _a === void 0 ? void 0 : _a[(_b = a.split[\" \"]) === null || _b === void 0 ? void 0 : _b[0]];\n var settingB = (_c = register.settings) === null || _c === void 0 ? void 0 : _c[(_d = b.split(\" \")) === null || _d === void 0 ? void 0 : _d[0]];\n return Number(settingB === null || settingB === void 0 ? void 0 : settingB.mask) - Number(settingA === null || settingA === void 0 ? void 0 : settingA.mask);\n });\n return comments.join(\"\");\n};\nvar getSettingBits = function (register, setting, value, deviceType) {\n var _a, _b;\n var setValNumber = Number((_b = (_a = (0, Setting_1.getOptionByAlias)(value, setting)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0);\n var settingValue = {\n alias: setting.alias,\n name: setting.name,\n value: setValNumber !== null && setValNumber !== void 0 ? setValNumber : 0,\n valueAsHex: \"0x\" + setValNumber.toString(16).toUpperCase(),\n valueAsDescription: value,\n bitName: deviceType === \"PIC\"\n ? \"\".concat(register.name, \"bits.\").concat(setting.name)\n : \"\".concat(register.name, \".\").concat(setting.name),\n };\n return settingValue;\n};\nexports.getSettingBits = getSettingBits;\nvar getRegisterFromComponent = function (hardware, component) {\n var _a, _b, _c, _d, _e;\n var registerName = (_a = component.name\n .replace(component.setting.toLowerCase(), \"\")) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n var register = (_b = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _b === void 0 ? void 0 : _b[registerName];\n if (register) {\n return register;\n }\n else {\n var regName = (_c = component.name\n .replace(component.setting.toLowerCase(), \"\")) === null || _c === void 0 ? void 0 : _c.toUpperCase();\n var registers = (0, Utils_1.getKeys)((_d = hardware === null || hardware === void 0 ? void 0 : hardware.registers) !== null && _d !== void 0 ? _d : {});\n for (var _i = 0, _f = registers !== null && registers !== void 0 ? registers : []; _i < _f.length; _i++) {\n var reg = _f[_i];\n var modifiedRegName = reg.replace(/_/g, \"\");\n if (regName === modifiedRegName) {\n return (_e = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _e === void 0 ? void 0 : _e[reg];\n }\n }\n }\n};\nvar getSettingFromComponent = function (model, component) {\n var _a;\n var config = (0, getConfigData_1.getConfigData)(model);\n var setting;\n if (model) {\n (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {\n var _a, _b, _c;\n if (setting)\n return;\n var peripheralName = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name);\n var hardware = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n var register = getRegisterFromComponent(hardware, component);\n if (register && !register.settings) {\n //No settings for this particular register. Create one\n setting = {\n alias: (_b = register.alias) !== null && _b !== void 0 ? _b : register.name,\n name: register.name,\n defaultValue: register.defaultValue,\n type: register.type,\n description: register.desc,\n porDefault: register.defaultValue,\n };\n }\n else {\n setting = (_c = register === null || register === void 0 ? void 0 : register.settings) === null || _c === void 0 ? void 0 : _c[component.setting];\n }\n });\n }\n return setting;\n};\nexports.getSettingFromComponent = getSettingFromComponent;\nvar getOptionValueByName = function (setting, optionName) {\n if (!setting)\n return undefined;\n var optionValue = setting.porDefault;\n if (setting.options) {\n setting.options.forEach(function (option) {\n if (option.name === optionName || option.description === optionName) {\n optionValue = option.value;\n }\n });\n }\n return Number(optionValue);\n};\nexports.getOptionValueByName = getOptionValueByName;\nvar getSettingDefaultIfPresent = function (component, setting, overrideDefaultValue) {\n var _a, _b;\n var defaultValue;\n if (overrideDefaultValue !== undefined) {\n return overrideDefaultValue;\n }\n if (component.overrideDefaultValue) {\n return component.overrideDefaultValue;\n }\n if (setting === null || setting === void 0 ? void 0 : setting.defaultValue) {\n var option = (0, Setting_1.getOptionByName)(setting.defaultValue, setting);\n defaultValue =\n (_b = option === null || option === void 0 ? void 0 : option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : \"alias\"]) !== null && _b !== void 0 ? _b : setting.defaultValue;\n }\n return defaultValue;\n};\nexports.getSettingDefaultIfPresent = getSettingDefaultIfPresent;\nvar getOverrideDefaultValue = function (component, model) {\n var _a, _b;\n return (_b = (_a = model.getDerivedFunctions()).overrideDefaultValues) === null || _b === void 0 ? void 0 : _b.call(_a, component.name);\n};\nexports.getOverrideDefaultValue = getOverrideDefaultValue;\nvar getSettingOptionsIfPresent = function (component, setting, masterComponentValue) {\n var _a;\n var options = [\"\"];\n if (setting) {\n var filteredOptions = component.mode\n ? filterModeOptions((_a = setting.options) !== null && _a !== void 0 ? _a : [], component, masterComponentValue)\n : setting.options;\n options = (0, Arrays_1.map)(filteredOptions !== null && filteredOptions !== void 0 ? filteredOptions : [], function (option) { var _a, _b; return (_b = option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : \"alias\"]) !== null && _b !== void 0 ? _b : option.alias; });\n }\n return options;\n};\nexports.getSettingOptionsIfPresent = getSettingOptionsIfPresent;\nvar filterModeOptions = function (options, component, masterComponentValue) {\n var _a, _b, _c, _d;\n if (((_a = component.mode) === null || _a === void 0 ? void 0 : _a.operation) != \"filterOptions\" || masterComponentValue == undefined)\n return options;\n //Determine mode\n var mode = (0, Arrays_1.find)((_d = (0, Utils_1.getKeys)((_c = (_b = component.mode) === null || _b === void 0 ? void 0 : _b.optionModes) !== null && _c !== void 0 ? _c : {})) !== null && _d !== void 0 ? _d : [], function (mode) {\n var _a, _b, _c, _d;\n var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];\n if (match) {\n return ((_d = (_c = masterComponentValue === null || masterComponentValue === void 0 ? void 0 : masterComponentValue.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;\n }\n return false;\n });\n var filteredOptions = (0, Arrays_1.filter)(options !== null && options !== void 0 ? options : [], function (option) {\n var _a, _b, _c, _d;\n if (option.mode && mode) {\n var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];\n if (match) {\n return ((_d = (_c = option.mode.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;\n }\n }\n return true;\n });\n return filteredOptions;\n};\nvar getProcessedHandle = function (handle, payload) {\n var _a, _b, _c, _d;\n if (handle) {\n handle = __assign(__assign({}, handle), { label: (_d = (_c = (_b = (_a = payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _a !== void 0 ? _a : handle === null || handle === void 0 ? void 0 : handle.label) !== null && _b !== void 0 ? _b : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _c !== void 0 ? _c : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _d !== void 0 ? _d : handle.providerId + \" : \" + handle.exportId });\n }\n return handle;\n};\nexports.getProcessedHandle = getProcessedHandle;\nvar populateLoadedFiles = function (processedOutput) {\n var _a;\n var result = __assign({}, processedOutput);\n var consolidatedFiles = {};\n //pushing all the inmemory files provided from Melody\n if (result.loadedFiles !== undefined) {\n for (var eachFileId in result.loadedFiles) {\n var eachFile = result.loadedFiles[eachFileId];\n consolidatedFiles[eachFileId] = eachFile;\n }\n }\n //pushing all the instate files stored in state(project) - NOTE: if same fileId exists in state and memory then state will be given priority\n if (((_a = result.state) === null || _a === void 0 ? void 0 : _a.loadedFiles) !== undefined) {\n for (var eachFileId in result.state.loadedFiles) {\n var eachFile = result.state.loadedFiles[eachFileId];\n consolidatedFiles[eachFileId] = eachFile;\n }\n }\n result.loadedFiles = consolidatedFiles;\n return result;\n};\nexports.populateLoadedFiles = populateLoadedFiles;\nvar DependencySelector = /** @class */ (function () {\n function DependencySelector(model, component) {\n var _this = this;\n this.noneSelection = { label: \"None\" };\n this.createOptionEntry = function (option) {\n return {\n label: _this.createOptionLabel(option.handle, option.payload),\n value: option,\n };\n };\n this.createOptionLabel = function (handle, payload) {\n var _a, _b;\n return (_b = (_a = (0, exports.getProcessedHandle)(handle, payload)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : \"\";\n };\n this.model = model;\n this.component = component;\n }\n DependencySelector.prototype.generateDropdownOptions = function () {\n var dropdownOptions = [];\n var thisImport = this.model.getImports()[this.component.importId];\n var options = thisImport === null || thisImport === void 0 ? void 0 : thisImport.options;\n if (this.shouldAllowUnselectDependency(thisImport, options)) {\n dropdownOptions.push(this.noneSelection);\n }\n if (options !== undefined) {\n for (var option in options) {\n dropdownOptions.push(this.createOptionEntry(options[option]));\n }\n }\n return dropdownOptions;\n };\n DependencySelector.prototype.getDropdownOptionNames = function () {\n var names = [];\n this.generateDropdownOptions().forEach(function (option) { return names.push(option.label); });\n return names;\n };\n DependencySelector.prototype.shouldAllowUnselectDependency = function (thisImport, options) {\n return thisImport != undefined && thisImport.isUnassignable != false;\n };\n return DependencySelector;\n}());\nexports.DependencySelector = DependencySelector;\nfunction getModuleDefaultDescription() {\n //TODO: Need to refactor this so that gets it from the source.\n //Alternatively, we could get it during the automodule update process and fetch it from there...\n return undefined;\n}\nexports.getModuleDefaultDescription = getModuleDefaultDescription;\nvar getFriendlyInterfaceId = function (interfaceName) {\n interfaceName = interfaceName === null || interfaceName === void 0 ? void 0 : interfaceName.replace(/ /g, \"\").replace(/-/g, \"_\");\n return interfaceName;\n};\nexports.getFriendlyInterfaceId = getFriendlyInterfaceId;\n//# sourceMappingURL=AutoModuleHelpers.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConfigBits = exports.getTemplateSettings = exports.getTemplatePayload = exports.getTemplates = void 0;\nvar AutoModuleHelper = __importStar(require(\"./AutoModuleHelpers\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar getConfigData_1 = require(\"./getConfigData\");\nvar Utils_1 = require(\"../Utils\");\nvar AutoModuleHardware_1 = require(\"./AutoModuleHardware\");\nvar AutoModuleHelpers_1 = require(\"./AutoModuleHelpers\");\nvar getTemplates = function (model) {\n var _a;\n var config = (0, getConfigData_1.getConfigData)(model);\n var templates = [];\n (_a = config === null || config === void 0 ? void 0 : config.templates) === null || _a === void 0 ? void 0 : _a.forEach(function (template) {\n var _a, _b, _c;\n var newTemplate = __assign({}, template);\n if (!model)\n return;\n newTemplate.dest =\n (_c = (_b = (_a = model.getDerivedFunctions()).templateName) === null || _b === void 0 ? void 0 : _b.call(_a, newTemplate.src)) !== null && _c !== void 0 ? _c : newTemplate.dest;\n newTemplate.dest = newTemplate.dest.replace(\"${sourceFileName}\", model.getName().toLowerCase() + \".c\");\n newTemplate.dest = newTemplate.dest.replace(\"${headerFileName}\", model.getName().toLowerCase() + \".h\");\n if (shouldGenerate(newTemplate, model)) {\n templates.push(newTemplate);\n }\n });\n return templates;\n};\nexports.getTemplates = getTemplates;\nvar shouldGenerate = function (template, model) {\n var shouldGenerate = true;\n if (!model)\n return shouldGenerate;\n if (shouldGenerate &&\n template.generateWithHardware == true &&\n !(0, AutoModuleHardware_1.isFullyAssigned)(model.getPrototypeModule().imports, (0, getConfigData_1.getConfigData)(model))) {\n shouldGenerate = false;\n }\n if (shouldGenerate &&\n template.isGeneratableProperty &&\n model.getDerivedFunction(template.isGeneratableProperty) != true) {\n shouldGenerate = false;\n }\n return shouldGenerate;\n};\nvar getTemplatePayload = function (model) {\n var _a;\n if (!model)\n return undefined;\n var config = (0, getConfigData_1.getConfigData)(model);\n var moduleName = model.getName();\n var templatePayload = {\n name: {\n uppercase: moduleName.toUpperCase(),\n lowercase: moduleName.toLowerCase(),\n instance: moduleName,\n },\n filename: {\n source: \"\".concat(moduleName.toLowerCase(), \".c\"),\n header: \"\".concat(moduleName.toLowerCase(), \".h\"),\n },\n };\n var components = model\n .getAutoModuleAppModel()\n .getAllComponents();\n (_a = (0, Utils_1.values)(components)) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {\n templatePayload[entry.component.name] = getComponentPayload(entry.component, model);\n });\n templatePayload = __assign(__assign({}, templatePayload), (0, exports.getTemplateSettings)(model, config));\n return templatePayload;\n};\nexports.getTemplatePayload = getTemplatePayload;\nvar getTemplateSettings = function (model, config) {\n var _a, _b;\n if (!(model === null || model === void 0 ? void 0 : model.getHardware()))\n return undefined;\n return {\n registers: model.getRegisterValues(undefined),\n interrupts: (_a = model.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral().interrupts,\n properties: (_b = model.getHardware()) === null || _b === void 0 ? void 0 : _b.getPeripheral().properties,\n };\n};\nexports.getTemplateSettings = getTemplateSettings;\nvar getConfigBits = function (model) {\n var _a, _b, _c;\n var config = (0, getConfigData_1.getConfigData)(model);\n var configModule = (0, Arrays_1.find)((_a = config === null || config === void 0 ? void 0 : config.peripherals) !== null && _a !== void 0 ? _a : [], function (peripheral) {\n return AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name);\n });\n if (configModule) {\n var interfaceName = AutoModuleHelper.getFriendlyInterfaceId(configModule.interfaceId.name);\n var templateConfigBits_1 = {};\n var registers_1 = (_b = model.getHardware(interfaceName)) === null || _b === void 0 ? void 0 : _b.getPeripheral().registers;\n (_c = (0, Utils_1.getKeys)(registers_1 !== null && registers_1 !== void 0 ? registers_1 : [])) === null || _c === void 0 ? void 0 : _c.forEach(function (configName) {\n var _a;\n var _b;\n var configBits = (_b = configModule.registers) === null || _b === void 0 ? void 0 : _b[configName];\n templateConfigBits_1 = __assign(__assign({}, templateConfigBits_1), (_a = {}, _a[configName] = {}, _a));\n configBits === null || configBits === void 0 ? void 0 : configBits.forEach(function (configBit) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n var register = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName];\n var value;\n if (register && !register.settings) {\n //missing settings for register\n value = (_b = (_a = model.getComponent(configBit.name)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : \"\";\n }\n else {\n var setting = (_d = (_c = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName]) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d[configBit.setting];\n value =\n (_g = (_f = (0, Arrays_1.find)((_e = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _e !== void 0 ? _e : [], function (option) {\n var _a, _b, _c;\n return option.description ===\n ((_a = model.getComponent(configBit.name)) === null || _a === void 0 ? void 0 : _a.value) ||\n option.alias ===\n ((_b = model.getComponent(configBit.name)) === null || _b === void 0 ? void 0 : _b.value) ||\n option.name === ((_c = model.getComponent(configBit.name)) === null || _c === void 0 ? void 0 : _c.value);\n })) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : \"\";\n }\n templateConfigBits_1[configName][configBit.setting] = {\n name: configBit.setting,\n value: value,\n description: configBit.description,\n valueAsDescription: (_h = model.getComponent(configBit.name)) === null || _h === void 0 ? void 0 : _h.value,\n };\n });\n });\n return templateConfigBits_1;\n }\n else {\n return {};\n }\n};\nexports.getConfigBits = getConfigBits;\nvar getComponentPayload = function (component, model) {\n var _a, _b;\n var componentValue = model.getComponentValue(component.name);\n switch (component.type) {\n case \"ComboBox\":\n if (component.category === \"hardware\") {\n var setting = AutoModuleHelper.getSettingFromComponent(model, component);\n return {\n value: componentValue,\n options: AutoModuleHelper.getSettingOptionsIfPresent(component, setting, model.getComponentValue((_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.masterComponent) !== null && _b !== void 0 ? _b : \"\")),\n };\n }\n else if (component.category === \"software\") {\n return {\n value: componentValue,\n options: (0, AutoModuleHelpers_1.getComboOptions)(model.getDerivedFunctions().overrideOptions, component),\n };\n }\n break;\n case \"boolean\":\n return model.isComponentValue(component.name);\n case \"number\":\n case \"string\":\n case \"register\":\n default:\n return componentValue;\n }\n};\n//# sourceMappingURL=AutoModuleTemplates.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAutoSdlHelp = void 0;\n/**\n * Returns the valid link for each component of a module\n *\n * @param dataModel - AppModel for current module\n * @param componentName - Current component under the module\n * @param helpUrl - Generic url\n * @returns Valid link to microchip docs\n */\nvar getAutoSdlHelp = function (dataModel, componentName, helpUrl) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\n var deviceMeta = dataModel.getImportValue(\"device_meta\");\n var deviceName = (_a = deviceMeta === null || deviceMeta === void 0 ? void 0 : deviceMeta.deviceName) !== null && _a !== void 0 ? _a : \"\";\n var moduleName = (_d = (_c = (_b = dataModel.getHardware()) === null || _b === void 0 ? void 0 : _b.getPeripheral()) === null || _c === void 0 ? void 0 : _c.group) !== null && _d !== void 0 ? _d : \"\";\n var dosid = (_g = (_f = (_e = dataModel.getHardware()) === null || _e === void 0 ? void 0 : _e.getPeripheral()) === null || _f === void 0 ? void 0 : _f.dosid) !== null && _g !== void 0 ? _g : \"\";\n var comp = (_j = (_h = dataModel.getComponent(componentName)) === null || _h === void 0 ? void 0 : _h.component) !== null && _j !== void 0 ? _j : \"\";\n var setting = (_l = (_k = comp === null || comp === void 0 ? void 0 : comp.setting) === null || _k === void 0 ? void 0 : _k.toLowerCase()) !== null && _l !== void 0 ? _l : \"\";\n var registerName = componentName.toLowerCase().replace(setting, \"\");\n var registerAlias = (_m = registerName === null || registerName === void 0 ? void 0 : registerName.toUpperCase()) !== null && _m !== void 0 ? _m : \"\";\n var deviceRegister = (_r = (_q = (_p = (_o = dataModel.getPeripheralDescription()) === null || _o === void 0 ? void 0 : _o.registers) === null || _p === void 0 ? void 0 : _p[registerAlias]) === null || _q === void 0 ? void 0 : _q.name) !== null && _r !== void 0 ? _r : \"\";\n var register = registerAlias == deviceRegister ? registerAlias : deviceRegister;\n var url = helpUrl\n .replace(\"${deviceName}\", deviceName !== null && deviceName !== void 0 ? deviceName : \"\")\n .replace(\"${registerName}\", register !== null && register !== void 0 ? register : \"\")\n .replace(\"${moduleName}\", moduleName !== null && moduleName !== void 0 ? moduleName : \"\")\n .replace(\"${dosId}\", dosid !== null && dosid !== void 0 ? dosid : \"\");\n return url;\n};\nexports.getAutoSdlHelp = getAutoSdlHelp;\n//# sourceMappingURL=ContextualHelp.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFreqCompSchema = exports.isFrequencyComponent = exports.isFreqUnitInState = exports.isFreqValueInState = exports.isFreqComponentInState = exports.getFreqCompFormData = void 0;\nvar getFreqCompFormData = function (model, component, tab) {\n var _a;\n var componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit\n };\n if (component.frequencyMeta) {\n // Min value update\n if (component.frequencyMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: component.frequencyMeta.min.value,\n unit: component.frequencyMeta.min.unit\n } });\n }\n // Max value update\n if (component.frequencyMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: component.frequencyMeta.max.value,\n unit: component.frequencyMeta.max.unit\n } });\n }\n // Options update\n if (component.frequencyMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: component.frequencyMeta.unitOptions });\n }\n }\n // Form data updation based on dynamic data\n var updatedFreqComp = (model.getDerivedFunctions() && model.getDerivedFunctions()[component.name] != null) ? (_a = model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[component.name]() : undefined;\n if (updatedFreqComp) {\n // Default value update\n if (updatedFreqComp.defaultValue) {\n componentValue = __assign(__assign({}, componentValue), { value: updatedFreqComp.defaultValue.value, unit: updatedFreqComp.defaultValue.unit });\n }\n // Min, Max and Options update\n if (updatedFreqComp.frequencyMeta) {\n if (updatedFreqComp.frequencyMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: updatedFreqComp.frequencyMeta.min.value,\n unit: updatedFreqComp.frequencyMeta.min.unit,\n } });\n }\n if (updatedFreqComp.frequencyMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: updatedFreqComp.frequencyMeta.max.value,\n unit: updatedFreqComp.frequencyMeta.max.unit,\n } });\n }\n if (updatedFreqComp.frequencyMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: updatedFreqComp.frequencyMeta.unitOptions });\n }\n }\n }\n if (!isFreqComponentInState(model, component, tab)) {\n return componentValue;\n }\n else {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n if (isFreqValueInState(model, component, tab)) {\n var valueChanged = tabState[component.group][component.name].value;\n componentValue = __assign(__assign({}, componentValue), { value: valueChanged });\n }\n if (isFreqUnitInState(model, component, tab)) {\n var unitChanged = tabState[component.group][component.name].unit;\n componentValue = __assign(__assign({}, componentValue), { unit: unitChanged });\n }\n return componentValue;\n }\n};\nexports.getFreqCompFormData = getFreqCompFormData;\nfunction isFreqComponentInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isFreqComponentInState = isFreqComponentInState;\nfunction isFreqValueInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].value);\n}\nexports.isFreqValueInState = isFreqValueInState;\nfunction isFreqUnitInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].unit);\n}\nexports.isFreqUnitInState = isFreqUnitInState;\nfunction isFrequencyComponent(component) {\n return (component.category === \"software\" &&\n component.type === \"frequency\");\n}\nexports.isFrequencyComponent = isFrequencyComponent;\nfunction getFreqCompSchema(component, derivedFunctions) {\n var _a, _b;\n //Schema creation with static moduleConfig data\n var schema = {\n type: \"object\",\n $id: \"frequency\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n properties: {\n value: {\n type: \"number\",\n default: component.defaultValue.value,\n },\n unit: {\n type: \"string\",\n default: component.defaultValue.unit,\n }\n },\n };\n if (component.frequencyMeta) {\n // Min value update\n if (component.frequencyMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.frequencyMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: component.frequencyMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value update\n if (component.frequencyMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.frequencyMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: component.frequencyMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (component.frequencyMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: component.frequencyMeta.unitOptions,\n }\n } }) });\n }\n }\n //Schema updation based on dynamic data\n var updatedFreqComp = (derivedFunctions && derivedFunctions[component.name] != null) ? derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name]() : undefined;\n if (updatedFreqComp) {\n // description update\n if (updatedFreqComp.description) {\n schema = __assign(__assign({}, schema), { title: updatedFreqComp.description });\n }\n // defaultValue update\n if (updatedFreqComp.defaultValue) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { value: {\n type: \"number\",\n default: updatedFreqComp.defaultValue.value,\n }, unit: {\n type: \"string\",\n default: updatedFreqComp.defaultValue.unit,\n } }) });\n }\n // frequencyMeta update\n if (updatedFreqComp.frequencyMeta) {\n // Min value and unit update\n if (updatedFreqComp.frequencyMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedFreqComp.frequencyMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: updatedFreqComp.frequencyMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value and unit update\n if (updatedFreqComp.frequencyMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedFreqComp.frequencyMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: updatedFreqComp.frequencyMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (updatedFreqComp.frequencyMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: updatedFreqComp.frequencyMeta.unitOptions,\n }\n } }) });\n }\n }\n }\n return schema;\n}\nexports.getFreqCompSchema = getFreqCompSchema;\n//# sourceMappingURL=FrequencyComponentHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasModes = exports.processRegisterModes = void 0;\nvar Utils_1 = require(\"../Utils\");\nvar processRegisterModes = function (peripheral, hardwarePeripheral, model) {\n var _a, _b;\n if (!(0, exports.hasModes)(peripheral)) {\n return hardwarePeripheral;\n }\n var modifiedHardwarePeripheral = __assign(__assign({}, hardwarePeripheral), { registers: __assign({}, hardwarePeripheral.registers) });\n (_b = (0, Utils_1.getKeys)((_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a, _b, _c, _d, _e, _f, _g;\n var settings = (_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n var delFlag = false;\n settings === null || settings === void 0 ? void 0 : settings.forEach(function (setting) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n /* const mode = find(setting.tabs, (mode => {\n return mode === \"registerFilter\"\n })) */ // TODO : Multiple modes support\n if (((_a = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _a === void 0 ? void 0 : _a.operation) === \"registerFilter\") {\n var targetStr = (_c = model === null || model === void 0 ? void 0 : model.getComponent((_b = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _b === void 0 ? void 0 : _b.masterComponent)) === null || _c === void 0 ? void 0 : _c.value;\n var matchRegEx = new RegExp((_e = (_d = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _d === void 0 ? void 0 : _d.matchRegEx) !== null && _e !== void 0 ? _e : \"\");\n if (!matchRegEx.test(targetStr)) {\n var settingObj = (_h = (_g = (_f = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _f === void 0 ? void 0 : _f[registerName]) === null || _g === void 0 ? void 0 : _g.settings) === null || _h === void 0 ? void 0 : _h[setting.setting];\n if (settingObj !== undefined) {\n (_l = (_k = (_j = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _j === void 0 ? void 0 : _j[registerName]) === null || _k === void 0 ? void 0 : _k.settings) === null || _l === void 0 ? true : delete _l[setting.setting];\n }\n else {\n (_m = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _m === void 0 ? true : delete _m[registerName];\n }\n delFlag = true;\n }\n }\n });\n if (delFlag &&\n (0, Utils_1.getKeys)((_d = (_c = (_b = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _b === void 0 ? void 0 : _b[registerName]) === null || _c === void 0 ? void 0 : _c.settings) !== null && _d !== void 0 ? _d : [])\n .length <= 0) {\n (_f = (_e = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _e === void 0 ? void 0 : _e[registerName]) === null || _f === void 0 ? true : delete _f.settings;\n (_g = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _g === void 0 ? true : delete _g[registerName];\n }\n });\n return modifiedHardwarePeripheral;\n};\nexports.processRegisterModes = processRegisterModes;\nvar hasModes = function (peripheral) {\n var _a, _b;\n var flag = false;\n (_b = (0, Utils_1.getKeys)((_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a;\n var settings = (_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n for (var _i = 0, _b = settings !== null && settings !== void 0 ? settings : []; _i < _b.length; _i++) {\n var setting = _b[_i];\n if ((setting === null || setting === void 0 ? void 0 : setting.mode) !== undefined) {\n flag = true;\n }\n }\n });\n return flag;\n};\nexports.hasModes = hasModes;\n//# sourceMappingURL=RegisterFilterMode.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTimeComponentSchema = exports.isTimeComponent = exports.isTimeUnitInState = exports.isTimeValueInState = exports.isTimeComponentInState = exports.getTimeComponentFormData = void 0;\nvar getTimeComponentFormData = function (model, component, tab) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit\n };\n var updatedTimeComponent = (model.getDerivedFunctions() && model.getDerivedFunctions()[component.name] != null) ? (_a = model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[component.name]() : undefined;\n if (updatedTimeComponent) {\n if (updatedTimeComponent.defaultValue) {\n componentValue = {\n value: updatedTimeComponent.defaultValue.value,\n unit: updatedTimeComponent.defaultValue.unit,\n };\n }\n else {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n }\n if (updatedTimeComponent.timeMeta) {\n if (updatedTimeComponent.timeMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: updatedTimeComponent.timeMeta.min.value,\n unit: updatedTimeComponent.timeMeta.min.unit,\n } });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: (_c = (_b = component.timeMeta) === null || _b === void 0 ? void 0 : _b.min) === null || _c === void 0 ? void 0 : _c.value,\n unit: (_e = (_d = component.timeMeta) === null || _d === void 0 ? void 0 : _d.min) === null || _e === void 0 ? void 0 : _e.unit,\n } });\n }\n if (updatedTimeComponent.timeMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: updatedTimeComponent.timeMeta.max.value,\n unit: updatedTimeComponent.timeMeta.max.unit,\n } });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: (_g = (_f = component.timeMeta) === null || _f === void 0 ? void 0 : _f.max) === null || _g === void 0 ? void 0 : _g.value,\n unit: (_j = (_h = component.timeMeta) === null || _h === void 0 ? void 0 : _h.max) === null || _j === void 0 ? void 0 : _j.unit,\n } });\n }\n if (updatedTimeComponent.timeMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: updatedTimeComponent.timeMeta.unitOptions });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { options: (_k = component.timeMeta) === null || _k === void 0 ? void 0 : _k.unitOptions });\n }\n }\n }\n else if (component.timeMeta) {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n if (component.timeMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: component.timeMeta.min.value,\n unit: component.timeMeta.min.unit,\n } });\n }\n if (component.timeMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: component.timeMeta.max.value,\n unit: component.timeMeta.max.unit,\n } });\n }\n if (component.timeMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: component.timeMeta.unitOptions });\n }\n }\n else {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n }\n if (!isTimeComponentInState(model, component, tab)) {\n return componentValue;\n }\n else {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n if (isTimeValueInState(model, component, tab)) {\n var valueChanged = tabState[component.group][component.name].value;\n componentValue = __assign(__assign({}, componentValue), { value: valueChanged });\n }\n if (isTimeUnitInState(model, component, tab)) {\n var unitChanged = tabState[component.group][component.name].unit;\n componentValue = __assign(__assign({}, componentValue), { unit: unitChanged });\n }\n return componentValue;\n }\n};\nexports.getTimeComponentFormData = getTimeComponentFormData;\nfunction isTimeComponentInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isTimeComponentInState = isTimeComponentInState;\nfunction isTimeValueInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].value);\n}\nexports.isTimeValueInState = isTimeValueInState;\nfunction isTimeUnitInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].unit);\n}\nexports.isTimeUnitInState = isTimeUnitInState;\nfunction isTimeComponent(component) {\n return (component.category === \"software\" &&\n component.type === \"time\");\n}\nexports.isTimeComponent = isTimeComponent;\nfunction getTimeComponentSchema(component, derivedFunctions) {\n var _a, _b;\n //Schema creation with static moduleConfig data\n var schema = {\n type: \"object\",\n $id: \"timeComponent\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n properties: {\n value: {\n type: \"number\",\n default: component.defaultValue.value,\n },\n unit: {\n type: \"string\",\n default: component.defaultValue.unit,\n }\n },\n };\n if (component.timeMeta) {\n // Min value update\n if (component.timeMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.timeMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: component.timeMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value update\n if (component.timeMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.timeMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: component.timeMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (component.timeMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: component.timeMeta.unitOptions,\n }\n } }) });\n }\n }\n //Schema updation based on dynamic data\n var updatedTimeComponent = (derivedFunctions && derivedFunctions[component.name] != null) ? derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name]() : undefined;\n if (updatedTimeComponent) {\n // description update\n if (updatedTimeComponent.description) {\n schema = __assign(__assign({}, schema), { title: updatedTimeComponent.description });\n }\n // defaultValue update\n if (updatedTimeComponent.defaultValue) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { value: {\n type: \"number\",\n default: updatedTimeComponent.defaultValue.value,\n }, unit: {\n type: \"string\",\n default: updatedTimeComponent.defaultValue.unit,\n } }) });\n }\n // timeMeta update\n if (updatedTimeComponent.timeMeta) {\n // Min value and unit update\n if (updatedTimeComponent.timeMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedTimeComponent.timeMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: updatedTimeComponent.timeMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value and unit update\n if (updatedTimeComponent.timeMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedTimeComponent.timeMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: updatedTimeComponent.timeMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (updatedTimeComponent.timeMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: updatedTimeComponent.timeMeta.unitOptions,\n }\n } }) });\n }\n }\n }\n return schema;\n}\nexports.getTimeComponentSchema = getTimeComponentSchema;\n//# sourceMappingURL=TimeComponentHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConfigData = void 0;\n/* eslint-disable @typescript-eslint/no-var-requires */\nvar Utils_1 = require(\"../Utils\");\nvar getConfigData = function (model) {\n var _a, _b;\n var config = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedData()).getModuleConfig) === null || _b === void 0 ? void 0 : _b.call(_a);\n config = ConfigBuilder.for(config)\n .withDynamicConfigData(model)\n .withDynamicComponents(model)\n .build();\n return config;\n};\nexports.getConfigData = getConfigData;\nvar ConfigBuilder = /** @class */ (function () {\n function ConfigBuilder(config) {\n var _this = this;\n this.build = function () {\n return _this.config;\n };\n this.withDynamicConfigData = function (model) {\n var _a;\n return new ConfigBuilder((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getDynamicConfigData\", _this.config)) !== null && _a !== void 0 ? _a : _this.config);\n };\n this.withDynamicComponents = function (model) {\n var _a, _b;\n var dynamicComponents = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedFunctions()).getDynamicComponents) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (dynamicComponents) {\n var dynamicComponentMap = (0, Utils_1.toDictionary)(dynamicComponents, function (component) {\n var _a;\n _this.config.UIGroups[component.group] =\n (_a = _this.config.UIGroups[component.group]) !== null && _a !== void 0 ? _a : component.group;\n return component.name;\n }, function (component) { return component; });\n _this.config.softwareData = __assign(__assign({}, _this.config.softwareData), dynamicComponentMap);\n }\n return new ConfigBuilder(_this.config);\n };\n this.config = config;\n }\n ConfigBuilder.for = function (config) {\n if (!config)\n throw console.error(\"Cannot find ModuleConfig\");\n return new ConfigBuilder(config);\n };\n return ConfigBuilder;\n}());\n//# sourceMappingURL=getConfigData.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAutoViewPayloads = void 0;\nvar scf_register_view_helper_1 = require(\"@microchip/scf-register-view-helper\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelper = __importStar(require(\"../AutoModuleHelpers\"));\nvar getConfigData_1 = require(\"../getConfigData\");\nvar registerFilter = __importStar(require(\"../RegisterFilterMode\"));\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nvar formData_1 = require(\"./formData\");\nvar scfUiSchema_1 = require(\"./scfUiSchema\");\nvar schema_1 = require(\"./schema\");\nvar uiSchema_1 = require(\"./uiSchema\");\nvar createAutoViewPayloads = function (model) {\n var config = (0, getConfigData_1.getConfigData)(model);\n var payloads = {\n main: {},\n };\n if (config === null || config === void 0 ? void 0 : config.tabs) {\n Object.keys(config.tabs).forEach(function (tab) {\n payloads[tab] = getPayloadForTab(tab);\n });\n }\n return payloads;\n function getPayloadForTab(tab) {\n if (tab === \"register\") {\n return createSimpleFormPayloadRegister();\n }\n var viewModel = {\n components: model.getAutoModuleAppModel().getAllComponents(),\n getComponent: model.getComponent,\n imports: model.getImports(),\n derivedFunctions: model.getDerivedFunctions(),\n getAssignedImport: model.getAssignedImport,\n getTableHelpers: model.getTableHelpers,\n };\n var schemaViewModel = {\n viewModel: viewModel,\n getDerivedFunction: {\n overrideTitle: model.getDerivedFunction(\"overrideTitle\"),\n isVisible: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n getFunction: model.getDerivedFunction,\n },\n overrideTableOptions: model.getDerivedFunctions()[\"overrideTableOptions\"],\n overrideDefaultValues: model.getDerivedFunctions()[\"overrideTableDefaultValues\"],\n model: model,\n };\n var uiSchemaViewModel = {\n viewModel: viewModel,\n getDerivedFunction: {\n isEnabled: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isEnabled) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n getUiBehavior: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).getUiBehavior) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n isVisible: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n },\n getProcessedArgValue: model.getExportInterfaces().getProcessedArgValue,\n isControlledByInterface: model.isControlledByInterface,\n };\n return {\n schema: (0, schema_1.createSchema)(tab, config, schemaViewModel),\n uiSchema: (0, uiSchema_1.createUiSchema)(tab, config, uiSchemaViewModel),\n formData: (0, formData_1.createFormData)(tab, config, model),\n scfUiSchema: (0, scfUiSchema_1.createScfUiSchema)(tab, config, model),\n name: config === null || config === void 0 ? void 0 : config.tabs[tab],\n table: (0, autoModuleViewHelpers_1.shouldPopulateView)(model.getDerivedFunctions(), model.getImports(), model.getAssignedImport, config)\n ? model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getTableData\")\n : undefined,\n expandGroupsByDefault: (config === null || config === void 0 ? void 0 : config.UIGroupCollapse)\n ? config.UIGroupCollapse\n : true,\n };\n }\n function createSimpleFormPayloadRegister() {\n if (!(config === null || config === void 0 ? void 0 : config.peripherals)) {\n return {};\n }\n var registerViewPayloads = [];\n config.peripherals.forEach(function (peripheral) {\n var _a, _b, _c, _d, _e, _f;\n if (AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name)) {\n return;\n }\n var hardwarePeripheral = (_a = model\n .getHardware(peripheral.interfaceId.name)) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n if (!(hardwarePeripheral === null || hardwarePeripheral === void 0 ? void 0 : hardwarePeripheral.registers)) {\n return;\n }\n var registerValues = model.getRegisterValues(peripheral.interfaceId.name);\n var interrupts = model.getInterrupts();\n hardwarePeripheral = registerFilter.processRegisterModes(peripheral, hardwarePeripheral, model);\n //TODO: implement for all peripherals\n var registerView = scf_register_view_helper_1.CreateRegisterView.for(hardwarePeripheral);\n if (registerValues) {\n (_b = (0, Utils_1.getKeys)(registerValues !== null && registerValues !== void 0 ? registerValues : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a;\n var foundRegister = (_a = hardwarePeripheral === null || hardwarePeripheral === void 0 ? void 0 : hardwarePeripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n if (foundRegister) {\n registerView.withRegisterValue(foundRegister, registerValues[registerName].value);\n }\n });\n }\n for (var interruptsKey in interrupts !== null && interrupts !== void 0 ? interrupts : {}) {\n var interrupt = interrupts === null || interrupts === void 0 ? void 0 : interrupts[interruptsKey];\n if (interrupt) {\n var interruptComponent = model.getComponent(interruptsKey.toLowerCase());\n var interruptCompVal = typeof (interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value) === \"boolean\"\n ? (interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value)\n ? \"enabled\"\n : \"disabled\"\n : interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value;\n registerView\n .withInterruptValue(interrupt, (_c = interruptCompVal !== null && interruptCompVal !== void 0 ? interruptCompVal : interrupt.defaultValue) !== null && _c !== void 0 ? _c : \"disabled\")\n .withInterruptOptions(interrupt, (_f = (_e = (_d = interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.component) === null || _d === void 0 ? void 0 : _d[\"defaultValue\"]) === null || _e === void 0 ? void 0 : _e.options) !== null && _f !== void 0 ? _f : [\n \"enabled\",\n \"disabled\",\n ]);\n }\n }\n registerViewPayloads.push(registerView.create());\n });\n return registerViewPayloads[0];\n }\n};\nexports.createAutoViewPayloads = createAutoViewPayloads;\n//# sourceMappingURL=autoModuleView.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isComponentInvisible = exports.shouldPopulateView = exports.isModeActive = exports.isImage = exports.isUrl = void 0;\nvar AutoModuleHardware_1 = require(\"../AutoModuleHardware\");\nfunction isUrl(component) {\n return (component.category === \"software\" &&\n component.type === \"string\" &&\n component.format === \"url\");\n}\nexports.isUrl = isUrl;\nfunction isImage(component) {\n return (component.category === \"software\" &&\n component.type === \"string\" &&\n component.format === \"image\");\n}\nexports.isImage = isImage;\nfunction isModeActive(mode, component, getComponent) {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = component === null || component === void 0 ? void 0 : component.mode) === null || _a === void 0 ? void 0 : _a.operation) !== mode) {\n return undefined; //No mode selected\n }\n var masterComponent = getComponent(component.mode.masterComponent);\n if ((_b = component.mode) === null || _b === void 0 ? void 0 : _b.matchRegEx) {\n var value = (_f = (_e = (_d = (_c = masterComponent === null || masterComponent === void 0 ? void 0 : masterComponent.value) === null || _c === void 0 ? void 0 : _c.toString()) === null || _d === void 0 ? void 0 : _d.match(component.mode.matchRegEx)) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0;\n return value > 0;\n }\n return undefined;\n}\nexports.isModeActive = isModeActive;\nfunction shouldPopulateView(derivedFunctions, imports, getAssignedImport, config) {\n var _a;\n if (displayViewOnImportAssigned(getAssignedImport, config) === false) {\n return false;\n }\n return (((_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.shouldPopulateViewAtStartup) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions)) === true ||\n (0, AutoModuleHardware_1.isFullyAssigned)(imports, config));\n}\nexports.shouldPopulateView = shouldPopulateView;\nfunction displayViewOnImportAssigned(getAssignedImport, config) {\n var shouldPopulateView = true;\n if (config === null || config === void 0 ? void 0 : config.displayViewOnImportAssigned) {\n config.displayViewOnImportAssigned.forEach(function (impKey) {\n if (getAssignedImport(impKey) == undefined) {\n shouldPopulateView = false;\n }\n });\n }\n return shouldPopulateView;\n}\nvar isComponentInvisible = function (component, appModel) {\n var _a, _b;\n var isInvisibleViaProperty = component.isVisibleProperty &&\n appModel.getDerivedFunction(component.isVisibleProperty) == false;\n return (((_b = (_a = appModel.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) === false ||\n isInvisibleViaProperty ||\n isModeActive(\"isVisible\", component, appModel.getComponent) === false);\n};\nexports.isComponentInvisible = isComponentInvisible;\n//# sourceMappingURL=autoModuleViewHelpers.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFormData = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar schema_1 = require(\"./schema\");\nvar TimeComponentHelper_1 = require(\"../TimeComponentHelper\");\nvar FrequencyComponentHelper_1 = require(\"../FrequencyComponentHelper\");\nfunction createFormData(tab, config, model) {\n var _a;\n var formData = {};\n if (config) {\n var components = model.getAutoModuleAppModel().getAllComponents();\n (_a = (0, Utils_1.values)(components)) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {\n var _a;\n if (!config) {\n return;\n }\n var component = entry.component;\n var value = model.getComponentValue(component.name);\n var regex = new RegExp(\"[en,dis]abled?\");\n if (component.type === \"boolean\") {\n if (value && typeof value === 'string') {\n if (regex.test(value.toLowerCase()) && typeof config.booleanValues.true === \"string\") {\n var configVal = config.booleanValues.true;\n if (configVal.toLowerCase() === \"enable\") {\n value = value.toLowerCase().startsWith(configVal.toLowerCase());\n }\n else {\n value = configVal.toLowerCase().startsWith(value.toLowerCase());\n }\n }\n else if (value === \"true\") {\n value = true;\n }\n else if (value === \"false\") {\n value = false;\n }\n }\n else if (value && typeof value === 'boolean') {\n value = value;\n }\n }\n if (component.type === \"DescriptionOnly\") {\n value = null;\n }\n if ((0, schema_1.isInvalidTab)(component.tabs, tab)) {\n return;\n }\n if (component.category === \"table\") {\n value = (0, tables_1.getTableFormData)(model, component, tab);\n }\n if (component.category === \"file_load\") {\n value = \"\";\n }\n if (component.type === \"time\") {\n value = (0, TimeComponentHelper_1.getTimeComponentFormData)(model, component, tab);\n }\n if (component.type === \"frequency\") {\n value = (0, FrequencyComponentHelper_1.getFreqCompFormData)(model, component, tab);\n }\n if (component.category === \"file_save\") {\n value = \"\";\n }\n formData[component.group] = __assign(__assign({}, formData[component.group]), (_a = {}, _a[component.name] = value, _a));\n });\n }\n return formData;\n}\nexports.createFormData = createFormData;\n//# sourceMappingURL=formData.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createScfUiSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelpers_1 = require(\"../AutoModuleHelpers\");\nvar ContextualHelp_1 = require(\"../ContextualHelp\");\nfunction createScfUiSchema(tab, config, model) {\n var _a;\n var scfUiSchema = {};\n if (config) {\n var components_1 = getAllComponents(model);\n (_a = (0, Utils_1.getKeys)(components_1)) === null || _a === void 0 ? void 0 : _a.forEach(function (eachKey) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var component = components_1[eachKey].component;\n var name = component.name, group = component.group;\n var schema = {};\n if (component.tabs.indexOf(tab) == -1)\n return;\n if (!scfUiSchema[group]) {\n scfUiSchema[group] = {};\n }\n if (!scfUiSchema[group][name]) {\n scfUiSchema[group][name] = {};\n }\n var actions = getActions(component, model);\n var transformErrors = model.getDerivedFunction(\"getCustomUiErrors\", name);\n if (model.getImports()) {\n var deviceMeta = model.getImportValue(\"device_meta\");\n var hasSdlSupport = (_a = deviceMeta === null || deviceMeta === void 0 ? void 0 : deviceMeta.hasSdlSupport) !== null && _a !== void 0 ? _a : false;\n if (component.sdlHelp && hasSdlSupport) {\n var helpUrl = component.sdlHelp.url;\n schema[\"helpKeyword\"] = getHelpKeyword(model, name, helpUrl);\n schema[\"tooltip\"] = getTooltip(component);\n }\n }\n if (component.category === \"file_load\") {\n schema[\"fileLoadProps\"] = {};\n schema[\"fileLoadProps\"][\"fileId\"] = eachKey;\n schema[\"fileLoadProps\"][\"saveState\"] = (_c = (_b = component.fileMeta) === null || _b === void 0 ? void 0 : _b.saveState) !== null && _c !== void 0 ? _c : false;\n schema[\"fileLoadProps\"][\"filter\"] = (_d = component.fileMeta) === null || _d === void 0 ? void 0 : _d.filter;\n schema[\"fileLoadProps\"][\"type\"] = \"file_load\";\n schema[\"fileLoadProps\"][\"compText\"] = (_e = component.fileMeta) === null || _e === void 0 ? void 0 : _e.compText;\n }\n if (component.category === \"file_save\") {\n schema[\"fileSaveProps\"] = {};\n schema[\"fileSaveProps\"][\"fileId\"] = eachKey;\n schema[\"fileSaveProps\"][\"fileContents\"] = model.getComponentValue(component.name);\n schema[\"fileSaveProps\"][\"fileName\"] = (_f = component.fileMeta) === null || _f === void 0 ? void 0 : _f.defaultName;\n schema[\"fileSaveProps\"][\"type\"] = \"file_save\";\n schema[\"fileSaveProps\"][\"compText\"] = (_g = component.fileMeta) === null || _g === void 0 ? void 0 : _g.compText;\n }\n if (component.category === \"table\") {\n var tableState = (_k = (_j = (_h = model === null || model === void 0 ? void 0 : model.getState()) === null || _h === void 0 ? void 0 : _h[tab]) === null || _j === void 0 ? void 0 : _j[group]) === null || _k === void 0 ? void 0 : _k[name];\n var uids = (0, tables_1.createTableUids)(component, tab, model, tableState);\n schema[\"table\"] = getTableUiSchema(component, uids);\n actions = (0, tables_1.getTableActions)(component, tab, model, uids);\n }\n schema[\"precision\"] = component[\"precision\"];\n schema[\"shouldDispatchOnChange\"] = component[\"shouldDispatchOnChange\"];\n if (actions) {\n schema[\"actions\"] = actions;\n }\n if (transformErrors) {\n schema[\"transformErrors\"] = transformErrors;\n }\n scfUiSchema[group][name] = __assign({}, schema);\n });\n }\n return scfUiSchema;\n}\nexports.createScfUiSchema = createScfUiSchema;\nfunction getAllComponents(model) {\n return model.getAutoModuleAppModel().getAllComponents();\n}\nfunction getHelpKeyword(model, componentName, helpUrl) {\n var _a;\n return ((_a = model.getDerivedFunction(\"getHelpUrl\", componentName, helpUrl)) !== null && _a !== void 0 ? _a : (0, ContextualHelp_1.getAutoSdlHelp)(model, componentName, helpUrl));\n}\nfunction getTooltip(component) {\n var _a, _b;\n return (_b = (_a = component.sdlHelp) === null || _a === void 0 ? void 0 : _a.tooltip) !== null && _b !== void 0 ? _b : \"Click for more information\";\n}\nfunction getTableUiSchema(component, uids) {\n var cellValidationInfo = (0, tables_1.getCellValidationInfo)(component);\n return {\n canRemoveRows: component.canRemoveRows,\n canInsertRows: component.canInsertRows,\n canAddRows: component.canAddRows,\n canMoveRowDown: component.canMoveRowDown,\n canMoveRowUp: component.canMoveRowUp,\n canEnableRows: component.canEnableRows,\n uids: uids,\n cellValidationInfo: cellValidationInfo,\n };\n}\nfunction getDependencySelectorActions(component, model) {\n var depSelector = new AutoModuleHelpers_1.DependencySelector(model, component);\n var options = depSelector.generateDropdownOptions();\n var dependencySelectorActions = [];\n options.forEach(function (dropdownOption) {\n var option = dropdownOption.value;\n dependencySelectorActions.push({\n type: \"[Import] SET\",\n payload: {\n importId: component.importId,\n handle: option === null || option === void 0 ? void 0 : option.handle,\n interfaceId: option === null || option === void 0 ? void 0 : option.interfaceId,\n option: dropdownOption.label,\n },\n });\n });\n return JSON.stringify(dependencySelectorActions);\n}\nfunction getActions(component, model) {\n if (component.category === \"import\") {\n return getDependencySelectorActions(component, model);\n }\n var actions = model.getDerivedFunction(\"getActions\", component.name, component.actions);\n return JSON.stringify(actions); //TODO: support map\n}\n//# sourceMappingURL=scfUiSchema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isInvalidTab = exports.createSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelpers_1 = require(\"../AutoModuleHelpers\");\nvar TimeComponentHelper_1 = require(\"../TimeComponentHelper\");\nvar FrequencyComponentHelper_1 = require(\"../FrequencyComponentHelper\");\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nfunction createSchema(tab, config, viewModel) {\n var _a, _b, _c, _d, _e, _f, _g;\n var schema = {};\n if (config) {\n var populateView_1 = (0, autoModuleViewHelpers_1.shouldPopulateView)(viewModel.viewModel.derivedFunctions, viewModel.viewModel.imports, viewModel.viewModel.getAssignedImport, config);\n schema = {\n description: (_c = (_b = (_a = viewModel.viewModel).getModuleDescription) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0, AutoModuleHelpers_1.getModuleDefaultDescription)(),\n title: config.moduleName,\n type: \"object\",\n properties: {},\n };\n var schemaBuilder_1 = {\n properties: {},\n };\n (_e = (0, Utils_1.values)((_d = viewModel.viewModel.components) !== null && _d !== void 0 ? _d : {})) === null || _e === void 0 ? void 0 : _e.forEach(function (entry) {\n var _a, _b, _c, _d, _e;\n var component = entry.component;\n if ((!populateView_1 && component.category != \"import\") ||\n isInvalidTab(component.tabs, tab)) {\n return;\n }\n if (!schemaBuilder_1[component.group]) {\n schemaBuilder_1[component.group] = {\n title: (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.overrideGroupTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.group)) !== null && _c !== void 0 ? _c : config === null || config === void 0 ? void 0 : config.UIGroups[component.group],\n description: (_e = (_d = viewModel.viewModel.derivedFunctions) === null || _d === void 0 ? void 0 : _d.overrideGroupDescription) === null || _e === void 0 ? void 0 : _e.call(_d, component.group),\n type: \"object\",\n properties: {},\n };\n }\n schemaBuilder_1[component.group].properties = __assign(__assign({}, schemaBuilder_1[component.group].properties), getComponentSchema(component, tab, viewModel));\n });\n //Sort groups based on order of UIGroups and remove groups with no components\n (_g = (0, Utils_1.getKeys)((_f = config.UIGroups) !== null && _f !== void 0 ? _f : {})) === null || _g === void 0 ? void 0 : _g.forEach(function (group) {\n var _a, _b, _c, _d;\n if (((_d = (_c = (0, Utils_1.getKeys)((_b = (_a = schemaBuilder_1[group]) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0 &&\n schema.properties) {\n schema.properties[group] = schemaBuilder_1[group];\n }\n });\n }\n return schema;\n}\nexports.createSchema = createSchema;\nfunction getComponentSchema(component, tab, viewModel) {\n var _a;\n var schema = {};\n if (isInvalidTab(component.tabs, tab) ||\n (viewModel.model && (0, autoModuleViewHelpers_1.isComponentInvisible)(component, viewModel.model))) {\n return schema;\n }\n schema = addComponentSchema(component, viewModel);\n if (schema == undefined) {\n return schema;\n }\n if (shouldAddValidator(component, viewModel.viewModel.derivedFunctions)) {\n schema = addComponentValidator(schema, component, viewModel.viewModel.derivedFunctions);\n }\n var componentName = component.name;\n schema = (_a = {}, _a[componentName] = __assign({}, schema), _a);\n return schema;\n}\nfunction isInvalidTab(tabs, tab) {\n return tabs.indexOf(tab) == -1;\n}\nexports.isInvalidTab = isInvalidTab;\nfunction addComponentValidator(schema, component, derivedFunctions) {\n return __assign(__assign({}, schema), derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name + \"Validator\"]());\n}\nfunction shouldAddValidator(component, derivedFunctions) {\n return (component.validation &&\n derivedFunctions &&\n (derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name + \"Validator\"]) != null);\n}\nfunction addComponentSchema(component, viewModel) {\n if (component.category === \"software\") {\n return getSoftwareComponentSchema(component, viewModel.viewModel.derivedFunctions);\n }\n else if (component.category === \"hardware\") {\n return getHardwareComponentSchema(component, viewModel);\n }\n else if (component.category === \"import\") {\n return getDependencyComponentSchema(component, viewModel);\n }\n else if (component.category === \"file_load\") {\n return getFileLoadComponentSchema(component, viewModel);\n }\n else if (component.category === \"file_save\") {\n return getFileSaveComponentSchema(component, viewModel);\n }\n else if (component[\"category\"] === \"table\") {\n return (0, tables_1.getTableComponentSchema)(component, viewModel);\n }\n return undefined;\n}\nfunction getSoftwareComponentSchema(component, derivedFunctions) {\n var _a, _b, _c, _d, _e, _f;\n var schema = {};\n if (component.type === \"ComboBox\") {\n schema = {\n type: \"string\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n default: (0, AutoModuleHelpers_1.getDefaultValue)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideDefaultValues, component),\n enum: (0, AutoModuleHelpers_1.getComboOptions)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideOptions, component),\n };\n }\n else if (component.type === \"hex\") {\n schema = {\n type: \"integer\",\n title: (_d = (_c = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _c === void 0 ? void 0 : _c.call(derivedFunctions, component.name)) !== null && _d !== void 0 ? _d : component.description,\n format: \"hex\",\n default: (0, AutoModuleHelpers_1.getDefaultValue)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideDefaultValues, component),\n };\n }\n else if (component.type === \"DescriptionOnly\") {\n schema = {\n type: \"null\",\n title: component.description,\n };\n }\n else if (component.type === \"time\") {\n schema = (0, TimeComponentHelper_1.getTimeComponentSchema)(component, derivedFunctions);\n }\n else if (component.type === \"frequency\") {\n schema = (0, FrequencyComponentHelper_1.getFreqCompSchema)(component, derivedFunctions);\n }\n else {\n schema = {\n type: component.type,\n title: (_f = (_e = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _e === void 0 ? void 0 : _e.call(derivedFunctions, component.name)) !== null && _f !== void 0 ? _f : component.description,\n };\n if ((0, autoModuleViewHelpers_1.isUrl)(component) && component.urlDescription) {\n schema = __assign(__assign({}, schema), { description: component.urlDescription });\n }\n if ((0, autoModuleViewHelpers_1.isImage)(component) && component.imageDescription) {\n schema = __assign(__assign({}, schema), { description: component.imageDescription });\n }\n }\n return schema;\n}\nfunction getDependencyComponentSchema(component, viewModel) {\n var _a, _b, _c, _d, _e;\n var schema = {};\n if (component.type === \"ComboBox\" && viewModel.model) {\n var dependencySelector = new AutoModuleHelpers_1.DependencySelector(viewModel.model, component);\n if (dependencySelector.getDropdownOptionNames().length <= 0) {\n return schema;\n }\n var dropdownOptions = dependencySelector.getDropdownOptionNames();\n var assignedImport = (_b = (_a = viewModel.createProcessedImports) === null || _a === void 0 ? void 0 : _a.call(viewModel, \"views\")) === null || _b === void 0 ? void 0 : _b[component.importId];\n var NONE_1 = \"None\";\n var assignedName = NONE_1;\n var selectedDependency = viewModel.model.getComponentValue(component.name);\n if (assignedImport === null || assignedImport === void 0 ? void 0 : assignedImport.handle) {\n assignedName = dependencySelector.createOptionLabel(assignedImport.handle, assignedImport.payload);\n dropdownOptions.push(assignedName);\n }\n else if (selectedDependency) {\n dropdownOptions.push(selectedDependency);\n }\n dropdownOptions = dropdownOptions.sort(function (a, b) {\n return a.localeCompare(b);\n });\n dropdownOptions = __spreadArray([NONE_1], dropdownOptions.filter(function (item) { return item !== NONE_1; }), true);\n schema = {\n type: \"string\",\n title: (_e = (_d = (_c = viewModel.getDerivedFunction).overrideTitle) === null || _d === void 0 ? void 0 : _d.call(_c, component.name)) !== null && _e !== void 0 ? _e : component.description,\n default: assignedName,\n enum: dropdownOptions,\n };\n }\n return schema;\n}\nfunction getFileLoadComponentSchema(component, viewModel) {\n var _a, _b, _c;\n var schema = {};\n if (viewModel.model) {\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n };\n }\n return schema;\n}\nfunction getFileSaveComponentSchema(component, viewModel) {\n var _a, _b, _c;\n var schema = {};\n if (viewModel.model) {\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n };\n }\n return schema;\n}\nfunction getHardwareComponentSchema(component, viewModel) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var schema = {};\n var model = viewModel.model;\n if (model) {\n if (model.getComponentValue(component.name) !== undefined &&\n component.type !== \"register\") {\n if (component.type === \"ComboBox\") {\n var setting = (0, AutoModuleHelpers_1.getSettingFromComponent)(model, component);\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n default: (0, AutoModuleHelpers_1.getSettingDefaultIfPresent)(component, setting, (_e = (_d = model\n .getDerivedFunctions()).overrideDefaultValues) === null || _e === void 0 ? void 0 : _e.call(_d, component.name)),\n enum: (0, AutoModuleHelpers_1.getSettingOptionsIfPresent)(component, setting, model.getComponentValue((_g = (_f = component.mode) === null || _f === void 0 ? void 0 : _f.masterComponent) !== null && _g !== void 0 ? _g : \"\")),\n };\n }\n else {\n schema = {\n type: component.type,\n title: (_k = (_j = (_h = viewModel.getDerivedFunction).overrideTitle) === null || _j === void 0 ? void 0 : _j.call(_h, component.name)) !== null && _k !== void 0 ? _k : component.description,\n };\n }\n }\n }\n return schema;\n}\n//# sourceMappingURL=schema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createUiSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nfunction createUiSchema(tab, config, viewModel) {\n var _a;\n var _b, _c, _d;\n var uiSchema = {};\n if (config) {\n if (config.UIOrder) {\n (_c = (0, Utils_1.getKeys)((_b = config.UIOrder) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (group) {\n var _a;\n uiSchema[group] = {\n \"ui:order\": (_a = config === null || config === void 0 ? void 0 : config.UIOrder) === null || _a === void 0 ? void 0 : _a[group],\n };\n });\n }\n var components = viewModel.viewModel.components;\n var isGroupHidden_1 = {};\n (_d = (0, Utils_1.values)(components !== null && components !== void 0 ? components : {})) === null || _d === void 0 ? void 0 : _d.forEach(function (entry) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j;\n var component = entry.component;\n var tabIndex = (_d = (_c = component.tabs) === null || _c === void 0 ? void 0 : _c.indexOf(tab)) !== null && _d !== void 0 ? _d : -1;\n if (tabIndex === -1)\n return;\n var isComponentGroupHidden = isGroupHidden_1[component.group] === undefined ||\n isGroupHidden_1[component.group] === true;\n if (isComponentGroupHidden) {\n var isHidden = (_f = ((_e = component.uiBehavior) === null || _e === void 0 ? void 0 : _e[\"ui:widget\"]) === \"hidden\") !== null && _f !== void 0 ? _f : false;\n if (((_h = (_g = viewModel.getDerivedFunction).isVisible) === null || _h === void 0 ? void 0 : _h.call(_g, component.name)) === false) {\n isHidden = true;\n }\n isGroupHidden_1[component.group] = isHidden;\n }\n if (component.category === \"table\") {\n var table = component;\n var tableCols_1 = table.columns;\n var colNames = Object.keys(tableCols_1);\n var defaultAlignment_1 = \"left\";\n var displayHeadersHorizontally = (_j = table.displayHeadersHorizontally) !== null && _j !== void 0 ? _j : false;\n var displayHeadersDiagonally_1 = !displayHeadersHorizontally;\n var columns_1 = [];\n var defaultColumnWidth_1 = (0, tables_1.calculateColumnWidth)(tableCols_1);\n var headerMaxLength_1 = colNames\n .map(function (name) { return tableCols_1[name].title.length; })\n .reduce(function (a, b) { return Math.max(a, b); });\n colNames.forEach(function (name) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n var isColEditable = !tableCols_1[name].readonly;\n var columnWidth = defaultColumnWidth_1[name];\n var disableRowsForCol = (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.disableTableCells) === null || _b === void 0 ? void 0 : _b.call(_a, name)) !== null && _c !== void 0 ? _c : [];\n columns_1.push({\n dataField: name,\n editable: isColEditable ? undefined : false,\n columnWidth: tableCols_1[name].columnWidth\n ? tableCols_1[name].columnWidth + \"%\"\n : columnWidth + \"%\",\n width: tableCols_1[name].width\n ? tableCols_1[name].width + \"%\"\n : columnWidth + \"%\",\n dataSort: tableCols_1[name].isSortable,\n headerAlign: displayHeadersDiagonally_1\n ? defaultAlignment_1\n : (_e = (_d = tableCols_1[name].headerAlign) !== null && _d !== void 0 ? _d : tableCols_1[name].dataAlign) !== null && _e !== void 0 ? _e : defaultAlignment_1,\n dataAlign: (_g = (_f = tableCols_1[name].dataAlign) !== null && _f !== void 0 ? _f : tableCols_1[name].headerAlign) !== null && _g !== void 0 ? _g : defaultAlignment_1,\n disabledRows: (_h = tableCols_1[name].disabledRows) !== null && _h !== void 0 ? _h : disableRowsForCol,\n tdStyle: (0, tables_1.getCellStyle)(tableCols_1[name].readonly),\n headerText: (_j = tableCols_1[name]) === null || _j === void 0 ? void 0 : _j[\"columnTip\"],\n hidden: (_m = (_l = (_k = viewModel.viewModel.derivedFunctions) === null || _k === void 0 ? void 0 : _k.hideTableColumn) === null || _l === void 0 ? void 0 : _l.call(_k, name)) !== null && _m !== void 0 ? _m : false,\n });\n });\n columns_1 = columns_1.map(function (col) {\n return __assign(__assign({}, col), { thStyle: (0, tables_1.getHeaderStyle)(headerMaxLength_1, displayHeadersDiagonally_1) });\n });\n uiSchema[table.group] = __assign(__assign({}, uiSchema[table.group]), (_a = {}, _a[table.name] = (0, tables_1.getTableUiSchema)(table, columns_1), _a));\n }\n else {\n uiSchema[component.group] = __assign(__assign({}, uiSchema[component.group]), (_b = {}, _b[component.name] = __assign(__assign({}, getUiBehavior(component, viewModel)), getUiSchemaExportArg(component.name, viewModel)), _b));\n }\n });\n for (var group in isGroupHidden_1) {\n if (isGroupHidden_1[group]) {\n uiSchema[group] = __assign(__assign({}, uiSchema[group]), (_a = {}, _a[\"ui:widget\"] = \"hidden\", _a));\n }\n }\n }\n return uiSchema;\n}\nexports.createUiSchema = createUiSchema;\nfunction getUiSchemaExportArg(name, viewModel) {\n var uiSchema = {};\n if (viewModel.isControlledByInterface(name)) {\n var expArg = viewModel.getProcessedArgValue(name);\n if (expArg) {\n uiSchema = {\n \"ui:readonly\": true,\n \"ui:help\": \"Controlled by \" + expArg.interface,\n };\n }\n }\n return uiSchema;\n}\nfunction getUiBehavior(component, viewModel) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n var uiBehavior = {};\n if (component.uiBehavior) {\n (_d = (0, Utils_1.getKeys)((_c = component.uiBehavior) !== null && _c !== void 0 ? _c : {})) === null || _d === void 0 ? void 0 : _d.forEach(function (key) {\n var _a, _b;\n switch (key) {\n case \"readonly\":\n uiBehavior[\"ui:readonly\"] = (_a = component.uiBehavior) === null || _a === void 0 ? void 0 : _a[key];\n break;\n default:\n uiBehavior[key] = (_b = component.uiBehavior) === null || _b === void 0 ? void 0 : _b[key];\n break;\n }\n });\n }\n if ((0, autoModuleViewHelpers_1.isUrl)(component)) {\n uiBehavior[\"ui:widget\"] = \"url\";\n }\n else if ((0, autoModuleViewHelpers_1.isImage)(component)) {\n uiBehavior[\"ui:widget\"] = \"image\";\n }\n else if (component.category === \"file_load\") {\n uiBehavior[\"ui:field\"] = \"file_load\";\n uiBehavior[\"ui:readonly\"] = (_e = component.uiBehavior) === null || _e === void 0 ? void 0 : _e.readonly;\n }\n else if (component.type === \"time\") {\n uiBehavior[\"ui:field\"] = \"TimeComponent\";\n }\n else if (component.type === \"frequency\") {\n uiBehavior[\"ui:field\"] = \"frequency\";\n }\n else if (component.category === \"file_save\") {\n uiBehavior[\"ui:field\"] = \"file_save\";\n uiBehavior[\"ui:readonly\"] = (_f = component.uiBehavior) === null || _f === void 0 ? void 0 : _f.readonly;\n }\n var overriddenBehavior = {};\n if (viewModel) {\n var overriddenValue = (_h = (_g = viewModel.getDerivedFunction).getUiBehavior) === null || _h === void 0 ? void 0 : _h.call(_g, component.name);\n if (overriddenValue != undefined) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), overriddenValue);\n if (((_j = (0, Utils_1.getKeys)(overriddenBehavior !== null && overriddenBehavior !== void 0 ? overriddenBehavior : {})) === null || _j === void 0 ? void 0 : _j.indexOf(\"readonly\")) != -1) {\n overriddenBehavior[\"ui:readonly\"] = overriddenBehavior[\"readonly\"];\n delete overriddenBehavior[\"readonly\"];\n }\n }\n var isEnabled = (_m = (_l = (_k = viewModel.getDerivedFunction).isEnabled) === null || _l === void 0 ? void 0 : _l.call(_k, component.name)) !== null && _m !== void 0 ? _m : (0, autoModuleViewHelpers_1.isModeActive)(\"isEnabled\", component, viewModel.viewModel.getComponent);\n if (isEnabled != undefined) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), (_a = {}, _a[\"ui:readonly\"] = !isEnabled, _a));\n }\n var isVisible = (_p = (_o = viewModel.getDerivedFunction).isVisible) === null || _p === void 0 ? void 0 : _p.call(_o, component.name);\n if (isVisible != undefined) {\n if (!isVisible) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), (_b = {}, _b[\"ui:widget\"] = \"hidden\", _b));\n }\n }\n }\n uiBehavior = __assign(__assign({}, uiBehavior), overriddenBehavior);\n return uiBehavior;\n}\n//# sourceMappingURL=uiSchema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = void 0;\nvar createPrototypeExports_1 = require(\"./interfaces/createPrototypeExports\");\nvar createPrototypeImports_1 = require(\"./interfaces/createPrototypeImports\");\nvar create = function (state, getCreatorFunctions) {\n var _a, _b, _c;\n var config = (_b = (_a = getCreatorFunctions()).getModuleConfig) === null || _b === void 0 ? void 0 : _b.call(_a);\n var prototypeImports = (0, createPrototypeImports_1.createPrototypeImports)(state, getCreatorFunctions());\n var prototypeExports = (0, createPrototypeExports_1.createPrototypeExports)(config);\n return {\n payload: state,\n imports: __assign({}, prototypeImports),\n exports: prototypeExports,\n isSingletonPerDevice: config === null || config === void 0 ? void 0 : config.isSingletonPerDevice,\n isEntryPoint: (_c = config === null || config === void 0 ? void 0 : config.isEntryPoint) !== null && _c !== void 0 ? _c : true,\n };\n};\nexports.create = create;\n//# sourceMappingURL=creator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.process = void 0;\nvar processor_1 = require(\"./processor\");\nObject.defineProperty(exports, \"process\", { enumerable: true, get: function () { return processor_1.process; } });\nvar creator_1 = require(\"./creator\");\nObject.defineProperty(exports, \"create\", { enumerable: true, get: function () { return creator_1.create; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPrototypeExports = void 0;\nvar Utils_1 = require(\"../Utils\");\nvar createPrototypeExports = function (config) {\n var _a, _b;\n var exports = {};\n (_b = (0, Utils_1.getKeys)((_a = config === null || config === void 0 ? void 0 : config.exports) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (expName) {\n var _a;\n var exp = (_a = config === null || config === void 0 ? void 0 : config.exports) === null || _a === void 0 ? void 0 : _a[expName];\n if (exp == undefined)\n return;\n exports[expName] = __assign(__assign({}, exp), { interfaces: processExportInterfaces(exp.interfaces) });\n });\n return exports;\n};\nexports.createPrototypeExports = createPrototypeExports;\nvar processExportInterfaces = function (int) {\n var newInterfaces = [];\n int.forEach(function (_a) {\n var interfaceId = _a.interfaceId, payload = _a.payload;\n newInterfaces.push({ interfaceId: interfaceId, payload: payload });\n });\n return newInterfaces;\n};\n//# sourceMappingURL=createPrototypeExports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPrototypeImports = void 0;\nvar AutoModuleHardware_1 = require(\"../autoModule/AutoModuleHardware\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar createPrototypeImports = function (state, creatorFunctions, config) {\n var _a, _b, _c;\n var prototypeImports = {};\n config = (_a = creatorFunctions.getModuleConfig) === null || _a === void 0 ? void 0 : _a.call(creatorFunctions);\n if (!config)\n return prototypeImports;\n if (config === null || config === void 0 ? void 0 : config.peripherals) {\n config.peripherals.forEach(function (peripheral) {\n var _a;\n var interfaceName = getFriendlyInterfaceId(peripheral.interfaceId.name);\n var prototypeImport = (0, AutoModuleHardware_1.createPrototypeImport)(interfaceName, config);\n if (prototypeImport) {\n prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[interfaceName] = __assign(__assign({}, prototypeImport), { isRequired: true }), _a));\n }\n });\n }\n (_c = (0, Arrays_1.getKeys)((_b = config === null || config === void 0 ? void 0 : config.imports) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (key) {\n var _a;\n var _b, _c, _d;\n var imp = (_b = config === null || config === void 0 ? void 0 : config.imports) === null || _b === void 0 ? void 0 : _b[key];\n var args = (_c = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.getCreatorImportArgs) === null || _c === void 0 ? void 0 : _c.call(creatorFunctions, key, state);\n if (imp && ((_d = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.shouldImport) === null || _d === void 0 ? void 0 : _d.call(creatorFunctions, key, state)) != false) {\n prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[key] = __assign(__assign({}, imp.import), { args: args }), _a));\n }\n });\n return prototypeImports;\n};\nexports.createPrototypeImports = createPrototypeImports;\nvar getFriendlyInterfaceId = function (interfaceName) {\n interfaceName = interfaceName.replace(/ /g, \"\").replace(/-/g, \"_\");\n return interfaceName;\n};\n//# sourceMappingURL=createPrototypeImports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyExportInterfaces = exports.createExportInterfaces = void 0;\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar createExportInterfaces = function (exports, model) {\n return new MyExportInterfaces(exports, model);\n};\nexports.createExportInterfaces = createExportInterfaces;\nvar MyExportInterfaces = /** @class */ (function () {\n function MyExportInterfaces(exports, model) {\n var _this = this;\n this.getConfig = function () {\n if (!_this.config) {\n _this.config = (0, getConfigData_1.getConfigData)(_this.model);\n }\n return _this.config;\n };\n this.getComponents = function () {\n if (!_this.components) {\n _this.components = _this.createComponentList();\n }\n return _this.components;\n };\n this.createProcessedExports = function () {\n var _a, _b;\n var exportPayload = _this.exports;\n var config = _this.getConfig();\n if (config.exports) {\n (_b = (0, Arrays_1.getKeys)((_a = config.exports) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var _a;\n var _b, _c, _d, _e;\n var exp = (_b = config.exports) === null || _b === void 0 ? void 0 : _b[key];\n exportPayload = __assign(__assign({}, exportPayload), (_a = {}, _a[key] = __assign(__assign({}, (_c = config.exports) === null || _c === void 0 ? void 0 : _c[key]), { interfaces: [], name: (_d = _this.model.getDerivedFunction(\"exportName\", key)) !== null && _d !== void 0 ? _d : (_e = exportPayload[key]) === null || _e === void 0 ? void 0 : _e.name }), _a));\n exp === null || exp === void 0 ? void 0 : exp.interfaces.forEach(function (int) {\n var _a, _b, _c, _d;\n var processedInterface = _this.getInterface(key, int.interfaceId);\n if (processedInterface) {\n exportPayload[key].interfaces.push(__assign(__assign({}, processedInterface), { payload: (_b = (_a = _this.model) === null || _a === void 0 ? void 0 : _a.getDerivedFunction(int.interfaceId.name + \"_payload\")) !== null && _b !== void 0 ? _b : {}, payloads: (_d = (_c = _this.model) === null || _c === void 0 ? void 0 : _c.getDerivedFunction(int.interfaceId.name + \"_payloads\")) !== null && _d !== void 0 ? _d : {} }));\n }\n });\n });\n }\n return exportPayload;\n };\n this.getInterfaceArgs = function (interfaceKey, interfaceId) {\n var _a;\n return (_a = _this.getInterface(interfaceKey, interfaceId)) === null || _a === void 0 ? void 0 : _a.args;\n };\n this.getInterfaceResults = function (interfaceKey, interfaceId) {\n var _a;\n return (_a = _this.getInterface(interfaceKey, interfaceId)) === null || _a === void 0 ? void 0 : _a.results;\n };\n this.createComponentList = function () {\n var _a, _b;\n var componentList = [];\n var exports = (_a = _this.getConfig().exports) !== null && _a !== void 0 ? _a : {};\n (_b = (0, Arrays_1.getKeys)(exports)) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var exp = exports[key];\n exp.interfaces.forEach(function (int) {\n if (int.components) {\n componentList.push.apply(componentList, int.components);\n }\n });\n });\n return componentList;\n };\n this.isControlledByInterface = function (componentName) {\n return _this.getComponents().indexOf(componentName) != -1;\n };\n this.getProcessedArgValue = function (componentName) {\n var _a, _b;\n var processedArgValue;\n var interfaceData = _this.getInterfaceData();\n if (_this.model &&\n _this.model.getDerivedFunctions().getProcessedArgValue &&\n interfaceData != undefined) {\n processedArgValue = (_b = (_a = _this.model\n .getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.getProcessedArgValue) === null || _b === void 0 ? void 0 : _b.call(_a, componentName, interfaceData);\n }\n return processedArgValue;\n };\n this.getInterfaceData = function () {\n var _a, _b;\n var argValues;\n var exports = (_a = _this.getConfig().exports) !== null && _a !== void 0 ? _a : {};\n (_b = (0, Arrays_1.getKeys)(exports)) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var exp = exports[key];\n exp.interfaces.forEach(function (int) {\n var _a;\n var args = _this.getInterfaceArgs(key, int.interfaceId);\n if (args) {\n (_a = (0, Arrays_1.getKeys)(args)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n var _a;\n (_a = (0, Arrays_1.getKeys)(args[key])) === null || _a === void 0 ? void 0 : _a.forEach(function (arg) {\n if (!argValues)\n argValues = [];\n argValues.push({\n interface: int.interfaceId.name,\n name: arg,\n value: args[key][arg],\n module: key,\n });\n });\n });\n }\n });\n });\n return argValues;\n };\n this.exports = exports;\n this.model = model;\n }\n MyExportInterfaces.prototype.getInterface = function (interfaceKey, interfaceId) {\n var _a;\n if (!this.exports[interfaceKey])\n return undefined;\n return (0, Arrays_1.find)((_a = this.exports[interfaceKey].interfaces) !== null && _a !== void 0 ? _a : [], function (i) { return JSON.stringify(i.interfaceId) === JSON.stringify(interfaceId); });\n };\n return MyExportInterfaces;\n}());\nexports.MyExportInterfaces = MyExportInterfaces;\n//# sourceMappingURL=exports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyImportInterfaces = exports.createImportInterfaces = void 0;\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar InterruptActions_1 = require(\"../interrupts/InterruptActions\");\nvar Utils_1 = require(\"../Utils\");\nvar createImportInterfaces = function (imports, model, config) {\n return new MyImportInterfaces(imports, model, config);\n};\nexports.createImportInterfaces = createImportInterfaces;\nvar MyImportInterfaces = /** @class */ (function () {\n function MyImportInterfaces(imports, model, config) {\n var _this = this;\n this.createProcessedImports = function (stage) {\n var _a;\n var processedImports = _this.filterImports();\n (_a = (0, Utils_1.getKeys)(processedImports !== null && processedImports !== void 0 ? processedImports : {})) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n var _a;\n var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n processedImports = __assign(__assign({}, processedImports), (_a = {}, _a[key] = __assign(__assign(__assign({}, processedImports[key]), { args: stage === \"arguments\"\n ? (_b = _this.model) === null || _b === void 0 ? void 0 : _b.getDerivedFunction(key + \"_args\")\n : (_c = processedImports[key]) === null || _c === void 0 ? void 0 : _c.args, results: stage === \"results\"\n ? _this.getResults(processedImports, key)\n : (_d = processedImports[key]) === null || _d === void 0 ? void 0 : _d.results, name: (_e = _this.model.getDerivedFunction(\"importName\", key)) !== null && _e !== void 0 ? _e : (_f = processedImports[key]) === null || _f === void 0 ? void 0 : _f.name, handle: (0, AutoModuleHelpers_1.getProcessedHandle)(processedImports[key].handle, processedImports[key].payload), options: (_j = _this.getProcessedImportOptions(key, (_h = (_g = processedImports[key]) === null || _g === void 0 ? void 0 : _g.options) !== null && _h !== void 0 ? _h : [])) !== null && _j !== void 0 ? _j : processedImports[key].options }), (_l = (_k = _this.model\n .getDerivedFunctions()).overrideImport) === null || _l === void 0 ? void 0 : _l.call(_k, key, processedImports[key])), _a));\n });\n return processedImports;\n };\n this.filterImports = function () {\n var _a, _b, _c;\n var filteredImports = (_c = (_b = (_a = _this.model.getDerivedFunctions()).filterImports) === null || _b === void 0 ? void 0 : _b.call(_a, _this.imports)) !== null && _c !== void 0 ? _c : _this.imports;\n return filteredImports;\n };\n //Populates option labels with a custom module name if provided in export payload\n this.getProcessedImportOptions = function (importKey, options) {\n var modifiedOptions = [];\n options === null || options === void 0 ? void 0 : options.forEach(function (option, index) {\n var _a, _b;\n modifiedOptions[index] = __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: (_a = _this.model.getDerivedFunction(\"importOptionLabel\", importKey, option)) !== null && _a !== void 0 ? _a : (_b = option.payload) === null || _b === void 0 ? void 0 : _b.moduleName }) });\n });\n return modifiedOptions;\n };\n this.getResults = function (imports, key) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;\n var importResults = (_a = _this.model) === null || _a === void 0 ? void 0 : _a.getDerivedFunction(key + \"_results\");\n if (importResults)\n return importResults;\n var imp = imports[key];\n if (imp.interfaceId.name === \"initializer-system\") {\n var initResults = {\n initializer: {\n name: _this.model.getName() + \"_Initialize\",\n header: (_c = (_b = _this.model) === null || _b === void 0 ? void 0 : _b.getDerivedFunction(\"headerFile\")) !== null && _c !== void 0 ? _c : {\n name: _this.model.getName().toLowerCase() + \".h\",\n path: \"include/\",\n },\n },\n };\n return initResults;\n }\n else if (imp.interfaceId.name === \"pin-standard\") {\n return (_e = (_d = _this.model).getPCPHelper) === null || _e === void 0 ? void 0 : _e.call(_d).getData();\n }\n else if (imp.interfaceId.name === \"interrupt-standard\") {\n var interrupts_1 = [];\n var actions_1 = {};\n var isHighPriority_1 = (_h = (_g = (_f = _this.model) === null || _f === void 0 ? void 0 : _f.getImportValue(\"interrupt_standard\")) === null || _g === void 0 ? void 0 : _g.isHighPriority) !== null && _h !== void 0 ? _h : {};\n (_l = (0, Utils_1.values)((_k = (_j = _this.model.getHardware()) === null || _j === void 0 ? void 0 : _j.getPeripheral().interrupts) !== null && _k !== void 0 ? _k : {})) === null || _l === void 0 ? void 0 : _l.forEach(function (interrupt) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;\n if (!interrupt)\n return;\n var filterInterrupt = (_e = (_d = (_c = _this.model\n .getDerivedFunctions()).filterInterrupts) === null || _d === void 0 ? void 0 : _d.call(_c, interrupt.name)) !== null && _e !== void 0 ? _e : true;\n if (filterInterrupt) {\n var interruptComponentName = (_g = (_f = _this.getInterruptComponentName(interrupt.name)) !== null && _f !== void 0 ? _f : interrupt.name.toLowerCase()) !== null && _g !== void 0 ? _g : \"\";\n var isEnabled_1 = (_h = _this.model.isComponentValue(interruptComponentName !== null && interruptComponentName !== void 0 ? interruptComponentName : \"\")) !== null && _h !== void 0 ? _h : false;\n interrupts_1.push({\n //Standard\n name: (_j = interrupt.name) !== null && _j !== void 0 ? _j : \"\",\n module: (_m = (_l = (_k = _this.model.getHardware()) === null || _k === void 0 ? void 0 : _k.getName()) !== null && _l !== void 0 ? _l : _this.model.getName()) !== null && _m !== void 0 ? _m : \"\",\n isEnabled: isEnabled_1,\n //Callback Extension\n isrCallback: (_r = (_q = (_o = _this.model) === null || _o === void 0 ? void 0 : (_p = _o.getDerivedFunctions()).isrCallback) === null || _q === void 0 ? void 0 : _q.call(_p, interrupt.name)) !== null && _r !== void 0 ? _r : {\n name: _this.model.getName() + interrupt.handlerName,\n header: (_v = (_u = (_s = _this.model) === null || _s === void 0 ? void 0 : (_t = _s.getDerivedFunctions()).headerFile) === null || _u === void 0 ? void 0 : _u.call(_t)) !== null && _v !== void 0 ? _v : {\n name: _this.model.getName().toLowerCase() + \".h\",\n path: \"include/\",\n },\n },\n generateISR: isEnabled_1,\n //Priority Extension\n isHighPriority: (_w = isHighPriority_1[interrupt.name]) !== null && _w !== void 0 ? _w : true,\n });\n var isEnableActions = (_a = ((_z = (_y = (_x = _this.model\n .getDerivedFunctions()).getInterruptActions) === null || _y === void 0 ? void 0 : _y.call(_x, interrupt.name, \"isEnabled\")) !== null && _z !== void 0 ? _z : [])).concat.apply(_a, (0, InterruptActions_1.getDefaultInterruptActions)(_this.model, interruptComponentName));\n var isEnableAction = (0, Arrays_1.find)(isEnableActions, function (action) { return action[\"validFor\"] !== isEnabled_1; });\n actions_1 = __assign(__assign({}, actions_1), (_b = {}, _b[interrupt.name] = __assign(__assign({}, actions_1 === null || actions_1 === void 0 ? void 0 : actions_1[interrupt.name]), { isEnabled: isEnableAction ? [isEnableAction] : [] }), _b));\n }\n });\n return {\n interruptList: interrupts_1,\n interruptActions: actions_1,\n moduleName: (_m = _this.model.getName()) !== null && _m !== void 0 ? _m : \"\",\n };\n }\n else if (imp.interfaceId.name === \"api-prefix-registration\") {\n var apiPrefixResults = {\n apiPrefix: (_q = (_p = (_o = _this.model) === null || _o === void 0 ? void 0 : _o.getDerivedFunctions()) === null || _p === void 0 ? void 0 : _p.apiPrefix) !== null && _q !== void 0 ? _q : (_r = _this.model) === null || _r === void 0 ? void 0 : _r.getComponentValue(\"componentName\"),\n moduleName: (_s = _this.model) === null || _s === void 0 ? void 0 : _s.getName(),\n };\n return apiPrefixResults;\n }\n };\n this.getInterruptComponentName = function (interruptName) {\n var _a, _b;\n return (_b = (_a = _this.model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.interruptComponentName) === null || _b === void 0 ? void 0 : _b.call(_a, interruptName);\n };\n this.imports = imports;\n this.model = model;\n }\n return MyImportInterfaces;\n}());\nexports.MyImportInterfaces = MyImportInterfaces;\n//# sourceMappingURL=imports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultInterruptActions = exports.InterruptActionsBuilder = void 0;\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar InterruptActionsBuilder = /** @class */ (function () {\n function InterruptActionsBuilder(model) {\n var _this = this;\n this.actions = [];\n this.createActionFor = function (componentName) {\n var _a;\n _this.actions = _this.buildActions();\n _this.curComponent = componentName\n ? (_a = _this.model.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.component\n : undefined;\n _this.curComponentName = componentName;\n _this.tableRowId = undefined;\n _this.tableRowCol = undefined;\n _this.tableCellPath = undefined;\n return _this;\n };\n this.addActionIfEnabled = function (actionValue) {\n if (!_this.curComponentName || !_this.curComponent)\n return _this;\n if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))\n return _this;\n var payload = {\n tabId: _this.curComponent.tabs[0],\n value: actionValue,\n };\n if (_this.curComponent.category === \"table\") {\n if (!_this.tableCellPath)\n return _this;\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name, \".\").concat(_this.tableCellPath), rowId: _this.tableRowId });\n }\n else {\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name) });\n }\n _this.actions.push({\n validFor: true,\n action: {\n type: \"[FORM] SUBMIT\",\n payload: payload,\n },\n });\n return _this;\n };\n this.addActionIfDisabled = function (actionValue) {\n if (!_this.curComponentName || !_this.curComponent)\n return _this;\n if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))\n return _this;\n var payload = {\n tabId: _this.curComponent.tabs[0],\n value: actionValue,\n };\n if (_this.curComponent.category === \"table\") {\n if (!_this.tableCellPath)\n return _this;\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name, \".\").concat(_this.tableCellPath), rowId: _this.tableRowId });\n }\n else {\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name) });\n }\n _this.actions.push({\n validFor: false,\n action: {\n type: \"[FORM] SUBMIT\",\n payload: payload,\n },\n });\n return _this;\n };\n this.setPathToTableCell = function (rowIndex, colName) {\n var _a;\n if (((_a = _this.curComponent) === null || _a === void 0 ? void 0 : _a.category) !== \"table\")\n return _this;\n _this.tableRowId = rowIndex;\n _this.tableRowCol = colName;\n _this.tableCellPath = \"\".concat(rowIndex, \".\").concat(colName);\n return _this;\n };\n this.isActionValueAcceptable = function (component, actionValue) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (component.category === \"hardware\") {\n if (component.type === \"ComboBox\") {\n var options = (_a = (0, AutoModuleHelpers_1.getSettingFromComponent)(_this.model, component)) === null || _a === void 0 ? void 0 : _a.options;\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) {\n var _a;\n return option[(_a = component[\"displayOptionSetting\"]) !== null && _a !== void 0 ? _a : \"alias\"] ===\n actionValue;\n }))) {\n return false;\n }\n }\n else if (component.type === \"boolean\") {\n // if (actionValue !== \"enabled\" && actionValue !== \"disabled\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n else if (component.category === \"software\") {\n if (component.type === \"ComboBox\") {\n var options = component[\"options\"];\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {\n return false;\n }\n }\n else if (component.type === \"boolean\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n else if (component.category === \"table\") {\n if (!_this.tableRowCol)\n return false;\n if (((_c = (_b = component.columns) === null || _b === void 0 ? void 0 : _b[_this.tableRowCol]) === null || _c === void 0 ? void 0 : _c.type) === \"ComboBox\") {\n var options = (_f = (_e = (_d = component.columns) === null || _d === void 0 ? void 0 : _d[_this.tableRowCol]) === null || _e === void 0 ? void 0 : _e.defaultValue) === null || _f === void 0 ? void 0 : _f[\"options\"];\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {\n return false;\n }\n }\n else if (((_h = (_g = component.columns) === null || _g === void 0 ? void 0 : _g[_this.tableRowCol]) === null || _h === void 0 ? void 0 : _h.type) === \"boolean\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n return true;\n };\n this.buildActions = function () {\n return _this.actions;\n };\n this.model = model;\n }\n InterruptActionsBuilder.createActionBuilder = function (model) {\n return new InterruptActionsBuilder(model);\n };\n return InterruptActionsBuilder;\n}());\nexports.InterruptActionsBuilder = InterruptActionsBuilder;\nfunction getDefaultInterruptActions(model, componentName) {\n if (!componentName)\n return [];\n return (InterruptActionsBuilder.createActionBuilder(model)\n .createActionFor(componentName)\n .addActionIfEnabled(true)\n .addActionIfDisabled(false)\n // .addActionIfEnabled(\"enabled\")\n // .addActionIfDisabled(\"disabled\")\n .buildActions());\n}\nexports.getDefaultInterruptActions = getDefaultInterruptActions;\n//# sourceMappingURL=InterruptActions.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PCPHelper = exports.stateActionBuilder = void 0;\nvar PCPStateActionBuilder_1 = require(\"./PCPStateActionBuilder\");\nfunction stateActionBuilder(pinRow) {\n return new PCPStateActionBuilder_1.PCPStateActionBuilder(pinRow);\n}\nexports.stateActionBuilder = stateActionBuilder;\nvar PCPHelper = /** @class */ (function () {\n function PCPHelper() {\n var _this = this;\n this.pinCallbacks = undefined;\n this.getAllFilteredRows = function (allRows) {\n var validRows = [];\n allRows.forEach(function (eachRow) {\n var userRowData = _this.userRowData(eachRow);\n // check the validity of user provided data\n if (userRowData && _this.isRowValid(userRowData)) {\n validRows.push(userRowData);\n }\n });\n return validRows;\n };\n this.isRowValid = function (eachRow) {\n if ((eachRow === null || eachRow === void 0 ? void 0 : eachRow.name) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.module) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.function) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.direction) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.behaviour)) {\n return true;\n }\n else {\n return false;\n }\n };\n this.userRowData = function (eachRow) {\n var _a;\n var eachrowret = eachRow;\n if ((_a = _this.pinCallbacks) === null || _a === void 0 ? void 0 : _a.getRowData) {\n eachrowret = _this.pinCallbacks.getRowData(__assign({}, eachRow));\n }\n return eachrowret;\n };\n this.getAllRows = function () {\n var _a, _b, _c, _d, _e;\n var pinRows = (_d = (_c = (_b = (_a = _this.pinCallbacks) === null || _a === void 0 ? void 0 : _a.getPinsData) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.rows) !== null && _d !== void 0 ? _d : [];\n var userdata = {};\n if ((_e = _this.pinCallbacks) === null || _e === void 0 ? void 0 : _e.getCompletePinData) {\n userdata = _this.pinCallbacks.getCompletePinData();\n if (userdata && (userdata === null || userdata === void 0 ? void 0 : userdata.rows)) {\n pinRows = userdata.rows;\n }\n }\n return pinRows;\n };\n this.getData = function () {\n var retData = {\n rows: _this.getAllFilteredRows(_this.getAllRows()),\n };\n return retData;\n };\n }\n PCPHelper.prototype.stateActionBuilder = function (pinRow) {\n return stateActionBuilder(pinRow);\n };\n PCPHelper.prototype.setCallbacks = function (callbacks) {\n this.pinCallbacks = callbacks;\n };\n return PCPHelper;\n}());\nexports.PCPHelper = PCPHelper;\n//# sourceMappingURL=PCPHelper.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PCPStateActionBuilder = void 0;\nvar pin_standard_1 = require(\"@microchip/pin-standard\");\nvar PCPStateActionBuilder = /** @class */ (function () {\n function PCPStateActionBuilder(pinRow) {\n this.actionDataArr = [];\n this.pinRow = pinRow;\n this.tabId = \"main\";\n }\n PCPStateActionBuilder.prototype.rowWithName = function (rowName) {\n this.rowName = rowName;\n return this;\n };\n /**\n *\n * @param tabId - default tabId is \"main\", please change this as per your needs.\n * @returns PCPStateActionBuilder\n */\n PCPStateActionBuilder.prototype.compWithTabId = function (tabId) {\n this.tabId = tabId;\n return this;\n };\n PCPStateActionBuilder.prototype.addIfLockedSetValue = function (pinRegEx, value, pinNameReEx) {\n this.actionDataArr.push({\n pinstate: pin_standard_1.pin_state.LOCKED,\n validFor: pinRegEx,\n validForpinNameReEx: pinNameReEx,\n value: value,\n actiontype: pin_standard_1.actiontype.SETACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.addIfLockedProvideAttribs = function (pinRegEx, attribs) {\n this.actionDataArr.push({\n pinstate: pin_standard_1.pin_state.LOCKED,\n validFor: pinRegEx,\n value: this.formAttribs(attribs),\n actiontype: pin_standard_1.actiontype.ATTRIBACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.addIfUnlockedProvideAttribs = function (pinRegEx, attribs) {\n this.actionDataArr.push({\n pinstate: pin_standard_1.pin_state.UNLOCK,\n validFor: pinRegEx,\n value: this.formAttribs(attribs),\n actiontype: pin_standard_1.actiontype.ATTRIBACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.formAttribs = function (attribarray) {\n return {\n attribs: attribarray,\n };\n };\n PCPStateActionBuilder.prototype.addIfUnLockedSetValue = function (pinRegEx, value) {\n this.actionDataArr.push({\n pinstate: pin_standard_1.pin_state.UNLOCK,\n validFor: pinRegEx,\n value: value,\n actiontype: pin_standard_1.actiontype.SETACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.forComponent = function (component) {\n this.component = component;\n return this;\n };\n PCPStateActionBuilder.prototype.build = function () {\n var _this = this;\n var actionArr = [];\n if (this.pinRow.name === this.rowName) {\n this.actionDataArr.forEach(function (eachData) {\n var _a;\n var _b;\n var actionObj = {\n validFor: eachData.validFor,\n state: (_a = {},\n _a[eachData.pinstate] = {\n type: \"[FORM] SUBMIT\",\n payload: {\n tabId: _this.tabId,\n path: _this.component.group + \".\" + _this.component.name,\n value: eachData.value,\n },\n },\n _a),\n actiontype: (_b = eachData.actiontype) !== null && _b !== void 0 ? _b : \"\",\n };\n if (eachData.validForpinNameReEx !== undefined) {\n actionObj.validForpinNameReEx = eachData.validForpinNameReEx;\n }\n actionArr.push(actionObj);\n });\n }\n return actionArr;\n };\n return PCPStateActionBuilder;\n}());\nexports.PCPStateActionBuilder = PCPStateActionBuilder;\n/*\n PCPHelper\n .stateActionBuilder(rowData)\n .rowWithName(\"dacoutx\")\n .forComponent(dacOPEnCompo)\n .addIfLockedSetValue(\"DAC1OUT1\", \"DACOUT1 Enabled and DACOUT2 Disabled\")\n .addIfLockedSetValue(\"DAC1OUT2\", \"DACOUT2 Enabled and DACOUT1 Disabled\")\n .addIfUnLockedSetValue(\".*\", \"DACOUT1 and DACOUT2 are Disabled\")\n .build()\n*/\n//# sourceMappingURL=PCPStateActionBuilder.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.process = void 0;\nvar AppModel_1 = require(\"./App/AppModel\");\nvar AutoModuleHelpers_1 = require(\"./autoModule/AutoModuleHelpers\");\nvar AutoModuleTemplates_1 = require(\"./autoModule/AutoModuleTemplates\");\nvar getConfigData_1 = require(\"./autoModule/getConfigData\");\nvar autoModuleView_1 = require(\"./autoModule/views/autoModuleView\");\nvar AnalyticsHelper_1 = require(\"./Analytics/AnalyticsHelper\");\n/**\n * @param initialModule\n * @param stage\n * @param getDerivedData\n */\nvar process = function (initialModule, stage, getDerivedData) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;\n initialModule = (0, AutoModuleHelpers_1.populateLoadedFiles)(initialModule);\n var model = (0, AppModel_1.getModel)(initialModule, getDerivedData);\n if (!model)\n return initialModule;\n var processedOutput = __assign({}, initialModule);\n switch (stage) {\n case \"arguments\":\n processedOutput = __assign(__assign({}, processedOutput), { imports: (_a = model\n .getImportInterfaces()\n .createProcessedImports(stage)) !== null && _a !== void 0 ? _a : initialModule.imports });\n break;\n case \"payloads\":\n processedOutput = __assign(__assign({}, processedOutput), { exports: (_b = model\n .getExportInterfaces()\n .createProcessedExports()) !== null && _b !== void 0 ? _b : initialModule.exports, name: model.getName(), help: (_e = (_d = (_c = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _c === void 0 ? void 0 : _c.overrideModuleLevelHelp) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : (0, getConfigData_1.getConfigData)(model).help });\n break;\n case \"results\":\n processedOutput = __assign(__assign({}, processedOutput), { imports: (_f = model\n .getImportInterfaces()\n .createProcessedImports(stage)) !== null && _f !== void 0 ? _f : initialModule.imports });\n break;\n case \"views\":\n {\n var customTemplateData = (_j = (_h = model === null || model === void 0 ? void 0 : (_g = model.getDerivedFunctions()).templateData) === null || _h === void 0 ? void 0 : _h.call(_g)) !== null && _j !== void 0 ? _j : {};\n var view = (0, autoModuleView_1.createAutoViewPayloads)(model);\n processedOutput = __assign(__assign({}, processedOutput), { payload: __assign(__assign({}, initialModule.payload), { auto: view, customView: (_l = (_k = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _k === void 0 ? void 0 : _k.getCustomView) === null || _l === void 0 ? void 0 : _l.call(_k, initialModule) }), templateData: customTemplateData, templates: (0, AutoModuleTemplates_1.getTemplates)(model), alerts: (_o = model === null || model === void 0 ? void 0 : (_m = model.getDerivedFunctions()).alerts) === null || _o === void 0 ? void 0 : _o.call(_m), name: model.getActiveName(), category: model.getCategory(), description: (_r = (_q = (_p = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _p === void 0 ? void 0 : _p.getModuleDescription) === null || _q === void 0 ? void 0 : _q.call(_p)) !== null && _r !== void 0 ? _r : (0, AutoModuleHelpers_1.getModuleDefaultDescription)(), globalNames: (_u = (_t = (_s = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _s === void 0 ? void 0 : _s.getGlobalNames) === null || _t === void 0 ? void 0 : _t.call(_s)) !== null && _u !== void 0 ? _u : [], analytics: (_x = (_w = (_v = model.getDerivedFunctions()).getAnalytics) === null || _w === void 0 ? void 0 : _w.call(_v)) !== null && _x !== void 0 ? _x : (0, AnalyticsHelper_1.getAnalyticsDefault)(model) });\n }\n break;\n default:\n return initialModule;\n }\n return processedOutput;\n};\nexports.process = process;\n//# sourceMappingURL=processor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UidMapBuilder = void 0;\nvar UidMapBuilder = /** @class */ (function () {\n function UidMapBuilder() {\n this.uidMap = {};\n }\n UidMapBuilder.prototype.addDefaultRows = function (rowData) {\n var _this = this;\n rowData.forEach(function (row, rowCount) {\n var _a;\n _this.uidMap[row.uid] = (_a = row.rowId) !== null && _a !== void 0 ? _a : rowCount;\n });\n return this;\n };\n UidMapBuilder.prototype.addDynamicRows = function (tableState) {\n var _this = this;\n tableState.forEach(function (row) {\n var uid = row === null || row === void 0 ? void 0 : row.uid;\n if (uid && uid.indexOf(\"dynamicRow_\") > -1) {\n _this.incrementUidAndShift(uid, row.rowId);\n }\n });\n return this;\n };\n UidMapBuilder.prototype.removeRows = function (tableState) {\n var _this = this;\n tableState.forEach(function (row) {\n var uid = row === null || row === void 0 ? void 0 : row.uid;\n if (uid && (row === null || row === void 0 ? void 0 : row.dynamicallyRemoved)) {\n _this.uidMap[uid] = -1;\n }\n });\n return this;\n };\n UidMapBuilder.prototype.sortByValue = function () {\n var _this = this;\n var count = 0;\n var sortedUids = [];\n this.getUidKeys().forEach(function (uid) {\n var _a;\n sortedUids.push((_a = {}, _a[uid] = _this.uidMap[uid], _a));\n });\n sortedUids = sortedUids.sort(function (a, b) { return a[Object.keys(a)[0]] - b[Object.keys(b)[0]]; });\n sortedUids.forEach(function (uid) {\n var uidKey = Object.keys(uid)[0];\n if (_this.uidMap[uidKey] > -1) {\n _this.uidMap[uidKey] = count++;\n }\n });\n return this;\n };\n UidMapBuilder.prototype.create = function () {\n return this.uidMap;\n };\n UidMapBuilder.prototype.incrementUidAndShift = function (uid, rowId) {\n var _this = this;\n this.getUidKeys().forEach(function (uid) {\n if (_this.uidMap[uid] >= rowId) {\n _this.uidMap[uid]++;\n }\n });\n this.uidMap[uid] = rowId;\n };\n UidMapBuilder.prototype.getUidKeys = function () {\n return Object.keys(this.uidMap);\n };\n return UidMapBuilder;\n}());\nexports.UidMapBuilder = UidMapBuilder;\n//# sourceMappingURL=UidMapBuilder.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHeaderStyle = exports.getCellStyle = exports.getTableUiSchema = exports.getTableActions = exports.getCellValidationInfo = exports.createTableUids = exports.overrideDefaultsAndFilterRows = exports.getValueBasedOnState = exports.getTableFormData = exports.removeRowFromTable = exports.addRowToTable = exports.addRowsToTable = exports.overrideCellValue = exports.createInitialRows = exports.getInitialTableFormData = exports.calculateColumnWidth = exports.isTableInState = exports.overrideTableDefaultsWithChanges = exports.getTableHelpers = exports.getTableComponentSchema = void 0;\nvar Tables_1 = require(\"@microchip/melody-automodule-interface/lib/src/Tables\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar UidMapBuilder_1 = require(\"./UidMapBuilder\");\nfunction getTableComponentSchema(component, viewModel) {\n var _a, _b, _c, _d;\n var tableColumns = {};\n for (var columnsKey in component.columns) {\n var rjsfType = void 0;\n if (component.columns[columnsKey].type === \"ComboBox\") {\n var colBox = component.columns[columnsKey];\n rjsfType = \"string\";\n tableColumns[columnsKey] = {\n type: rjsfType,\n title: colBox.title,\n default: getDefaultValue(viewModel.overrideDefaultValues, colBox, columnsKey, component.name),\n enum: getComboOptions(viewModel.overrideTableOptions, colBox, columnsKey, component.name),\n };\n }\n else {\n rjsfType = (_a = component === null || component === void 0 ? void 0 : component.columns[columnsKey]) === null || _a === void 0 ? void 0 : _a.type;\n tableColumns[columnsKey] = {\n type: rjsfType,\n title: component.columns[columnsKey].title,\n default: component.columns[columnsKey].defaultValue,\n };\n }\n }\n return {\n type: \"array\",\n title: (_d = (_c = (_b = viewModel.getDerivedFunction).overrideTitle) === null || _c === void 0 ? void 0 : _c.call(_b, component.name)) !== null && _d !== void 0 ? _d : component.description,\n items: {\n type: \"object\",\n properties: __assign({}, tableColumns),\n },\n };\n}\nexports.getTableComponentSchema = getTableComponentSchema;\nvar getTableHelpers = function () {\n return {\n addRowToTable: addRowToTable,\n addRowsToTable: addRowsToTable,\n calculateColumnWidth: calculateColumnWidth,\n createInitialRows: createInitialRows,\n createTableUids: createTableUids,\n getCellStyle: getCellStyle,\n getCellValidationInfo: getCellValidationInfo,\n getHeaderStyle: getHeaderStyle,\n getInitialTableFormData: getInitialTableFormData,\n getTableActions: getTableActions,\n getTableFormData: getTableFormData,\n getTableUiSchema: getTableUiSchema,\n getValueBasedOnState: getValueBasedOnState,\n isTableInState: isTableInState,\n overrideCellValue: overrideCellValue,\n overrideDefaultsAndFilterRows: overrideDefaultsAndFilterRows,\n overrideTableDefaultsWithChanges: overrideTableDefaultsWithChanges,\n removeRowFromTable: removeRowFromTable,\n createUidMapBuilder: function () { return new UidMapBuilder_1.UidMapBuilder(); },\n };\n};\nexports.getTableHelpers = getTableHelpers;\nfunction overrideTableDefaultsWithChanges(rowChanged, initialFormData, uidMap) {\n var value = __spreadArray([], initialFormData, true);\n if (Array.isArray(rowChanged)) {\n rowChanged.forEach(function (changedRow) {\n var changedUid = changedRow.uid;\n var rowChangeNum = uidMap[changedUid];\n value[rowChangeNum] = __assign(__assign({}, value[rowChangeNum]), changedRow);\n });\n }\n return value;\n}\nexports.overrideTableDefaultsWithChanges = overrideTableDefaultsWithChanges;\nfunction isTableInState(tabState, component) {\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isTableInState = isTableInState;\nfunction calculateColumnWidth(columns) {\n if (!columns) {\n return {};\n }\n var runningWidth = 0;\n var booleanFields = 0;\n var columnWidths = {};\n for (var columnName in columns) {\n if (columns[columnName].type === \"boolean\") {\n var width = 8;\n booleanFields++;\n columnWidths[columnName] = width;\n runningWidth += width;\n }\n }\n for (var columnName in columns) {\n if (columns[columnName].type !== \"boolean\") {\n var width = (100 - runningWidth) / (Object.keys(columns).length - booleanFields);\n columnWidths[columnName] = width;\n }\n }\n return columnWidths;\n}\nexports.calculateColumnWidth = calculateColumnWidth;\nfunction getInitialTableFormData(table, columnNames, model) {\n var value = [];\n var tableFormData = {};\n columnNames.forEach(function (columnName) {\n if (!tableFormData[columnName]) {\n tableFormData[columnName] = getDefaultValue(model.getDerivedFunctions().overrideTableDefaultValues, table.columns[columnName], columnName, table.name);\n }\n });\n if (!(table === null || table === void 0 ? void 0 : table.rowData)) {\n value = createInitialRows(table, tableFormData);\n }\n else {\n var rowId_1 = 0;\n table === null || table === void 0 ? void 0 : table.rowData.forEach(function (row) {\n var rowDataCols = Object.keys(row);\n columnNames.forEach(function (colName) {\n var _a;\n if (rowDataCols.indexOf(colName) === -1) {\n row = __assign(__assign({}, row), (_a = {}, _a[colName] = tableFormData[colName], _a.uid = createRowUid(Tables_1.RowPrefix.Default, rowId_1), _a));\n }\n });\n value.push(__assign(__assign({}, row), { uid: createRowUid(Tables_1.RowPrefix.Default, rowId_1), rowId: rowId_1 }));\n rowId_1++;\n });\n }\n return value;\n}\nexports.getInitialTableFormData = getInitialTableFormData;\nfunction createInitialRows(table, tableFormData) {\n var _a;\n if (tableFormData === void 0) { tableFormData = {}; }\n var value = [];\n var initialRows = (_a = table === null || table === void 0 ? void 0 : table.defaultRowNum) !== null && _a !== void 0 ? _a : 1;\n for (var i = 0; i < initialRows; i++) {\n value.push(__assign(__assign({}, tableFormData), { rowId: i, uid: createRowUid(Tables_1.RowPrefix.Default, i) }));\n }\n return value;\n}\nexports.createInitialRows = createInitialRows;\nfunction overrideCellValue(tableData, cell) {\n var modifiedTableData = __spreadArray([], tableData, true);\n modifiedTableData[cell.rowId][cell.columnName] = cell.value;\n return modifiedTableData;\n}\nexports.overrideCellValue = overrideCellValue;\nfunction addRowsToTable(tableData, columns, newRow, numberOfRows) {\n if (numberOfRows <= 0) {\n return tableData;\n }\n var value = addRowToTable(tableData, columns, __assign(__assign({}, newRow), { uid: Tables_1.RowPrefix.Dynamic + (numberOfRows - 1) }));\n return addRowsToTable(value, columns, newRow, numberOfRows - 1);\n}\nexports.addRowsToTable = addRowsToTable;\nfunction addRowToTable(tableData, columns, newRow) {\n var _a;\n var columnNames = Object.keys(columns);\n var newRowCols = Object.keys(newRow);\n var newRowId = newRow.rowId;\n var filteredTableTemp = [];\n if (tableData.length === 0) {\n filteredTableTemp.push(newRow);\n return filteredTableTemp;\n }\n if (newRowId != null) {\n columnNames.forEach(function (colName) {\n var _a;\n var _b, _c;\n var defaultColumnWidth = calculateColumnWidth(columns);\n if (newRowCols.indexOf(colName) === -1) {\n newRow = __assign(__assign({}, newRow), (_a = {}, _a[colName] = (_c = (_b = columns[colName].defaultValue) === null || _b === void 0 ? void 0 : _b[\"value\"]) !== null && _c !== void 0 ? _c : columns[colName].defaultValue, _a.columnWidth = columns[colName].columnWidth\n ? columns[colName].columnWidth + \"%\"\n : defaultColumnWidth[colName] + \"%\", _a));\n }\n });\n var tableFirstHalf = tableData.slice(0, newRowId);\n var tableSecondHalf = tableData.slice(newRowId);\n for (var i = 0; i < tableSecondHalf.length; i++) {\n var currentRowId = tableSecondHalf[i].rowId;\n tableSecondHalf[i] = __assign(__assign({}, tableSecondHalf[i]), { rowId: currentRowId + 1 });\n var actions = (_a = tableSecondHalf[i]) === null || _a === void 0 ? void 0 : _a.actions;\n if (actions) {\n tableSecondHalf[i][\"actions\"] = updateActionsRowId(actions, currentRowId + 1);\n }\n }\n tableFirstHalf.push(newRow);\n filteredTableTemp = __spreadArray(__spreadArray([], tableFirstHalf, true), tableSecondHalf, true);\n return filteredTableTemp;\n }\n return tableData;\n}\nexports.addRowToTable = addRowToTable;\nfunction removeRowFromTable(tableData, rowId) {\n var _a;\n var tableRemoved = tableData.filter(function (row) { return row.rowId !== rowId; });\n for (var i = 0; i < tableRemoved.length; i++) {\n tableRemoved[i].rowId = i;\n var actions = (_a = tableRemoved[i]) === null || _a === void 0 ? void 0 : _a.actions;\n if (actions) {\n tableRemoved[i][\"actions\"] = updateActionsRowId(actions, i);\n }\n }\n return tableRemoved;\n}\nexports.removeRowFromTable = removeRowFromTable;\nfunction getTableFormData(model, table, tab) {\n var _a;\n return ((_a = model.getDerivedFunction(table.name, table, model, tab)) !== null && _a !== void 0 ? _a : getValueBasedOnState(table, model, tab));\n}\nexports.getTableFormData = getTableFormData;\nfunction getValueBasedOnState(table, model, tab) {\n var columnNames = Object.keys(table.columns);\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n var initialFormData = getInitialTableFormData(table, columnNames, model);\n if (!isTableInState(tabState, table)) {\n return initialFormData;\n }\n else {\n var rowChanged = tabState[table.group][table.name];\n var tableUids = createTableUids(table, tab, model, rowChanged);\n return overrideDefaultsAndFilterRows(rowChanged, initialFormData, table.columns, tableUids, table, tab);\n }\n}\nexports.getValueBasedOnState = getValueBasedOnState;\nfunction overrideDefaultsAndFilterRows(rowChanged, initialFormData, columns, tableUids, component, tab) {\n var modifiedForData = __spreadArray([], initialFormData, true);\n var keys = Object.keys(tableUids);\n rowChanged = rowChanged.filter(function (row) { return row != null; });\n rowChanged.forEach(function (row) {\n if (row.uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1) {\n modifiedForData.push(row);\n }\n });\n var filteredModifed = [];\n keys.forEach(function (uid) {\n modifiedForData.forEach(function (row) {\n if (row.uid === uid) {\n filteredModifed[tableUids[uid]] = __assign(__assign({}, initialFormData[0]), row);\n }\n });\n });\n filteredModifed = filteredModifed.filter(function (row) { return row; });\n for (var i = 0; i < filteredModifed.length; i++) {\n if (filteredModifed[i].uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1)\n continue;\n filteredModifed[i].rowId++;\n }\n var _loop_1 = function (i) {\n Object.keys(columns).forEach(function (columnName) {\n modifiedForData[i].actions = updateActionsRowId(createDefaultTableAction(component, i, columnName, tab, tableUids), i);\n });\n };\n for (var i = 0; i < modifiedForData.length; i++) {\n _loop_1(i);\n }\n return overrideTableDefaultsWithChanges(rowChanged, filteredModifed, tableUids);\n}\nexports.overrideDefaultsAndFilterRows = overrideDefaultsAndFilterRows;\nfunction createTableUids(component, tab, model, tableState) {\n var _a, _b, _c;\n var table = component;\n var dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);\n if (dynamicTableData) {\n var uidMap_1 = {};\n var rowNum_1 = 0;\n dynamicTableData.forEach(function (entry) {\n var uid = entry === null || entry === void 0 ? void 0 : entry.uid;\n if (uid !== undefined) {\n uidMap_1[uid] = rowNum_1++;\n }\n });\n return uidMap_1;\n }\n var rowData = table[\"rowData\"];\n if (!dynamicTableData && rowData) {\n var _loop_2 = function (i) {\n if (!rowData[i].uid) {\n rowData[i].uid = createRowUid(Tables_1.RowPrefix.Default, i);\n }\n rowData[i].rowId =\n (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (row) { return row.uid === (rowData === null || rowData === void 0 ? void 0 : rowData[i].uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : rowData[i].rowId;\n };\n for (var i = 0; i < rowData.length; i++) {\n _loop_2(i);\n }\n }\n else {\n rowData =\n dynamicTableData !== null && dynamicTableData !== void 0 ? dynamicTableData : createInitialRows(table).map(function (row) {\n var _a, _b;\n return __assign(__assign({}, (row !== null && row !== void 0 ? row : {})), { rowId: (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (r) { return r.uid === (row === null || row === void 0 ? void 0 : row.uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : row.rowId });\n });\n }\n var uidMapBuilder = (_c = model === null || model === void 0 ? void 0 : model.getTableHelpers().createUidMapBuilder()) !== null && _c !== void 0 ? _c : (0, exports.getTableHelpers)().createUidMapBuilder();\n return uidMapBuilder\n .addDefaultRows(rowData)\n .addDynamicRows(tableState !== null && tableState !== void 0 ? tableState : [])\n .removeRows(tableState !== null && tableState !== void 0 ? tableState : [])\n .sortByValue()\n .create();\n}\nexports.createTableUids = createTableUids;\nfunction getCellValidationInfo(component) {\n var table = component;\n var colInfo = [];\n var columns = table.columns;\n for (var column in columns) {\n var colData = table.columns[column];\n if (colData === null || colData === void 0 ? void 0 : colData[\"cellValidator\"]) {\n colInfo.push({\n type: colData[\"type\"],\n minValue: colData[\"cellValidator\"][\"minValue\"],\n maxValue: colData[\"cellValidator\"][\"maxValue\"],\n errMessage: colData[\"cellValidator\"][\"errorMessage\"],\n errTitle: colData[\"cellValidator\"][\"errorTitle\"],\n cValidation: colData[\"cellValidator\"][\"cValidation\"],\n cValidationErrTitle: colData[\"cellValidator\"][\"cValidationErrorTitle\"],\n cValidationErrMessage: colData[\"cellValidator\"][\"cValidationErrorMessage\"],\n });\n }\n }\n return colInfo;\n}\nexports.getCellValidationInfo = getCellValidationInfo;\nfunction getTableActions(component, tab, model, uids, rowFormData) {\n var _a, _b, _c, _d, _e;\n var table = component;\n var dynamicTableData;\n if (!rowFormData) {\n dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);\n }\n var rowData = (_b = (_a = rowFormData !== null && rowFormData !== void 0 ? rowFormData : dynamicTableData) !== null && _a !== void 0 ? _a : table[\"rowData\"]) !== null && _b !== void 0 ? _b : createInitialRows(table);\n var columnNames = Object.keys(table.columns);\n var tableActions = { table: {} };\n var rowCount = 0;\n var tableState = (_e = (_d = (_c = model === null || model === void 0 ? void 0 : model.getState()) === null || _c === void 0 ? void 0 : _c[tab]) === null || _d === void 0 ? void 0 : _d[component.group]) === null || _e === void 0 ? void 0 : _e[component.name];\n rowData.forEach(function (row) {\n columnNames.forEach(function (columnName) {\n var _a, _b, _c, _d;\n if (!tableActions[\"table\"][row.uid]) {\n tableActions[\"table\"][row.uid] = {};\n }\n var uid;\n for (var uidsKey in uids) {\n if (uids[uidsKey] === row.rowId) {\n uid = uidsKey;\n }\n }\n uid = uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount);\n var defaultAction = createDefaultTableAction(component, rowCount, columnName, tab, uid);\n if (tableState) {\n var ind_1 = -1;\n var filtered = tableState.filter(function (row, index) {\n ind_1 = index;\n return row.uid === uid;\n });\n if (filtered.length) {\n defaultAction = createDefaultTableAction(component, ind_1, columnName, tab, uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount));\n }\n }\n if (component.columns[columnName].type == \"ComboBox\") {\n defaultAction[\"payload\"] = __assign(__assign({}, defaultAction[\"payload\"]), { options: getComboOptions((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.overrideTableOptions, table.columns[columnName], columnName, component.name) });\n }\n var cellAction = (_c = (_b = row.actions) === null || _b === void 0 ? void 0 : _b[columnName]) !== null && _c !== void 0 ? _c : defaultAction;\n tableActions[\"table\"][row.uid][columnName] =\n (_d = model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getActions\", table.name, cellAction)) !== null && _d !== void 0 ? _d : cellAction;\n });\n rowCount++;\n });\n var uidKeys = Object.keys(uids);\n uidKeys.forEach(function (uidKey) {\n columnNames.forEach(function (columnName) {\n if (uids[uidKey] > -1) {\n if (!tableActions[\"table\"][uidKey]) {\n tableActions[\"table\"][uidKey] = {};\n tableActions[\"table\"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);\n }\n else if (!tableActions[\"table\"][uidKey][columnName]) {\n tableActions[\"table\"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);\n }\n }\n });\n });\n return JSON.stringify(tableActions);\n}\nexports.getTableActions = getTableActions;\nfunction getTableUiSchema(table, columns) {\n var _a, _b;\n var tableUi = {\n tableCols: columns,\n search: table[\"isSearchable\"],\n striped: true,\n bordered: false,\n };\n if (table[\"canRemoveRows\"]) {\n tableUi = __assign(__assign({}, tableUi), { rightActions: getTableRightActions() });\n }\n if (table[\"canInsertRows\"]) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: getTableLeftActions() });\n }\n if (table.canMoveRowDown) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: ((_a = tableUi.leftActions) !== null && _a !== void 0 ? _a : []).concat(getTableMoveRowActions()[0]) });\n }\n if (table.canMoveRowUp) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: ((_b = tableUi.leftActions) !== null && _b !== void 0 ? _b : []).concat(getTableMoveRowActions()[1]) });\n }\n return {\n \"ui:field\": \"table\",\n className: \"col-md-12 individualComponent\",\n table: __assign({}, tableUi),\n };\n}\nexports.getTableUiSchema = getTableUiSchema;\nfunction getCellStyle(isReadonly) {\n var tdStyle = {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n if (isReadonly) {\n tdStyle[\"backgroundColor\"] = \"#EEEEEE\";\n }\n return tdStyle;\n}\nexports.getCellStyle = getCellStyle;\nfunction getHeaderStyle(maxHeaderSize, displayHeadersDiagonally) {\n return displayHeadersDiagonally\n ? getDiagonalHeaderStyles(maxHeaderSize)\n : getDefaultHeaderStyles(maxHeaderSize);\n}\nexports.getHeaderStyle = getHeaderStyle;\nfunction getDiagonalHeaderStyles(maxHeaderSize) {\n var headerSizeMultiplier = 3.3;\n return {\n position: \"relative\",\n bottom: \"-7px\",\n pointerEvents: \"none\",\n left: \"6px\",\n transformOrigin: \"bottom left\",\n transform: \"rotate(-30deg)\",\n paddingTop: \"\".concat(headerSizeMultiplier * maxHeaderSize, \"px\"),\n };\n}\nfunction getDefaultHeaderStyles(maxHeaderSize) {\n return {\n whiteSpace: \"unset\",\n maxWidth: \"\".concat(maxHeaderSize, \"px\"),\n };\n}\nfunction createDefaultTableAction(component, row, column, tab, uid) {\n return {\n type: \"[Table] EDIT_CELL\",\n payload: {\n tabId: tab !== null && tab !== void 0 ? tab : \"main\",\n path: \"\".concat(component === null || component === void 0 ? void 0 : component.group, \".\").concat(component === null || component === void 0 ? void 0 : component.name),\n column: column,\n value: \"%v\",\n uid: uid,\n rowId: row,\n },\n };\n}\nfunction updateActionsRowId(currentActions, rowId) {\n var modifiedActions = __assign({}, currentActions);\n var columnNames = Object.keys(currentActions);\n columnNames.forEach(function (columnName) {\n var _a;\n var payload = (_a = modifiedActions[columnName]) === null || _a === void 0 ? void 0 : _a[\"payload\"];\n if (payload) {\n var path = payload[\"path\"].split(\".\");\n path[path.length - 2] = rowId;\n modifiedActions[columnName][\"payload\"][\"rowId\"] = rowId;\n modifiedActions[columnName][\"payload\"][\"path\"] = path.join(\".\");\n }\n });\n return modifiedActions;\n}\nvar getDefaultValue = function (overrideDefaultValues, component, componentName, tableName) {\n var _a;\n return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(tableName, componentName)) !== null && _a !== void 0 ? _a : (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue));\n};\nvar getComboOptions = function (overrideOptions, component, componentName, tableName) {\n var _a;\n var dynamicOptions = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(tableName, componentName);\n return dynamicOptions && dynamicOptions.length > 0\n ? dynamicOptions\n : (_a = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _a === void 0 ? void 0 : _a[\"options\"];\n};\nfunction getTableLeftActions() {\n return [\n {\n dataField: \"insert-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n tdStyle: { textOverflow: \"unset\" },\n },\n ];\n}\nfunction getTableRightActions() {\n return [\n {\n dataField: \"delete-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n tdStyle: { textOverflow: \"unset\" },\n },\n ];\n}\nfunction getTableMoveRowActions() {\n return [\n {\n dataField: \"row-down-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n },\n {\n dataField: \"row-up-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n },\n ];\n}\nfunction createRowUid(prefix, postfix) {\n return prefix + postfix;\n}\n//# sourceMappingURL=tables.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pin_standard_1 = require(\"./pin-standard\");\nexports.pin_standard = pin_standard_1.pin_standard;\nexports.pin_state = pin_standard_1.pin_state;\nexports.direction = pin_standard_1.direction;\nexports.behaviour = pin_standard_1.behaviour;\nexports.data_schema = pin_standard_1.data_schema;\nexports.pin_attribs_enum = pin_standard_1.pin_attribs_enum;\nexports.actiontype = pin_standard_1.actiontype;\nexports.QueryAdapterKey = pin_standard_1.QueryAdapterKey;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pin_standard = function () {\n return {\n interfaceId: {\n name: \"pin-standard\",\n version: \"0.1.0\",\n },\n };\n};\nvar QueryAdapterKey;\n(function (QueryAdapterKey) {\n QueryAdapterKey[\"ALLPINS\"] = \"allpins\";\n QueryAdapterKey[\"ALLPINS_FOR_ATTRIBS\"] = \"allpins_for_attribs\";\n QueryAdapterKey[\"PPS\"] = \"pps\";\n QueryAdapterKey[\"PORTMUX\"] = \"portmux\";\n QueryAdapterKey[\"HASPPS\"] = \"hasPPS\";\n})(QueryAdapterKey = exports.QueryAdapterKey || (exports.QueryAdapterKey = {}));\nvar pin_state;\n(function (pin_state) {\n pin_state[\"EMPTY\"] = \"E\";\n pin_state[\"LOCKED\"] = \"L\";\n pin_state[\"UNLOCK\"] = \"UL\";\n pin_state[\"DiSABLE_LOCK\"] = \"DL\";\n pin_state[\"UNLOCKED_DISABLED\"] = \"DUL\";\n pin_state[\"LOCKED_LINK\"] = \"LL\";\n pin_state[\"UNLOCKED_MUX\"] = \"MUL\";\n pin_state[\"LOCKED_CONFLICT\"] = \"CL\";\n})(pin_state = exports.pin_state || (exports.pin_state = {}));\nvar pin_interrupts_enum;\n(function (pin_interrupts_enum) {\n pin_interrupts_enum[\"INTDIS_BUFFEN\"] = \"INTDIS_BUFFEN\";\n pin_interrupts_enum[\"BOTH_EDGES\"] = \"BOTH_EDGES\";\n pin_interrupts_enum[\"RISING_EDGE\"] = \"RISING_EDGE\";\n pin_interrupts_enum[\"FALLING_EDGE\"] = \"FALLING_EDGE\";\n pin_interrupts_enum[\"NONE\"] = \"NONE\";\n pin_interrupts_enum[\"LOW_LEVEL\"] = \"LOW_LEVEL\";\n})(pin_interrupts_enum = exports.pin_interrupts_enum || (exports.pin_interrupts_enum = {}));\nvar pin_attribs_enum;\n(function (pin_attribs_enum) {\n pin_attribs_enum[\"aliasReEx\"] = \"aliasReEx\";\n pin_attribs_enum[\"cname\"] = \"cname\";\n pin_attribs_enum[\"high\"] = \"high\";\n pin_attribs_enum[\"inv\"] = \"inv\";\n pin_attribs_enum[\"wpu\"] = \"wpu\";\n pin_attribs_enum[\"wpd\"] = \"wpd\";\n pin_attribs_enum[\"od\"] = \"od\";\n pin_attribs_enum[\"analog\"] = \"analog\";\n pin_attribs_enum[\"ioc\"] = \"ioc\";\n pin_attribs_enum[\"intcallback\"] = \"intcallback\";\n pin_attribs_enum[\"alias\"] = \"alias\";\n pin_attribs_enum[\"advInpBuff\"] = \"advInpBuff\";\n})(pin_attribs_enum = exports.pin_attribs_enum || (exports.pin_attribs_enum = {}));\nvar actiontype;\n(function (actiontype) {\n actiontype[\"SETACTION\"] = \"SETACTION\";\n actiontype[\"ATTRIBACTION\"] = \"ATTRIBACTION\";\n})(actiontype = exports.actiontype || (exports.actiontype = {}));\nvar direction;\n(function (direction) {\n direction[\"output\"] = \"output\";\n direction[\"input\"] = \"input\";\n direction[\"bidirectional\"] = \"bidirectional\";\n})(direction = exports.direction || (exports.direction = {}));\nvar behaviour;\n(function (behaviour) {\n behaviour[\"LOCK_UNLOCK\"] = \"LOCK_UNLOCK\";\n behaviour[\"ALWAYS_LOCKED\"] = \"ALWAYS_LOCKED\";\n behaviour[\"SINGLE_PIN_MUX\"] = \"SINGLE_PIN_MUX\";\n behaviour[\"OPTIONAL_PIN_MUX\"] = \"OPTIONAL_PIN_MUX\";\n behaviour[\"PPS\"] = \"PPS\";\n behaviour[\"APFCON\"] = \"APFCON\";\n behaviour[\"PORTMUX\"] = \"PORTMUX\";\n behaviour[\"EXCLUSIVE_LOCK\"] = \"EXCLUSIVE_LOCK\";\n behaviour[\"LOCKED_DISABLED\"] = \"LOCKED_DISABLED\";\n})(behaviour = exports.behaviour || (exports.behaviour = {}));\n//------------------------------------ schema ------------------------------------//\nexports.data_schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n $ref: \"#/definitions/intf_data\",\n definitions: {\n intf_data: {\n type: \"object\",\n properties: {\n rows: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_row\",\n },\n },\n },\n required: [\"rows\"],\n additionalProperties: false,\n },\n pin_row: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n module: {\n type: \"string\",\n },\n function: {\n type: \"string\",\n },\n direction: {\n $ref: \"#/definitions/direction\",\n },\n filter: {\n $ref: \"#/definitions/filter\",\n },\n behaviour: {\n $ref: \"#/definitions/behaviour\",\n },\n behaviourMeta: {\n $ref: \"#/definitions/behaviourMeta\",\n },\n attribs: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_attribs\",\n },\n },\n groupsdata: {\n $ref: \"#/definitions/pingroups_data\",\n },\n actions: {},\n },\n required: [\"name\", \"module\", \"function\", \"direction\", \"filter\", \"behaviour\"],\n additionalProperties: false,\n },\n direction: {\n type: \"string\",\n enum: [\"output\", \"input\", \"bidirectional\"],\n },\n filter: {\n type: \"object\",\n properties: {\n module: {\n type: \"string\",\n },\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"module\", \"aliasReEx\"],\n additionalProperties: false,\n },\n behaviour: {\n type: \"string\",\n enum: [\n \"LOCK_UNLOCK\",\n \"ALWAYS_LOCKED\",\n \"SINGLE_PIN_MUX\",\n \"OPTIONAL_PIN_MUX\",\n \"PPS\",\n \"PORTMUX\",\n \"EXCLUSIVE_LOCK\",\n \"LOCKED_DISABLED\",\n ],\n },\n behaviourMeta: {\n type: \"object\",\n properties: {\n lockPinRegEx: {\n type: \"string\",\n },\n },\n required: [\"lockPinRegEx\"],\n additionalProperties: false,\n },\n pin_attribs: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n cname: {\n type: \"string\",\n },\n high: {\n type: \"boolean\",\n },\n inv: {\n type: \"boolean\",\n },\n wpu: {\n type: \"boolean\",\n },\n wpd: {\n type: \"boolean\",\n },\n od: {\n type: \"boolean\",\n },\n analog: {\n type: \"boolean\",\n },\n ioc: {\n $ref: \"#/definitions/pin_interrupts_enum\",\n },\n bidirection_out: {\n type: \"boolean\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n pin_interrupts_enum: {\n type: \"string\",\n enum: [\n \"INTDIS_BUFFEN\",\n \"BOTH_EDGES\",\n \"RISING_EDGE\",\n \"FALLING_EDGE\",\n \"NONE\",\n \"LOW_LEVEL\",\n ],\n },\n pingroups_data: {\n type: \"object\",\n properties: {\n groups: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pins_group\",\n },\n },\n },\n required: [\"groups\"],\n additionalProperties: false,\n },\n pins_group: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n filter: {\n $ref: \"#/definitions/grpfilter\",\n },\n datapath: {\n type: \"string\",\n },\n },\n required: [\"name\", \"filter\"],\n additionalProperties: false,\n },\n grpfilter: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=pin-standard.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AlertTypes;\n(function (AlertTypes) {\n AlertTypes[\"Error\"] = \"error\";\n AlertTypes[\"Warning\"] = \"warning\";\n AlertTypes[\"Hint\"] = \"hint\";\n})(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));\n/**\n * Type guard function for SingletonProcessedResource\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction hasOptions(dep) {\n return dep.options !== undefined;\n}\nexports.hasOptions = hasOptions;\n/**\n * Type guard function for SingletonProcessedResource\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isAssigned(dep) {\n return typeof dep.handle !== \"undefined\";\n}\nexports.isAssigned = isAssigned;\n/**\n * Type guard function for SingletonProcessedResource\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isUnassigned(dep) {\n return typeof dep.handle === \"undefined\";\n}\nexports.isUnassigned = isUnassigned;\n/**\n * Type guard function for SingletonExport\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n * @param resource the export to check on being a singleton\n * @deprecated No longer used. Replaced with dynamic singleton identification\n * at runtime.\n */\nfunction isSingleton(resource) {\n return typeof resource.isSingleton !== \"undefined\" && resource.isSingleton;\n}\nexports.isSingleton = isSingleton;\n/**\n * Returns a copy of `populatedImport` with all options removed which\n * cause `optionFilter` to return false.\n */\nfunction filterOptions(populatedImport, optionFilter) {\n if (populatedImport.options) {\n return __assign({}, populatedImport, { options: populatedImport.options.filter(optionFilter) });\n }\n return populatedImport;\n}\nexports.filterOptions = filterOptions;\n/**\n * Returns a copy of `populatedImport` with the options' handle labels\n * mapped according to `labelFactory`.\n */\nfunction mapOptionLabels(populatedImport, labelFactory) {\n if (populatedImport.options) {\n return __assign({}, populatedImport, { options: populatedImport.options.map(function (option) {\n return __assign({}, option, { handle: __assign({}, option.handle, { label: labelFactory(option) }) });\n }) });\n }\n return populatedImport;\n}\nexports.mapOptionLabels = mapOptionLabels;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateRegisterView = void 0;\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar ViewSchemaBuilder_1 = require(\"./ViewSchemaBuilder\");\nvar Model_1 = require(\"./Model\");\nvar throwError = function (message) {\n throw new Error(message);\n};\nvar CreateRegisterView = /** @class */ (function () {\n function CreateRegisterView(module) {\n var _this = this;\n this.registers = [];\n this.interrupts = [];\n /** Create a register view */\n this.create = function () {\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n title: \"Register Settings\",\n type: \"object\",\n })\n .withTabName(\"Register Initialization\")\n .withExpandedDefault(false);\n _this.registers.forEach(function (reg) {\n schemaBuilder.addChildComponent(reg.getRegister().name, _this.createRegisterView(reg));\n });\n schemaBuilder.addChildComponent(\"interrupts\", _this.createInterruptView());\n return schemaBuilder.build();\n };\n /** Assign a numerical value to the given register. */\n this.withRegisterValue = function (register, value) {\n _this.getSafeRegisterViewModel(register).setValue(value);\n return _this;\n };\n /** Assign a string value to the given interrupt. */\n this.withInterruptValue = function (interrupt, value) {\n _this.getSafeInterruptViewModel(interrupt).setValue(value);\n return _this;\n };\n /** Assign the interrupt combobox options. */\n this.withInterruptOptions = function (interrupt, options) {\n _this.getSafeInterruptViewModel(interrupt).setOptions(options);\n return _this;\n };\n /** Make all settings in all registers editable */\n this.withAllEditable = function () {\n _this.registers.forEach(function (register) {\n return _this.withEditableRegister(register.getRegister());\n });\n _this.interrupts.forEach(function (interrupt) {\n _this.withEditableInterrupt(interrupt.getInterrupt());\n });\n return _this;\n };\n /** Make settings in the given register editable based on setting type*/\n this.withEditableRegister = function (register) {\n var _a, _b;\n _this.getSafeRegisterViewModel(register).setReadonly(false);\n if (register) {\n (_b = (0, Arrays_1.values)((_a = register === null || register === void 0 ? void 0 : register.settings) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {\n if ((setting === null || setting === void 0 ? void 0 : setting.type) === \"R\") {\n _this.getSafeSettingViewModel(register, setting).setReadonly(true);\n }\n });\n }\n return _this;\n };\n /** Make a given setting in register editable */\n this.withEditableSetting = function (register, setting) {\n _this.getSafeSettingViewModel(register, setting).setReadonly(false);\n return _this;\n };\n /** Make a given interrupt editable */\n this.withEditableInterrupt = function (interrupt) {\n _this.getSafeInterruptViewModel(interrupt).setReadonly(false);\n return _this;\n };\n this.getSafeRegisterViewModel = function (register) {\n var _a;\n return (_a = _this.getRegisterViewModel(register !== null && register !== void 0 ? register : throwError(\"Invalid register parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get register view model for '\".concat(register.name, \"'. Not found in this module.\"));\n };\n this.getSafeInterruptViewModel = function (interrupt) {\n var _a;\n return (_a = _this.getInterruptViewModel(interrupt !== null && interrupt !== void 0 ? interrupt : throwError(\"Invalid interrupt parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get interrupt view model for '\".concat(interrupt.name, \"'. Not found in this module.\"));\n };\n this.getSafeSettingViewModel = function (register, setting) {\n var _a;\n return (_a = _this.getSafeRegisterViewModel(register).getSettingViewModel(setting !== null && setting !== void 0 ? setting : throwError(\"Invalid setting parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get setting view model for '\".concat(setting.name, \"'. Not found in this module.\"));\n };\n this.getRegisterViewModel = function (register) {\n var name = register.name;\n return (0, Arrays_1.find)(_this.registers, function (rv) { return rv.getRegister().name === name; });\n };\n this.getInterruptViewModel = function (interrupt) {\n var name = interrupt.name;\n return (0, Arrays_1.find)(_this.interrupts, function (rv) { return rv.getInterrupt().name === name; });\n };\n this.createRegisterView = function (register) {\n var registerValue = register.getValue() || 0;\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n type: \"object\",\n title: register.getName() +\n \" : \" +\n CalculateRegisterValue_1.default.toHexString(registerValue),\n description: register.getDescription(),\n properties: {},\n })\n .withUiSchema({})\n .withFormData({});\n register.forEachSetting(function (setting) {\n schemaBuilder.addChildComponent(setting.getName(), _this.createSettingView(setting));\n });\n return schemaBuilder.build();\n };\n this.createSettingView = function (setting) {\n return setting.hasOptions()\n ? _this.createHasOptionsViewSchema(setting)\n : _this.getNoOptionsViewSchema(setting);\n };\n this.createInterruptView = function () {\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n type: \"object\",\n title: \"Interrupts\",\n properties: {},\n })\n .withUiSchema({})\n .withFormData({});\n _this.interrupts.forEach(function (int) {\n schemaBuilder.addChildComponent(int.getInterrupt().name, _this.createInterruptViewSchema(int));\n });\n return schemaBuilder.build();\n };\n this.module = module;\n this.registers = this.createRegisterViewModelForEachRegister(module);\n this.interrupts = this.createInterruptViewModelForEachInterrupt(module);\n }\n CreateRegisterView.prototype.createRegisterViewModelForEachRegister = function (module) {\n var _a;\n var models = [];\n var registers = (_a = module.registers) !== null && _a !== void 0 ? _a : {};\n Object.keys(registers).forEach(function (registerKey) {\n models.push(new Model_1.RegisterViewModel(registers[registerKey]));\n });\n return models;\n };\n CreateRegisterView.prototype.createInterruptViewModelForEachInterrupt = function (module) {\n var _a;\n var models = [];\n var interrupts = (_a = module.interrupts) !== null && _a !== void 0 ? _a : {};\n Object.keys(interrupts).forEach(function (interruptKey) {\n models.push(new Model_1.InterruptViewModel(interrupts[interruptKey]));\n });\n return models;\n };\n CreateRegisterView.prototype.getNoOptionsViewSchema = function (setting) {\n var _a;\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withUiHelp(\"\".concat(setting.getName(), \": \") + ((_a = setting.getDescription()) !== null && _a !== void 0 ? _a : \"\"));\n return {\n schema: this.createSettingViewSchema(setting),\n uiSchema: setting.getMaxValue() > 1\n ? uiSchemaBuilder.build()\n : this.getBinarySettingUiSchema(setting),\n formData: setting.mapToOptionNameIfExists(setting.getValue()),\n };\n };\n CreateRegisterView.prototype.createHasOptionsViewSchema = function (setting) {\n var _a, _b;\n var schemaBuilder = new ViewSchemaBuilder_1.SchemaBuilder(\"string\", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : \"\")\n .withEnum(setting.getOptionNames())\n .withDefault(setting.mapToOptionNameIfExists(setting.getValue()));\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withUiHelp(\"\".concat(setting.getName(), \": \") + ((_b = setting.getDescription()) !== null && _b !== void 0 ? _b : \"\"));\n return {\n schema: schemaBuilder.build(),\n uiSchema: uiSchemaBuilder.build(),\n formData: setting.mapToOptionNameIfExists(setting.getValue()),\n };\n };\n CreateRegisterView.prototype.createSettingViewSchema = function (setting) {\n var _a;\n var schema = new ViewSchemaBuilder_1.SchemaBuilder(\"integer\", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : \"\").withDefault(setting.mapToOptionNameIfExists(setting.getPORDefault()));\n setting.getMaxValue() > 1\n ? schema.withMaximum(setting.getMaxValue()).withMinimum(0)\n : schema.withEnum([0, 1]);\n return schema.build();\n };\n CreateRegisterView.prototype.createInterruptViewSchema = function (interrupt) {\n var _a;\n var schema = new ViewSchemaBuilder_1.SchemaBuilder(\"string\", interrupt.getInterrupt().name)\n .withEnum(interrupt.getOptions())\n .withDefault(interrupt.getValue());\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder().withReadonlyValue(interrupt.getIsReadonly());\n return {\n schema: schema.build(),\n uiSchema: uiSchemaBuilder.build(),\n formData: (_a = interrupt.getValue()) !== null && _a !== void 0 ? _a : {},\n };\n };\n CreateRegisterView.prototype.getBinarySettingUiSchema = function (setting) {\n return new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withWidget(\"radio\")\n .withOptions({ inline: true })\n .build();\n };\n /** Creates Register View Builder for the given module. */\n CreateRegisterView.for = function (moduleDescription) {\n if (!moduleDescription) {\n throwError(\"Creation failed. Invalid module parameter.\");\n }\n if (!moduleDescription.registers && !moduleDescription.interrupts) {\n throwError(\"Creation failed for \".concat(moduleDescription.name, \". Input module contains no registers or interrupts.\"));\n }\n return new CreateRegisterView(moduleDescription);\n };\n return CreateRegisterView;\n}());\nexports.CreateRegisterView = CreateRegisterView;\n//# sourceMappingURL=CreateRegisterView.js.map","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingViewModel = exports.RegisterViewModel = exports.InterruptViewModel = void 0;\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar InterruptViewModel = /** @class */ (function () {\n function InterruptViewModel(interrupt) {\n var _this = this;\n this.isReadOnly = true;\n this.getInterrupt = function () { return _this.interrupt; };\n this.setValue = function (value) {\n _this.value = value;\n };\n this.getValue = function () { return _this.value; };\n this.setOptions = function (options) {\n _this.options = options;\n };\n this.getOptions = function () { var _a; return (_a = _this.options) !== null && _a !== void 0 ? _a : []; };\n this.getIsReadonly = function () { return _this.isReadOnly; };\n this.setReadonly = function (isReadOnly) {\n _this.isReadOnly = isReadOnly;\n };\n if (!interrupt) {\n throw new Error(\"IllegalInputArgument for 'interrupt' in InterruptValue\");\n }\n this.interrupt = interrupt;\n }\n return InterruptViewModel;\n}());\nexports.InterruptViewModel = InterruptViewModel;\nvar RegisterViewModel = /** @class */ (function () {\n function RegisterViewModel(register) {\n var _this = this;\n this.settings = [];\n this.getSettings = function () { return _this.settings; };\n this.getSettingViewModel = function (setting) {\n var name = setting.name;\n return (0, Arrays_1.find)(_this.settings, function (rv) { return rv.getSetting().name === name; });\n };\n this.forEachSetting = function (doThis) {\n _this.settings.forEach(doThis);\n };\n this.getRegister = function () { return _this.register; };\n this.getName = function () { return _this.register.name; };\n this.getDescription = function () { return _this.register.desc; };\n this.getValue = function () { return _this.value; };\n this.setValue = function (value) {\n _this.value = value;\n };\n this.setReadonly = function (value) {\n if (value === void 0) { value = true; }\n _this.forEachSetting(function (setting) { return setting.setReadonly(value); });\n };\n this.getDefaultValue = function () { return CalculateRegisterValue_1.default.for(_this.register).asNumber(); };\n this.getValueOrDefault = function () {\n var value = _this.getValue();\n return value !== null && value !== void 0 ? value : _this.getDefaultValue();\n };\n if (!register) {\n throw new Error(\"IllegalInputArgument for 'register' in RegisterValue\");\n }\n this.register = register;\n if (register.settings) {\n this.settings = this.createSettingViewModels(register);\n }\n }\n RegisterViewModel.prototype.createSettingViewModels = function (register) {\n var _this = this;\n var _a;\n var models = [];\n var settings = (_a = register.settings) !== null && _a !== void 0 ? _a : {};\n Object.keys(settings).forEach(function (settingKey) {\n models.push(new SettingViewModel(settings[settingKey], _this.getValueOrDefault));\n });\n return RegisterViewModel.sortSettingsDescending(models);\n };\n /** Sorts the settings in descending order based on bit positions. */\n RegisterViewModel.sortSettingsDescending = function (settings) {\n var result = __spreadArray([], settings, true);\n result.sort(function (settingOne, settingTwo) {\n var _a, _b, _c, _d;\n var bitRangeOne = (_b = (_a = (0, Setting_1.getBitRange)(settingOne.getSetting())) === null || _a === void 0 ? void 0 : _a.high) !== null && _b !== void 0 ? _b : -1;\n var bitRangeTwo = (_d = (_c = (0, Setting_1.getBitRange)(settingTwo.getSetting())) === null || _c === void 0 ? void 0 : _c.high) !== null && _d !== void 0 ? _d : -1;\n return bitRangeTwo - bitRangeOne;\n });\n return result;\n };\n return RegisterViewModel;\n}());\nexports.RegisterViewModel = RegisterViewModel;\nvar SettingViewModel = /** @class */ (function () {\n function SettingViewModel(setting, getRegisterValue) {\n var _this = this;\n this.isReadonly = true;\n this.setReadonly = function (value) {\n if (value === void 0) { value = true; }\n _this.isReadonly = value;\n };\n this.getIsReadonly = function () { return _this.isReadonly; };\n this.getSetting = function () { return _this.setting; };\n this.getName = function () { return _this.setting.name; };\n this.getDescription = function () { return _this.setting.description; };\n this.getPORDefault = function () { return Number(_this.setting.porDefault); };\n this.getMask = function () { return Number(_this.setting.mask); };\n this.hasOptions = function () {\n return !!_this.setting.options;\n };\n this.getOptionNames = function () {\n return (0, Arrays_1.map)(nullSafe(_this.setting.options), function (option) { return option.name; });\n };\n this.mapToOptionNameIfExists = function (value) {\n var option = _this.getOptionForValue(value);\n return option !== undefined ? option.name : value;\n };\n this.getOptionForValue = function (value) {\n return (0, Arrays_1.find)(nullSafe(_this.setting.options), function (option) {\n var optionValue = option.value;\n return optionValue != undefined ? parseInt(optionValue) === value : false;\n });\n };\n this.getValue = function () {\n var value = _this.getRegisterValue();\n value &= _this.getMask();\n return value >> _this.getShift();\n };\n this.getShift = function () {\n var mask = _this.getMask();\n var shiftIndex = 0;\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n shiftIndex++;\n }\n return shiftIndex;\n };\n this.getMaxValue = function () {\n var mask = _this.getMask();\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n }\n return mask;\n };\n if (!setting) {\n throw new Error(\"SettingViewModel: Invalid input argument\");\n }\n this.setting = setting;\n this.getRegisterValue = getRegisterValue;\n }\n return SettingViewModel;\n}());\nexports.SettingViewModel = SettingViewModel;\nvar nullSafe = function (array) { return array !== null && array !== void 0 ? array : []; };\n//# sourceMappingURL=Model.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UiSchemaBuilder = exports.SchemaBuilder = exports.ViewSchemaBuilder = void 0;\nvar ViewSchemaBuilder = /** @class */ (function () {\n function ViewSchemaBuilder() {\n this.schema = {};\n this.uiSchema = {};\n this.formData = {};\n this.tabName = \"main\";\n this.expandGroupsByDefault = true;\n }\n ViewSchemaBuilder.prototype.withSchema = function (schema) {\n this.schema = schema;\n return this;\n };\n ViewSchemaBuilder.prototype.withUiSchema = function (uiSchema) {\n this.uiSchema = uiSchema;\n return this;\n };\n ViewSchemaBuilder.prototype.withFormData = function (formData) {\n this.formData = formData;\n return this;\n };\n ViewSchemaBuilder.prototype.withTabName = function (name) {\n this.tabName = name;\n return this;\n };\n ViewSchemaBuilder.prototype.withExpandedDefault = function (expandGroupsByDefault) {\n this.expandGroupsByDefault = expandGroupsByDefault;\n return this;\n };\n ViewSchemaBuilder.prototype.addChildComponent = function (childName, child) {\n var _a, _b, _c;\n this.schema = __assign(__assign({}, this.schema), { properties: __assign(__assign({}, this.schema.properties), (_a = {}, _a[childName] = child.schema, _a)) });\n this.uiSchema = __assign(__assign({}, this.uiSchema), (_b = {}, _b[childName] = child.uiSchema, _b));\n if (this.formData instanceof Object) {\n this.formData = __assign(__assign({}, this.formData), (_c = {}, _c[childName] = child.formData, _c));\n }\n };\n ViewSchemaBuilder.prototype.build = function () {\n return {\n schema: this.schema,\n uiSchema: this.uiSchema,\n formData: this.formData,\n name: this.tabName,\n expandGroupsByDefault: this.expandGroupsByDefault,\n };\n };\n return ViewSchemaBuilder;\n}());\nexports.ViewSchemaBuilder = ViewSchemaBuilder;\nvar SchemaBuilder = /** @class */ (function () {\n function SchemaBuilder(type, title) {\n this.title = title;\n this.type = type;\n }\n SchemaBuilder.prototype.withProperties = function (properties) {\n this.properties = properties;\n return this;\n };\n SchemaBuilder.prototype.withDefault = function (defaultValue) {\n this.default = defaultValue;\n return this;\n };\n SchemaBuilder.prototype.withMaximum = function (maximum) {\n this.maximum = maximum;\n return this;\n };\n SchemaBuilder.prototype.withMinimum = function (minimum) {\n this.minimum = minimum;\n return this;\n };\n SchemaBuilder.prototype.withEnum = function (vals) {\n this.enum = vals;\n return this;\n };\n SchemaBuilder.prototype.build = function () {\n return {\n type: this.type,\n title: this.title,\n properties: this.properties,\n default: this.default,\n maximum: this.maximum,\n minimum: this.minimum,\n enum: this.enum,\n };\n };\n return SchemaBuilder;\n}());\nexports.SchemaBuilder = SchemaBuilder;\nvar UiSchemaBuilder = /** @class */ (function () {\n function UiSchemaBuilder() {\n }\n UiSchemaBuilder.prototype.withReadonlyValue = function (isReadonly) {\n this.isReadOnly = isReadonly;\n return this;\n };\n UiSchemaBuilder.prototype.withWidget = function (widgetName) {\n this.widget = widgetName;\n return this;\n };\n UiSchemaBuilder.prototype.withOptions = function (options) {\n this.options = options;\n return this;\n };\n UiSchemaBuilder.prototype.withUiHelp = function (uiHelp) {\n this.uiHelp = uiHelp;\n return this;\n };\n UiSchemaBuilder.prototype.build = function () {\n return {\n \"ui:readonly\": this.isReadOnly,\n \"ui:widget\": this.widget,\n \"ui:options\": this.options,\n \"ui:help\": this.uiHelp,\n };\n };\n return UiSchemaBuilder;\n}());\nexports.UiSchemaBuilder = UiSchemaBuilder;\n//# sourceMappingURL=ViewSchemaBuilder.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;\nvar AlertTypes;\n(function (AlertTypes) {\n AlertTypes[\"Error\"] = \"error\";\n AlertTypes[\"Warning\"] = \"warning\";\n AlertTypes[\"Hint\"] = \"hint\";\n})(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction hasOptions(dep) {\n return dep.options !== undefined;\n}\nexports.hasOptions = hasOptions;\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isAssigned(dep) {\n return typeof dep.handle !== \"undefined\";\n}\nexports.isAssigned = isAssigned;\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isUnassigned(dep) {\n return typeof dep.handle === \"undefined\";\n}\nexports.isUnassigned = isUnassigned;\n/**\n * Type guard function for SingletonExport\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n * @param resource the export to check on being a singleton\n * @deprecated No longer used. Replaced with dynamic singleton identification\n * at runtime.\n */\nfunction isSingleton(resource) {\n return typeof resource.isSingleton !== \"undefined\" && resource.isSingleton;\n}\nexports.isSingleton = isSingleton;\n/**\n * Returns a copy of `populatedImport` with all options removed which\n * cause `optionFilter` to return false.\n */\nfunction filterOptions(populatedImport, optionFilter) {\n if (populatedImport.options) {\n return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });\n }\n return populatedImport;\n}\nexports.filterOptions = filterOptions;\n/**\n * Returns a copy of `populatedImport` with the options' handle labels\n * mapped according to `labelFactory`.\n */\nfunction mapOptionLabels(populatedImport, labelFactory) {\n if (populatedImport.options) {\n return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {\n return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });\n }) });\n }\n return populatedImport;\n}\nexports.mapOptionLabels = mapOptionLabels;\n//# sourceMappingURL=Processor.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Setting_1 = require(\"./Setting\");\nvar Register_1 = require(\"./Register\");\nvar Arrays_1 = require(\"./util/Arrays\");\n/** Builder pattern */\nvar CalculateRegisterValue = /** @class */ (function () {\n function CalculateRegisterValue(register) {\n var _this = this;\n this.modifiedSettings = [];\n /** Assign a numerical value to the given `Setting`. */\n this.withNumberValue = function (setting, value) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign number value to setting, setting is undefined.\");\n }\n if (!_this.getSetting(setting)) {\n throw new Error(\"Setting \".concat(setting.alias, \" is not present in Register \").concat(_this.register.name));\n }\n _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [\n new NumberSettingValue(setting, value),\n ], false);\n return _this;\n };\n /** Assign the given `Option` to the given `Setting`. */\n this.withOption = function (setting, option) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option to setting, setting is undefined.\");\n }\n if (!_this.getSetting(setting)) {\n throw new Error(\"Setting \".concat(setting.alias, \" is not present in Register \").concat(_this.register.name));\n }\n if (!option || !_this.getOption(setting, option)) {\n throw new Error(\"Option \".concat(option === null || option === void 0 ? void 0 : option.name, \" is not present in Setting \").concat(setting.name));\n }\n _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [\n new OptionSettingValue(setting, option),\n ], false);\n return _this;\n };\n /** Assign the `Option` matching the given alias to the given `Setting`. */\n this.withOptionAlias = function (setting, optionAlias) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option alias to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);\n if (option === undefined) {\n throw new Error(\"Option Alias: \\\"\".concat(optionAlias, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n /** Assign the `Option` matching the given name to the given `Setting`. */\n this.withOptionName = function (setting, optionName) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option name to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByName)(optionName, setting);\n if (option === undefined) {\n throw new Error(\"Option Name: \\\"\".concat(optionName, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n /** Assign the `Option` matching the given description to the given `Setting`. */\n this.withOptionDescription = function (setting, optionDescription) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option description to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);\n if (option === undefined) {\n throw new Error(\"Option Description: \\\"\".concat(optionDescription, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n this.getSetting = function (setting) {\n return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);\n };\n this.getOption = function (setting, option) {\n return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;\n };\n this.calculate = function () {\n var registerValue = 0;\n _this.modifiedSettings.forEach(function (modifiedSetting) {\n registerValue = _this.setValue(modifiedSetting, registerValue);\n });\n var unmodifiedSettings = _this.getUnmodifiedSettings();\n unmodifiedSettings.forEach(function (unmodifiedSetting) {\n registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);\n });\n return Number(registerValue);\n };\n this.setValue = function (setting, registerValue) {\n var value = registerValue;\n value &= ~setting.getMask(); // Clear bits\n value |= setting.getShiftedValue(); // Set bits\n return value;\n };\n this.getUnmodifiedSettings = function () {\n var _a, _b;\n var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {\n return setting.getName();\n });\n return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });\n };\n /** Calculate and print the register's value as a hex string. */\n this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };\n /** Calculate and print the register's value as a binary string. */\n this.asBinaryString = function () {\n return CalculateRegisterValue.toBinaryString(_this.calculate());\n };\n /** Calculate and print the register's value as a decimal string. */\n this.asDecimalString = function () {\n return CalculateRegisterValue.toDecimalString(_this.calculate());\n };\n /** Calculate and return the register's value as a number. */\n this.asNumber = function () { return _this.calculate(); };\n this.register = register;\n }\n /** Creates a register value calculation object for the given register. */\n CalculateRegisterValue.for = function (register) {\n return new CalculateRegisterValue(register);\n };\n /** Format the given number as a hex string value. */\n CalculateRegisterValue.toHexString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.\");\n }\n return \"0x\" + value.toString(16);\n };\n /** Format the given number as a binary string value. */\n CalculateRegisterValue.toBinaryString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.\");\n }\n return \"0b\" + value.toString(2);\n };\n /** Format the given number as a decimal string value. */\n CalculateRegisterValue.toDecimalString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.\");\n }\n return value.toString();\n };\n return CalculateRegisterValue;\n}());\nexports.default = CalculateRegisterValue;\nvar SettingValue = /** @class */ (function () {\n function SettingValue(setting) {\n var _this = this;\n this.getMask = function () { return Number(_this.setting.mask); };\n this.getShift = function () {\n var mask = _this.getMask();\n var shiftIndex = 0;\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n shiftIndex++;\n }\n return shiftIndex;\n };\n this.getShiftedValue = function () { return _this.getValue() << _this.getShift(); };\n this.getName = function () { return _this.setting.name; };\n this.setting = setting;\n }\n SettingValue.defaultValue = function (setting) {\n var value = Number(setting.porDefault);\n return new NumberSettingValue(setting, value);\n };\n return SettingValue;\n}());\nvar NumberSettingValue = /** @class */ (function (_super) {\n __extends(NumberSettingValue, _super);\n function NumberSettingValue(setting, value) {\n var _this = _super.call(this, setting) || this;\n _this.getValue = function () { return _this.value; };\n _this.value = value;\n return _this;\n }\n return NumberSettingValue;\n}(SettingValue));\nvar OptionSettingValue = /** @class */ (function (_super) {\n __extends(OptionSettingValue, _super);\n function OptionSettingValue(setting, option) {\n var _this = _super.call(this, setting) || this;\n _this.getValue = function () { return Number(_this.option.value); };\n _this.option = option;\n return _this;\n }\n OptionSettingValue.fromDefaultValue = function (setting, value) {\n var foundValueByName = (0, Setting_1.getOptionByName)(value, setting);\n if (foundValueByName)\n return new OptionSettingValue(setting, foundValueByName);\n var foundValueByAlias = (0, Setting_1.getOptionByAlias)(value, setting);\n if (foundValueByAlias)\n return new OptionSettingValue(setting, foundValueByAlias);\n throw new Error(\"Unable to create default value '\".concat(value, \"' for setting '\").concat(setting.name, \"'.\"));\n };\n return OptionSettingValue;\n}(SettingValue));\n//# sourceMappingURL=CalculateRegisterValue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSettingByAlias = void 0;\nvar getSettingByAlias = function (alias, register) {\n var _a;\n return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];\n};\nexports.getSettingByAlias = getSettingByAlias;\n//# sourceMappingURL=Register.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;\nvar Arrays_1 = require(\"./util/Arrays\");\n/**\n * Converts a hexadecimal string to binary.\n * Any leading zeros are removed from the returned string.\n */\nvar hexToBinary = function (hex) {\n return parseInt(hex, 16).toString(2);\n};\n/**\n * Returns a string of the corresponding bit position(s).\n */\nvar getBitLabel = function (setting) {\n if (setting.mask === undefined) {\n return undefined;\n }\n var bitRange = (0, exports.getBitRange)(setting);\n if (!bitRange)\n return undefined;\n if (bitRange.high === bitRange.low) {\n return \"bit \".concat(bitRange.high);\n }\n return \"bit \".concat(bitRange.high, \"-\").concat(bitRange.low);\n};\nexports.getBitLabel = getBitLabel;\n/**\n * Converts the hexadecimal mask provided within the register setting\n * and returns an interface containing the corresponding low and high bit positions.\n */\nvar getBitRange = function (setting) {\n if (!setting.mask)\n return undefined;\n var processedHex = hexToBinary(setting.mask);\n return {\n high: processedHex.length - 1,\n low: getBitRangeLow(processedHex),\n };\n};\nexports.getBitRange = getBitRange;\nvar getOptionByAlias = function (alias, setting) {\n var _a;\n return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });\n};\nexports.getOptionByAlias = getOptionByAlias;\nvar getOptionByName = function (name, setting) {\n var _a;\n return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });\n};\nexports.getOptionByName = getOptionByName;\nvar getOptionByDescription = function (description, setting) {\n var _a;\n return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });\n};\nexports.getOptionByDescription = getOptionByDescription;\nvar getOptionNames = function (setting) {\n var _a;\n return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });\n};\nexports.getOptionNames = getOptionNames;\nvar getOptionDescriptions = function (setting) {\n var _a;\n return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });\n};\nexports.getOptionDescriptions = getOptionDescriptions;\nfunction getBitRangeLow(processedHex) {\n if (processedHex.charAt(1) === \"1\") {\n var index = 1;\n while (processedHex.charAt(index) === \"1\") {\n index++;\n }\n return processedHex.length - index;\n }\n else {\n return processedHex.length - 1;\n }\n}\n//# sourceMappingURL=Setting.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;\nvar map = function (arr, callback) {\n var result = [];\n arr.forEach(function (value, index) {\n result[index] = callback(value);\n });\n return result;\n};\nexports.map = map;\nvar filter = function (arr, callback) {\n var result = [];\n arr.forEach(function (value) {\n if (callback(value)) {\n result.push(value);\n }\n });\n return result;\n};\nexports.filter = filter;\n/**\n * Iterates over elements of the array, returning the first element that the predicate returns truthy for.\n */\nvar find = function (arr, callback) {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i])) {\n return arr[i];\n }\n }\n return undefined;\n};\nexports.find = find;\n/** @returns the non-prototype keys of the given object */\nvar getKeys = function (obj) {\n if (!obj)\n return undefined;\n return Object.getOwnPropertyNames(obj);\n};\nexports.getKeys = getKeys;\nvar values = function (obj) {\n var _a;\n if (!obj)\n return undefined;\n return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });\n};\nexports.values = values;\n//# sourceMappingURL=Arrays.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildSimpleApi = function (functions) {\n var api = {};\n for (var key in functions) {\n api[key] = buildFunction(functions[key]);\n }\n return api;\n};\nvar buildFunction = function (cFunction) {\n return cFunction.returns + \" \" + cFunction.name + \"(\" + buildArguments(cFunction.arguments) + \")\";\n};\nvar buildArguments = function (args) {\n if (args) {\n return args.map(function (arg) { return arg.type + \" \" + arg.name; }).join(\", \");\n }\n else {\n return \"void\";\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInterfaceName = function (pkgJson) {\n var strReplace = \"@microchip/\";\n var interfaceName;\n if (pkgJson) {\n interfaceName = pkgJson[\"name\"];\n if (interfaceName) {\n interfaceName = interfaceName.replace(strReplace, \"\");\n }\n }\n if (!interfaceName) {\n throw new Error(\"Invalid Interface Name...!\");\n }\n return interfaceName;\n};\nexports.getInterfaceVersion = function (pkgJson) {\n var versionRegex = new RegExp(\"\\\\d+.\\\\d+.\\\\d+\");\n var version;\n if (pkgJson) {\n version = pkgJson[\"version\"];\n }\n if (!version && !versionRegex.test(version)) {\n throw new Error(\"Invalid Interface Version...!\");\n }\n return version;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar c_function_types_1 = require(\"./c-function-types\");\nexports.buildSimpleApi = c_function_types_1.buildSimpleApi;\nvar helpers_1 = require(\"./helpers\");\nexports.getInterfaceName = helpers_1.getInterfaceName;\nexports.getInterfaceVersion = helpers_1.getInterfaceVersion;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCFunctionValidator = void 0;\nvar cKeywords = [\n \"auto\",\n \"const\",\n \"double\",\n \"float\",\n \"int\",\n \"short\",\n \"struct\",\n \"unsigned\",\n \"break\",\n \"continue\",\n \"else\",\n \"for\",\n \"long\",\n \"signed\",\n \"switch\",\n \"void\",\n \"case\",\n \"default\",\n \"enum\",\n \"goto\",\n \"register\",\n \"sizeof\",\n \"typedef\",\n \"volatile\",\n \"char\",\n \"do\",\n \"extern\",\n \"if\",\n \"return\",\n \"static\",\n \"union\",\n \"while\",\n];\nvar functionPattern = \"(?=^([A-Za-z]\\\\S|_)\\\\w+$)\";\nvar errorMessage = \"Must be valid C function syntax.\";\nvar doNotMatchKeywordsRegex = function () {\n return \"(^(?!\" + cKeywords.join(\"|\") + \")).*\";\n};\nvar result = doNotMatchKeywordsRegex();\nvar pattern = {\n pattern: functionPattern + result,\n};\nexports.getCFunctionValidator = function () { return ({\n getRjsfValidation: function () { return pattern; },\n getCustomErrorMessage: function () { return errorMessage; },\n}); };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CFunctionValidator_1 = require(\"./Validators/CFunctionValidator\");\nObject.defineProperty(exports, \"getCFunctionValidator\", { enumerable: true, get: function () { return CFunctionValidator_1.getCFunctionValidator; } });\n","require('../../modules/es.math.log10');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Math.log10;\n","var parent = require('../../es/math/log10');\n\nmodule.exports = parent;\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = false;\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// `Math.log10` method\n// https://tc39.github.io/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: function log10(x) {\n return log(x) * LOG10E;\n }\n});\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CreatorFunctions } from \"@microchip/melody-automodule-interface/lib/src/CreatorFunctions\";\nimport { State } from \"../generated_module/src/types/State\";\n\nexport const getCreatorFunctions = (): CreatorFunctions => {\n return {\n shouldImport: shouldImport,\n getCreatorImportArgs: getCreatorImportArgs,\n };\n};\n\nconst shouldImport = (importKey: string, state: State): boolean => {\n return true;\n};\n\nconst getCreatorImportArgs = (importKey: string, state: State): any | undefined => {\n return undefined;\n};\n","import {\n AppModel,\n DerivedData,\n DerivedFunctions,\n} from \"../generated_module/src/types/AutoModuleTypes\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport { PwmCalculator } from \"./PwmCalculator\";\nimport * as pwm_general from \"./interfaces/pwm_general_parameters\";\nimport * as initializer_system from \"@microchip/initializer-system\";\nimport { Interface, Arguments } from \"@microchip/scf-interface\";\nimport { getGeneratorModel, getHeaderFiles } from \"./GeneratorModel\";\nimport { MyComponentNames, MyExportNames } from \"../generated_module/src/types\";\nimport { getAutoSdlHelp } from \"@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp\";\nimport { getPinsLogic } from \"../generated_module/src/pins/PCPHelper\";\nimport { MyImports } from \"../generated_module/src/types\";\nimport { getCFunctionValidator, PatternValidator } from \"@microchip/scf-validators/lib\";\nimport { intf_args, QueryAdapterKey } from \"@microchip/pin-standard/lib/pin-standard\";\n\nexport const getDerivedData = (dataModel: AppModel): DerivedData => {\n if (dataModel) {\n return new MyDerivedData(dataModel);\n }\n return new EmptyDerivedData();\n};\n\n//This data will be used at the creator stage and relies on only the state\nclass EmptyDerivedData implements DerivedData {\n getMyFunctions = (): DerivedFunctions => {\n return {};\n };\n getModel = (): AppModel | undefined => {\n return undefined;\n };\n}\n\n//This data will be used at the processor stage\nclass MyDerivedData implements DerivedData {\n private dataModel: AppModel;\n private pwmCalculator: PwmCalculator;\n private cValidator: PatternValidator = getCFunctionValidator();\n\n constructor(dataModel: AppModel) {\n this.dataModel = dataModel;\n }\n\n private getPwmCalculator = (): PwmCalculator => {\n if (!this.pwmCalculator) {\n this.pwmCalculator = new PwmCalculator(\n this.getTimerPrValue(),\n this.getTimerPrescaler(),\n this.dataModel.getImportValue(\"osc_clocks\")?.fosc ?? 0,\n Number(this.dataModel.getComponentValue(\"dutyCycle\")),\n );\n }\n return this.pwmCalculator;\n };\n\n getMyFunctions = (): DerivedFunctions => {\n return {\n overrideDefaultValues: this.overrideDefaultValues,\n overrideOptions: this.overrideDefaultOptions,\n moduleName: (): string | undefined => this.dataModel.getHardware()?.getName(),\n pinData: this.getMyPinData,\n alerts: this.getMyAlerts,\n\n pwm_general_parameters_payload: this.pwm_general_parameters_payload,\n initializer_system_results: this.initializer_system_results,\n\n dutyCycleValidator: this.dutyCycleValidator,\n\n componentName: this.componentName,\n pwmdcValue: (): number => this.getPwmCalculator().getCCPRValue(),\n pwmPeriod: (): number => this.getPwmCalculator().getPwmPeriod(),\n pwmFrequency: (): number => this.getPwmCalculator().getPwmFrequency(),\n pwmResolution: (): number => this.getPwmCalculator().getPwmResolution(),\n\n ctselCcptmrs1: this.ctselTimerSetting,\n ctselCcptmrs: this.ctselTimerSetting,\n ctselPwmtmrs: this.ctselTimerSetting,\n pwmdchPwmdch: (): number =>\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) >> 2,\n pwmdclPwmdcl: (): number =>\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) & 3,\n\n templateData: (): any => getGeneratorModel(this.dataModel),\n getHelpUrl: this.getSdlHelpOverride,\n filterImports: this.filterImports,\n getPinsLogic: getPinsLogic,\n importName: this.friendlyImportName,\n componentNameValidator: this.componentNameValidator,\n getCustomUiErrors: this.getCustomUiErrors,\n pin_standard_args: this.getPinstandardArgs,\n };\n };\n\n private friendlyImportName = (importKey: string): string => {\n if (importKey === \"scf_pic8_pwm_v2\") return \"PWM Hardware\";\n if (importKey === \"osc_clocks\") return \"Oscillator Clock\";\n if (importKey === \"initializer_system\") return \"system.c Initialize()\";\n if (importKey === \"pin_standard\") return \"Pins\";\n return importKey;\n };\n\n private overrideDefaultValues = (componentName: string): any => {\n switch (componentName) {\n case \"componentName\":\n return this.dataModel.getHardware()?.getName();\n default:\n return undefined;\n }\n };\n\n private componentNameValidator = (): any => {\n return {\n pattern: this.cValidator.getRjsfValidation().pattern,\n };\n };\n\n private getCustomUiErrors = (componentName: string): Error[] | undefined => {\n switch (componentName) {\n case \"componentName\":\n return [\n {\n name: \"pattern\",\n message: this.cValidator.getCustomErrorMessage(),\n },\n ];\n default:\n return undefined;\n }\n };\n\n private readonly getPinstandardArgs = (): intf_args => {\n const args: intf_args = {\n queryAdapters: [QueryAdapterKey.PPS, QueryAdapterKey.APFCON],\n };\n\n return args;\n };\n\n private overrideDefaultOptions = (componentName: string): any[] => {\n switch (componentName) {\n case \"timerSelection\": {\n const result: any[] = [];\n const CCPTMRSREG =\n this.dataModel.getPeripheralDescription()?.registers?.CCPTMRS1 ??\n this.dataModel.getPeripheralDescription()?.registers?.CCPTMRS;\n const PWMTMRSREG = this.dataModel.getPeripheralDescription()?.registers\n ?.PWMTMRS;\n if (CCPTMRSREG) {\n const CTSELSETT = CCPTMRSREG.settings?.CTSEL;\n for (const eachoptn of CTSELSETT?.options ?? []) {\n const timeroptnregex = /^pwm\\d+timer(\\d)$/i;\n const optnmatch = eachoptn.alias.match(timeroptnregex);\n const correctOptnName =\n (optnmatch?.length ?? 0) > 1 ? \"TMR\" + optnmatch?.[1] : \"\";\n result.push(correctOptnName);\n }\n }\n if (PWMTMRSREG) {\n const CTSELSETT = PWMTMRSREG.settings?.CTSEL;\n for (const eachoptn of CTSELSETT?.options ?? []) {\n const timeroptnregex = /^pwm\\d+timer(\\d)$/i;\n const optnmatch = eachoptn.alias.match(timeroptnregex);\n const correctOptnName =\n (optnmatch?.length ?? 0) > 1 ? \"TMR\" + optnmatch?.[1] : \"\";\n result.push(correctOptnName);\n }\n }\n if (!CCPTMRSREG && !PWMTMRSREG) {\n result.push(\"TMR2\");\n }\n return result;\n }\n default:\n return [] /*for other fields - undefined as take options from moduleconfig.json*/;\n }\n };\n\n public getModel = (): AppModel => {\n return this.dataModel;\n };\n\n private getMyPinData = (): any => {\n return {};\n };\n\n private filterImports = (imports: MyImports): MyImports => {\n let filteredImports: MyImports = imports;\n const ImportKeys = [\"Timer\"];\n\n ImportKeys.forEach((importKey) => {\n filteredImports = this.getModel().filterImportBySetting(\n filteredImports,\n importKey,\n (option: Processor.Option<any>): any => {\n if (option.payload !== undefined) {\n const rstSource =\n this.dataModel.getComponentValue(\"timerSelection\") ??\n \"disabled\";\n const regexpNumber = /\\d/;\n const inst = rstSource.match(regexpNumber);\n if (rstSource.indexOf(\"TMR\") !== -1) {\n return option.payload.moduleName === \"TMR\" + inst;\n }\n }\n },\n ) as MyImports;\n });\n return filteredImports;\n };\n\n private getMyAlerts = (): Processor.Alert[] => {\n const alerts: Processor.Alert[] = [];\n const timerSelection: string =\n this.dataModel.getComponentValue(\"timerSelection\") ?? \"\";\n\n if (\n this.dataModel.getAssignedImport(\"Timer\") === undefined ||\n this.dataModel.getAssignedImport(\"Timer\")?.options !== undefined\n ) {\n alerts.push({\n text: `Please select ${timerSelection} as the Timer Dependency.`,\n type: Processor.AlertTypes.Warning,\n });\n } else {\n alerts.push({\n text: `${this.dataModel.getName()} uses ${timerSelection}.`,\n type: Processor.AlertTypes.Hint,\n });\n alerts.push({\n text: `Postscaler setting in ${timerSelection} does not affect the calculated parameters in PWM module.`,\n type: Processor.AlertTypes.Hint,\n });\n if (\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) / 4 >\n this.getTimerPrValue()\n ) {\n alerts.push({\n text: `The value for Duty Cycle percentage is crossing 100 because the period value set in tmr is greater than the dutycycle value set in PWM. Set the duty cycle to be less than 100 percent.`,\n type: Processor.AlertTypes.Warning,\n });\n }\n }\n\n return alerts;\n };\n\n private getSdlHelpOverride = (\n componentName: MyComponentNames,\n helpUrl: string,\n ): string => {\n if (componentName === \"timerSelection\") {\n if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS1) {\n componentName = \"ctselCcptmrs1\";\n } else if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS) {\n componentName = \"ctselCcptmrs\";\n } else if (this.getModel().getPeripheralDescription()?.registers?.PWMTMRS) {\n componentName = \"ctselPwmtmrs\";\n }\n } else if (componentName === \"dutyCycle\" || componentName === \"pwmdcValue\") {\n helpUrl = helpUrl?.replace(\n \"${instance}\",\n this.getModel().getHardware()?.getName() ?? \"\",\n );\n }\n\n return getAutoSdlHelp(this.getModel() as any, componentName, helpUrl);\n };\n\n private pwm_general_parameters_payload = (): pwm_general.ProcessedPayload => {\n return {\n interfaceApi: pwm_general.Interface.createFirmwareApi(\n this.dataModel.getComponentValue(\"componentName\") ?? \"\",\n getHeaderFiles(this.dataModel),\n ),\n customName: this.dataModel.getComponentValue(\"componentName\"),\n modulename: this.dataModel.getName(),\n isdriverisr: false,\n ispwmi_enabled: false,\n ispwmpi_enabled: false,\n moduleName: this.dataModel.getName(),\n };\n };\n\n private initializer_system_results = (): initializer_system.Results => {\n return {\n initializer: {\n name: this.dataModel.getComponentValue(\"componentName\") + \"_Initialize\",\n header: getHeaderFiles(this.dataModel)[0],\n },\n };\n };\n\n private dutyCycleValidator = (): any => {\n return {\n minimum: 0,\n maximum: 100,\n };\n };\n\n private componentName = (): string | undefined => {\n const arg = this.getArg(\"pwm_general\", pwm_general.Interface);\n if (arg) {\n const pwmArg: pwm_general.Arguments = arg;\n return pwmArg.customName;\n }\n return undefined;\n };\n\n private ctselTimerSetting = (): string | undefined => {\n const timerSelection: string =\n this.dataModel.getComponentValue(\"timerSelection\") ?? \"\";\n const groupmatch = timerSelection.match(/^TMR([0-9])$/) ?? \"\";\n if (groupmatch.length > 1) {\n const timersuffix = groupmatch?.length > 1 ? groupmatch[1] : \"\";\n return this.dataModel.getHardware()?.getName() + \"timer\" + timersuffix;\n } else {\n return undefined;\n }\n };\n\n private getTimerPrValue = (): number => {\n return this.dataModel.getImportValue(\"Timer\")?.periodRegisterValue ?? 255;\n };\n\n private getTimerPrescaler = (): number => {\n return this.dataModel.getImportValue(\"Timer\")?.prescaleValue ?? 1;\n };\n\n private getArg = (key: MyExportNames, id: Interface): Arguments => {\n const exportInterface = this.dataModel\n .getExportInterfaces()\n .getInterface(key, id.getInterfaceId());\n if (exportInterface?.args) {\n // choose the first requester for now\n return exportInterface.args[Object.keys(exportInterface.args)[0]];\n }\n };\n}\n","import { AppModel } from \"../generated_module/src/types/AutoModuleTypes\";\nimport * as pwm_general from \"./interfaces/pwm_general_parameters\";\nimport * as InterfaceTypes from \"@microchip/scf-interface\";\nimport { getOptionValueByName } from \"../generated_module/src/autoModule/AutoModuleHelpers\";\nimport { getTemplateSettings } from \"../generated_module/src/autoModule/AutoModuleTemplates\";\nimport { values } from \"../generated_module/src/Utils\";\n\nexport const getGeneratorModel = (model: AppModel): any => {\n if (!model.getHardware()) return {};\n\n const pwmInterface = pwm_general.Interface.createFirmwareApi(\n model.getComponentValue(\"componentName\") ?? \"\",\n getHeaderFiles(model),\n );\n\n const templateSettings = getTemplateSettings(model);\n\n const registerValues = templateSettings?.registers;\n const initRegisters: any[] = values(registerValues ?? {});\n\n const ctsel = model.getPeripheralDescription()?.registers?.CCPTMRS1?.settings?.CTSEL;\n const CTSELvalue = ctsel\n ? getOptionValueByName(ctsel, model.getDerivedFunction(\"ctselCcptmrs1\"))\n : 1;\n\n return {\n moduleNameLowerCase: model.getName()?.toLowerCase(),\n moduleNameUpperCase: model.getName()?.toUpperCase(),\n header: pwmInterface.headerFiles?.[0],\n api: pwmInterface.api,\n simpleApi: pwmInterface.simpleApi,\n\n productName: \"\",\n productVersion: \"\",\n selectedDevice: \"PIC18F47Q10\",\n compiler: \"XC8 v2.20\",\n tool: \"MPLABX v5.40\",\n\n //From System Manager\n useWatchdog: model.getImportValue(\"wdtEnable\") ?? false, //TODO\n\n //Registers and Settings\n initRegisters: initRegisters,\n // PWMDCH: templateSettings?.registers?.PWMDCH.name ?? \"\",\n // PWMDCL: templateSettings?.registers?.PWMDCL?.name ?? \"\",\n CCPTMRSregname: templateSettings?.registers?.CCPTMRS1?.name ?? \"\",\n CTSELsettingname:\n templateSettings?.registers?.CCPTMRS1?.settings?.CTSEL.name ?? \"\",\n CTSELvalue: CTSELvalue,\n timerselpresence:\n (ctsel?.options?.length ?? 0) > 0 ? \"timerselpresent\" : \"timerselabsent\",\n\n pwmdcValue: model.getComponentValue(\"pwmdcValue\"),\n ...registerValues,\n };\n};\n\nexport const getHeaderFiles = (model: AppModel): InterfaceTypes.HeaderFile[] => {\n return [\n {\n name: model.getName().toLowerCase() + \".h\",\n path: \"pwm/\",\n },\n ];\n};\n","import { AppModel } from \"../generated_module/src/types/AutoModuleTypes\";\nimport { pin_row, behaviour } from \"@microchip/pin-standard\";\n\n// provide complete dynamic data for all pin rows. It overrides static pindata.json\nexport const getCompletePinData = (appModel: AppModel): any => {\n // way to programatically override the json data\n return {};\n};\n\n// overrides pin data for a particular row based on model.\nexport function getRowData(appModel: AppModel, rowData: pin_row): pin_row | undefined {\n const moduleName = appModel.getName() ?? \"PWM\";\n\n const ppsData:\n | Record<string, Record<string, string>>\n | undefined = appModel.getImportValue(\"pin_standard\")?.[\"pps\"]?.[\"data\"]?.[\n moduleName\n ];\n const apfconData:\n | Record<string, Record<string, string>>\n | undefined = appModel.getImportValue(\"pin_standard\")?.[\"apfcon\"]?.[\"data\"]?.[\n moduleName\n ];\n\n if (rowData.name === \"out\") {\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"OUT\",\n filter: {\n module: moduleName,\n aliasReEx: `^${moduleName}(OUT){0,1}$`,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (\n appModel.isComponentValue(\"pwmoePwmcon\") === true &&\n getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx) ===\n behaviour.LOCK_UNLOCK\n ) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: `^${moduleName}(OUT){0,1}$` },\n };\n }\n } else if (rowData.name === \"pwmx0\") {\n if (appModel.getComponentValue(\"pwmoe0Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"0OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe0Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"0\" },\n };\n }\n } else if (rowData.name === \"pwmx1\") {\n if (appModel.getComponentValue(\"pwmoe1Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"1OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe1Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"1\" },\n };\n }\n } else if (rowData.name === \"pwmx2\") {\n if (appModel.getComponentValue(\"pwmoe2Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"2OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe2Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"2\" },\n };\n }\n } else if (rowData.name === \"pwmx3\") {\n if (appModel.getComponentValue(\"pwmoe3Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"3OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe3Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"3\" },\n };\n }\n }\n\n let rowActions = [];\n\n const pwmxRegcomponent = appModel.getComponent(\"pwmoePwmcon\")?.component;\n const pwmx0Regcomponent = appModel.getComponent(\"pwmoe0Pwmaoe\")?.component;\n const pwmx1Regcomponent = appModel.getComponent(\"pwmoe1Pwmaoe\")?.component;\n const pwmx2Regcomponent = appModel.getComponent(\"pwmoe2Pwmaoe\")?.component;\n const pwmx3Regcomponent = appModel.getComponent(\"pwmoe3Pwmaoe\")?.component;\n\n if (\n pwmxRegcomponent &&\n getPinBehaviour(ppsData, apfconData, `^${moduleName}(OUT){0,1}$`) ===\n behaviour.LOCK_UNLOCK\n ) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"out\")\n .forComponent(pwmxRegcomponent)\n .addIfLockedSetValue(\"^\" + moduleName + \"$\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n\n if (pwmx0Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx0\")\n .forComponent(pwmx0Regcomponent)\n .addIfLockedSetValue(moduleName + \"0\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx1Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx1\")\n .forComponent(pwmx1Regcomponent)\n .addIfLockedSetValue(moduleName + \"1\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx2Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx2\")\n .forComponent(pwmx2Regcomponent)\n .addIfLockedSetValue(moduleName + \"2\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx3Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx3\")\n .forComponent(pwmx3Regcomponent)\n .addIfLockedSetValue(moduleName + \"3\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n rowData = { ...rowData, actions: rowActions };\n return rowData;\n}\n\nconst getPinBehaviour = (\n ppsPins: Record<string, Record<string, string>> | undefined,\n apfconPins: Record<string, Record<string, string>> | undefined,\n pinRegEx: string,\n): behaviour => {\n let tempPinBehaviour: behaviour = behaviour.LOCK_UNLOCK;\n if (ppsPins !== undefined) {\n for (const ppsPin in ppsPins) {\n if (ppsPin === \"pps_out\") {\n for (const ppsOut in ppsPins[\"pps_out\"]) {\n if (ppsOut.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.PPS;\n break;\n }\n }\n } else {\n if (ppsPin.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.PPS;\n break;\n }\n }\n }\n }\n if (apfconPins !== undefined) {\n for (const apfconPin in apfconPins) {\n if (apfconPin.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.APFCON;\n break;\n }\n }\n }\n\n return tempPinBehaviour;\n};\n","// Reused from Q43 CCP calculator\n// TODO: delete this duplicate and add CCP calculator dependency\nimport log10 from \"core-js/features/math/log10\";\n\nexport class PwmCalculator {\n private prValue: number;\n private prescaler: number;\n private fosc: number;\n private dutyCycleRatio: number;\n\n constructor(prValue: number, prescaler: number, fosc: number, dutyCycle: number) {\n this.prValue = prValue;\n this.prescaler = prescaler;\n this.fosc = fosc;\n this.dutyCycleRatio = dutyCycle / 100;\n }\n\n public getPwmPeriod = (): number => {\n let pwmPeriod = (this.prValue + 1) * 4 * this.prescaler;\n if (this.fosc > 0) {\n pwmPeriod = pwmPeriod / this.fosc;\n } else {\n pwmPeriod = 0;\n }\n return pwmPeriod;\n };\n\n public getPwmFrequency = (): number => {\n let pwmFrequency = (this.prValue + 1) * 4 * this.prescaler;\n if (pwmFrequency > 0) {\n pwmFrequency = this.fosc / pwmFrequency;\n } else {\n pwmFrequency = 0;\n }\n\n pwmFrequency = Math.round(pwmFrequency * 100) / 100;\n return pwmFrequency;\n };\n\n public getPwmResolution = (): number => {\n const pwmResolution = log10(4 * (this.prValue + 1)) / log10(2);\n return Math.floor(pwmResolution);\n };\n\n public getCCPRValue = (): number => {\n const ccprValue = Math.round(this.dutyCycleRatio * 4 * (this.prValue + 1) - 1);\n if (ccprValue < 0) {\n return 0;\n }\n return ccprValue;\n };\n\n public getActualDutyCycle = (): number => {\n const dcRatio = this.getCCPRValue() / (4 * (this.prValue + 1));\n return Math.round(dcRatio * 100);\n };\n\n public getActualPulseWidth = (): number => {\n let pulseWidth = this.getCCPRValue() * this.prescaler;\n if (this.fosc > 0) {\n pulseWidth = pulseWidth / this.fosc;\n } else {\n pulseWidth = 0;\n }\n return pulseWidth;\n };\n}\n","import { InterfaceId } from \"@microchip/scf-common/lib/InterfaceId\";\nimport * as Creator from \"@microchip/scf-common/lib/Creator\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport * as InterfaceTypes from \"@microchip/scf-interface\";\n\n/** The arguments to be provided to the implementation. */\nexport interface Arguments extends InterfaceTypes.Arguments {\n //Standard Interface\n customName?: string;\n}\n\n/** The payload to be passed back to the dependent module after the BasicUART has been processed. */\nexport interface ProcessedPayload extends InterfaceTypes.ProcessedPayload {\n //Standard Interface\n interfaceApi: InterfaceTypes.FirmwareAPIPayload<API>;\n customName?: string;\n modulename?: string;\n isdriverisr?: boolean;\n ispwmi_enabled?: boolean;\n ispwmpi_enabled?: boolean;\n moduleName?: string;\n}\n\nexport interface API extends InterfaceTypes.CFunctions {\n Initialize: InterfaceTypes.CFunction;\n LoadDutyValue: InterfaceTypes.CFunction;\n}\n\n/** The type of the processed export interface */\nexport type ProcessedExportInterface = Processor.ProcessedInterface<\n ProcessedPayload,\n Arguments\n>;\n\n/** Used by implementations of this interface in their module's creator. */\ntype CreatorExportInterface = Creator.Interface<ProcessedPayload>;\n\nconst getInterfaceId = (): InterfaceId => {\n return {\n name: \"pwm_general_parameters\",\n version: \"0.1.0\",\n };\n};\n\nconst createPrototypeImport = (): Creator.Import => {\n return {\n interfaceId: getInterfaceId(),\n };\n};\n\nconst createPrototypeExport = (): Creator.Export<CreatorExportInterface[]> => {\n return {\n interfaces: [{ interfaceId: getInterfaceId() }],\n };\n};\n\nconst createMock = (): ProcessedExportInterface => {\n return {\n interfaceId: getInterfaceId(),\n payload: {\n interfaceApi: Interface.createFirmwareApi(\"MyModule\", [\n { name: \"mymodule.h\", path: \"include/\" },\n ]),\n },\n args: {\n requestId: {\n customName: \"MyModule\",\n },\n },\n };\n};\n\nconst createFirmwareApi = (\n moduleName: string,\n headerFiles: InterfaceTypes.HeaderFile[],\n): InterfaceTypes.FirmwareAPIPayload<API> => {\n const prefix: string = moduleName ? moduleName : \"undefined\";\n const api = createApi(prefix);\n\n return {\n api: api,\n simpleApi: InterfaceTypes.buildSimpleApi(api),\n headerFiles: headerFiles,\n };\n};\n\nconst createApi = (prefix: string): API => {\n return {\n Initialize: {\n name: prefix + \"_Initialize\",\n returns: \"void\",\n },\n LoadDutyValue: {\n name: prefix + \"_LoadDutyValue\",\n arguments: [\n {\n name: \"dutyValue\",\n type: \"uint16_t\",\n },\n ],\n returns: \"void\",\n },\n };\n};\n\ninterface Interface extends InterfaceTypes.Interface {\n createPrototypeImport: () => Creator.Import<Arguments>;\n createMock: () => ProcessedExportInterface;\n createFirmwareApi: (\n moduleName: string,\n headerFiles: InterfaceTypes.HeaderFile[],\n ) => InterfaceTypes.FirmwareAPIPayload<API>;\n}\n\nexport const Interface: Interface = {\n createPrototypeExport: createPrototypeExport,\n createPrototypeImport: createPrototypeImport,\n getInterfaceId: getInterfaceId,\n createMock: createMock,\n createFirmwareApi: createFirmwareApi,\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://processor/webpack/bootstrap","webpack://processor/./generated_module/src/Utils.ts","webpack://processor/./generated_module/src/autoModule/AutoModuleHelpers.ts","webpack://processor/./generated_module/src/autoModule/AutoModuleTemplates.ts","webpack://processor/./generated_module/src/getUserData.ts","webpack://processor/./generated_module/src/pins/PCPHelper.ts","webpack://processor/./generated_module/src/processor.ts","webpack://processor/./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js","webpack://processor/./node_modules/@microchip/pins-interface/lib/types.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/Analytics/AnalyticsHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/App/AppModel.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/Utils.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleAppModel.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHardware.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleTemplates.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/FrequencyComponentHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/RegisterFilterMode.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/TimeComponentHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/autoModuleView.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/autoModuleViewHelpers.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/formData.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/scfUiSchema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/schema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/uiSchema.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/creator.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/index.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/createPrototypeExports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/createPrototypeImports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/exports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interfaces/imports.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/interrupts/InterruptActions.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/pins/PCPHelper.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/pins/PCPStateActionBuilder.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/processor.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/tables/UidMapBuilder.js","webpack://processor/./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js","webpack://processor/./node_modules/@microchip/scf-common/lib/Processor.js","webpack://processor/./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js","webpack://processor/./node_modules/@microchip/scf-device/lib/Register.js","webpack://processor/./node_modules/@microchip/scf-device/lib/Setting.js","webpack://processor/./node_modules/@microchip/scf-device/lib/util/Arrays.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/c-function-types.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/helpers.js","webpack://processor/./node_modules/@microchip/scf-interface/lib/index.js","webpack://processor/./node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js","webpack://processor/./node_modules/@microchip/scf-register-view-helper/lib/Model.js","webpack://processor/./node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js","webpack://processor/./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js","webpack://processor/./node_modules/@microchip/scf-validators/lib/index.js","webpack://processor/./node_modules/core-js/es/math/log10.js","webpack://processor/./node_modules/core-js/features/math/log10.js","webpack://processor/./node_modules/core-js/internals/an-object.js","webpack://processor/./node_modules/core-js/internals/array-includes.js","webpack://processor/./node_modules/core-js/internals/classof-raw.js","webpack://processor/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://processor/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://processor/./node_modules/core-js/internals/create-property-descriptor.js","webpack://processor/./node_modules/core-js/internals/descriptors.js","webpack://processor/./node_modules/core-js/internals/document-create-element.js","webpack://processor/./node_modules/core-js/internals/enum-bug-keys.js","webpack://processor/./node_modules/core-js/internals/export.js","webpack://processor/./node_modules/core-js/internals/fails.js","webpack://processor/./node_modules/core-js/internals/get-built-in.js","webpack://processor/./node_modules/core-js/internals/global.js","webpack://processor/./node_modules/core-js/internals/has.js","webpack://processor/./node_modules/core-js/internals/hidden-keys.js","webpack://processor/./node_modules/core-js/internals/ie8-dom-define.js","webpack://processor/./node_modules/core-js/internals/indexed-object.js","webpack://processor/./node_modules/core-js/internals/inspect-source.js","webpack://processor/./node_modules/core-js/internals/internal-state.js","webpack://processor/./node_modules/core-js/internals/is-forced.js","webpack://processor/./node_modules/core-js/internals/is-object.js","webpack://processor/./node_modules/core-js/internals/is-pure.js","webpack://processor/./node_modules/core-js/internals/native-weak-map.js","webpack://processor/./node_modules/core-js/internals/object-define-property.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://processor/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://processor/./node_modules/core-js/internals/object-keys-internal.js","webpack://processor/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://processor/./node_modules/core-js/internals/own-keys.js","webpack://processor/./node_modules/core-js/internals/path.js","webpack://processor/./node_modules/core-js/internals/redefine.js","webpack://processor/./node_modules/core-js/internals/require-object-coercible.js","webpack://processor/./node_modules/core-js/internals/set-global.js","webpack://processor/./node_modules/core-js/internals/shared-key.js","webpack://processor/./node_modules/core-js/internals/shared-store.js","webpack://processor/./node_modules/core-js/internals/shared.js","webpack://processor/./node_modules/core-js/internals/to-absolute-index.js","webpack://processor/./node_modules/core-js/internals/to-indexed-object.js","webpack://processor/./node_modules/core-js/internals/to-integer.js","webpack://processor/./node_modules/core-js/internals/to-length.js","webpack://processor/./node_modules/core-js/internals/to-primitive.js","webpack://processor/./node_modules/core-js/internals/uid.js","webpack://processor/./node_modules/core-js/modules/es.math.log10.js","webpack://processor/(webpack)/buildin/global.js","webpack://processor/./src/CreatorFunctions.ts","webpack://processor/./src/DerivedData.ts","webpack://processor/./src/GeneratorModel.tsx","webpack://processor/./src/PinsLogic.ts","webpack://processor/./src/PwmCalculator.tsx","webpack://processor/./src/interfaces/pwm_general_parameters.tsx"],"names":["getKeys","obj","Object","getOwnPropertyNames","values","map","key","forEach","action","mapper","assertNotNull","val","msg","Error","toDictionary","arr","keyMapper","valueMapper","result","entry","castComponent","component","category","getDefaultValue","overrideDefaultValues","name","type","defaultValue","value","getComboOptions","overrideOptions","hasConfigBits","interfaceName","getFriendlyInterfaceId","indexOf","getRegisterValues","model","registers","config","getDerivedData","getModuleConfig","peripherals","peripheral","peripheralName","interfaceId","undefined","regName","registerValue","reg","getHardware","getPeripheral","comment","valueAsHex","alias","settings","registerVal","CalculateRegisterValue","comments","set","setting","push","getComponentValue","getSettingBits","getComponent","deviceType","withNumberValue","getOptionValueByName","Number","asNumber","toString","toUpperCase","sortComments","register","sort","a","b","settingA","split","settingB","mask","join","setValNumber","getOptionByAlias","settingValue","valueAsDescription","bitName","getRegisterFromComponent","hardware","registerName","replace","toLowerCase","modifiedRegName","getSettingFromComponent","description","desc","porDefault","optionName","optionValue","options","option","getSettingDefaultIfPresent","overrideDefaultValue","getOptionByName","displayOptionSetting","isInterface","idA","idB","getSettingOptionsIfPresent","masterComponentValue","filteredOptions","mode","filterModeOptions","operation","find","optionModes","match","length","filter","getProcessedHandle","handle","payload","label","customName","moduleName","providerId","exportId","DependencySelector","createOptionLabel","dropdownOptions","thisImport","getImports","importId","shouldAllowUnselectDependency","noneSelection","createOptionEntry","names","generateDropdownOptions","isUnassignable","getModuleDefaultDescription","getTemplatePayload","getName","templatePayload","uppercase","lowercase","instance","filename","source","header","components","getAutoModuleAppModel","getAllComponents","getComponentPayload","getTemplateSettings","interrupts","properties","getConfigBits","configModule","AutoModuleHelper","templateConfigBits","configName","configBits","configBit","componentValue","masterComponent","getDerivedFunctions","isComponentValue","getPinsDataFromFile","require","getPinsLogicFromFile","getModuleConfigFromFile","mockPinsLogic","getPinsData","getCompletePinData","appModel","getRowData","rowData","rows","getPinsLogic","pinsLogic","createProcessor","hook","initialModule","stage","derivedDataGetter","dataModel","autoProcess","process","getCreatorFunctions","shouldImport","getCreatorImportArgs","importKey","state","INTERFACE_ID","pwm_general","getInterfaceId","INTERFACE_KEY","MyDerivedData","EmptyDerivedData","getCFunctionValidator","pwmCalculator","PwmCalculator","getTimerPrValue","getTimerPrescaler","getImportValue","fosc","overrideDefaultOptions","pinData","getMyPinData","alerts","getMyAlerts","pwm_general_parameters_payload","initializer_system_results","dutyCycleValidator","componentName","pwmenPwmcon","getPWMEnable","getMyProcessedArgValue","pwmdcValue","getPwmCalculator","getCCPRValue","pwmPeriod","getPwmPeriod","pwmFrequency","getPwmFrequency","pwmResolution","getPwmResolution","ctselCcptmrs1","ctselTimerSetting","ctselCcptmrs","ctselPwmtmrs","pwmdchPwmdch","pwmdclPwmdcl","templateData","getGeneratorModel","getHelpUrl","getSdlHelpOverride","filterImports","importName","friendlyImportName","componentNameValidator","getCustomUiErrors","pins_interface_args","getPinsinterfaceArgs","getmodifiedRegisterValues","registerValues","getModel","modifiedValues","por","args","exportData","getExportInterfaces","getInterface","moduleId","keys","status","moduleEnable","pattern","cValidator","getRjsfValidation","message","getCustomErrorMessage","queryAdapters","QueryAdapterKey","PPS","APFCON","CCPTMRSREG","getPeripheralDescription","CCPTMRS1","CCPTMRS","PWMTMRSREG","PWMTMRS","CTSELSETT","CTSEL","eachoptn","timeroptnregex","optnmatch","correctOptnName","imports","filteredImports","ImportKeys","filterImportBySetting","rstSource","regexpNumber","inst","timerSelection","getAssignedImport","text","Processor","Warning","Hint","helpUrl","getAutoSdlHelp","interfaceApi","createFirmwareApi","getHeaderFiles","modulename","isdriverisr","ispwmi_enabled","ispwmpi_enabled","modifiedRegisterList","initializer","minimum","maximum","arg","getArg","pwmArg","groupmatch","timersuffix","periodRegisterValue","prescaleValue","id","exportInterface","hardwareSettings","pwmInterface","templateSettings","ctsel","CTSELvalue","getDerivedFunction","CTSELvaluenum","moduleNameLowerCase","moduleNameUpperCase","moduleInstance","headerFiles","api","simpleApi","useWatchdog","timerselpresence","path","ppsData","apfconData","module","aliasReEx","behaviour","getPinBehaviour","LOCK_UNLOCK","behaviourMeta","lockPinRegEx","rowActions","pwmxRegcomponent","pwmx0Regcomponent","pwmx1Regcomponent","pwmx2Regcomponent","pwmx3Regcomponent","concat","getPCPHelper","stateActionBuilder","rowWithName","forComponent","addIfLockedSetValue","addIfUnLockedSetValue","build","actions","ppsPins","apfconPins","pinRegEx","tempPinBehaviour","ppsPin","ppsOut","RegExp","apfconPin","prValue","prescaler","dutyCycle","Math","round","log10","floor","ccprValue","dutyCycleRatio","dcRatio","pulseWidth","version","createPrototypeImport","createPrototypeExport","interfaces","createMock","Interface","requestId","clockSource","clbBle","prefix","createApi","InterfaceTypes","Initialize","returns","LoadDutyValue","arguments"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;Q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,OAAO,GAAGP,eAAe,CAAC5I,2DAAD,CAA/B,C;;;;;;;;;;;;AC7BM;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D,kC;;;;;;;;;;;;ACRa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wFAAwF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,+EAA+E;AAChF;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uDAAuD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,2BAA2B;AAC3B,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,iC;;;;;;;;;;;;ACtQa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,iHAAiH,gBAAgB;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH,gBAAgB;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,qCAAqC;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2C;;;;;;;;;;;;ACpLa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC,aAAa,EAAE;AACjE;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,6BAA6B,mBAAO,CAAC,kGAAqC;AAC1E,2BAA2B,mBAAO,CAAC,4HAAkC;AACrE,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D,gBAAgB,mBAAO,CAAC,sGAAuB;AAC/C,gBAAgB,mBAAO,CAAC,sGAAuB;AAC/C,kBAAkB,mBAAO,CAAC,8FAAmB;AAC7C,eAAe,mBAAO,CAAC,4FAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,8BAA8B;AACnE,uCAAuC,gCAAgC;AACvE,uCAAuC,gCAAgC;AACvE,uCAAuC,gCAAgC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB,EAAE;AACvE,0CAA0C,0BAA0B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,8CAA8C,0BAA0B,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,sDAAsD,4BAA4B;AAClF;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,0IAA0I,EAAE;AAC7M,oDAAoD,YAAY,2IAA2I,EAAE;AAC7M,8CAA8C,YAAY,8HAA8H,EAAE;AAC1L,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oC;;;;;;;;;;;;AC9Pa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iBAAiB,EAAE;AAC5E;AACA;AACA;AACA,sDAAsD,8BAA8B,EAAE;AACtF;AACA;AACA;AACA,yDAAyD,8BAA8B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iC;;;;;;;;;;;;ACvCa;AACb;AACA;AACA;AACA;AACA,cAAc,oCAAoC,aAAa,EAAE;AACjE;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,cAAc,mBAAO,CAAC,4EAAU;AAChC,oCAAoC,mBAAO,CAAC,8GAAqB;AACjE,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG;AACpG;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;;;;;;AC1Xa;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,kGAAqC;AAC/D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,8GAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,8C;;;;;;;;;;;;AChCa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,cAAc,mBAAO,CAAC,4EAAU;AAChC,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8JAA8J;AAC9J,0FAA0F,gBAAgB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAsI,YAAY,oJAAoJ,EAAE;AACxS;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iLAAiL;AACjL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY,2dAA2d;AAC5gB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,iCAAiC,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6C;;;;;;;;;;;;ACjXa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC,aAAa,EAAE;AACjE;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,oCAAoC,mBAAO,CAAC,8GAAqB;AACjE,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,sGAAiB;AAC/C,cAAc,mBAAO,CAAC,4EAAU;AAChC,2BAA2B,mBAAO,CAAC,gHAAsB;AACzD,0BAA0B,mBAAO,CAAC,8GAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,uDAAuD,eAAe;AACtE,uDAAuD,eAAe;AACtE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC,qBAAqB;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+C;;;;;;;;;;;;ACnMa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,oBAAoB,aAAa;AACjC,oBAAoB,WAAW;AAC/B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA,0C;;;;;;;;;;;;AC/Ba;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA;AACA,iDAAiD,oBAAoB,+CAA+C;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,qFAAqF;AAC1J;AACA;AACA;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB,qDAAqD;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,sBAAsB;AAC3F;AACA;AACA;AACA,iDAAiD,oBAAoB,oBAAoB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,qCAAqC;AAC1F;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,oD;;;;;;;;;;;;AC3Oa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA,yDAAyD,wBAAwB,uBAAuB,iCAAiC;AACzI,sJAAsJ;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,sJAAsJ;AACtJ;AACA;AACA,uFAAuF,gBAAgB;AACvG;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,8C;;;;;;;;;;;;ACvEa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA,qDAAqD,oBAAoB,qDAAqD;AAC9H;AACA;AACA,qDAAqD,oBAAoB,yFAAyF;AAClK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA,iDAAiD,oBAAoB;AACrE;AACA;AACA,iBAAiB,EAAE;AACnB;AACA;AACA,iDAAiD,oBAAoB,0CAA0C;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oBAAoB,sBAAsB;AAC3F;AACA;AACA;AACA,iDAAiD,oBAAoB,oBAAoB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,0CAA0C;AAC/F;AACA;AACA;AACA,yCAAyC,YAAY,iCAAiC,uBAAuB;AAC7G;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB,EAAE,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA,6CAA6C,YAAY,iCAAiC,uBAAuB;AACjH;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,+C;;;;;;;;;;;;ACvQa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB,kBAAkB,EAAE;AAC7D,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yC;;;;;;;;;;;;AC3Da;AACb;AACA;AACA;AACA;AACA,cAAc,oCAAoC,aAAa,EAAE;AACjE;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,yCAAyC,6BAA6B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,iCAAiC,mBAAO,CAAC,yHAAqC;AAC9E,cAAc,mBAAO,CAAC,+EAAa;AACnC,oCAAoC,mBAAO,CAAC,+GAAsB;AAClE,sBAAsB,mBAAO,CAAC,uGAAkB;AAChD,kCAAkC,mBAAO,CAAC,iHAAuB;AACjE,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D,iBAAiB,mBAAO,CAAC,kGAAY;AACrC,oBAAoB,mBAAO,CAAC,wGAAe;AAC3C,eAAe,mBAAO,CAAC,8FAAU;AACjC,iBAAiB,mBAAO,CAAC,kGAAY;AACrC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L,yDAAyD,YAAY,gIAAgI,EAAE;AACvM,qDAAqD,YAAY,4HAA4H,EAAE;AAC/L,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH;AACrH;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,oGAAoG;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,0C;;;;;;;;;;;;AClJa;AACb,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,iHAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iD;;;;;;;;;;;;AC1Da;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,eAAe,mBAAO,CAAC,8FAAU;AACjC,4BAA4B,mBAAO,CAAC,mHAAwB;AAC5D,iCAAiC,mBAAO,CAAC,6HAA6B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;ACjFa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,0BAA0B,mBAAO,CAAC,+GAAsB;AACxD,uBAAuB,mBAAO,CAAC,yGAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,uC;;;;;;;;;;;;ACpIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,0BAA0B,mBAAO,CAAC,+GAAsB;AACxD,4BAA4B,mBAAO,CAAC,mHAAwB;AAC5D,iCAAiC,mBAAO,CAAC,6HAA6B;AACtE,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,0BAA0B;AAC1B;AACA,2GAA2G;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,8EAA8E;AAC9E,SAAS;AACT;AACA,6FAA6F;AAC7F;AACA,6KAA6K;AAC7K;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY,wCAAwC;AAC7F;AACA;AACA,yCAAyC,YAAY,0CAA0C;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,0FAA0F,wBAAwB,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;AC9Pa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,+FAAqB;AAC5C,cAAc,mBAAO,CAAC,+EAAa;AACnC,8BAA8B,mBAAO,CAAC,4HAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,uCAAuC,EAAE;AACnF,6CAA6C,uBAAuB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,+CAA+C,SAAS,uFAAuF;AAC/I,iBAAiB;AACjB,4DAA4D,kCAAkC;AAC9F;AACA;AACA,gEAAgE,sCAAsC,2CAA2C;AACjJ;AACA,SAAS;AACT;AACA;AACA,sDAAsD,4BAA4B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,kIAAkI;AAClI;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B;AACpF;AACA;AACA;AACA;AACA,yDAAyD,+BAA+B;AACxF;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,oC;;;;;;;;;;;;ACjLa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,+BAA+B,mBAAO,CAAC,mIAAqC;AAC5E,+BAA+B,mBAAO,CAAC,mIAAqC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;;;;;;AC9Ba;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,mFAAa;AACvC,2CAA2C,qCAAqC,4BAA4B,EAAE,EAAE;AAChH,gBAAgB,mBAAO,CAAC,+EAAW;AACnC,0CAA0C,qCAAqC,yBAAyB,EAAE,EAAE;AAC5G,iC;;;;;;;;;;;;ACPa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA,wIAAwI;AACxI;AACA;AACA;AACA;AACA,+CAA+C,SAAS,sDAAsD;AAC9G,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE,KAAK;AACL;AACA;AACA,kD;;;;;;;;;;;;ACpCa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,4HAAkC;AACrE,eAAe,mBAAO,CAAC,sGAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,6BAA6B,0CAA0C,qBAAqB,mBAAmB;AACtK;AACA,SAAS;AACT;AACA,yIAAyI;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,6BAA6B,gCAAgC,gBAAgB,aAAa;AACjJ;AACA;AACA,uDAAuD,6BAA6B,gCAAgC,gBAAgB,0DAA0D;AAC9L;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kD;;;;;;;;;;;;ACtDa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,kHAA6B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA,wDAAwD,0BAA0B,gCAAgC,wEAAwE,yLAAyL;AACnX;AACA;AACA;AACA;AACA,mFAAmF,wBAAwB,qKAAqK,wKAAwK,EAAE;AAC1b;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAkI,sEAAsE,EAAE;AAC1M;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;;;;;ACrIa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE,yBAAyB,mBAAO,CAAC,wHAAgC;AACjE,cAAc,mBAAO,CAAC,4EAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH;AACvH;AACA;AACA,uDAAuD,6BAA6B,yCAAyC,2BAA2B;AACxJ;AACA;AACA;AACA;AACA,qOAAqO;AACrO;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,YAAY,6BAA6B,mBAAmB,iMAAiM,GAAG;AAC7T,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wLAAwL;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,oGAAoG,2CAA2C,EAAE;AACjJ,wDAAwD,sBAAsB,2CAA2C,qFAAqF,oDAAoD;AAClQ;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;;;;;AC5Ia;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,0BAA0B,mBAAO,CAAC,0HAAiC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,2IAA2I;AACtM;AACA;AACA,8CAA8C,aAAa,iFAAiF;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,2IAA2I;AACtM;AACA;AACA,8CAA8C,aAAa,iFAAiF;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,+BAA+B,EAAE;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,+BAA+B,EAAE;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;;;;;ACrKa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,8BAA8B,mBAAO,CAAC,gHAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;;;;;AClFa;AACb,8CAA8C,cAAc;AAC5D;AACA,cAAc,mBAAO,CAAC,kGAAqC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iD;;;;;;;;;;;;AC/Ga;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,iBAAiB,mBAAO,CAAC,yFAAgB;AACzC,0BAA0B,mBAAO,CAAC,yHAAgC;AAClE,4BAA4B,mBAAO,CAAC,6HAAkC;AACtE,sBAAsB,mBAAO,CAAC,iHAA4B;AAC1D,uBAAuB,mBAAO,CAAC,+HAAmC;AAClE,wBAAwB,mBAAO,CAAC,mHAA6B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,4GAA4G;AAC5G;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,qaAAqa;AACra;AACA;AACA,kDAAkD,qBAAqB;AACvE;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA,sDAAsD,qBAAqB,8BAA8B,2BAA2B,wOAAwO,+iCAA+iC;AAC35C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,SAAS;AACT,sDAAsD,oDAAoD,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;;;;;ACtEa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,sIAAuD;AAC9E,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,sBAAsB,mBAAO,CAAC,kGAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4CAA4C,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA,aAAa;AACb,2CAA2C,SAAS,yEAAyE;AAC7H;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA,mBAAmB,iBAAiB;AACpC,uCAAuC,mBAAmB,6DAA6D;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,YAAY,uDAAuD;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA,qDAAqD,wBAAwB,0BAA0B;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,4BAA4B,EAAE;AACtF,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,oBAAoB,EAAE;AACzE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,SAAS;AACT,KAAK;AACL,6DAA6D,YAAY,EAAE;AAC3E,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+HAA+H,uFAAuF,EAAE;AACxN;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,4CAA4C,KAAK,qHAAqH,sEAAsE,EAAE,8FAA8F;AACvX,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,+DAA+D,8BAA8B,iOAAiO;AAC9T;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,aAAa,uCAAuC;AAC1F;AACA;AACA,sCAAsC,aAAa,qCAAqC;AACxF;AACA;AACA,sCAAsC,aAAa,oHAAoH;AACvK;AACA;AACA,sCAAsC,aAAa,oHAAoH;AACvK;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;AC9iBa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB,wDAAwD;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD,2CAA2C,YAAY,6BAA6B,mBAAmB,8BAA8B,GAAG;AACxI,aAAa,GAAG;AAChB;AACA;AACA;AACA;;;;;;;;;;;;;AC/Ea;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gBAAgB,mBAAO,CAAC,sEAAW;AACnC,iBAAiB,mBAAO,CAAC,wEAAY;AACrC,eAAe,mBAAO,CAAC,8EAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,wCAAwC;AACxC,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,qIAAqI,4DAA4D,uDAAuD,EAAE;AAC1P;AACA;AACA,wCAAwC,8DAA8D;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,oCAAoC,mCAAmC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,6CAA6C;AACzF,oCAAoC,2BAA2B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC3NY;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPa;AACb,8CAA8C,cAAc;AAC5D;AACA,eAAe,mBAAO,CAAC,8EAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qKAAqK,8BAA8B,EAAE;AACrM;AACA,qKAAqK,oCAAoC,EAAE;AAC3M;AACA;AACA;AACA;AACA;AACA;AACA,+JAA+J,4BAA4B,EAAE;AAC7L;AACA;AACA;AACA;AACA,6GAA6G,0CAA0C,EAAE;AACzJ;AACA;AACA;AACA;AACA,4GAA4G,oBAAoB,EAAE;AAClI;AACA;AACA;AACA;AACA,4GAA4G,2BAA2B,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjFa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,iBAAiB,EAAE;AAC3H;AACA;;;;;;;;;;;;;AC9Ca;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC,EAAE;AAC5E;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1Ba;AACb,8CAA8C,cAAc;AAC5D,yBAAyB,mBAAO,CAAC,2FAAoB;AACrD;AACA,gBAAgB,mBAAO,CAAC,yEAAW;AACnC;AACA;;;;;;;;;;;;;ACNa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,0BAA0B,mBAAO,CAAC,wGAAqB;AACvD,cAAc,mBAAO,CAAC,gFAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2JAA2J;AAC3J;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,uCAAuC,EAAE;AAC/G;AACA;AACA;AACA,uEAAuE,wCAAwC,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,aAAa;AACb,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,aAAa;AACb,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;;;;;;ACpOa;AACb;AACA,4EAA4E,OAAO;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+CAA+C,mBAAO,CAAC,4HAAkD;AACzG,eAAe,mBAAO,CAAC,sGAAuC;AAC9D,gBAAgB,mBAAO,CAAC,8FAAmC;AAC3D;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA,uCAAuC,QAAQ,iEAAiE;AAChH,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA,qEAAqE,sCAAsC,EAAE;AAC7G;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D,oCAAoC,4BAA4B;AAChE,2CAA2C,4BAA4B;AACvE,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,qDAAqD,mCAAmC,EAAE;AAC1F;AACA,4CAA4C,wEAAwE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA,0CAA0C,yBAAyB;AACnE,uCAAuC,sBAAsB;AAC7D,oCAAoC,2BAA2B;AAC/D,2CAA2C,kCAAkC;AAC7E,0CAA0C,yCAAyC;AACnF,oCAAoC,mCAAmC;AACvE;AACA;AACA;AACA;AACA,yFAAyF,oBAAoB,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iCAAiC,wDAAwD;AACzF,iC;;;;;;;;;;;;ACpKa;AACb;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB,iCAAiC,mCAAmC,sCAAsC;AACrK,4CAA4C,0BAA0B;AACtE;AACA,gDAAgD,0BAA0B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,6C;;;;;;;;;;;;ACnIa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AA8B3D,GAA9B,CAFR;AAGHD,eAAW,EAAEA;AAHV,GAAP;AAKH,CAZD;;AAcA,IAAM2D,SAAS,GAAG,SAAZA,SAAY,CAACD,MAAD,EAAyB;AACvC,SAAO;AACHG,cAAU,EAAE;AACRtW,UAAI,EAAEmW,MAAM,GAAG,aADP;AAERI,aAAO,EAAE;AAFD,KADT;AAKHC,iBAAa,EAAE;AACXxW,UAAI,EAAEmW,MAAM,GAAG,gBADJ;AAEXM,eAAS,EAAE,CACP;AACIzW,YAAI,EAAE,WADV;AAEIC,YAAI,EAAE;AAFV,OADO,CAFA;AAQXsW,aAAO,EAAE;AARE;AALZ,GAAP;AAgBH,CAjBD;;AA4BO,IAAMR,SAAoB,GAAG;AAChCH,uBAAqB,EAAEA,qBADS;AAEhCD,uBAAqB,EAAEA,qBAFS;AAGhClL,gBAAc,EAAEA,cAHgB;AAIhCqL,YAAU,EAAEA,UAJoB;AAKhClF,mBAAiB,EAAEA;AALa,CAA7B,C","file":"processor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./generated_module/src/processor.ts\");\n","export type Dictionary<T> = Record<string, T>;\n\n/** @returns the non-prototype keys of the given object */\nexport const getKeys = (obj: object): string[] => {\n /* eslint-disable-line */\n return Object.getOwnPropertyNames(obj);\n};\n\nexport const values = <T = any>(obj: { [key: string]: T }): T[] => {\n return getKeys(obj).map((key: string): T => obj[key]);\n};\n\nexport const forEach = <T>(\n obj: Dictionary<T>,\n action: (key: string, value: T) => void,\n): void => {\n getKeys(obj).forEach((key: string): void => action(key, obj[key]));\n};\n\nexport const map = <T, R>(\n obj: Dictionary<T>,\n mapper: (key: string, value: T) => R,\n): R[] => {\n return getKeys(obj).map((key: string): R => mapper(key, obj[key]));\n};\n\ntype NonNullAssertion = <T>(val: T, msg?: string) => asserts val is NonNullable<T>;\n\nexport const assertNotNull: NonNullAssertion = <T>(\n val: T,\n msg?: string,\n): asserts val is NonNullable<T> => {\n if (val == null) {\n throw new Error(msg);\n }\n};\n\nexport const toDictionary = <T, V>(\n arr: T[],\n keyMapper: (input: T) => string,\n valueMapper: (input: T) => V,\n): Dictionary<V> => {\n const result: Dictionary<V> = {};\n arr.forEach((entry) => {\n result[keyMapper(entry)] = valueMapper(entry);\n });\n return result;\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface\";\nimport {\n MyRegister,\n RegisterValue,\n RegisterValues,\n SettingValue,\n} from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\nimport { AppModel } from \"../types/AutoModuleTypes\";\nimport { SoftwareComboBoxComponent } from \"@microchip/melody-automodule-interface/lib/src/SoftwareComponents\";\nimport { Handle, InterfaceId } from \"@microchip/scf-common\";\nimport { Import, Option } from \"@microchip/scf-common/lib/Processor\";\nimport * as Device from \"@microchip/scf-device\";\nimport { Setting } from \"@microchip/scf-device\";\nimport CalculateRegisterValue from \"@microchip/scf-device/lib/CalculateRegisterValue\";\nimport { getOptionByAlias, getOptionByName } from \"@microchip/scf-device/lib/Setting\";\nimport { filter, find, map } from \"@microchip/scf-device/lib/util/Arrays\";\nimport { MyPeripheral } from \"../types\";\nimport { getKeys } from \"../Utils\";\n\nexport const castComponent = (\n component: ModuleConfig.Component,\n): ModuleConfig.Component => {\n switch (component.category) {\n case \"software\":\n return component;\n case \"import\":\n return component;\n case \"hardware\":\n return component;\n default:\n throw Error(\"Unsupported Component Type\");\n }\n};\n\nexport const getDefaultValue = (\n overrideDefaultValues: ((componentName: string) => any) | undefined,\n component: ModuleConfig.SoftwareComponent,\n): ModuleConfig.SoftwareComponent[\"defaultValue\"] => {\n return (\n overrideDefaultValues?.(component.name) ??\n (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue)\n );\n};\n\nexport const getComboOptions = (\n overrideOptions: ((componentName: string) => string[]) | undefined,\n component: SoftwareComboBoxComponent,\n): any[] => {\n return overrideOptions?.(component.name) ?? component?.defaultValue?.[\"options\"];\n};\n\nexport const hasConfigBits = (interfaceName: string): boolean => {\n return getFriendlyInterfaceId(interfaceName)?.indexOf(\"configuration_bits\") != -1;\n};\n\nexport const getRegisterValues = (\n model: AppModel,\n interfaceName?: string,\n): RegisterValues => {\n const registers: RegisterValues = {} as RegisterValues;\n const config = model.getDerivedData().getModuleConfig?.();\n interfaceName = getFriendlyInterfaceId(interfaceName);\n\n config?.peripherals?.forEach((peripheral) => {\n const peripheralName = getFriendlyInterfaceId(peripheral.interfaceId.name) ?? \"\";\n if (hasConfigBits(peripheralName)) return;\n if (\n (interfaceName != undefined && peripheralName !== interfaceName) ||\n !peripheral.registers\n )\n return;\n getKeys(peripheral.registers ?? {})?.forEach((regName) => {\n let registerValue: RegisterValue<string>;\n const reg = model.getHardware(peripheralName)?.getPeripheral().registers?.[\n regName\n ];\n if (reg) {\n registerValue = {\n comment: \"\",\n value: 0,\n valueAsHex: \"0x00\",\n name: reg?.name,\n alias: reg?.alias ?? reg?.name,\n settings: {},\n };\n } else {\n return;\n }\n\n const registerVal = CalculateRegisterValue.for(reg as Device.Register);\n const comments: string[] = [];\n peripheral.registers?.[regName].forEach((set) => {\n const setting: Device.Setting | undefined = reg.settings?.[set.setting];\n if (setting) {\n if (setting.type !== \"R\") {\n //Add Comments\n comments.push(\n `${set.setting} ${model.getComponentValue(set.name)}; `,\n );\n }\n if (registerValue?.settings) {\n registerValue.settings[setting.alias] = getSettingBits(\n reg,\n setting,\n model.getComponent(set.name)?.value as string,\n config?.deviceType ?? \"PIC\",\n );\n }\n switch (set.type) {\n case \"ComboBox\":\n case \"boolean\":\n registerVal.withNumberValue(\n setting,\n getOptionValueByName(\n setting,\n model.getComponent(set.name)?.value as string,\n ) ?? 0,\n );\n break;\n case \"number\":\n registerVal.withNumberValue(\n setting,\n model.getComponentValue(set.name as string) as number,\n );\n break;\n case \"register\":\n case \"string\":\n registerVal.withNumberValue(\n setting,\n Number(model.getComponentValue(set.name)),\n );\n break;\n default:\n break;\n }\n }\n });\n if (reg.settings) {\n registerValue.value = registerVal.asNumber();\n } else {\n registerValue.value = Number(\n model.getComponentValue(\n peripheral.registers?.[regName]?.[0]?.name ?? \"\",\n ) ?? 0,\n );\n comments.push(`${registerValue.name} ${registerValue.value}; `);\n }\n registerValue.valueAsHex =\n \"0x\" + registerValue.value.toString(16).toUpperCase();\n registerValue.comment = sortComments(comments, reg);\n\n registers[reg?.alias ?? reg.name] = registerValue;\n });\n });\n\n return registers;\n};\n\nconst sortComments = (comments: string[], register: MyRegister): string => {\n comments.sort((a, b): number => {\n const settingA = register.settings?.[a.split[\" \"]?.[0]];\n const settingB = register.settings?.[b.split(\" \")?.[0]];\n return Number(settingB?.mask) - Number(settingA?.mask);\n });\n\n return comments.join(\"\");\n};\n\nexport const getSettingBits = (\n register: MyRegister,\n setting: Device.Setting,\n value: string,\n deviceType: string,\n): SettingValue => {\n const setValNumber = Number(getOptionByAlias(value, setting)?.value ?? 0);\n const settingValue: SettingValue = {\n alias: setting.alias,\n name: setting.name,\n value: setValNumber ?? 0,\n valueAsHex: \"0x\" + setValNumber.toString(16).toUpperCase(),\n valueAsDescription: value,\n bitName:\n deviceType === \"PIC\"\n ? `${register.name}bits.${setting.name}`\n : `${register.name}.${setting.name}`,\n };\n return settingValue;\n};\n\nconst getRegisterFromComponent = (\n hardware: MyPeripheral | undefined,\n component: ModuleConfig.HardwareComponent,\n): MyRegister | undefined => {\n const registerName = component.name\n .replace(component.setting.toLowerCase(), \"\")\n ?.toUpperCase();\n const register = hardware?.registers?.[registerName];\n\n if (register) {\n return register;\n } else {\n const regName = component.name\n .replace(component.setting.toLowerCase(), \"\")\n ?.toUpperCase();\n const registers: string[] | undefined = getKeys(hardware?.registers ?? {});\n for (const reg of registers ?? []) {\n const modifiedRegName = reg.replace(/_/g, \"\");\n if (regName === modifiedRegName) {\n return hardware?.registers?.[reg];\n }\n }\n }\n};\n\nexport const getSettingFromComponent = (\n model: AppModel,\n component: ModuleConfig.HardwareComponent,\n): Device.Setting | undefined => {\n const config = model.getDerivedData().getModuleConfig?.();\n let setting: Device.Setting | undefined;\n\n if (model) {\n config?.peripherals?.forEach((peripheral) => {\n if (setting) return;\n const peripheralName = getFriendlyInterfaceId(peripheral.interfaceId.name);\n const hardware = model.getHardware(peripheralName)?.getPeripheral();\n const register = getRegisterFromComponent(hardware, component);\n if (register && !register.settings) {\n //No settings for this particular register. Create one\n setting = {\n alias: register.alias ?? register.name,\n name: register.name,\n defaultValue: register.defaultValue,\n type: register.type,\n description: register.desc,\n porDefault: register.defaultValue,\n };\n } else {\n setting = register?.settings?.[component.setting];\n }\n });\n }\n\n return setting;\n};\n\nexport const getOptionValueByName = (\n setting: Device.Setting,\n optionName: string,\n): number | undefined => {\n if (!setting) return undefined;\n\n let optionValue: string | undefined = setting.porDefault;\n if (setting.options) {\n setting.options.forEach((option) => {\n if (option.name === optionName || option.description === optionName) {\n optionValue = option.value;\n }\n });\n }\n return Number(optionValue);\n};\n\nexport const getSettingDefaultIfPresent = (\n component: ModuleConfig.HardwareComponent,\n setting: Setting | undefined,\n overrideDefaultValue: any | undefined,\n): string | undefined => {\n let defaultValue: string | undefined;\n if (overrideDefaultValue !== undefined) {\n return overrideDefaultValue;\n }\n if (component.overrideDefaultValue) {\n return component.overrideDefaultValue;\n }\n\n if (setting?.defaultValue) {\n const option = getOptionByName(setting.defaultValue, setting);\n defaultValue =\n option?.[component.displayOptionSetting ?? \"alias\"] ?? setting.defaultValue;\n }\n return defaultValue;\n};\n\nexport const isInterface = (idA: InterfaceId, idB: InterfaceId): boolean => {\n return idA.name == idB.name;\n};\n\nexport const getSettingOptionsIfPresent = (\n component: ModuleConfig.HardwareComponent,\n setting: Device.Setting | undefined,\n masterComponentValue?: string,\n): string[] => {\n let options = [\"\"];\n\n if (setting) {\n const filteredOptions = component.mode\n ? filterModeOptions(setting.options ?? [], component, masterComponentValue)\n : setting.options;\n options = map(\n filteredOptions ?? [],\n (option) => option[component.displayOptionSetting ?? \"alias\"] ?? option.alias,\n );\n }\n return options;\n};\n\nconst filterModeOptions = (\n options: Device.Option[],\n component: ModuleConfig.Component,\n masterComponentValue?: string,\n): Device.Option[] => {\n if (component.mode?.operation != \"filterOptions\" || masterComponentValue == undefined)\n return options;\n //Determine mode\n const mode = find(getKeys(component.mode?.optionModes ?? {}) ?? [], (mode) => {\n const match = component.mode?.optionModes?.[mode];\n if (match) {\n return (masterComponentValue?.match(match)?.length ?? -1) > 0;\n }\n return false;\n });\n const filteredOptions = filter(options ?? [], (option) => {\n if (option.mode && mode) {\n const match = component.mode?.optionModes?.[mode];\n if (match) {\n return (option.mode.match(match)?.length ?? -1) > 0;\n }\n }\n return true;\n });\n return filteredOptions;\n};\n\nexport const getProcessedHandle = (\n handle?: Handle,\n payload?: Import[\"payload\"],\n): Handle | undefined => {\n if (handle) {\n handle = {\n ...handle,\n label:\n handle?.label ??\n payload?.customName ??\n payload?.moduleName ??\n payload?.name ??\n handle.providerId + \" : \" + handle.exportId,\n };\n }\n\n return handle;\n};\n\nexport interface DependencyDropdownOption {\n label: string;\n value?: Option<any, any>;\n}\nexport class DependencySelector {\n private noneSelection: DependencyDropdownOption = { label: \"None\" };\n private model: AppModel;\n private component: ModuleConfig.DependencyComponent;\n\n constructor(model: AppModel, component: ModuleConfig.DependencyComponent) {\n this.model = model;\n this.component = component;\n }\n\n generateDropdownOptions(): DependencyDropdownOption[] {\n const dropdownOptions: DependencyDropdownOption[] = [];\n const thisImport: Import | undefined = this.model.getImports()[\n this.component.importId\n ];\n const options: Option<any, any>[] | undefined = thisImport?.options;\n\n if (this.shouldAllowUnselectDependency(thisImport, options)) {\n dropdownOptions.push(this.noneSelection);\n }\n if (options) {\n for (const option in options) {\n dropdownOptions.push(this.createOptionEntry(options[option]));\n }\n }\n\n return dropdownOptions;\n }\n\n getDropdownOptionNames(): string[] {\n const names: string[] = [];\n this.generateDropdownOptions().forEach((option) => names.push(option.label));\n return names;\n }\n\n private createOptionEntry = (option: Option): DependencyDropdownOption => {\n return {\n label: this.createOptionLabel(option.handle, option.payload),\n value: option,\n };\n };\n\n createOptionLabel = (handle: Handle, payload: Import[\"payload\"]): string => {\n return getProcessedHandle(handle, payload)?.label ?? \"\";\n };\n\n private shouldAllowUnselectDependency(\n thisImport: Import | undefined,\n options: Option<any, any>[] | undefined,\n ): boolean {\n return (\n thisImport != undefined &&\n thisImport.isUnassignable != false &&\n options !== undefined\n );\n }\n}\n\nexport function getModuleDefaultDescription(): string | undefined {\n //TODO: Need to refactor this so that gets it from the source.\n //Alternatively, we could get it during the automodule update process and fetch it from there...\n return undefined;\n}\n\nexport const getFriendlyInterfaceId = (\n interfaceName: string | undefined,\n): string | undefined => {\n interfaceName = interfaceName?.replace(/ /g, \"\").replace(/-/g, \"_\");\n\n return interfaceName;\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface\";\nimport { ConfigValues } from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\nimport { ComponentValueTypes } from \"@microchip/melody-automodule-interface/lib/src/ModuleConfig\";\nimport { SoftwareComboBoxComponent } from \"@microchip/melody-automodule-interface/lib/src/SoftwareComponents\";\nimport { ComponentValueList } from \"@microchip/melody-automodule-interface/lib/src/types\";\nimport { ComboBox } from \"@microchip/scf-autoview/lib/simpleForm/simpleForm-types\";\nimport { Setting } from \"@microchip/scf-device\";\nimport { find } from \"@microchip/scf-device/lib/util/Arrays\";\nimport { AppModel } from \"../types/AutoModuleTypes\";\nimport { getKeys, values } from \"../Utils\";\nimport * as AutoModuleHelper from \"./AutoModuleHelpers\";\nimport { getComboOptions } from \"./AutoModuleHelpers\";\n\nexport const getTemplatePayload = (model: AppModel | undefined): any => {\n if (!model) return undefined;\n const config = model.getDerivedData().getModuleConfig?.();\n const moduleName = model.getName();\n\n let templatePayload = {\n name: {\n uppercase: moduleName.toUpperCase(),\n lowercase: moduleName.toLowerCase(),\n instance: moduleName,\n },\n filename: {\n source: `${moduleName.toLowerCase()}.c`,\n header: `${moduleName.toLowerCase()}.h`,\n },\n };\n\n const components: ComponentValueList = model\n .getAutoModuleAppModel()\n .getAllComponents();\n\n values(components)?.forEach((entry) => {\n templatePayload[entry.component.name] = getComponentPayload(\n entry.component,\n model,\n );\n });\n\n templatePayload = {\n ...templatePayload,\n ...getTemplateSettings(model, config),\n };\n\n return templatePayload;\n};\n\nexport const getTemplateSettings = (\n model: AppModel,\n config?: ModuleConfig.ModuleConfig,\n): Record<string, any> | undefined => {\n if (!model?.getHardware()) return undefined;\n\n return {\n registers: model.getRegisterValues(undefined),\n interrupts: model.getHardware()?.getPeripheral().interrupts,\n properties: model.getHardware()?.getPeripheral().properties,\n };\n};\n\nexport const getConfigBits = (model: AppModel): ConfigValues => {\n const config = model.getDerivedData().getModuleConfig?.();\n const configModule = find(config?.peripherals ?? [], (peripheral) => {\n return AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name);\n });\n if (configModule) {\n const interfaceName = AutoModuleHelper.getFriendlyInterfaceId(\n configModule.interfaceId.name,\n );\n let templateConfigBits: ConfigValues = {};\n const registers = model.getHardware(interfaceName)?.getPeripheral().registers;\n getKeys(registers ?? [])?.forEach((configName) => {\n const configBits = configModule.registers?.[configName];\n templateConfigBits = {\n ...templateConfigBits,\n [configName]: {},\n };\n configBits?.forEach((configBit) => {\n const register = registers?.[configName];\n let value: string;\n if (register && !register.settings) {\n //missing settings for register\n value = model.getComponent(configBit.name)?.value ?? \"\";\n } else {\n const setting: Setting | undefined =\n registers?.[configName]?.settings?.[configBit.setting];\n value =\n find(\n setting?.options ?? [],\n (option) =>\n option.description ===\n model.getComponent(configBit.name)?.value ||\n option.alias ===\n model.getComponent(configBit.name)?.value ||\n option.name === model.getComponent(configBit.name)?.value,\n )?.name ??\n (model.getComponent(configBit.name)?.value as string) ??\n setting?.defaultValue ??\n \"\";\n }\n\n templateConfigBits[configName][configBit.setting] = {\n name: configBit.setting,\n value: value,\n description: configBit.description,\n valueAsDescription: model.getComponent(configBit.name)\n ?.value as string,\n };\n });\n });\n return templateConfigBits;\n } else {\n return {};\n }\n};\n\nconst getComponentPayload = (\n component: ModuleConfig.Component,\n model: AppModel,\n): ComponentValueTypes | ComboBox => {\n const componentValue = model.getComponentValue(component.name);\n switch (component.type) {\n case \"ComboBox\":\n if (component.category === \"hardware\") {\n const setting:\n | Setting\n | undefined = AutoModuleHelper.getSettingFromComponent(\n model,\n component,\n );\n return {\n value: componentValue,\n options: AutoModuleHelper.getSettingOptionsIfPresent(\n component,\n setting,\n model.getComponentValue(\n component.mode?.masterComponent ?? \"\",\n ) as string,\n ),\n };\n } else if (component.category === \"software\") {\n return {\n value: componentValue,\n options: getComboOptions(\n model.getDerivedFunctions().overrideOptions,\n component as SoftwareComboBoxComponent,\n ),\n };\n }\n break;\n case \"boolean\":\n return model.isComponentValue(component.name);\n case \"number\":\n case \"string\":\n case \"register\":\n default:\n return componentValue;\n }\n};\n","import { ModuleConfig } from \"@microchip/melody-automodule-interface/lib/src/ModuleConfig\";\nimport { PinsData } from \"@microchip/melody-automodule-interface/lib/src/pins\";\nimport { PinsLogic } from \"@microchip/melody-automodule-interface/lib/src/types\";\nexport { getCreatorFunctions } from \"../../src/CreatorFunctions\";\nexport { getDerivedData } from \"../../src/DerivedData\";\n\nexport const getPinsDataFromFile = (): PinsData | undefined => {\n try {\n return require(\"../../src/pinsdata.json\");\n } catch {\n return undefined;\n }\n};\n\nexport const getPinsLogicFromFile = (): PinsLogic | undefined => {\n try {\n return require(\"../../src/PinsLogic.ts\");\n } catch {\n return undefined;\n }\n};\n\nexport const getModuleConfigFromFile = (): ModuleConfig | undefined => {\n try {\n return require(\"../../src/moduleConfig.json\");\n } catch {\n return undefined;\n }\n};\n","import { pin_row } from \"@microchip/pins-interface/lib/types\";\nimport { PinsData } from \"@microchip/melody-automodule-interface/lib/src/pins\";\nimport {\n AppModel,\n PinsLogic,\n} from \"@microchip/melody-automodule-interface/lib/src/types\";\nimport { getPinsDataFromFile, getPinsLogicFromFile } from \"../getUserData\";\n\nconst mockPinsLogic = (getPinsData: GetPinsData): PinsLogic => {\n const getCompletePinData = (appModel: AppModel): any => {\n return {};\n };\n const getRowData = (appModel: AppModel, rowData: pin_row): pin_row => {\n return rowData;\n };\n return {\n getCompletePinData: getCompletePinData,\n getRowData: getRowData,\n getPinsData: getPinsData,\n };\n};\n\ntype GetPinsData = typeof getPinsData;\nexport const getPinsData = (): PinsData => getPinsDataFromFile() ?? { rows: [] };\n\nexport const getPinsLogic = (): PinsLogic => {\n const pinsLogic = getPinsLogicFromFile();\n if (pinsLogic) {\n return {\n ...pinsLogic,\n getPinsData: getPinsData,\n };\n } else {\n return mockPinsLogic(getPinsData);\n }\n};\n","import { process as autoProcess } from \"@microchip/scf-automodule-impl\";\nimport { AppModel, DerivedData } from \"@microchip/melody-automodule-interface\";\nimport { ProcessorStages } from \"@microchip/melody-automodule-interface/lib/src/InterfaceTypes\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport { getModuleConfigFromFile, getDerivedData } from \"./getUserData\";\n\nexport type LegacyProcessFunction = (\n initialModule: Processor.Module,\n stage: ProcessorStages,\n) => Processor.ProcessedModule;\n\nfunction createProcessor(\n getDerivedData: (dataModel?: AppModel) => DerivedData,\n): LegacyProcessFunction {\n const hook = (\n initialModule: Processor.Module,\n stage: ProcessorStages,\n ): Processor.ProcessedModule => {\n const derivedDataGetter = (dataModel: AppModel): DerivedData => {\n return {\n getModuleConfig: getModuleConfigFromFile,\n ...getDerivedData(dataModel),\n };\n };\n return autoProcess(initialModule, stage, derivedDataGetter);\n };\n return hook;\n}\n\nexport const process = createProcessor(getDerivedData);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RowPrefix = void 0;\nvar RowPrefix;\n(function (RowPrefix) {\n RowPrefix[\"Default\"] = \"defaultRow_\";\n RowPrefix[\"Dynamic\"] = \"dynamicRow_\";\n})(RowPrefix = exports.RowPrefix || (exports.RowPrefix = {}));\n//# sourceMappingURL=Tables.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.data_schema = exports.PIN_ARCH = exports.behaviour = exports.direction = exports.actiontype = exports.pin_attribs_enum = exports.pin_interrupts_enum = exports.pin_state = exports.QueryAdapterKey = void 0;\nvar QueryAdapterKey;\n(function (QueryAdapterKey) {\n QueryAdapterKey[\"ALLPINS\"] = \"allpins\";\n QueryAdapterKey[\"ALLPINS_FOR_ATTRIBS\"] = \"allpins_for_attribs\";\n QueryAdapterKey[\"PPS\"] = \"pps\";\n QueryAdapterKey[\"APFCON\"] = \"apfcon\";\n QueryAdapterKey[\"PORTMUX\"] = \"portmux\";\n QueryAdapterKey[\"HASPPS\"] = \"hasPPS\";\n})(QueryAdapterKey = exports.QueryAdapterKey || (exports.QueryAdapterKey = {}));\nvar pin_state;\n(function (pin_state) {\n pin_state[\"EMPTY\"] = \"E\";\n pin_state[\"LOCKED\"] = \"L\";\n pin_state[\"UNLOCK\"] = \"UL\";\n pin_state[\"DiSABLE_LOCK\"] = \"DL\";\n pin_state[\"UNLOCKED_DISABLED\"] = \"DUL\";\n pin_state[\"LOCKED_LINK\"] = \"LL\";\n pin_state[\"UNLOCKED_MUX\"] = \"MUL\";\n pin_state[\"LOCKED_CONFLICT\"] = \"CL\";\n})(pin_state = exports.pin_state || (exports.pin_state = {}));\nvar pin_interrupts_enum;\n(function (pin_interrupts_enum) {\n pin_interrupts_enum[\"INTDIS_BUFFEN\"] = \"INTDIS_BUFFEN\";\n pin_interrupts_enum[\"BOTH_EDGES\"] = \"BOTH_EDGES\";\n pin_interrupts_enum[\"RISING_EDGE\"] = \"RISING_EDGE\";\n pin_interrupts_enum[\"FALLING_EDGE\"] = \"FALLING_EDGE\";\n pin_interrupts_enum[\"NONE\"] = \"NONE\";\n pin_interrupts_enum[\"LOW_LEVEL\"] = \"LOW_LEVEL\";\n})(pin_interrupts_enum = exports.pin_interrupts_enum || (exports.pin_interrupts_enum = {}));\nvar pin_attribs_enum;\n(function (pin_attribs_enum) {\n pin_attribs_enum[\"aliasReEx\"] = \"aliasReEx\";\n pin_attribs_enum[\"cname\"] = \"cname\";\n pin_attribs_enum[\"high\"] = \"high\";\n pin_attribs_enum[\"inv\"] = \"inv\";\n pin_attribs_enum[\"wpu\"] = \"wpu\";\n pin_attribs_enum[\"wpd\"] = \"wpd\";\n pin_attribs_enum[\"od\"] = \"od\";\n pin_attribs_enum[\"analog\"] = \"analog\";\n pin_attribs_enum[\"ioc\"] = \"ioc\";\n pin_attribs_enum[\"intcallback\"] = \"intcallback\";\n pin_attribs_enum[\"alias\"] = \"alias\";\n pin_attribs_enum[\"advInpBuff\"] = \"advInpBuff\";\n})(pin_attribs_enum = exports.pin_attribs_enum || (exports.pin_attribs_enum = {}));\nvar actiontype;\n(function (actiontype) {\n actiontype[\"SETACTION\"] = \"SETACTION\";\n actiontype[\"ATTRIBACTION\"] = \"ATTRIBACTION\";\n})(actiontype = exports.actiontype || (exports.actiontype = {}));\nvar direction;\n(function (direction) {\n direction[\"output\"] = \"output\";\n direction[\"input\"] = \"input\";\n direction[\"bidirectional\"] = \"bidirectional\";\n})(direction = exports.direction || (exports.direction = {}));\nvar behaviour;\n(function (behaviour) {\n behaviour[\"LOCK_UNLOCK\"] = \"LOCK_UNLOCK\";\n behaviour[\"ALWAYS_LOCKED\"] = \"ALWAYS_LOCKED\";\n behaviour[\"SINGLE_PIN_MUX\"] = \"SINGLE_PIN_MUX\";\n behaviour[\"OPTIONAL_PIN_MUX\"] = \"OPTIONAL_PIN_MUX\";\n behaviour[\"PPS\"] = \"PPS\";\n behaviour[\"APFCON\"] = \"APFCON\";\n behaviour[\"PORTMUX\"] = \"PORTMUX\";\n behaviour[\"EXCLUSIVE_LOCK\"] = \"EXCLUSIVE_LOCK\";\n behaviour[\"LOCKED_DISABLED\"] = \"LOCKED_DISABLED\";\n})(behaviour = exports.behaviour || (exports.behaviour = {}));\nvar PIN_ARCH;\n(function (PIN_ARCH) {\n PIN_ARCH[\"PIC18F\"] = \"PIC18F\";\n PIN_ARCH[\"AVR8\"] = \"AVR8\";\n PIN_ARCH[\"PIC16F\"] = \"PIC16F\";\n PIN_ARCH[\"PIC24F\"] = \"PIC24F\";\n})(PIN_ARCH = exports.PIN_ARCH || (exports.PIN_ARCH = {}));\n//------------------------------------ schema ------------------------------------//\nexports.data_schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n $ref: \"#/definitions/intf_data\",\n definitions: {\n intf_data: {\n type: \"object\",\n properties: {\n rows: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_row\",\n },\n },\n },\n required: [\"rows\"],\n additionalProperties: false,\n },\n pin_row: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n module: {\n type: \"string\",\n },\n function: {\n type: \"string\",\n },\n direction: {\n $ref: \"#/definitions/direction\",\n },\n filter: {\n $ref: \"#/definitions/filter\",\n },\n behaviour: {\n $ref: \"#/definitions/behaviour\",\n },\n behaviourMeta: {\n $ref: \"#/definitions/behaviourMeta\",\n },\n attribs: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pin_attribs\",\n },\n },\n groupsdata: {\n $ref: \"#/definitions/pingroups_data\",\n },\n actions: {},\n },\n required: [\"name\", \"module\", \"function\", \"direction\", \"filter\", \"behaviour\"],\n additionalProperties: false,\n },\n direction: {\n type: \"string\",\n enum: [\"output\", \"input\", \"bidirectional\"],\n },\n filter: {\n type: \"object\",\n properties: {\n module: {\n type: \"string\",\n },\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"module\", \"aliasReEx\"],\n additionalProperties: false,\n },\n behaviour: {\n type: \"string\",\n enum: [\n \"LOCK_UNLOCK\",\n \"ALWAYS_LOCKED\",\n \"SINGLE_PIN_MUX\",\n \"OPTIONAL_PIN_MUX\",\n \"PPS\",\n \"PORTMUX\",\n \"EXCLUSIVE_LOCK\",\n \"LOCKED_DISABLED\",\n ],\n },\n behaviourMeta: {\n type: \"object\",\n properties: {\n lockPinRegEx: {\n type: \"string\",\n },\n },\n required: [\"lockPinRegEx\"],\n additionalProperties: false,\n },\n pin_attribs: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n cname: {\n type: \"string\",\n },\n high: {\n type: \"boolean\",\n },\n inv: {\n type: \"boolean\",\n },\n wpu: {\n type: \"boolean\",\n },\n wpd: {\n type: \"boolean\",\n },\n od: {\n type: \"boolean\",\n },\n analog: {\n type: \"boolean\",\n },\n ioc: {\n $ref: \"#/definitions/pin_interrupts_enum\",\n },\n bidirection_out: {\n type: \"boolean\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n pin_interrupts_enum: {\n type: \"string\",\n enum: [\n \"INTDIS_BUFFEN\",\n \"BOTH_EDGES\",\n \"RISING_EDGE\",\n \"FALLING_EDGE\",\n \"NONE\",\n \"LOW_LEVEL\",\n ],\n },\n pingroups_data: {\n type: \"object\",\n properties: {\n groups: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/pins_group\",\n },\n },\n },\n required: [\"groups\"],\n additionalProperties: false,\n },\n pins_group: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n filter: {\n $ref: \"#/definitions/grpfilter\",\n },\n datapath: {\n type: \"string\",\n },\n },\n required: [\"name\", \"filter\"],\n additionalProperties: false,\n },\n grpfilter: {\n type: \"object\",\n properties: {\n aliasReEx: {\n type: \"string\",\n },\n },\n required: [\"aliasReEx\"],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=types.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logAnalytics = exports.getAnalyticsDefault = void 0;\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar getAnalyticsDefault = function (model) {\n var logAlwaysComps = [];\n var stateChangeComps = [];\n return (0, exports.logAnalytics)(model, stateChangeComps, logAlwaysComps);\n};\nexports.getAnalyticsDefault = getAnalyticsDefault;\nvar logAnalytics = function (model, logAlwaysComps, logOnChangeComps) {\n var _a, _b;\n var retData = {};\n var moduleconfig = (0, getConfigData_1.getConfigData)(model);\n var alwaysCompsDesired = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.logAlwaysComps.concat(logAlwaysComps !== null && logAlwaysComps !== void 0 ? logAlwaysComps : []);\n retData = logAlwaysStaticAndDynamicData(model, moduleconfig, alwaysCompsDesired);\n var onChangeCompsDesired = (_b = moduleconfig.analytics) === null || _b === void 0 ? void 0 : _b.logOnChangeComps.concat(logOnChangeComps !== null && logOnChangeComps !== void 0 ? logOnChangeComps : []);\n var moduleState = model.getState();\n retData = __assign(__assign({}, retData), logOnChangeStaticAndDynamicData(moduleconfig, model, moduleState, onChangeCompsDesired));\n return retData;\n};\nexports.logAnalytics = logAnalytics;\nvar logAlwaysStaticAndDynamicData = function (model, moduleconfig, alwaysCompsDesired) {\n var _a, _b, _c;\n var retData = {};\n for (var _i = 0, _d = alwaysCompsDesired !== null && alwaysCompsDesired !== void 0 ? alwaysCompsDesired : []; _i < _d.length; _i++) {\n var eachDesiredComp = _d[_i];\n var correctMapping = void 0;\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n var compObj = void 0;\n var resultantAnalyticsKey = void 0;\n if (eachDesiredComp !== \"*\") {\n compObj = (_a = allComps[eachDesiredComp]) === null || _a === void 0 ? void 0 : _a.component;\n if (compObj === undefined || !isCompCategoryAllowed(compObj))\n continue;\n correctMapping = (_b = moduleconfig.analytics) === null || _b === void 0 ? void 0 : _b.compMapping[eachDesiredComp];\n resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachDesiredComp\n : correctMapping;\n var value = model.getComponentValue(eachDesiredComp);\n if (value !== undefined) {\n retData[resultantAnalyticsKey] = value;\n }\n }\n else {\n for (var eachCompName in allComps) {\n correctMapping = (_c = moduleconfig.analytics) === null || _c === void 0 ? void 0 : _c.compMapping[eachCompName];\n compObj = allComps[eachCompName].component;\n if (!isCompCategoryAllowed(compObj))\n continue;\n resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachCompName\n : correctMapping;\n retData[resultantAnalyticsKey] = model.getComponentValue(eachCompName);\n }\n break;\n }\n }\n return retData;\n};\nvar formRegUndercSettNameForComp = function (compObj) {\n var regUndcSettingName = \"\";\n var compCategory = compObj.category;\n var compSetting = compCategory === \"hardware\" ? compObj.setting : \"\";\n var regName = getRegNameFromCompSettName(compObj.name, compSetting);\n if (regName === \"\") {\n regUndcSettingName = compSetting;\n }\n else if (compSetting === \"\") {\n regUndcSettingName = regName;\n }\n else {\n regUndcSettingName = regName + \"_\" + compSetting;\n }\n return regUndcSettingName;\n};\nvar getRegNameFromCompSettName = function (compName, settingName) {\n var regNameCaps = \"\";\n var compNameCaps = compName.toUpperCase();\n var settingNameCaps = settingName.toUpperCase();\n regNameCaps = compNameCaps.replace(settingNameCaps, \"\");\n return regNameCaps;\n};\nvar logOnChangeStaticAndDynamicData = function (moduleconfig, model, moduleState, onChangeCompsDesired) {\n var _a, _b;\n if (!onChangeCompsDesired || onChangeCompsDesired.length === 0)\n return {};\n var retData = logOnChangeDependencyComps(onChangeCompsDesired, model, moduleconfig);\n for (var eachCategoryKey in moduleState) {\n for (var eachSubCategoryKey in moduleState[eachCategoryKey]) {\n for (var eachChangedCompKey in moduleState[eachCategoryKey][eachSubCategoryKey]) {\n if ((onChangeCompsDesired === null || onChangeCompsDesired === void 0 ? void 0 : onChangeCompsDesired.indexOf(eachChangedCompKey)) !== -1 ||\n (onChangeCompsDesired === null || onChangeCompsDesired === void 0 ? void 0 : onChangeCompsDesired.indexOf(\"*\")) !== -1) {\n var correctMapping = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.compMapping[eachChangedCompKey];\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n var compObj = (_b = allComps[eachChangedCompKey]) === null || _b === void 0 ? void 0 : _b.component;\n if (compObj === undefined || !isCompCategoryAllowed(compObj))\n continue;\n var resultantAnalyticsKey = !correctMapping\n ? compObj.category === \"hardware\"\n ? formRegUndercSettNameForComp(compObj)\n : eachChangedCompKey\n : correctMapping;\n retData[resultantAnalyticsKey] =\n moduleState[eachCategoryKey][eachSubCategoryKey][eachChangedCompKey];\n }\n }\n }\n }\n return retData;\n};\nvar consolidateDependencyCompNames = function (onChangeCompsDesired, model) {\n var _a, _b;\n var consolidatedCompNames = [];\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n for (var _i = 0, _c = onChangeCompsDesired !== null && onChangeCompsDesired !== void 0 ? onChangeCompsDesired : []; _i < _c.length; _i++) {\n var eachDesCompName = _c[_i];\n var compObj = (_a = allComps[eachDesCompName]) === null || _a === void 0 ? void 0 : _a.component;\n if (eachDesCompName !== \"*\" && (compObj === null || compObj === void 0 ? void 0 : compObj.category) === \"import\") {\n consolidatedCompNames.push(eachDesCompName);\n }\n else if (eachDesCompName === \"*\") {\n consolidatedCompNames = [];\n for (var eachcompKey in allComps) {\n compObj = (_b = allComps[eachcompKey]) === null || _b === void 0 ? void 0 : _b.component;\n if ((compObj === null || compObj === void 0 ? void 0 : compObj.category) === \"import\") {\n consolidatedCompNames.push(compObj.name);\n }\n }\n break;\n }\n }\n return consolidatedCompNames;\n};\nvar logOnChangeDependencyComps = function (onChangeCompsDesired, model, moduleconfig) {\n var _a, _b, _c;\n var result = {};\n var allComps = model.getAutoModuleAppModel().getAllComponents();\n //stage 1 - consolidating all desired comps\n var consolidatedCompNames = consolidateDependencyCompNames(onChangeCompsDesired, model);\n //stage 2 - populating the analytics data for consolidated dep comps - stage\n for (var _i = 0, consolidatedCompNames_1 = consolidatedCompNames; _i < consolidatedCompNames_1.length; _i++) {\n var eachCompName = consolidatedCompNames_1[_i];\n var correctMapping = (_b = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.compMapping[eachCompName]) !== null && _b !== void 0 ? _b : eachCompName;\n var compObj = (_c = allComps[eachCompName]) === null || _c === void 0 ? void 0 : _c.component;\n if ((compObj === null || compObj === void 0 ? void 0 : compObj.category) !== \"import\")\n continue;\n var value = getDependencyCompValueForOnChange(compObj, model);\n if (value)\n result[correctMapping] = value;\n }\n return result;\n};\nvar getDependencyCompValueForOnChange = function (compObj, model) {\n var _a;\n var result = (_a = model.getImports()[compObj.importId].handle) === null || _a === void 0 ? void 0 : _a.label;\n return result;\n};\nvar isCompCategoryAllowed = function (compObj) {\n return (compObj !== undefined &&\n (compObj.category === \"hardware\" ||\n compObj.category === \"software\" ||\n compObj.category === \"import\" ||\n compObj.category === \"table\"));\n};\n//# sourceMappingURL=AnalyticsHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getModel = void 0;\nvar Processor = __importStar(require(\"@microchip/scf-common/lib/Processor\"));\nvar AutoModuleAppModel_1 = require(\"../autoModule/AutoModuleAppModel\");\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar exports_1 = require(\"../interfaces/exports\");\nvar imports_1 = require(\"../interfaces/imports\");\nvar PCPHelper_1 = require(\"../pins/PCPHelper\");\nvar tables_1 = require(\"../tables/tables\");\nvar getModel = function (prototype, getDerivedData) {\n return new MyAppModel(prototype, getDerivedData);\n};\nexports.getModel = getModel;\nvar MyAppModel = /** @class */ (function () {\n function MyAppModel(prototype, getDerivedData) {\n var _this = this;\n this.getState = function () { return _this.prototype.state; };\n this.getPayload = function () { return _this.prototype.payload; };\n this.getImports = function () { return _this.prototype.imports; };\n this.getExports = function () { return _this.prototype.exports; };\n this.getName = function () {\n return _this.getAutoModuleAppModel().getModuleName();\n };\n this.getCategory = function () {\n return _this.getAutoModuleAppModel().getModuleCategory();\n };\n this.getActiveName = function () {\n var _a, _b, _c;\n return (_c = (_b = (_a = _this.getDerivedFunctions()).getActiveName) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : _this.getName();\n };\n this.getGlobalNames = function () {\n var _a, _b, _c;\n return (_c = (_b = (_a = _this.getDerivedFunctions()).getGlobalNames) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];\n };\n this.getAutoModuleAppModel = function () {\n if (_this.autoModuleAppModel)\n return _this.autoModuleAppModel;\n _this.autoModuleAppModel = (0, AutoModuleAppModel_1.createAutoModuleAppModel)(_this);\n return _this.autoModuleAppModel;\n };\n this.getPrototypeModule = function () {\n return _this.prototype;\n };\n this.getRegisterValues = function (interfaceName) {\n if (_this.registerValues)\n return _this.registerValues;\n _this.registerValues = (0, AutoModuleHelpers_1.getRegisterValues)(_this, interfaceName);\n return _this.registerValues;\n };\n this.getInterrupts = function () {\n var _a, _b;\n if (_this.interrupts)\n return _this.interrupts;\n _this.interrupts = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.interrupts;\n return _this.interrupts;\n };\n this.getProperties = function () {\n var _a, _b;\n if (_this.properties)\n return _this.properties;\n _this.properties = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.properties;\n return _this.properties;\n };\n this.getRegisters = function () {\n var _a, _b;\n if (_this.registers)\n return _this.registers;\n _this.registers = (_b = (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral()) === null || _b === void 0 ? void 0 : _b.registers;\n return _this.registers;\n };\n this.getHardware = function (interfaceName) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n interfaceName = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)(interfaceName);\n if (interfaceName) {\n var peripheral_1 = (_c = (_b = (_a = _this.getPrototypeModule()) === null || _a === void 0 ? void 0 : _a.imports) === null || _b === void 0 ? void 0 : _b[interfaceName]) === null || _c === void 0 ? void 0 : _c.payload;\n if (!peripheral_1)\n return undefined;\n return {\n getPeripheral: function () { return peripheral_1; },\n getName: function () { return peripheral_1.name; },\n instanceNumber: Number((_d = peripheral_1.instance) !== null && _d !== void 0 ? _d : peripheral_1.name.replace(peripheral_1.group, \"\")),\n };\n }\n if (!_this.defaultHardware) {\n var peripheralName = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)((_g = (_f = (_e = (0, getConfigData_1.getConfigData)(_this)) === null || _e === void 0 ? void 0 : _e.peripherals) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.interfaceId.name);\n var peripheral_2 = (_k = (_j = (_h = _this.getPrototypeModule()) === null || _h === void 0 ? void 0 : _h.imports) === null || _j === void 0 ? void 0 : _j[peripheralName !== null && peripheralName !== void 0 ? peripheralName : \"\"]) === null || _k === void 0 ? void 0 : _k.payload;\n if (peripheral_2) {\n _this.defaultHardware = {\n getPeripheral: function () {\n return peripheral_2;\n },\n getName: function () { return peripheral_2.name; },\n instanceNumber: Number((_l = peripheral_2.instance) !== null && _l !== void 0 ? _l : peripheral_2.name.replace(peripheral_2.group, \"\")),\n };\n }\n }\n return _this.defaultHardware;\n };\n this.getPeripheralDescription = function () {\n var _a;\n return (_a = _this.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n };\n this.getDerivedData = function () {\n if (_this.derivedData)\n return _this.derivedData;\n _this.derivedData = _this.getDerivedDataFunction(_this);\n return _this.derivedData;\n };\n this.getDerivedFunctions = function () {\n return _this.getDerivedData().getMyFunctions();\n };\n this.getDerivedFunction = function (functionName) {\n var _a, _b;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return (_b = (_a = _this.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[functionName]) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([_a], args, false));\n };\n this.getExportInterfaces = function () {\n if (_this.exportInterfaces)\n return _this.exportInterfaces;\n _this.exportInterfaces = (0, exports_1.createExportInterfaces)(_this.prototype.exports, _this);\n return _this.exportInterfaces;\n };\n this.getImportInterfaces = function () {\n if (_this.importInterfaces)\n return _this.importInterfaces;\n _this.importInterfaces = (0, imports_1.createImportInterfaces)(_this.prototype.imports, _this);\n return _this.importInterfaces;\n };\n this.isControlledByInterface = function (componentName) {\n var _a;\n return ((_a = _this.getExportInterfaces()) === null || _a === void 0 ? void 0 : _a.isControlledByInterface(componentName)) == true;\n };\n this.getAssignedImport = function (importName) {\n var _a;\n if (((_a = _this.prototype.imports) === null || _a === void 0 ? void 0 : _a[importName]) &&\n Processor.isAssigned(_this.prototype.imports[importName])) {\n return _this.prototype.imports[importName];\n }\n return undefined;\n };\n this.getImportValue = function (importName) {\n var _a;\n return (_a = _this.getAssignedImport(importName)) === null || _a === void 0 ? void 0 : _a.payload;\n };\n this.filterImportBySetting = function (populatedImports, importKey, optionFilter) {\n var _a;\n var filteredImports = __assign({}, populatedImports);\n if (populatedImports[importKey]) {\n filteredImports = __assign(__assign({}, filteredImports), (_a = {}, _a[importKey] = Processor.filterOptions(populatedImports[importKey], function (option) {\n return optionFilter(option);\n }), _a));\n }\n return filteredImports;\n };\n this.isComponentValue = function (componentName) {\n var _a;\n var value = _this.getComponentValue(componentName);\n var regex = new RegExp(\"enabled?\");\n var isValue = false;\n if (value) {\n if (typeof value === \"string\") {\n if (value === \"true\") {\n isValue = true;\n }\n else if (value === \"false\") {\n isValue = false;\n }\n else {\n isValue = regex.test((_a = String(value)) === null || _a === void 0 ? void 0 : _a.toLowerCase());\n }\n }\n else if (typeof value === \"boolean\") {\n isValue = value;\n }\n else {\n isValue = false;\n }\n }\n else {\n isValue = false;\n }\n return isValue;\n };\n this.getComponent = function (componentName) {\n return _this.getAutoModuleAppModel().getComponent(componentName);\n };\n this.getPCPHelper = function () {\n if (!_this.pcpHelper) {\n _this.pcpHelper = new PCPHelper_1.PCPHelper();\n _this.pcpHelper.setCallbacks({\n getCompletePinData: function () { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getCompletePinData(_this); },\n getRowData: function (rowData) { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getRowData(_this, rowData); },\n getPinsData: function () { var _a, _b; return (_b = (_a = _this.getDerivedFunctions()).getPinsLogic) === null || _b === void 0 ? void 0 : _b.call(_a).getPinsData(); },\n });\n }\n return _this.pcpHelper;\n };\n this.getTableHelpers = tables_1.getTableHelpers;\n this.prototype = prototype;\n this.getDerivedDataFunction = getDerivedData;\n }\n MyAppModel.prototype.getComponentValue = function (componentName) {\n return this.getAutoModuleAppModel().getComponentValue(componentName);\n };\n return MyAppModel;\n}());\n//# sourceMappingURL=AppModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toDictionary = exports.assertNotNull = exports.map = exports.forEach = exports.values = exports.getKeys = void 0;\n/** @returns the non-prototype keys of the given object */\nvar getKeys = function (obj) {\n return Object.getOwnPropertyNames(obj);\n};\nexports.getKeys = getKeys;\n/**\n * Gets the values of a map as a list\n * @param obj\n * @returns\n */\nvar values = function (obj) {\n return (0, exports.getKeys)(obj).map(function (key) { return obj[key]; });\n};\nexports.values = values;\nvar forEach = function (obj, action) {\n (0, exports.getKeys)(obj).forEach(function (key) { return action(key, obj[key]); });\n};\nexports.forEach = forEach;\nvar map = function (obj, mapper) {\n return (0, exports.getKeys)(obj).map(function (key) { return mapper(key, obj[key]); });\n};\nexports.map = map;\nvar assertNotNull = function (val, msg) {\n if (val == null) {\n throw new Error(msg);\n }\n};\nexports.assertNotNull = assertNotNull;\nvar toDictionary = function (arr, keyMapper, valueMapper) {\n var result = {};\n arr.forEach(function (entry) {\n result[keyMapper(entry)] = valueMapper(entry);\n });\n return result;\n};\nexports.toDictionary = toDictionary;\n//# sourceMappingURL=Utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyAutoModuleAppModel = exports.createAutoModuleAppModel = void 0;\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Utils_1 = require(\"../Utils\");\nvar AutoModuleHelper = __importStar(require(\"./AutoModuleHelpers\"));\nvar getConfigData_1 = require(\"./getConfigData\");\nvar createAutoModuleAppModel = function (model, config) {\n return new MyAutoModuleAppModel(model, config);\n};\nexports.createAutoModuleAppModel = createAutoModuleAppModel;\nvar MyAutoModuleAppModel = /** @class */ (function () {\n function MyAutoModuleAppModel(model, config) {\n var _this = this;\n this.getModuleName = function () {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (_this.moduleName)\n return _this.moduleName;\n _this.moduleName =\n (_h = (_f = (_d = (_c = (_b = (_a = _this.model.getDerivedFunctions()).moduleName) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : _this.model.getComponentValue(\"componentName\")) !== null && _d !== void 0 ? _d : (_e = _this.model.getHardware()) === null || _e === void 0 ? void 0 : _e.getName()) !== null && _f !== void 0 ? _f : (_g = _this.config) === null || _g === void 0 ? void 0 : _g.moduleName) !== null && _h !== void 0 ? _h : \"Module\";\n return _this.moduleName;\n };\n this.getModuleCategory = function () {\n var _a, _b;\n return (_b = (_a = _this.model.getDerivedFunctions()).moduleCategory) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n this.createComponentList = function () {\n var componentList = {};\n var components = _this.getComponentList();\n var componentsWithDynamicDependencySelectors = __spreadArray(__spreadArray([], components, true), _this.getDefaultDependencySelectors(components), true);\n if (componentsWithDynamicDependencySelectors) {\n componentsWithDynamicDependencySelectors.forEach(function (component) {\n componentList[component.name] = {\n component: component,\n };\n });\n }\n return componentList;\n };\n this.getAllComponents = function () { return _this.componentList; };\n this.getComponentList = function () {\n var _a, _b, _c, _d, _e;\n var components = [];\n var config = _this.config;\n if (!config)\n return components;\n //Software Components\n (_b = (0, Utils_1.values)((_a = config.softwareData) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (entry) {\n components.push(entry);\n });\n //Hardware Components\n (_c = config.peripherals) === null || _c === void 0 ? void 0 : _c.forEach(function (peripheral) {\n var _a;\n if (peripheral.registers) {\n (_a = (0, Arrays_1.getKeys)(peripheral.registers)) === null || _a === void 0 ? void 0 : _a.forEach(function (registerName) {\n var _a, _b;\n (_b = (_a = peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName]) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {\n var _a, _b;\n //Only add hardware components that exist at runtime\n var hardwareRegister = (_b = (_a = _this.model.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral().registers) === null || _b === void 0 ? void 0 : _b[registerName];\n if (!(hardwareRegister === null || hardwareRegister === void 0 ? void 0 : hardwareRegister.settings) ||\n hardwareRegister.settings[setting.setting] ||\n hardwareRegister.type === \"register\") {\n components.push(setting);\n }\n });\n });\n }\n });\n //Custom Dynamic Components\n (_e = (_d = _this.model\n .getDerivedFunctions()).getDynamicComponents) === null || _e === void 0 ? void 0 : _e.call(_d).forEach(function (component) {\n components.push(component);\n });\n return components;\n };\n this.getActions = function (component) {\n var _a, _b, _c;\n return ((_c = (_b = (_a = _this.model.getDerivedFunctions()).getActions) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.actions);\n };\n this.getDefaultComponentAction = function (componentName) {\n var _a;\n var component = (_a = _this.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.component;\n return {\n type: \"[FORM] SUBMIT\",\n payload: {\n tabId: \"main\",\n path: \"\".concat(component === null || component === void 0 ? void 0 : component.group, \".\").concat(component === null || component === void 0 ? void 0 : component.name),\n value: \"%v\",\n },\n };\n };\n this.getSoftwareComponentValue = function (tab, component) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined && (component.type === \"time\" || component.type === \"frequency\")) {\n if (overriddenValue.defaultValue) {\n return overriddenValue.defaultValue;\n }\n else {\n return ((_d = (_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) !== null && _d !== void 0 ? _d : component.defaultValue);\n }\n }\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n return processedArg.value;\n }\n }\n return ((_h = (_g = (_f = (_e = _this.state) === null || _e === void 0 ? void 0 : _e[tab]) === null || _f === void 0 ? void 0 : _f[component.group]) === null || _g === void 0 ? void 0 : _g[component.name]) !== null && _h !== void 0 ? _h : AutoModuleHelper.getDefaultValue(_this.model.getDerivedFunctions().overrideDefaultValues, component));\n };\n this.getHardwareComponentValue = function (tab, component, setting) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (!_this.hardware)\n return undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n return processedArg.value;\n }\n }\n var overriddenCompValue = AutoModuleHelper.getOverrideDefaultValue(component, _this.model);\n var value; // value based on priority\n if (((_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) != null) {\n value = _this.state[tab][component.group][component.name];\n }\n else if (overriddenCompValue !== undefined) {\n value = overriddenCompValue;\n }\n else {\n value =\n setting !== undefined\n ? component.overrideDefaultValue\n ? component.overrideDefaultValue\n : _this.getDefaultValue(component.displayOptionSetting, setting)\n : (_d = component.overrideDefaultValue) !== null && _d !== void 0 ? _d : undefined;\n }\n //if filtered mode -> get options\n if (value != undefined && ((_e = component.mode) === null || _e === void 0 ? void 0 : _e.operation) === \"filterOptions\") {\n var options = AutoModuleHelper.getSettingOptionsIfPresent(component, setting, (_g = _this.model.getComponent((_f = component.mode) === null || _f === void 0 ? void 0 : _f.masterComponent)) === null || _g === void 0 ? void 0 : _g.value);\n if (options.indexOf(value) == -1) {\n value = options[0];\n }\n }\n return value;\n };\n this.getHardwareComponentBooleanValue = function (tab, component, setting) {\n var _a, _b, _c;\n if (!_this.hardware)\n return undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue != undefined) {\n return overriddenValue;\n }\n if (_this.model.isControlledByInterface(component.name)) {\n var processedArg = _this.model\n .getExportInterfaces()\n .getProcessedArgValue(component.name);\n if (processedArg != undefined) {\n if (setting &&\n setting.options &&\n typeof processedArg.value === \"boolean\") {\n var result_1 = \"\";\n if (processedArg.value === true) {\n var settingOptions = setting.options;\n settingOptions.forEach(function (eachOption) {\n if (eachOption.alias.toLowerCase().startsWith(\"enable\")) {\n result_1 = eachOption.alias;\n }\n });\n }\n else if (processedArg.value === false) {\n setting.options.forEach(function (eachOption) {\n if (eachOption.alias.toLowerCase().startsWith(\"disable\")) {\n result_1 = eachOption.alias;\n }\n });\n }\n return result_1;\n }\n return processedArg.value;\n }\n }\n var overriddenCompValue = AutoModuleHelper.getOverrideDefaultValue(component, _this.model);\n return ((_c = (_b = (_a = _this.state) === null || _a === void 0 ? void 0 : _a[tab]) === null || _b === void 0 ? void 0 : _b[component.group]) === null || _c === void 0 ? void 0 : _c[component.name]) != null\n ? _this.state[tab][component.group][component.name]\n ? _this.config.booleanValues.true\n : _this.config.booleanValues.false\n : overriddenCompValue !== undefined\n ? overriddenCompValue\n : setting !== undefined\n ? component.overrideDefaultValue\n ? component.overrideDefaultValue\n : _this.getDefaultValue(component.displayOptionSetting, setting)\n : undefined;\n };\n this.getDependencyComponentValue = function (component) {\n var dependencySelector = new AutoModuleHelper.DependencySelector(_this.model, component);\n var imp = _this.model.getImports()[component.importId];\n if (imp === null || imp === void 0 ? void 0 : imp.handle) {\n return dependencySelector.createOptionLabel(imp.handle, imp.payload);\n }\n return \"None\";\n };\n this.getFileLoadComponentValue = function (component) {\n var _a;\n var fileContents;\n fileContents = (_a = _this.model.getPrototypeModule().loadedFiles) === null || _a === void 0 ? void 0 : _a[component.name];\n return fileContents;\n };\n this.getFileSaveComponentValue = function (component) {\n var _a;\n var fileContents = undefined;\n var overriddenValue = _this.model.getDerivedFunction(component.name);\n if (overriddenValue !== undefined) {\n fileContents = overriddenValue;\n }\n else {\n fileContents = (_a = component.fileMeta) === null || _a === void 0 ? void 0 : _a.defaultContent;\n }\n return fileContents;\n };\n this.getDefaultValue = function (optionType, setting) {\n var _a;\n if (optionType == undefined)\n return setting.defaultValue;\n if (setting.defaultValue) {\n return (_a = (0, Setting_1.getOptionByName)(setting.defaultValue, setting)) === null || _a === void 0 ? void 0 : _a[optionType];\n }\n return undefined;\n };\n this.model = model;\n this.state = this.model.getState();\n this.hardware = this.model.getHardware();\n this.config = (0, getConfigData_1.getConfigData)(model);\n this.componentList = this.createComponentList();\n }\n MyAutoModuleAppModel.prototype.getDefaultDependencySelectors = function (components) {\n var dynamicDependencySelectors = [];\n var defaultTab = \"main\";\n var defaultGroup = \"software\";\n if (components.length > 0) {\n defaultTab = components[0].tabs[0];\n defaultGroup = components[0].group;\n }\n var imports = this.model.getImports();\n if (imports) {\n var importedNames = Object.keys(imports);\n importedNames.forEach(function (name) {\n var _a;\n var dependencySelectors = components.filter(function (component) {\n return component[\"importId\"] && component[\"importId\"] === name;\n });\n if (dependencySelectors.length === 0) {\n dynamicDependencySelectors.push({\n name: name + \" dependency selector\",\n importId: name,\n category: \"import\",\n type: \"ComboBox\",\n description: name + \" dependency selector\",\n group: defaultGroup,\n tabs: [defaultTab],\n uiBehavior: (_a = {},\n _a[\"ui:widget\"] = \"hidden\",\n _a),\n });\n }\n });\n }\n return dynamicDependencySelectors;\n };\n MyAutoModuleAppModel.prototype.isComponent = function (componentName) {\n var _a;\n var component = (_a = this.componentList[componentName]) === null || _a === void 0 ? void 0 : _a.component;\n var componentValue = this.getComponentValue(componentName);\n if (component.category === \"software\") {\n if (component.type === \"boolean\") {\n return this.getComponentValue(componentName);\n }\n return componentValue !== undefined;\n }\n else if (component.category === \"hardware\") {\n return componentValue === this.config.booleanValues.true;\n }\n return undefined;\n };\n MyAutoModuleAppModel.prototype.getComponentValue = function (componentName) {\n var _a;\n return (_a = this.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.value;\n };\n MyAutoModuleAppModel.prototype.getComponent = function (componentName) {\n var _this = this;\n var _a, _b;\n if (((_a = this.componentList[componentName]) === null || _a === void 0 ? void 0 : _a.value) != undefined)\n return this.componentList[componentName];\n var component = (_b = this.componentList[componentName]) === null || _b === void 0 ? void 0 : _b.component;\n component === null || component === void 0 ? void 0 : component.tabs.forEach(function (tab) {\n if (component) {\n if (component.category === \"software\") {\n _this.componentList[componentName].value =\n _this.getSoftwareComponentValue(tab, component);\n }\n else if (component.category === \"hardware\") {\n var setting = AutoModuleHelper.getSettingFromComponent(_this.model, component);\n if (component.type === \"boolean\") {\n _this.componentList[componentName].value =\n _this.getHardwareComponentBooleanValue(tab, component, setting);\n }\n else {\n _this.componentList[componentName].value =\n _this.getHardwareComponentValue(tab, component, setting);\n }\n }\n else if (component.category === \"import\") {\n _this.componentList[componentName].value =\n _this.getDependencyComponentValue(component);\n }\n else if (component.category === \"file_load\") {\n _this.componentList[componentName].value =\n _this.getFileLoadComponentValue(component);\n }\n else if (component.category === \"file_save\") {\n _this.componentList[componentName].value =\n _this.getFileSaveComponentValue(component);\n }\n _this.componentList[componentName].component.actions =\n _this.getActions(component);\n }\n });\n return this.componentList[componentName];\n };\n return MyAutoModuleAppModel;\n}());\nexports.MyAutoModuleAppModel = MyAutoModuleAppModel;\n//# sourceMappingURL=AutoModuleAppModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isFullyAssigned = exports.createPrototypeImport = void 0;\nvar Processor_1 = require(\"@microchip/scf-common/lib/Processor\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar AutoModuleHelpers_1 = require(\"./AutoModuleHelpers\");\nvar createPrototypeImport = function (interfaceName, config) {\n var _a, _b;\n return (_b = (_a = config === null || config === void 0 ? void 0 : config.imports) === null || _a === void 0 ? void 0 : _a[interfaceName]) === null || _b === void 0 ? void 0 : _b.import;\n};\nexports.createPrototypeImport = createPrototypeImport;\nvar isFullyAssigned = function (imports, config) {\n var _a;\n //get peripheral interfaces.\n var interfaces = getHardwareInterfaces((_a = config === null || config === void 0 ? void 0 : config.peripherals) !== null && _a !== void 0 ? _a : []);\n for (var i = 0; i < interfaces.length; i++) {\n var imp = imports === null || imports === void 0 ? void 0 : imports[interfaces[i]];\n if (!imp || !(0, Processor_1.isAssigned)(imp)) {\n return false;\n }\n }\n return true;\n};\nexports.isFullyAssigned = isFullyAssigned;\n//Assumes hardware import keys are the same as the interface IDs\nvar getHardwareInterfaces = function (peripherals) {\n var interfaces = (0, Arrays_1.map)(peripherals, function (peripheral) {\n var _a;\n return (_a = (0, AutoModuleHelpers_1.getFriendlyInterfaceId)(peripheral.interfaceId.name)) !== null && _a !== void 0 ? _a : \"\";\n });\n return interfaces;\n};\n//# sourceMappingURL=AutoModuleHardware.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFriendlyInterfaceId = exports.getModuleDefaultDescription = exports.DependencySelector = exports.populateLoadedFiles = exports.getProcessedHandle = exports.filterModeOptions = exports.getSettingOptionsIfPresent = exports.getOverrideDefaultValue = exports.getSettingDefaultIfPresent = exports.getOptionValueByName = exports.getSettingFromComponent = exports.getSettingBits = exports.getRegisterValues = exports.hasConfigBits = exports.getComboOptions = exports.getDefaultValue = exports.castComponent = void 0;\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Utils_1 = require(\"../Utils\");\nvar getConfigData_1 = require(\"./getConfigData\");\nvar castComponent = function (component) {\n switch (component.category) {\n case \"software\":\n return component;\n case \"import\":\n return component;\n case \"hardware\":\n return component;\n default:\n throw Error(\"Unsupported Component Type\");\n }\n};\nexports.castComponent = castComponent;\nvar getDefaultValue = function (overrideDefaultValues, component) {\n var _a;\n return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(component.name)) !== null && _a !== void 0 ? _a : (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue));\n};\nexports.getDefaultValue = getDefaultValue;\nvar getComboOptions = function (overrideOptions, component) {\n var _a, _b;\n return (_a = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(component.name)) !== null && _a !== void 0 ? _a : (_b = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _b === void 0 ? void 0 : _b[\"options\"];\n};\nexports.getComboOptions = getComboOptions;\nvar hasConfigBits = function (interfaceName) {\n var _a;\n return ((_a = (0, exports.getFriendlyInterfaceId)(interfaceName)) === null || _a === void 0 ? void 0 : _a.indexOf(\"configuration_bits\")) != -1;\n};\nexports.hasConfigBits = hasConfigBits;\nvar getRegisterValues = function (model, interfaceName) {\n var _a;\n var registers = {};\n var config = (0, getConfigData_1.getConfigData)(model);\n interfaceName = (0, exports.getFriendlyInterfaceId)(interfaceName);\n (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {\n var _a, _b, _c;\n var peripheralName = (_a = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name)) !== null && _a !== void 0 ? _a : \"\";\n if ((0, exports.hasConfigBits)(peripheralName))\n return;\n if ((interfaceName != undefined && peripheralName !== interfaceName) ||\n !peripheral.registers)\n return;\n (_c = (0, Utils_1.getKeys)((_b = peripheral.registers) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (regName) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var registerValue;\n var reg = (_b = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral().registers) === null || _b === void 0 ? void 0 : _b[regName];\n if (reg) {\n registerValue = {\n comment: \"\",\n value: 0,\n valueAsHex: \"0x00\",\n name: reg === null || reg === void 0 ? void 0 : reg.name,\n alias: (_c = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _c !== void 0 ? _c : reg === null || reg === void 0 ? void 0 : reg.name,\n settings: {},\n };\n }\n else {\n return;\n }\n var registerVal = CalculateRegisterValue_1.default.for(reg);\n var comments = [];\n (_d = peripheral.registers) === null || _d === void 0 ? void 0 : _d[regName].forEach(function (set) {\n var _a, _b, _c, _d, _e;\n var setting = (_a = reg.settings) === null || _a === void 0 ? void 0 : _a[set.setting];\n if (setting) {\n if (setting.type !== \"R\") {\n //Add Comments\n comments.push(\"\".concat(set.setting, \" \").concat(model.getComponentValue(set.name), \"; \"));\n }\n if (registerValue === null || registerValue === void 0 ? void 0 : registerValue.settings) {\n registerValue.settings[setting.alias] = (0, exports.getSettingBits)(reg, setting, (_b = model.getComponent(set.name)) === null || _b === void 0 ? void 0 : _b.value, (_c = config === null || config === void 0 ? void 0 : config.deviceType) !== null && _c !== void 0 ? _c : \"PIC\");\n }\n switch (set.type) {\n case \"ComboBox\":\n case \"boolean\":\n registerVal.withNumberValue(setting, (_e = (0, exports.getOptionValueByName)(setting, (_d = model.getComponent(set.name)) === null || _d === void 0 ? void 0 : _d.value)) !== null && _e !== void 0 ? _e : 0);\n break;\n case \"number\":\n registerVal.withNumberValue(setting, model.getComponentValue(set.name));\n break;\n case \"register\":\n case \"string\":\n registerVal.withNumberValue(setting, Number(model.getComponentValue(set.name)));\n break;\n default:\n break;\n }\n }\n });\n if (reg.settings) {\n registerValue.value = registerVal.asNumber();\n }\n else {\n registerValue.value = Number((_j = model.getComponentValue((_h = (_g = (_f = (_e = peripheral.registers) === null || _e === void 0 ? void 0 : _e[regName]) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.name) !== null && _h !== void 0 ? _h : \"\")) !== null && _j !== void 0 ? _j : 0);\n comments.push(\"\".concat(registerValue.name, \" \").concat(registerValue.value, \"; \"));\n }\n registerValue.valueAsHex =\n \"0x\" + registerValue.value.toString(16).toUpperCase();\n registerValue.comment = sortComments(comments, reg);\n registers[(_k = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _k !== void 0 ? _k : reg.name] = registerValue;\n });\n });\n return registers;\n};\nexports.getRegisterValues = getRegisterValues;\nvar sortComments = function (comments, register) {\n comments.sort(function (a, b) {\n var _a, _b, _c, _d;\n var settingA = (_a = register.settings) === null || _a === void 0 ? void 0 : _a[(_b = a.split[\" \"]) === null || _b === void 0 ? void 0 : _b[0]];\n var settingB = (_c = register.settings) === null || _c === void 0 ? void 0 : _c[(_d = b.split(\" \")) === null || _d === void 0 ? void 0 : _d[0]];\n return Number(settingB === null || settingB === void 0 ? void 0 : settingB.mask) - Number(settingA === null || settingA === void 0 ? void 0 : settingA.mask);\n });\n return comments.join(\"\");\n};\nvar getSettingBits = function (register, setting, value, deviceType) {\n var _a;\n var option = (0, Setting_1.getOptionByAlias)(value, setting);\n var setValNumber = Number((_a = option === null || option === void 0 ? void 0 : option.value) !== null && _a !== void 0 ? _a : 0);\n var settingValue = {\n alias: setting.alias,\n name: setting.name,\n value: setValNumber !== null && setValNumber !== void 0 ? setValNumber : 0,\n valueAsHex: \"0x\" + setValNumber.toString(16).toUpperCase(),\n valueAsDescription: value,\n type: setting.type,\n optionName: option === null || option === void 0 ? void 0 : option.name,\n bitName: deviceType === \"PIC\"\n ? \"\".concat(register.name, \"bits.\").concat(setting.name)\n : \"\".concat(register.name, \".\").concat(setting.name),\n };\n return settingValue;\n};\nexports.getSettingBits = getSettingBits;\nvar getRegisterFromComponent = function (hardware, component) {\n var _a, _b, _c, _d, _e;\n var registerName = (_a = component.name\n .replace(component.setting.toLowerCase(), \"\")) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n var register = (_b = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _b === void 0 ? void 0 : _b[registerName];\n if (register) {\n return register;\n }\n else {\n var regName = (_c = component.name\n .replace(component.setting.toLowerCase(), \"\")) === null || _c === void 0 ? void 0 : _c.toUpperCase();\n var registers = (0, Utils_1.getKeys)((_d = hardware === null || hardware === void 0 ? void 0 : hardware.registers) !== null && _d !== void 0 ? _d : {});\n for (var _i = 0, _f = registers !== null && registers !== void 0 ? registers : []; _i < _f.length; _i++) {\n var reg = _f[_i];\n var modifiedRegName = reg.replace(/_/g, \"\");\n if (regName === modifiedRegName) {\n return (_e = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _e === void 0 ? void 0 : _e[reg];\n }\n }\n }\n};\nvar getSettingFromComponent = function (model, component) {\n var _a;\n var config = (0, getConfigData_1.getConfigData)(model);\n var setting;\n if (model) {\n (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {\n var _a, _b, _c;\n if (setting)\n return;\n var peripheralName = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name);\n var hardware = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n var register = getRegisterFromComponent(hardware, component);\n if (register && !register.settings) {\n //No settings for this particular register. Create one\n setting = {\n alias: (_b = register.alias) !== null && _b !== void 0 ? _b : register.name,\n name: register.name,\n defaultValue: register.defaultValue,\n type: register.type,\n description: register.desc,\n porDefault: register.defaultValue,\n };\n }\n else {\n setting = (_c = register === null || register === void 0 ? void 0 : register.settings) === null || _c === void 0 ? void 0 : _c[component.setting];\n }\n });\n }\n return setting;\n};\nexports.getSettingFromComponent = getSettingFromComponent;\nvar getOptionValueByName = function (setting, optionName) {\n if (!setting)\n return undefined;\n var optionValue = setting.porDefault;\n if (setting.options) {\n setting.options.forEach(function (option) {\n if (option.name === optionName || option.description === optionName) {\n optionValue = option.value;\n }\n });\n }\n return Number(optionValue);\n};\nexports.getOptionValueByName = getOptionValueByName;\nvar getSettingDefaultIfPresent = function (component, setting, overrideDefaultValue) {\n var _a, _b;\n var defaultValue;\n if (overrideDefaultValue !== undefined) {\n return overrideDefaultValue;\n }\n if (component.overrideDefaultValue) {\n return component.overrideDefaultValue;\n }\n if (setting === null || setting === void 0 ? void 0 : setting.defaultValue) {\n var option = (0, Setting_1.getOptionByName)(setting.defaultValue, setting);\n defaultValue =\n (_b = option === null || option === void 0 ? void 0 : option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : \"alias\"]) !== null && _b !== void 0 ? _b : setting.defaultValue;\n }\n return defaultValue;\n};\nexports.getSettingDefaultIfPresent = getSettingDefaultIfPresent;\nvar getOverrideDefaultValue = function (component, model) {\n var _a, _b;\n return (_b = (_a = model.getDerivedFunctions()).overrideDefaultValues) === null || _b === void 0 ? void 0 : _b.call(_a, component.name);\n};\nexports.getOverrideDefaultValue = getOverrideDefaultValue;\nvar getSettingOptionsIfPresent = function (component, setting, masterComponentValue) {\n var _a;\n var options = [\"\"];\n if (setting) {\n var filteredOptions = component.mode\n ? (0, exports.filterModeOptions)((_a = setting.options) !== null && _a !== void 0 ? _a : [], component, masterComponentValue)\n : setting.options;\n options = (0, Arrays_1.map)(filteredOptions !== null && filteredOptions !== void 0 ? filteredOptions : [], function (option) { var _a, _b; return (_b = option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : \"alias\"]) !== null && _b !== void 0 ? _b : option.alias; });\n }\n return options;\n};\nexports.getSettingOptionsIfPresent = getSettingOptionsIfPresent;\nvar filterModeOptions = function (options, component, masterComponentValue) {\n var _a, _b, _c, _d;\n if (((_a = component.mode) === null || _a === void 0 ? void 0 : _a.operation) != \"filterOptions\" || masterComponentValue == undefined)\n return options;\n //Determine mode\n var mode = (0, Arrays_1.find)((_d = (0, Utils_1.getKeys)((_c = (_b = component.mode) === null || _b === void 0 ? void 0 : _b.optionModes) !== null && _c !== void 0 ? _c : {})) !== null && _d !== void 0 ? _d : [], function (mode) {\n var _a, _b, _c, _d;\n var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];\n if (match) {\n return ((_d = (_c = masterComponentValue === null || masterComponentValue === void 0 ? void 0 : masterComponentValue.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;\n }\n return false;\n });\n // optionModes : when Key value are not same\n if (mode === undefined) {\n mode = masterComponentValue;\n }\n var filteredOptions = (0, Arrays_1.filter)(options !== null && options !== void 0 ? options : [], function (option) {\n var _a, _b, _c, _d;\n if (option.mode && mode) {\n var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];\n if (match) {\n return ((_d = (_c = option.mode.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;\n }\n }\n return true;\n });\n return filteredOptions;\n};\nexports.filterModeOptions = filterModeOptions;\nvar getProcessedHandle = function (handle, payload) {\n var _a, _b, _c, _d;\n if (handle) {\n handle = __assign(__assign({}, handle), { label: (_d = (_c = (_b = (_a = handle === null || handle === void 0 ? void 0 : handle.label) !== null && _a !== void 0 ? _a : payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _b !== void 0 ? _b : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _c !== void 0 ? _c : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _d !== void 0 ? _d : handle.providerId + \" : \" + handle.exportId });\n }\n return handle;\n};\nexports.getProcessedHandle = getProcessedHandle;\nvar populateLoadedFiles = function (processedOutput) {\n var _a;\n var result = __assign({}, processedOutput);\n var consolidatedFiles = {};\n //pushing all the inmemory files provided from Melody\n if (result.loadedFiles !== undefined) {\n for (var eachFileId in result.loadedFiles) {\n var eachFile = result.loadedFiles[eachFileId];\n consolidatedFiles[eachFileId] = eachFile;\n }\n }\n //pushing all the instate files stored in state(project) - NOTE: if same fileId exists in state and memory then state will be given priority\n if (((_a = result.state) === null || _a === void 0 ? void 0 : _a.loadedFiles) !== undefined) {\n for (var eachFileId in result.state.loadedFiles) {\n var eachFile = result.state.loadedFiles[eachFileId];\n consolidatedFiles[eachFileId] = eachFile;\n }\n }\n result.loadedFiles = consolidatedFiles;\n return result;\n};\nexports.populateLoadedFiles = populateLoadedFiles;\nvar DependencySelector = /** @class */ (function () {\n function DependencySelector(model, component) {\n var _this = this;\n this.noneSelection = { label: \"None\" };\n this.createOptionEntry = function (option) {\n return {\n label: _this.createOptionLabel(option.handle, option.payload),\n value: option,\n };\n };\n this.createOptionLabel = function (handle, payload) {\n var _a, _b;\n return (_b = (_a = (0, exports.getProcessedHandle)(handle, payload)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : \"\";\n };\n this.model = model;\n this.component = component;\n }\n DependencySelector.prototype.generateDropdownOptions = function () {\n var dropdownOptions = [];\n var thisImport = this.model.getImports()[this.component.importId];\n var options = thisImport === null || thisImport === void 0 ? void 0 : thisImport.options;\n if (this.shouldAllowUnselectDependency(thisImport, options)) {\n dropdownOptions.push(this.noneSelection);\n }\n if (options !== undefined) {\n for (var option in options) {\n dropdownOptions.push(this.createOptionEntry(options[option]));\n }\n }\n return dropdownOptions;\n };\n DependencySelector.prototype.getDropdownOptionNames = function () {\n var names = [];\n this.generateDropdownOptions().forEach(function (option) { return names.push(option.label); });\n return names;\n };\n DependencySelector.prototype.shouldAllowUnselectDependency = function (thisImport, options) {\n return thisImport != undefined && thisImport.isUnassignable != false;\n };\n return DependencySelector;\n}());\nexports.DependencySelector = DependencySelector;\nfunction getModuleDefaultDescription() {\n //TODO: Need to refactor this so that gets it from the source.\n //Alternatively, we could get it during the automodule update process and fetch it from there...\n return undefined;\n}\nexports.getModuleDefaultDescription = getModuleDefaultDescription;\nvar getFriendlyInterfaceId = function (interfaceName) {\n interfaceName = interfaceName === null || interfaceName === void 0 ? void 0 : interfaceName.replace(/ /g, \"\").replace(/-/g, \"_\");\n return interfaceName;\n};\nexports.getFriendlyInterfaceId = getFriendlyInterfaceId;\n//# sourceMappingURL=AutoModuleHelpers.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConfigBits = exports.getTemplateSettings = exports.getTemplatePayload = exports.getTemplates = void 0;\nvar AutoModuleHelper = __importStar(require(\"./AutoModuleHelpers\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar getConfigData_1 = require(\"./getConfigData\");\nvar Utils_1 = require(\"../Utils\");\nvar AutoModuleHardware_1 = require(\"./AutoModuleHardware\");\nvar AutoModuleHelpers_1 = require(\"./AutoModuleHelpers\");\nvar getTemplates = function (model) {\n var _a;\n var config = (0, getConfigData_1.getConfigData)(model);\n var templates = [];\n (_a = config === null || config === void 0 ? void 0 : config.templates) === null || _a === void 0 ? void 0 : _a.forEach(function (template) {\n var _a, _b, _c;\n var newTemplate = __assign({}, template);\n if (!model)\n return;\n newTemplate.dest =\n (_c = (_b = (_a = model.getDerivedFunctions()).templateName) === null || _b === void 0 ? void 0 : _b.call(_a, newTemplate.src)) !== null && _c !== void 0 ? _c : newTemplate.dest;\n newTemplate.dest = newTemplate.dest.replace(\"${sourceFileName}\", model.getName().toLowerCase() + \".c\");\n newTemplate.dest = newTemplate.dest.replace(\"${headerFileName}\", model.getName().toLowerCase() + \".h\");\n if (shouldGenerate(newTemplate, model)) {\n templates.push(newTemplate);\n }\n });\n return templates;\n};\nexports.getTemplates = getTemplates;\nvar shouldGenerate = function (template, model) {\n var shouldGenerate = true;\n if (!model)\n return shouldGenerate;\n if (shouldGenerate &&\n template.generateWithHardware == true &&\n !(0, AutoModuleHardware_1.isFullyAssigned)(model.getPrototypeModule().imports, (0, getConfigData_1.getConfigData)(model))) {\n shouldGenerate = false;\n }\n if (shouldGenerate &&\n template.isGeneratableProperty &&\n model.getDerivedFunction(template.isGeneratableProperty) != true) {\n shouldGenerate = false;\n }\n return shouldGenerate;\n};\nvar getTemplatePayload = function (model) {\n var _a;\n if (!model)\n return undefined;\n var config = (0, getConfigData_1.getConfigData)(model);\n var moduleName = model.getName();\n var templatePayload = {\n name: {\n uppercase: moduleName.toUpperCase(),\n lowercase: moduleName.toLowerCase(),\n instance: moduleName,\n },\n filename: {\n source: \"\".concat(moduleName.toLowerCase(), \".c\"),\n header: \"\".concat(moduleName.toLowerCase(), \".h\"),\n },\n };\n var components = model\n .getAutoModuleAppModel()\n .getAllComponents();\n (_a = (0, Utils_1.values)(components)) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {\n templatePayload[entry.component.name] = getComponentPayload(entry.component, model);\n });\n templatePayload = __assign(__assign({}, templatePayload), (0, exports.getTemplateSettings)(model, config));\n return templatePayload;\n};\nexports.getTemplatePayload = getTemplatePayload;\nvar getTemplateSettings = function (model, config) {\n var _a, _b;\n if (!(model === null || model === void 0 ? void 0 : model.getHardware()))\n return undefined;\n return {\n registers: model.getRegisterValues(undefined),\n interrupts: (_a = model.getHardware()) === null || _a === void 0 ? void 0 : _a.getPeripheral().interrupts,\n properties: (_b = model.getHardware()) === null || _b === void 0 ? void 0 : _b.getPeripheral().properties,\n };\n};\nexports.getTemplateSettings = getTemplateSettings;\nvar getConfigBits = function (model) {\n var _a, _b, _c;\n var config = (0, getConfigData_1.getConfigData)(model);\n var configModule = (0, Arrays_1.find)((_a = config === null || config === void 0 ? void 0 : config.peripherals) !== null && _a !== void 0 ? _a : [], function (peripheral) {\n return AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name);\n });\n if (configModule) {\n var interfaceName = AutoModuleHelper.getFriendlyInterfaceId(configModule.interfaceId.name);\n var templateConfigBits_1 = {};\n var registers_1 = (_b = model.getHardware(interfaceName)) === null || _b === void 0 ? void 0 : _b.getPeripheral().registers;\n (_c = (0, Utils_1.getKeys)(registers_1 !== null && registers_1 !== void 0 ? registers_1 : [])) === null || _c === void 0 ? void 0 : _c.forEach(function (configName) {\n var _a;\n var _b;\n var configBits = (_b = configModule.registers) === null || _b === void 0 ? void 0 : _b[configName];\n templateConfigBits_1 = __assign(__assign({}, templateConfigBits_1), (_a = {}, _a[configName] = {}, _a));\n configBits === null || configBits === void 0 ? void 0 : configBits.forEach(function (configBit) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n var register = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName];\n var value;\n if (register && !register.settings) {\n //missing settings for register\n value = (_b = (_a = model.getComponent(configBit.name)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : \"\";\n }\n else {\n var setting = (_d = (_c = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName]) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d[configBit.setting];\n value =\n (_k = (_j = (_g = (_f = (0, Arrays_1.find)((_e = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _e !== void 0 ? _e : [], function (option) {\n var _a, _b, _c;\n return option.description ===\n ((_a = model.getComponent(configBit.name)) === null || _a === void 0 ? void 0 : _a.value) ||\n option.alias ===\n ((_b = model.getComponent(configBit.name)) === null || _b === void 0 ? void 0 : _b.value) ||\n option.name === ((_c = model.getComponent(configBit.name)) === null || _c === void 0 ? void 0 : _c.value);\n })) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : (_h = model.getComponent(configBit.name)) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : setting === null || setting === void 0 ? void 0 : setting.defaultValue) !== null && _k !== void 0 ? _k : \"\";\n }\n templateConfigBits_1[configName][configBit.setting] = {\n name: configBit.setting,\n value: value,\n description: configBit.description,\n valueAsDescription: (_l = model.getComponent(configBit.name)) === null || _l === void 0 ? void 0 : _l.value,\n };\n });\n });\n return templateConfigBits_1;\n }\n else {\n return {};\n }\n};\nexports.getConfigBits = getConfigBits;\nvar getComponentPayload = function (component, model) {\n var _a, _b;\n var componentValue = model.getComponentValue(component.name);\n switch (component.type) {\n case \"ComboBox\":\n if (component.category === \"hardware\") {\n var setting = AutoModuleHelper.getSettingFromComponent(model, component);\n return {\n value: componentValue,\n options: AutoModuleHelper.getSettingOptionsIfPresent(component, setting, model.getComponentValue((_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.masterComponent) !== null && _b !== void 0 ? _b : \"\")),\n };\n }\n else if (component.category === \"software\") {\n return {\n value: componentValue,\n options: (0, AutoModuleHelpers_1.getComboOptions)(model.getDerivedFunctions().overrideOptions, component),\n };\n }\n break;\n case \"boolean\":\n return model.isComponentValue(component.name);\n case \"number\":\n case \"string\":\n case \"register\":\n default:\n return componentValue;\n }\n};\n//# sourceMappingURL=AutoModuleTemplates.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAutoSdlHelp = void 0;\n/**\n * Returns the valid link for each component of a module\n *\n * @param dataModel - AppModel for current module\n * @param componentName - Current component under the module\n * @param helpUrl - Generic url\n * @returns Valid link to microchip docs\n */\nvar getAutoSdlHelp = function (dataModel, componentName, helpUrl) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\n var deviceMeta = dataModel.getImportValue(\"device_meta\");\n var deviceName = (_a = deviceMeta === null || deviceMeta === void 0 ? void 0 : deviceMeta.deviceName) !== null && _a !== void 0 ? _a : \"\";\n var moduleName = (_d = (_c = (_b = dataModel.getHardware()) === null || _b === void 0 ? void 0 : _b.getPeripheral()) === null || _c === void 0 ? void 0 : _c.group) !== null && _d !== void 0 ? _d : \"\";\n var dosid = (_g = (_f = (_e = dataModel.getHardware()) === null || _e === void 0 ? void 0 : _e.getPeripheral()) === null || _f === void 0 ? void 0 : _f.dosid) !== null && _g !== void 0 ? _g : \"\";\n var comp = (_j = (_h = dataModel.getComponent(componentName)) === null || _h === void 0 ? void 0 : _h.component) !== null && _j !== void 0 ? _j : \"\";\n var setting = (_l = (_k = comp === null || comp === void 0 ? void 0 : comp.setting) === null || _k === void 0 ? void 0 : _k.toLowerCase()) !== null && _l !== void 0 ? _l : \"\";\n var registerName = componentName.toLowerCase().replace(setting, \"\");\n var registerAlias = (_m = registerName === null || registerName === void 0 ? void 0 : registerName.toUpperCase()) !== null && _m !== void 0 ? _m : \"\";\n var deviceRegister = (_r = (_q = (_p = (_o = dataModel.getPeripheralDescription()) === null || _o === void 0 ? void 0 : _o.registers) === null || _p === void 0 ? void 0 : _p[registerAlias]) === null || _q === void 0 ? void 0 : _q.name) !== null && _r !== void 0 ? _r : \"\";\n var register = registerAlias == deviceRegister ? registerAlias : deviceRegister;\n var url = helpUrl\n .replace(\"${deviceName}\", deviceName !== null && deviceName !== void 0 ? deviceName : \"\")\n .replace(\"${registerName}\", register !== null && register !== void 0 ? register : \"\")\n .replace(\"${moduleName}\", moduleName !== null && moduleName !== void 0 ? moduleName : \"\")\n .replace(\"${dosId}\", dosid !== null && dosid !== void 0 ? dosid : \"\");\n return url;\n};\nexports.getAutoSdlHelp = getAutoSdlHelp;\n//# sourceMappingURL=ContextualHelp.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFreqCompSchema = exports.isFrequencyComponent = exports.isFreqUnitInState = exports.isFreqValueInState = exports.isFreqComponentInState = exports.getFreqCompFormData = void 0;\nvar getFreqCompFormData = function (model, component, tab) {\n var _a;\n var componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit\n };\n if (component.frequencyMeta) {\n // Min value update\n if (component.frequencyMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: component.frequencyMeta.min.value,\n unit: component.frequencyMeta.min.unit\n } });\n }\n // Max value update\n if (component.frequencyMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: component.frequencyMeta.max.value,\n unit: component.frequencyMeta.max.unit\n } });\n }\n // Options update\n if (component.frequencyMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: component.frequencyMeta.unitOptions });\n }\n }\n // Form data updation based on dynamic data\n var updatedFreqComp = (model.getDerivedFunctions() && model.getDerivedFunctions()[component.name] != null) ? (_a = model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[component.name]() : undefined;\n if (updatedFreqComp) {\n // Default value update\n if (updatedFreqComp.defaultValue) {\n componentValue = __assign(__assign({}, componentValue), { value: updatedFreqComp.defaultValue.value, unit: updatedFreqComp.defaultValue.unit });\n }\n // Min, Max and Options update\n if (updatedFreqComp.frequencyMeta) {\n if (updatedFreqComp.frequencyMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: updatedFreqComp.frequencyMeta.min.value,\n unit: updatedFreqComp.frequencyMeta.min.unit,\n } });\n }\n if (updatedFreqComp.frequencyMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: updatedFreqComp.frequencyMeta.max.value,\n unit: updatedFreqComp.frequencyMeta.max.unit,\n } });\n }\n if (updatedFreqComp.frequencyMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: updatedFreqComp.frequencyMeta.unitOptions });\n }\n }\n }\n if (!isFreqComponentInState(model, component, tab)) {\n return componentValue;\n }\n else {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n if (isFreqValueInState(model, component, tab)) {\n var valueChanged = tabState[component.group][component.name].value;\n componentValue = __assign(__assign({}, componentValue), { value: valueChanged });\n }\n if (isFreqUnitInState(model, component, tab)) {\n var unitChanged = tabState[component.group][component.name].unit;\n componentValue = __assign(__assign({}, componentValue), { unit: unitChanged });\n }\n return componentValue;\n }\n};\nexports.getFreqCompFormData = getFreqCompFormData;\nfunction isFreqComponentInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isFreqComponentInState = isFreqComponentInState;\nfunction isFreqValueInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].value);\n}\nexports.isFreqValueInState = isFreqValueInState;\nfunction isFreqUnitInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].unit);\n}\nexports.isFreqUnitInState = isFreqUnitInState;\nfunction isFrequencyComponent(component) {\n return (component.category === \"software\" &&\n component.type === \"frequency\");\n}\nexports.isFrequencyComponent = isFrequencyComponent;\nfunction getFreqCompSchema(component, derivedFunctions) {\n var _a, _b;\n //Schema creation with static moduleConfig data\n var schema = {\n type: \"object\",\n $id: \"frequency\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n properties: {\n value: {\n type: \"number\",\n default: component.defaultValue.value,\n },\n unit: {\n type: \"string\",\n default: component.defaultValue.unit,\n }\n },\n };\n if (component.frequencyMeta) {\n // Min value update\n if (component.frequencyMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.frequencyMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: component.frequencyMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value update\n if (component.frequencyMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.frequencyMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: component.frequencyMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (component.frequencyMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: component.frequencyMeta.unitOptions,\n }\n } }) });\n }\n }\n //Schema updation based on dynamic data\n var updatedFreqComp = (derivedFunctions && derivedFunctions[component.name] != null) ? derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name]() : undefined;\n if (updatedFreqComp) {\n // description update\n if (updatedFreqComp.description) {\n schema = __assign(__assign({}, schema), { title: updatedFreqComp.description });\n }\n // defaultValue update\n if (updatedFreqComp.defaultValue) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { value: {\n type: \"number\",\n default: updatedFreqComp.defaultValue.value,\n }, unit: {\n type: \"string\",\n default: updatedFreqComp.defaultValue.unit,\n } }) });\n }\n // frequencyMeta update\n if (updatedFreqComp.frequencyMeta) {\n // Min value and unit update\n if (updatedFreqComp.frequencyMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedFreqComp.frequencyMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: updatedFreqComp.frequencyMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value and unit update\n if (updatedFreqComp.frequencyMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedFreqComp.frequencyMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: updatedFreqComp.frequencyMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (updatedFreqComp.frequencyMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: updatedFreqComp.frequencyMeta.unitOptions,\n }\n } }) });\n }\n }\n }\n return schema;\n}\nexports.getFreqCompSchema = getFreqCompSchema;\n//# sourceMappingURL=FrequencyComponentHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasModes = exports.processRegisterModes = void 0;\nvar Utils_1 = require(\"../Utils\");\nvar processRegisterModes = function (peripheral, hardwarePeripheral, model) {\n var _a, _b;\n if (!(0, exports.hasModes)(peripheral)) {\n return hardwarePeripheral;\n }\n var modifiedHardwarePeripheral = __assign(__assign({}, hardwarePeripheral), { registers: __assign({}, hardwarePeripheral.registers) });\n (_b = (0, Utils_1.getKeys)((_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a, _b, _c, _d, _e, _f, _g;\n var settings = (_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n var delFlag = false;\n settings === null || settings === void 0 ? void 0 : settings.forEach(function (setting) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n /* const mode = find(setting.tabs, (mode => {\n return mode === \"registerFilter\"\n })) */ // TODO : Multiple modes support\n if (((_a = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _a === void 0 ? void 0 : _a.operation) === \"registerFilter\") {\n var targetStr = (_c = model === null || model === void 0 ? void 0 : model.getComponent((_b = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _b === void 0 ? void 0 : _b.masterComponent)) === null || _c === void 0 ? void 0 : _c.value;\n var matchRegEx = new RegExp((_e = (_d = setting === null || setting === void 0 ? void 0 : setting.mode) === null || _d === void 0 ? void 0 : _d.matchRegEx) !== null && _e !== void 0 ? _e : \"\");\n if (!matchRegEx.test(targetStr)) {\n var settingObj = (_h = (_g = (_f = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _f === void 0 ? void 0 : _f[registerName]) === null || _g === void 0 ? void 0 : _g.settings) === null || _h === void 0 ? void 0 : _h[setting.setting];\n if (settingObj !== undefined) {\n (_l = (_k = (_j = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _j === void 0 ? void 0 : _j[registerName]) === null || _k === void 0 ? void 0 : _k.settings) === null || _l === void 0 ? true : delete _l[setting.setting];\n }\n else {\n (_m = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _m === void 0 ? true : delete _m[registerName];\n }\n delFlag = true;\n }\n }\n });\n if (delFlag &&\n (0, Utils_1.getKeys)((_d = (_c = (_b = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _b === void 0 ? void 0 : _b[registerName]) === null || _c === void 0 ? void 0 : _c.settings) !== null && _d !== void 0 ? _d : [])\n .length <= 0) {\n (_f = (_e = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _e === void 0 ? void 0 : _e[registerName]) === null || _f === void 0 ? true : delete _f.settings;\n (_g = modifiedHardwarePeripheral === null || modifiedHardwarePeripheral === void 0 ? void 0 : modifiedHardwarePeripheral.registers) === null || _g === void 0 ? true : delete _g[registerName];\n }\n });\n return modifiedHardwarePeripheral;\n};\nexports.processRegisterModes = processRegisterModes;\nvar hasModes = function (peripheral) {\n var _a, _b;\n var flag = false;\n (_b = (0, Utils_1.getKeys)((_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a;\n var settings = (_a = peripheral === null || peripheral === void 0 ? void 0 : peripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n for (var _i = 0, _b = settings !== null && settings !== void 0 ? settings : []; _i < _b.length; _i++) {\n var setting = _b[_i];\n if ((setting === null || setting === void 0 ? void 0 : setting.mode) !== undefined) {\n flag = true;\n }\n }\n });\n return flag;\n};\nexports.hasModes = hasModes;\n//# sourceMappingURL=RegisterFilterMode.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTimeComponentSchema = exports.isTimeComponent = exports.isTimeUnitInState = exports.isTimeValueInState = exports.isTimeComponentInState = exports.getTimeComponentFormData = void 0;\nvar getTimeComponentFormData = function (model, component, tab) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit\n };\n var updatedTimeComponent = (model.getDerivedFunctions() && model.getDerivedFunctions()[component.name] != null) ? (_a = model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a[component.name]() : undefined;\n if (updatedTimeComponent) {\n if (updatedTimeComponent.defaultValue) {\n componentValue = {\n value: updatedTimeComponent.defaultValue.value,\n unit: updatedTimeComponent.defaultValue.unit,\n };\n }\n else {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n }\n if (updatedTimeComponent.timeMeta) {\n if (updatedTimeComponent.timeMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: updatedTimeComponent.timeMeta.min.value,\n unit: updatedTimeComponent.timeMeta.min.unit,\n } });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: (_c = (_b = component.timeMeta) === null || _b === void 0 ? void 0 : _b.min) === null || _c === void 0 ? void 0 : _c.value,\n unit: (_e = (_d = component.timeMeta) === null || _d === void 0 ? void 0 : _d.min) === null || _e === void 0 ? void 0 : _e.unit,\n } });\n }\n if (updatedTimeComponent.timeMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: updatedTimeComponent.timeMeta.max.value,\n unit: updatedTimeComponent.timeMeta.max.unit,\n } });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: (_g = (_f = component.timeMeta) === null || _f === void 0 ? void 0 : _f.max) === null || _g === void 0 ? void 0 : _g.value,\n unit: (_j = (_h = component.timeMeta) === null || _h === void 0 ? void 0 : _h.max) === null || _j === void 0 ? void 0 : _j.unit,\n } });\n }\n if (updatedTimeComponent.timeMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: updatedTimeComponent.timeMeta.unitOptions });\n }\n else {\n componentValue = __assign(__assign({}, componentValue), { options: (_k = component.timeMeta) === null || _k === void 0 ? void 0 : _k.unitOptions });\n }\n }\n }\n else if (component.timeMeta) {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n if (component.timeMeta.min) {\n componentValue = __assign(__assign({}, componentValue), { min: {\n value: component.timeMeta.min.value,\n unit: component.timeMeta.min.unit,\n } });\n }\n if (component.timeMeta.max) {\n componentValue = __assign(__assign({}, componentValue), { max: {\n value: component.timeMeta.max.value,\n unit: component.timeMeta.max.unit,\n } });\n }\n if (component.timeMeta.unitOptions) {\n componentValue = __assign(__assign({}, componentValue), { options: component.timeMeta.unitOptions });\n }\n }\n else {\n componentValue = {\n value: component.defaultValue.value,\n unit: component.defaultValue.unit,\n };\n }\n if (!isTimeComponentInState(model, component, tab)) {\n return componentValue;\n }\n else {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n if (isTimeValueInState(model, component, tab)) {\n var valueChanged = tabState[component.group][component.name].value;\n componentValue = __assign(__assign({}, componentValue), { value: valueChanged });\n }\n if (isTimeUnitInState(model, component, tab)) {\n var unitChanged = tabState[component.group][component.name].unit;\n componentValue = __assign(__assign({}, componentValue), { unit: unitChanged });\n }\n return componentValue;\n }\n};\nexports.getTimeComponentFormData = getTimeComponentFormData;\nfunction isTimeComponentInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isTimeComponentInState = isTimeComponentInState;\nfunction isTimeValueInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].value);\n}\nexports.isTimeValueInState = isTimeValueInState;\nfunction isTimeUnitInState(model, component, tab) {\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n return (tabState && tabState[component.group] && tabState[component.group][component.name] && tabState[component.group][component.name].unit);\n}\nexports.isTimeUnitInState = isTimeUnitInState;\nfunction isTimeComponent(component) {\n return (component.category === \"software\" &&\n component.type === \"time\");\n}\nexports.isTimeComponent = isTimeComponent;\nfunction getTimeComponentSchema(component, derivedFunctions) {\n var _a, _b;\n //Schema creation with static moduleConfig data\n var schema = {\n type: \"object\",\n $id: \"timeComponent\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n properties: {\n value: {\n type: \"number\",\n default: component.defaultValue.value,\n },\n unit: {\n type: \"string\",\n default: component.defaultValue.unit,\n }\n },\n };\n if (component.timeMeta) {\n // Min value update\n if (component.timeMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.timeMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: component.timeMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value update\n if (component.timeMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: component.timeMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: component.timeMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (component.timeMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: component.timeMeta.unitOptions,\n }\n } }) });\n }\n }\n //Schema updation based on dynamic data\n var updatedTimeComponent = (derivedFunctions && derivedFunctions[component.name] != null) ? derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name]() : undefined;\n if (updatedTimeComponent) {\n // description update\n if (updatedTimeComponent.description) {\n schema = __assign(__assign({}, schema), { title: updatedTimeComponent.description });\n }\n // defaultValue update\n if (updatedTimeComponent.defaultValue) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { value: {\n type: \"number\",\n default: updatedTimeComponent.defaultValue.value,\n }, unit: {\n type: \"string\",\n default: updatedTimeComponent.defaultValue.unit,\n } }) });\n }\n // timeMeta update\n if (updatedTimeComponent.timeMeta) {\n // Min value and unit update\n if (updatedTimeComponent.timeMeta.min) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { min: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedTimeComponent.timeMeta.min.value,\n },\n unit: {\n type: \"string\",\n default: updatedTimeComponent.timeMeta.min.unit,\n }\n }\n } }) });\n }\n // Max value and unit update\n if (updatedTimeComponent.timeMeta.max) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { max: {\n type: \"object\",\n properties: {\n value: {\n type: \"number\",\n default: updatedTimeComponent.timeMeta.max.value,\n },\n unit: {\n type: \"string\",\n default: updatedTimeComponent.timeMeta.max.unit,\n }\n }\n } }) });\n }\n // Unit options update\n if (updatedTimeComponent.timeMeta.unitOptions) {\n schema = __assign(__assign({}, schema), { properties: __assign(__assign({}, schema.properties), { options: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: updatedTimeComponent.timeMeta.unitOptions,\n }\n } }) });\n }\n }\n }\n return schema;\n}\nexports.getTimeComponentSchema = getTimeComponentSchema;\n//# sourceMappingURL=TimeComponentHelper.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConfigData = void 0;\n/* eslint-disable @typescript-eslint/no-var-requires */\nvar Utils_1 = require(\"../Utils\");\nvar getConfigData = function (model) {\n var _a, _b;\n var config = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedData()).getModuleConfig) === null || _b === void 0 ? void 0 : _b.call(_a);\n config = ConfigBuilder.for(config)\n .withDynamicConfigData(model)\n .withDynamicComponents(model)\n .build();\n return config;\n};\nexports.getConfigData = getConfigData;\nvar ConfigBuilder = /** @class */ (function () {\n function ConfigBuilder(config) {\n var _this = this;\n this.build = function () {\n return _this.config;\n };\n this.withDynamicConfigData = function (model) {\n var _a;\n return new ConfigBuilder((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getDynamicConfigData\", _this.config)) !== null && _a !== void 0 ? _a : _this.config);\n };\n this.withDynamicComponents = function (model) {\n var _a, _b;\n var dynamicComponents = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedFunctions()).getDynamicComponents) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (dynamicComponents) {\n var dynamicComponentMap = (0, Utils_1.toDictionary)(dynamicComponents, function (component) {\n var _a;\n _this.config.UIGroups[component.group] =\n (_a = _this.config.UIGroups[component.group]) !== null && _a !== void 0 ? _a : component.group;\n return component.name;\n }, function (component) { return component; });\n _this.config.softwareData = __assign(__assign({}, _this.config.softwareData), dynamicComponentMap);\n }\n return new ConfigBuilder(_this.config);\n };\n this.config = config;\n }\n ConfigBuilder.for = function (config) {\n if (!config)\n throw console.error(\"Cannot find ModuleConfig\");\n return new ConfigBuilder(config);\n };\n return ConfigBuilder;\n}());\n//# sourceMappingURL=getConfigData.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAutoViewPayloads = void 0;\nvar scf_register_view_helper_1 = require(\"@microchip/scf-register-view-helper\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelper = __importStar(require(\"../AutoModuleHelpers\"));\nvar getConfigData_1 = require(\"../getConfigData\");\nvar registerFilter = __importStar(require(\"../RegisterFilterMode\"));\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nvar formData_1 = require(\"./formData\");\nvar scfUiSchema_1 = require(\"./scfUiSchema\");\nvar schema_1 = require(\"./schema\");\nvar uiSchema_1 = require(\"./uiSchema\");\nvar createAutoViewPayloads = function (model) {\n var config = (0, getConfigData_1.getConfigData)(model);\n var payloads = {\n main: {},\n };\n if (config === null || config === void 0 ? void 0 : config.tabs) {\n Object.keys(config.tabs).forEach(function (tab) {\n payloads[tab] = getPayloadForTab(tab);\n });\n }\n return payloads;\n function getPayloadForTab(tab) {\n if (tab === \"register\") {\n return createSimpleFormPayloadRegister();\n }\n var viewModel = {\n components: model.getAutoModuleAppModel().getAllComponents(),\n getComponent: model.getComponent,\n imports: model.getImports(),\n derivedFunctions: model.getDerivedFunctions(),\n getAssignedImport: model.getAssignedImport,\n getTableHelpers: model.getTableHelpers,\n };\n var schemaViewModel = {\n viewModel: viewModel,\n getDerivedFunction: {\n overrideTitle: model.getDerivedFunction(\"overrideTitle\"),\n isVisible: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n getFunction: model.getDerivedFunction,\n },\n overrideTableOptions: model.getDerivedFunctions()[\"overrideTableOptions\"],\n overrideDefaultValues: model.getDerivedFunctions()[\"overrideTableDefaultValues\"],\n model: model,\n };\n var uiSchemaViewModel = {\n viewModel: viewModel,\n getDerivedFunction: {\n isEnabled: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isEnabled) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n getUiBehavior: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).getUiBehavior) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n isVisible: function (componentName) { var _a, _b; return (_b = (_a = model.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, componentName); },\n },\n getProcessedArgValue: model.getExportInterfaces().getProcessedArgValue,\n isControlledByInterface: model.isControlledByInterface,\n };\n return {\n schema: (0, schema_1.createSchema)(tab, config, schemaViewModel),\n uiSchema: (0, uiSchema_1.createUiSchema)(tab, config, uiSchemaViewModel),\n formData: (0, formData_1.createFormData)(tab, config, model),\n scfUiSchema: (0, scfUiSchema_1.createScfUiSchema)(tab, config, model),\n name: config === null || config === void 0 ? void 0 : config.tabs[tab],\n table: (0, autoModuleViewHelpers_1.shouldPopulateView)(model.getDerivedFunctions(), model.getImports(), model.getAssignedImport, config)\n ? model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getTableData\")\n : undefined,\n expandGroupsByDefault: (config === null || config === void 0 ? void 0 : config.UIGroupCollapse)\n ? config.UIGroupCollapse\n : true,\n };\n }\n function createSimpleFormPayloadRegister() {\n if (!(config === null || config === void 0 ? void 0 : config.peripherals)) {\n return {};\n }\n var registerViewPayloads = [];\n config.peripherals.forEach(function (peripheral) {\n var _a, _b, _c, _d, _e, _f;\n if (AutoModuleHelper.hasConfigBits(peripheral.interfaceId.name)) {\n return;\n }\n var hardwarePeripheral = (_a = model\n .getHardware(peripheral.interfaceId.name)) === null || _a === void 0 ? void 0 : _a.getPeripheral();\n if (!(hardwarePeripheral === null || hardwarePeripheral === void 0 ? void 0 : hardwarePeripheral.registers)) {\n return;\n }\n var registerValues = model.getRegisterValues(peripheral.interfaceId.name);\n var interrupts = model.getInterrupts();\n hardwarePeripheral = registerFilter.processRegisterModes(peripheral, hardwarePeripheral, model);\n //TODO: implement for all peripherals\n var registerView = scf_register_view_helper_1.CreateRegisterView.for(hardwarePeripheral);\n if (registerValues) {\n (_b = (0, Utils_1.getKeys)(registerValues !== null && registerValues !== void 0 ? registerValues : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (registerName) {\n var _a;\n var foundRegister = (_a = hardwarePeripheral === null || hardwarePeripheral === void 0 ? void 0 : hardwarePeripheral.registers) === null || _a === void 0 ? void 0 : _a[registerName];\n if (foundRegister) {\n registerView.withRegisterValue(foundRegister, registerValues[registerName].value);\n }\n });\n }\n for (var interruptsKey in interrupts !== null && interrupts !== void 0 ? interrupts : {}) {\n var interrupt = interrupts === null || interrupts === void 0 ? void 0 : interrupts[interruptsKey];\n if (interrupt) {\n var interruptComponent = model.getComponent(interruptsKey.toLowerCase());\n var interruptCompVal = typeof (interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value) === \"boolean\"\n ? (interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value)\n ? \"enabled\"\n : \"disabled\"\n : interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.value;\n registerView\n .withInterruptValue(interrupt, (_c = interruptCompVal !== null && interruptCompVal !== void 0 ? interruptCompVal : interrupt.defaultValue) !== null && _c !== void 0 ? _c : \"disabled\")\n .withInterruptOptions(interrupt, (_f = (_e = (_d = interruptComponent === null || interruptComponent === void 0 ? void 0 : interruptComponent.component) === null || _d === void 0 ? void 0 : _d[\"defaultValue\"]) === null || _e === void 0 ? void 0 : _e.options) !== null && _f !== void 0 ? _f : [\n \"enabled\",\n \"disabled\",\n ]);\n }\n }\n registerViewPayloads.push(registerView.create());\n });\n return registerViewPayloads[0];\n }\n};\nexports.createAutoViewPayloads = createAutoViewPayloads;\n//# sourceMappingURL=autoModuleView.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isComponentInvisible = exports.shouldPopulateView = exports.isModeActive = exports.isImage = exports.isUrl = void 0;\nvar AutoModuleHardware_1 = require(\"../AutoModuleHardware\");\nfunction isUrl(component) {\n return (component.category === \"software\" &&\n component.type === \"string\" &&\n component.format === \"url\");\n}\nexports.isUrl = isUrl;\nfunction isImage(component) {\n return (component.category === \"software\" &&\n component.type === \"string\" &&\n component.format === \"image\");\n}\nexports.isImage = isImage;\nfunction isModeActive(mode, component, getComponent) {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = component === null || component === void 0 ? void 0 : component.mode) === null || _a === void 0 ? void 0 : _a.operation) !== mode) {\n return undefined; //No mode selected\n }\n var masterComponent = getComponent(component.mode.masterComponent);\n if ((_b = component.mode) === null || _b === void 0 ? void 0 : _b.matchRegEx) {\n var value = (_f = (_e = (_d = (_c = masterComponent === null || masterComponent === void 0 ? void 0 : masterComponent.value) === null || _c === void 0 ? void 0 : _c.toString()) === null || _d === void 0 ? void 0 : _d.match(component.mode.matchRegEx)) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0;\n return value > 0;\n }\n return undefined;\n}\nexports.isModeActive = isModeActive;\nfunction shouldPopulateView(derivedFunctions, imports, getAssignedImport, config) {\n var _a;\n if (displayViewOnImportAssigned(getAssignedImport, config) === false) {\n return false;\n }\n return (((_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.shouldPopulateViewAtStartup) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions)) === true ||\n (0, AutoModuleHardware_1.isFullyAssigned)(imports, config));\n}\nexports.shouldPopulateView = shouldPopulateView;\nfunction displayViewOnImportAssigned(getAssignedImport, config) {\n var shouldPopulateView = true;\n if (config === null || config === void 0 ? void 0 : config.displayViewOnImportAssigned) {\n config.displayViewOnImportAssigned.forEach(function (impKey) {\n if (getAssignedImport(impKey) == undefined) {\n shouldPopulateView = false;\n }\n });\n }\n return shouldPopulateView;\n}\nvar isComponentInvisible = function (component, appModel) {\n var _a, _b;\n var isInvisibleViaProperty = component.isVisibleProperty &&\n appModel.getDerivedFunction(component.isVisibleProperty) == false;\n return (((_b = (_a = appModel.getDerivedFunctions()).isVisible) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) === false ||\n isInvisibleViaProperty ||\n isModeActive(\"isVisible\", component, appModel.getComponent) === false);\n};\nexports.isComponentInvisible = isComponentInvisible;\n//# sourceMappingURL=autoModuleViewHelpers.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFormData = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar schema_1 = require(\"./schema\");\nvar TimeComponentHelper_1 = require(\"../TimeComponentHelper\");\nvar FrequencyComponentHelper_1 = require(\"../FrequencyComponentHelper\");\nfunction createFormData(tab, config, model) {\n var _a;\n var formData = {};\n if (config) {\n var components = model.getAutoModuleAppModel().getAllComponents();\n (_a = (0, Utils_1.values)(components)) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {\n var _a;\n if (!config) {\n return;\n }\n var component = entry.component;\n var value = model.getComponentValue(component.name);\n var regex = new RegExp(\"[en,dis]abled?\");\n if (component.type === \"boolean\") {\n if (value && typeof value === 'string') {\n if (regex.test(value.toLowerCase()) && typeof config.booleanValues.true === \"string\") {\n var configVal = config.booleanValues.true;\n if (configVal.toLowerCase() === \"enable\") {\n value = value.toLowerCase().startsWith(configVal.toLowerCase());\n }\n else {\n value = configVal.toLowerCase().startsWith(value.toLowerCase());\n }\n }\n else if (value === \"true\") {\n value = true;\n }\n else if (value === \"false\") {\n value = false;\n }\n }\n else if (value && typeof value === 'boolean') {\n value = value;\n }\n }\n if (component.type === \"DescriptionOnly\") {\n value = null;\n }\n if ((0, schema_1.isInvalidTab)(component.tabs, tab)) {\n return;\n }\n if (component.category === \"table\") {\n value = (0, tables_1.getTableFormData)(model, component, tab);\n }\n if (component.category === \"file_load\") {\n value = \"\";\n }\n if (component.type === \"time\") {\n value = (0, TimeComponentHelper_1.getTimeComponentFormData)(model, component, tab);\n }\n if (component.type === \"frequency\") {\n value = (0, FrequencyComponentHelper_1.getFreqCompFormData)(model, component, tab);\n }\n if (component.category === \"file_save\") {\n value = \"\";\n }\n formData[component.group] = __assign(__assign({}, formData[component.group]), (_a = {}, _a[component.name] = value, _a));\n });\n }\n return formData;\n}\nexports.createFormData = createFormData;\n//# sourceMappingURL=formData.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createScfUiSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelpers_1 = require(\"../AutoModuleHelpers\");\nvar ContextualHelp_1 = require(\"../ContextualHelp\");\nfunction createScfUiSchema(tab, config, model) {\n var _a;\n var scfUiSchema = {};\n if (config) {\n var components_1 = getAllComponents(model);\n (_a = (0, Utils_1.getKeys)(components_1)) === null || _a === void 0 ? void 0 : _a.forEach(function (eachKey) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var component = components_1[eachKey].component;\n var name = component.name, group = component.group;\n var schema = {};\n if (component.tabs.indexOf(tab) == -1)\n return;\n if (!scfUiSchema[group]) {\n scfUiSchema[group] = {};\n }\n if (!scfUiSchema[group][name]) {\n scfUiSchema[group][name] = {};\n }\n var actions = getActions(component, model);\n var transformErrors = model.getDerivedFunction(\"getCustomUiErrors\", name);\n if (model.getImports()) {\n var deviceMeta = model.getImportValue(\"device_meta\");\n var hasSdlSupport = (_a = deviceMeta === null || deviceMeta === void 0 ? void 0 : deviceMeta.hasSdlSupport) !== null && _a !== void 0 ? _a : false;\n if (component.sdlHelp && hasSdlSupport) {\n var helpUrl = component.sdlHelp.url;\n schema[\"helpKeyword\"] = getHelpKeyword(model, name, helpUrl);\n schema[\"tooltip\"] = getTooltip(component);\n }\n }\n if (component.category === \"file_load\") {\n schema[\"fileLoadProps\"] = {};\n schema[\"fileLoadProps\"][\"fileId\"] = eachKey;\n schema[\"fileLoadProps\"][\"saveState\"] = (_c = (_b = component.fileMeta) === null || _b === void 0 ? void 0 : _b.saveState) !== null && _c !== void 0 ? _c : false;\n schema[\"fileLoadProps\"][\"filter\"] = (_d = component.fileMeta) === null || _d === void 0 ? void 0 : _d.filter;\n schema[\"fileLoadProps\"][\"type\"] = \"file_load\";\n schema[\"fileLoadProps\"][\"compText\"] = (_e = component.fileMeta) === null || _e === void 0 ? void 0 : _e.compText;\n }\n if (component.category === \"file_save\") {\n schema[\"fileSaveProps\"] = {};\n schema[\"fileSaveProps\"][\"fileId\"] = eachKey;\n schema[\"fileSaveProps\"][\"fileContents\"] = model.getComponentValue(component.name);\n schema[\"fileSaveProps\"][\"fileName\"] = (_f = component.fileMeta) === null || _f === void 0 ? void 0 : _f.defaultName;\n schema[\"fileSaveProps\"][\"type\"] = \"file_save\";\n schema[\"fileSaveProps\"][\"compText\"] = (_g = component.fileMeta) === null || _g === void 0 ? void 0 : _g.compText;\n }\n if (component.category === \"table\") {\n var tableState = (_k = (_j = (_h = model === null || model === void 0 ? void 0 : model.getState()) === null || _h === void 0 ? void 0 : _h[tab]) === null || _j === void 0 ? void 0 : _j[group]) === null || _k === void 0 ? void 0 : _k[name];\n var uids = (0, tables_1.createTableUids)(component, tab, model, tableState);\n schema[\"table\"] = getTableUiSchema(component, uids);\n actions = (0, tables_1.getTableActions)(component, tab, model, uids);\n }\n schema[\"precision\"] = component[\"precision\"];\n schema[\"shouldDispatchOnChange\"] = component[\"shouldDispatchOnChange\"];\n if (actions) {\n schema[\"actions\"] = actions;\n }\n if (transformErrors) {\n schema[\"transformErrors\"] = transformErrors;\n }\n scfUiSchema[group][name] = __assign({}, schema);\n });\n }\n return scfUiSchema;\n}\nexports.createScfUiSchema = createScfUiSchema;\nfunction getAllComponents(model) {\n return model.getAutoModuleAppModel().getAllComponents();\n}\nfunction getHelpKeyword(model, componentName, helpUrl) {\n var _a;\n return ((_a = model.getDerivedFunction(\"getHelpUrl\", componentName, helpUrl)) !== null && _a !== void 0 ? _a : (0, ContextualHelp_1.getAutoSdlHelp)(model, componentName, helpUrl));\n}\nfunction getTooltip(component) {\n var _a, _b;\n return (_b = (_a = component.sdlHelp) === null || _a === void 0 ? void 0 : _a.tooltip) !== null && _b !== void 0 ? _b : \"Click for more information\";\n}\nfunction getTableUiSchema(component, uids) {\n var cellValidationInfo = (0, tables_1.getCellValidationInfo)(component);\n return {\n canRemoveRows: component.canRemoveRows,\n canInsertRows: component.canInsertRows,\n canAddRows: component.canAddRows,\n canMoveRowDown: component.canMoveRowDown,\n canMoveRowUp: component.canMoveRowUp,\n canEnableRows: component.canEnableRows,\n uids: uids,\n cellValidationInfo: cellValidationInfo,\n };\n}\nfunction getDependencySelectorActions(component, model) {\n var depSelector = new AutoModuleHelpers_1.DependencySelector(model, component);\n var options = depSelector.generateDropdownOptions();\n var dependencySelectorActions = [];\n options.forEach(function (dropdownOption) {\n var option = dropdownOption.value;\n dependencySelectorActions.push({\n type: \"[Import] SET\",\n payload: {\n importId: component.importId,\n handle: option === null || option === void 0 ? void 0 : option.handle,\n interfaceId: option === null || option === void 0 ? void 0 : option.interfaceId,\n option: dropdownOption.label,\n },\n });\n });\n return JSON.stringify(dependencySelectorActions);\n}\nfunction getActions(component, model) {\n if (component.category === \"import\") {\n return getDependencySelectorActions(component, model);\n }\n var actions = model.getDerivedFunction(\"getActions\", component.name, component.actions);\n return JSON.stringify(actions); //TODO: support map\n}\n//# sourceMappingURL=scfUiSchema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDependencyComponentSchema = exports.isInvalidTab = exports.createSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar AutoModuleHelpers_1 = require(\"../AutoModuleHelpers\");\nvar TimeComponentHelper_1 = require(\"../TimeComponentHelper\");\nvar FrequencyComponentHelper_1 = require(\"../FrequencyComponentHelper\");\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nfunction createSchema(tab, config, viewModel) {\n var _a, _b, _c, _d, _e, _f, _g;\n var schema = {};\n if (config) {\n var populateView_1 = (0, autoModuleViewHelpers_1.shouldPopulateView)(viewModel.viewModel.derivedFunctions, viewModel.viewModel.imports, viewModel.viewModel.getAssignedImport, config);\n schema = {\n description: (_c = (_b = (_a = viewModel.viewModel).getModuleDescription) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0, AutoModuleHelpers_1.getModuleDefaultDescription)(),\n title: config.moduleName,\n type: \"object\",\n properties: {},\n };\n var schemaBuilder_1 = {\n properties: {},\n };\n (_e = (0, Utils_1.values)((_d = viewModel.viewModel.components) !== null && _d !== void 0 ? _d : {})) === null || _e === void 0 ? void 0 : _e.forEach(function (entry) {\n var _a, _b, _c, _d, _e;\n var component = entry.component;\n if ((!populateView_1 && component.category != \"import\") ||\n isInvalidTab(component.tabs, tab)) {\n return;\n }\n if (!schemaBuilder_1[component.group]) {\n schemaBuilder_1[component.group] = {\n title: (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.overrideGroupTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.group)) !== null && _c !== void 0 ? _c : config === null || config === void 0 ? void 0 : config.UIGroups[component.group],\n description: (_e = (_d = viewModel.viewModel.derivedFunctions) === null || _d === void 0 ? void 0 : _d.overrideGroupDescription) === null || _e === void 0 ? void 0 : _e.call(_d, component.group),\n type: \"object\",\n properties: {},\n };\n }\n schemaBuilder_1[component.group].properties = __assign(__assign({}, schemaBuilder_1[component.group].properties), getComponentSchema(component, tab, viewModel));\n });\n //Sort groups based on order of UIGroups and remove groups with no components\n (_g = (0, Utils_1.getKeys)((_f = config.UIGroups) !== null && _f !== void 0 ? _f : {})) === null || _g === void 0 ? void 0 : _g.forEach(function (group) {\n var _a, _b, _c, _d;\n if (((_d = (_c = (0, Utils_1.getKeys)((_b = (_a = schemaBuilder_1[group]) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0 &&\n schema.properties) {\n schema.properties[group] = schemaBuilder_1[group];\n }\n });\n }\n return schema;\n}\nexports.createSchema = createSchema;\nfunction getComponentSchema(component, tab, viewModel) {\n var _a;\n var schema = {};\n if (isInvalidTab(component.tabs, tab) ||\n (viewModel.model && (0, autoModuleViewHelpers_1.isComponentInvisible)(component, viewModel.model))) {\n return schema;\n }\n schema = addComponentSchema(component, viewModel);\n if (schema == undefined) {\n return schema;\n }\n if (shouldAddValidator(component, viewModel.viewModel.derivedFunctions)) {\n schema = addComponentValidator(schema, component, viewModel.viewModel.derivedFunctions);\n }\n var componentName = component.name;\n schema = (_a = {}, _a[componentName] = __assign({}, schema), _a);\n return schema;\n}\nfunction isInvalidTab(tabs, tab) {\n return tabs.indexOf(tab) == -1;\n}\nexports.isInvalidTab = isInvalidTab;\nfunction addComponentValidator(schema, component, derivedFunctions) {\n return __assign(__assign({}, schema), derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name + \"Validator\"]());\n}\nfunction shouldAddValidator(component, derivedFunctions) {\n return (component.validation &&\n derivedFunctions &&\n (derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions[component.name + \"Validator\"]) != null);\n}\nfunction addComponentSchema(component, viewModel) {\n if (component.category === \"software\") {\n return getSoftwareComponentSchema(component, viewModel.viewModel.derivedFunctions);\n }\n else if (component.category === \"hardware\") {\n return getHardwareComponentSchema(component, viewModel);\n }\n else if (component.category === \"import\") {\n return getDependencyComponentSchema(component, viewModel);\n }\n else if (component.category === \"file_load\") {\n return getFileLoadComponentSchema(component, viewModel);\n }\n else if (component.category === \"file_save\") {\n return getFileSaveComponentSchema(component, viewModel);\n }\n else if (component[\"category\"] === \"table\") {\n return (0, tables_1.getTableComponentSchema)(component, viewModel);\n }\n return undefined;\n}\nfunction getSoftwareComponentSchema(component, derivedFunctions) {\n var _a, _b, _c, _d, _e, _f;\n var schema = {};\n if (component.type === \"ComboBox\") {\n schema = {\n type: \"string\",\n title: (_b = (_a = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _a === void 0 ? void 0 : _a.call(derivedFunctions, component.name)) !== null && _b !== void 0 ? _b : component.description,\n default: (0, AutoModuleHelpers_1.getDefaultValue)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideDefaultValues, component),\n enum: (0, AutoModuleHelpers_1.getComboOptions)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideOptions, component),\n };\n }\n else if (component.type === \"hex\") {\n schema = {\n type: \"integer\",\n title: (_d = (_c = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _c === void 0 ? void 0 : _c.call(derivedFunctions, component.name)) !== null && _d !== void 0 ? _d : component.description,\n format: \"hex\",\n default: (0, AutoModuleHelpers_1.getDefaultValue)(derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideDefaultValues, component),\n };\n }\n else if (component.type === \"DescriptionOnly\") {\n schema = {\n type: \"null\",\n title: component.description,\n };\n }\n else if (component.type === \"time\") {\n schema = (0, TimeComponentHelper_1.getTimeComponentSchema)(component, derivedFunctions);\n }\n else if (component.type === \"frequency\") {\n schema = (0, FrequencyComponentHelper_1.getFreqCompSchema)(component, derivedFunctions);\n }\n else {\n schema = {\n type: component.type,\n title: (_f = (_e = derivedFunctions === null || derivedFunctions === void 0 ? void 0 : derivedFunctions.overrideTitle) === null || _e === void 0 ? void 0 : _e.call(derivedFunctions, component.name)) !== null && _f !== void 0 ? _f : component.description,\n };\n if ((0, autoModuleViewHelpers_1.isUrl)(component) && component.urlDescription) {\n schema = __assign(__assign({}, schema), { description: component.urlDescription });\n }\n if ((0, autoModuleViewHelpers_1.isImage)(component) && component.imageDescription) {\n schema = __assign(__assign({}, schema), { description: component.imageDescription });\n }\n }\n return schema;\n}\nfunction getDependencyComponentSchema(component, viewModel) {\n var _a, _b, _c, _d, _e, _f;\n var schema = {};\n if (((_a = component.uiBehavior) === null || _a === void 0 ? void 0 : _a[\"ui:widget\"]) === \"hidden\") {\n return;\n }\n if (component.type === \"ComboBox\" && viewModel.model) {\n var dependencySelector = new AutoModuleHelpers_1.DependencySelector(viewModel.model, component);\n if (dependencySelector.getDropdownOptionNames().length <= 0) {\n return schema;\n }\n var dropdownOptions = dependencySelector.getDropdownOptionNames();\n var assignedImport = (_c = (_b = viewModel.createProcessedImports) === null || _b === void 0 ? void 0 : _b.call(viewModel, \"views\")) === null || _c === void 0 ? void 0 : _c[component.importId];\n var NONE_1 = \"None\";\n var assignedName = NONE_1;\n var selectedDependency = viewModel.model.getComponentValue(component.name);\n if (assignedImport === null || assignedImport === void 0 ? void 0 : assignedImport.handle) {\n assignedName = dependencySelector.createOptionLabel(assignedImport.handle, assignedImport.payload);\n dropdownOptions.push(assignedName);\n }\n else if (selectedDependency) {\n dropdownOptions.push(selectedDependency);\n }\n dropdownOptions = dropdownOptions.sort(function (a, b) {\n return a.localeCompare(b);\n });\n dropdownOptions = __spreadArray([NONE_1], dropdownOptions.filter(function (item) { return item !== NONE_1; }), true);\n schema = {\n type: \"string\",\n title: (_f = (_e = (_d = viewModel.getDerivedFunction).overrideTitle) === null || _e === void 0 ? void 0 : _e.call(_d, component.name)) !== null && _f !== void 0 ? _f : component.description,\n default: assignedName,\n enum: dropdownOptions,\n };\n }\n return schema;\n}\nexports.getDependencyComponentSchema = getDependencyComponentSchema;\nfunction getFileLoadComponentSchema(component, viewModel) {\n var _a, _b, _c;\n var schema = {};\n if (viewModel.model) {\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n };\n }\n return schema;\n}\nfunction getFileSaveComponentSchema(component, viewModel) {\n var _a, _b, _c;\n var schema = {};\n if (viewModel.model) {\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n };\n }\n return schema;\n}\nfunction getHardwareComponentSchema(component, viewModel) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n var schema = {};\n var model = viewModel.model;\n if (model) {\n if (model.getComponentValue(component.name) !== undefined &&\n component.type !== \"register\") {\n if (component.type === \"ComboBox\") {\n var setting = (0, AutoModuleHelpers_1.getSettingFromComponent)(model, component);\n schema = {\n type: \"string\",\n title: (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,\n default: (0, AutoModuleHelpers_1.getSettingDefaultIfPresent)(component, setting, (_e = (_d = model\n .getDerivedFunctions()).overrideDefaultValues) === null || _e === void 0 ? void 0 : _e.call(_d, component.name)),\n enum: (0, AutoModuleHelpers_1.getSettingOptionsIfPresent)(component, setting, model.getComponentValue((_g = (_f = component.mode) === null || _f === void 0 ? void 0 : _f.masterComponent) !== null && _g !== void 0 ? _g : \"\")),\n };\n }\n else {\n schema = {\n type: component.type,\n title: (_k = (_j = (_h = viewModel.viewModel.derivedFunctions) === null || _h === void 0 ? void 0 : _h.overrideTitle) === null || _j === void 0 ? void 0 : _j.call(_h, component.name)) !== null && _k !== void 0 ? _k : component.description,\n };\n }\n }\n }\n return schema;\n}\n//# sourceMappingURL=schema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createUiSchema = void 0;\nvar tables_1 = require(\"../../tables/tables\");\nvar Utils_1 = require(\"../../Utils\");\nvar autoModuleViewHelpers_1 = require(\"./autoModuleViewHelpers\");\nfunction createUiSchema(tab, config, viewModel) {\n var _a;\n var _b, _c, _d;\n var uiSchema = {};\n if (config) {\n if (config.UIOrder) {\n (_c = (0, Utils_1.getKeys)((_b = config.UIOrder) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (group) {\n var _a;\n uiSchema[group] = {\n \"ui:order\": (_a = config === null || config === void 0 ? void 0 : config.UIOrder) === null || _a === void 0 ? void 0 : _a[group],\n };\n });\n }\n var components = viewModel.viewModel.components;\n var isGroupHidden_1 = {};\n (_d = (0, Utils_1.values)(components !== null && components !== void 0 ? components : {})) === null || _d === void 0 ? void 0 : _d.forEach(function (entry) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j;\n var component = entry.component;\n var tabIndex = (_d = (_c = component.tabs) === null || _c === void 0 ? void 0 : _c.indexOf(tab)) !== null && _d !== void 0 ? _d : -1;\n if (tabIndex === -1)\n return;\n var isComponentGroupHidden = isGroupHidden_1[component.group] === undefined ||\n isGroupHidden_1[component.group] === true;\n if (isComponentGroupHidden) {\n var isHidden = (_f = ((_e = component.uiBehavior) === null || _e === void 0 ? void 0 : _e[\"ui:widget\"]) === \"hidden\") !== null && _f !== void 0 ? _f : false;\n if (((_h = (_g = viewModel.getDerivedFunction).isVisible) === null || _h === void 0 ? void 0 : _h.call(_g, component.name)) === false) {\n isHidden = true;\n }\n isGroupHidden_1[component.group] = isHidden;\n }\n if (component.category === \"table\") {\n var table = component;\n var tableCols_1 = table.columns;\n var colNames = Object.keys(tableCols_1);\n var defaultAlignment_1 = \"left\";\n var displayHeadersHorizontally = (_j = table.displayHeadersHorizontally) !== null && _j !== void 0 ? _j : false;\n var displayHeadersDiagonally_1 = !displayHeadersHorizontally;\n var columns_1 = [];\n var defaultColumnWidth_1 = (0, tables_1.calculateColumnWidth)(tableCols_1);\n var headerMaxLength_1 = colNames\n .map(function (name) { return tableCols_1[name].title.length; })\n .reduce(function (a, b) { return Math.max(a, b); });\n colNames.forEach(function (name) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n var isColEditable = !tableCols_1[name].readonly;\n var columnWidth = defaultColumnWidth_1[name];\n var disableRowsForCol = (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.disableTableCells) === null || _b === void 0 ? void 0 : _b.call(_a, name)) !== null && _c !== void 0 ? _c : [];\n columns_1.push({\n dataField: name,\n editable: isColEditable ? undefined : false,\n columnWidth: tableCols_1[name].columnWidth\n ? tableCols_1[name].columnWidth + \"%\"\n : columnWidth + \"%\",\n width: tableCols_1[name].width\n ? tableCols_1[name].width + \"%\"\n : columnWidth + \"%\",\n dataSort: tableCols_1[name].isSortable,\n headerAlign: displayHeadersDiagonally_1\n ? defaultAlignment_1\n : (_e = (_d = tableCols_1[name].headerAlign) !== null && _d !== void 0 ? _d : tableCols_1[name].dataAlign) !== null && _e !== void 0 ? _e : defaultAlignment_1,\n dataAlign: (_g = (_f = tableCols_1[name].dataAlign) !== null && _f !== void 0 ? _f : tableCols_1[name].headerAlign) !== null && _g !== void 0 ? _g : defaultAlignment_1,\n disabledRows: (_h = tableCols_1[name].disabledRows) !== null && _h !== void 0 ? _h : disableRowsForCol,\n tdStyle: (0, tables_1.getCellStyle)(tableCols_1[name].readonly),\n headerText: (_j = tableCols_1[name]) === null || _j === void 0 ? void 0 : _j[\"columnTip\"],\n hidden: (_m = (_l = (_k = viewModel.viewModel.derivedFunctions) === null || _k === void 0 ? void 0 : _k.hideTableColumn) === null || _l === void 0 ? void 0 : _l.call(_k, name)) !== null && _m !== void 0 ? _m : false,\n });\n });\n columns_1 = columns_1.map(function (col) {\n return __assign(__assign({}, col), { thStyle: (0, tables_1.getHeaderStyle)(headerMaxLength_1, displayHeadersDiagonally_1) });\n });\n uiSchema[table.group] = __assign(__assign({}, uiSchema[table.group]), (_a = {}, _a[table.name] = (0, tables_1.getTableUiSchema)(table, columns_1), _a));\n }\n else {\n uiSchema[component.group] = __assign(__assign({}, uiSchema[component.group]), (_b = {}, _b[component.name] = __assign(__assign({}, getUiBehavior(component, viewModel)), getUiSchemaExportArg(component.name, viewModel)), _b));\n }\n });\n for (var group in isGroupHidden_1) {\n if (isGroupHidden_1[group]) {\n uiSchema[group] = __assign(__assign({}, uiSchema[group]), (_a = {}, _a[\"ui:widget\"] = \"hidden\", _a));\n }\n }\n }\n return uiSchema;\n}\nexports.createUiSchema = createUiSchema;\nfunction getUiSchemaExportArg(name, viewModel) {\n var uiSchema = {};\n if (viewModel.isControlledByInterface(name)) {\n var expArg = viewModel.getProcessedArgValue(name);\n if (expArg) {\n uiSchema = {\n \"ui:readonly\": true,\n \"ui:help\": \"Controlled by \" + expArg.interface,\n };\n }\n }\n return uiSchema;\n}\nfunction getUiBehavior(component, viewModel) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n var uiBehavior = {};\n if (component.uiBehavior) {\n (_d = (0, Utils_1.getKeys)((_c = component.uiBehavior) !== null && _c !== void 0 ? _c : {})) === null || _d === void 0 ? void 0 : _d.forEach(function (key) {\n var _a, _b;\n switch (key) {\n case \"readonly\":\n uiBehavior[\"ui:readonly\"] = (_a = component.uiBehavior) === null || _a === void 0 ? void 0 : _a[key];\n break;\n default:\n uiBehavior[key] = (_b = component.uiBehavior) === null || _b === void 0 ? void 0 : _b[key];\n break;\n }\n });\n }\n if ((0, autoModuleViewHelpers_1.isUrl)(component)) {\n uiBehavior[\"ui:widget\"] = \"url\";\n }\n else if ((0, autoModuleViewHelpers_1.isImage)(component)) {\n uiBehavior[\"ui:widget\"] = \"image\";\n }\n else if (component.category === \"file_load\") {\n uiBehavior[\"ui:field\"] = \"file_load\";\n uiBehavior[\"ui:readonly\"] = (_e = component.uiBehavior) === null || _e === void 0 ? void 0 : _e.readonly;\n }\n else if (component.type === \"time\") {\n uiBehavior[\"ui:field\"] = \"TimeComponent\";\n }\n else if (component.type === \"frequency\") {\n uiBehavior[\"ui:field\"] = \"frequency\";\n }\n else if (component.category === \"file_save\") {\n uiBehavior[\"ui:field\"] = \"file_save\";\n uiBehavior[\"ui:readonly\"] = (_f = component.uiBehavior) === null || _f === void 0 ? void 0 : _f.readonly;\n }\n var overriddenBehavior = {};\n if (viewModel) {\n var overriddenValue = (_h = (_g = viewModel.getDerivedFunction).getUiBehavior) === null || _h === void 0 ? void 0 : _h.call(_g, component.name);\n if (overriddenValue != undefined) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), overriddenValue);\n if (((_j = (0, Utils_1.getKeys)(overriddenBehavior !== null && overriddenBehavior !== void 0 ? overriddenBehavior : {})) === null || _j === void 0 ? void 0 : _j.indexOf(\"readonly\")) != -1) {\n overriddenBehavior[\"ui:readonly\"] = overriddenBehavior[\"readonly\"];\n delete overriddenBehavior[\"readonly\"];\n }\n }\n var isEnabled = (_m = (_l = (_k = viewModel.getDerivedFunction).isEnabled) === null || _l === void 0 ? void 0 : _l.call(_k, component.name)) !== null && _m !== void 0 ? _m : (0, autoModuleViewHelpers_1.isModeActive)(\"isEnabled\", component, viewModel.viewModel.getComponent);\n if (isEnabled != undefined) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), (_a = {}, _a[\"ui:readonly\"] = !isEnabled, _a));\n }\n var isVisible = (_p = (_o = viewModel.getDerivedFunction).isVisible) === null || _p === void 0 ? void 0 : _p.call(_o, component.name);\n if (isVisible != undefined) {\n if (!isVisible) {\n overriddenBehavior = __assign(__assign({}, overriddenBehavior), (_b = {}, _b[\"ui:widget\"] = \"hidden\", _b));\n }\n }\n }\n uiBehavior = __assign(__assign({}, uiBehavior), overriddenBehavior);\n return uiBehavior;\n}\n//# sourceMappingURL=uiSchema.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = void 0;\nvar createPrototypeExports_1 = require(\"./interfaces/createPrototypeExports\");\nvar createPrototypeImports_1 = require(\"./interfaces/createPrototypeImports\");\nvar create = function (state, getCreatorFunctions) {\n var _a, _b, _c;\n var config = (_b = (_a = getCreatorFunctions()).getModuleConfig) === null || _b === void 0 ? void 0 : _b.call(_a);\n var prototypeImports = (0, createPrototypeImports_1.createPrototypeImports)(state, getCreatorFunctions());\n var prototypeExports = (0, createPrototypeExports_1.createPrototypeExports)(config);\n return {\n payload: state,\n imports: __assign({}, prototypeImports),\n exports: prototypeExports,\n isSingletonPerDevice: config === null || config === void 0 ? void 0 : config.isSingletonPerDevice,\n isEntryPoint: (_c = config === null || config === void 0 ? void 0 : config.isEntryPoint) !== null && _c !== void 0 ? _c : true,\n };\n};\nexports.create = create;\n//# sourceMappingURL=creator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.process = void 0;\nvar processor_1 = require(\"./processor\");\nObject.defineProperty(exports, \"process\", { enumerable: true, get: function () { return processor_1.process; } });\nvar creator_1 = require(\"./creator\");\nObject.defineProperty(exports, \"create\", { enumerable: true, get: function () { return creator_1.create; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPrototypeExports = void 0;\nvar Utils_1 = require(\"../Utils\");\nvar createPrototypeExports = function (config) {\n var _a, _b;\n var exports = {};\n (_b = (0, Utils_1.getKeys)((_a = config === null || config === void 0 ? void 0 : config.exports) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (expName) {\n var _a;\n var exp = (_a = config === null || config === void 0 ? void 0 : config.exports) === null || _a === void 0 ? void 0 : _a[expName];\n if (exp == undefined)\n return;\n exports[expName] = __assign(__assign({}, exp), { interfaces: processExportInterfaces(exp.interfaces) });\n });\n return exports;\n};\nexports.createPrototypeExports = createPrototypeExports;\nvar processExportInterfaces = function (int) {\n var newInterfaces = [];\n int.forEach(function (_a) {\n var interfaceId = _a.interfaceId, payload = _a.payload;\n newInterfaces.push({ interfaceId: interfaceId, payload: payload });\n });\n return newInterfaces;\n};\n//# sourceMappingURL=createPrototypeExports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPrototypeImports = void 0;\nvar AutoModuleHardware_1 = require(\"../autoModule/AutoModuleHardware\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar createPrototypeImports = function (state, creatorFunctions, config) {\n var _a, _b, _c;\n var prototypeImports = {};\n config = (_a = creatorFunctions.getModuleConfig) === null || _a === void 0 ? void 0 : _a.call(creatorFunctions);\n if (!config)\n return prototypeImports;\n if (config === null || config === void 0 ? void 0 : config.peripherals) {\n config.peripherals.forEach(function (peripheral) {\n var _a;\n var interfaceName = getFriendlyInterfaceId(peripheral.interfaceId.name);\n var prototypeImport = (0, AutoModuleHardware_1.createPrototypeImport)(interfaceName, config);\n if (prototypeImport) {\n prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[interfaceName] = __assign(__assign({}, prototypeImport), { isRequired: true }), _a));\n }\n });\n }\n (_c = (0, Arrays_1.getKeys)((_b = config === null || config === void 0 ? void 0 : config.imports) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (key) {\n var _a, _b;\n var _c, _d, _e, _f, _g;\n var imp = (_c = config === null || config === void 0 ? void 0 : config.imports) === null || _c === void 0 ? void 0 : _c[key];\n var args = (_d = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.getCreatorImportArgs) === null || _d === void 0 ? void 0 : _d.call(creatorFunctions, key, state);\n var shouldOrder = (_f = (_e = creatorFunctions.updateImportWithShouldAssignDescOrder) === null || _e === void 0 ? void 0 : _e.call(creatorFunctions, key)) !== null && _f !== void 0 ? _f : imp === null || imp === void 0 ? void 0 : imp.import.shouldAssignDescendantsInOrder;\n if (imp) {\n if (((_g = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.shouldImport) === null || _g === void 0 ? void 0 : _g.call(creatorFunctions, key, state)) != false) {\n prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[key] = __assign(__assign({}, imp.import), { args: args }), _a));\n }\n if (shouldOrder && shouldOrder.length > 0) {\n prototypeImports = __assign(__assign({}, prototypeImports), (_b = {}, _b[key] = __assign(__assign({}, imp.import), { args: args, shouldAssignDescendantsInOrder: shouldOrder }), _b));\n }\n }\n });\n return prototypeImports;\n};\nexports.createPrototypeImports = createPrototypeImports;\nvar getFriendlyInterfaceId = function (interfaceName) {\n interfaceName = interfaceName.replace(/ /g, \"\").replace(/-/g, \"_\");\n return interfaceName;\n};\n//# sourceMappingURL=createPrototypeImports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyExportInterfaces = exports.createExportInterfaces = void 0;\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar getConfigData_1 = require(\"../autoModule/getConfigData\");\nvar createExportInterfaces = function (exports, model) {\n return new MyExportInterfaces(exports, model);\n};\nexports.createExportInterfaces = createExportInterfaces;\nvar MyExportInterfaces = /** @class */ (function () {\n function MyExportInterfaces(exports, model) {\n var _this = this;\n this.getConfig = function () {\n if (!_this.config) {\n _this.config = (0, getConfigData_1.getConfigData)(_this.model);\n }\n return _this.config;\n };\n this.getComponents = function () {\n if (!_this.components) {\n _this.components = _this.createComponentList();\n }\n return _this.components;\n };\n this.createProcessedExports = function () {\n var _a, _b;\n var exportPayload = _this.exports;\n var config = _this.getConfig();\n if (config.exports) {\n (_b = (0, Arrays_1.getKeys)((_a = config.exports) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var _a;\n var _b, _c, _d, _e;\n var exp = (_b = config.exports) === null || _b === void 0 ? void 0 : _b[key];\n exportPayload = __assign(__assign({}, exportPayload), (_a = {}, _a[key] = __assign(__assign({}, (_c = config.exports) === null || _c === void 0 ? void 0 : _c[key]), { interfaces: [], name: (_d = _this.model.getDerivedFunction(\"exportName\", key)) !== null && _d !== void 0 ? _d : (_e = exportPayload[key]) === null || _e === void 0 ? void 0 : _e.name }), _a));\n exp === null || exp === void 0 ? void 0 : exp.interfaces.forEach(function (int) {\n var _a, _b, _c, _d;\n var processedInterface = _this.getInterface(key, int.interfaceId);\n if (processedInterface) {\n exportPayload[key].interfaces.push(__assign(__assign({}, processedInterface), { payload: (_b = (_a = _this.model) === null || _a === void 0 ? void 0 : _a.getDerivedFunction(int.interfaceId.name + \"_payload\")) !== null && _b !== void 0 ? _b : {}, payloads: (_d = (_c = _this.model) === null || _c === void 0 ? void 0 : _c.getDerivedFunction(int.interfaceId.name + \"_payloads\")) !== null && _d !== void 0 ? _d : {} }));\n }\n });\n });\n }\n return exportPayload;\n };\n this.getInterfaceArgs = function (interfaceKey, interfaceId) {\n var _a;\n return (_a = _this.getInterface(interfaceKey, interfaceId)) === null || _a === void 0 ? void 0 : _a.args;\n };\n this.getInterfaceResults = function (interfaceKey, interfaceId) {\n var _a;\n return (_a = _this.getInterface(interfaceKey, interfaceId)) === null || _a === void 0 ? void 0 : _a.results;\n };\n this.createComponentList = function () {\n var _a, _b;\n var componentList = [];\n var exports = (_a = _this.getConfig().exports) !== null && _a !== void 0 ? _a : {};\n (_b = (0, Arrays_1.getKeys)(exports)) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var exp = exports[key];\n exp.interfaces.forEach(function (int) {\n if (int.components) {\n componentList.push.apply(componentList, int.components);\n }\n });\n });\n return componentList;\n };\n this.isControlledByInterface = function (componentName) {\n return _this.getComponents().indexOf(componentName) != -1;\n };\n this.getProcessedArgValue = function (componentName) {\n var _a, _b;\n var processedArgValue;\n var interfaceData = _this.getInterfaceData();\n if (_this.model &&\n _this.model.getDerivedFunctions().getProcessedArgValue &&\n interfaceData != undefined) {\n processedArgValue = (_b = (_a = _this.model\n .getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.getProcessedArgValue) === null || _b === void 0 ? void 0 : _b.call(_a, componentName, interfaceData);\n }\n return processedArgValue;\n };\n this.getInterfaceData = function () {\n var _a, _b;\n var argValues;\n var exports = (_a = _this.getConfig().exports) !== null && _a !== void 0 ? _a : {};\n (_b = (0, Arrays_1.getKeys)(exports)) === null || _b === void 0 ? void 0 : _b.forEach(function (key) {\n var exp = exports[key];\n exp.interfaces.forEach(function (int) {\n var _a;\n var args = _this.getInterfaceArgs(key, int.interfaceId);\n if (args) {\n (_a = (0, Arrays_1.getKeys)(args)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n var _a;\n (_a = (0, Arrays_1.getKeys)(args[key])) === null || _a === void 0 ? void 0 : _a.forEach(function (arg) {\n if (!argValues)\n argValues = [];\n argValues.push({\n interface: int.interfaceId.name,\n name: arg,\n value: args[key][arg],\n module: key,\n });\n });\n });\n }\n });\n });\n return argValues;\n };\n this.exports = exports;\n this.model = model;\n }\n MyExportInterfaces.prototype.getInterface = function (interfaceKey, interfaceId) {\n var _a;\n if (!this.exports[interfaceKey])\n return undefined;\n return (0, Arrays_1.find)((_a = this.exports[interfaceKey].interfaces) !== null && _a !== void 0 ? _a : [], function (i) { return JSON.stringify(i.interfaceId) === JSON.stringify(interfaceId); });\n };\n return MyExportInterfaces;\n}());\nexports.MyExportInterfaces = MyExportInterfaces;\n//# sourceMappingURL=exports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MyImportInterfaces = exports.createImportInterfaces = void 0;\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar InterruptActions_1 = require(\"../interrupts/InterruptActions\");\nvar Utils_1 = require(\"../Utils\");\nvar createImportInterfaces = function (imports, model, config) {\n return new MyImportInterfaces(imports, model, config);\n};\nexports.createImportInterfaces = createImportInterfaces;\nvar MyImportInterfaces = /** @class */ (function () {\n function MyImportInterfaces(imports, model, config) {\n var _this = this;\n this.createProcessedImports = function (stage) {\n var _a;\n var processedImports = _this.filterImports();\n (_a = (0, Utils_1.getKeys)(processedImports !== null && processedImports !== void 0 ? processedImports : {})) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n var _a;\n var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n processedImports = __assign(__assign({}, processedImports), (_a = {}, _a[key] = __assign(__assign(__assign({}, processedImports[key]), { args: stage === \"arguments\"\n ? (_b = _this.model) === null || _b === void 0 ? void 0 : _b.getDerivedFunction(key + \"_args\")\n : (_c = processedImports[key]) === null || _c === void 0 ? void 0 : _c.args, results: stage === \"results\"\n ? _this.getResults(processedImports, key)\n : (_d = processedImports[key]) === null || _d === void 0 ? void 0 : _d.results, name: (_e = _this.model.getDerivedFunction(\"importName\", key)) !== null && _e !== void 0 ? _e : (_f = processedImports[key]) === null || _f === void 0 ? void 0 : _f.name, handle: (0, AutoModuleHelpers_1.getProcessedHandle)(processedImports[key].handle, processedImports[key].payload), options: (_j = _this.getProcessedImportOptions(key, (_h = (_g = processedImports[key]) === null || _g === void 0 ? void 0 : _g.options) !== null && _h !== void 0 ? _h : [])) !== null && _j !== void 0 ? _j : processedImports[key].options, shouldAssignDescendantsInOrder: (_m = (_l = (_k = _this.model\n .getDerivedFunctions()).updateImportWithShouldAssignDescOrder) === null || _l === void 0 ? void 0 : _l.call(_k, key)) !== null && _m !== void 0 ? _m : processedImports[key].shouldAssignDescendantsInOrder }), (_p = (_o = _this.model\n .getDerivedFunctions()).overrideImport) === null || _p === void 0 ? void 0 : _p.call(_o, key, processedImports[key])), _a));\n });\n return processedImports;\n };\n this.filterImports = function () {\n var _a, _b, _c;\n var filteredImports = (_c = (_b = (_a = _this.model.getDerivedFunctions()).filterImports) === null || _b === void 0 ? void 0 : _b.call(_a, _this.imports)) !== null && _c !== void 0 ? _c : _this.imports;\n return filteredImports;\n };\n //Populates option labels with a custom module name if provided in export payload\n this.getProcessedImportOptions = function (importKey, options) {\n var modifiedOptions = [];\n options === null || options === void 0 ? void 0 : options.forEach(function (option, index) {\n var _a, _b;\n modifiedOptions[index] = __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: (_a = _this.model.getDerivedFunction(\"importOptionLabel\", importKey, option)) !== null && _a !== void 0 ? _a : (_b = option.payload) === null || _b === void 0 ? void 0 : _b.moduleName }) });\n });\n return modifiedOptions;\n };\n this.getResults = function (imports, key) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;\n var importResults = (_a = _this.model) === null || _a === void 0 ? void 0 : _a.getDerivedFunction(key + \"_results\");\n if (importResults)\n return importResults;\n var imp = imports[key];\n if (imp.interfaceId.name === \"initializer-system\") {\n var initResults = {\n initializer: {\n name: _this.model.getName() + \"_Initialize\",\n header: (_c = (_b = _this.model) === null || _b === void 0 ? void 0 : _b.getDerivedFunction(\"headerFile\")) !== null && _c !== void 0 ? _c : {\n name: _this.model.getName().toLowerCase() + \".h\",\n path: \"include/\",\n },\n },\n };\n return initResults;\n }\n else if (imp.interfaceId.name === \"pin-standard\") {\n return (_e = (_d = _this.model).getPCPHelper) === null || _e === void 0 ? void 0 : _e.call(_d).getData();\n }\n else if (imp.interfaceId.name === \"pins-interface\") {\n return (_g = (_f = _this.model).getPCPHelper) === null || _g === void 0 ? void 0 : _g.call(_f).getData();\n }\n else if (imp.interfaceId.name === \"interrupt-standard\") {\n var interrupts_1 = [];\n var actions_1 = {};\n var isHighPriority_1 = (_k = (_j = (_h = _this.model) === null || _h === void 0 ? void 0 : _h.getImportValue(\"interrupt_standard\")) === null || _j === void 0 ? void 0 : _j.isHighPriority) !== null && _k !== void 0 ? _k : {};\n (_o = (0, Utils_1.values)((_m = (_l = _this.model.getHardware()) === null || _l === void 0 ? void 0 : _l.getPeripheral().interrupts) !== null && _m !== void 0 ? _m : {})) === null || _o === void 0 ? void 0 : _o.forEach(function (interrupt) {\n var _a, _b;\n var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;\n if (!interrupt)\n return;\n var filterInterrupt = (_e = (_d = (_c = _this.model\n .getDerivedFunctions()).filterInterrupts) === null || _d === void 0 ? void 0 : _d.call(_c, interrupt.name)) !== null && _e !== void 0 ? _e : true;\n if (filterInterrupt) {\n var interruptComponentName = (_g = (_f = _this.getInterruptComponentName(interrupt.name)) !== null && _f !== void 0 ? _f : interrupt.name.toLowerCase()) !== null && _g !== void 0 ? _g : \"\";\n var isEnabled_1 = (_h = _this.model.isComponentValue(interruptComponentName !== null && interruptComponentName !== void 0 ? interruptComponentName : \"\")) !== null && _h !== void 0 ? _h : false;\n interrupts_1.push({\n //Standard\n name: (_j = interrupt.name) !== null && _j !== void 0 ? _j : \"\",\n module: (_m = (_l = (_k = _this.model.getHardware()) === null || _k === void 0 ? void 0 : _k.getName()) !== null && _l !== void 0 ? _l : _this.model.getName()) !== null && _m !== void 0 ? _m : \"\",\n isEnabled: isEnabled_1,\n //Callback Extension\n isrCallback: (_r = (_q = (_o = _this.model) === null || _o === void 0 ? void 0 : (_p = _o.getDerivedFunctions()).isrCallback) === null || _q === void 0 ? void 0 : _q.call(_p, interrupt.name)) !== null && _r !== void 0 ? _r : {\n name: _this.model.getName() + interrupt.handlerName,\n header: (_v = (_u = (_s = _this.model) === null || _s === void 0 ? void 0 : (_t = _s.getDerivedFunctions()).headerFile) === null || _u === void 0 ? void 0 : _u.call(_t)) !== null && _v !== void 0 ? _v : {\n name: _this.model.getName().toLowerCase() + \".h\",\n path: \"include/\",\n },\n },\n generateISR: isEnabled_1,\n //Priority Extension\n isHighPriority: (_w = isHighPriority_1[interrupt.name]) !== null && _w !== void 0 ? _w : true,\n });\n var isEnableActions = (_a = ((_z = (_y = (_x = _this.model\n .getDerivedFunctions()).getInterruptActions) === null || _y === void 0 ? void 0 : _y.call(_x, interrupt.name, \"isEnabled\")) !== null && _z !== void 0 ? _z : [])).concat.apply(_a, (0, InterruptActions_1.getDefaultInterruptActions)(_this.model, interruptComponentName));\n var isEnableAction = (0, Arrays_1.find)(isEnableActions, function (action) { return action[\"validFor\"] !== isEnabled_1; });\n actions_1 = __assign(__assign({}, actions_1), (_b = {}, _b[interrupt.name] = __assign(__assign({}, actions_1 === null || actions_1 === void 0 ? void 0 : actions_1[interrupt.name]), { isEnabled: isEnableAction ? [isEnableAction] : [] }), _b));\n }\n });\n return {\n interruptList: interrupts_1,\n interruptActions: actions_1,\n moduleName: (_p = _this.model.getName()) !== null && _p !== void 0 ? _p : \"\",\n };\n }\n else if (imp.interfaceId.name === \"api-prefix-registration\") {\n var apiPrefixResults = {\n apiPrefix: (_s = (_r = (_q = _this.model) === null || _q === void 0 ? void 0 : _q.getDerivedFunctions()) === null || _r === void 0 ? void 0 : _r.apiPrefix) !== null && _s !== void 0 ? _s : (_t = _this.model) === null || _t === void 0 ? void 0 : _t.getComponentValue(\"componentName\"),\n moduleName: (_u = _this.model) === null || _u === void 0 ? void 0 : _u.getName(),\n };\n return apiPrefixResults;\n }\n };\n this.getInterruptComponentName = function (interruptName) {\n var _a, _b;\n return (_b = (_a = _this.model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.interruptComponentName) === null || _b === void 0 ? void 0 : _b.call(_a, interruptName);\n };\n this.imports = imports;\n this.model = model;\n }\n return MyImportInterfaces;\n}());\nexports.MyImportInterfaces = MyImportInterfaces;\n//# sourceMappingURL=imports.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultInterruptActions = exports.InterruptActionsBuilder = void 0;\nvar AutoModuleHelpers_1 = require(\"../autoModule/AutoModuleHelpers\");\nvar InterruptActionsBuilder = /** @class */ (function () {\n function InterruptActionsBuilder(model) {\n var _this = this;\n this.actions = [];\n this.createActionFor = function (componentName) {\n var _a;\n _this.actions = _this.buildActions();\n _this.curComponent = componentName\n ? (_a = _this.model.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.component\n : undefined;\n _this.curComponentName = componentName;\n _this.tableRowId = undefined;\n _this.tableRowCol = undefined;\n _this.tableCellPath = undefined;\n return _this;\n };\n this.addActionIfEnabled = function (actionValue) {\n if (!_this.curComponentName || !_this.curComponent)\n return _this;\n if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))\n return _this;\n var payload = {\n tabId: _this.curComponent.tabs[0],\n value: actionValue,\n };\n if (_this.curComponent.category === \"table\") {\n if (!_this.tableCellPath)\n return _this;\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name, \".\").concat(_this.tableCellPath), rowId: _this.tableRowId });\n }\n else {\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name) });\n }\n _this.actions.push({\n validFor: true,\n action: {\n type: \"[FORM] SUBMIT\",\n payload: payload,\n },\n });\n return _this;\n };\n this.addActionIfDisabled = function (actionValue) {\n if (!_this.curComponentName || !_this.curComponent)\n return _this;\n if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))\n return _this;\n var payload = {\n tabId: _this.curComponent.tabs[0],\n value: actionValue,\n };\n if (_this.curComponent.category === \"table\") {\n if (!_this.tableCellPath)\n return _this;\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name, \".\").concat(_this.tableCellPath), rowId: _this.tableRowId });\n }\n else {\n payload = __assign(__assign({}, payload), { path: \"\".concat(_this.curComponent.group, \".\").concat(_this.curComponent.name) });\n }\n _this.actions.push({\n validFor: false,\n action: {\n type: \"[FORM] SUBMIT\",\n payload: payload,\n },\n });\n return _this;\n };\n this.setPathToTableCell = function (rowIndex, colName) {\n var _a;\n if (((_a = _this.curComponent) === null || _a === void 0 ? void 0 : _a.category) !== \"table\")\n return _this;\n _this.tableRowId = rowIndex;\n _this.tableRowCol = colName;\n _this.tableCellPath = \"\".concat(rowIndex, \".\").concat(colName);\n return _this;\n };\n this.isActionValueAcceptable = function (component, actionValue) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (component.category === \"hardware\") {\n if (component.type === \"ComboBox\") {\n var options = (_a = (0, AutoModuleHelpers_1.getSettingFromComponent)(_this.model, component)) === null || _a === void 0 ? void 0 : _a.options;\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) {\n var _a;\n return option[(_a = component[\"displayOptionSetting\"]) !== null && _a !== void 0 ? _a : \"alias\"] ===\n actionValue;\n }))) {\n return false;\n }\n }\n else if (component.type === \"boolean\") {\n // if (actionValue !== \"enabled\" && actionValue !== \"disabled\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n else if (component.category === \"software\") {\n if (component.type === \"ComboBox\") {\n var options = component[\"options\"];\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {\n return false;\n }\n }\n else if (component.type === \"boolean\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n else if (component.category === \"table\") {\n if (!_this.tableRowCol)\n return false;\n if (((_c = (_b = component.columns) === null || _b === void 0 ? void 0 : _b[_this.tableRowCol]) === null || _c === void 0 ? void 0 : _c.type) === \"ComboBox\") {\n var options = (_f = (_e = (_d = component.columns) === null || _d === void 0 ? void 0 : _d[_this.tableRowCol]) === null || _e === void 0 ? void 0 : _e.defaultValue) === null || _f === void 0 ? void 0 : _f[\"options\"];\n if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {\n return false;\n }\n }\n else if (((_h = (_g = component.columns) === null || _g === void 0 ? void 0 : _g[_this.tableRowCol]) === null || _h === void 0 ? void 0 : _h.type) === \"boolean\") {\n if (actionValue !== true && actionValue !== false) {\n return false;\n }\n }\n }\n return true;\n };\n this.buildActions = function () {\n return _this.actions;\n };\n this.model = model;\n }\n InterruptActionsBuilder.createActionBuilder = function (model) {\n return new InterruptActionsBuilder(model);\n };\n return InterruptActionsBuilder;\n}());\nexports.InterruptActionsBuilder = InterruptActionsBuilder;\nfunction getDefaultInterruptActions(model, componentName) {\n if (!componentName)\n return [];\n return (InterruptActionsBuilder.createActionBuilder(model)\n .createActionFor(componentName)\n .addActionIfEnabled(true)\n .addActionIfDisabled(false)\n // .addActionIfEnabled(\"enabled\")\n // .addActionIfDisabled(\"disabled\")\n .buildActions());\n}\nexports.getDefaultInterruptActions = getDefaultInterruptActions;\n//# sourceMappingURL=InterruptActions.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PCPHelper = exports.stateActionBuilder = void 0;\nvar PCPStateActionBuilder_1 = require(\"./PCPStateActionBuilder\");\nfunction stateActionBuilder(pinRow) {\n return new PCPStateActionBuilder_1.PCPStateActionBuilder(pinRow);\n}\nexports.stateActionBuilder = stateActionBuilder;\nvar PCPHelper = /** @class */ (function () {\n function PCPHelper() {\n var _this = this;\n this.pinCallbacks = undefined;\n this.getAllFilteredRows = function (allRows) {\n var validRows = [];\n allRows.forEach(function (eachRow) {\n var userRowData = _this.userRowData(eachRow);\n // check the validity of user provided data\n if (userRowData && _this.isRowValid(userRowData)) {\n validRows.push(userRowData);\n }\n });\n return validRows;\n };\n this.isRowValid = function (eachRow) {\n if ((eachRow === null || eachRow === void 0 ? void 0 : eachRow.name) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.module) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.function) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.direction) &&\n (eachRow === null || eachRow === void 0 ? void 0 : eachRow.behaviour)) {\n return true;\n }\n else {\n return false;\n }\n };\n this.userRowData = function (eachRow) {\n var _a;\n var eachrowret = eachRow;\n if ((_a = _this.pinCallbacks) === null || _a === void 0 ? void 0 : _a.getRowData) {\n eachrowret = _this.pinCallbacks.getRowData(__assign({}, eachRow));\n }\n return eachrowret;\n };\n this.getAllRows = function () {\n var _a, _b, _c, _d, _e;\n var pinRows = (_d = (_c = (_b = (_a = _this.pinCallbacks) === null || _a === void 0 ? void 0 : _a.getPinsData) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.rows) !== null && _d !== void 0 ? _d : [];\n var userdata = {};\n if ((_e = _this.pinCallbacks) === null || _e === void 0 ? void 0 : _e.getCompletePinData) {\n userdata = _this.pinCallbacks.getCompletePinData();\n if (userdata && (userdata === null || userdata === void 0 ? void 0 : userdata.rows)) {\n pinRows = userdata.rows;\n }\n }\n return pinRows;\n };\n this.getData = function () {\n var retData = {\n rows: _this.getAllFilteredRows(_this.getAllRows()),\n };\n return retData;\n };\n }\n PCPHelper.prototype.stateActionBuilder = function (pinRow) {\n return stateActionBuilder(pinRow);\n };\n PCPHelper.prototype.setCallbacks = function (callbacks) {\n this.pinCallbacks = callbacks;\n };\n return PCPHelper;\n}());\nexports.PCPHelper = PCPHelper;\n//# sourceMappingURL=PCPHelper.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PCPStateActionBuilder = void 0;\nvar types_1 = require(\"@microchip/pins-interface/lib/types\");\nvar PCPStateActionBuilder = /** @class */ (function () {\n function PCPStateActionBuilder(pinRow) {\n this.actionDataArr = [];\n this.pinRow = pinRow;\n this.tabId = \"main\";\n }\n PCPStateActionBuilder.prototype.rowWithName = function (rowName) {\n this.rowName = rowName;\n return this;\n };\n /**\n *\n * @param tabId - default tabId is \"main\", please change this as per your needs.\n * @returns PCPStateActionBuilder\n */\n PCPStateActionBuilder.prototype.compWithTabId = function (tabId) {\n this.tabId = tabId;\n return this;\n };\n PCPStateActionBuilder.prototype.addIfLockedSetValue = function (pinRegEx, value, pinNameReEx) {\n this.actionDataArr.push({\n pinstate: types_1.pin_state.LOCKED,\n validFor: pinRegEx,\n validForpinNameReEx: pinNameReEx,\n value: value,\n actiontype: types_1.actiontype.SETACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.addIfLockedProvideAttribs = function (pinRegEx, attribs) {\n this.actionDataArr.push({\n pinstate: types_1.pin_state.LOCKED,\n validFor: pinRegEx,\n value: this.formAttribs(attribs),\n actiontype: types_1.actiontype.ATTRIBACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.addIfUnlockedProvideAttribs = function (pinRegEx, attribs) {\n this.actionDataArr.push({\n pinstate: types_1.pin_state.UNLOCK,\n validFor: pinRegEx,\n value: this.formAttribs(attribs),\n actiontype: types_1.actiontype.ATTRIBACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.formAttribs = function (attribarray) {\n return {\n attribs: attribarray,\n };\n };\n PCPStateActionBuilder.prototype.addIfUnLockedSetValue = function (pinRegEx, value) {\n this.actionDataArr.push({\n pinstate: types_1.pin_state.UNLOCK,\n validFor: pinRegEx,\n value: value,\n actiontype: types_1.actiontype.SETACTION,\n });\n return this;\n };\n PCPStateActionBuilder.prototype.forComponent = function (component) {\n this.component = component;\n return this;\n };\n PCPStateActionBuilder.prototype.build = function () {\n var _this = this;\n var actionArr = [];\n if (this.pinRow.name === this.rowName) {\n this.actionDataArr.forEach(function (eachData) {\n var _a;\n var _b;\n var actionObj = {\n validFor: eachData.validFor,\n state: (_a = {},\n _a[eachData.pinstate] = {\n type: \"[FORM] SUBMIT\",\n payload: {\n tabId: _this.tabId,\n path: _this.component.group + \".\" + _this.component.name,\n value: eachData.value,\n },\n },\n _a),\n actiontype: (_b = eachData.actiontype) !== null && _b !== void 0 ? _b : \"\",\n };\n if (eachData.validForpinNameReEx !== undefined) {\n actionObj.validForpinNameReEx = eachData.validForpinNameReEx;\n }\n actionArr.push(actionObj);\n });\n }\n return actionArr;\n };\n return PCPStateActionBuilder;\n}());\nexports.PCPStateActionBuilder = PCPStateActionBuilder;\n/*\n PCPHelper\n .stateActionBuilder(rowData)\n .rowWithName(\"dacoutx\")\n .forComponent(dacOPEnCompo)\n .addIfLockedSetValue(\"DAC1OUT1\", \"DACOUT1 Enabled and DACOUT2 Disabled\")\n .addIfLockedSetValue(\"DAC1OUT2\", \"DACOUT2 Enabled and DACOUT1 Disabled\")\n .addIfUnLockedSetValue(\".*\", \"DACOUT1 and DACOUT2 are Disabled\")\n .build()\n*/\n//# sourceMappingURL=PCPStateActionBuilder.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.process = void 0;\nvar AppModel_1 = require(\"./App/AppModel\");\nvar AutoModuleHelpers_1 = require(\"./autoModule/AutoModuleHelpers\");\nvar AutoModuleTemplates_1 = require(\"./autoModule/AutoModuleTemplates\");\nvar getConfigData_1 = require(\"./autoModule/getConfigData\");\nvar autoModuleView_1 = require(\"./autoModule/views/autoModuleView\");\nvar AnalyticsHelper_1 = require(\"./Analytics/AnalyticsHelper\");\n/**\n * @param initialModule\n * @param stage\n * @param getDerivedData\n */\nvar process = function (initialModule, stage, getDerivedData) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;\n initialModule = (0, AutoModuleHelpers_1.populateLoadedFiles)(initialModule);\n var model = (0, AppModel_1.getModel)(initialModule, getDerivedData);\n if (!model)\n return initialModule;\n var processedOutput = __assign({}, initialModule);\n switch (stage) {\n case \"arguments\":\n processedOutput = __assign(__assign({}, processedOutput), { imports: (_a = model\n .getImportInterfaces()\n .createProcessedImports(stage)) !== null && _a !== void 0 ? _a : initialModule.imports });\n break;\n case \"payloads\":\n processedOutput = __assign(__assign({}, processedOutput), { exports: (_b = model\n .getExportInterfaces()\n .createProcessedExports()) !== null && _b !== void 0 ? _b : initialModule.exports, name: model.getName(), help: (_e = (_d = (_c = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _c === void 0 ? void 0 : _c.overrideModuleLevelHelp) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : (0, getConfigData_1.getConfigData)(model).help });\n break;\n case \"results\":\n processedOutput = __assign(__assign({}, processedOutput), { imports: (_f = model\n .getImportInterfaces()\n .createProcessedImports(stage)) !== null && _f !== void 0 ? _f : initialModule.imports });\n break;\n case \"views\":\n {\n var customTemplateData = (_j = (_h = model === null || model === void 0 ? void 0 : (_g = model.getDerivedFunctions()).templateData) === null || _h === void 0 ? void 0 : _h.call(_g)) !== null && _j !== void 0 ? _j : {};\n var view = (0, autoModuleView_1.createAutoViewPayloads)(model);\n processedOutput = __assign(__assign({}, processedOutput), { payload: __assign(__assign({}, initialModule.payload), { auto: view, customView: (_l = (_k = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _k === void 0 ? void 0 : _k.getCustomView) === null || _l === void 0 ? void 0 : _l.call(_k, initialModule) }), templateData: customTemplateData, templates: (0, AutoModuleTemplates_1.getTemplates)(model), alerts: (_o = model === null || model === void 0 ? void 0 : (_m = model.getDerivedFunctions()).alerts) === null || _o === void 0 ? void 0 : _o.call(_m), name: model.getActiveName(), category: model.getCategory(), description: (_r = (_q = (_p = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _p === void 0 ? void 0 : _p.getModuleDescription) === null || _q === void 0 ? void 0 : _q.call(_p)) !== null && _r !== void 0 ? _r : (0, AutoModuleHelpers_1.getModuleDefaultDescription)(), globalNames: (_u = (_t = (_s = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _s === void 0 ? void 0 : _s.getGlobalNames) === null || _t === void 0 ? void 0 : _t.call(_s)) !== null && _u !== void 0 ? _u : [], analytics: (_x = (_w = (_v = model.getDerivedFunctions()).getAnalytics) === null || _w === void 0 ? void 0 : _w.call(_v)) !== null && _x !== void 0 ? _x : (0, AnalyticsHelper_1.getAnalyticsDefault)(model) });\n }\n break;\n default:\n return initialModule;\n }\n return processedOutput;\n};\nexports.process = process;\n//# sourceMappingURL=processor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UidMapBuilder = void 0;\nvar UidMapBuilder = /** @class */ (function () {\n function UidMapBuilder() {\n this.uidMap = {};\n }\n UidMapBuilder.prototype.addDefaultRows = function (rowData) {\n var _this = this;\n rowData.forEach(function (row, rowCount) {\n var _a;\n _this.uidMap[row.uid] = (_a = row.rowId) !== null && _a !== void 0 ? _a : rowCount;\n });\n return this;\n };\n UidMapBuilder.prototype.addDynamicRows = function (tableState) {\n var _this = this;\n tableState.forEach(function (row) {\n var uid = row === null || row === void 0 ? void 0 : row.uid;\n if (uid && uid.indexOf(\"dynamicRow_\") > -1) {\n _this.incrementUidAndShift(uid, row.rowId);\n }\n });\n return this;\n };\n UidMapBuilder.prototype.removeRows = function (tableState) {\n var _this = this;\n tableState.forEach(function (row) {\n var uid = row === null || row === void 0 ? void 0 : row.uid;\n if (uid && (row === null || row === void 0 ? void 0 : row.dynamicallyRemoved)) {\n _this.uidMap[uid] = -1;\n }\n });\n return this;\n };\n UidMapBuilder.prototype.sortByValue = function () {\n var _this = this;\n var count = 0;\n var sortedUids = [];\n this.getUidKeys().forEach(function (uid) {\n var _a;\n sortedUids.push((_a = {}, _a[uid] = _this.uidMap[uid], _a));\n });\n sortedUids = sortedUids.sort(function (a, b) { return a[Object.keys(a)[0]] - b[Object.keys(b)[0]]; });\n sortedUids.forEach(function (uid) {\n var uidKey = Object.keys(uid)[0];\n if (_this.uidMap[uidKey] > -1) {\n _this.uidMap[uidKey] = count++;\n }\n });\n return this;\n };\n UidMapBuilder.prototype.create = function () {\n return this.uidMap;\n };\n UidMapBuilder.prototype.incrementUidAndShift = function (uid, rowId) {\n var _this = this;\n this.getUidKeys().forEach(function (uid) {\n if (_this.uidMap[uid] >= rowId) {\n _this.uidMap[uid]++;\n }\n });\n this.uidMap[uid] = rowId;\n };\n UidMapBuilder.prototype.getUidKeys = function () {\n return Object.keys(this.uidMap);\n };\n return UidMapBuilder;\n}());\nexports.UidMapBuilder = UidMapBuilder;\n//# sourceMappingURL=UidMapBuilder.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHeaderStyle = exports.getCellStyle = exports.getTableUiSchema = exports.getTableActions = exports.getCellValidationInfo = exports.createTableUids = exports.overrideDefaultsAndFilterRows = exports.getValueBasedOnState = exports.getTableFormData = exports.removeRowFromTable = exports.addRowToTable = exports.addRowsToTable = exports.overrideCellValue = exports.createInitialRows = exports.getInitialTableFormData = exports.calculateColumnWidth = exports.isTableInState = exports.overrideTableDefaultsWithChanges = exports.getTableHelpers = exports.getTableComponentSchema = void 0;\nvar Tables_1 = require(\"@microchip/melody-automodule-interface/lib/src/Tables\");\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar UidMapBuilder_1 = require(\"./UidMapBuilder\");\nfunction getTableComponentSchema(component, viewModel) {\n var _a, _b, _c, _d;\n var tableColumns = {};\n for (var columnsKey in component.columns) {\n var rjsfType = void 0;\n if (component.columns[columnsKey].type === \"ComboBox\") {\n var colBox = component.columns[columnsKey];\n rjsfType = \"string\";\n tableColumns[columnsKey] = {\n type: rjsfType,\n title: colBox.title,\n default: getDefaultValue(viewModel.overrideDefaultValues, colBox, columnsKey, component.name),\n enum: getComboOptions(viewModel.overrideTableOptions, colBox, columnsKey, component.name),\n };\n }\n else {\n rjsfType = (_a = component === null || component === void 0 ? void 0 : component.columns[columnsKey]) === null || _a === void 0 ? void 0 : _a.type;\n tableColumns[columnsKey] = {\n type: rjsfType,\n title: component.columns[columnsKey].title,\n default: component.columns[columnsKey].defaultValue,\n };\n }\n }\n return {\n type: \"array\",\n title: (_d = (_c = (_b = viewModel.viewModel.derivedFunctions) === null || _b === void 0 ? void 0 : _b.overrideTitle) === null || _c === void 0 ? void 0 : _c.call(_b, component.name)) !== null && _d !== void 0 ? _d : component.description,\n items: {\n type: \"object\",\n properties: __assign({}, tableColumns),\n },\n };\n}\nexports.getTableComponentSchema = getTableComponentSchema;\nvar getTableHelpers = function () {\n return {\n addRowToTable: addRowToTable,\n addRowsToTable: addRowsToTable,\n calculateColumnWidth: calculateColumnWidth,\n createInitialRows: createInitialRows,\n createTableUids: createTableUids,\n getCellStyle: getCellStyle,\n getCellValidationInfo: getCellValidationInfo,\n getHeaderStyle: getHeaderStyle,\n getInitialTableFormData: getInitialTableFormData,\n getTableActions: getTableActions,\n getTableFormData: getTableFormData,\n getTableUiSchema: getTableUiSchema,\n getValueBasedOnState: getValueBasedOnState,\n isTableInState: isTableInState,\n overrideCellValue: overrideCellValue,\n overrideDefaultsAndFilterRows: overrideDefaultsAndFilterRows,\n overrideTableDefaultsWithChanges: overrideTableDefaultsWithChanges,\n removeRowFromTable: removeRowFromTable,\n createUidMapBuilder: function () { return new UidMapBuilder_1.UidMapBuilder(); },\n };\n};\nexports.getTableHelpers = getTableHelpers;\nfunction overrideTableDefaultsWithChanges(rowChanged, initialFormData, uidMap) {\n var value = __spreadArray([], initialFormData, true);\n if (Array.isArray(rowChanged)) {\n rowChanged.forEach(function (changedRow) {\n var changedUid = changedRow.uid;\n var rowChangeNum = uidMap[changedUid];\n value[rowChangeNum] = __assign(__assign({}, value[rowChangeNum]), changedRow);\n });\n }\n return value;\n}\nexports.overrideTableDefaultsWithChanges = overrideTableDefaultsWithChanges;\nfunction isTableInState(tabState, component) {\n return (tabState && tabState[component.group] && tabState[component.group][component.name]);\n}\nexports.isTableInState = isTableInState;\nfunction calculateColumnWidth(columns) {\n if (!columns) {\n return {};\n }\n var runningWidth = 0;\n var booleanFields = 0;\n var columnWidths = {};\n for (var columnName in columns) {\n if (columns[columnName].type === \"boolean\") {\n var width = 8;\n booleanFields++;\n columnWidths[columnName] = width;\n runningWidth += width;\n }\n }\n for (var columnName in columns) {\n if (columns[columnName].type !== \"boolean\") {\n var width = (100 - runningWidth) / (Object.keys(columns).length - booleanFields);\n columnWidths[columnName] = width;\n }\n }\n return columnWidths;\n}\nexports.calculateColumnWidth = calculateColumnWidth;\nfunction getInitialTableFormData(table, columnNames, model) {\n var value = [];\n var tableFormData = {};\n columnNames.forEach(function (columnName) {\n if (!tableFormData[columnName]) {\n tableFormData[columnName] = getDefaultValue(model.getDerivedFunctions().overrideTableDefaultValues, table.columns[columnName], columnName, table.name);\n }\n });\n if (!(table === null || table === void 0 ? void 0 : table.rowData)) {\n value = createInitialRows(table, tableFormData);\n }\n else {\n var rowId_1 = 0;\n table === null || table === void 0 ? void 0 : table.rowData.forEach(function (row) {\n var rowDataCols = Object.keys(row);\n columnNames.forEach(function (colName) {\n var _a;\n if (rowDataCols.indexOf(colName) === -1) {\n row = __assign(__assign({}, row), (_a = {}, _a[colName] = tableFormData[colName], _a.uid = createRowUid(Tables_1.RowPrefix.Default, rowId_1), _a));\n }\n });\n value.push(__assign(__assign({}, row), { uid: createRowUid(Tables_1.RowPrefix.Default, rowId_1), rowId: rowId_1 }));\n rowId_1++;\n });\n }\n return value;\n}\nexports.getInitialTableFormData = getInitialTableFormData;\nfunction createInitialRows(table, tableFormData) {\n var _a;\n if (tableFormData === void 0) { tableFormData = {}; }\n var value = [];\n var initialRows = (_a = table === null || table === void 0 ? void 0 : table.defaultRowNum) !== null && _a !== void 0 ? _a : 1;\n for (var i = 0; i < initialRows; i++) {\n value.push(__assign(__assign({}, tableFormData), { rowId: i, uid: createRowUid(Tables_1.RowPrefix.Default, i) }));\n }\n return value;\n}\nexports.createInitialRows = createInitialRows;\nfunction overrideCellValue(tableData, cell) {\n var modifiedTableData = __spreadArray([], tableData, true);\n modifiedTableData[cell.rowId][cell.columnName] = cell.value;\n return modifiedTableData;\n}\nexports.overrideCellValue = overrideCellValue;\nfunction addRowsToTable(tableData, columns, newRow, numberOfRows) {\n if (numberOfRows <= 0) {\n return tableData;\n }\n var value = addRowToTable(tableData, columns, __assign(__assign({}, newRow), { uid: Tables_1.RowPrefix.Dynamic + (numberOfRows - 1) }));\n return addRowsToTable(value, columns, newRow, numberOfRows - 1);\n}\nexports.addRowsToTable = addRowsToTable;\nfunction addRowToTable(tableData, columns, newRow) {\n var _a;\n var columnNames = Object.keys(columns);\n var newRowCols = Object.keys(newRow);\n var newRowId = newRow.rowId;\n var filteredTableTemp = [];\n if (tableData.length === 0) {\n filteredTableTemp.push(newRow);\n return filteredTableTemp;\n }\n if (newRowId != null) {\n columnNames.forEach(function (colName) {\n var _a;\n var _b, _c;\n var defaultColumnWidth = calculateColumnWidth(columns);\n if (newRowCols.indexOf(colName) === -1) {\n newRow = __assign(__assign({}, newRow), (_a = {}, _a[colName] = (_c = (_b = columns[colName].defaultValue) === null || _b === void 0 ? void 0 : _b[\"value\"]) !== null && _c !== void 0 ? _c : columns[colName].defaultValue, _a.columnWidth = columns[colName].columnWidth\n ? columns[colName].columnWidth + \"%\"\n : defaultColumnWidth[colName] + \"%\", _a));\n }\n });\n var tableFirstHalf = tableData.slice(0, newRowId);\n var tableSecondHalf = tableData.slice(newRowId);\n for (var i = 0; i < tableSecondHalf.length; i++) {\n var currentRowId = tableSecondHalf[i].rowId;\n tableSecondHalf[i] = __assign(__assign({}, tableSecondHalf[i]), { rowId: currentRowId + 1 });\n var actions = (_a = tableSecondHalf[i]) === null || _a === void 0 ? void 0 : _a.actions;\n if (actions) {\n tableSecondHalf[i][\"actions\"] = updateActionsRowId(actions, currentRowId + 1);\n }\n }\n tableFirstHalf.push(newRow);\n filteredTableTemp = __spreadArray(__spreadArray([], tableFirstHalf, true), tableSecondHalf, true);\n return filteredTableTemp;\n }\n return tableData;\n}\nexports.addRowToTable = addRowToTable;\nfunction removeRowFromTable(tableData, rowId) {\n var _a;\n var tableRemoved = tableData.filter(function (row) { return row.rowId !== rowId; });\n for (var i = 0; i < tableRemoved.length; i++) {\n tableRemoved[i].rowId = i;\n var actions = (_a = tableRemoved[i]) === null || _a === void 0 ? void 0 : _a.actions;\n if (actions) {\n tableRemoved[i][\"actions\"] = updateActionsRowId(actions, i);\n }\n }\n return tableRemoved;\n}\nexports.removeRowFromTable = removeRowFromTable;\nfunction getTableFormData(model, table, tab) {\n var _a;\n return ((_a = model.getDerivedFunction(table.name, table, model, tab)) !== null && _a !== void 0 ? _a : getValueBasedOnState(table, model, tab));\n}\nexports.getTableFormData = getTableFormData;\nfunction getValueBasedOnState(table, model, tab) {\n var columnNames = Object.keys(table.columns);\n var modelState = model.getState();\n var tabState = modelState ? modelState[tab] : undefined;\n var initialFormData = getInitialTableFormData(table, columnNames, model);\n if (!isTableInState(tabState, table)) {\n return initialFormData;\n }\n else {\n var rowChanged = tabState[table.group][table.name];\n var tableUids = createTableUids(table, tab, model, rowChanged);\n return overrideDefaultsAndFilterRows(rowChanged, initialFormData, table.columns, tableUids, table, tab);\n }\n}\nexports.getValueBasedOnState = getValueBasedOnState;\nfunction overrideDefaultsAndFilterRows(rowChanged, initialFormData, columns, tableUids, component, tab) {\n var modifiedForData = __spreadArray([], initialFormData, true);\n var keys = Object.keys(tableUids);\n rowChanged = rowChanged.filter(function (row) { return row != null; });\n rowChanged.forEach(function (row) {\n if (row.uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1) {\n modifiedForData.push(row);\n }\n });\n var filteredModifed = [];\n keys.forEach(function (uid) {\n modifiedForData.forEach(function (row) {\n if (row.uid === uid) {\n filteredModifed[tableUids[uid]] = __assign(__assign({}, initialFormData[0]), row);\n }\n });\n });\n filteredModifed = filteredModifed.filter(function (row) { return row; });\n for (var i = 0; i < filteredModifed.length; i++) {\n if (filteredModifed[i].uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1)\n continue;\n filteredModifed[i].rowId++;\n }\n var _loop_1 = function (i) {\n Object.keys(columns).forEach(function (columnName) {\n modifiedForData[i].actions = updateActionsRowId(createDefaultTableAction(component, i, columnName, tab, tableUids), i);\n });\n };\n for (var i = 0; i < modifiedForData.length; i++) {\n _loop_1(i);\n }\n return overrideTableDefaultsWithChanges(rowChanged, filteredModifed, tableUids);\n}\nexports.overrideDefaultsAndFilterRows = overrideDefaultsAndFilterRows;\nfunction createTableUids(component, tab, model, tableState) {\n var _a, _b, _c;\n var table = component;\n var dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);\n if (dynamicTableData) {\n var uidMap_1 = {};\n var rowNum_1 = 0;\n dynamicTableData.forEach(function (entry) {\n var uid = entry === null || entry === void 0 ? void 0 : entry.uid;\n if (uid !== undefined) {\n uidMap_1[uid] = rowNum_1++;\n }\n });\n return uidMap_1;\n }\n var rowData = table[\"rowData\"];\n if (!dynamicTableData && rowData) {\n var _loop_2 = function (i) {\n if (!rowData[i].uid) {\n rowData[i].uid = createRowUid(Tables_1.RowPrefix.Default, i);\n }\n rowData[i].rowId =\n (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (row) { return row.uid === (rowData === null || rowData === void 0 ? void 0 : rowData[i].uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : rowData[i].rowId;\n };\n for (var i = 0; i < rowData.length; i++) {\n _loop_2(i);\n }\n }\n else {\n rowData =\n dynamicTableData !== null && dynamicTableData !== void 0 ? dynamicTableData : createInitialRows(table).map(function (row) {\n var _a, _b;\n return __assign(__assign({}, (row !== null && row !== void 0 ? row : {})), { rowId: (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (r) { return r.uid === (row === null || row === void 0 ? void 0 : row.uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : row.rowId });\n });\n }\n var uidMapBuilder = (_c = model === null || model === void 0 ? void 0 : model.getTableHelpers().createUidMapBuilder()) !== null && _c !== void 0 ? _c : (0, exports.getTableHelpers)().createUidMapBuilder();\n return uidMapBuilder\n .addDefaultRows(rowData)\n .addDynamicRows(tableState !== null && tableState !== void 0 ? tableState : [])\n .removeRows(tableState !== null && tableState !== void 0 ? tableState : [])\n .sortByValue()\n .create();\n}\nexports.createTableUids = createTableUids;\nfunction getCellValidationInfo(component) {\n var table = component;\n var colInfo = [];\n var columns = table.columns;\n for (var column in columns) {\n var colData = table.columns[column];\n if (colData === null || colData === void 0 ? void 0 : colData[\"cellValidator\"]) {\n colInfo.push({\n type: colData[\"type\"],\n minValue: colData[\"cellValidator\"][\"minValue\"],\n maxValue: colData[\"cellValidator\"][\"maxValue\"],\n errMessage: colData[\"cellValidator\"][\"errorMessage\"],\n errTitle: colData[\"cellValidator\"][\"errorTitle\"],\n cValidation: colData[\"cellValidator\"][\"cValidation\"],\n cValidationErrTitle: colData[\"cellValidator\"][\"cValidationErrorTitle\"],\n cValidationErrMessage: colData[\"cellValidator\"][\"cValidationErrorMessage\"],\n });\n }\n }\n return colInfo;\n}\nexports.getCellValidationInfo = getCellValidationInfo;\nfunction getTableActions(component, tab, model, uids, rowFormData) {\n var _a, _b, _c, _d, _e;\n var table = component;\n var dynamicTableData;\n if (!rowFormData) {\n dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);\n }\n var rowData = (_b = (_a = rowFormData !== null && rowFormData !== void 0 ? rowFormData : dynamicTableData) !== null && _a !== void 0 ? _a : table[\"rowData\"]) !== null && _b !== void 0 ? _b : createInitialRows(table);\n var columnNames = Object.keys(table.columns);\n var tableActions = { table: {} };\n var rowCount = 0;\n var tableState = (_e = (_d = (_c = model === null || model === void 0 ? void 0 : model.getState()) === null || _c === void 0 ? void 0 : _c[tab]) === null || _d === void 0 ? void 0 : _d[component.group]) === null || _e === void 0 ? void 0 : _e[component.name];\n rowData.forEach(function (row) {\n columnNames.forEach(function (columnName) {\n var _a, _b, _c, _d;\n if (!tableActions[\"table\"][row.uid]) {\n tableActions[\"table\"][row.uid] = {};\n }\n var uid;\n for (var uidsKey in uids) {\n if (uids[uidsKey] === row.rowId) {\n uid = uidsKey;\n }\n }\n uid = uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount);\n var defaultAction = createDefaultTableAction(component, rowCount, columnName, tab, uid);\n if (tableState) {\n var ind_1 = -1;\n var filtered = tableState.filter(function (row, index) {\n ind_1 = index;\n return row.uid === uid;\n });\n if (filtered.length) {\n defaultAction = createDefaultTableAction(component, ind_1, columnName, tab, uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount));\n }\n }\n if (component.columns[columnName].type == \"ComboBox\") {\n defaultAction[\"payload\"] = __assign(__assign({}, defaultAction[\"payload\"]), { options: getComboOptions((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.overrideTableOptions, table.columns[columnName], columnName, component.name) });\n }\n var cellAction = (_c = (_b = row.actions) === null || _b === void 0 ? void 0 : _b[columnName]) !== null && _c !== void 0 ? _c : defaultAction;\n tableActions[\"table\"][row.uid][columnName] =\n (_d = model === null || model === void 0 ? void 0 : model.getDerivedFunction(\"getActions\", table.name, cellAction)) !== null && _d !== void 0 ? _d : cellAction;\n });\n rowCount++;\n });\n var uidKeys = Object.keys(uids);\n uidKeys.forEach(function (uidKey) {\n columnNames.forEach(function (columnName) {\n if (uids[uidKey] > -1) {\n if (!tableActions[\"table\"][uidKey]) {\n tableActions[\"table\"][uidKey] = {};\n tableActions[\"table\"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);\n }\n else if (!tableActions[\"table\"][uidKey][columnName]) {\n tableActions[\"table\"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);\n }\n }\n });\n });\n return JSON.stringify(tableActions);\n}\nexports.getTableActions = getTableActions;\nfunction getTableUiSchema(table, columns) {\n var _a, _b;\n var tableUi = {\n tableCols: columns,\n search: table[\"isSearchable\"],\n striped: false,\n bordered: false,\n };\n if (table[\"canRemoveRows\"]) {\n tableUi = __assign(__assign({}, tableUi), { rightActions: getTableRightActions() });\n }\n if (table[\"canInsertRows\"]) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: getTableLeftActions() });\n }\n if (table.canMoveRowDown) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: ((_a = tableUi.leftActions) !== null && _a !== void 0 ? _a : []).concat(getTableMoveRowActions()[0]) });\n }\n if (table.canMoveRowUp) {\n tableUi = __assign(__assign({}, tableUi), { leftActions: ((_b = tableUi.leftActions) !== null && _b !== void 0 ? _b : []).concat(getTableMoveRowActions()[1]) });\n }\n return {\n \"ui:field\": \"table\",\n className: \"col-md-12 individualComponent\",\n table: __assign({}, tableUi),\n };\n}\nexports.getTableUiSchema = getTableUiSchema;\nfunction getCellStyle(isReadonly) {\n var tdStyle = {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n if (isReadonly) {\n tdStyle[\"backgroundColor\"] = \"#EEEEEE\";\n }\n return tdStyle;\n}\nexports.getCellStyle = getCellStyle;\nfunction getHeaderStyle(maxHeaderSize, displayHeadersDiagonally) {\n return displayHeadersDiagonally\n ? getDiagonalHeaderStyles(maxHeaderSize)\n : getDefaultHeaderStyles(maxHeaderSize);\n}\nexports.getHeaderStyle = getHeaderStyle;\nfunction getDiagonalHeaderStyles(maxHeaderSize) {\n var headerSizeMultiplier = 3.3;\n return {\n position: \"relative\",\n bottom: \"-7px\",\n pointerEvents: \"none\",\n left: \"6px\",\n transformOrigin: \"bottom left\",\n transform: \"rotate(-30deg)\",\n paddingTop: \"\".concat(headerSizeMultiplier * maxHeaderSize, \"px\"),\n };\n}\nfunction getDefaultHeaderStyles(maxHeaderSize) {\n return {\n whiteSpace: \"unset\",\n maxWidth: \"\".concat(maxHeaderSize, \"px\"),\n };\n}\nfunction createDefaultTableAction(component, row, column, tab, uid) {\n return {\n type: \"[Table] EDIT_CELL\",\n payload: {\n tabId: tab !== null && tab !== void 0 ? tab : \"main\",\n path: \"\".concat(component === null || component === void 0 ? void 0 : component.group, \".\").concat(component === null || component === void 0 ? void 0 : component.name),\n column: column,\n value: \"%v\",\n uid: uid,\n rowId: row,\n },\n };\n}\nfunction updateActionsRowId(currentActions, rowId) {\n var modifiedActions = __assign({}, currentActions);\n var columnNames = Object.keys(currentActions);\n columnNames.forEach(function (columnName) {\n var _a;\n var payload = (_a = modifiedActions[columnName]) === null || _a === void 0 ? void 0 : _a[\"payload\"];\n if (payload) {\n var path = payload[\"path\"].split(\".\");\n path[path.length - 2] = rowId;\n modifiedActions[columnName][\"payload\"][\"rowId\"] = rowId;\n modifiedActions[columnName][\"payload\"][\"path\"] = path.join(\".\");\n }\n });\n return modifiedActions;\n}\nvar getDefaultValue = function (overrideDefaultValues, component, componentName, tableName) {\n var _a;\n return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(tableName, componentName)) !== null && _a !== void 0 ? _a : (component.type === \"ComboBox\"\n ? component.defaultValue.value\n : component.defaultValue));\n};\nvar getComboOptions = function (overrideOptions, component, componentName, tableName) {\n var _a;\n var dynamicOptions = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(tableName, componentName);\n return dynamicOptions && dynamicOptions.length > 0\n ? dynamicOptions\n : (_a = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _a === void 0 ? void 0 : _a[\"options\"];\n};\nfunction getTableLeftActions() {\n return [\n {\n dataField: \"insert-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n tdStyle: { textOverflow: \"unset\" },\n },\n ];\n}\nfunction getTableRightActions() {\n return [\n {\n dataField: \"delete-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n tdStyle: { textOverflow: \"unset\" },\n },\n ];\n}\nfunction getTableMoveRowActions() {\n return [\n {\n dataField: \"row-down-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n },\n {\n dataField: \"row-up-button\",\n editable: false,\n displayName: \"\",\n columnWidth: \"21px\",\n width: \"21px\",\n },\n ];\n}\nfunction createRowUid(prefix, postfix) {\n return prefix + postfix;\n}\n//# sourceMappingURL=tables.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;\nvar AlertTypes;\n(function (AlertTypes) {\n AlertTypes[\"Error\"] = \"error\";\n AlertTypes[\"Warning\"] = \"warning\";\n AlertTypes[\"Hint\"] = \"hint\";\n})(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction hasOptions(dep) {\n return dep.options !== undefined;\n}\nexports.hasOptions = hasOptions;\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isAssigned(dep) {\n return typeof dep.handle !== \"undefined\";\n}\nexports.isAssigned = isAssigned;\n/**\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n */\nfunction isUnassigned(dep) {\n return typeof dep.handle === \"undefined\";\n}\nexports.isUnassigned = isUnassigned;\n/**\n * Type guard function for SingletonExport\n * See User-Defined Type Guards in the Typescript Handbook on Advanced Types\n * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html\n * @param resource the export to check on being a singleton\n * @deprecated No longer used. Replaced with dynamic singleton identification\n * at runtime.\n */\nfunction isSingleton(resource) {\n return typeof resource.isSingleton !== \"undefined\" && resource.isSingleton;\n}\nexports.isSingleton = isSingleton;\n/**\n * Returns a copy of `populatedImport` with all options removed which\n * cause `optionFilter` to return false.\n */\nfunction filterOptions(populatedImport, optionFilter) {\n if (populatedImport.options) {\n return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });\n }\n return populatedImport;\n}\nexports.filterOptions = filterOptions;\n/**\n * Returns a copy of `populatedImport` with the options' handle labels\n * mapped according to `labelFactory`.\n */\nfunction mapOptionLabels(populatedImport, labelFactory) {\n if (populatedImport.options) {\n return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {\n return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });\n }) });\n }\n return populatedImport;\n}\nexports.mapOptionLabels = mapOptionLabels;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Setting_1 = require(\"./Setting\");\nvar Register_1 = require(\"./Register\");\nvar Arrays_1 = require(\"./util/Arrays\");\n/** Builder pattern */\nvar CalculateRegisterValue = /** @class */ (function () {\n function CalculateRegisterValue(register) {\n var _this = this;\n this.modifiedSettings = [];\n /** Assign a numerical value to the given `Setting`. */\n this.withNumberValue = function (setting, value) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign number value to setting, setting is undefined.\");\n }\n if (!_this.getSetting(setting)) {\n throw new Error(\"Setting \".concat(setting.alias, \" is not present in Register \").concat(_this.register.name));\n }\n _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [\n new NumberSettingValue(setting, value),\n ], false);\n return _this;\n };\n /** Assign the given `Option` to the given `Setting`. */\n this.withOption = function (setting, option) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option to setting, setting is undefined.\");\n }\n if (!_this.getSetting(setting)) {\n throw new Error(\"Setting \".concat(setting.alias, \" is not present in Register \").concat(_this.register.name));\n }\n if (!option || !_this.getOption(setting, option)) {\n throw new Error(\"Option \".concat(option === null || option === void 0 ? void 0 : option.name, \" is not present in Setting \").concat(setting.name));\n }\n _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [\n new OptionSettingValue(setting, option),\n ], false);\n return _this;\n };\n /** Assign the `Option` matching the given alias to the given `Setting`. */\n this.withOptionAlias = function (setting, optionAlias) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option alias to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);\n if (option === undefined) {\n throw new Error(\"Option Alias: \\\"\".concat(optionAlias, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n /** Assign the `Option` matching the given name to the given `Setting`. */\n this.withOptionName = function (setting, optionName) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option name to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByName)(optionName, setting);\n if (option === undefined) {\n throw new Error(\"Option Name: \\\"\".concat(optionName, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n /** Assign the `Option` matching the given description to the given `Setting`. */\n this.withOptionDescription = function (setting, optionDescription) {\n if (setting === undefined) {\n throw new Error(\"Cannot assign option description to setting, setting is undefined.\");\n }\n var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);\n if (option === undefined) {\n throw new Error(\"Option Description: \\\"\".concat(optionDescription, \"\\\" not present in Setting: \\\"\").concat(setting.name, \"\\\".\"));\n }\n return _this.withOption(setting, option);\n };\n this.getSetting = function (setting) {\n return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);\n };\n this.getOption = function (setting, option) {\n return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;\n };\n this.calculate = function () {\n var registerValue = 0;\n _this.modifiedSettings.forEach(function (modifiedSetting) {\n registerValue = _this.setValue(modifiedSetting, registerValue);\n });\n var unmodifiedSettings = _this.getUnmodifiedSettings();\n unmodifiedSettings.forEach(function (unmodifiedSetting) {\n registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);\n });\n return Number(registerValue);\n };\n this.setValue = function (setting, registerValue) {\n var value = registerValue;\n value &= ~setting.getMask(); // Clear bits\n value |= setting.getShiftedValue(); // Set bits\n return value >>> 0;\n };\n this.getUnmodifiedSettings = function () {\n var _a, _b;\n var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {\n return setting.getName();\n });\n return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });\n };\n /** Calculate and print the register's value as a hex string. */\n this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };\n /** Calculate and print the register's value as a binary string. */\n this.asBinaryString = function () {\n return CalculateRegisterValue.toBinaryString(_this.calculate());\n };\n /** Calculate and print the register's value as a decimal string. */\n this.asDecimalString = function () {\n return CalculateRegisterValue.toDecimalString(_this.calculate());\n };\n /** Calculate and return the register's value as a number. */\n this.asNumber = function () { return _this.calculate(); };\n this.register = register;\n }\n /** Creates a register value calculation object for the given register. */\n CalculateRegisterValue.for = function (register) {\n return new CalculateRegisterValue(register);\n };\n /** Format the given number as a hex string value. */\n CalculateRegisterValue.toHexString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.\");\n }\n return \"0x\" + value.toString(16);\n };\n /** Format the given number as a binary string value. */\n CalculateRegisterValue.toBinaryString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.\");\n }\n return \"0b\" + value.toString(2);\n };\n /** Format the given number as a decimal string value. */\n CalculateRegisterValue.toDecimalString = function (value) {\n if (value == null) {\n throw new Error(\"CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.\");\n }\n return value.toString();\n };\n return CalculateRegisterValue;\n}());\nexports.default = CalculateRegisterValue;\nvar SettingValue = /** @class */ (function () {\n function SettingValue(setting) {\n var _this = this;\n this.getMask = function () { return Number(_this.setting.mask); };\n this.getShift = function () {\n var mask = _this.getMask();\n var shiftIndex = 0;\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n shiftIndex++;\n }\n return shiftIndex;\n };\n this.getShiftedValue = function () { return _this.getValue() << _this.getShift(); };\n this.getName = function () { return _this.setting.name; };\n this.setting = setting;\n }\n SettingValue.defaultValue = function (setting) {\n var value = Number(setting.porDefault);\n return new NumberSettingValue(setting, value);\n };\n return SettingValue;\n}());\nvar NumberSettingValue = /** @class */ (function (_super) {\n __extends(NumberSettingValue, _super);\n function NumberSettingValue(setting, value) {\n var _this = _super.call(this, setting) || this;\n _this.getValue = function () { return _this.value; };\n _this.value = value;\n return _this;\n }\n return NumberSettingValue;\n}(SettingValue));\nvar OptionSettingValue = /** @class */ (function (_super) {\n __extends(OptionSettingValue, _super);\n function OptionSettingValue(setting, option) {\n var _this = _super.call(this, setting) || this;\n _this.getValue = function () { return Number(_this.option.value); };\n _this.option = option;\n return _this;\n }\n OptionSettingValue.fromDefaultValue = function (setting, value) {\n var foundValueByName = (0, Setting_1.getOptionByName)(value, setting);\n if (foundValueByName)\n return new OptionSettingValue(setting, foundValueByName);\n var foundValueByAlias = (0, Setting_1.getOptionByAlias)(value, setting);\n if (foundValueByAlias)\n return new OptionSettingValue(setting, foundValueByAlias);\n throw new Error(\"Unable to create default value '\".concat(value, \"' for setting '\").concat(setting.name, \"'.\"));\n };\n return OptionSettingValue;\n}(SettingValue));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSettingByAlias = void 0;\nvar getSettingByAlias = function (alias, register) {\n var _a;\n return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];\n};\nexports.getSettingByAlias = getSettingByAlias;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;\nvar Arrays_1 = require(\"./util/Arrays\");\n/**\n * Converts a hexadecimal string to binary.\n * Any leading zeros are removed from the returned string.\n */\nvar hexToBinary = function (hex) {\n return parseInt(hex, 16).toString(2);\n};\n/**\n * Returns a string of the corresponding bit position(s).\n */\nvar getBitLabel = function (setting) {\n if (setting.mask === undefined) {\n return undefined;\n }\n var bitRange = (0, exports.getBitRange)(setting);\n if (!bitRange)\n return undefined;\n if (bitRange.high === bitRange.low) {\n return \"bit \".concat(bitRange.high);\n }\n return \"bit \".concat(bitRange.high, \"-\").concat(bitRange.low);\n};\nexports.getBitLabel = getBitLabel;\n/**\n * Converts the hexadecimal mask provided within the register setting\n * and returns an interface containing the corresponding low and high bit positions.\n */\nvar getBitRange = function (setting) {\n if (!setting.mask)\n return undefined;\n var processedHex = hexToBinary(setting.mask);\n return {\n high: processedHex.length - 1,\n low: getBitRangeLow(processedHex),\n };\n};\nexports.getBitRange = getBitRange;\nvar getOptionByAlias = function (alias, setting) {\n var _a, _b;\n var result = (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });\n if (!result) {\n result = (0, Arrays_1.find)((_b = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _b !== void 0 ? _b : [], function (option) { return option.description == alias; });\n }\n return result;\n};\nexports.getOptionByAlias = getOptionByAlias;\nvar getOptionByName = function (name, setting) {\n var _a;\n return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });\n};\nexports.getOptionByName = getOptionByName;\nvar getOptionByDescription = function (description, setting) {\n var _a;\n return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });\n};\nexports.getOptionByDescription = getOptionByDescription;\nvar getOptionNames = function (setting) {\n var _a;\n return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });\n};\nexports.getOptionNames = getOptionNames;\nvar getOptionDescriptions = function (setting) {\n var _a;\n return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });\n};\nexports.getOptionDescriptions = getOptionDescriptions;\nfunction getBitRangeLow(processedHex) {\n if (processedHex.charAt(1) === \"1\") {\n var index = 1;\n while (processedHex.charAt(index) === \"1\") {\n index++;\n }\n return processedHex.length - index;\n }\n else {\n return processedHex.length - 1;\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;\nvar map = function (arr, callback) {\n var result = [];\n arr.forEach(function (value, index) {\n result[index] = callback(value);\n });\n return result;\n};\nexports.map = map;\nvar filter = function (arr, callback) {\n var result = [];\n arr.forEach(function (value) {\n if (callback(value)) {\n result.push(value);\n }\n });\n return result;\n};\nexports.filter = filter;\n/**\n * Iterates over elements of the array, returning the first element that the predicate returns truthy for.\n */\nvar find = function (arr, callback) {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i])) {\n return arr[i];\n }\n }\n return undefined;\n};\nexports.find = find;\n/** @returns the non-prototype keys of the given object */\nvar getKeys = function (obj) {\n if (!obj)\n return undefined;\n return Object.getOwnPropertyNames(obj);\n};\nexports.getKeys = getKeys;\nvar values = function (obj) {\n var _a;\n if (!obj)\n return undefined;\n return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });\n};\nexports.values = values;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildSimpleApi = function (functions) {\n var api = {};\n for (var key in functions) {\n api[key] = buildFunction(functions[key]);\n }\n return api;\n};\nvar buildFunction = function (cFunction) {\n return cFunction.returns + \" \" + cFunction.name + \"(\" + buildArguments(cFunction.arguments) + \")\";\n};\nvar buildArguments = function (args) {\n if (args) {\n return args.map(function (arg) { return arg.type + \" \" + arg.name; }).join(\", \");\n }\n else {\n return \"void\";\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInterfaceName = function (pkgJson) {\n var strReplace = \"@microchip/\";\n var interfaceName;\n if (pkgJson) {\n interfaceName = pkgJson[\"name\"];\n if (interfaceName) {\n interfaceName = interfaceName.replace(strReplace, \"\");\n }\n }\n if (!interfaceName) {\n throw new Error(\"Invalid Interface Name...!\");\n }\n return interfaceName;\n};\nexports.getInterfaceVersion = function (pkgJson) {\n var versionRegex = new RegExp(\"\\\\d+.\\\\d+.\\\\d+\");\n var version;\n if (pkgJson) {\n version = pkgJson[\"version\"];\n }\n if (!version && !versionRegex.test(version)) {\n throw new Error(\"Invalid Interface Version...!\");\n }\n return version;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar c_function_types_1 = require(\"./c-function-types\");\nexports.buildSimpleApi = c_function_types_1.buildSimpleApi;\nvar helpers_1 = require(\"./helpers\");\nexports.getInterfaceName = helpers_1.getInterfaceName;\nexports.getInterfaceVersion = helpers_1.getInterfaceVersion;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateRegisterView = void 0;\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar ViewSchemaBuilder_1 = require(\"./ViewSchemaBuilder\");\nvar Model_1 = require(\"./Model\");\nvar throwError = function (message) {\n throw new Error(message);\n};\nvar CreateRegisterView = /** @class */ (function () {\n function CreateRegisterView(module) {\n var _this = this;\n this.registers = [];\n this.interrupts = [];\n /** Create a register view */\n this.create = function () {\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n title: \"Register Settings\",\n type: \"object\",\n })\n .withTabName(\"Register Initialization\")\n .withExpandedDefault(false);\n _this.registers.forEach(function (reg) {\n schemaBuilder.addChildComponent(reg.getRegister().name, _this.createRegisterView(reg));\n });\n schemaBuilder.addChildComponent(\"interrupts\", _this.createInterruptView());\n return schemaBuilder.build();\n };\n /** Assign a numerical value to the given register. */\n this.withRegisterValue = function (register, value) {\n _this.getSafeRegisterViewModel(register).setValue(value);\n return _this;\n };\n /** Assign a string value to the given interrupt. */\n this.withInterruptValue = function (interrupt, value) {\n _this.getSafeInterruptViewModel(interrupt).setValue(value);\n return _this;\n };\n /** Assign the interrupt combobox options. */\n this.withInterruptOptions = function (interrupt, options) {\n _this.getSafeInterruptViewModel(interrupt).setOptions(options);\n return _this;\n };\n /** Make all settings in all registers editable */\n this.withAllEditable = function () {\n _this.registers.forEach(function (register) {\n return _this.withEditableRegister(register.getRegister());\n });\n _this.interrupts.forEach(function (interrupt) {\n _this.withEditableInterrupt(interrupt.getInterrupt());\n });\n return _this;\n };\n /** Make settings in the given register editable based on setting type*/\n this.withEditableRegister = function (register) {\n var _a, _b;\n _this.getSafeRegisterViewModel(register).setReadonly(false);\n if (register) {\n (_b = (0, Arrays_1.values)((_a = register === null || register === void 0 ? void 0 : register.settings) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {\n if ((setting === null || setting === void 0 ? void 0 : setting.type) === \"R\") {\n _this.getSafeSettingViewModel(register, setting).setReadonly(true);\n }\n });\n }\n return _this;\n };\n /** Make a given setting in register editable */\n this.withEditableSetting = function (register, setting) {\n _this.getSafeSettingViewModel(register, setting).setReadonly(false);\n return _this;\n };\n /** Make a given interrupt editable */\n this.withEditableInterrupt = function (interrupt) {\n _this.getSafeInterruptViewModel(interrupt).setReadonly(false);\n return _this;\n };\n this.getSafeRegisterViewModel = function (register) {\n var _a;\n return (_a = _this.getRegisterViewModel(register !== null && register !== void 0 ? register : throwError(\"Invalid register parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get register view model for '\".concat(register.name, \"'. Not found in this module.\"));\n };\n this.getSafeInterruptViewModel = function (interrupt) {\n var _a;\n return (_a = _this.getInterruptViewModel(interrupt !== null && interrupt !== void 0 ? interrupt : throwError(\"Invalid interrupt parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get interrupt view model for '\".concat(interrupt.name, \"'. Not found in this module.\"));\n };\n this.getSafeSettingViewModel = function (register, setting) {\n var _a;\n return (_a = _this.getSafeRegisterViewModel(register).getSettingViewModel(setting !== null && setting !== void 0 ? setting : throwError(\"Invalid setting parameter.\"))) !== null && _a !== void 0 ? _a : throwError(\"Cannot get setting view model for '\".concat(setting.name, \"'. Not found in this module.\"));\n };\n this.getRegisterViewModel = function (register) {\n var name = register.name;\n return (0, Arrays_1.find)(_this.registers, function (rv) { return rv.getRegister().name === name; });\n };\n this.getInterruptViewModel = function (interrupt) {\n var name = interrupt.name;\n return (0, Arrays_1.find)(_this.interrupts, function (rv) { return rv.getInterrupt().name === name; });\n };\n this.createRegisterView = function (register) {\n var registerValue = register.getValue() || 0;\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n type: \"object\",\n title: register.getName() +\n \" : \" +\n CalculateRegisterValue_1.default.toHexString(registerValue),\n description: register.getDescription(),\n properties: {},\n })\n .withUiSchema({})\n .withFormData({});\n register.forEachSetting(function (setting) {\n schemaBuilder.addChildComponent(setting.getName(), _this.createSettingView(setting));\n });\n return schemaBuilder.build();\n };\n this.createSettingView = function (setting) {\n return setting.hasOptions()\n ? _this.createHasOptionsViewSchema(setting)\n : _this.getNoOptionsViewSchema(setting);\n };\n this.createInterruptView = function () {\n var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()\n .withSchema({\n type: \"object\",\n title: \"Interrupts\",\n properties: {},\n })\n .withUiSchema({})\n .withFormData({});\n _this.interrupts.forEach(function (int) {\n schemaBuilder.addChildComponent(int.getInterrupt().name, _this.createInterruptViewSchema(int));\n });\n return schemaBuilder.build();\n };\n this.module = module;\n this.registers = this.createRegisterViewModelForEachRegister(module);\n this.interrupts = this.createInterruptViewModelForEachInterrupt(module);\n }\n CreateRegisterView.prototype.createRegisterViewModelForEachRegister = function (module) {\n var _a;\n var models = [];\n var registers = (_a = module.registers) !== null && _a !== void 0 ? _a : {};\n Object.keys(registers).forEach(function (registerKey) {\n models.push(new Model_1.RegisterViewModel(registers[registerKey]));\n });\n return models;\n };\n CreateRegisterView.prototype.createInterruptViewModelForEachInterrupt = function (module) {\n var _a;\n var models = [];\n var interrupts = (_a = module.interrupts) !== null && _a !== void 0 ? _a : {};\n Object.keys(interrupts).forEach(function (interruptKey) {\n models.push(new Model_1.InterruptViewModel(interrupts[interruptKey]));\n });\n return models;\n };\n CreateRegisterView.prototype.getNoOptionsViewSchema = function (setting) {\n var _a;\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withUiHelp(\"\".concat(setting.getName(), \": \") + ((_a = setting.getDescription()) !== null && _a !== void 0 ? _a : \"\"));\n return {\n schema: this.createSettingViewSchema(setting),\n uiSchema: setting.getMaxValue() > 1\n ? uiSchemaBuilder.build()\n : this.getBinarySettingUiSchema(setting),\n formData: setting.mapToOptionNameIfExists(setting.getValue()),\n };\n };\n CreateRegisterView.prototype.createHasOptionsViewSchema = function (setting) {\n var _a, _b;\n var schemaBuilder = new ViewSchemaBuilder_1.SchemaBuilder(\"string\", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : \"\")\n .withEnum(setting.getOptionNames())\n .withDefault(setting.mapToOptionNameIfExists(setting.getValue()));\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withUiHelp(\"\".concat(setting.getName(), \": \") + ((_b = setting.getDescription()) !== null && _b !== void 0 ? _b : \"\"));\n return {\n schema: schemaBuilder.build(),\n uiSchema: uiSchemaBuilder.build(),\n formData: setting.mapToOptionNameIfExists(setting.getValue()),\n };\n };\n CreateRegisterView.prototype.createSettingViewSchema = function (setting) {\n var _a;\n var schema = new ViewSchemaBuilder_1.SchemaBuilder(\"integer\", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : \"\").withDefault(setting.mapToOptionNameIfExists(setting.getPORDefault()));\n setting.getMaxValue() > 1\n ? schema.withMaximum(setting.getMaxValue()).withMinimum(0)\n : schema.withEnum([0, 1]);\n return schema.build();\n };\n CreateRegisterView.prototype.createInterruptViewSchema = function (interrupt) {\n var _a;\n var schema = new ViewSchemaBuilder_1.SchemaBuilder(\"string\", interrupt.getInterrupt().name)\n .withEnum(interrupt.getOptions())\n .withDefault(interrupt.getValue());\n var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder().withReadonlyValue(interrupt.getIsReadonly());\n return {\n schema: schema.build(),\n uiSchema: uiSchemaBuilder.build(),\n formData: (_a = interrupt.getValue()) !== null && _a !== void 0 ? _a : {},\n };\n };\n CreateRegisterView.prototype.getBinarySettingUiSchema = function (setting) {\n return new ViewSchemaBuilder_1.UiSchemaBuilder()\n .withReadonlyValue(setting.getIsReadonly())\n .withWidget(\"radio\")\n .withOptions({ inline: true })\n .build();\n };\n /** Creates Register View Builder for the given module. */\n CreateRegisterView.for = function (moduleDescription) {\n if (!moduleDescription) {\n throwError(\"Creation failed. Invalid module parameter.\");\n }\n if (!moduleDescription.registers && !moduleDescription.interrupts) {\n throwError(\"Creation failed for \".concat(moduleDescription.name, \". Input module contains no registers or interrupts.\"));\n }\n return new CreateRegisterView(moduleDescription);\n };\n return CreateRegisterView;\n}());\nexports.CreateRegisterView = CreateRegisterView;\n//# sourceMappingURL=CreateRegisterView.js.map","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingViewModel = exports.RegisterViewModel = exports.InterruptViewModel = void 0;\nvar CalculateRegisterValue_1 = __importDefault(require(\"@microchip/scf-device/lib/CalculateRegisterValue\"));\nvar Arrays_1 = require(\"@microchip/scf-device/lib/util/Arrays\");\nvar Setting_1 = require(\"@microchip/scf-device/lib/Setting\");\nvar InterruptViewModel = /** @class */ (function () {\n function InterruptViewModel(interrupt) {\n var _this = this;\n this.isReadOnly = true;\n this.getInterrupt = function () { return _this.interrupt; };\n this.setValue = function (value) {\n _this.value = value;\n };\n this.getValue = function () { return _this.value; };\n this.setOptions = function (options) {\n _this.options = options;\n };\n this.getOptions = function () { var _a; return (_a = _this.options) !== null && _a !== void 0 ? _a : []; };\n this.getIsReadonly = function () { return _this.isReadOnly; };\n this.setReadonly = function (isReadOnly) {\n _this.isReadOnly = isReadOnly;\n };\n if (!interrupt) {\n throw new Error(\"IllegalInputArgument for 'interrupt' in InterruptValue\");\n }\n this.interrupt = interrupt;\n }\n return InterruptViewModel;\n}());\nexports.InterruptViewModel = InterruptViewModel;\nvar RegisterViewModel = /** @class */ (function () {\n function RegisterViewModel(register) {\n var _this = this;\n this.settings = [];\n this.getSettings = function () { return _this.settings; };\n this.getSettingViewModel = function (setting) {\n var name = setting.name;\n return (0, Arrays_1.find)(_this.settings, function (rv) { return rv.getSetting().name === name; });\n };\n this.forEachSetting = function (doThis) {\n _this.settings.forEach(doThis);\n };\n this.getRegister = function () { return _this.register; };\n this.getName = function () { return _this.register.name; };\n this.getDescription = function () { return _this.register.desc; };\n this.getValue = function () { return _this.value; };\n this.setValue = function (value) {\n _this.value = value;\n };\n this.setReadonly = function (value) {\n if (value === void 0) { value = true; }\n _this.forEachSetting(function (setting) { return setting.setReadonly(value); });\n };\n this.getDefaultValue = function () { return CalculateRegisterValue_1.default.for(_this.register).asNumber(); };\n this.getValueOrDefault = function () {\n var value = _this.getValue();\n return value !== null && value !== void 0 ? value : _this.getDefaultValue();\n };\n if (!register) {\n throw new Error(\"IllegalInputArgument for 'register' in RegisterValue\");\n }\n this.register = register;\n if (register.settings) {\n this.settings = this.createSettingViewModels(register);\n }\n }\n RegisterViewModel.prototype.createSettingViewModels = function (register) {\n var _this = this;\n var _a;\n var models = [];\n var settings = (_a = register.settings) !== null && _a !== void 0 ? _a : {};\n Object.keys(settings).forEach(function (settingKey) {\n models.push(new SettingViewModel(settings[settingKey], _this.getValueOrDefault));\n });\n return RegisterViewModel.sortSettingsDescending(models);\n };\n /** Sorts the settings in descending order based on bit positions. */\n RegisterViewModel.sortSettingsDescending = function (settings) {\n var result = __spreadArray([], settings, true);\n result.sort(function (settingOne, settingTwo) {\n var _a, _b, _c, _d;\n var bitRangeOne = (_b = (_a = (0, Setting_1.getBitRange)(settingOne.getSetting())) === null || _a === void 0 ? void 0 : _a.high) !== null && _b !== void 0 ? _b : -1;\n var bitRangeTwo = (_d = (_c = (0, Setting_1.getBitRange)(settingTwo.getSetting())) === null || _c === void 0 ? void 0 : _c.high) !== null && _d !== void 0 ? _d : -1;\n return bitRangeTwo - bitRangeOne;\n });\n return result;\n };\n return RegisterViewModel;\n}());\nexports.RegisterViewModel = RegisterViewModel;\nvar SettingViewModel = /** @class */ (function () {\n function SettingViewModel(setting, getRegisterValue) {\n var _this = this;\n this.isReadonly = true;\n this.setReadonly = function (value) {\n if (value === void 0) { value = true; }\n _this.isReadonly = value;\n };\n this.getIsReadonly = function () { return _this.isReadonly; };\n this.getSetting = function () { return _this.setting; };\n this.getName = function () { return _this.setting.name; };\n this.getDescription = function () { return _this.setting.description; };\n this.getPORDefault = function () { return Number(_this.setting.porDefault); };\n this.getMask = function () { return Number(_this.setting.mask); };\n this.hasOptions = function () {\n return !!_this.setting.options;\n };\n this.getOptionNames = function () {\n return (0, Arrays_1.map)(nullSafe(_this.setting.options), function (option) { return option.name; });\n };\n this.mapToOptionNameIfExists = function (value) {\n var option = _this.getOptionForValue(value);\n return option !== undefined ? option.name : value;\n };\n this.getOptionForValue = function (value) {\n return (0, Arrays_1.find)(nullSafe(_this.setting.options), function (option) {\n var optionValue = option.value;\n return optionValue != undefined ? parseInt(optionValue) === value : false;\n });\n };\n this.getValue = function () {\n var value = _this.getRegisterValue();\n value &= _this.getMask();\n return (value >> _this.getShift()) >>> 0;\n };\n this.getShift = function () {\n var mask = _this.getMask();\n var shiftIndex = 0;\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n shiftIndex++;\n }\n return shiftIndex;\n };\n this.getMaxValue = function () {\n var mask = _this.getMask();\n while (!(mask & 0x1)) {\n mask = mask >> 1;\n }\n return mask;\n };\n if (!setting) {\n throw new Error(\"SettingViewModel: Invalid input argument\");\n }\n this.setting = setting;\n this.getRegisterValue = getRegisterValue;\n }\n return SettingViewModel;\n}());\nexports.SettingViewModel = SettingViewModel;\nvar nullSafe = function (array) { return array !== null && array !== void 0 ? array : []; };\n//# sourceMappingURL=Model.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UiSchemaBuilder = exports.SchemaBuilder = exports.ViewSchemaBuilder = void 0;\nvar ViewSchemaBuilder = /** @class */ (function () {\n function ViewSchemaBuilder() {\n this.schema = {};\n this.uiSchema = {};\n this.formData = {};\n this.tabName = \"main\";\n this.expandGroupsByDefault = true;\n }\n ViewSchemaBuilder.prototype.withSchema = function (schema) {\n this.schema = schema;\n return this;\n };\n ViewSchemaBuilder.prototype.withUiSchema = function (uiSchema) {\n this.uiSchema = uiSchema;\n return this;\n };\n ViewSchemaBuilder.prototype.withFormData = function (formData) {\n this.formData = formData;\n return this;\n };\n ViewSchemaBuilder.prototype.withTabName = function (name) {\n this.tabName = name;\n return this;\n };\n ViewSchemaBuilder.prototype.withExpandedDefault = function (expandGroupsByDefault) {\n this.expandGroupsByDefault = expandGroupsByDefault;\n return this;\n };\n ViewSchemaBuilder.prototype.addChildComponent = function (childName, child) {\n var _a, _b, _c;\n this.schema = __assign(__assign({}, this.schema), { properties: __assign(__assign({}, this.schema.properties), (_a = {}, _a[childName] = child.schema, _a)) });\n this.uiSchema = __assign(__assign({}, this.uiSchema), (_b = {}, _b[childName] = child.uiSchema, _b));\n if (this.formData instanceof Object) {\n this.formData = __assign(__assign({}, this.formData), (_c = {}, _c[childName] = child.formData, _c));\n }\n };\n ViewSchemaBuilder.prototype.build = function () {\n return {\n schema: this.schema,\n uiSchema: this.uiSchema,\n formData: this.formData,\n name: this.tabName,\n expandGroupsByDefault: this.expandGroupsByDefault,\n };\n };\n return ViewSchemaBuilder;\n}());\nexports.ViewSchemaBuilder = ViewSchemaBuilder;\nvar SchemaBuilder = /** @class */ (function () {\n function SchemaBuilder(type, title) {\n this.title = title;\n this.type = type;\n }\n SchemaBuilder.prototype.withProperties = function (properties) {\n this.properties = properties;\n return this;\n };\n SchemaBuilder.prototype.withDefault = function (defaultValue) {\n this.default = defaultValue;\n return this;\n };\n SchemaBuilder.prototype.withMaximum = function (maximum) {\n this.maximum = maximum;\n return this;\n };\n SchemaBuilder.prototype.withMinimum = function (minimum) {\n this.minimum = minimum;\n return this;\n };\n SchemaBuilder.prototype.withEnum = function (vals) {\n this.enum = vals;\n return this;\n };\n SchemaBuilder.prototype.build = function () {\n return {\n type: this.type,\n title: this.title,\n properties: this.properties,\n default: this.default,\n maximum: this.maximum,\n minimum: this.minimum,\n enum: this.enum,\n };\n };\n return SchemaBuilder;\n}());\nexports.SchemaBuilder = SchemaBuilder;\nvar UiSchemaBuilder = /** @class */ (function () {\n function UiSchemaBuilder() {\n }\n UiSchemaBuilder.prototype.withReadonlyValue = function (isReadonly) {\n this.isReadOnly = isReadonly;\n return this;\n };\n UiSchemaBuilder.prototype.withWidget = function (widgetName) {\n this.widget = widgetName;\n return this;\n };\n UiSchemaBuilder.prototype.withOptions = function (options) {\n this.options = options;\n return this;\n };\n UiSchemaBuilder.prototype.withUiHelp = function (uiHelp) {\n this.uiHelp = uiHelp;\n return this;\n };\n UiSchemaBuilder.prototype.build = function () {\n return {\n \"ui:readonly\": this.isReadOnly,\n \"ui:widget\": this.widget,\n \"ui:options\": this.options,\n \"ui:help\": this.uiHelp,\n };\n };\n return UiSchemaBuilder;\n}());\nexports.UiSchemaBuilder = UiSchemaBuilder;\n//# sourceMappingURL=ViewSchemaBuilder.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCFunctionValidator = void 0;\nvar cKeywords = [\n \"auto\",\n \"const\",\n \"double\",\n \"float\",\n \"int\",\n \"short\",\n \"struct\",\n \"unsigned\",\n \"break\",\n \"continue\",\n \"else\",\n \"for\",\n \"long\",\n \"signed\",\n \"switch\",\n \"void\",\n \"case\",\n \"default\",\n \"enum\",\n \"goto\",\n \"register\",\n \"sizeof\",\n \"typedef\",\n \"volatile\",\n \"char\",\n \"do\",\n \"extern\",\n \"if\",\n \"return\",\n \"static\",\n \"union\",\n \"while\",\n];\nvar functionPattern = \"(?=^([A-Za-z]\\\\S|_)\\\\w+$)\";\nvar errorMessage = \"Must be valid C function syntax.\";\nvar doNotMatchKeywordsRegex = function () {\n return \"(^(?!\" + cKeywords.join(\"|\") + \")).*\";\n};\nvar result = doNotMatchKeywordsRegex();\nvar pattern = {\n pattern: functionPattern + result,\n};\nexports.getCFunctionValidator = function () { return ({\n getRjsfValidation: function () { return pattern; },\n getCustomErrorMessage: function () { return errorMessage; },\n}); };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CFunctionValidator_1 = require(\"./Validators/CFunctionValidator\");\nObject.defineProperty(exports, \"getCFunctionValidator\", { enumerable: true, get: function () { return CFunctionValidator_1.getCFunctionValidator; } });\n","require('../../modules/es.math.log10');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Math.log10;\n","var parent = require('../../es/math/log10');\n\nmodule.exports = parent;\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = false;\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// `Math.log10` method\n// https://tc39.github.io/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: function log10(x) {\n return log(x) * LOG10E;\n }\n});\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CreatorFunctions } from \"@microchip/melody-automodule-interface/lib/src/CreatorFunctions\";\nimport { State } from \"../generated_module/src/types/State\";\n\nexport const getCreatorFunctions = (): CreatorFunctions => {\n return {\n shouldImport: shouldImport,\n getCreatorImportArgs: getCreatorImportArgs,\n };\n};\n\nconst shouldImport = (importKey: string, state: State): boolean => {\n return true;\n};\n\nconst getCreatorImportArgs = (importKey: string, state: State): any | undefined => {\n return undefined;\n};\n","import {\n AppModel,\n DerivedData,\n DerivedFunctions,\n} from \"../generated_module/src/types/AutoModuleTypes\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport { PwmCalculator } from \"./PwmCalculator\";\nimport * as pwm_general from \"./interfaces/pwm_general_parameters\";\nimport * as initializer_system from \"@microchip/initializer-system\";\nimport { Interface, Arguments } from \"@microchip/scf-interface\";\nimport { getGeneratorModel, getHeaderFiles } from \"./GeneratorModel\";\nimport {\n MyComponentNames,\n MyExportNames,\n MyPeripheral,\n} from \"../generated_module/src/types\";\nimport { getAutoSdlHelp } from \"@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp\";\nimport { getPinsLogic } from \"../generated_module/src/pins/PCPHelper\";\nimport { MyImports } from \"../generated_module/src/types\";\nimport { getCFunctionValidator, PatternValidator } from \"@microchip/scf-validators/lib\";\nimport { intf_args, QueryAdapterKey } from \"@microchip/pins-interface/lib/types\";\nimport { values } from \"../generated_module/src/Utils\";\nimport { RegisterValues } from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\n\ntype Args = pwm_general.Arguments;\nconst INTERFACE_ID = pwm_general.Interface.getInterfaceId();\nconst INTERFACE_KEY = \"pwm_general\"; // Defined in moduleConfig.json file\n\nexport const getDerivedData = (dataModel: AppModel): DerivedData => {\n if (dataModel) {\n return new MyDerivedData(dataModel);\n }\n return new EmptyDerivedData();\n};\n\n//This data will be used at the creator stage and relies on only the state\nclass EmptyDerivedData implements DerivedData {\n getMyFunctions = (): DerivedFunctions => {\n return {};\n };\n getModel = (): AppModel | undefined => {\n return undefined;\n };\n}\n\n//This data will be used at the processor stage\nclass MyDerivedData implements DerivedData {\n private dataModel: AppModel;\n private pwmCalculator: PwmCalculator;\n private cValidator: PatternValidator = getCFunctionValidator();\n\n constructor(dataModel: AppModel) {\n this.dataModel = dataModel;\n }\n\n private getPwmCalculator = (): PwmCalculator => {\n if (!this.pwmCalculator) {\n this.pwmCalculator = new PwmCalculator(\n this.getTimerPrValue(),\n this.getTimerPrescaler(),\n this.dataModel.getImportValue(\"osc_clocks\")?.fosc ?? 0,\n Number(this.dataModel.getComponentValue(\"dutyCycle\")),\n );\n }\n return this.pwmCalculator;\n };\n\n getMyFunctions = (): DerivedFunctions => {\n return {\n overrideDefaultValues: this.overrideDefaultValues,\n overrideOptions: this.overrideDefaultOptions,\n moduleName: (): string | undefined => this.dataModel.getHardware()?.getName(),\n pinData: this.getMyPinData,\n alerts: this.getMyAlerts,\n\n pwm_general_parameters_payload: this.pwm_general_parameters_payload,\n initializer_system_results: this.initializer_system_results,\n\n dutyCycleValidator: this.dutyCycleValidator,\n\n componentName: this.componentName,\n pwmenPwmcon: this.getPWMEnable,\n getMyProcessedArgValue: this.getMyProcessedArgValue,\n pwmdcValue: (): number => this.getPwmCalculator().getCCPRValue(),\n pwmPeriod: (): number => this.getPwmCalculator().getPwmPeriod(),\n pwmFrequency: (): number => this.getPwmCalculator().getPwmFrequency(),\n pwmResolution: (): number => this.getPwmCalculator().getPwmResolution(),\n\n ctselCcptmrs1: this.ctselTimerSetting,\n ctselCcptmrs: this.ctselTimerSetting,\n ctselPwmtmrs: this.ctselTimerSetting,\n pwmdchPwmdch: (): number =>\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) >> 2,\n pwmdclPwmdcl: (): number =>\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) & 3,\n\n templateData: (): any => getGeneratorModel(this.dataModel),\n getHelpUrl: this.getSdlHelpOverride,\n filterImports: this.filterImports,\n getPinsLogic: getPinsLogic,\n importName: this.friendlyImportName,\n componentNameValidator: this.componentNameValidator,\n getCustomUiErrors: this.getCustomUiErrors,\n pins_interface_args: this.getPinsinterfaceArgs,\n getmodifiedRegisterValues: this.getmodifiedRegisterValues,\n };\n };\n\n private readonly getmodifiedRegisterValues = (): RegisterValues | undefined => {\n const registerValues:\n | RegisterValues<MyPeripheral>\n | undefined = this.getModel()?.getRegisterValues();\n const modifiedValues: RegisterValues = {};\n if (registerValues) {\n values(registerValues).forEach((register) => {\n if (register.por !== register.valueAsHex) {\n modifiedValues[register.name] = register.valueAsHex;\n }\n });\n return modifiedValues;\n }\n return undefined;\n };\n\n private readonly getMyProcessedArgValue = (): Args | undefined => {\n let args: Args | undefined;\n const exportData = this.dataModel\n ?.getExportInterfaces()\n ?.getInterface(INTERFACE_KEY, INTERFACE_ID);\n if (exportData && exportData.args) {\n const moduleId = Object.keys(exportData.args)[0];\n args = exportData.args[moduleId];\n }\n return args;\n };\n\n private readonly getPWMEnable = (): string | undefined => {\n const status = this.getMyProcessedArgValue()?.moduleEnable;\n if (status !== undefined) {\n return status ? \"enabled\" : \"disabled\";\n }\n return status;\n };\n\n private friendlyImportName = (importKey: string): string => {\n if (importKey === \"scf_pic8_pwm_v2\") return \"PWM Hardware\";\n if (importKey === \"osc_clocks\") return \"Oscillator Clock\";\n if (importKey === \"initializer_system\") return \"system.c Initialize()\";\n if (importKey === \"pins_interface\") return \"Pins\";\n return importKey;\n };\n\n private overrideDefaultValues = (componentName: string): any => {\n switch (componentName) {\n case \"componentName\":\n return this.dataModel.getHardware()?.getName();\n default:\n return undefined;\n }\n };\n\n private componentNameValidator = (): any => {\n return {\n pattern: this.cValidator.getRjsfValidation().pattern,\n };\n };\n\n private getCustomUiErrors = (componentName: string): Error[] | undefined => {\n switch (componentName) {\n case \"componentName\":\n return [\n {\n name: \"pattern\",\n message: this.cValidator.getCustomErrorMessage(),\n },\n ];\n default:\n return undefined;\n }\n };\n\n private readonly getPinsinterfaceArgs = (): intf_args => {\n const args: intf_args = {\n queryAdapters: [QueryAdapterKey.PPS, QueryAdapterKey.APFCON],\n };\n\n return args;\n };\n\n private overrideDefaultOptions = (componentName: string): any[] => {\n switch (componentName) {\n case \"timerSelection\": {\n const result: any[] = [];\n const CCPTMRSREG =\n this.dataModel.getPeripheralDescription()?.registers?.CCPTMRS1 ??\n this.dataModel.getPeripheralDescription()?.registers?.CCPTMRS;\n const PWMTMRSREG = this.dataModel.getPeripheralDescription()?.registers\n ?.PWMTMRS;\n if (CCPTMRSREG) {\n const CTSELSETT = CCPTMRSREG.settings?.CTSEL;\n for (const eachoptn of CTSELSETT?.options ?? []) {\n const timeroptnregex = /^pwm\\d+timer(\\d)$/i;\n const optnmatch = eachoptn.alias.match(timeroptnregex);\n const correctOptnName =\n (optnmatch?.length ?? 0) > 1 ? \"TMR\" + optnmatch?.[1] : \"\";\n result.push(correctOptnName);\n }\n }\n if (PWMTMRSREG) {\n const CTSELSETT = PWMTMRSREG.settings?.CTSEL;\n for (const eachoptn of CTSELSETT?.options ?? []) {\n const timeroptnregex = /^pwm\\d+timer(\\d)$/i;\n const optnmatch = eachoptn.alias.match(timeroptnregex);\n const correctOptnName =\n (optnmatch?.length ?? 0) > 1 ? \"TMR\" + optnmatch?.[1] : \"\";\n result.push(correctOptnName);\n }\n }\n if (!CCPTMRSREG && !PWMTMRSREG) {\n result.push(\"TMR2\");\n }\n return result;\n }\n default:\n return [] /*for other fields - undefined as take options from moduleconfig.json*/;\n }\n };\n\n public getModel = (): AppModel => {\n return this.dataModel;\n };\n\n private getMyPinData = (): any => {\n return {};\n };\n\n private filterImports = (imports: MyImports): MyImports => {\n let filteredImports: MyImports = imports;\n const ImportKeys = [\"Timer\"];\n\n ImportKeys.forEach((importKey) => {\n filteredImports = this.getModel().filterImportBySetting(\n filteredImports,\n importKey,\n (option: Processor.Option<any>): any => {\n if (option.payload !== undefined) {\n const rstSource =\n this.dataModel.getComponentValue(\"timerSelection\") ??\n \"disabled\";\n const regexpNumber = /\\d/;\n const inst = rstSource.match(regexpNumber);\n if (rstSource.indexOf(\"TMR\") !== -1) {\n return option.payload.moduleName === \"TMR\" + inst;\n }\n }\n },\n ) as MyImports;\n });\n return filteredImports;\n };\n\n private getMyAlerts = (): Processor.Alert[] => {\n const alerts: Processor.Alert[] = [];\n const timerSelection: string =\n this.dataModel.getComponentValue(\"timerSelection\") ?? \"\";\n\n if (\n this.dataModel.getAssignedImport(\"Timer\") === undefined ||\n this.dataModel.getAssignedImport(\"Timer\")?.options !== undefined\n ) {\n alerts.push({\n text: `Please select ${timerSelection} as the Timer Dependency.`,\n type: Processor.AlertTypes.Warning,\n });\n } else {\n alerts.push({\n text: `${this.dataModel.getName()} uses ${timerSelection}.`,\n type: Processor.AlertTypes.Hint,\n });\n alerts.push({\n text: `Postscaler setting in ${timerSelection} does not affect the calculated parameters in PWM module.`,\n type: Processor.AlertTypes.Hint,\n });\n if (\n Number(this.dataModel.getComponentValue(\"pwmdcValue\")) / 4 >\n this.getTimerPrValue()\n ) {\n alerts.push({\n text: `The value for Duty Cycle percentage is crossing 100 because the period value set in tmr is greater than the dutycycle value set in PWM. Set the duty cycle to be less than 100 percent.`,\n type: Processor.AlertTypes.Warning,\n });\n }\n }\n\n return alerts;\n };\n\n private getSdlHelpOverride = (\n componentName: MyComponentNames,\n helpUrl: string,\n ): string => {\n if (componentName === \"timerSelection\") {\n if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS1) {\n componentName = \"ctselCcptmrs1\";\n } else if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS) {\n componentName = \"ctselCcptmrs\";\n } else if (this.getModel().getPeripheralDescription()?.registers?.PWMTMRS) {\n componentName = \"ctselPwmtmrs\";\n }\n } else if (componentName === \"dutyCycle\" || componentName === \"pwmdcValue\") {\n helpUrl = helpUrl?.replace(\n \"${instance}\",\n this.getModel().getHardware()?.getName() ?? \"\",\n );\n }\n\n return getAutoSdlHelp(this.getModel() as any, componentName, helpUrl);\n };\n\n private pwm_general_parameters_payload = (): pwm_general.ProcessedPayload => {\n return {\n interfaceApi: pwm_general.Interface.createFirmwareApi(\n this.dataModel.getComponentValue(\"componentName\") ?? \"\",\n getHeaderFiles(this.dataModel),\n ),\n customName: this.dataModel.getComponentValue(\"componentName\"),\n modulename: this.dataModel.getName(),\n isdriverisr: false,\n ispwmi_enabled: false,\n ispwmpi_enabled: false,\n moduleName: this.dataModel.getName(),\n modifiedRegisterList: this.getmodifiedRegisterValues(),\n };\n };\n\n private initializer_system_results = (): initializer_system.Results => {\n return {\n initializer: {\n name: this.dataModel.getComponentValue(\"componentName\") + \"_Initialize\",\n header: getHeaderFiles(this.dataModel)[0],\n },\n };\n };\n\n private dutyCycleValidator = (): any => {\n return {\n minimum: 0,\n maximum: 100,\n };\n };\n\n private componentName = (): string | undefined => {\n const arg = this.getArg(\"pwm_general\", pwm_general.Interface);\n if (arg) {\n const pwmArg: pwm_general.Arguments = arg;\n return pwmArg.customName;\n }\n return undefined;\n };\n\n private ctselTimerSetting = (): string | undefined => {\n const timerSelection: string =\n this.dataModel.getComponentValue(\"timerSelection\") ?? \"\";\n const groupmatch = timerSelection.match(/^TMR([0-9])$/) ?? \"\";\n if (groupmatch.length > 1) {\n const timersuffix = groupmatch?.length > 1 ? groupmatch[1] : \"\";\n return this.dataModel.getHardware()?.getName() + \"timer\" + timersuffix;\n } else {\n return undefined;\n }\n };\n\n private getTimerPrValue = (): number => {\n return this.dataModel.getImportValue(\"Timer\")?.periodRegisterValue ?? 255;\n };\n\n private getTimerPrescaler = (): number => {\n return this.dataModel.getImportValue(\"Timer\")?.prescaleValue ?? 1;\n };\n\n private getArg = (key: MyExportNames, id: Interface): Arguments => {\n const exportInterface = this.dataModel\n .getExportInterfaces()\n .getInterface(key, id.getInterfaceId());\n if (exportInterface?.args) {\n // choose the first requester for now\n return exportInterface.args[Object.keys(exportInterface.args)[0]];\n }\n };\n}\n","import { AppModel } from \"../generated_module/src/types/AutoModuleTypes\";\nimport * as pwm_general from \"./interfaces/pwm_general_parameters\";\nimport * as InterfaceTypes from \"@microchip/scf-interface\";\nimport { getOptionValueByName } from \"../generated_module/src/autoModule/AutoModuleHelpers\";\nimport { getTemplateSettings } from \"../generated_module/src/autoModule/AutoModuleTemplates\";\n\nexport const getGeneratorModel = (model: AppModel): any => {\n if (!model.getHardware()) return {};\n const hardwareSettings = model.getPeripheralDescription();\n const pwmInterface = pwm_general.Interface.createFirmwareApi(\n model.getComponentValue(\"componentName\") ?? \"\",\n getHeaderFiles(model),\n );\n const templateSettings = getTemplateSettings(model);\n const registerValues = templateSettings?.registers;\n const ctsel =\n model.getPeripheralDescription()?.registers?.CCPTMRS1?.settings?.CTSEL ??\n model.getPeripheralDescription()?.registers?.CCPTMRS?.settings?.CTSEL ??\n model.getPeripheralDescription()?.registers?.PWMTMRS?.settings?.CTSEL;\n const CTSELvalue = ctsel\n ? getOptionValueByName(ctsel, model.getDerivedFunction(\"ctselCcptmrs1\")) ??\n getOptionValueByName(ctsel, model.getDerivedFunction(\"ctselCcptmrs\")) ??\n getOptionValueByName(ctsel, model.getDerivedFunction(\"ctselPwmtmrs\"))\n : 1;\n const CTSELvaluenum = Number(CTSELvalue);\n\n return {\n moduleNameLowerCase: model.getName()?.toLowerCase(),\n moduleNameUpperCase: model.getName()?.toUpperCase(),\n moduleInstance: hardwareSettings?.instance,\n header: pwmInterface.headerFiles?.[0],\n api: pwmInterface.api,\n simpleApi: pwmInterface.simpleApi,\n\n //From System Manager\n useWatchdog: model.getImportValue(\"wdtEnable\") ?? false, //TODO\n\n //Registers and Settings\n CTSELvalue: CTSELvaluenum.toString(16),\n timerselpresence:\n (ctsel?.options?.length ?? 0) > 0 ? \"timerselpresent\" : \"timerselabsent\",\n pwmdcValue: model.getComponentValue(\"pwmdcValue\"),\n ...registerValues,\n };\n};\n\nexport const getHeaderFiles = (model: AppModel): InterfaceTypes.HeaderFile[] => {\n return [\n {\n name: model.getName().toLowerCase() + \".h\",\n path: \"pwm/\",\n },\n ];\n};\n","import { AppModel } from \"../generated_module/src/types/AutoModuleTypes\";\nimport { pin_row, behaviour } from \"@microchip/pins-interface/lib/types\";\n\n// provide complete dynamic data for all pin rows. It overrides static pindata.json\nexport const getCompletePinData = (appModel: AppModel): any => {\n // way to programatically override the json data\n return {};\n};\n\n// overrides pin data for a particular row based on model.\nexport function getRowData(appModel: AppModel, rowData: pin_row): pin_row | undefined {\n const moduleName = appModel.getName() ?? \"PWM\";\n\n const ppsData:\n | Record<string, Record<string, string>>\n | undefined = appModel.getImportValue(\"pins_interface\")?.[\"pps\"]?.[\"data\"]?.[\n moduleName\n ];\n const apfconData:\n | Record<string, Record<string, string>>\n | undefined = appModel.getImportValue(\"pins_interface\")?.[\"apfcon\"]?.[\"data\"]?.[\n moduleName\n ];\n\n if (rowData.name === \"out\") {\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"OUT\",\n filter: {\n module: moduleName,\n aliasReEx: `^${moduleName}(OUT){0,1}$`,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (\n appModel.isComponentValue(\"pwmoePwmcon\") === true &&\n getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx) ===\n behaviour.LOCK_UNLOCK\n ) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: `^${moduleName}(OUT){0,1}$` },\n };\n }\n } else if (rowData.name === \"pwmx0\") {\n if (appModel.getComponentValue(\"pwmoe0Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"0OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe0Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"0\" },\n };\n }\n } else if (rowData.name === \"pwmx1\") {\n if (appModel.getComponentValue(\"pwmoe1Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"1OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe1Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"1\" },\n };\n }\n } else if (rowData.name === \"pwmx2\") {\n if (appModel.getComponentValue(\"pwmoe2Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"2OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe2Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"2\" },\n };\n }\n } else if (rowData.name === \"pwmx3\") {\n if (appModel.getComponentValue(\"pwmoe3Pwmaoe\") === undefined) {\n return undefined;\n }\n rowData = {\n ...rowData,\n module: moduleName,\n function: moduleName + \"3OUT\",\n filter: {\n ...rowData.filter,\n module: moduleName,\n },\n behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx),\n };\n if (appModel.isComponentValue(\"pwmoe3Pwmaoe\") === true) {\n rowData = {\n ...rowData,\n behaviourMeta: { lockPinRegEx: moduleName + \"3\" },\n };\n }\n }\n\n let rowActions = [];\n\n const pwmxRegcomponent = appModel.getComponent(\"pwmoePwmcon\")?.component;\n const pwmx0Regcomponent = appModel.getComponent(\"pwmoe0Pwmaoe\")?.component;\n const pwmx1Regcomponent = appModel.getComponent(\"pwmoe1Pwmaoe\")?.component;\n const pwmx2Regcomponent = appModel.getComponent(\"pwmoe2Pwmaoe\")?.component;\n const pwmx3Regcomponent = appModel.getComponent(\"pwmoe3Pwmaoe\")?.component;\n\n if (\n pwmxRegcomponent &&\n getPinBehaviour(ppsData, apfconData, `^${moduleName}(OUT){0,1}$`) ===\n behaviour.LOCK_UNLOCK\n ) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"out\")\n .forComponent(pwmxRegcomponent)\n .addIfLockedSetValue(\"^\" + moduleName + \"$\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n\n if (pwmx0Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx0\")\n .forComponent(pwmx0Regcomponent)\n .addIfLockedSetValue(moduleName + \"0\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx1Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx1\")\n .forComponent(pwmx1Regcomponent)\n .addIfLockedSetValue(moduleName + \"1\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx2Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx2\")\n .forComponent(pwmx2Regcomponent)\n .addIfLockedSetValue(moduleName + \"2\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n if (pwmx3Regcomponent) {\n rowActions = rowActions.concat(\n appModel\n .getPCPHelper?.()\n .stateActionBuilder(rowData)\n .rowWithName(\"pwmx3\")\n .forComponent(pwmx3Regcomponent)\n .addIfLockedSetValue(moduleName + \"3\", true)\n .addIfUnLockedSetValue(\".*\", false)\n .build(),\n );\n }\n rowData = { ...rowData, actions: rowActions };\n return rowData;\n}\n\nconst getPinBehaviour = (\n ppsPins: Record<string, Record<string, string>> | undefined,\n apfconPins: Record<string, Record<string, string>> | undefined,\n pinRegEx: string,\n): behaviour => {\n let tempPinBehaviour: behaviour = behaviour.LOCK_UNLOCK;\n if (ppsPins !== undefined) {\n for (const ppsPin in ppsPins) {\n if (ppsPin === \"pps_out\") {\n for (const ppsOut in ppsPins[\"pps_out\"]) {\n if (ppsOut.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.PPS;\n break;\n }\n }\n } else {\n if (ppsPin.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.PPS;\n break;\n }\n }\n }\n }\n if (apfconPins !== undefined) {\n for (const apfconPin in apfconPins) {\n if (apfconPin.match(new RegExp(pinRegEx, \"ig\"))) {\n tempPinBehaviour = behaviour.APFCON;\n break;\n }\n }\n }\n\n return tempPinBehaviour;\n};\n","// Reused from Q43 CCP calculator\n// TODO: delete this duplicate and add CCP calculator dependency\nimport log10 from \"core-js/features/math/log10\";\n\nexport class PwmCalculator {\n private prValue: number;\n private prescaler: number;\n private fosc: number;\n private dutyCycleRatio: number;\n\n constructor(prValue: number, prescaler: number, fosc: number, dutyCycle: number) {\n this.prValue = prValue;\n this.prescaler = prescaler;\n this.fosc = fosc;\n this.dutyCycleRatio = dutyCycle / 100;\n }\n\n public getPwmPeriod = (): number => {\n let pwmPeriod = (this.prValue + 1) * 4 * this.prescaler;\n if (this.fosc > 0) {\n pwmPeriod = pwmPeriod / this.fosc;\n } else {\n pwmPeriod = 0;\n }\n return pwmPeriod;\n };\n\n public getPwmFrequency = (): number => {\n let pwmFrequency = (this.prValue + 1) * 4 * this.prescaler;\n if (pwmFrequency > 0) {\n pwmFrequency = this.fosc / pwmFrequency;\n } else {\n pwmFrequency = 0;\n }\n\n pwmFrequency = Math.round(pwmFrequency * 100) / 100;\n return pwmFrequency;\n };\n\n public getPwmResolution = (): number => {\n const pwmResolution = log10(4 * (this.prValue + 1)) / log10(2);\n return Math.floor(pwmResolution);\n };\n\n public getCCPRValue = (): number => {\n const ccprValue = Math.round(this.dutyCycleRatio * 4 * (this.prValue + 1) - 1);\n if (ccprValue < 0) {\n return 0;\n }\n return ccprValue;\n };\n\n public getActualDutyCycle = (): number => {\n const dcRatio = this.getCCPRValue() / (4 * (this.prValue + 1));\n return Math.round(dcRatio * 100);\n };\n\n public getActualPulseWidth = (): number => {\n let pulseWidth = this.getCCPRValue() * this.prescaler;\n if (this.fosc > 0) {\n pulseWidth = pulseWidth / this.fosc;\n } else {\n pulseWidth = 0;\n }\n return pulseWidth;\n };\n}\n","import { InterfaceId } from \"@microchip/scf-common/lib/InterfaceId\";\nimport * as Creator from \"@microchip/scf-common/lib/Creator\";\nimport * as Processor from \"@microchip/scf-common/lib/Processor\";\nimport * as InterfaceTypes from \"@microchip/scf-interface\";\nimport { RegisterValues } from \"@microchip/melody-automodule-interface/lib/src/HardwareTypes\";\n\n/** The arguments to be provided to the implementation. */\nexport interface Arguments extends InterfaceTypes.Arguments {\n //Standard Interface\n customName?: string;\n moduleEnable?: boolean;\n clockSource?: string;\n clbBle?: Record<string, string>;\n}\n\n/** The payload to be passed back to the dependent module after the BasicUART has been processed. */\nexport interface ProcessedPayload extends InterfaceTypes.ProcessedPayload {\n //Standard Interface\n interfaceApi: InterfaceTypes.FirmwareAPIPayload<API>;\n customName?: string;\n modulename?: string;\n isdriverisr?: boolean;\n ispwmi_enabled?: boolean;\n ispwmpi_enabled?: boolean;\n moduleName?: string;\n modifiedRegisterList?: RegisterValues;\n}\n\nexport interface API extends InterfaceTypes.CFunctions {\n Initialize: InterfaceTypes.CFunction;\n LoadDutyValue: InterfaceTypes.CFunction;\n}\n\n/** The type of the processed export interface */\nexport type ProcessedExportInterface = Processor.ProcessedInterface<\n ProcessedPayload,\n Arguments\n>;\n\n/** Used by implementations of this interface in their module's creator. */\ntype CreatorExportInterface = Creator.Interface<ProcessedPayload>;\n\nconst getInterfaceId = (): InterfaceId => {\n return {\n name: \"pwm_general_parameters\",\n version: \"0.1.0\",\n };\n};\n\nconst createPrototypeImport = (): Creator.Import => {\n return {\n interfaceId: getInterfaceId(),\n };\n};\n\nconst createPrototypeExport = (): Creator.Export<CreatorExportInterface[]> => {\n return {\n interfaces: [{ interfaceId: getInterfaceId() }],\n };\n};\n\nconst createMock = (): ProcessedExportInterface => {\n return {\n interfaceId: getInterfaceId(),\n payload: {\n interfaceApi: Interface.createFirmwareApi(\"MyModule\", [\n { name: \"mymodule.h\", path: \"include/\" },\n ]),\n },\n args: {\n requestId: {\n customName: \"MyModule\",\n moduleEnable: true,\n clockSource: \"\",\n clbBle: {},\n },\n },\n };\n};\n\nconst createFirmwareApi = (\n moduleName: string,\n headerFiles: InterfaceTypes.HeaderFile[],\n): InterfaceTypes.FirmwareAPIPayload<API> => {\n const prefix: string = moduleName ? moduleName : \"undefined\";\n const api = createApi(prefix);\n\n return {\n api: api,\n simpleApi: InterfaceTypes.buildSimpleApi(api),\n headerFiles: headerFiles,\n };\n};\n\nconst createApi = (prefix: string): API => {\n return {\n Initialize: {\n name: prefix + \"_Initialize\",\n returns: \"void\",\n },\n LoadDutyValue: {\n name: prefix + \"_LoadDutyValue\",\n arguments: [\n {\n name: \"dutyValue\",\n type: \"uint16_t\",\n },\n ],\n returns: \"void\",\n },\n };\n};\n\ninterface Interface extends InterfaceTypes.Interface {\n createPrototypeImport: () => Creator.Import<Arguments>;\n createMock: () => ProcessedExportInterface;\n createFirmwareApi: (\n moduleName: string,\n headerFiles: InterfaceTypes.HeaderFile[],\n ) => InterfaceTypes.FirmwareAPIPayload<API>;\n}\n\nexport const Interface: Interface = {\n createPrototypeExport: createPrototypeExport,\n createPrototypeImport: createPrototypeImport,\n getInterfaceId: getInterfaceId,\n createMock: createMock,\n createFirmwareApi: createFirmwareApi,\n};\n"],"sourceRoot":""}