@mchp-mcc/scf-pic8-pwm-v2 4.2.12 → 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://autoCreator/webpack/bootstrap","webpack://autoCreator/./generated_module/src/Utils.ts","webpack://autoCreator/./generated_module/src/autoCreator.ts","webpack://autoCreator/./generated_module/src/autoModule/AutoModuleHelpers.ts","webpack://autoCreator/./generated_module/src/autoModule/AutoModuleTemplates.ts","webpack://autoCreator/./generated_module/src/getUserData.ts","webpack://autoCreator/./generated_module/src/pins/PCPHelper.ts","webpack://autoCreator/./node_modules/@microchip/pins-interface/lib/types.js","webpack://autoCreator/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js","webpack://autoCreator/./node_modules/@microchip/scf-common/lib/Processor.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/Register.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/Setting.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/util/Arrays.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/c-function-types.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/helpers.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/index.js","webpack://autoCreator/./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js","webpack://autoCreator/./node_modules/@microchip/scf-validators/lib/index.js","webpack://autoCreator/./node_modules/core-js/es/math/log10.js","webpack://autoCreator/./node_modules/core-js/features/math/log10.js","webpack://autoCreator/./node_modules/core-js/internals/an-object.js","webpack://autoCreator/./node_modules/core-js/internals/array-includes.js","webpack://autoCreator/./node_modules/core-js/internals/classof-raw.js","webpack://autoCreator/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://autoCreator/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://autoCreator/./node_modules/core-js/internals/create-property-descriptor.js","webpack://autoCreator/./node_modules/core-js/internals/descriptors.js","webpack://autoCreator/./node_modules/core-js/internals/document-create-element.js","webpack://autoCreator/./node_modules/core-js/internals/enum-bug-keys.js","webpack://autoCreator/./node_modules/core-js/internals/export.js","webpack://autoCreator/./node_modules/core-js/internals/fails.js","webpack://autoCreator/./node_modules/core-js/internals/get-built-in.js","webpack://autoCreator/./node_modules/core-js/internals/global.js","webpack://autoCreator/./node_modules/core-js/internals/has.js","webpack://autoCreator/./node_modules/core-js/internals/hidden-keys.js","webpack://autoCreator/./node_modules/core-js/internals/ie8-dom-define.js","webpack://autoCreator/./node_modules/core-js/internals/indexed-object.js","webpack://autoCreator/./node_modules/core-js/internals/inspect-source.js","webpack://autoCreator/./node_modules/core-js/internals/internal-state.js","webpack://autoCreator/./node_modules/core-js/internals/is-forced.js","webpack://autoCreator/./node_modules/core-js/internals/is-object.js","webpack://autoCreator/./node_modules/core-js/internals/is-pure.js","webpack://autoCreator/./node_modules/core-js/internals/native-weak-map.js","webpack://autoCreator/./node_modules/core-js/internals/object-define-property.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://autoCreator/./node_modules/core-js/internals/object-keys-internal.js","webpack://autoCreator/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://autoCreator/./node_modules/core-js/internals/own-keys.js","webpack://autoCreator/./node_modules/core-js/internals/path.js","webpack://autoCreator/./node_modules/core-js/internals/redefine.js","webpack://autoCreator/./node_modules/core-js/internals/require-object-coercible.js","webpack://autoCreator/./node_modules/core-js/internals/set-global.js","webpack://autoCreator/./node_modules/core-js/internals/shared-key.js","webpack://autoCreator/./node_modules/core-js/internals/shared-store.js","webpack://autoCreator/./node_modules/core-js/internals/shared.js","webpack://autoCreator/./node_modules/core-js/internals/to-absolute-index.js","webpack://autoCreator/./node_modules/core-js/internals/to-indexed-object.js","webpack://autoCreator/./node_modules/core-js/internals/to-integer.js","webpack://autoCreator/./node_modules/core-js/internals/to-length.js","webpack://autoCreator/./node_modules/core-js/internals/to-primitive.js","webpack://autoCreator/./node_modules/core-js/internals/uid.js","webpack://autoCreator/./node_modules/core-js/modules/es.math.log10.js","webpack://autoCreator/(webpack)/buildin/global.js","webpack://autoCreator/./src/CreatorFunctions.ts","webpack://autoCreator/./src/DerivedData.ts","webpack://autoCreator/./src/GeneratorModel.tsx","webpack://autoCreator/./src/PinsLogic.ts","webpack://autoCreator/./src/PwmCalculator.tsx","webpack://autoCreator/./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","createAutoCreator","getCreatorFunctions","getModuleConfig","getModuleConfigFromFile","getCreatorFunctionsUser","castComponent","component","category","getDefaultValue","overrideDefaultValues","name","type","defaultValue","value","getComboOptions","overrideOptions","hasConfigBits","interfaceName","getFriendlyInterfaceId","indexOf","getRegisterValues","model","registers","config","getDerivedData","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","mockPinsLogic","getPinsData","getCompletePinData","appModel","getRowData","rowData","rows","getPinsLogic","pinsLogic","shouldImport","getCreatorImportArgs","importKey","state","dataModel","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","pins_interface_args","getPinsinterfaceArgs","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","hardwareSettings","pwmInterface","templateSettings","registerValues","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","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;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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,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,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,EA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;AACA,MAAMkL,GAAG,GAAGwD,SAAS,CAACD,MAAD,CAArB;AAEA,SAAO;AACHvD,OAAG,EAAEA,GADF;AAEHC,aAAS,EAAEwD,uEAAA,CAA8BzD,GAA9B,CAFR;AAGHD,eAAW,EAAEA;AAHV,GAAP;AAKH,CAZD;;AAcA,IAAMyD,SAAS,GAAG,SAAZA,SAAY,CAACD,MAAD,EAAyB;AACvC,SAAO;AACHG,cAAU,EAAE;AACR7U,UAAI,EAAE0U,MAAM,GAAG,aADP;AAERI,aAAO,EAAE;AAFD,KADT;AAKHC,iBAAa,EAAE;AACX/U,UAAI,EAAE0U,MAAM,GAAG,gBADJ;AAEXM,eAAS,EAAE,CACP;AACIhV,YAAI,EAAE,WADV;AAEIC,YAAI,EAAE;AAFV,OADO,CAFA;AAQX6U,aAAO,EAAE;AARE;AALZ,GAAP;AAgBH,CAjBD;;AA4BO,IAAMN,SAAoB,GAAG;AAChCH,uBAAqB,EAAEA,qBADS;AAEhCD,uBAAqB,EAAEA,qBAFS;AAGhC/D,gBAAc,EAAEA,cAHgB;AAIhCkE,YAAU,EAAEA,UAJoB;AAKhCtF,mBAAiB,EAAEA;AALa,CAA7B,C","file":"autoCreator.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/autoCreator.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 { CreatorFunctions } from \"@microchip/melody-automodule-interface\";\nimport {\n getCreatorFunctions as getCreatorFunctionsUser,\n getModuleConfigFromFile,\n} from \"./getUserData\";\n\nconst createAutoCreator = (\n getCreatorFunctions: () => CreatorFunctions,\n): (() => CreatorFunctions) => {\n return (): CreatorFunctions => {\n return {\n getModuleConfig: getModuleConfigFromFile,\n ...getCreatorFunctions(),\n };\n };\n};\n\nexport const getCreatorFunctions = createAutoCreator(getCreatorFunctionsUser);\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","\"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\";\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.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\";\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/pins-interface/lib/types\";\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 pins_interface_args: this.getPinsinterfaceArgs,\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 === \"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 };\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\";\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://autoCreator/webpack/bootstrap","webpack://autoCreator/./generated_module/src/Utils.ts","webpack://autoCreator/./generated_module/src/autoCreator.ts","webpack://autoCreator/./generated_module/src/autoModule/AutoModuleHelpers.ts","webpack://autoCreator/./generated_module/src/autoModule/AutoModuleTemplates.ts","webpack://autoCreator/./generated_module/src/getUserData.ts","webpack://autoCreator/./generated_module/src/pins/PCPHelper.ts","webpack://autoCreator/./node_modules/@microchip/pins-interface/lib/types.js","webpack://autoCreator/./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js","webpack://autoCreator/./node_modules/@microchip/scf-common/lib/Processor.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/Register.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/Setting.js","webpack://autoCreator/./node_modules/@microchip/scf-device/lib/util/Arrays.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/c-function-types.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/helpers.js","webpack://autoCreator/./node_modules/@microchip/scf-interface/lib/index.js","webpack://autoCreator/./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js","webpack://autoCreator/./node_modules/@microchip/scf-validators/lib/index.js","webpack://autoCreator/./node_modules/core-js/es/math/log10.js","webpack://autoCreator/./node_modules/core-js/features/math/log10.js","webpack://autoCreator/./node_modules/core-js/internals/an-object.js","webpack://autoCreator/./node_modules/core-js/internals/array-includes.js","webpack://autoCreator/./node_modules/core-js/internals/classof-raw.js","webpack://autoCreator/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://autoCreator/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://autoCreator/./node_modules/core-js/internals/create-property-descriptor.js","webpack://autoCreator/./node_modules/core-js/internals/descriptors.js","webpack://autoCreator/./node_modules/core-js/internals/document-create-element.js","webpack://autoCreator/./node_modules/core-js/internals/enum-bug-keys.js","webpack://autoCreator/./node_modules/core-js/internals/export.js","webpack://autoCreator/./node_modules/core-js/internals/fails.js","webpack://autoCreator/./node_modules/core-js/internals/get-built-in.js","webpack://autoCreator/./node_modules/core-js/internals/global.js","webpack://autoCreator/./node_modules/core-js/internals/has.js","webpack://autoCreator/./node_modules/core-js/internals/hidden-keys.js","webpack://autoCreator/./node_modules/core-js/internals/ie8-dom-define.js","webpack://autoCreator/./node_modules/core-js/internals/indexed-object.js","webpack://autoCreator/./node_modules/core-js/internals/inspect-source.js","webpack://autoCreator/./node_modules/core-js/internals/internal-state.js","webpack://autoCreator/./node_modules/core-js/internals/is-forced.js","webpack://autoCreator/./node_modules/core-js/internals/is-object.js","webpack://autoCreator/./node_modules/core-js/internals/is-pure.js","webpack://autoCreator/./node_modules/core-js/internals/native-weak-map.js","webpack://autoCreator/./node_modules/core-js/internals/object-define-property.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://autoCreator/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://autoCreator/./node_modules/core-js/internals/object-keys-internal.js","webpack://autoCreator/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://autoCreator/./node_modules/core-js/internals/own-keys.js","webpack://autoCreator/./node_modules/core-js/internals/path.js","webpack://autoCreator/./node_modules/core-js/internals/redefine.js","webpack://autoCreator/./node_modules/core-js/internals/require-object-coercible.js","webpack://autoCreator/./node_modules/core-js/internals/set-global.js","webpack://autoCreator/./node_modules/core-js/internals/shared-key.js","webpack://autoCreator/./node_modules/core-js/internals/shared-store.js","webpack://autoCreator/./node_modules/core-js/internals/shared.js","webpack://autoCreator/./node_modules/core-js/internals/to-absolute-index.js","webpack://autoCreator/./node_modules/core-js/internals/to-indexed-object.js","webpack://autoCreator/./node_modules/core-js/internals/to-integer.js","webpack://autoCreator/./node_modules/core-js/internals/to-length.js","webpack://autoCreator/./node_modules/core-js/internals/to-primitive.js","webpack://autoCreator/./node_modules/core-js/internals/uid.js","webpack://autoCreator/./node_modules/core-js/modules/es.math.log10.js","webpack://autoCreator/(webpack)/buildin/global.js","webpack://autoCreator/./src/CreatorFunctions.ts","webpack://autoCreator/./src/DerivedData.ts","webpack://autoCreator/./src/GeneratorModel.tsx","webpack://autoCreator/./src/PinsLogic.ts","webpack://autoCreator/./src/PwmCalculator.tsx","webpack://autoCreator/./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","createAutoCreator","getCreatorFunctions","getModuleConfig","getModuleConfigFromFile","getCreatorFunctionsUser","castComponent","component","category","getDefaultValue","overrideDefaultValues","name","type","defaultValue","value","getComboOptions","overrideOptions","hasConfigBits","interfaceName","getFriendlyInterfaceId","indexOf","getRegisterValues","model","registers","config","getDerivedData","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","mockPinsLogic","getPinsData","getCompletePinData","appModel","getRowData","rowData","rows","getPinsLogic","pinsLogic","shouldImport","getCreatorImportArgs","importKey","state","INTERFACE_ID","pwm_general","getInterfaceId","INTERFACE_KEY","dataModel","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;QACA;QACA;QACA,yCAAyC,iCAA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A,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,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,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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,oCAAoC,gBAAgB,EAAE;AACtD,wCAAwC,qBAAqB,EAAE;AAC/D,CAAC,EAAE;;;;;;;;;;;;;ACjDU;AACb,8CAA8C,cAAc;AAC5D,2BAA2B,mBAAO,CAAC,sHAAiC;AACpE,yDAAyD,qCAAqC,mDAAmD,EAAE,EAAE;;;;;;;;;;;;ACHrJ,mBAAO,CAAC,oFAA6B;AACrC,WAAW,mBAAO,CAAC,sEAAsB;;AAEzC;;;;;;;;;;;;ACHA,aAAa,mBAAO,CAAC,oEAAqB;;AAE1C;;;;;;;;;;;;ACFA,eAAe,mBAAO,CAAC,6EAAwB;;AAE/C;AACA;AACA;AACA,GAAG;AACH;;;;;;;;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,mBAAiB,EAAEA;AALa,CAA7B,C","file":"autoCreator.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/autoCreator.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 { CreatorFunctions } from \"@microchip/melody-automodule-interface\";\nimport {\n getCreatorFunctions as getCreatorFunctionsUser,\n getModuleConfigFromFile,\n} from \"./getUserData\";\n\nconst createAutoCreator = (\n getCreatorFunctions: () => CreatorFunctions,\n): (() => CreatorFunctions) => {\n return (): CreatorFunctions => {\n return {\n getModuleConfig: getModuleConfigFromFile,\n ...getCreatorFunctions(),\n };\n };\n};\n\nexport const getCreatorFunctions = createAutoCreator(getCreatorFunctionsUser);\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","\"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\";\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.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\";\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":""}