@gmb/bitmark-parser-generator 3.33.0 → 3.34.0
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.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/ast/Builder.js +39 -46
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/ast/ResourceBuilder.js +1 -2
- package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +1012 -984
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -1
- package/dist/cjs/generator/text/TextGenerator.js +4 -0
- package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
- package/dist/esm/ast/Builder.js +39 -46
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/ast/ResourceBuilder.js +1 -2
- package/dist/esm/ast/ResourceBuilder.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generated/parser/text/text-peggy-parser.js +1012 -984
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -1
- package/dist/esm/generator/text/TextGenerator.js +4 -0
- package/dist/esm/generator/text/TextGenerator.js.map +1 -1
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +1 -1
- package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmarkParserGenerator=t():e.bitmarkParserGenerator=t()}(this,(()=>(()=>{"use strict";var e={4:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const i=r(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new i.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,r){let i;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(i=o[n](e,t,r)),i}between(e,t,r,i,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,r,i,o)),n}exit(e,t,r){const i=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof i[o]&&i[o](e,t,r)}leaf(e,t,r){const i=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof i[o]&&i[o](e,t,r),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}}},21:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=function(e,t,r,p,c){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",p);const u=e.bitContentProcessor(l.BitContentLevel.Chain,r,p.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",u);const{propertyTitle:y,resources:g}=u,d=i.Breakscape.unbreakscape(s.StringUtils.trimmedString(p.value),{format:n.TextFormat.bitmarkText,location:a.TextLocation.tag}),T=s.StringUtils.trimmedString(y),f=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||o.ResourceTag.image!==e.type?i.push(e):r=e;i.length>0&&(e.parser.excessResources=i,e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`));return r}(e,g),m={name:d,title:T,avatarImage:f};c.person=m};const i=r(7735),o=r(6149),n=r(385),a=r(6877),s=r(9681),l=r(3029)},98:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=r(6772),n=r(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",alternativeDefinitions:"alternativeDefinitions",alternativeDefinitionsValue:"alternativeDefinitionsValue",altLangTag:"altLangTag",altLangTagValue:"altLangTagValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",anchor:"anchor",answer:"answer",appLink:"appLink",attrs:"attrs",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyValue:"bodyValue",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookValue:"bookValue",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",bubbleTag:"bubbleTag",bubbleTagValue:"bubbleTagValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",callToActionUrl:"callToActionUrl",callToActionUrlValue:"callToActionUrlValue",caption:"caption",captionDefinitionList:"captionDefinitionList",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",categoryTag:"categoryTag",categoryTagValue:"categoryTagValue",cells:"cells",cellsValue:"cellsValue",chatWithBook:"chatWithBook",chatWithBookValue:"chatWithBookValue",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",class:"class",classification:"classification",classificationValue:"classificationValue",codeLineNumbers:"codeLineNumbers",codeLineNumbersValue:"codeLineNumbersValue",codeMinimap:"codeMinimap",codeMinimapValue:"codeMinimapValue",color:"color",colorTag:"colorTag",colorTagValue:"colorTagValue",column:"column",columns:"columns",columnsValue:"columnsValue",comment:"comment",commentedBitType:"commentedBitType",computerLanguage:"computerLanguage",computerLanguageValue:"computerLanguageValue",content:"contentValue",content2Buy:"content2Buy",contentValue:"contentValue",contentValueValue:"contentValueValue",copyright:"copyright",coverColor:"coverColor",coverColorValue:"coverColorValue",coverImage:"coverImage",coverImageValue:"coverImageValue",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",data:"data",dataValue:"dataValue",dataValueValue:"dataValueValue",date:"date",dateEnd:"dateEnd",dateEndValue:"dateEndValue",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",definition:"definition",definitions:"definitions",definitionsValue:"definitionsValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",diffTo:"diffTo",diffToValue:"diffToValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageFirst:"imageFirst",imageFirstValue:"imageFirstValue",imageLandscape:"imageLandscape",imageLink:"imageLink",imagePlaceholder:"imagePlaceholder",imagePlaceholderValue:"imagePlaceholderValue",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",__isDefaultExample:"__isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTemplate:"isTemplate",isTemplateValue:"isTemplateValue",isTemplateStripTheme:"isTemplateStripTheme",isTemplateStripThemeValue:"isTemplateStripThemeValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",jupyterExecutionCount:"jupyterExecutionCount",jupyterExecutionCountValue:"jupyterExecutionCountValue",jupyterId:"jupyterId",jupyterIdValue:"jupyterIdValue",key:"key",keyAudio:"keyAudio",keyImage:"keyImage",kind:"kind",kindValue:"kindValue",label:"label",labelFalse:"labelFalse",labelFalseValue:"labelFalseValue",labelTrue:"labelTrue",labelTrueValue:"labelTrueValue",lang:"lang",language:"language",languageValue:"languageValue",langValue:"langValue",layer:"layer",layerValue:"layerValue",layerRole:"layerRole",layerRoleValue:"layerRoleValue",lead:"lead",level:"level",levelACTFL:"levelACTFL",levelACTFLValue:"levelACTFLValue",levelCEFR:"levelCEFR",levelCEFRp:"levelCEFRp",levelCEFRpValue:"levelCEFRpValue",levelCEFRValue:"levelCEFRValue",levelILR:"levelILR",levelILRValue:"levelILRValue",license:"license",line:"line",list:"list",listItemIndent:"listItemIndent",listItemIndentValue:"listItemIndentValue",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",maxTocChapterLevel:"maxTocChapterLevel",maxTocChapterLevelValue:"maxTocChapterLevelValue",tocResource:"tocResource",tocResourceValue:"tocResourceValue",tocContent:"tocContent",tocContentValue:"tocContentValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",path:"path",pathValue:"pathValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",processHandIn:"processHandIn",processHandInValue:"processHandInValue",processHandInLocation:"processHandInLocation",processHandInLocationValue:"processHandInLocationValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productId:"productId",productIdValue:"productIdValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",pronunciationTable:"pronunciationTable",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reason:"reason",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",refAuthor:"refAuthor",refBookTitle:"refBookTitle",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",revealSolutions:"revealSolutions",root:"root",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeaderWhitespaceNoWrapValue:"tableHeaderWhitespaceNoWrapValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableSearch:"tableSearch",tableSearchValue:"tableSearchValue",tableSort:"tableSort",tableSortValue:"tableSortValue",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tableWhitespaceNoWrapValue:"tableWhitespaceNoWrapValue",tag:"tag",tagValue:"tagValue",target:"target",targetValue:"targetValue",technicalTerm:"technicalTerm",technicalTermValue:"technicalTermValue",term:"term",text:"text",textAlign:"textAlign",textAst:"textAst",textAstValue:"textAstValue",textFormat:"textFormat",textReference:"textReference",textReferenceValue:"textReferenceValue",texts:"texts",textsValue:"textsValue",theme:"theme",themeValue:"themeValue",thumbImage:"thumbImage",thumbImageValue:"thumbImageValue",thumbnails:"thumbnails",thumbnailsValue:"thumbnailsValue",title:"title",toc:"toc",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",trim:"trim",type:"type",__typeAlias:"__typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorDashboardId:"vendorDashboardId",vendorDashboardIdValue:"vendorDashboardIdValue",vendorSurveyId:"vendorSurveyId",vendorSurveyIdValue:"vendorSurveyIdValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",video:"video",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",videoEmbed:"videoEmbed",videoLink:"videoLink",warnings:"warnings",warningsValue:"warningsValue",websiteLink:"websiteLink",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=i},166:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const i=r(4718),o=r(9888),n=(0,i.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const i=r(5051),o=r(9984),n=r(6149),a={[i.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[i.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[i.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[i.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[i.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[i.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[i.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[i.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[i.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[i.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[i.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[i.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[i.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[i.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[i.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[i.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[i.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[i.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[i.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[i.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[i.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[i.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink},[i.ResourceConfigKey.icon]:{tag:n.ResourceTag.icon},[i.ResourceConfigKey.backgroundWallpaper]:{tag:n.ResourceTag.backgroundWallpaper},[i.ResourceConfigKey.imagePlaceholder]:{tag:n.ResourceTag.imagePlaceholder}};t.RESOURCES=a},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const r=new class{fileExtensionFromUrl(e){let t;if(e)try{const r=new URL(e).pathname.split(".");r.length>1&&(t=r[r.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}};t.UrlUtils=r},363:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=i},385:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const i=(0,r(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"});t.TextFormat=i},431:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=r(5126),n=r(7735),a=r(126),s=r(3811),l=r(385),p=r(6877),c=r(2483),u=r(9554),y=r(9681),g=r(4),d={bodyBitCallback:void 0,debugGenerationInline:!1},T="==",f=["*","`","_","!","="],m={[c.TextMarkType.bold]:"**",[c.TextMarkType.light]:"``",[c.TextMarkType.italic]:"__",[c.TextMarkType.highlight]:"!!"},h=[c.TextMarkType.bold,c.TextMarkType.light,c.TextMarkType.italic,c.TextMarkType.highlight],b=[c.TextMarkType.strike,c.TextMarkType.subscript,c.TextMarkType.superscript,c.TextMarkType.ins,c.TextMarkType.del,c.TextMarkType.underline,c.TextMarkType.doubleUnderline,c.TextMarkType.circle,c.TextMarkType.languageEmRed,c.TextMarkType.languageEmOrange,c.TextMarkType.languageEmYellow,c.TextMarkType.languageEmGreen,c.TextMarkType.languageEmBlue,c.TextMarkType.languageEmPurple,c.TextMarkType.languageEmPink,c.TextMarkType.languageEmBrown,c.TextMarkType.languageEmBlack,c.TextMarkType.languageEmWhite,c.TextMarkType.languageEmGray,c.TextMarkType.languageEm,c.TextMarkType.userUnderline,c.TextMarkType.userDoubleUnderline,c.TextMarkType.userStrike,c.TextMarkType.userCircle,c.TextMarkType.userHighlight,c.TextMarkType.notranslate,c.TextMarkType.link,c.TextMarkType.ref,c.TextMarkType.xref,c.TextMarkType.extref,c.TextMarkType.footnote,c.TextMarkType.footnoteStar,c.TextMarkType.symbol,c.TextMarkType.var,c.TextMarkType.code,c.TextMarkType.timer,c.TextMarkType.duration,c.TextMarkType.color,c.TextMarkType.comment],B=new RegExp(/(\n|\r\n)/,"g"),v=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),C=new RegExp(/\]/,"g"),x="enter",P="between",k="exit";class _ extends g.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.generateOptions={},this.textFormat=l.TextFormat.bitmarkText,this.textLocation=p.TextLocation.body,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.text,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1,this.bitmarkVersion=null!==(r=s.BitmarkVersion.fromValue(e))&&void 0!==r?r:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},d),t),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion,s.BitmarkVersion.v2,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this)}generate(e,t,r,o){return i(this,void 0,void 0,(function*(){return this.generateSync(e,t,r,o)}))}generateSync(e,t,r,i){if(this.generateOptions=Object.assign({},i),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const i=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,r),this.walkAndWrite(e),this.options.writeCallback=i,this.options.bodyBitCallback=o;const n=this.havePreText,a=this.preTextIndex;this.resetState(t,r),this.havePreText=n,this.preTextIndex=a,this.walkAndWrite(e)}else this.resetState(t,r),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=null!=e?e:l.TextFormat.bitmarkText,this.textLocation=t,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,a.NodeType.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,r,i){return this.handleBetweenNode(e.value,t,r,i)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,r,i){this.handleBetweenContentValueNode(e,t,r,i)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,r,i){this.handleBetweenNode(e.value,t,r,i)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}handleEnterNode(e,t){switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case u.TextNodeType.paragraph:this.inParagraph=!0,this.writeParagraph(e);break;case u.TextNodeType.hardBreak:this.writeHardBreak(e);break;case u.TextNodeType.text:this.writeMarks(e,x),this.writeText(e),this.writeMarks(e,P),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case u.TextNodeType.heading:this.writeHeading(e),this.inHeading=!0;break;case u.TextNodeType.section:this.writeSection(e);break;case u.TextNodeType.listItem:case u.TextNodeType.taskItem:this.writeBullet(e,t);break;case u.TextNodeType.image:case u.TextNodeType.imageInline:this.writeImage(e);break;case u.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case u.TextNodeType.latex:this.writeLatex(e);break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.inBulletList=!0;break;case u.TextNodeType.gap:case u.TextNodeType.select:case u.TextNodeType.highlight:case u.TextNodeType.mark:return this.writeBodyBit(e,t),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){switch(e.type){case u.TextNodeType.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,k);break;case u.TextNodeType.paragraph:this.writeNL(),this.inParagraph=!1;break;case u.TextNodeType.heading:this.inHeading=!1;case u.TextNodeType.section:case u.TextNodeType.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case u.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}handleIndent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=u.TextNodeType.hardBreak)}handleBetweenContentValueNode(e,t,r,i){if(3===i.length){const e=t.value;this.updatePreTextState(),this.thisNodeIsPreText=!0,this.previousRootParagraphContextType=e.type,this.rootParagraphNodeContentIndex++}}handleExitContentValueNode(e,t){3===t.length&&(this.updatePreTextState(),this.thisNodeIsPreText=!1,this.generateOptions.plainTextDividerAllowed&&this.inPreText&&(this.havePreText=!0,this.preTextIndex=this.preTextIndexTemp),this.inPreText=!1)}updatePreTextState(){!this.inPreText&&this.thisNodeIsPreText&&this.previousRootParagraphContextType===u.TextNodeType.hardBreak?(this.inPreText=!0,this.preTextIndexTemp=this.rootParagraphNodeContentIndex):this.inPreText&&!this.thisNodeIsPreText&&(this.inPreText=!1,this.preTextIndexTemp=-1)}handleEnterNodePreTextCheck(e,t){if(4===t.length){if(this.inPreText&&e.type===u.TextNodeType.hardBreak)return;if(e.type===u.TextNodeType.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===u.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var r;if(t.type===c.TextMarkType.link){const e=null===(r=t.attrs)||void 0===r?void 0:r.href;if(e)return e}return e}),"");if(t)return t}return!1}getIndentationString(){if(this.currentIndent===this.prevIndent)return this.indentationStringCache;let e="";for(let t=1;t<this.currentIndent;t++)e+="\t";return this.indentationStringCache=e,this.prevIndent=this.currentIndent,e}writeBodyBit(e,t){const r=`[!${this.placeholderIndex}]`;if(this.placeholders[r]=e,this.options.bodyBitCallback){const r=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(r)}else this.write(r);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let r=e.text;const i=this.getLinkText(e);if(i&&(r=i),r=i||this.breakscape(r,{format:this.textFormat,location:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();r=r.replace(B,`$1${e}`)}if(this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{format:l.TextFormat.plainText,location:this.textLocation});this.write(t)}else this.write(r);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==r||(this.thisNodeIsPreText=!1)}isSimpleLink(e){var t;if(null==e.text)return!1;if(1!==(null===(t=e.marks)||void 0===t?void 0:t.length))return!1;const r=this.getLinkHref(e);if(r){return r.replace(v,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r;return r=t.replace(v,"$1")===e.text?t:e.text,r=(null!=r?r:"").replace(C,"^]"),r}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===s.BitmarkVersion.v2)return"";if(this.textFormat===l.TextFormat.plainText)return"";const t=this.writerText.slice(-1),r=e.slice(0,1);return t===r&&-1!==f.indexOf(t)||this.textLocation===p.TextLocation.body&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(r)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==u.TextNodeType.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const r=!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(T);const i=1===e.marks.length&&r,o=e.marks.reduce(((e,t)=>e||(-1!==h.indexOf(t.type)?i?m[t.type]:T:-1!==b.indexOf(t.type)?T:e)),void 0),n=this.isSimpleLink(e);if(null!=o&&!n){if(t!=x&&t!=P||this.writeMarkTextWrapper(o),t==P)for(const t of e.marks)-1!==h.indexOf(t.type)?i||(this.writeInlineMarkStartEnd(),this.writeInlineMark(t)):c.TextMarkType.comment===t.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(t)):c.TextMarkType.link===t.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(t)):c.TextMarkType.ref===t.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(t)):c.TextMarkType.xref===t.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(t)):c.TextMarkType.extref===t.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(t)):c.TextMarkType.footnote===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(t)):c.TextMarkType.footnoteStar===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(t)):c.TextMarkType.symbol===t.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(t)):-1!==b.indexOf(t.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(t));if(t==k){let t=!1;for(const r of e.marks)-1!==h.indexOf(r.type)?i||(t=!0):c.TextMarkType.comment!==r.type&&c.TextMarkType.link!==r.type&&c.TextMarkType.ref!==r.type&&c.TextMarkType.xref!==r.type&&c.TextMarkType.footnote!==r.type&&c.TextMarkType.footnoteStar!==r.type&&-1===b.indexOf(r.type)||(t=!0);t&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e){var t,r,i,o,n;if(this.textFormat===l.TextFormat.bitmarkText){if(this.inBulletList)return;const a=null!==(r=null===(t=e.content)||void 0===t?void 0:t.length)&&void 0!==r?r:0;if(0===this.nodeIndex){if(1===a){const t=(null===(i=e.content)||void 0===i?void 0:i[0].type)===u.TextNodeType.text,r=null!==(n=null===(o=e.content)||void 0===o?void 0:o[0].text)&&void 0!==n?n:"";if(!t||""!==r)return}if(a>1)return}this.write("|"),this.writeNL(),this.exitedCodeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,r;let i="";const o=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==r?r:1;for(let e=0;e<+o;e++)i+="#";i+=" ",this.write(i)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var r,i,o,n;let a=this.getIndentationString();const s=this.getParentNode(t,2),l=null==s?void 0:s.value,p=null==l?void 0:l.type,c=null!==(i=null===(r=null==l?void 0:l.attrs)||void 0===r?void 0:r.start)&&void 0!==i?i:1;if(p===u.TextNodeType.bulletList)a+="• ";else if(p===u.TextNodeType.noBulletList)a+="•_ ";else if(p===u.TextNodeType.orderedList)a+=`•${c} `;else if(p===u.TextNodeType.orderedListRoman)a+=`•${c}I `;else if(p===u.TextNodeType.orderedListRomanLower)a+=`•${c}i `;else if(p===u.TextNodeType.letteredList)a+="•A ";else if(p===u.TextNodeType.letteredListLower)a+="•a ";else if(p===u.TextNodeType.taskList){a+=null!==(n=null===(o=e.attrs)||void 0===o?void 0:o.checked)&&void 0!==n&&n?"•+ ":"•- "}a&&this.write(a)}writeImage(e){var t;if(null==e.attrs||!e.attrs.src)return;const r=e.attrs,i=e.type===u.TextNodeType.imageInline,o=this.getMediaAttrs(i?"imageInline":"image",r,{ignoreAttributes:i?new Set(["alt","zoomDisabled","title"]):void 0});let n="";i&&(n=`==${null!==(t=r.alt)&&void 0!==t?t:""}==`),n+=o?`|${o}|`:"",this.write(n)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,r=`==${this.breakscape(t.formula,{format:this.textFormat,location:this.textLocation})}==|latex|`;this.write(r)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[r,i]of Object.entries(e.attrs))("language"===r&&"plain text"!==i||"color"===r||"name"===r||"duration"===r)&&(t=`${t}:${i}`);this.write(t)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){var t;const r=(null===(t=e.attrs)||void 0===t?void 0:t.href)||"",i=`link:${(null!=r?r:"").replace(C,"^]")}`;this.write(i)}writeRefMark(e){var t,r;const i=`►${null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.reference)&&void 0!==r?r:""}`;this.write(i)}writeXRefMark(e){var t,r,i,o;const n=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.xref)&&void 0!==r?r:"",a=null!==(o=null===(i=e.attrs)||void 0===i?void 0:i.reference)&&void 0!==o?o:"";let s=`xref:${n}`;a&&(s+=`|►${a}`),this.write(s)}writeExtRefMark(e){var t,r,i,o,n,a;const s=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.extref)&&void 0!==r?r:"",l=null!==(o=null===(i=e.attrs)||void 0===i?void 0:i.references)&&void 0!==o?o:[],p=null!==(a=null===(n=e.attrs)||void 0===n?void 0:n.provider)&&void 0!==a?a:"";let c=`extref:${s}`;for(const e of l)c+=`|►${null!=e?e:""}`;c+=`|provider:${p}`,this.write(c)}writeFootnoteMark(e){this.write("footnote:")}writeFootnoteStarMark(e){this.write("footnote*:")}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,r=this.getMediaAttrs("symbol",t),i=null!=r?r:"";this.write(i)}writeInlineMarkStartEnd(){this.write("|")}writePlainTextDivider(){this.write("==== text ====")}writeString(e){null!=e&&this.write(`${e}`)}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}getMediaAttrs(e,t,r){var i,o;if(!e)return;const n=null!==(i=Object.assign({},r).ignoreAttributes)&&void 0!==i?i:new Set;let a=`${e}:${null!==(o=null==t?void 0:t.src)&&void 0!==o?o:""}`;const s=Object.entries(t).filter((([e,t])=>"src"!==e));for(let e=0;e<s.length;e++){const[t,r]=s[e];if(!n.has(t))switch(t){case"textAlign":"left"!==r&&(a+=`|captionAlign:${r}`);break;case"alignment":"center"!==r&&r&&(a+=`|alignment:${r}`);break;case"title":r&&(a+=`|caption:${r}`);break;case"class":"center"!==r&&r&&(a+=`|align:${r}`);break;case"comment":r&&(a+=`|#${r}`);break;case"":y.StringUtils.isString(r)?a+=`|:${r}`:a+="|";break;default:t&&r&&(a+=`|${t}:${r}`)}}return a}breakscape(e,t){return this.generateOptions.noBreakscaping?e:n.Breakscape.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=_},486:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const i=(0,r(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=i},554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=function(e,t,r,l,p){const{textFormat:c}=e,{value:u}=l,y=p.solutions,g=p.__solutionsAst;if(!y||!g)return;if(a.StringUtils.isString(u)){const e=a.StringUtils.trimmedString(u);y.push(i.Breakscape.unbreakscape(e,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}));const t=s.toAst(e,{format:c,location:n.TextLocation.tag});g.push(t)}};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=new(r(777).TextParser)},777:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const i=r(6877),o=r(9554),n=r(9681),a=r(2220);t.TextParser=class{version(){return(0,a.parse)("",{startRule:"version"})}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){if(Array.isArray(e)){if(0===e.length)return!0;if(Object.prototype.hasOwnProperty.call(e[0],"type"))return!0}return!1}toAst(e,t){var r;if(Array.isArray(e))return e;let o=null!==(r=e)&&void 0!==r?r:"";if(!o)return[];let n="bitmarkPlusPlus";return Object.assign({},t).location===i.TextLocation.tag&&(n="bitmarkPlus"),o=o.trim(),(0,a.parse)(o,{startRule:n})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],r=e;for(const e of r)switch(e.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t.push(e);break;default:{const r=this.extractBodyBits(e.content);for(const e of r)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const r=e;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t(r,e,i);break;default:this.walkBodyBits(i.content,t)}}}}},955:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=i(r(7678));const n=new class{isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}isArray(e){return Array.isArray(e)}isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}getViaPath(e,t){if(!e)return;if(!t)return;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let r=e;for(const e of t){if(null==r)return;r=r[e]}return r}setViaPath(e,t,r,i){if(!e)return!1;if(!t)return!1;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let o=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(null==o[r]){if(!i)return!1;o[r]={}}o=o[r]}return o[t[t.length-1]]=r,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const r=e,i=t.shift();if(null==i)return r;const o=r[i];return o?Array.isArray(o)?o.flatMap((e=>this.flatMapPath(e,t.slice()))):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const r=e,i=Object.assign({},r);for(const e of Object.keys(r))delete r[e];for(const e of t)Object.prototype.hasOwnProperty.call(i,e)&&(r[e]=i[e])}removeUndefinedProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||null==i&&delete r[e]}removeFalseProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||!1===i&&delete r[e]}removeEmptyStringProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||""===i&&delete r[e]}removeEmptyArrayProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||Array.isArray(i)&&0===i.length&&delete r[e]}removeEmptyObjectProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||this.isObject(i)&&0===Object.keys(i).length&&delete r[e]}removeUnwantedProperties(e,t){(t=Object.assign({},t)).ignoreAllUndefined||this.removeUndefinedProperties(e,t.ignoreUndefined),t.ignoreAllFalse||this.removeFalseProperties(e,t.ignoreFalse),t.ignoreAllEmptyString||this.removeEmptyStringProperties(e,t.ignoreEmptyString),t.ignoreAllEmptyArrays||this.removeEmptyArrayProperties(e,t.ignoreEmptyArrays),t.ignoreAllEmptyObjects||this.removeEmptyObjectProperties(e,t.ignoreEmptyObjects)}extractSingleValue(e,t){if(!e)return;const r=e;if(null==r[t])return;let i=r[t];if(Array.isArray(i)){if(0===i.length)return;i=i[i.length-1]}return i}deepMerge(...e){return function e(...t){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(t,i){for(const[n,a]of Object.entries(i)){const i=r(a);void 0!==t[n]&&r(t[n])===i&&["array","object"].includes(i)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=r(e);r(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?i(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},1083:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=function(e,t,r,d,T,f,m,h){var b;const{bitConfig:B}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",d);let v={};const C=function(e,t){var r;const i={cards:[],internalComments:[]};if(!t)return i;const{bitType:o}=e;let a=0,s=0,l=0;for(const p of t.cards){const t={no:a++,sides:[]};i.cards.push(t);for(const a of p.sides){const p={no:s++,variants:[]};t.sides.push(p);for(const c of a.variants){const{parser:a,content:g}=c,d={parser:a,no:l++};p.variants.push(d);const T=n.Config.getTagsConfigForCardSet(o,s,l),f=e.bitContentProcessor(y.BitContentLevel.Card,T,g);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",f),f.cardBody=u.BitmarkPegParserValidator.checkCardBody(e,y.BitContentLevel.Card,o,f.cardBody,t.no,p.no,d.no),f.cardBodyStr=null===(r=f.cardBody)||void 0===r?void 0:r.bodyString,d.data=f,f.internalComments&&i.internalComments.push(...f.internalComments)}l=0}s=0}return i}(e,d);switch(null===(b=B.cardSet)||void 0===b?void 0:b.configKey){case a.CardSetConfigKey._flashcard:case a.CardSetConfigKey._definitionList:v=function(e,t,r){var o;const a=[],l=[];let p,c,u,y="",d=[],T=0,f={};const m=t===s.BitType.flashcard1,h=g(r);for(let g=0;g<r.cards.length;g++){const b=r.cards[g];if(!h||0!==g){p=void 0,c=void 0,d=[],T=0,f={};for(const e of b.sides)for(const t of e.variants){const e=t.data,{cardBody:r,resources:n}=e,a=i(e,["cardBody","resources"]);f=Object.assign(Object.assign({},f),a);const s=n&&n.length>0?n[0]:void 0,l=null==r?void 0:r.body,g=null!==(o=null==r?void 0:r.bodyString)&&void 0!==o?o:"";0===T?(u=t,y=g,p={text:l,icon:s}):1===T?c={text:l,icon:s}:d.push({text:l,icon:s}),T++}if(0!==g&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${y}'`,u);break}if(n.Config.isOfBitType(t,[s.BitType.flashcard])){const e=Object.assign({question:p,answer:c,alternativeAnswers:d},f);e&&a.push(e)}else{const e=Object.assign({term:p,definition:c,alternativeDefinitions:d},f);e&&l.push(e)}}}return{heading:null==h?void 0:h.heading,flashcards:a.length>0?a:void 0,definitions:l.length>0?l:void 0}}(e,t,C);break;case a.CardSetConfigKey._elements:v=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(i=t.cardBodyStr)&&void 0!==i?i:"")}return{elements:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._statements:v=function(e,t,r,o,n){var a;const s=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:r,statement:o}=t,n=i(t,["statements","statement"]);if(Array.isArray(r))for(const e of r){const t=Object.assign({statement:null!==(a=e.statement)&&void 0!==a?a:"",isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example},n);t&&s.push(t)}}o&&s.push(o);Array.isArray(n)&&n.length>0&&s.push(...n);return{statements:s.length>0?s:void 0}}(0,0,C,T,f);break;case a.CardSetConfigKey._feedback:v=function(e,t,r){let o;const n=[],a=g(r);for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(!a||0!==e){o=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:s,choices:l}=r,p=i(r,["cardBody","cardBodyStr","choices"]);if(0===e){const e=[];if(l&&l.length>0)for(const t of l){const{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]),a={choice:n.choice,requireReason:n.isCorrect,__isDefaultExample:r,example:o};e.push(a)}o=Object.assign(Object.assign({},r),{choices:e}),o&&n.push(o)}else if(1===e){const e=Object.assign({text:null!=s?s:"",__textAst:null==a?void 0:a.body},p);o&&(o.reason=e)}}}}}return{heading:null==a?void 0:a.heading,feedbacks:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._quiz:v=function(e,t,r,o,a){const l=[],p=n.Config.isOfBitType(t,s.BitType.multipleChoice),c=n.Config.isOfBitType(t,s.BitType.multipleResponse);if(!p&&!c)return{};let u,y=!1;for(const e of r.cards){y=!1,u=void 0;for(const t of e.sides)for(const e of t.variants){const t=e.data,{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]);if(y=!0===r||y,u=o||u,n.trueFalse&&n.trueFalse.length>0){const e=[];for(const t of n.trueFalse){const{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]),a=r||y,s=o||u,l={isCorrect:n.isCorrect,__isDefaultExample:a,example:s};c?l.response=n.text:l.choice=n.text,l&&e.push(l)}c?n.responses=e:n.choices=e}const a=Object.assign(Object.assign({},n),{choices:n.choices,responses:n.responses,__isDefaultExample:y,__defaultExample:u});a&&l.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e={choices:o};e&&l.push(e)}if(c&&Array.isArray(a)&&a.length>0){const e={responses:a};e&&l.push(e)}return{quizzes:l.length>0?l:void 0}}(0,t,C,m,h);break;case a.CardSetConfigKey._questions:v=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=Object.assign({question:null!==(i=t.cardBodyStr)&&void 0!==i?i:""},t);r&&o.push(r)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._matchPairs:v=function(e,t,r){var o;const a=[];let l,c,u,y,d=[],T=[],f={},m=!1;const h=n.Config.isOfBitType(t,s.BitType.matchMatrix),b=g(r,h),B=null!==(o=null==b?void 0:b.isDefaultExampleCardSet)&&void 0!==o&&o;let v=null==b?void 0:b.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(b&&0===e)continue;l=void 0,d=[],T=[],c=void 0,u=void 0,f={},m=!1,y=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:o,cardBodyStr:n,resources:a,__isDefaultExample:s,example:g}=r,h=i(r,["cardBody","cardBodyStr","resources","__isDefaultExample","example"]);if(m=!0===s||m,y=g||y,0===e)if(Array.isArray(a)&&a.length>0){const e=a[0];e.type===p.ResourceTag.audio?c=e:e.type===p.ResourceTag.image&&(u=e)}else l=n;else{const e=null!=n?n:"",t=null==o?void 0:o.body;d.push(e),T.push(t),!B&&!m||y||(y=t),delete h.item,delete h.lead}f=Object.assign(Object.assign({},f),h)}}m&&(v=void 0);const o=m||B,n=y||v,s=Object.assign(Object.assign({key:null!=l?l:"",keyAudio:c,keyImage:u,values:d,__valuesAst:T},f),{__isDefaultExample:o,example:n});s&&a.push(s)}return{heading:null==b?void 0:b.heading,pairs:a.length>0?a:void 0}}(0,t,C);break;case a.CardSetConfigKey._matchMatrix:v=function(e,t,r){var n;let a,s;const l=[];let p,c,u,y,d=[],T=[],f=[],m={},h=!1,b=!1;const B=g(r,!0),v=null!==(n=null==B?void 0:B.isDefaultExampleCardSet)&&void 0!==n&&n;let C=null==B?void 0:B.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(B&&0===e)continue;a=void 0,s=void 0,d=[],T=[],f=[],h=!1,p=void 0,u=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];T=[],f=[],m={},b=!1,c=void 0,y=void 0;for(const t of r.variants){const r=t.data,{cardBody:n,cardBodyStr:l,__isDefaultExample:g,example:d,isCaseSensitive:B}=r,C=i(r,["cardBody","cardBodyStr","__isDefaultExample","example","isCaseSensitive"]);if(b=!0===g||b,c=d||c,Object.assign(m,C),0===e)a=l,s=C,h=!0===g||h,p=d||p,u=null!=B?B:u;else{const e=null!=l?l:o.Breakscape.EMPTY_STRING,t=null==n?void 0:n.body;T.push(e),f.push(t),!v&&!b||c||(c=t),y=null!=B?B:u}}if(e>0){b&&(p=C=void 0),h&&(C=void 0);const e=b||h||v,t=c||p||C,r=Object.assign(Object.assign({values:T,__valuesAst:f},m),{__isDefaultExample:e,example:t,isCaseSensitive:y});r&&d.push(r)}}const n=Object.assign({key:null!=a?a:o.Breakscape.EMPTY_STRING,cells:d},s);n&&l.push(n)}return{heading:null==B?void 0:B.heading,matrix:l.length>0?l:void 0}}(0,0,C);break;case a.CardSetConfigKey._pronunciationTable:v=function(e,t,r){var i;const o=[];let n=[];for(const e of r.cards){n=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBody:o,resources:a}=t,s=r&&r[1].titleAst,l=a&&a.length>0?a.find((e=>e.type===p.ResourceTag.audio)):void 0,c={title:null!=s?s:[],body:null!==(i=null==o?void 0:o.body)&&void 0!==i?i:[],audio:l};n.push(c)}o.push(n)}return{pronunciationTable:{data:o}}}(0,0,C);break;case a.CardSetConfigKey._table:v=function(e,t,r){var i;let o=!1;const n=[],a=[];let s=[];for(let e=0;e<r.cards.length;e++){const t=r.cards[e];o=!1,s=[];for(const r of t.sides)for(const t of r.variants){const r=t.data,{title:a,cardBody:l}=r,p=a&&a[1].titleAst;if(0===e&&null!=p&&(o=!0),o)n.push(null!=p?p:[]);else{const e=null!==(i=null==l?void 0:l.body)&&void 0!==i?i:[];s.push(e)}}o||a.push(s)}return{table:{columns:n,data:a}}}(0,0,C);break;case a.CardSetConfigKey._botActionResponses:v=function(e,t,r){const n=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{__instructionString:r,reaction:a,cardBodyStr:s}=t,l=i(t,["__instructionString","reaction","cardBodyStr"]),p=Object.assign({response:null!=r?r:o.Breakscape.EMPTY_STRING,reaction:null!=a?a:o.Breakscape.EMPTY_STRING,feedback:null!=s?s:o.Breakscape.EMPTY_STRING},l);p&&n.push(p)}return{botResponses:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._ingredients:v=function(e,t,r){const n=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,__instructionString:a,unit:s,unitAbbr:p,decimalPlaces:u,disableCalculation:y,cardBodyStr:g,cardBody:d}=t,T=i(t,["title","__instructionString","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),f=Array.isArray(r)&&r.length>0?r[r.length-1].titleString:void 0;let m=!1,h=c.NumberUtils.asNumber(a);if(d&&d.bodyBits){const e=d.bodyBits.find((e=>e.type===l.BodyBitType.select));e&&(h=e.__instructionString?c.NumberUtils.asNumber(e.__instructionString):h,e.options&&e.options.length>0&&(m=e.options[0].isCorrect))}const b=Object.assign({title:f,checked:m,ingredient:g,quantity:h,unit:null!=s?s:o.Breakscape.EMPTY_STRING,unitAbbr:null!=p?p:o.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:y},T);b&&n.push(b)}return{ingredients:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._clozeList:case a.CardSetConfigKey._exampleBitList:case a.CardSetConfigKey._bookReferenceList:v=function(e,t,r,o){const n=[];for(const e of o.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:r}=t,o=i(t,["cardBody"]),a=Object.assign({body:r},o);a&&n.push(a)}return{cardBits:n.length>0?n:void 0}}(0,0,0,C)}return v.internalComments=C.internalComments.length>0?C.internalComments:void 0,v};const o=r(7735),n=r(2028),a=r(8199),s=r(5854),l=r(4410),p=r(6149),c=r(8025),u=r(4266),y=r(3029);function g(e,t=!1){let r,i,o=!1;const n=[];let a,s=!1;if(0===e.cards.length)return;const l=e.cards[0];for(let e=0;e<l.sides.length;e++){const t=l.sides[e];if(0===t.variants.length)continue;const r=t.variants[0].data,{title:p,__isDefaultExample:c,example:u}=r,y=p&&p[1].titleString;null!=y&&(o=!0),0===e?o&&(i=y,s=!0===c||s,a=u||a):o&&(n.push(null!=y?y:""),s=!0===c||s,a=u||a)}if(o){let e=n;e=t?n:n.length>=1?n[n.length-1]:"",r={forKeys:null!=i?i:"",forValues:e}}return r?{heading:r,isDefaultExampleCardSet:s,exampleCardSet:a}:void 0}},1163:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const i=(0,r(4718).superenum)({v1:1,v2:2});t.CardSetVersion=i},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){if(n)return;(0,o.initEnv)(i.buildInfo.name,i.buildInfo.version),n=!0};const i=r(1464),o=r(6936);r(2028);let n=!1},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,r,i){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=r,this.comboResourceTagTypesMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"3.33.0",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},1519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s,l,p,c,u){super(i.BitTagType.property,e,t,r,o,n,a,s,u),this.type=i.BitTagType.property,this.single=l,this.format=p,this.defaultValue=c}toString(e){const t=Object.assign({},e);let r=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.single&&(r+=`, sgl=${this.single}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`),null!=this.astKey&&(r+=`, ast=${this.astKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.PropertyTagConfig=n},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8},1791:function(e,t,r){var i,o=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=(this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},i(e)}),this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.Input=t.BitmarkParserGenerator=void 0;const s=r(4718),l=r(5126),p=r(3968),c=r(7984),u=r(8588),y=r(5633),g=r(5663),d=r(6936),T=r(3881),f=r(486),m=r(3069),h=r(2028),b=r(431),B=r(777),v=(0,s.superenum)({string:"string",file:"file"});t.Input=v;const C=(0,s.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=C;t.BitmarkParserGenerator=class{constructor(){this.ast=new l.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new y.BitmarkParser,this.textParser=new B.TextParser,this.textGenerator=new b.TextGenerator,this.jsonStringifyPrettify=(e,t,r)=>{const i=!0===t.prettify?2:t.prettify||void 0;return r||!0===t.stringify||void 0!==i?JSON.stringify(e,null,i):e}}version(){return d.env.appVersion.full}info(e){const t=Object.assign({},e),r=new T.InfoBuilder;let i;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,p=a||s;if(t.type===f.InfoType.bit){const e=r.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.getBitType(t.bit)===e.bitType}));i=o?e.map((e=>e.toString({includeChains:!0,includeConfigs:!0}))).join("\n\n--------------\n\n"):e}else{const e=r.getSupportedBits({includeNonDeprecated:l,includeDeprecated:p}).filter((e=>{if(!t.bit)return!0;const r=h.Config.getBitType(t.bit);return e.name===r||void 0}));i=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}convert(e,t){return a(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),n=i.outputFormat,s=n===C.bitmark,l=n===C.json,y=n===C.ast,g=u.BitmarkParserType.peggy;let T=e;if(d.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==v.file||d.env.isNode&&fs.existsSync(T)&&(T=fs.readFileSync(T,{encoding:"utf8"}));let f=this.ast.preprocessAst(T);const m=!!f;m||(f=this.jsonParser.toAst(T));const h=!!(null==f?void 0:f.bits),b=e=>a(this,void 0,void 0,(function*(){yield B(e),yield P(r)})),B=e=>a(this,void 0,void 0,(function*(){r=this.bitmarkParser.toAst(e,{parserType:g})})),x=e=>a(this,void 0,void 0,(function*(){if(g===u.BitmarkParserType.peggy)if(f=this.bitmarkParser.toAst(e,{parserType:g}),i.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield e.generate(f)}else{const e=new c.JsonObjectGenerator(i),t=yield e.generate(f);r=this.jsonStringifyPrettify(t,o)}})),P=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(i);r=yield t.generate(e)}})),k=e=>a(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),_=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}})),K=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(i);r=yield t.generate(e)}})),A=e=>a(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),w=e=>a(this,void 0,void 0,(function*(){yield _(e)}));return!h&&!m?s?yield b(T):y?yield B(T):yield x(T):m?y?yield k(f):l?yield _(f):yield P(f):l?yield w(f):y?yield A(f):yield K(f),r}))}upgrade(e,t){return a(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),n=i.bitmarkParserType;let s=e;if(d.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==v.file||d.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const u=e=>a(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:n});if(i.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield e.generate(t)}else{const e=new p.BitmarkStringGenerator(i);r=yield e.generate(t)}})),y=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}}));return!!!(null==l?void 0:l.bits)?yield u(s):yield y(l),r}))}createAst(e,t){let r,i=e;const o=Object.assign({},t);o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let n=this.ast.preprocessAst(i);const a=!!n;a||(n=this.jsonParser.toAst(i));return r=!!!(null==n?void 0:n.bits)&&!a?this.bitmarkParser.toAst(i):n,r}convertText(e,t){return a(this,void 0,void 0,(function*(){var r,i;let o,n;const a=Object.assign({},t),s=Object.assign({},a.fileOptions),l=Object.assign({},a.jsonOptions),p=null!==(r=TextFormat_1.TextFormat.fromValue(a.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,c=null!==(i=a.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let u=e;if(d.env.isBrowser&&a.outputFile)throw new Error("Cannot write to file in browser environment");a.inputFormat&&a.inputFormat!==v.file||d.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const y=this.textParser.preprocessAst(u),g=!!y;if(n=g?yield this.textGenerator.generate(y,p,c):this.textParser.toAst(u,{format:p,location:TextLocation_1.TextLocation.body}),a.outputFile){const e=a.outputFile.toString();let t=n;g||(t=this.jsonStringifyPrettify(n,l,!0));const r=s.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else o=g?n:this.jsonStringifyPrettify(n,l);return o}))}breakscapeText(e,t){var r,i;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(r=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,s=null!==(i=o.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.breakscape(l,{format:a,location:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}unbreakscapeText(e,t){var r,i;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(r=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,s=null!==(i=o.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.unbreakscape(l,{format:a,location:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}supportedBitsAsString(e){let t="";for(const r of e)t+=`${r.name} (since: ${r.since}`,r.deprecated&&(t+=`, deprecated: ${r.deprecated}`),t+=")\n";return t}}},2028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const i=r(3619),o=r(9600),n=r(1457),a=r(6915),s=r(5512),l=r(5854),p=r(385),c=r(955),u=r(4445),y=r(6853),g=r(5837),d=r(9916);const T=new class{constructor(){this.bitLevelMin=1,this.bitLevelMax=7,this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const r=this.getBitConfig(e);if(!r)return!1;if(Array.isArray(t)){for(const e of t)if(r.inheritedBitTypesSet.has(e))return!0;return!1}return r.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let r=this.bitCache.get(e);if(!r){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=y.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=c.ObjectUtils.deepMerge(e,t)),{}),{since:g,textFormatDefault:d,quizBit:T,tags:f,cardSet:m,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),_=u.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),K=u.ConfigHydrator.hydrateCardSetConfig(m),A=null===(t=_.info)||void 0===t?void 0:t.comboResourceType,w=Object.assign({},_.tags);for(const[e,t]of Object.entries(k))w[e]||(w[e]=t);r=new i.BitConfig({since:g,bitType:e,inheritedBitTypes:n,textFormatDefault:null!=d?d:p.TextFormat.bitmarkText,tags:w,cardSet:K,quizBit:T,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P,comboResourceType:A}),this.bitCache.set(e,r)}return r}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,r]of Object.entries(e))if(r.tag===t)return r}getTagsConfigForCardSet(e,t,r){const i=this.getBitConfig(e);if(!i)return;const o=i.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[r=Math.min(r,n.length-1)].tags}getBitResourcesConfig(e,t){var r;let i={};const a=new Map,l=this.getBitConfig(e),p={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(p[e]=t);const c=null!==(r=l.comboResourceType)&&void 0!==r?r:l.resourceAttachmentAllowed&&t;if(c){const e=new Map,r=this.getComboResource(c);if(r){const t=Object.values(r).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((r=>{const i=t.find((e=>e.tag===r));i&&e.set(r,i)}));const i=this.getComboResourceTagTypes(c);i&&i.length>0&&a.set(c,i)}if(t)for(const[t,r]of Object.entries(p)){const n=c===r.tag,a=!!e&&e.has(r.tag);if(n){const e=new o.ResourceTagConfig(r.configKey,r.tag,1,1,r.chain,r.jsonKey,r.deprecated);i[t]=e}else if(a){if(e){const o=e.get(r.tag);o&&(i[t]=o)}}else i[t]=r}else i=p}else i=p;return new n.ResourcesConfig(i,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(g.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),u.ConfigHydrator.hydrateTagsConfig(e.tags).tags)})),0===Object.keys(t).length&&(t=void 0),this.comboResourcesCache.set(e,t)),t}getAllResourcesTagsWithZeroCounts(){let e=this.allResourcesCache;if(!e){e={},Object.values(g.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),u.ConfigHydrator.hydrateTagsConfig(t.tags).tags)}));for(const t of Object.values(e)){const e=t;e.maxCount=0,e.minCount=0}this.allResourcesCache=e}return e}};t.Config=T},2086:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKSCAPE_CODE_REGEX_REPLACER=t.BREAKSCAPE_CODE_REGEX=t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER=t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX=t.UNBREAKSCAPE_REGEX_REPLACER=t.UNBREAKSCAPE_REGEX=t.BREAKSCAPE_V2_BODY_REGEX_REPLACER=t.BREAKSCAPE_V2_BODY_REGEX=t.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER=t.BREAKSCAPE_PLAIN_BODY_REGEX=t.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER=t.BREAKSCAPE_BITMARK_BODY_REGEX=t.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER=t.BREAKSCAPE_PLAIN_TAG_REGEX=t.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER=t.BREAKSCAPE_BITMARK_TAG_REGEX=t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE=t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE=t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE=t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE=t.REGEX_HATS=t.REGEX_BIT_START=t.REGEX_END_OF_TAG=t.REGEX_PLAIN_TEXT_DIVIDER=t.REGEX_FOOTER_DIVIDER=t.REGEX_START_OF_TAG=t.REGEX_LIST_BLOCKS=t.REGEX_TITLE_BLOCKS=t.REGEX_BLOCKS=t.REGEX_MARKS=void 0,t.REGEX_MARKS=/([*`_!=])(?=\1)/,t.REGEX_BLOCKS=/^(\|)(code[\s]*|code:|image:|[\s]*$)/,t.REGEX_TITLE_BLOCKS=/^([#]{1,3})([^\S\r\n]+)/,t.REGEX_LIST_BLOCKS=/^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/,t.REGEX_START_OF_TAG=/(\[)([.@#▼►%!?+\-$_=&])/,t.REGEX_FOOTER_DIVIDER=/^(~)(~~~[ \t]*)$/,t.REGEX_PLAIN_TEXT_DIVIDER=/^(\$)(\$\$\$[ \t]*)$/,t.REGEX_END_OF_TAG=/(\^*])/,t.REGEX_BIT_START=/^(\[)(\^*)(\.)/,t.REGEX_HATS=/(\^+)/,t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE=`${t.REGEX_MARKS.source}|${t.REGEX_END_OF_TAG.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE=`${t.REGEX_END_OF_TAG.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE=`${t.REGEX_MARKS.source}|${t.REGEX_BLOCKS.source}|${t.REGEX_TITLE_BLOCKS.source}|${t.REGEX_LIST_BLOCKS.source}|${t.REGEX_START_OF_TAG.source}|${t.REGEX_FOOTER_DIVIDER.source}|${t.REGEX_PLAIN_TEXT_DIVIDER.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE=`${t.REGEX_BIT_START.source}`,t.BREAKSCAPE_BITMARK_TAG_REGEX=new RegExp(t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE,"gm"),t.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER="$1$3^$2",t.BREAKSCAPE_PLAIN_TAG_REGEX=new RegExp(t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE,"gm"),t.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER="$2^$1",t.BREAKSCAPE_BITMARK_BODY_REGEX=new RegExp(t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE,"gm"),t.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER="$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14",t.BREAKSCAPE_PLAIN_BODY_REGEX=new RegExp(t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE,"gm"),t.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER="$1^$2$3",t.BREAKSCAPE_V2_BODY_REGEX=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),t.BREAKSCAPE_V2_BODY_REGEX_REPLACER="$1$4^$2$3",t.UNBREAKSCAPE_REGEX=new RegExp("\\^([\\^]*)","gm"),t.UNBREAKSCAPE_REGEX_REPLACER="$1",t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER="$1$2$3",t.BREAKSCAPE_CODE_REGEX=new RegExp("^(\\||•|#)","gm"),t.BREAKSCAPE_CODE_REGEX_REPLACER="$1^"},2220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(8321).parse;t.parse=i},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},2483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const i=(0,r(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEmRed:"languageEmRed",languageEmOrange:"languageEmOrange",languageEmYellow:"languageEmYellow",languageEmGreen:"languageEmGreen",languageEmBlue:"languageEmBlue",languageEmPurple:"languageEmPurple",languageEmPink:"languageEmPink",languageEmBrown:"languageEmBrown",languageEmBlack:"languageEmBlack",languageEmWhite:"languageEmWhite",languageEmGray:"languageEmGray",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",notranslate:"notranslate",link:"link",ref:"ref",xref:"xref",extref:"extref",footnote:"footnote",footnoteStar:"footnote*",symbol:"symbol",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",comment:"comment"});t.TextMarkType=i},2497:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const a=n(r(7678)),s=r(5126),l=r(7735),p=r(2028),c=r(126),u=r(5854),y=r(3811),g=r(4410),d=r(363),T=r(6149),f=r(385),m=r(6877),h=r(9554),b=r(777),B=r(4078),v=r(8025),C=r(4),x=r(431),P={};class k extends C.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new s.Ast,this.textParser=new b.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=l.Breakscape.EMPTY_STRING,this.bodyDefault=l.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.placeholderIndex=0,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(r=y.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:y.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},P),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===y.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new x.TextGenerator(y.BitmarkVersion.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,c.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}exit_bitmarkAst(e,t){this.options.textAsPlainText&&this.convertAllBitmarkTextsToStringsForPlainText(this.json),this.removeTemporaryProperties(this.json)}enter_bitsValue(e,t){var r,i;const o=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(o),this.bitWrapperJson.bit=this.bitJson;const n=p.Config.getBitConfig(o.bitType),a=this.getTextFormat(t),s=!!n.rootExampleType,l=n.rootExampleType===d.ExampleType.boolean;if(s){let e;l?(e=!0,p.Config.isOfBitType(o.bitType,u.BitType.trueFalse1)&&void 0!==(null===(i=null===(r=o.cardNode)||void 0===r?void 0:r.statement)||void 0===i?void 0:i.isCorrect)&&(e=o.cardNode.statement.isCorrect)):e="true";const t=this.toExample(o,{defaultExample:e,isBoolean:l,textFormat:a});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else o.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const r=this.bitJson.isExample,i=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=r,this.bitJson.example=i,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_person(e,t){const r=this.getBitType(t);let i="person";return p.Config.isOfBitType(r,u.BitType.conversationLeft1)&&(i="partner"),this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1,keyOverride:i})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_productId(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==c.NodeType.bitsValue)return!0;return this.getBitType(t)===u.BitType.module?this.addProperty(this.bitJson,"productId",r,{array:!0}):r.length>0&&this.addProperty(this.bitJson,"productId",r[r.length-1],{array:!1}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);return(null==i?void 0:i.key)!==c.NodeType.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(r),!1)}enter_item(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_title(e,t){return this.standardHandler(e,t,[c.NodeType.bitsValue,c.NodeType.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_width(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:i})}enter_height(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:i})}enter_extraProperties(e,t){const r=e.value;if(!this.options.excludeUnknownProperties&&r)for(const[e,t]of Object.entries(r)){let r=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(r=`_${e}`),this.addProperty(this.bitJson,r,t,{array:!0})}}enter_cardBitsValue(e,t){var r,i,o,n,a,s,l,p,c;const y=e.value,g=this.getBitType(t);if(!g)return;let d;if(g===u.BitType.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",y.lang,{array:!1}),this.addProperty(e,"refAuthor",null!==(r=y.refAuthor)&&void 0!==r?r:[],{array:!0}),this.addProperty(e,"refBookTitle",null!==(i=y.refBookTitle)&&void 0!==i?i:[],{array:!1}),this.addProperty(e,"refPublisher",null!==(o=y.refPublisher)&&void 0!==o?o:[],{array:!0}),this.addProperty(e,"refPublicationYear",null!==(n=y.refPublicationYear)&&void 0!==n?n:[],{array:!1}),this.addProperty(e,"citationStyle",null!==(a=y.citationStyle)&&void 0!==a?a:[],{array:!1}),this.bitJson.bookReferences.push(e)}else g===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),d=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),d=this.bitJson.listItems),this.listItem={item:null!==(s=y.item)&&void 0!==s?s:[],lead:null!==(l=y.lead)&&void 0!==l?l:[],hint:null!==(p=y.hint)&&void 0!==p?p:[],instruction:null!==(c=y.instruction)&&void 0!==c?c:[],body:this.bodyDefault},d.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const r=e.value,i=this.getParentNode(t);if(!i)return!1;const o=this.getTextFormat(t),n=o===f.TextFormat.bitmarkText;if(this.bodyJson=r.body,i.key===c.NodeType.bitsValue){this.bitJson.body=this.bodyJson;const e=n&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,m.TextLocation.body,{noBreakscaping:!0});this.bitJson.body=(null!=e?e:"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else i.key===c.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,r){var i;const o=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=null!==(i=this.bitJson.placeholders)&&void 0!==i?i:{},this.bitJson.placeholders[o]=e,o}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=(0,a.default)(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const r of e)if(r.type!==g.BodyBitType.text&&g.BodyBitType.values().includes(r.type)){const e=r;e.attrs={};for(const[t,r]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=r,delete e[t])}else Array.isArray(r.content)&&(t++,this.moveBodyBitPropertiesToAttrs(r.content,t));return e}enter_footer(e,t){return this.standardHandler(e,t,void 0,{array:!0,valueOverride:e.value.footer})}enter_elements(e,t){return this.standardHandler(e,t,void 0,{array:!0})}enter_flashcards(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_statement(e,t){var r,i;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===c.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(r=o.statement)&&void 0!==r?r:"",this.bitJson.isCorrect=null!==(i=o.isCorrect)&&void 0!==i&&i,this.bitJson.example=o.example,this.bitJson.isExample=o.isExample)}enter_statements(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_heading(e,t){return this.standardHandler(e,t,void 0,{array:!1})}enter_pairs(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_resources(e,t){var r,i;const o=e.value,n=this.getBitType(t),a=this.getResourceType(t);if(!o||!n)return!0;let s;const l=p.Config.getBitConfig(n),c=p.Config.getBitResourcesConfig(n,a),y=c.comboResourceTagTypesMap;if(c.comboResourceTagTypesMap.size>0)for(const[e,t]of y.entries()){const n={type:e,__typeAlias:e};for(const e of t){const t=o.find((t=>t.__typeAlias===e));if(t){const e=p.Config.getTagConfigForTag(l.tags,t.__typeAlias),o=null!==(r=null==e?void 0:e.jsonKey)&&void 0!==r?r:t.__typeAlias,a=null!==(i=null==e?void 0:e.tag)&&void 0!==i?i:t.__typeAlias,s=t.__typeAlias===a?t:void 0;if(s)for(const[e,t]of Object.entries(s))"type"!==e&&(n[o]=t)}}s=n}else if(p.Config.isOfBitType(n,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of o)t.type===T.ResourceTag.image&&e.push(t);n===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else o.length>=1&&(s=o[0]);return this.bitJson.resource=s,!1}leaf_level(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_markup(e,t){const r=e.value;return r&&(this.bitWrapperJson.bitmark=r),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const r=e.value,i=this.getBitType(t),n=this.getParentNode(t);if(r&&i){const{version:e,excessResources:i,warnings:a,errors:s}=r,l=o(r,["version","excessResources","warnings","errors"]),p=`${this.bitmarkVersion}`,u=this.textParserVersion;let y;if(Array.isArray(i)&&i.length>0){y=[];for(const e of i)y.push(e)}const g=this.getInternalComments(t);(null==n?void 0:n.key)===c.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:p,textParserVersion:u,internalComments:g},l),{warnings:a,errors:s,excessResources:y}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=p.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag,i=`enter_${t}`;"function"!=typeof this[i]&&("example"!==t&&(this[i]=(e,t)=>{var i;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==c.NodeType.bitsValue)return;const a=null!==(i=r.jsonKey)&&void 0!==i?i:r.tag;this.addProperty(this.bitJson,a,o,{array:!r.single})},this[i]=this[i].bind(this)))}}standardHandler(e,t,r,i){var o,n;if(r){const e=Array.isArray(r)?r:[r],i=this.getParentNode(t);if(!(null==i?void 0:i.key)||!e.includes(null==i?void 0:i.key))return!0}return this.addProperty(this.bitJson,null!==(o=i.keyOverride)&&void 0!==o?o:e.key,null!==(n=i.valueOverride)&&void 0!==n?n:e.value,i),!1}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]);const n=r;o=!i.array&&n.length>=1?n[n.length-1]:n,(i.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:r,example:i,__isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!r)return{isExample:!1,example:null};let s;return s=o?a?B.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,t.textFormat,m.TextLocation.tag):a?B.BooleanUtils.toBoolean(i):this.convertBreakscapedStringToJsonText(i,t.textFormat,m.TextLocation.tag),{isExample:!0,example:s}}getBitType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const r=this.getBitType(e);if(r){const i=p.Config.getBitConfig(r);for(const r of e)if(r.key===c.NodeType.bitsValue){const e=r.value;return null!==(t=f.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:i.textFormatDefault}}return f.TextFormat.bitmarkText}getResourceType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===c.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,r){if(!(t===f.TextFormat.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{format:t,location:r})}concatenatePlainTextWithJsonTexts(e,t,r){var i;if(Array.isArray(e)){if(r=r.trim()){const o=r.split("\n"),n=[];for(let e=0;e<t;e++)n.push({type:h.TextNodeType.hardBreak});for(let e=0;e<o.length;e++){const t=o[e];t&&n.push({text:t,type:h.TextNodeType.text}),e<o.length-1&&n.push({type:h.TextNodeType.hardBreak})}const a=e[e.length-1];a&&a.type===h.TextNodeType.paragraph?a.content=[...null!==(i=a.content)&&void 0!==i?i:[],...n]:e.push({type:h.TextNodeType.paragraph,content:n,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=r?r:""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){var t,r,i,o,n,a;const s=p.Config.getBitType(e.type),l=p.Config.getBitConfig(s);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),p.Config.isOfBitType(s,[u.BitType._error,u.BitType._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let c=!1,y=!1;p.Config.isOfBitType(s,[u.BitType.page])?(null!=e.item&&0!==(null===(t=e.item)||void 0===t?void 0:t.length)||delete e.item,null!=e.lead&&0!==(null===(r=e.lead)||void 0===r?void 0:r.length)||delete e.lead,null!=e.pageNumber&&0!==(null===(i=e.pageNumber)||void 0===i?void 0:i.length)||delete e.pageNumber,null!=e.marginNumber&&0!==(null===(o=e.marginNumber)||void 0===o?void 0:o.length)||delete e.marginNumber,null!=e.hint&&0!==(null===(n=e.hint)||void 0===n?void 0:n.length)||delete e.hint,null!=e.instruction&&0!==(null===(a=e.instruction)||void 0===a?void 0:a.length)||delete e.instruction):(null==e.item&&(e.item=this.textDefault),null==e.lead&&(e.lead=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.pageNumber&&(e.pageNumber=this.textDefault),null==e.marginNumber&&(e.marginNumber=this.textDefault)),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,[u.BitType.article]),p.Config.isOfBitType(s,[u.BitType.example])&&(c=!0,y=!0),p.Config.isOfBitType(s,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.gapText,u.BitType.gapTextInstructionGrouped,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard,u.BitType.definitionList])&&(c=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,[u.BitType.sequence])&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.cloze)&&(c=!0,p.Config.isOfBitType(s,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):p.Config.isOfBitType(s,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),p.Config.isOfBitType(s,[u.BitType.multipleChoice,u.BitType.multipleResponse])&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),p.Config.isOfBitType(s,u.BitType.essay)&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),p.Config.isOfBitType(s,u.BitType.trueFalse1)&&(c=!0,y=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.trueFalse)&&(c=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.interview)&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),s===u.BitType.matchMatrix&&(c=!0),p.Config.isOfBitType(s,u.BitType.match)&&(c=!0,null==e.heading&&(e.heading={})),p.Config.isOfBitType(s,u.BitType.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1)),p.Config.isOfBitType(s,u.BitType.table)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableHeaderWhitespaceNoWrap&&(e.tableHeaderWhitespaceNoWrap=!0),null==e.tableSearch&&(e.tableSearch=!1),null==e.tableSort&&(e.tableSort=!1),null==e.tablePagination&&(e.tablePagination=!1),null==e.tablePaginationLimit&&(e.tablePaginationLimit=0),null==e.tableHeight&&(e.tableHeight=0),null==e.tableWhitespaceNoWrap&&(e.tableWhitespaceNoWrap=!1),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.tableColumnMinWidth&&(e.tableColumnMinWidth=0)),p.Config.isOfBitType(s,u.BitType.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),p.Config.isOfBitType(s,[u.BitType.pageBanner,u.BitType.pageBuyButton,u.BitType.pageBuyButtonAlt,u.BitType.pageBuyButtonPromotion,u.BitType.pageFooter,u.BitType.pageOpenBook,u.BitType.pagePerson,u.BitType.pageProduct,u.BitType.pageProductList,u.BitType.pageProductVideo,u.BitType.pageProductVideoList,u.BitType.pageSectionFolder,u.BitType.pageSubscribe,u.BitType.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,u.BitType.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),p.Config.isOfBitType(s,u.BitType.tocResource)&&null==e.tocResource&&(e.tocResource=[]),p.Config.isOfBitType(s,u.BitType.tocContent)&&null==e.tocContent&&(e.tocContent=[]),p.Config.isOfBitType(s,u.BitType.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1),null==e.processHandIn&&(e.processHandIn=!1),null==e.isPublic&&(e.isPublic=!1),null==e.chatWithBook&&(e.chatWithBook=!1),null==e.chatWithBookBrainKey&&(e.chatWithBookBrainKey="")),s!==u.BitType.articleAi&&s!==u.BitType.noteAi&&s!==u.BitType.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),p.Config.isOfBitType(s,[u.BitType.articleResponsive,u.BitType.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),p.Config.isOfBitType(s,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),p.Config.isOfBitType(s,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(s===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),p.Config.isOfBitType(s,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),p.Config.isOfBitType(s,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,[u.BitType.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),p.Config.isOfBitType(s,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),p.Config.isOfBitType(s,u.BitType.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey="")),p.Config.isOfBitType(s,u.BitType.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),p.Config.isOfBitType(s,u.BitType.handInFile)&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),p.Config.isOfBitType(s,u.BitType.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),p.Config.isOfBitType(s,u.BitType.container)&&null==e.allowedBit&&(e.allowedBit=[]),l.quizBit&&null==e.revealSolutions&&(e.revealSolutions=!1),p.Config.isOfBitType(s,u.BitType.platformPath)&&null==e.path&&(e.path=""),c?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),y?null==e.example&&(e.example=null):delete e.example}return e}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const r=t[e];if(this.isBitmarkText(r)){const i=this.textGenerator.generateSync(r,f.TextFormat.bitmarkText,m.TextLocation.tag,{noBreakscaping:!0});t[e]=(null!=i?i:"").trim()}else"object"==typeof t[e]&&this.convertAllBitmarkTextsToStringsForPlainText(t[e])}}removeTemporaryProperties(e){const t=e;for(const e in t)e.startsWith("__")?delete t[e]:"object"==typeof t[e]&&this.removeTemporaryProperties(t[e])}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.JsonGenerator=k},3029:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const i=r(4718),o=r(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,i.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",BodyTextPlain:"BodyTextPlain",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",PlainTextDivider:"PlainTextDivider",FooterDivider:"FooterDivider"});t.TypeKey=n;const a=(0,i.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},3045:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=function(e,t,r,c,u){t===p.BitContentLevel.Chain||function(e,t,r,c,u){const{bitConfig:y}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",c);const g=e.bitContentProcessor(p.BitContentLevel.Chain,r,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",g);const{reference:d,referenceEnd:T}=g,f=i.Breakscape.unbreakscape(l.StringUtils.trimmedString(c.value),{format:a.TextFormat.bitmarkText,location:s.TextLocation.tag}),m=y.tags[o.PropertyConfigKey.book];if(m&&(m.maxCount===n.Count.infinity||m.maxCount>1))return Array.isArray(u.book)||(u.book=[]),void u.book.push({book:f,reference:null!=d?d:"",referenceEnd:null!=T?T:void 0});u.book=f,u.reference=d,u.referenceEnd=T}(e,0,r,c,u)};const i=r(7735),o=r(9888),n=r(3778),a=r(385),s=r(6877),l=r(9681),p=r(3029)},3063:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=function(e,t,r,u,y){var g;const{key:d}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",u);const T=y.markConfig;if(!T)return;const f=n.Config.getTagConfigForTag(r,a.PropertyTag.fromValue(d)),m=e.bitContentProcessor(c.BitContentLevel.Chain,null==f?void 0:f.chain,u.chain),{mark:h}=m,b=i(m,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const B=o.Breakscape.unbreakscape(null!==(g=p.StringUtils.trimmedString(u.value))&&void 0!==g?g:"unknown",{format:s.TextFormat.bitmarkText,location:l.TextLocation.tag}),v=Object.assign({mark:B,emphasis:"underline"},b);v&&T.push(v)};const o=r(7735),n=r(2028),a=r(166),s=r(385),l=r(6877),p=r(9681),c=r(3029)},3069:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=i},3206:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const i=r(7735),o=r(1163),n=r(385),a=r(6877),s=r(9681),l=r(7461),p=r(3029);r(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,r;const i=e.trim();if(this.debugPrint("RAW BIT",i),!i)return;const o=null!==(r=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==r?r:{line:1,column:1,offset:0},n=this.parse(e,{startRule:"bit",grammarSource:new l.PeggyGrammarLocation("bit",o)});return n.value&&(n.value.markup=i),n}handleTextFormat(e){return{type:p.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:p.TypeKey.ResourceType,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleBitContent(e){let t=this.reduceToArrayOfTypes(e);return t=this.mergeCharToText(t),t}handleBitTag(e){return e}handleTag(e,t){return{type:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:p.TypeKey.Property,key:i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:p.TypeKey.Resource,key:i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let r=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),r=[e]}return r}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,r={cards:[]},i={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:i,parser:o}=e;if(!t||t!==p.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:a,cardVariantIndex:s,value:l}=i;let c=r.cards[n];c||(c={sides:[]},r.cards[n]=c);let u=c.sides[a];u||(u={variants:[]},c.sides[a]=u);u.variants[s]?u.variants[s].value+=l:u.variants[s]={value:l,parser:o}}r.cards=r.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==s.StringUtils.trimmedString(e.value).length))))));for(const t of r.cards){const r={sides:[]};i.cards.push(r);for(const i of t.sides){const t={variants:[]};r.sides.push(t);for(const r of i.variants){let i={line:1,column:1,offset:0};if(r.parser.location){i=r.parser.location.start;const e=r.parser.text,t=e?e.length:0,o=1;i.offset+=t,i.line+=o}let o=this.parse(r.value,{startRule:"cardContent",grammarSource:new l.PeggyGrammarLocation("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:p.TypeKey.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r=!1,i=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===o.CardSetVersion.v1?(r=e===p.CARD_DIVIDER_V1,i=e===p.CARD_SIDE_DIVIDER_V1,n=e===p.CARD_VARIANT_DIVIDER_V1):(r=e===p.CARD_DIVIDER_V2,i=e===p.CARD_SIDE_DIVIDER_V2,n=e===p.CARD_VARIANT_DIVIDER_V2)),r?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):i?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,p.TypeKey.Card)?e:{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,r,i,o,n,a;const s=[];let l,c;for(const u of e)switch(u.type){case p.TypeKey.BodyChar:if(l){const e=`${null!==(t=l.value)&&void 0!==t?t:""}${null!==(r=u.value)&&void 0!==r?r:""}`;l.value=e}else l={type:p.TypeKey.BodyText,value:null!==(i=u.value)&&void 0!==i?i:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case p.TypeKey.CardChar:if(c){const e=`${null!==(o=c.value)&&void 0!==o?o:""}${null!==(n=u.value)&&void 0!==n?n:""}`;c.value=e}else c={type:p.TypeKey.CardText,value:null!==(a=u.value)&&void 0!==a?a:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:l&&(s.push(l),l=void 0),c&&(s.push(c),c=void 0),s.push(u)}return l&&s.push(l),c&&s.push(c),s}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!p.TypeKey.fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce(((e,i,o)=>{if(null==i)return e;const{type:n,value:a}=i;if(Array.isArray(i)){const r=this.reduceToArrayOfTypes(i,t);e.push(...r)}else{if(!this.isType(i,t))return e;if(r&&Array.isArray(a)){const r=this.reduceToArrayOfTypes(a,t);e.push(...r)}else n&&e.push(i)}return e}),[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce(((e,t,r)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e}),[])}debugPrint(e,t){}}},3619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const i=r(3778);t.BitConfig=class{constructor(e){this.tags={};const{since:t,bitType:r,inheritedBitTypes:i,textFormatDefault:o,tags:n,cardSet:a,quizBit:s,deprecated:l,bodyAllowed:p,bodyRequired:c,footerAllowed:u,footerRequired:y,resourceAttachmentAllowed:g,rootExampleType:d,comboResourceType:T}=e;this.since=t,this.bitType=r,this.inheritedBitTypes=i,this.inheritedBitTypesSet=new Set(i),this.textFormatDefault=o,this.tags=n,this.cardSet=a,this.quizBit=s,this.deprecated=l,this.bodyAllowed=p??!0,this.bodyRequired=c,this.footerAllowed=u??!0,this.footerRequired=y,this.resourceAttachmentAllowed=g??!0,this.rootExampleType=d,this.comboResourceType=T}toString(e){const t=Object.assign({},e);let r=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(r+="\n\n[Inheritance]",r+=`\n${this.inheritedBitTypes.join(" => ")}`),r+=`\n\n[Default text format]\n${this.textFormatDefault}`;const o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),r+=`\n\n[Flags]\n${o.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===i.Count.infinity||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}}},3778:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const i=(0,r(4718).superenum)({infinity:"infinity"});t.Count=i},3811:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const i=(0,r(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=i;const o=i.v3;t.DEFAULT_BITMARK_VERSION=o},3881:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const i=r(2028),o=r(5854);t.InfoBuilder=class{getSupportedBits(e){var t,r;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(r=null==e?void 0:e.includeDeprecated)&&void 0!==r&&r,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=i.Config.getBitType(e),r=i.Config.getBitConfig(t),l=r.inheritedBitTypes.length>0?r.inheritedBitTypes:void 0;(n&&!r.deprecated||a&&r.deprecated)&&s.push({name:e,since:r.since,deprecated:r.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const r=i.Config.getBitType(t),n=i.Config.getBitConfig(r);e.push(n)}return e}}},3904:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=function(e,t,r,l,p,c){if(t===s.BitContentLevel.Chain)(0,a.clozeTagContentProcessor)(e,t,r,l,p);else{const t=function(e,t,r,a){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",a);const p=i.Config.getTagConfigForTag(r,n.Tag.fromValue(a.type)),c=[a,...null!==(l=a.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(s.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",u);const y=Object.assign({type:o.BodyBitType.gap},u);return y}(e,0,r,l);t&&c.push(t)}};const i=r(2028),o=r(4410),n=r(9917),a=r(554),s=r(3029)},3967:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=function(e,t,r,a,p){var c;const{textFormat:u}=e,{key:y,value:g}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",a);const d=e.bitContentProcessor(s.BitContentLevel.Chain,r,a.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:T}=d,f={level:null!==(c=n.NumberUtils.asNumber(g))&&void 0!==c?c:0,label:T?l.toAst(T,{format:u,location:o.TextLocation.tag}):void 0};switch(y){case i.PropertyTag.ratingLevelStart:p.ratingLevelStart=f;break;case i.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=f}};const i=r(166),o=r(6877),n=r(8025),a=r(777),s=r(3029),l=new a.TextParser},3968:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=r(6772),n=r(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},3990:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=function(e,t,r,s,l,p){const{value:c}=s,u=a.StringUtils.trimmedString(c);p?l.referenceEnd=i.Breakscape.unbreakscape(u,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}):l.reference=i.Breakscape.unbreakscape(u,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag})};const i=r(7735),o=r(385),n=r(6877),a=r(9681)},4020:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=function(e,t,r,l){const{type:p,value:c}=r,u=l.trueFalse;if(!u)return;const y=i.Breakscape.unbreakscape(a.StringUtils.trimmedString(c),{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});u.push({text:y,isCorrect:p===s.TypeKey.True,__isDefaultExample:!1})};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(3029)},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const r=new class{isBoolean(e){return!0===e||!1===e}isBooleanString(e){return!!this.isBoolean(e)||("true"===e||"false"===e)}toBoolean(e,t){return t?!1!==e&&"false"!==e:!0===e||"true"===e}};t.BooleanUtils=r},4091:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=function(e,t,r,u){const{bitType:y}=e,{value:g}=r,d=g;o.Config.isOfBitType(y,[n.BitType.cloze,n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.multipleChoice,n.BitType.multipleChoice1])?function(e,t,r,u){var y,g;const{bitType:d,textFormat:T}=e;let f;Array.isArray(u.trueFalse)&&u.trueFalse.length>0&&(f=null!==(y=u.trueFalse[u.trueFalse.length-1])&&void 0!==y?y:void 0);f?!0===r?(f.__isDefaultExample=!0,f.example=!!f.isCorrect):l.BooleanUtils.isBooleanString(r)?f.example=l.BooleanUtils.toBoolean(r):(f.__isDefaultExample=!0,f.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(u.__solutionsAst)&&u.__solutionsAst.length>0?u.example=!0===r?null!==(g=u.__solutionsAst[u.__solutionsAst.length-1])&&void 0!==g?g:void 0:r?p.toAst(r,{format:T,location:s.TextLocation.tag}):void 0:o.Config.isOfBitType(d,[n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1])?function(e,t,r,o){if(!0===r)o.__isDefaultExample=!0,o.example=void 0;else{const n=r?i.Breakscape.unbreakscape(r,{format:a.TextFormat.bitmarkText,location:s.TextLocation.tag}):void 0;l.BooleanUtils.isBooleanString(n)?o.example=l.BooleanUtils.toBoolean(n):(o.__isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,r,u):o.Config.isOfBitType(d,[n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoice,n.BitType.multipleChoice1])?(u.__isDefaultExample=!0,u.example=void 0,!0!==r&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):c(e,t,r,u)}(e,r,d,u):o.Config.isOfBitType(y,n.BitType.mark)?function(e,t,r,i){i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,r,d,u):c(e,r,d,u)};const i=r(7735),o=r(2028),n=r(5854),a=r(385),s=r(6877),l=r(4078),p=new(r(777).TextParser);function c(e,t,r,i){const{textFormat:o}=e;!0===r||"true"===r?(i.__isDefaultExample=!0,i.example=void 0):i.example=r?p.toAst(r,{format:o,location:s.TextLocation.tag}):void 0}},4266:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const i=r(2028),o=r(5512),n=r(3778),a=r(166),s=r(6149),l=r(9917),p=r(3029),c=["----","\n==\n","\n---\n"],u=["==\n","--\n"],y=["\n==","\n--"];const g=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:r,bitType:o,resourceType:n}=e,{tags:a,cardSet:s}=r,l=i.Config.getBitResourcesConfig(o,n),c=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,p.BitContentLevel.Bit,o,t,c,s).validated}checkBody(e,t,r,i,o){if(!o)return o;const{bitConfig:n}=e,{bodyAllowed:a}=n;return o.length>0&&!a&&e.addWarning(`Bit '${r}' should not have a body.`),o}checkBodyPart(e,t,r){return r?(this.checkBodyForCommonPotentialMistakes(e,t,r),r):r}checkFooter(e,t,r){if(!r)return r;const{bitConfig:i,bitType:o}=e,{footerAllowed:n}=i;return this.checkBodyForCommonPotentialMistakes(e,t,r),n||e.addWarning(`Bit '${o}' should not have a footer.`),r}checkCardBody(e,t,r,i,o,n,a){if(!i||!i.body)return i;const{bitConfig:s}=e;if(!s.cardSet)return i;const l=this.getVariantConfig(s.cardSet.variants,n,a);if(!l)return i;const{bodyAllowed:p}=l;return i.bodyString.length>0&&!p&&e.addWarning(`Bit '${r}' should not have a card body at card:${o+1}, side:${n+1}, variant:${a+1}.`),i}validateTagChainsRecursive(e,t,r,i,c,u,y){var g;if(!i)return{validated:[]};let d;const T=[...i],f=this.convertTagsToTypeKeyMap(e,t,r,c),m=(e,t,r)=>{f.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};var h,b,B;h=a.PropertyTag.internalComment,b=n.Count.infinity,B=0,f.set(`${p.TypeKey.Property}:${h}`,{maxCount:b,minCount:B,_type:o.BitTagType.property,_tag:l.Tag.tag_property,_seenCount:0}),t===p.BitContentLevel.Bit?(u&&m(p.TypeKey.CardSet,1,0),m(p.TypeKey.TextFormat,1,0),m(p.TypeKey.BodyText,n.Count.infinity,0),m(p.TypeKey.BodyTextPlain,n.Count.infinity,0),m(p.TypeKey.PlainTextDivider,n.Count.infinity,0),m(p.TypeKey.FooterDivider,n.Count.infinity,0)):t===p.BitContentLevel.Card&&m(p.TypeKey.CardText,n.Count.infinity,0);for(let i=0;i<T.length;i++){const o=T[i];if(!o)continue;const{type:n,key:a}=o;let l=p.TypeKey.fromValue(n);if(!l)continue;let c=l;l!==p.TypeKey.Property&&l!==p.TypeKey.Resource||(c=`${l}:${a}`);let m=f.get(c);if(!m&&l===p.TypeKey.Property&&(a===s.ResourceTag.backgroundWallpaper||a===s.ResourceTag.imagePlaceholder)&&(m=f.get(`${p.TypeKey.Resource}:${a}`),m)){l=p.TypeKey.Resource,o.type=p.TypeKey.Resource;const t=`Falling back to '[&${a}]' from '[@${a}]'. Replace '[@${a}]' with '[&${a}]' to avoid this warning.`;e.addWarning(t)}const{validated:h,warning:b}=this.validateSingleTag(e,t,r,o,l,m,u);l===p.TypeKey.Resource&&(y=p.TypeKey.Resource);let B=!0;if(!h)if(t===p.BitContentLevel.Chain&&y!==p.TypeKey.Resource){d=o;const e=T.slice(i+1);e.length>0&&(d.chain=e),T.splice(i),B=!1}else T.splice(i,1,null);if(b&&B&&e.addWarning(null!==(g=b.warning)&&void 0!==g?g:"",b.content,b.previousContent),t===p.BitContentLevel.Chain&&m&&m.chain&&h&&!h.chain){const e=T.slice(i+1);e.length>0&&(h.chain=e),T.splice(i+1)}if(h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,p.BitContentLevel.Chain,r,h.chain,m.chain,void 0,h.type);t&&t.length>0?h.chain=t:h.chain=void 0,o&&T.splice(i+1,0,o)}else if(h.type!==p.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),T.splice(i+1,0,e),h.chain=void 0}}for(const t of f.values()){const{minCount:r,_seenCount:i}=t;if(null!=r&&i<r){const i=`${this.getTagSignature(t)} is required at least ${r} time(s)`;e.addWarning(i)}}return{validated:T.filter((e=>null!=e)),remaining:d}}validateSingleTag(e,t,r,i,o,n,a){const{type:s,key:l}=i,c=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),u=" It will be ignored";let y,g,d="";if(n)switch(n._seenCount++,o){case p.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,t,r,n,i);y=o,g=a;break}case p.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,t,r,n,i);y=o,g=a;break}case p.TypeKey.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,r,n,i,a);y=t,g=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,t,r,n,i);y=o,g=a}}else switch(o){case p.TypeKey.Property:g={extraProperty:!0},t!==p.BitContentLevel.Chain&&(y=i);break;case p.TypeKey.Resource:g={excessResource:!0},y=i;break;default:g={invalid:!0}}if(g){const e=null==n?void 0:n._previous;g.invalid||g.excessResource?d=`${c} is not valid here (incorrectly chained?).${u}`:null!=g.tooMany?(d=`${c} is included more than ${g.tooMany} time(s).`,g.tooMany>0&&(d+=" The earlier ones will be ignored")):g.extraProperty?d=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:g.unexpectedCardSet?d=`${c} is not expected here.${u}`:g.unexpectedCardSideVariant&&(d=`${c} has a card / side / variant that is not expected here.${u}`),g.warning=d,g.content=y,g.previousContent=e}return n&&(n._previous=i),{validated:y,warning:g}}validateStandardTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=i,a=n;let s,l=0,c=0;for(const r of a.cards){l=0;for(const i of r.sides){c=0;for(const r of i.variants){const n=r.content;let a;const u=this.getVariantConfig(o.variants,l,c);if(u){a=this.validateTagChainsRecursive(e,p.BitContentLevel.Card,t,n,u.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[c]={parser:r.parser,content:a}:i.variants[c]={parser:r.parser,content:[]},c++}l++}}return{content:i,warning:s}}checkBodyForCommonPotentialMistakes(e,t,r){if(!r)return;const{bitType:i}=e;for(const t of c)r.includes(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of u)r.startsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of y)r.endsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,r,i){const n=new Map;for(const e of Object.values(i)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===o.BitTagType.tag,isProperty:e.type===o.BitTagType.property,isResource:e.type===o.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)n.set(`${p.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)n.set(`${p.TypeKey.Resource}:${e.tag}`,t);else{const r=p.TypeKey.fromValue(e.tag);r&&n.set(r,t)}}return n}getVariantConfig(e,t,r){let i;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],a=o.length-1;if(r>a){if(i=o[a],i.repeatCount!==n.Count.infinity)return}else i=o[r];return i}getTagSignature(e){switch(e._type){case o.BitTagType.tag:return`[${e._tag}]`;case o.BitTagType.property:return`[@${e._tag}]`;case o.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case p.TypeKey.Property:return`[@${t}]`;case p.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=g},4382:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FooterContentProcessor=void 0;const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(777),l=r(4266),p=r(6128),c=new s.TextParser;const u=new class{process(e,t,r,s,u,y){const{textFormat:g}=e;let d;u=u.trimStart(),y=y.trimEnd();const T=!!u.trim(),f=!!y.trim();let m=0;if(T&&f&&(m=a.StringUtils.countOccurrencesAtEnd(u,"\n")+a.StringUtils.countOccurrencesAtStart(y,"\n")),u||y){const r=g===o.TextFormat.bitmarkText;u&&(u=l.BitmarkPegParserValidator.checkFooter(e,t,u));const a=r?c.toAst(u,{format:g,location:n.TextLocation.body}):i.Breakscape.unbreakscape(u,{format:o.TextFormat.plainText,location:n.TextLocation.body}),s=i.Breakscape.unbreakscape(y,{format:o.TextFormat.plainText,location:n.TextLocation.body});d=p.ContentProcessorUtils.concatenatePlainTextWithAstTexts(a,m,s)}return d?{footer:d}:void 0}};t.FooterContentProcessor=u},4402:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=function(e,t,r,p,c){const{type:u,value:y}=p,{textFormat:g}=e,d=new s.TextParser,T=a.StringUtils.trimmedString(y);switch(u){case l.TypeKey.Instruction:c.instruction=d.toAst(T,{format:g,location:n.TextLocation.tag}),c.__instructionString=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Hint:c.hint=d.toAst(T,{format:g,location:n.TextLocation.tag}),c.__hintString=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Anchor:c.anchor=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Reference:c.reference=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.SampleSolution:c.sampleSolution=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}),c.__sampleSolutionAst=d.toAst(T,{format:g,location:n.TextLocation.tag}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",p)}};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(777),l=r(3029)},4410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const i=(0,r(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=i},4445:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const i=r(5814),o=r(9371),n=r(9788),a=r(1519),s=r(9600),l=r(5591),p=r(7112),c=r(9888),u=r(5051),y=r(7797),g=r(5512),d=r(5554),T=r(5837),f=r(9916),m=r(168),h=r(9248);const b=new class{hydrateTagsConfig(e){var t;const r={tags:{}};for(const i of e){let e;switch(i.type){case g.BitTagType.tag:e=this.hydrateTagConfig(i);break;case g.BitTagType.property:e=this.hydratePropertyTagConfig(i);break;case g.BitTagType.resource:e=this.hydrateResourceTagConfig(i);break;case g.BitTagType.group:e=this.hydrateTagGroupConfig(i)}e&&(r.tags=Object.assign(Object.assign({},r.tags),e.tags),r.info=Object.assign(null!==(t=r.info)&&void 0!==t?t:{},e.info))}return r}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.variants){const t=[];for(const r of e){const e=this.hydrateCardVariantConfig(r);t.push(e)}r.push(t)}return new i.CardSetConfig(e,r)}hydrateTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,a=y.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=h.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:p,deprecated:c}=s;let u;o&&(u=this.hydrateTagsConfig(o).tags);const g=new n.MarkupTagConfig(a,p,null!=r?r:1,null!=i?i:0,u,c);return{tags:{[a]:g}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=c.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=f.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:p,deprecated:u,single:y,format:g,defaultValue:d,jsonKey:T,astKey:m}=s;let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new a.PropertyTagConfig(n,p,null!=r?r:1,null!=i?i:0,h,T,m,y,g,d,u);return{tags:{[n]:b}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=u.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=m.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:p,deprecated:c,jsonKey:y}=a;let g;o&&(g=this.hydrateTagsConfig(o).tags);const d=new s.ResourceTagConfig(n,p,null!=r?r:1,null!=i?i:0,g,y,c);return{tags:{[n]:d}}}hydrateTagGroupConfig(e){var t,r;const{configKey:i}=e,o=p.GroupConfigKey.fromKey(i)||l.ConfigKey._unknown,n=T.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${i}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,c=Object.values(s);if(c.length>0){const i=c[0],o=i;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:i.maxCount,o.minCount=null!==(r=e.minCount)&&void 0!==r?r:i.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,r,i,n)}};t.ConfigHydrator=b},4470:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const i=r(7735),o=r(2028),n=r(431),a=r(9727),s=r(6877),l=r(777),p=r(6989),c=r(4078),u=r(8025),y=r(9681);t.BaseBuilder=class{constructor(){this.textParser=new l.TextParser,this.textGenerator=new n.TextGenerator}toExample(e,t,r){if(null!=t){let e;return e=c.BooleanUtils.isBoolean(r)?c.BooleanUtils.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:null!=r?r:null}}return e?{isExample:!0,example:null!=r?r:null,__defaultExample:null!=r?r:null}:{isExample:!1,example:null,__defaultExample:null!=r?r:null}}toAstProperty(e,t){if(null==t)return;const r=o.Config.getRawPropertiesConfig()[e],i=e=>{if(null!=e){switch(r.format){case a.PropertyFormat.plainText:return null!=u.NumberUtils.asNumber(e)&&(e=`${e}`),y.StringUtils.isString(e)?y.StringUtils.trimmedString(e):void 0;case a.PropertyFormat.number:return u.NumberUtils.asNumber(e);case a.PropertyFormat.boolean:return c.BooleanUtils.toBoolean(e,!0);case a.PropertyFormat.invertedBoolean:return!c.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,r=e.length;t<r;t++)e[t]=i(e[t])}else t=i(t);return p.ArrayUtils.asArray(t)}getEmptyTextAst(e){return this.handleJsonText(e,s.TextLocation.tag," ")}handleJsonText(e,t,r){let o;const{textFormat:n}=e;if(null==r)o=[];else if(this.textParser.isAst(r))o=r;else{if(Array.isArray(r)){const e=[];for(let o=0,a=r.length;o<a;o++){const a=r[o];this.textParser.isAst(a)?e[o]=a:y.StringUtils.isString(a)?(e[o]=this.textParser.toAst(i.Breakscape.breakscape(a,{format:n,location:t}),{format:n,location:t}),e[o].__tag="text"):e[o]=[]}return e}o=y.StringUtils.isString(r)?this.textParser.toAst(i.Breakscape.breakscape(r,{format:n,location:t,v2:!0}),{format:n,location:t}):[]}return o.__tag="text",o}}},4475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=function(e,t,r,l,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const c=e.bitContentProcessor(s.BitContentLevel.Chain,r,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",c);const{lang:u}=c,y={technicalTerm:i.Breakscape.unbreakscape(a.StringUtils.trimmedString(l.value),{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}),lang:u};p.technicalTerm=y};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(3029)},4564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const i=r(6149),o=r(9681);const n=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,r=!1;switch(e.type){case i.ResourceTag.image:r=!!e.image.src;break;case i.ResourceTag.imageLink:r=!!e.imageLink.url;break;case i.ResourceTag.audio:r=!!e.audio.src;break;case i.ResourceTag.audioEmbed:r=!!e.audioEmbed.src;break;case i.ResourceTag.audioLink:r=!!e.audioLink.url;break;case i.ResourceTag.video:r=!!e.video.src;break;case i.ResourceTag.videoEmbed:r=!!e.videoEmbed.url;break;case i.ResourceTag.videoLink:r=!!e.videoLink.url;break;case i.ResourceTag.stillImageFilm:r=!!e.image.src&&!!e.audio.src;break;case i.ResourceTag.stillImageFilmEmbed:r=!!e.stillImageFilmEmbed.url;break;case i.ResourceTag.stillImageFilmLink:r=!!e.stillImageFilmLink.url;break;case i.ResourceTag.article:r=!!e.article.body;break;case i.ResourceTag.document:r=!!e.document.url;break;case i.ResourceTag.documentEmbed:r=!!e.documentEmbed.url;break;case i.ResourceTag.documentLink:r=!!e.documentLink.url;break;case i.ResourceTag.documentDownload:r=!!e.documentDownload.url;break;case i.ResourceTag.appLink:r=!!e.appLink.url;break;case i.ResourceTag.websiteLink:r=!!e.websiteLink.url;break;default:r=!1}return r||e.type&&(t={type:e.type}),t}isRequired(e,t){if(!e)throw new Error(`${t} is required but is not set`)}isOneOfRequired(e,t){if(Array.isArray(e))for(const t of e)if(t)return;throw new Error(`One of '${t.join(", ")}' is required but none is set`)}isString(e,t){if(!o.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!o.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!o.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!o.StringUtils.isString(e)||""===e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a non-empty string or a boolean`)}isArray(e,t){if(!Array.isArray(e))throw new Error(`${t} is required to be a array`)}isNonEmptyArray(e,t){if(!(Array.isArray(e)&&e.length>0))throw new Error(`${t} is required to be a non-empty array`)}isNumber(e,t){if(!Number.isFinite(e))throw new Error(`${t} is required to be a number`)}isBoolean(e,t){if(!0!==e&&!1!==e)throw new Error(`${t} is required to be a boolean`)}isStringOrNumberOrBooleanOrNullOrUndefined(e,t){if(!o.StringUtils.isString(e)&&!Number.isFinite(e)&&!0!==e&&!1!==e&&null!=e)throw new Error(`${t} is required to be a string or a number or a boolean or null or undefined`)}};t.NodeValidator=n},4718:(e,t,r)=>{function i(e,t){var r;const i=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,p=new Map,c=new Map,u=new Map,y=(null!==(r=null==t?void 0:t.iterationKeys)&&void 0!==r?r:Object.keys(e)).map((e=>`${e}`));for(const[t,r]of Object.entries(e))s.set(t,r),p.set(t.toLowerCase(),r);for(const[e,t]of s){const r="string"==typeof t?t.toLowerCase():t;l.set(t,e),c.set(r,e)}const g=y.map((e=>s.get(e))),d=y.map((e=>[e,s.get(e)]));return(t=>{let r=e;function T(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(c.get(e.toLowerCase())):l.has(e)?e:void 0}Object.isExtensible(e)||(r=n({},e)),o(r,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(r,"fromValue",n({value:T},a)),o(r,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?c.get(e.toLowerCase()):l.get(e)}},a)),o(r,"setMetadata",n({value:function(e,t,r){const i=T(e);null!=i&&u.set(i,t)}},a)),o(r,"getMetadata",n({value:function(e,t){return u.get(e)}},a)),o(r,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<y.length?{value:s.get(`${y[e++]}`),done:!1}:{done:!0}}}},a)),o(r,"values",n({value:()=>g},a)),o(r,"keys",n({value:()=>y},a)),o(r,"entries",n({value:()=>d},a));let f=r;return(null==t?void 0:t.noFreeze)||(f=i(r),i(y),i(g),i(d)),f})(t)}r.r(t),r.d(t,{superenum:()=>o});const o=i;o.fromObject=i,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const r=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),i(r,t)}},4953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=function(e,t,r,n,a){var s;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",n);const l=e.bitContentProcessor(o.BitContentLevel.Chain,r,n.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",l);const{unit:p,unitAbbr:c,decimalPlaces:u,disableCalculation:y,__hintString:g}=l,d={servings:null!==(s=i.NumberUtils.asNumber(n.value))&&void 0!==s?s:1,unit:p,unitAbbr:c,decimalPlaces:null!=u?u:1,disableCalculation:y,hint:g};a.servings=d};const i=r(8025),o=r(3029)},5005:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=r(1731),g="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const r=(t,r)=>(e.set(r,t),t),d=T=>{if(e.has(T))return e.get(T);const[f,m]=t[T];switch(f){case o:case i:return r(m,T);case n:{const e=r([],T);for(const t of m)e.push(d(t));return e}case a:{const e=r({},T);for(const[t,r]of m)e[d(t)]=d(r);return e}case s:return r(new Date(m),T);case l:{const{source:e,flags:t}=m;return r(new RegExp(e,t),T)}case p:{const e=r(new Map,T);for(const[t,r]of m)e.set(d(t),d(r));return e}case c:{const e=r(new Set,T);for(const t of m)e.add(d(t));return e}case u:{const{name:e,message:t}=m;return r(new g[e](t),T)}case y:return r(BigInt(m),T);case"BigInt":return r(Object(BigInt(m)),T);case"ArrayBuffer":return r(new Uint8Array(m).buffer,m);case"DataView":{const{buffer:e}=new Uint8Array(m);return r(new DataView(e),m)}}return r(new g[f](m),T)};return d})(new Map,e)(0)},5033:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyContentProcessor=void 0;const i=r(7735),o=r(4410),n=r(385),a=r(6877),s=r(9681),l=r(777),p=r(4266),c=r(6128),u=new l.TextParser;const y=new class{process(e,t,r,l,y,g,d,T){const f=[];let m,h;const b=d.length>0?this.trimBodyParts(d):void 0,B=T?b:p.BitmarkPegParserValidator.checkBody(e,t,r,l,b);if(l===n.TextFormat.json&&B){m=B.reduce(((e,t)=>{var r;if(t.type===o.BodyBitType.text&&t.data){return e+(null!==(r=t.data.bodyText)&&void 0!==r?r:"")}return e}),"");try{m=JSON.parse(m)}catch(t){m=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",r="",p=0;const y=e=>`[!${e}]`;if(B)for(let n=0;n<B.length;n++){const a=B[n];if(a.type===o.BodyBitType.text){const o=a,n=o.data.bodyText;o.data.isPlain?t=i.Breakscape.concatenate(t,n):e=i.Breakscape.concatenate(e,n),r=i.Breakscape.concatenate(r,n)}else{const t=y(p);e=i.Breakscape.concatenate(e,t),f.push(a),p++}}const g=l===n.TextFormat.bitmarkText?u.toAst(e,{format:l,location:a.TextLocation.body}):i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.body}),d=i.Breakscape.unbreakscape(t,{format:n.TextFormat.plainText,location:a.TextLocation.body}),T=s.StringUtils.countOccurrencesAtEnd(e,"\n")+s.StringUtils.countOccurrencesAtStart(t,"\n");m=c.ContentProcessorUtils.concatenatePlainTextWithAstTexts(g,T,d),h=i.Breakscape.unbreakscape(r,{format:l,location:a.TextLocation.body}).trim();const b=Array.isArray(m)?m:void 0;if(b&&B){p=0;for(let e=0;e<B.length;e++){const t=B[e];if(t.type===o.BodyBitType.text)continue;const r=t;let i;switch(t.type){case o.BodyBitType.gap:case o.BodyBitType.mark:case o.BodyBitType.select:case o.BodyBitType.highlight:i=r}i&&this.replacePlaceholderWithBodyBit(b,i,p),p++}}}return{body:m,bodyBits:f.length>0?f:void 0,bodyString:h}}buildBodyText(e,t){return{type:o.BodyBitType.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,n)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=e[t];if(i(r,e,t))return!0}else{if("bit"===e.type&&e.index===r)return o[n]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}trimBodyParts(e){let t=!1,r=e.reduce(((e,r)=>{const i=r;if(t||i.type!==o.BodyBitType.text)t=!0,e.push(r);else{const r=i.data.bodyText.trimStart();r&&(t=!0,i.data.bodyText=r,e.push(i))}return e}),[]);return t=!1,r=r.reduceRight(((e,r)=>{const i=r;if(t||i.type!==o.BodyBitType.text)t=!0,e.unshift(r);else{const r=i.data.bodyText.trimEnd();r&&(t=!0,i.data.bodyText=r,e.unshift(i))}return e}),[]),r}};t.BodyContentProcessor=y},5051:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const i=r(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"};t.resourceConfigKeys=o;const n=(0,i.superenum)(o);t.ResourceConfigKey=n},5057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=a,t.parse=function e(t,r){r=void 0!==r?r:{};var s,l={},p=r.grammarSource,c={bitmark:nr,bit:function(){var e,t,r,i,o;e=$t,t=[],r=Sr();for(;r!==l;)t.push(r),r=Sr();if((r=lr())!==l){for(i=[],o=Sr();o!==l;)i.push(o),o=Sr();Wt=e,e=Ye(r)}else $t=e,e=l;return e},cardContent:function(){var e,t,r;e=$t,t=[],(r=yr())===l&&(r=Cr());for(;r!==l;)t.push(r),(r=yr())===l&&(r=Cr());return Wt=e,t=xt(t),e=t}},u=nr,y="[.",g="]",d="[",T=":",f="&",m="$$$$",h="====",b="text",B="~~~~",v="footer",C="--",x="++",P="===",k="==",_="[@id",K="#",A="[▼",w="[►",S="[@",E="[%",L="[!",I="[?",R="[+",F="[-",N="[$",O="[_",V="[=",G="[&",j="^]",D="id:",M=".",U="\n",J="\r\n",$=/^[^\]]/,W=/^[^:\]]/,z=/^[^&:\]]/,H=/^[ \t]/,q=/^[^\n\r\u2028\u2029]/,X=/^[\r\u2028-\u2029]/,Y=/^[ \t\n\r\u2028\u2029]/,Q=Qt("[.",!1),Z=Zt(["]"],!0,!1),ee=Qt("]",!1),te=Qt("[",!1),re=Qt(":",!1),ie=Qt("&",!1),oe={type:"any"},ne=Qt("$$$$",!1),ae=Qt("====",!1),se=Qt("text",!1),le=Qt("~~~~",!1),pe=Qt("footer",!1),ce=Qt("--",!1),ue=Qt("++",!1),ye=Qt("===",!1),ge=Qt("==",!1),de=Qt("[@id",!1),Te=Qt("#",!1),fe=Qt("[▼",!1),me=Qt("[►",!1),he=Qt("[@",!1),be=Qt("[%",!1),Be=Qt("[!",!1),ve=Qt("[?",!1),Ce=Qt("[+",!1),xe=Qt("[-",!1),Pe=Qt("[$",!1),ke=Qt("[_",!1),_e=Qt("[=",!1),Ke=Qt("[&",!1),Ae=Qt("^]",!1),we=Qt("id:",!1),Se=Zt([":","]"],!0,!1),Ee=Qt(".",!1),Le=Zt(["&",":","]"],!0,!1),Ie=(er("Empty"),Zt([" ","\t"],!1,!1)),Re=er("Anything"),Fe=er("Character"),Ne=Zt(["\n","\r","\u2028","\u2029"],!0,!1),Oe=er("Line"),Ve=(er("whitespace in line"),er("Blank Line")),Ge=er("Line Terminator"),je=Qt("\n",!1),De=Qt("\r\n",!1),Me=Zt(["\r",["\u2028","\u2029"]],!1,!1),Ue=er("Whitespace, then Line Terminator"),Je=er("whitespace"),$e=Zt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),We=function(e,t){return Vr.buildBits([e,...t])},ze=function(e){return Or.handleRawBit(e)},He=function(e){return e},qe=function(e){return Or.handleRawBit(e)},Xe=function(e){return e},Ye=function(e){return e},Qe=function(e,t){return Vr.buildBit(e,t)},Ze=function(e){return Vr.invalidBit(e)},et=function(e,t,r){return Vr.buildBitHeader(t,e,r)},tt=function(e,t){return Vr.buildTextAndResourceType(e,t)},rt=function(e){return Or.handleTextFormat(e)},it=function(e){return Or.handleResourceType(e)},ot=function(e){return Or.handleBitContent(e)},nt=function(e){return Or.handleTagChain(e)},at=function(e){return e},st=function(e){return Or.handleBitTag(e)},lt=function(e){return{type:i.TypeKey.BodyChar,value:e}},pt=function(e){return Or.handlePlainTextDivider(e)},ct=function(e){return Or.handleFooterDivider(e)},ut=function(e){return Or.handleCardSet(e[1].flat())},yt=function(){Or.handleCardSetStart()},gt=function(){Or.handleCardSetEnd()},dt=function(e){return Or.handleCards(e)},Tt=function(e){return Or.handleCardLineOrDivider(e,2)},ft=function(e){return Or.handleCardLine(e)},mt=function(e){return Or.handleCardSet(e[1].flat())},ht=function(){Or.handleCardSetStart()},bt=function(){Or.handleCardSetEnd()},Bt=function(e){return Or.handleCards(e)},vt=function(e){return Or.handleCardLineOrDivider(e,1)},Ct=function(e){return Or.handleCardLine(e)},xt=function(e){return Or.handleCardContent(e)},Pt=function(e){return{type:i.TypeKey.CardChar,value:e}},kt=function(e){return Or.handlePropertyTag("id",e)},_t=function(e,t){return Or.handleTag(i.TypeKey.Title,{level:e,title:t})},Kt=function(e){return Or.handleTag(i.TypeKey.Anchor,e)},At=function(e){return Or.handleTag(i.TypeKey.Reference,e)},wt=function(e,t){return Or.handlePropertyTag(e,t)},St=function(e){return Or.handleTag(i.TypeKey.ItemLead,e)},Et=function(e){return Or.handleTag(i.TypeKey.Instruction,e)},Lt=function(e){return Or.handleTag(i.TypeKey.Hint,e)},It=function(e){return Or.handleTag(i.TypeKey.True,e)},Rt=function(e){return Or.handleTag(i.TypeKey.False,e)},Ft=function(e){return Or.handleTag(i.TypeKey.SampleSolution,e)},Nt=function(e){return Or.handleTag(i.TypeKey.Gap,e)},Ot=function(e){return Or.handleTag(i.TypeKey.Mark,e)},Vt=function(e,t){return Or.handleResourceTag(e,t)},Gt=function(e){return e},jt=function(e){return e?e.trim():""},Dt=function(e){return e.length},Mt=function(e){return e?e.trim():null},Ut=function(e){return e?e.trim():""},Jt=function(){return!0},$t=0|r.peg$currPos,Wt=$t,zt=[{line:1,column:1}],Ht=$t,qt=r.peg$maxFailExpected||[],Xt=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=c[r.startRule]}function Yt(){return t.substring(Wt,$t)}function Qt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Zt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function er(e){return{type:"other",description:e}}function tr(e){var r,i=zt[e];if(i)return i;if(e>=zt.length)r=zt.length-1;else for(r=e;!zt[--r];);for(i={line:(i=zt[r]).line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return zt[e]=i,i}function rr(e,t,r){var i=tr(e),o=tr(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function ir(e){$t<Ht||($t>Ht&&(Ht=$t,qt=[]),qt.push(e))}function or(e,t,r){return new a(a.buildMessage(e,t),e,t,r)}function nr(){return function(){var e,r,i,o;e=$t,r=[],i=Ir();for(;i!==l;)r.push(i),i=Ir();return i=function(){var e,r,i,o;e=$t,r=$t,i=[],o=sr();for(;o!==l;)i.push(o),o=sr();return r=t.substring(r,$t),Wt=e,r=ze(r),e=r,e}(),o=function(){var e,t;e=[],t=ar();for(;t!==l;)e.push(t),t=ar();return e}(),Wt=e,e=We(i,o),e}()}function ar(){var e,r,i,o;for(e=$t,r=[],i=Sr();i!==l;)r.push(i),i=Sr();return(i=Er())===l&&(i=null),o=function(){var e,r,i,o,n,a;if(e=$t,r=$t,i=$t,o=function(){var e,r,i,o;e=$t,t.substr($t,2)===y?(r=y,$t+=2):(r=l,0===Xt&&ir(Q));if(r!==l){for(i=[],o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z));o!==l;)i.push(o),o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z));93===t.charCodeAt($t)?(o=g,$t++):(o=l,0===Xt&&ir(ee)),o!==l?(Wt=e,e=Xe(r)):($t=e,e=l)}else $t=e,e=l;return e}(),o!==l){for(n=[],a=sr();a!==l;)n.push(a),a=sr();i=o=[o,n]}else $t=i,i=l;r=i!==l?t.substring(r,$t):i;r!==l&&(Wt=e,r=qe(r));return e=r,e}(),o!==l?(Wt=e,e=He(o)):($t=e,e=l),e}function sr(){var e,t,r,i;if(e=$t,(t=Er())!==l?(r=$t,Xt++,i=pr(),Xt--,i===l?r=void 0:($t=r,r=l),r!==l?e=t=[t,r]:($t=e,e=l)):($t=e,e=l),e===l)if(e=[],(t=Ar())!==l)for(;t!==l;)e.push(t),t=Ar();else e=l;return e}function lr(){var e,r,i;return e=$t,(r=pr())!==l?(i=function(){var e,t,r;e=$t,t=[],r=fr(),r===l&&(r=hr())===l&&(r=Br())===l&&(r=yr())===l&&(r=Tr());for(;r!==l;)t.push(r),(r=fr())===l&&(r=hr())===l&&(r=Br())===l&&(r=yr())===l&&(r=Tr());return Wt=e,t=ot(t),e=t,e}(),Wt=e,e=Qe(r,i)):($t=e,e=l),e===l&&(e=$t,r=$t,i=function(){var e,r;Xt++,e=[],t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe));for(;r!==l;)e.push(r),t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe));Xt--,r=l,0===Xt&&ir(Re);return e}(),r=t.substring(r,$t),Wt=e,e=r=Ze(r)),e}function pr(){var e,r,i,o,n,a;return e=$t,91===t.charCodeAt($t)?(r=d,$t++):(r=l,0===Xt&&ir(te)),r!==l?(i=function(){var e,r,i;e=$t,r=[],46===t.charCodeAt($t)?(i=M,$t++):(i=l,0===Xt&&ir(Ee));if(i!==l)for(;i!==l;)r.push(i),46===t.charCodeAt($t)?(i=M,$t++):(i=l,0===Xt&&ir(Ee));else r=l;r!==l&&(Wt=e,r=Dt(r));return e=r,e}(),i!==l?(o=_r(),n=function(){var e,t,r;e=$t,t=cr(),t===l&&(t=ur());t===l&&(t=null);r=cr(),r===l&&(r=ur());r===l&&(r=null);return Wt=e,e=tt(t,r),e}(),93===t.charCodeAt($t)?(a=g,$t++):(a=l,0===Xt&&ir(ee)),a!==l?(Wt=e,e=et(i,o,n)):($t=e,e=l)):($t=e,e=l)):($t=e,e=l),e}function cr(){var e,r,i;return e=$t,58===t.charCodeAt($t)?(r=T,$t++):(r=l,0===Xt&&ir(re)),r!==l?(i=_r(),Wt=e,e=rt(i)):($t=e,e=l),e}function ur(){var e,r,i;return e=$t,38===t.charCodeAt($t)?(r=f,$t++):(r=l,0===Xt&&ir(ie)),r!==l?(i=_r(),Wt=e,e=it(i)):($t=e,e=l),e}function yr(){var e,t,r,i,o;if(e=$t,t=$t,(r=dr())!==l){for(i=[],o=gr();o!==l;)i.push(o),o=gr();t=r=[r,i]}else $t=t,t=l;return t!==l&&(Wt=e,t=nt(t)),e=t}function gr(){var e,t;return e=$t,(t=dr())!==l&&(Wt=e,t=at(t)),e=t}function dr(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,t.substr($t,4)===_?(r=_,$t+=4):(r=l,0===Xt&&ir(de));r!==l&&(i=Kr())!==l?(o=function(){var e;93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Xt&&ir(ee));return e}(),o!==l?(Wt=e,e=kt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,t.substr($t,2)===S?(r=S,$t+=2):(r=l,0===Xt&&ir(he));r!==l&&(i=Pr())!==l&&(o=Kr())!==l&&kr()!==l?(Wt=e,e=wt(i,o)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,91===t.charCodeAt($t)?(r=d,$t++):(r=l,0===Xt&&ir(te));if(r!==l){if(i=[],35===t.charCodeAt($t)?(o=K,$t++):(o=l,0===Xt&&ir(Te)),o!==l)for(;o!==l;)i.push(o),35===t.charCodeAt($t)?(o=K,$t++):(o=l,0===Xt&&ir(Te));else i=l;i!==l?(o=xr(),kr()!==l?(Wt=e,e=_t(i,o)):($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===A?(r=A,$t+=2):(r=l,0===Xt&&ir(fe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Kt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===w?(r=w,$t+=2):(r=l,0===Xt&&ir(me));r!==l?(i=xr(),kr()!==l?(Wt=e,e=At(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===E?(r=E,$t+=2):(r=l,0===Xt&&ir(be));r!==l?(i=xr(),kr()!==l?(Wt=e,e=St(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===L?(r=L,$t+=2):(r=l,0===Xt&&ir(Be));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Et(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===I?(r=I,$t+=2):(r=l,0===Xt&&ir(ve));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Lt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===O?(r=O,$t+=2):(r=l,0===Xt&&ir(ke));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Nt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===V?(r=V,$t+=2):(r=l,0===Xt&&ir(_e));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Ot(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===N?(r=N,$t+=2):(r=l,0===Xt&&ir(Pe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Ft(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===R?(r=R,$t+=2):(r=l,0===Xt&&ir(Ce));r!==l?(i=xr(),kr()!==l?(Wt=e,e=It(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===F?(r=F,$t+=2):(r=l,0===Xt&&ir(xe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Rt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,t.substr($t,2)===G?(r=G,$t+=2):(r=l,0===Xt&&ir(Ke));r!==l&&(i=Pr())!==l&&(o=Kr())!==l&&kr()!==l?(Wt=e,e=Vt(i,o)):($t=e,e=l);return e}()))))))))))))),r!==l&&(Wt=e,r=st(r)),e=r}function Tr(){var e,r;return e=$t,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),r!==l&&(Wt=e,r=lt(r)),e=r}function fr(){var e;return(e=function(){var e,t,r,i,o;e=$t,t=$t,(r=Er())!==l&&(i=mr())!==l&&(o=Lr())!==l?t=r=[r,i,o]:($t=t,t=l);t!==l&&(Wt=e,t=ct(t));return e=t,e}())===l&&(e=function(){var e,r,i,o,n;e=$t,r=$t,(i=Er())!==l?(o=function(){var e,r,i,o,n,a;t.substr($t,4)===m?(e=m,$t+=4):(e=l,0===Xt&&ir(ne));if(e===l)if(e=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Xt&&ir(ae)),r!==l){if(i=[],(o=Ir())!==l)for(;o!==l;)i.push(o),o=Ir();else i=l;if(i!==l)if(t.substr($t,4)===b?(o=b,$t+=4):(o=l,0===Xt&&ir(se)),o!==l){if(n=[],(a=Ir())!==l)for(;a!==l;)n.push(a),a=Ir();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Xt&&ir(ae)),a!==l?e=r=[r,i,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}(),o!==l&&(n=Lr())!==l?r=i=[i,o,n]:($t=r,r=l)):($t=r,r=l);r!==l&&(Wt=e,r=pt(r));return e=r,e}()),e}function mr(){var e,r,i,o,n,a;if(t.substr($t,4)===B?(e=B,$t+=4):(e=l,0===Xt&&ir(le)),e===l)if(e=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Xt&&ir(ae)),r!==l){if(i=[],(o=Ir())!==l)for(;o!==l;)i.push(o),o=Ir();else i=l;if(i!==l)if(t.substr($t,6)===v?(o=v,$t+=6):(o=l,0===Xt&&ir(pe)),o!==l){if(n=[],(a=Ir())!==l)for(;a!==l;)n.push(a),a=Ir();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Xt&&ir(ae)),a!==l?e=r=[r,i,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}function hr(){var e,r,i,o,n;if(e=$t,r=$t,i=function(){var e,r,i,o,n,a;e=$t,r=Er(),r!==l?(i=$t,Xt++,o=$t,t.substr($t,4)===h?(n=h,$t+=4):(n=l,0===Xt&&ir(ae)),n!==l&&(a=Lr())!==l?o=n=[n,a]:($t=o,o=l),Xt--,o!==l?($t=i,i=void 0):i=l,i!==l?(Wt=e,e=yt()):($t=e,e=l)):($t=e,e=l);return e}(),i!==l){for(o=[],n=br();n!==l;)o.push(n),n=br();n=function(){var e,t,r,i,o;e=$t,t=$t,r=mr(),r===l&&(r=null);i=$t,Xt++,o=Fr(),Xt--,o!==l?($t=i,i=void 0):i=l;i!==l?t=r=[r,i]:($t=t,t=l);t!==l&&(Wt=e,t=gt());return e=t,e}(),n!==l?r=i=[i,o,n]:($t=r,r=l)}else $t=r,r=l;return r!==l&&(Wt=e,r=ut(r)),e=r}function br(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,r=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Xt&&ir(ae));i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l);r===l&&(r=$t,t.substr($t,2)===C?(i=C,$t+=2):(i=l,0===Xt&&ir(ce)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=$t,t.substr($t,2)===x?(i=x,$t+=2):(i=l,0===Xt&&ir(ue)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=$t,r=$t,Xt++,i=$t,o=mr(),o!==l&&(n=Fr())!==l?i=o=[o,n]:($t=i,i=l);Xt--,i===l?r=void 0:($t=r,r=l);if(r!==l){if(i=$t,o=$t,n=wr(),(a=Er())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=Ar())!==l)for(;a!==l;)n.push(a),a=Ar();else n=l;n!==l&&(a=Rr())!==l?o=n=[n,a]:($t=o,o=l)}(i=o!==l?t.substring(i,$t):o)!==l?(Wt=e,e=ft(i)):($t=e,e=l)}else $t=e,e=l;return e}())));r!==l&&(Wt=e,r=Tt(r));return e=r,e}(),r!==l&&(Wt=e,r=dt(r)),e=r}function Br(){var e,r,i,o,n;if(e=$t,r=$t,i=function(){var e,r,i,o,n,a;e=$t,r=Er(),r!==l?(i=$t,Xt++,o=$t,t.substr($t,3)===P?(n=P,$t+=3):(n=l,0===Xt&&ir(ye)),n!==l&&(a=Lr())!==l?o=n=[n,a]:($t=o,o=l),Xt--,o!==l?($t=i,i=void 0):i=l,i!==l?(Wt=e,e=ht()):($t=e,e=l)):($t=e,e=l);return e}(),i!==l){for(o=[],n=vr();n!==l;)o.push(n),n=vr();n=function(){var e,t,r,i,o;e=$t,t=$t,r=mr(),r===l&&(r=null);i=$t,Xt++,o=Fr(),Xt--,o!==l?($t=i,i=void 0):i=l;i!==l?t=r=[r,i]:($t=t,t=l);t!==l&&(Wt=e,t=bt());return e=t,e}(),n!==l?r=i=[i,o,n]:($t=r,r=l)}else $t=r,r=l;return r!==l&&(Wt=e,r=mt(r)),e=r}function vr(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,r=$t,t.substr($t,3)===P?(i=P,$t+=3):(i=l,0===Xt&&ir(ye));i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l);r===l&&(r=$t,t.substr($t,2)===k?(i=k,$t+=2):(i=l,0===Xt&&ir(ge)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=$t,t.substr($t,2)===C?(i=C,$t+=2):(i=l,0===Xt&&ir(ce)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=$t,r=$t,Xt++,i=$t,o=mr(),o!==l&&(n=Fr())!==l?i=o=[o,n]:($t=i,i=l);Xt--,i===l?r=void 0:($t=r,r=l);if(r!==l){if(i=$t,o=$t,n=wr(),(a=Er())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=Ar())!==l)for(;a!==l;)n.push(a),a=Ar();else n=l;n!==l&&(a=Rr())!==l?o=n=[n,a]:($t=o,o=l)}(i=o!==l?t.substring(i,$t):o)!==l?(Wt=e,e=Ct(i)):($t=e,e=l)}else $t=e,e=l;return e}())));r!==l&&(Wt=e,r=vt(r));return e=r,e}(),r!==l&&(Wt=e,r=Bt(r)),e=r}function Cr(){var e,r;return e=$t,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),r!==l&&(Wt=e,r=Pt(r)),e=r}function xr(){var e,r,i,o;for(e=$t,r=$t,i=[],t.substr($t,2)===j?(o=j,$t+=2):(o=l,0===Xt&&ir(Ae)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z)));o!==l;)i.push(o),t.substr($t,2)===j?(o=j,$t+=2):(o=l,0===Xt&&ir(Ae)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z)));return r=t.substring(r,$t),Wt=e,e=r=Gt(r)}function Pr(){var e,r,i,o,n;if(e=$t,r=$t,Xt++,t.substr($t,3)===D?(i=D,$t+=3):(i=l,0===Xt&&ir(we)),Xt--,i===l?r=void 0:($t=r,r=l),r!==l){for(i=$t,o=[],n=t.charAt($t),W.test(n)?$t++:(n=l,0===Xt&&ir(Se));n!==l;)o.push(n),n=t.charAt($t),W.test(n)?$t++:(n=l,0===Xt&&ir(Se));i=t.substring(i,$t),Wt=e,e=jt(i)}else $t=e,e=l;return e}function kr(){var e,r,i;if(93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Xt&&ir(ee)),e===l){for(e=$t,r=[],i=Ir();i!==l;)r.push(i),i=Ir();(i=Nr())!==l?e=r=[r,i]:($t=e,e=l)}return e}function _r(){var e,r,i,o;for(e=$t,r=$t,i=[],o=t.charAt($t),z.test(o)?$t++:(o=l,0===Xt&&ir(Le));o!==l;)i.push(o),o=t.charAt($t),z.test(o)?$t++:(o=l,0===Xt&&ir(Le));return r=t.substring(r,$t),Wt=e,e=r=Mt(r)}function Kr(){var e,r,i;return e=$t,58===t.charCodeAt($t)?(r=T,$t++):(r=l,0===Xt&&ir(re)),r!==l?(i=xr(),Wt=e,e=Ut(i)):($t=e,e=l),e===l&&(r="",Wt=e=$t,e=r=Jt()),e}function Ar(){var e;return Xt++,e=t.charAt($t),q.test(e)?$t++:(e=l,0===Xt&&ir(Ne)),Xt--,e===l&&(0===Xt&&ir(Fe)),e}function wr(){var e,t;for(Xt++,e=[],t=Ar();t!==l;)e.push(t),t=Ar();return Xt--,t=l,0===Xt&&ir(Oe),e}function Sr(){var e,r,i;for(Xt++,e=$t,r=[],i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));i!==l;)r.push(i),i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));return(i=Er())!==l?e=r=[r,i]:($t=e,e=l),Xt--,e===l&&(r=l,0===Xt&&ir(Ve)),e}function Er(){var e;return Xt++,10===t.charCodeAt($t)?(e=U,$t++):(e=l,0===Xt&&ir(je)),e===l&&(t.substr($t,2)===J?(e=J,$t+=2):(e=l,0===Xt&&ir(De)),e===l&&(e=t.charAt($t),X.test(e)?$t++:(e=l,0===Xt&&ir(Me)))),Xt--,e===l&&(0===Xt&&ir(Ge)),e}function Lr(){var e,r,i;for(Xt++,e=$t,r=[],i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));i!==l;)r.push(i),i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));return(i=Er())!==l?e=r=[r,i]:($t=e,e=l),Xt--,e===l&&(r=l,0===Xt&&ir(Ue)),e}function Ir(){var e;return Xt++,e=t.charAt($t),Y.test(e)?$t++:(e=l,0===Xt&&ir($e)),Xt--,e===l&&(0===Xt&&ir(Je)),e}function Rr(){var e,r;return(e=Er())===l&&(e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l)),e}function Fr(){var e,r;return(e=Lr())===l&&(e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l)),e}function Nr(){var e,r;return e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l),e}const Or=new o.BitmarkPegParserHelper({parse:e,parserText:Yt,parserLocation:Gr}),Vr=new n.BitmarkPegParserProcessor({parse:e,parserText:Yt,parserLocation:Gr});function Gr(){const e=rr(Wt,$t);return e?(delete e.source,e):e}function rr(e,t,r){var i=tr(e),o=tr(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}if(s=u(),r.peg$library)return{peg$result:s,peg$currPos:$t,peg$FAILED:l,peg$maxFailExpected:qt,peg$maxFailPos:Ht};if(s!==l&&$t===t.length)return s;throw s!==l&&$t<t.length&&ir({type:"end"}),or(qt,Ht<t.length?t.charAt(Ht):null,Ht<t.length?rr(Ht,Ht+1):rr(Ht,Ht))};const i=r(3029),o=r(3206),n=r(7124);r(7735);function a(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function s(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var l=this.location.end,p=s("",n.line.toString().length," "),c=i[o.line-1],u=(o.line===l.line?l.column:c.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+p+" |\n"+n.line+" | "+c+"\n"+p+" | "+s("",o.column-1," ")+s("",u,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["bitmark","bit","cardContent"]},5078:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(5057).parse;t.parse=i},5087:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=r(5126),n=r(6772),a=r(7735),s=r(2028),l=r(126),p=r(5854),c=r(3811),u=r(4410),y=r(1163),g=r(9727),d=r(166),T=r(6149),f=r(385),m=r(6877),h=r(4078),b=r(955),B=r(9681),v=r(4),C=r(431),x={debugGenerationInline:!1};class P extends v.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.inTag,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.write=this.write.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(r=c.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:c.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},x),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion===c.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.spacesAroundValues=this.calcSpacesAroundValues(),this.spacesAroundValuesStr=" ".repeat(this.spacesAroundValues),this.textGenerator=new C.TextGenerator(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new n.StringWriter,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){var r;const i=e.value,o=s.Config.getBitConfig(i.bitType),n=s.Config.getBitResourcesConfig(i.bitType,i.resourceType);if(this.bitType=i.bitType,this.textFormat=null!==(r=i.textFormat)&&void 0!==r?r:o.textFormatDefault,this.isBodyBitmarkText=this.textFormat===f.TextFormat.bitmarkText,this.isCardAllowed=this.calculateIsCardAllowed(),this.hasCardSet=this.haveValidCardSet(i),this.hasFooter=this.haveValidFooter(i),this.firstBit||(this.writeNL(),this.writeNL(),this.writeNL()),this.writeOPD(i.bitLevel),i.isCommented&&this.writeString("|"),this.writeTagKey(i.bitType),i.textFormat){this.isWriteTextFormat(i.textFormat,o.textFormatDefault)&&(this.writeColon(),this.writeTagKey(i.textFormat))}let a;if(o.resourceAttachmentAllowed&&i.resources&&i.resources.length>0){const e=n.comboResourceTagTypesMap;if(n.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=i.resources[0].type}return a&&(this.writeAmpersand(),this.writeTagKey(a)),this.writeCL(),!0}exit_bitsValue(e,t){this.firstBit=!1}enter_internalComment(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;for(let e=0;e<r.length;e++){const t=r[e];this.writeNL(),this.writeProperty("internalComment",t,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0})}return!1}enter_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const o=null==i?void 0:i.value;if(o){const e=""!=r,t=o.labelFalse&&""!=o.labelFalse[0];(e||t)&&this.writeNL(),e&&this.writeProperty(d.PropertyTag.labelTrue,r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),t&&this.writeProperty(d.PropertyTag.labelFalse,o.labelFalse,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!1}enter_labelFalse(e,t){return!0}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{url:o,mockupId:n,size:a,format:s,trim:p}=r;return this.writeNL(),this.writeProperty("imageSource",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),o&&(n&&this.writeProperty("mockupId",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("size",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),s&&this.writeProperty("format",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),h.BooleanUtils.isBoolean(p)&&this.writeProperty("trim",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{technicalTerm:o,lang:n}=r;return this.writeNL(),this.writeProperty("technicalTerm",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("lang",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{servings:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:p,hint:c}=r;return this.writeNL(),this.writeProperty("servings",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("unit",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=a&&this.writeProperty("unitAbbr",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=s&&this.writeProperty("decimalPlaces",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=p&&this.writeProperty("disableCalculation",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=c&&(this.writeOPQ(),this.writeTextOrValue(c,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),!1}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{name:o,title:n,avatarImage:a}=r;return this.writeNL(),this.writeProperty("person",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("title",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeResource(T.ResourceTag.image,a.image.src),!1}enter_text(e,t){const r=this.getParentNode(t);return!r||r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_text(e,t){const r=this.getParentNode(t);return!r||r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue&&r.key!==l.NodeType.reason||(B.StringUtils.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}enter_icon(e,t){const r=e.value,i=this.getParentNode(t);return!i||(i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue||(this.writeNL(),this.writeResource(T.ResourceTag.icon,r.image.src)),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_ratingLevelStart(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enter_ratingLevelEnd(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enterRatingLevelStartEndCommon(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{level:o,label:n}=r,a=e.key===l.NodeType.ratingLevelStart?d.PropertyTag.ratingLevelStart:d.PropertyTag.ratingLevelEnd;return this.writeNL(),this.writeProperty(a,o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("label",n,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.markConfig)return!0;const{mark:o,color:n,emphasis:a}=r;return o&&(this.writeNL(),this.writeProperty("mark",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("color",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("emphasis",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_reasonableNumOfChars(e,t){this.writeNL(),this.writeProperty("reasonableNumOfChars",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_additionalSolutionsValue(e,t){const r=this.getParentNode(t,2);(null==r?void 0:r.key)===l.NodeType.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,{format:g.PropertyFormat.plainText,single:!1}))}enter_item(e,t){var r,i,o;const n=e.value,a=this.getParentNode(t);return!this.isEmptyText(n)&&(!this.isEmptyText(null===(r=null==a?void 0:a.value)||void 0===r?void 0:r.lead)||(!this.isEmptyText(null===(i=null==a?void 0:a.value)||void 0===i?void 0:i.pageNumber)||(!this.isEmptyText(null===(o=null==a?void 0:a.value)||void 0===o?void 0:o.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(n,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))))}enter_lead(e,t){var r,i,o,n;const a=e.value,s=this.getParentNode(t);return!this.isEmptyText(a)&&(!this.isEmptyText(null===(r=null==s?void 0:s.value)||void 0===r?void 0:r.pageNumber)||(!this.isEmptyText(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==s?void 0:s.value)||void 0===o?void 0:o.item)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(a,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)))}enter_pageNumber(e,t){var r,i,o,n,a;const s=e.value,l=this.getParentNode(t);return!this.isEmptyText(s)&&(!this.isEmptyText(null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(o=null===(i=null==l?void 0:l.value)||void 0===i?void 0:i.item)&&void 0!==o?o:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(a=null===(n=null==l?void 0:l.value)||void 0===n?void 0:n.lead)&&void 0!==a?a:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!=s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))}enter_marginNumber(e,t){var r,i,o,n,a,s;const l=e.value,p=this.getParentNode(t);return!this.isEmptyText(l)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(i=null===(r=null==p?void 0:p.value)||void 0===r?void 0:r.item)&&void 0!==i?i:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==p?void 0:p.value)||void 0===o?void 0:o.lead)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(s=null===(a=null==p?void 0:p.value)||void 0===a?void 0:a.pageNumber)&&void 0!==s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(l,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)}enter_body(e,t){var r;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue&&(null==i?void 0:i.key)!==l.NodeType.cardBitsValue)return!0;this.inTag=!1;const o=e.value;if(this.textFormat===f.TextFormat.json){const e=null!==(r=o.body)&&void 0!==r?r:null;if(Array.isArray(e)||b.ObjectUtils.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.body))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(o.body)?o.body:[];this.writeTextOrValue(t,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=B.StringUtils.isString(o.body)?o.body:"";this.writeTextOrValue(`${e}`,f.TextFormat.plainText,m.TextLocation.body)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,r){var i;const o=null!==(i=l.NodeType.fromValue(e.type))&&void 0!==i?i:l.NodeType.bodyBit;return this.ast.walk(e,o,this,void 0),""}enter_gap(e,t){const r=e.value;if(r.solutions&&0===r.solutions.length)this.writeOPU(),this.writeCL();else for(const e of r.solutions)this.writeOPU(),this.writeTextOrValue(e,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL();return!0}enter_mark(e,t){const r=e.value;return this.writeOPE(),this.writeTextOrValue(r.solution,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;return this.textFormat===f.TextFormat.json||i.footer&&i.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",f.TextFormat.plainText,m.TextLocation.body),this.writeNL(),this.writeTextOrValue(i.footer,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;return i&&0===i.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){var r;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const o=e.value,n=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==n?void 0:n.type)===u.BodyBitType.mark&&o&&(this.writeOPE(),this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_mark(e,t){const r=t[0];if((null==r?void 0:r.key)!==l.NodeType.mark)return;const i=e.value;i&&this.writeProperty("mark",i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}enter_optionsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_textsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,y.CardSetVersion.v1)}enter_elements(e,t){}between_elements(e,t,r,i){this.writeCardSetVariantDivider()}between_flashcards(e,t,r,i){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,r,i){var o;this.isCardAllowed&&(r.key===l.NodeType.answer?this.writeCardSetSideDivider():r.key===l.NodeType.alternativeAnswers&&0!==(null===(o=r.value)||void 0===o?void 0:o.length)&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(p.BitType.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.statement,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_choicesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect||r.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.choice,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_responsesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.response,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}between_feedbacks(e,t,r,i){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const r=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.audio,r.audio.src),!1}enter_keyImage(e,t){const r=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.image,r.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,r,i){this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,r,i){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_table(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_data(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,r,i){const o=this.getParentNode(i),n=null==o?void 0:o.key;n!==l.NodeType.table&&n!==l.NodeType.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}between_dataValue(e,t,r,i){const o=this.getParentNode(i,2);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const r=this.getParentNode(t,3);(null==r?void 0:r.key)===l.NodeType.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}enter_dataValueValue(e,t){const r=this.getParentNode(t,3);if(((null==r?void 0:r.key)===l.NodeType.table||(null==r?void 0:r.key)===l.NodeType.pronunciationTable)&&e.value){if((null==r?void 0:r.key)===l.NodeType.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(T.ResourceTag.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,m.TextLocation.body)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)}}between_captionDefinitionList(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const r=this.getParentNode(t);return(null==r?void 0:r.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_definition(e,t){const r=this.getParentNode(t);return(null==r?void 0:r.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}between_definitions(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)!==l.NodeType.cardNode&&(null==o?void 0:o.key)!==l.NodeType.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,r,i){var o;const n=this.getParentNode(i);(null==n?void 0:n.key)===l.NodeType.definitions&&this.isCardAllowed&&(r.key===l.NodeType.definition?this.writeCardSetSideDivider():r.key===l.NodeType.alternativeDefinitions&&(null===(o=r.value)||void 0===o?void 0:o.length)>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const r=e.value;return null!=r.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(r.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),null!=r.ingredient&&(this.writeNL(),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeTextOrValue(`${r.quantity}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),r.disableCalculation&&this.writeProperty("disableCalculation",!0,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),this.writeNL(),this.writeTextOrValue(r.ingredient,this.textFormat,m.TextLocation.body)),!0}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeCardSetCardDivider()}leaf_response(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reaction(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_feedback(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.botResponsesValue)return;const i=e.value;i&&(this.writeNL(),this.writeTextOrValue(i,this.textFormat,m.TextLocation.body))}enter_backgroundWallpaper(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_imagePlaceholder(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)===l.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}else{const t=e.value;t&&t.src&&this.writeProperty("posterImage",t.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!0}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<r.length&&t!==e.length;t++){const i=r[t],o=e[t];this.writeProperty(o,i.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}}return!1}leaf_level(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;if(!s.Config.isOfBitType(this.bitType,[p.BitType.chapter]))return!0;const i=e.value,o=null==r?void 0:r.value;if(i>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+i;e++)this.writeHash();this.writeCL()}return!1}enter_title(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value,o=(null==r?void 0:r.value).level||1;if(o&&i){this.writeNL(),this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_subtitle(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;if(i){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const r=e.value;return r&&(this.writeNL(),this.writeProperty("book",r.book,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))),!1}leaf_book(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(i.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))}enter_hint(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_instruction(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_lang(e,t){e.value&&(this.writeNL(),this.writeProperty("lang",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0}))}enter_refAuthor(e,t){e.value&&(this.writeNL(),this.writeProperty("refAuthor",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refBookTitle(e,t){e.value&&(this.writeNL(),this.writeProperty("refBookTitle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_refPublisher(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublisher",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refPublicationYear(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublicationYear",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_citationStyle(e,t){e.value&&(this.writeNL(),this.writeProperty("citationStyle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_isExample(e,t){var r;if(!e.value)return;const i=this.getParentNode(t),o=null!==(r=null==i?void 0:i.value.example)&&void 0!==r?r:null;null!=o&&""!==o&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString(" true "):!1===o?this.writeString(" false "):Array.isArray(o)?this.writeTextOrValue(o,f.TextFormat.bitmarkText,m.TextLocation.tag):this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_elementsValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_solutionsValue(e,t){const r=this.getParentNode(t,2);(null==r?void 0:r.key)===l.NodeType.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_question(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.questionsValue&&(null==r?void 0:r.key)!==l.NodeType.flashcardsValue||e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_src1x(e,t){this.writeProperty("src1x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_width(e,t){this.writeProperty("width",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_height(e,t){this.writeProperty("height",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_alt(e,t){this.writeProperty("alt",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_zoomDisabled(e,t){s.Config.isOfBitType(this.bitType,[p.BitType.imageSeparator,p.BitType.pageBanner,p.BitType.imagesLogoGrave,p.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0,ignoreFalse:!0}))}enter_caption(e,t){const r=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",r,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}leaf_search(e,t){const r=e.value;r&&(this.writeNL_IfNotChain(t),this.writeProperty("search",r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_duration(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.bitsValue&&this.writeProperty("duration",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_mute(e,t){this.writeProperty("mute",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}generateResourceHandlers(){for(const e of T.ResourceTag.keys()){if(e===T.ResourceTag.keyFromValue(T.ResourceTag.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const r=e.value;if(null==r)return!1;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.resourcesValue)return!0;const o=T.ResourceTag.fromValue(i.value.__typeAlias),n=null!=o?o:T.ResourceTag.fromValue(i.value.type);if(!n)return!1;const a=r.url||r.src||r.body||"";return this.writeNL(),this.writeResource(n,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag,i=`enter_${t}`;"function"!=typeof this[i]&&("example"!==t&&(this[i]=(e,t)=>{var i,o;if(null==e.value)return;const n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.writeNL_IfNotChain(t),this.writeProperty(r.tag,e.value,{format:null!==(i=r.format)&&void 0!==i?i:g.PropertyFormat.plainText,single:null!==(o=r.single)&&void 0!==o&&o,ignoreFalse:"false"===r.defaultValue,ignoreTrue:"true"===r.defaultValue}))},this[i]=this[i].bind(this)))}}isChain(e){const t=this.getParentNode(e);return(null==t?void 0:t.key)!==l.NodeType.bitsValue&&((null==t?void 0:t.key)!==l.NodeType.cardBitsValue&&((null==t?void 0:t.key)!==l.NodeType.feedbacksValue&&((null==t?void 0:t.key)!==l.NodeType.quizzesValue&&((null==t?void 0:t.key)!==l.NodeType.pairsValue&&((null==t?void 0:t.key)!==l.NodeType.matrixValue&&((null==t?void 0:t.key)!==l.NodeType.definitionsValue&&((null==t?void 0:t.key)!==l.NodeType.questionsValue&&(null==t?void 0:t.key)!==l.NodeType.reason)))))))}haveValidCardSet(e){const t=s.Config.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==f.TextFormat.json&&(!!(t.footer&&t.footer.length>0)&&!!this.isBodyBitmarkText)}calcSpacesAroundValues(){const e=this.options.spacesAroundValues;let t=1;return null!=e&&(t=!0===e?1:!1===e?0:e),t=Math.min(Math.max(t,0),10),t}writeTagKey(e){null!=e&&this.write(a.Breakscape.breakscape(`${e}`,{format:f.TextFormat.plainText,location:m.TextLocation.tag}))}writeTextOrValue(e,t,r,i){const o=r===m.TextLocation.tag,n="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,l=o?this.spacesAroundValuesStr:"",p=t===f.TextFormat.bitmarkText?t:f.TextFormat.plainText,c=e=>o?`${l}${e}${l}`:e,u=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const r=this.partWriter.getString().trim();return this.writer=t,r};if(null==n){if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,r,i);if(o){const t=u(e);t&&this.write(c(t))}else e()}}else{const e=()=>this.write(a.Breakscape.breakscape(n,{format:p,location:r}));if(o){const t=u(e);t&&this.write(c(t))}else e()}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(e){this.write(`[${".".repeat(e)}`)}writeOPU(){this.write("[_")}writeOPE(){this.write("[=")}writeOPB(){this.write("[!")}writeOPQ(){this.write("[?")}writeOPA(){this.write("[@")}writeOPP(){this.write("[+")}writeOPM(){this.write("[-")}writeOPS(){this.write("[\\")}writeOPR(){this.write("[*")}writeOPC(){this.write("[%")}writeOPAMP(){this.write("[&")}writeOPDOLLAR(){this.write("[$")}writeOPHASH(){this.write("[#")}writeOPPRE(){this.write("['")}writeOPPOST(){this.write("[")}writeOP(){this.write("[")}writeCL(){0===this.spacesAroundValues&&this.writer.getLastWrite().endsWith("^")?this.write(" ]"):this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeSpacesAroundValues(){this.write(this.spacesAroundValuesStr)}writePlainTextDivider(){this.writeNL(),this.write("==== text ====")}writeCardSetStart(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1&&this.write("===")}writeCardSetCardDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,r=!1){var i;if(e&&t){const o=t[null!==(i=T.ResourceTag.keyFromValue(t.type))&&void 0!==i?i:""],n=o&&(o.src||o.url||o.body)||"";r?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(n,f.TextFormat.plainText,m.TextLocation.tag),t.type,T.ResourceTag.article,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.tag),T.ResourceTag.article,this.writeCL())}writeProperty(e,t,r){let i;if(void 0!==t){const o=r.format===g.PropertyFormat.bitmarkText;if(o){if(r.ignoreEmpty&&o&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}else if(i=Array.isArray(t)?t:[t],i.length>0){r.single&&(i=i.slice(i.length-1));for(const t of i)if(void 0!==t){if(r.ignoreFalse&&!1===t)continue;if(r.ignoreTrue&&!0===t)continue;if(r.ignoreEmpty&&""===t)continue;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}}}}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!(f.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()}isOfBitType1(){return this.isOfBitType([p.BitType.trueFalse1,p.BitType.multipleChoice1,p.BitType.multipleResponse1])}isOfBitType(e){return s.Config.isOfBitType(this.bitType,e)}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.BitmarkGenerator=P},5126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const i=r(1412),o=r(126),n=r(9681);t.Ast=class{constructor(){(0,i.init)()}walk(e,t,r,i){this.walkRecursive(e,[{index:0,key:t,value:e}],r,i)}getRouteKey(e){return e.reduce(((t,r,i)=>(+r.key!==r.index&&(t+=`${r.key}`,i<e.length-1&&(t+="_")),t)),"")}printTree(e,t=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==o.NodeType.bodyJson),between:(e,t,r,i)=>{console.log("Between: "+this.getRouteKey(i))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){return!(!Object.prototype.hasOwnProperty.call(e,"bits")||!Array.isArray(e.bits))}walkRecursive(e,t,r,i){const{enter:o,between:n,exit:a,leaf:s}=r,l=t[t.length-1].key,p=!this.isValue(e),c=t[t.length-1];if(p){if(o){if(!1===o(c,t,i))return}}else s&&s(c,t,i);if(p){const o=this.isArray(e),a=Object.keys(e);for(let s=0,p=a.length;s<p;s++){const u=a[s],y=s===p-1,g=e,d=g[u];if(null!=d){const e={key:this.getAstKey(u,l,o),index:s,value:d},p=t.slice();if(p.push(e),this.walkRecursive(d,p,r,i),!y){const r=a[s+1],p=g[r],u={key:this.getAstKey(r,l,o),index:s+1,value:p};if(n){if(!1===n(c,e,u,t,i))break}}}}}p&&a&&a(c,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),o.NodeType.fromKey(i)||`unknown(${i})`}isArray(e){return Array.isArray(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}}},5189:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=function(e,t,r,c,u,y){if(t===p.BitContentLevel.Chain)(0,l.markTagContentProcessor)(e,p.BitContentLevel.Chain,c,u);else{const t=function(e,t,r,l){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",l);const u=o.Config.getTagConfigForTag(r,a.Tag.fromValue(l.type)),y=e.bitContentProcessor(p.BitContentLevel.Chain,r,[l]),g=e.bitContentProcessor(p.BitContentLevel.Chain,null==u?void 0:u.chain,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",g);const{solution:d}=y,{mark:T}=g,f=i(g,["mark"]),m=Object.assign({type:n.BodyBitType.mark,solution:null!=d?d:"",mark:null!==(c=s.ArrayUtils.asSingle(T))&&void 0!==c?c:""},f);return m}(e,0,r,c);t&&y.push(t)}};const o=r(2028),n=r(4410),a=r(9917),s=r(6989),l=r(5980),p=r(3029)},5416:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=r(1731),g="",{toString:d}={},{keys:T}=Object,f=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const r=d.call(e).slice(8,-1);switch(r){case"Array":return[n,g];case"Object":return[a,g];case"Date":return[s,g];case"RegExp":return[l,g];case"Map":return[p,g];case"Set":return[c,g];case"DataView":return[n,r]}return r.includes("Array")?[n,r]:r.includes("Error")?[u,r]:[a,r]},m=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:r}={})=>{const u=[];return((e,t,r,u)=>{const g=(e,t)=>{const i=u.push(e)-1;return r.set(t,i),i},d=u=>{if(r.has(u))return r.get(u);let[h,b]=f(u);switch(h){case o:{let t=u;switch(b){case"bigint":h=y,t=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([i],u)}return g([h,t],u)}case n:{if(b){let e=u;return"DataView"===b?e=new Uint8Array(u.buffer):"ArrayBuffer"===b&&(e=new Uint8Array(u)),g([b,[...e]],u)}const e=[],t=g([h,e],u);for(const t of u)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return g([b,u.toString()],u);case"Boolean":case"Number":case"String":return g([b,u.valueOf()],u)}if(t&&"toJSON"in u)return d(u.toJSON());const r=[],i=g([h,r],u);for(const t of T(u))!e&&m(f(u[t]))||r.push([d(t),d(u[t])]);return i}case s:return g([h,u.toISOString()],u);case l:{const{source:e,flags:t}=u;return g([h,{source:e,flags:t}],u)}case p:{const t=[],r=g([h,t],u);for(const[r,i]of u)(e||!m(f(r))&&!m(f(i)))&&t.push([d(r),d(i)]);return r}case c:{const t=[],r=g([h,t],u);for(const r of u)!e&&m(f(r))||t.push(d(r));return r}}const{message:B}=u;return g([h,{name:b,message:B}],u)};return d})(!(t||r),!!t,new Map,u)(e),u}},5512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const i=(0,r(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=i},5533:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=r(7735),n=r(2028),a=r(5854),s=r(6149),l=r(6877),p=r(955),c=r(9681),u=r(201),y=r(4470),g=r(4564);class d extends y.BaseBuilder{resourceFromResourceJson(e,t){if(!t)return;const r=[];Array.isArray(t)||(t=[t]);for(const i of t){let t=s.ResourceTag.fromValue(i.type);if(!t)return;const o=s.ResourceTag.keyFromValue(t);if(!o)return;const n=s.ResourceTag.fromValue(i.__typeAlias);let a;if(t=null!=n?n:t,t===s.ResourceTag.imageResponsive){const t=i,o=this.resourceFromResourceDataJson(e,s.ResourceTag.imagePortrait,t.imagePortrait),n=this.resourceFromResourceDataJson(e,s.ResourceTag.imageLandscape,t.imageLandscape);o&&r.push(o),n&&r.push(n)}else if(t===s.ResourceTag.stillImageFilm){const t=i,o=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t.image),n=this.resourceFromResourceDataJson(e,s.ResourceTag.audio,t.audio);o&&r.push(o),n&&r.push(n)}else{if(a=i[o],!a)return;const n=this.resourceFromResourceDataJson(e,t,a);n&&r.push(n)}}return 0!==r.length?1===r.length?r[0]:r:void 0}resourceFromResourceDataJson(e,t,r){var i,o,n;if(!r)return;if(!(t=s.ResourceTag.fromValue(t)))return;const a=c.StringUtils.isString(r)?r:void 0,p=r.url||r.src||r.body||a,u=r.posterImage?null===(i=this.resourceFromResourceDataJson(e,s.ResourceTag.image,r.posterImage))||void 0===i?void 0:i.image:void 0,y=r.thumbnails?r.thumbnails.map((t=>{var r;return null===(r=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t))||void 0===r?void 0:r.image})):void 0;return this.resource(e,{type:t,value:p,format:r.format,src1x:r.src1x,src2x:r.src2x,src3x:r.src3x,src4x:r.src4x,caption:this.handleJsonText(e,l.TextLocation.tag,r.caption),width:null!==(o=r.width)&&void 0!==o?o:void 0,height:null!==(n=r.height)&&void 0!==n?n:void 0,alt:r.alt,zoomDisabled:r.zoomDisabled,duration:r.duration,mute:r.mute,autoplay:r.autoplay,allowSubtitles:r.allowSubtitles,showSubtitles:r.showSubtitles,posterImage:u,thumbnails:y,siteName:void 0,license:r.license,copyright:r.copyright,showInIndex:r.showInIndex,search:r.search})}resource(e,t){var r;let n;const{type:a,value:l,format:p}=t,c=i(t,["type","value","format"]),u=Object.assign({type:a,value:null!=l?l:o.Breakscape.EMPTY_STRING,format:null!=p?p:o.Breakscape.EMPTY_STRING},c);switch(a){case s.ResourceTag.video:case s.ResourceTag.videoEmbed:case s.ResourceTag.videoLink:case s.ResourceTag.stillImageFilmEmbed:case s.ResourceTag.stillImageFilmLink:{const i=["src1x","src2x","src3x","src4x"],o=[];for(const r of i){const i=t[r];if(i){const t=this.resource(e,{type:s.ResourceTag.image,value:i});t&&o.push(t.image)}}u.thumbnails=[...null!==(r=u.thumbnails)&&void 0!==r?r:[],...o]}}switch(a){case s.ResourceTag.image:case s.ResourceTag.imagePortrait:case s.ResourceTag.imageLandscape:case s.ResourceTag.backgroundWallpaper:case s.ResourceTag.imagePlaceholder:case s.ResourceTag.icon:n=this.imageResource(e,u,a);break;case s.ResourceTag.imageLink:n=this.imageLinkResource(e,u);break;case s.ResourceTag.audio:n=this.audioResource(e,u);break;case s.ResourceTag.audioEmbed:n=this.audioEmbedResource(e,u);break;case s.ResourceTag.audioLink:n=this.audioLinkResource(e,u);break;case s.ResourceTag.video:n=this.videoResource(e,u);break;case s.ResourceTag.videoEmbed:n=this.videoEmbedResource(e,u);break;case s.ResourceTag.videoLink:n=this.videoLinkResource(e,u);break;case s.ResourceTag.stillImageFilmEmbed:n=this.stillImageFilmEmbedResource(e,u);break;case s.ResourceTag.stillImageFilmLink:n=this.stillImageFilmLinkResource(e,u);break;case s.ResourceTag.article:n=this.articleResource(e,u);break;case s.ResourceTag.document:n=this.documentResource(e,u);break;case s.ResourceTag.documentEmbed:n=this.documentEmbedResource(e,u);break;case s.ResourceTag.documentLink:n=this.documentLinkResource(e,u);break;case s.ResourceTag.documentDownload:n=this.documentDownloadResource(e,u);break;case s.ResourceTag.appLink:n=this.appLinkResource(e,u);break;case s.ResourceTag.websiteLink:n=this.websiteLinkResource(e,u)}return n}imageResource(e,t,r){var i,o;const{value:c,src1x:y,src2x:d,src3x:T,src4x:f,width:m,height:h,alt:b,zoomDisabled:B,license:v,copyright:C,showInIndex:x,caption:P,search:k}=t,{bitType:_}=e;let K=!1;n.Config.isOfBitType(_,[a.BitType.imageSeparator,a.BitType.pageBanner,a.BitType.imagesLogoGrave,a.BitType.prototypeImages])&&(K=!0);const A={type:s.ResourceTag.image,__typeAlias:null!=r?r:s.ResourceTag.image,image:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(c))&&void 0!==i?i:void 0,provider:null!==(o=u.UrlUtils.domainFromUrl(c))&&void 0!==o?o:void 0,src:null!=c?c:"",src1x:null!=y?y:void 0,src2x:null!=d?d:void 0,src3x:null!=T?T:void 0,src4x:null!=f?f:void 0,width:null!=m?m:null,height:null!=h?h:null,alt:null!=b?b:"",zoomDisabled:null!=B?B:K,license:null!=v?v:"",copyright:null!=C?C:"",showInIndex:null!=x&&x,caption:this.handleJsonText(e,l.TextLocation.tag,P),search:null!=k?k:void 0}};return p.ObjectUtils.removeUnwantedProperties(A.image,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),g.NodeValidator.validateResource(A)}imageLinkResource(e,t){var r,i;const{value:o,src1x:n,src2x:a,src3x:c,src4x:y,width:d,height:T,alt:f,zoomDisabled:m,license:h,copyright:b,showInIndex:B,caption:v,search:C}=t,x={type:s.ResourceTag.imageLink,__typeAlias:s.ResourceTag.imageLink,imageLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",src1x:null!=n?n:void 0,src2x:null!=a?a:void 0,src3x:null!=c?c:void 0,src4x:null!=y?y:void 0,width:null!=d?d:null,height:null!=T?T:null,alt:null!=f?f:"",zoomDisabled:null!=m&&m,license:null!=h?h:"",copyright:null!=b?b:"",showInIndex:null!=B&&B,caption:this.handleJsonText(e,l.TextLocation.tag,v),search:null!=C?C:void 0}};return p.ObjectUtils.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),g.NodeValidator.validateResource(x)}audioResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audio,__typeAlias:s.ResourceTag.audio,audio:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioEmbedResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioEmbed,__typeAlias:s.ResourceTag.audioEmbed,audioEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioLinkResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioLink,__typeAlias:s.ResourceTag.audioLink,audioLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioLink,{ignoreEmptyString:["url"]}),g.NodeValidator.validateResource(h)}videoResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.video,__typeAlias:s.ResourceTag.video,video:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0,posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoEmbedResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoEmbed,__typeAlias:s.ResourceTag.videoEmbed,videoEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoLinkResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoLink,__typeAlias:s.ResourceTag.videoLink,videoLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmEmbedResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmEmbed,__typeAlias:s.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmLinkResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmLink,__typeAlias:s.ResourceTag.stillImageFilmLink,stillImageFilmLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}articleResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.article,__typeAlias:s.ResourceTag.article,article:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,body:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"]}),g.NodeValidator.validateResource(T)}documentResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.document,__typeAlias:s.ResourceTag.document,document:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentEmbedResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentEmbed,__typeAlias:s.ResourceTag.documentEmbed,documentEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentLinkResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentLink,__typeAlias:s.ResourceTag.documentLink,documentLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentDownloadResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentDownload,__typeAlias:s.ResourceTag.documentDownload,documentDownload:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}appLinkResource(e,t){const{value:r,license:i,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.appLink,__typeAlias:s.ResourceTag.appLink,appLink:{provider:void 0,url:null!=r?r:"",license:null!=i?i:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}websiteLinkResource(e,t){const{value:r,license:i,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.websiteLink,__typeAlias:s.ResourceTag.websiteLink,websiteLink:{provider:void 0,url:null!=r?r:"",license:null!=i?i:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}}t.ResourceBuilder=d},5554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(3778),c={[i.CardSetConfigKey._definitionList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._flashcard]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._feedback]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!1}],[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!0}]]},[i.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._pronunciationTable]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[i.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[i.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._bookReferenceList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}],repeatCount:p.Count.infinity}]]}};t.CARDS=c},5591:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const i=r(4718),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=(0,i.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const r of t)for(const t in r)e.add(t)}()},5633:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const i=r(5663),o=r(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new i.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:i.Environment.unknown,os:o.Os.unknown},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce(((e,t)=>(t&&e.push(t),e)),[]),r={keys:new Set,versions:{}};let i="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=t.keys.has("macintosh"),p=n,c=r,u=l;!s||n||a?p?(e.browser=i.Environment.chrome,e.browserVersion=t.versions.chrome):c&&(e.browser=i.Environment.firefox,e.browserVersion=t.versions.firefox):(e.browser=i.Environment.safari,e.browserVersion=t.versions.version);u&&(e.os=o.Os.macos,e.osVersion=t.versions.x);return e};const i=r(6278),o=r(9561)},5663:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const o=r(5809),n=r(2028),a=r(5854),s=r(6220),l=r(6149),p=r(385),c=r(9681),u=new o.Builder;t.JsonParser=class{toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,null==i?void 0:i.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return u.buildBitmark(i)}preprocessJson(e){const t=[];if(c.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const r=e=>{if(this.isBitWrapper(e)){const r=e;t.push(r)}else if(this.isBit(e)){const r=e;t.push(this.bitToBitWrapper(r))}};if(Array.isArray(e))for(const t of e)r(t);else r(e);return t}isBitWrapper(e){if(Object.prototype.hasOwnProperty.call(e,"bit")){const t=e;return this.isBit(t.bit)}return!1}isBit(e){if(Object.prototype.hasOwnProperty.call(e,"type")){const t=e;return n.Config.getBitType(t.type)!==a.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var r,o,l,c,y;const{statement:g,product:d,productVideo:T,reference:f}=e,m=i(e,["statement","product","productVideo","reference"]),h=e.type===a.BitType._comment&&void 0!==e.originalType,b=n.Config.getBitType(h?e.originalType:e.type),B=n.Config.getBitConfig(b),v=s.DeprecatedTextFormat.fromValue(e.format);let C=null!==(r=p.TextFormat.fromValue(e.format))&&void 0!==r?r:B.textFormatDefault;v===s.DeprecatedTextFormat.bitmarkMinusMinus&&(C=p.TextFormat.bitmarkText);return u.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),{bitType:b,bitLevel:Math.max(Math.min(null!==(o=e.bitLevel)&&void 0!==o?o:1,n.Config.bitLevelMax),n.Config.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:h,internalComment:t,productList:d,productVideoList:T}),this.processReference(f)),this.parseExample(e.example)),{person:null!==(l=e.partner)&&void 0!==l?l:e.person,markConfig:e.marks,resources:this.processResources(b,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(g,e.isCorrect,e.statements,e.example),responses:this.processResponses(b,e.responses),botResponses:this.processBotResponse(b,e.responses),cardBits:this.processListItems(null!==(y=null!==(c=e.listItems)&&void 0!==c?c:e.sections)&&void 0!==y?y:e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)}))}processStatements(e,t,r,i){const o=[];if(e){const r=Object.assign({statement:null!=e?e:"",isCorrect:null!=t&&t},this.parseExample(i));r&&o.push(r)}if(Array.isArray(r))for(const e of r)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const r=[];if(Array.isArray(e))for(const i of e){const e=Object.assign({},i);e.body&&(e.body={body:e.body,placeholders:t}),e&&r.push(e)}if(0!==r.length)return r}getResourceType(e){if(e){return l.ResourceTag.fromValue(e.type)}}processResources(e,t,r,i){const o=[];if(t&&o.push(t),n.Config.isOfBitType(e,[a.BitType.prototypeImages])&&Array.isArray(r))for(const e of r)e&&o.push(e);if(n.Config.isOfBitType(e,[a.BitType.imagesLogoGrave])&&Array.isArray(i))for(const e of i)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processReference(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}parseExample(e){if(null==e)return;if(!0===e)return{example:!0};if(!1===e)return{example:!1};const t=c.StringUtils.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}}},5809:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const o=i(r(7678)),n=r(7735),a=r(2028),s=r(9888),l=r(5854),p=r(4410),c=r(6220),u=r(6149),y=r(385),g=r(6877),d=r(6989),T=r(8903),f=r(4078),m=r(8025),h=r(955),b=r(9681),B=r(6936),v=r(4470),C=r(5533),x=r(4564);class P extends v.BaseBuilder{constructor(){super(...arguments),this.resourceBuilder=new C.ResourceBuilder}buildBitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return h.ObjectUtils.removeUnwantedProperties(i),i}buildBit(e){var t,r,i,o,n,T,f;const b=a.Config.getBitConfig(e.bitType),B=e.bitType,v=c.DeprecatedTextFormat.fromValue(e.textFormat);let C=null!==(t=y.TextFormat.fromValue(e.textFormat))&&void 0!==t?t:b.textFormatDefault;v===c.DeprecatedTextFormat.bitmarkMinusMinus&&(C=y.TextFormat.bitmarkText);const P={bitConfig:b,bitType:B,textFormat:C},k=this.buildCardNode(P,e),_=a.Config.isOfBitType(e.bitType,l.BitType.essay)?this.toAstProperty(s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars):void 0,K=Object.assign({},this.toExample(e.__isDefaultExample,e.example)),A=Object.assign(Object.assign({bitType:B,bitLevel:e.bitLevel,textFormat:C,resourceType:u.ResourceTag.fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(s.PropertyConfigKey.id,e.id),internalComment:this.toAstProperty(s.PropertyConfigKey.internalComment,e.internalComment),customerId:this.toAstProperty(s.PropertyConfigKey.customerId,e.customerId),customerExternalId:this.toAstProperty(s.PropertyConfigKey.customerExternalId,e.customerExternalId),externalId:this.toAstProperty(s.PropertyConfigKey.externalId,e.externalId),spaceId:this.toAstProperty(s.PropertyConfigKey.spaceId,e.spaceId),padletId:this.toAstProperty(s.PropertyConfigKey.padletId,e.padletId),jupyterId:this.toAstProperty(s.PropertyConfigKey.jupyterId,e.jupyterId),jupyterExecutionCount:this.toAstProperty(s.PropertyConfigKey.jupyterExecutionCount,e.jupyterExecutionCount),isPublic:this.toAstProperty(s.PropertyConfigKey.isPublic,e.isPublic),isTemplate:this.toAstProperty(s.PropertyConfigKey.isTemplate,e.isTemplate),isTemplateStripTheme:this.toAstProperty(s.PropertyConfigKey.isTemplateStripTheme,e.isTemplateStripTheme),aiGenerated:this.toAstProperty(s.PropertyConfigKey.aiGenerated,e.aiGenerated),machineTranslated:this.toAstProperty(s.PropertyConfigKey.machineTranslated,e.machineTranslated),searchIndex:this.toAstProperty(s.PropertyConfigKey.searchIndex,e.searchIndex),analyticsTag:this.toAstProperty(s.PropertyConfigKey.analyticsTag,e.analyticsTag),categoryTag:this.toAstProperty(s.PropertyConfigKey.categoryTag,e.categoryTag),topicTag:this.toAstProperty(s.PropertyConfigKey.topicTag,e.topicTag),altLangTag:this.toAstProperty(s.PropertyConfigKey.altLangTag,e.altLangTag),feedbackEngine:this.toAstProperty(s.PropertyConfigKey.feedbackEngine,e.feedbackEngine),feedbackType:this.toAstProperty(s.PropertyConfigKey.feedbackType,e.feedbackType),disableFeedback:this.toAstProperty(s.PropertyConfigKey.disableFeedback,e.disableFeedback),diffTo:this.toAstProperty(s.PropertyConfigKey.diffTo,e.diffTo),diffOp:this.toAstProperty(s.PropertyConfigKey.diffOp,e.diffOp),diffRef:this.toAstProperty(s.PropertyConfigKey.diffRef,e.diffRef),diffContext:this.toAstProperty(s.PropertyConfigKey.diffContext,e.diffContext),diffTime:this.toAstProperty(s.PropertyConfigKey.diffTime,e.diffTime),path:this.toAstProperty(s.PropertyConfigKey.path,e.path),releaseVersion:this.toAstProperty(s.PropertyConfigKey.releaseVersion,e.releaseVersion),releaseKind:this.toAstProperty(s.PropertyConfigKey.releaseKind,e.releaseKind),releaseDate:this.toAstProperty(s.PropertyConfigKey.releaseDate,e.releaseDate),book:this.buildBooks(P,e.book),ageRange:this.toAstProperty(s.PropertyConfigKey.ageRange,e.ageRange),lang:this.toAstProperty(s.PropertyConfigKey.lang,e.lang),language:this.toAstProperty(s.PropertyConfigKey.language,e.language),publisher:this.toAstProperty(s.PropertyConfigKey.publisher,e.publisher),publisherName:this.toAstProperty(s.PropertyConfigKey.publisherName,e.publisherName),theme:this.toAstProperty(s.PropertyConfigKey.theme,e.theme),computerLanguage:this.toAstProperty(s.PropertyConfigKey.computerLanguage,e.computerLanguage),target:this.toAstProperty(s.PropertyConfigKey.target,e.target),slug:this.toAstProperty(s.PropertyConfigKey.slug,e.slug),tag:this.toAstProperty(s.PropertyConfigKey.tag,e.tag),reductionTag:this.toAstProperty(s.PropertyConfigKey.reductionTag,e.reductionTag),bubbleTag:this.toAstProperty(s.PropertyConfigKey.bubbleTag,e.bubbleTag),levelCEFRp:this.toAstProperty(s.PropertyConfigKey.levelCEFRp,e.levelCEFRp),levelCEFR:this.toAstProperty(s.PropertyConfigKey.levelCEFR,e.levelCEFR),levelILR:this.toAstProperty(s.PropertyConfigKey.levelILR,e.levelILR),levelACTFL:this.toAstProperty(s.PropertyConfigKey.levelACTFL,e.levelACTFL),icon:this.toAstProperty(s.PropertyConfigKey.icon,e.icon),iconTag:this.toAstProperty(s.PropertyConfigKey.iconTag,e.iconTag),colorTag:this.toAstProperty(s.PropertyConfigKey.colorTag,e.colorTag),flashcardSet:this.toAstProperty(s.PropertyConfigKey.flashcardSet,e.flashcardSet),subtype:this.toAstProperty(s.PropertyConfigKey.subtype,e.subtype),bookAlias:this.toAstProperty(s.PropertyConfigKey.bookAlias,e.bookAlias),bookDiff:this.toAstProperty(s.PropertyConfigKey.bookDiff,e.bookDiff),coverImage:this.toAstProperty(s.PropertyConfigKey.coverImage,e.coverImage),coverColor:this.toAstProperty(s.PropertyConfigKey.coverColor,e.coverColor),publications:this.toAstProperty(s.PropertyConfigKey.publications,e.publications),author:this.toAstProperty(s.PropertyConfigKey.author,e.author),subject:this.toAstProperty(s.PropertyConfigKey.subject,e.subject),date:this.toAstProperty(s.PropertyConfigKey.date,e.date),dateEnd:this.toAstProperty(s.PropertyConfigKey.dateEnd,e.dateEnd),location:this.toAstProperty(s.PropertyConfigKey.location,e.location),kind:this.toAstProperty(s.PropertyConfigKey.kind,e.kind),hasMarkAsDone:this.toAstProperty(s.PropertyConfigKey.hasMarkAsDone,e.hasMarkAsDone),processHandIn:this.toAstProperty(s.PropertyConfigKey.processHandIn,e.processHandIn),processHandInLocation:this.toAstProperty(s.PropertyConfigKey.processHandInLocation,e.processHandInLocation),chatWithBook:this.toAstProperty(s.PropertyConfigKey.chatWithBook,e.chatWithBook),chatWithBookBrainKey:this.toAstProperty(s.PropertyConfigKey.chatWithBookBrainKey,e.chatWithBookBrainKey),action:this.toAstProperty(s.PropertyConfigKey.action,e.action),showInIndex:this.toAstProperty(s.PropertyConfigKey.showInIndex,e.showInIndex),refAuthor:this.toAstProperty(s.PropertyConfigKey.refAuthor,e.refAuthor),refBookTitle:this.toAstProperty(s.PropertyConfigKey.refBookTitle,e.refBookTitle),refPublisher:this.toAstProperty(s.PropertyConfigKey.refPublisher,e.refPublisher),refPublicationYear:this.toAstProperty(s.PropertyConfigKey.refPublicationYear,e.refPublicationYear),citationStyle:this.toAstProperty(s.PropertyConfigKey.citationStyle,e.citationStyle),blockId:this.toAstProperty(s.PropertyConfigKey.blockId,e.blockId),pageNo:this.toAstProperty(s.PropertyConfigKey.pageNo,e.pageNo),x:this.toAstProperty(s.PropertyConfigKey.x,e.x),y:this.toAstProperty(s.PropertyConfigKey.y,e.y),width:this.toAstProperty(s.PropertyConfigKey.width,e.width),height:this.toAstProperty(s.PropertyConfigKey.height,e.height),index:this.toAstProperty(s.PropertyConfigKey.index,e.index),classification:this.toAstProperty(s.PropertyConfigKey.classification,e.classification),availableClassifications:this.toAstProperty(s.PropertyConfigKey.availableClassifications,e.availableClassifications),allowedBit:this.toAstProperty(s.PropertyConfigKey.allowedBit,e.allowedBit),tableFixedHeader:this.toAstProperty(s.PropertyConfigKey.tableFixedHeader,e.tableFixedHeader),tableHeaderWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableHeaderWhitespaceNoWrap,e.tableHeaderWhitespaceNoWrap),tableSearch:this.toAstProperty(s.PropertyConfigKey.tableSearch,e.tableSearch),tableSort:this.toAstProperty(s.PropertyConfigKey.tableSort,e.tableSort),tablePagination:this.toAstProperty(s.PropertyConfigKey.tablePagination,e.tablePagination),tablePaginationLimit:this.toAstProperty(s.PropertyConfigKey.tablePaginationLimit,e.tablePaginationLimit),tableHeight:this.toAstProperty(s.PropertyConfigKey.tableHeight,e.tableHeight),tableWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableWhitespaceNoWrap,e.tableWhitespaceNoWrap),tableAutoWidth:this.toAstProperty(s.PropertyConfigKey.tableAutoWidth,e.tableAutoWidth),tableResizableColumns:this.toAstProperty(s.PropertyConfigKey.tableResizableColumns,e.tableResizableColumns),tableColumnMinWidth:this.toAstProperty(s.PropertyConfigKey.tableColumnMinWidth,e.tableColumnMinWidth),quizCountItems:this.toAstProperty(s.PropertyConfigKey.quizCountItems,e.quizCountItems),quizStrikethroughSolutions:this.toAstProperty(s.PropertyConfigKey.quizStrikethroughSolutions,e.quizStrikethroughSolutions),codeLineNumbers:this.toAstProperty(s.PropertyConfigKey.codeLineNumbers,e.codeLineNumbers),codeMinimap:this.toAstProperty(s.PropertyConfigKey.codeMinimap,e.codeMinimap),stripePricingTableId:this.toAstProperty(s.PropertyConfigKey.stripePricingTableId,e.stripePricingTableId),stripePublishableKey:this.toAstProperty(s.PropertyConfigKey.stripePublishableKey,e.stripePublishableKey),thumbImage:this.toAstProperty(s.PropertyConfigKey.thumbImage,e.thumbImage),scormSource:this.toAstProperty(s.PropertyConfigKey.scormSource,e.scormSource),posterImage:this.toAstProperty(s.PropertyConfigKey.posterImage,e.posterImage),focusX:this.toAstProperty(s.PropertyConfigKey.focusX,e.focusX),focusY:this.toAstProperty(s.PropertyConfigKey.focusY,e.focusY),pointerLeft:this.toAstProperty(s.PropertyConfigKey.pointerLeft,e.pointerLeft),pointerTop:this.toAstProperty(s.PropertyConfigKey.pointerTop,e.pointerTop),listItemIndent:this.toAstProperty(s.PropertyConfigKey.listItemIndent,e.listItemIndent),backgroundWallpaper:this.toImageResource(P,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(s.PropertyConfigKey.hasBookNavigation,e.hasBookNavigation),duration:this.toAstProperty(s.PropertyConfigKey.duration,e.duration),deeplink:this.toAstProperty(s.PropertyConfigKey.deeplink,e.deeplink),externalLink:this.toAstProperty(s.PropertyConfigKey.externalLink,e.externalLink),externalLinkText:this.toAstProperty(s.PropertyConfigKey.externalLinkText,e.externalLinkText),videoCallLink:this.toAstProperty(s.PropertyConfigKey.videoCallLink,e.videoCallLink),vendorDashboardId:this.toAstProperty(s.PropertyConfigKey.vendorDashboardId,e.vendorDashboardId),vendorSurveyId:this.toAstProperty(s.PropertyConfigKey.vendorSurveyId,e.vendorSurveyId),vendorUrl:this.toAstProperty(s.PropertyConfigKey.vendorUrl,e.vendorUrl),search:this.toAstProperty(s.PropertyConfigKey.search,e.search),list:this.toAstProperty(s.PropertyConfigKey.list,e.list),layer:this.toAstProperty(s.PropertyConfigKey.layer,e.layer),layerRole:this.toAstProperty(s.PropertyConfigKey.layerRole,e.layerRole),textReference:this.toAstProperty(s.PropertyConfigKey.textReference,e.textReference),isTracked:this.toAstProperty(s.PropertyConfigKey.isTracked,e.isTracked),isInfoOnly:this.toAstProperty(s.PropertyConfigKey.isInfoOnly,e.isInfoOnly),imageFirst:this.toAstProperty(s.PropertyConfigKey.imageFirst,e.imageFirst),activityType:this.toAstProperty(s.PropertyConfigKey.activityType,e.activityType),labelTrue:this.toAstProperty(s.PropertyConfigKey.labelTrue,e.labelTrue),labelFalse:this.toAstProperty(s.PropertyConfigKey.labelFalse,e.labelFalse),content2Buy:this.toAstProperty(s.PropertyConfigKey.content2Buy,e.content2Buy),mailingList:this.toAstProperty(s.PropertyConfigKey.mailingList,e.mailingList),buttonCaption:this.toAstProperty(s.PropertyConfigKey.buttonCaption,e.buttonCaption),callToActionUrl:this.toAstProperty(s.PropertyConfigKey.callToActionUrl,e.callToActionUrl),caption:this.handleJsonText(P,g.TextLocation.tag,e.caption),quotedPerson:this.toAstProperty(s.PropertyConfigKey.quotedPerson,e.quotedPerson),reasonableNumOfChars:_,resolved:this.toAstProperty(s.PropertyConfigKey.resolved,e.resolved),resolvedDate:this.toAstProperty(s.PropertyConfigKey.resolvedDate,e.resolvedDate),resolvedBy:this.toAstProperty(s.PropertyConfigKey.resolvedBy,e.resolvedBy),handInAcceptFileType:this.toAstProperty(s.PropertyConfigKey.handInAcceptFileType,e.handInAcceptFileType),handInRequirement:this.toAstProperty(s.PropertyConfigKey.handInRequirement,e.handInRequirement),handInInstruction:this.toAstProperty(s.PropertyConfigKey.handInInstruction,e.handInInstruction),maxCreatedBits:this.toAstProperty(s.PropertyConfigKey.maxCreatedBits,e.maxCreatedBits),maxDisplayLevel:this.toAstProperty(s.PropertyConfigKey.maxDisplayLevel,e.maxDisplayLevel),maxTocChapterLevel:this.toAstProperty(s.PropertyConfigKey.maxTocChapterLevel,e.maxTocChapterLevel),tocResource:this.toAstProperty(s.PropertyConfigKey.tocResource,e.tocResource),tocContent:this.toAstProperty(s.PropertyConfigKey.tocContent,e.tocContent),page:this.toAstProperty(s.PropertyConfigKey.page,e.page),productId:this.toAstProperty(s.PropertyConfigKey.productId,e.productId),product:this.toAstProperty(s.PropertyConfigKey.product,e.product),productList:this.toAstProperty(s.PropertyConfigKey.productList,e.productList),productVideo:this.toAstProperty(s.PropertyConfigKey.productVideo,e.productVideo),productVideoList:this.toAstProperty(s.PropertyConfigKey.productVideoList,e.productVideoList),productFolder:this.toAstProperty(s.PropertyConfigKey.productFolder,e.productFolder),technicalTerm:this.buildTechnicalTerm(P,e.technicalTerm),servings:this.buildServings(P,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(P,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(P,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(s.PropertyConfigKey.ratingLevelSelected,e.ratingLevelSelected),markConfig:this.buildMarkConfigs(P,e.markConfig),imageSource:this.buildImageSource(P,e.imageSource),person:this.buildPerson(P,e.person),bot:this.toAstProperty(s.PropertyConfigKey.bot,e.bot),referenceProperty:this.toAstProperty(s.PropertyConfigKey.property_reference,e.referenceProperty),title:this.handleJsonText(P,g.TextLocation.tag,e.title),subtitle:this.handleJsonText(P,g.TextLocation.tag,e.subtitle),level:m.NumberUtils.asNumber(e.level),toc:this.toAstProperty(s.PropertyConfigKey.toc,e.toc),progress:this.toAstProperty(s.PropertyConfigKey.progress,e.progress),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(s.PropertyConfigKey.revealSolutions,e.revealSolutions),item:this.handleJsonText(P,g.TextLocation.tag,e.item),lead:this.handleJsonText(P,g.TextLocation.tag,e.lead),pageNumber:this.handleJsonText(P,g.TextLocation.tag,e.pageNumber),marginNumber:this.handleJsonText(P,g.TextLocation.tag,e.marginNumber),hint:this.handleJsonText(P,g.TextLocation.tag,e.hint),instruction:this.handleJsonText(P,g.TextLocation.tag,e.instruction),partialAnswer:this.toAstProperty(s.PropertyConfigKey.partialAnswer,e.partialAnswer),sampleSolution:this.toAstProperty(s.PropertyConfigKey.property_sampleSolution,e.sampleSolution),additionalSolutions:this.toAstProperty(s.PropertyConfigKey.additionalSolutions,e.additionalSolutions)},this.toExample(e.__isDefaultExample,e.example)),{imagePlaceholder:this.toImageResource(P,e.imagePlaceholder),resources:d.ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(P,e.resources)),body:this.buildBody(P,e.body),cardNode:k,footer:this.buildFooter(P,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:null!==(r=e.__isDefaultExample)&&void 0!==r&&r});return a.Config.isOfBitType(A.bitType,l.BitType.interview)&&this.pushDownTree(P,void 0,void 0,k,"questions",s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),a.Config.isOfBitType(A.bitType,l.BitType.feedback)&&this.pushDownTree(P,void 0,void 0,k,["feedbacks","reason"],s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),this.pushDownTree(P,[A.body,...null!==(o=null===(i=null==k?void 0:k.cardBits)||void 0===i?void 0:i.map((e=>e.body)))&&void 0!==o?o:[]],[p.BodyBitType.gap],void 0,void 0,s.PropertyConfigKey.isCaseSensitive,null===(n=e.isCaseSensitive)||void 0===n||n),this.pushDownTree(P,void 0,void 0,k,"pairs",s.PropertyConfigKey.isCaseSensitive,null===(T=e.isCaseSensitive)||void 0===T||T),this.pushDownTree(P,void 0,void 0,k,["matrix","cells"],s.PropertyConfigKey.isCaseSensitive,null===(f=e.isCaseSensitive)||void 0===f||f),this.pushExampleDownTree(P,A.body,k,A.__isDefaultExample,K.example),this.setDefaultBitValues(A),this.setIsExampleFlags(A),this.addVersionToParserInfo(A),h.ObjectUtils.removeUnwantedProperties(A,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),x.NodeValidator.validateBit(A)}buildBooks(e,t){if(b.StringUtils.isString(t))return t;if(!Array.isArray(t))return;const r=t.map((t=>this.buildBook(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildBook(e,t){var r,i,o;if(!t)return;const n={book:null!==(r=t.book)&&void 0!==r?r:"",reference:null!==(i=t.reference)&&void 0!==i?i:"",referenceEnd:null!==(o=t.referenceEnd)&&void 0!==o?o:void 0};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),n}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFeedbackChoice(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFeedbackChoice(e,t){var r;if(!t)return;const i=Object.assign({choice:null!==(r=t.choice)&&void 0!==r?r:"",requireReason:!!t.requireReason,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildFeedbackReason(e,t){var r,i;if(!t)return;const o=this.handleJsonText(e,g.TextLocation.tag,"true"),n=Object.assign(Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",reasonableNumOfChars:null!==(i=t.reasonableNumOfChars)&&void 0!==i?i:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,o)),{__textAst:t.__textAst});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),n}buildChoices(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildChoice(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildChoice(e,t){var r;if(!t)return;const i=Object.assign({choice:null!==(r=t.choice)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildResponses(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildResponse(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildResponse(e,t){var r;if(!t)return;const i=Object.assign({response:null!==(r=t.response)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildBotResponses(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.botResponse(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}botResponse(e,t){var r,i,o;if(!t)return;const n={response:null!==(r=t.response)&&void 0!==r?r:"",reaction:null!==(i=t.reaction)&&void 0!==i?i:"",feedback:null!==(o=t.feedback)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["response","reaction","feedback"],ignoreAllFalse:!0,ignoreEmptyArrays:["item"],ignoreUndefined:["example"]}),n}buildFeedbacks(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFeedback(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFeedback(e,t){if(!t)return;let r,i;if(!t.choices)return;r=this.buildFeedbackChoices(e,t.choices),t.reason&&(i=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),choices:r,reason:i};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildQuiz(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildQuiz(e,t){if(!t)return;const r=Object.assign({},this.toExample(t.__isDefaultExample,t.__defaultExample));let i,o;if(t.choices)i=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!0,i);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!1,o)}const n={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:!!t.__defaultExample,choices:i,responses:o};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),n}buildHeading(e,t){var r,i,o;if(!t)return;if(null==t.forKeys)return;const n={forKeys:null!==(r=t.forKeys)&&void 0!==r?r:"",forValues:null!==(o=null!==(i=t.forValues)&&void 0!==i?i:t.__forValuesDefault)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),n}buildPairs(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildPair(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildPair(e,t){var r,i;if(!t)return;const o=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,n=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),a=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),s=Object.assign(Object.assign({key:null!==(r=t.key)&&void 0!==r?r:"",keyAudio:n,keyImage:a,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,o)),{values:null!==(i=t.values)&&void 0!==i?i:[],__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(s,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),s}buildMatricies(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildMatrix(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildMatrix(e,t){var r,i,o;if(!t)return;let n=!1;for(const e of null!==(r=t.cells)&&void 0!==r?r:[])t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),n=!!e.isExample||n;const a={key:null!==(i=t.key)&&void 0!==i?i:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:n,cells:(null!==(o=t.cells)&&void 0!==o?o:[]).map((t=>this.buildMatrixCell(e,t))).filter((e=>null!=e))};return h.ObjectUtils.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),a}buildMatrixCell(e,t){var r;if(!t)return;const i=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,o=Object.assign(Object.assign({values:null!==(r=t.values)&&void 0!==r?r:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,i)),{__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),o}buildPronunciationTable(e,t){var r;if(!t)return;return{data:(null!==(r=t.data)&&void 0!==r?r:[]).map((t=>(null!=t?t:[]).map((t=>{const r=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,g.TextLocation.tag,t.title),body:this.handleJsonText(e,g.TextLocation.tag,t.body),audio:r}}))))}}buildTable(e,t){var r,i;if(!t)return;return{columns:(null!==(r=t.columns)&&void 0!==r?r:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t))),data:(null!==(i=t.data)&&void 0!==i?i:[]).map((t=>(null!=t?t:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t)))))}}buildQuestions(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildQuestion(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildQuestion(e,t){var r,i,o,n,a;if(!t)return;const s=t.__sampleSolutionAst,l=Object.assign(Object.assign({question:null!==(r=t.question)&&void 0!==r?r:"",partialAnswer:null!==(i=t.partialAnswer)&&void 0!==i?i:"",sampleSolution:null!==(o=t.sampleSolution)&&void 0!==o?o:"",additionalSolutions:null!==(n=t.additionalSolutions)&&void 0!==n?n:void 0,reasonableNumOfChars:null!==(a=t.reasonableNumOfChars)&&void 0!==a?a:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,s)),{__sampleSolutionAst:t.__sampleSolutionAst});return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["question","partialAnswer","sampleSolution"]}),l}buildIngredients(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildIngredient(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildIngredient(e,t){var r,i,o,n,a,s;if(!t)return;const l={title:this.handleJsonText(e,g.TextLocation.tag,t.title),checked:null!==(r=t.checked)&&void 0!==r&&r,ingredient:this.handleJsonText(e,g.TextLocation.tag,t.ingredient),quantity:null!==(i=t.quantity)&&void 0!==i?i:0,unit:null!==(o=t.unit)&&void 0!==o?o:"",unitAbbr:null!==(n=t.unitAbbr)&&void 0!==n?n:"",decimalPlaces:null!==(a=t.decimalPlaces)&&void 0!==a?a:1,disableCalculation:null!==(s=t.disableCalculation)&&void 0!==s&&s,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),l}buildBody(e,t){if(!t)return;let r;const i=[],a=t.placeholders,s=t.bodyString,{textFormat:l}=e,c=()=>{var s;let c,u=t.body;const y={};if(b.StringUtils.isString(t.body)?(c=(null!==(s=t.body)&&void 0!==s?s:"").trim(),u=[]):Array.isArray(t.body)||(u=[]),a)for(const[e,t]of Object.entries(a))y[e]=t;if(c){c=n.Breakscape.breakscape(c,{format:l,location:g.TextLocation.body,v2:!0});let e=0;const t=[];for(const[r,i]of Object.entries(y))if(c){const o=`[!${e}]`;c=c.replace(`${r}`,o),t.push(i),e++}u=this.textParser.toAst(c,{format:l,location:g.TextLocation.body});const r=e=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if("bit"===o.type){const r=o.index;null!=t[r]&&(e[i]=t[r])}else o.content&&r(o.content)}};r(u)}u=(0,o.default)(u),this.textParser.walkBodyBits(u,((t,r,o)=>{let n;switch(o.type){case p.BodyBitType.gap:n=this.buildGap(e,o);break;case p.BodyBitType.mark:n=this.buildMark(e,o);break;case p.BodyBitType.select:n=this.buildSelect(e,o);break;case p.BodyBitType.highlight:n=this.buildHighlight(e,o)}null!=n&&(t[r]=n,i.push(n))})),r=u,r.__tag="text"},u=l===y.TextFormat.bitmarkText;l===y.TextFormat.json?(()=>{if("string"==typeof t.body)try{r=JSON.parse(t.body)}catch(e){r=null}else r=t.body})():u?c():r=t.body;return{body:r,bodyBits:i,bodyString:s}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,g.TextLocation.body,t.footer)}}buildGap(e,t){var r;if(!t)return;const i=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.gap,solutions:null!==(r=t.solutions)&&void 0!==r?r:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,i)),{__solutionsAst:t.__solutionsAst,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),o}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildMarkConfig(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildMarkConfig(e,t){var r,i,o;if(!t)return;const n={mark:null!==(r=t.mark)&&void 0!==r?r:"unknown",color:null!==(i=t.color)&&void 0!==i?i:"",emphasis:null!==(o=t.emphasis)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllEmptyString:!0}),n}buildMark(e,t){var r,i;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.mark,solution:null!==(r=t.solution)&&void 0!==r?r:"",mark:null!==(i=t.mark)&&void 0!==i?i:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),o}buildSelect(e,t){var r,i,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.select,options:null!==(r=this.buildSelectOptions(e,t.options))&&void 0!==r?r:[],prefix:null!==(i=t.prefix)&&void 0!==i?i:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildSelectOptions(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildSelectOption(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildSelectOption(e,t){var r;if(!t)return;const i=Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),i}buildHighlight(e,t){var r,i,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.highlight,texts:null!==(r=this.buildHighlightTexts(e,t.texts))&&void 0!==r?r:[],prefix:null!==(i=t.prefix)&&void 0!==i?i:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildHighlightText(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildHighlightText(e,t){var r;if(!t)return;const i=Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),i}buildFlashcards(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFlashcard(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFlashcard(e,t){var r;if(!t)return;const i=Object.assign({question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(null!==(r=t.alternativeAnswers)&&void 0!==r?r:[]).map((t=>this.buildTextAndIcon(e,t))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),i}buildDefinitionList(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildDefinitionListItem(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildDefinitionListItem(e,t){var r;if(!t)return;const{bitType:i}=e,o=a.Config.isOfBitType(i,[l.BitType.metaSearchDefaultTerms]),n=Object.assign({term:this.buildTextAndIcon(e,t.term,o),definition:this.buildTextAndIcon(e,t.definition,o),alternativeDefinitions:(null!==(r=t.alternativeDefinitions)&&void 0!==r?r:[]).map((t=>this.buildTextAndIcon(e,t,o))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),n}buildTextAndIcon(e,t,r=!1){const i=this.resourceBuilder.resourceFromResourceJson(e,null==t?void 0:t.icon);let o=this.handleJsonText(e,g.TextLocation.tag,null==t?void 0:t.text);r&&(o=this.textGenerator.generateSync(o,y.TextFormat.plainText,g.TextLocation.body,{noBreakscaping:!0}).trim());const n={text:o,icon:i};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),n}buildStatements(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildStatement(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildStatement(e,t){var r;if(!t)return;const i=Object.assign({statement:null!==(r=t.statement)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),i}buildImageSource(e,t){if(!t)return;const{url:r,mockupId:i,size:o,format:n,trim:a}=t,s={url:null!=r?r:"",mockupId:null!=i?i:"",size:null!=o?o:null,format:null!=n?n:null,trim:f.BooleanUtils.isBoolean(a)?a:null};return h.ObjectUtils.removeUnwantedProperties(s,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),s}buildPerson(e,t){if(!t)return;const{name:r,title:i,avatarImage:o}=t,n={name:null!=r?r:"",title:null!=i?i:void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),n}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:r,lang:i}=t,o={technicalTerm:null!=r?r:"",lang:null!=i?i:""};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:r,unit:i,unitAbbr:o,decimalPlaces:n,disableCalculation:a,hint:s}=t,l={servings:null!=r?r:0,unit:null!=i?i:"",unitAbbr:null!=o?o:"",decimalPlaces:null!=n?n:1,disableCalculation:null!=a&&a,hint:null!=s?s:""};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreEmptyString:["servings","unit"]}),l}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:r,label:i}=t,o={level:null!=r?r:0,label:this.handleJsonText(e,g.TextLocation.tag,i)};return h.ObjectUtils.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildCardBit(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildCardBit(e,t){if(!t)return;const{bitType:r,textFormat:i}=e,o=this.buildBit(Object.assign(Object.assign({},t),{bitType:r,textFormat:i}));return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),x.NodeValidator.validateCardBit(o)}toImageResource(e,t){return d.ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,u.ResourceTag.image,null==t?void 0:t.image))}buildCardNode(e,t){var r;const i={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:t.elements,flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,null!==(r=t.definitions)&&void 0!==r?r:t.legend),statement:this.buildStatement(e,t.statement),statements:this.buildStatements(e,t.statements),choices:this.buildChoices(e,t.choices),responses:this.buildResponses(e,t.responses),feedbacks:this.buildFeedbacks(e,t.feedbacks),quizzes:this.buildQuizzes(e,t.quizzes),pairs:this.buildPairs(e,t.pairs),matrix:this.buildMatricies(e,t.matrix),pronunciationTable:this.buildPronunciationTable(e,t.pronunciationTable),table:this.buildTable(e,t.table),botResponses:this.buildBotResponses(e,t.botResponses),ingredients:this.buildIngredients(e,t.ingredients),cardBits:this.buildCardBits(e,t.cardBits)};return h.ObjectUtils.removeUnwantedProperties(i),Object.keys(i).length>0?i:void 0}bodyBitCopyFromAttrs(e){const t=Object.assign({},e);if(e.attrs)for(const[r,i]of Object.entries(e.attrs))t[r]=i;return t}pushExampleDownTree(e,t,r,i,o){if(i||null!=o){if(r){if(this.pushExampleDownTreeString(e,i,o,r.pairs),this.pushExampleDownTreeBoolean(e,i,o,!1,r.flashcards),this.pushExampleDownTreeBoolean(e,i,o,!1,r.definitions),this.pushExampleDownTreeBoolean(e,i,o,!0,r.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,r.responses,r.statements,r.statement),r.quizzes)for(const t of r.quizzes)this.pushExampleDownTreeBoolean(e,i,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,t.responses);if(r.matrix)for(const t of r.matrix)this.pushExampleDownTreeString(e,i,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,i,o,t)}}pushExampleDownTreeBoolean(e,t,r,i,...o){if((t||null!=r)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];T.BitUtils.fillBooleanExample(o,t,r,i)}}pushExampleDownTreeString(e,t,r,...i){if((t||r)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];T.BitUtils.fillStringExample(e.textFormat,i,t,r,!1)}}pushExampleDownTreeBodyBits(e,t,r,i){if(!t&&!r)return;const o=this.textParser.extractBodyBits(null==i?void 0:i.body);for(const i of o)if(i)switch(i.type){case p.BodyBitType.gap:{const o=i;T.BitUtils.fillStringExample(e.textFormat,[o],t,r,!1);break}case p.BodyBitType.mark:{const e=i;T.BitUtils.fillBooleanExample([e],t,r,!1);break}case p.BodyBitType.select:{const e=i;T.BitUtils.fillBooleanExample(e.options,t,r,!0);break}case p.BodyBitType.highlight:{const e=i;T.BitUtils.fillBooleanExample(e.texts,t,r,!0);break}}}pushDownTree(e,t,r,i,o,n,a){if(void 0!==a){if(i&&o){Array.isArray(o)||(o=[o]);const e=h.ObjectUtils.flatMapPath(i,o);for(const t of e)null==t[n]&&(t[n]=a)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&r){const e=this.textParser.extractBodyBits(t.body);if(r&&e&&e.length>0)for(const t of e)if(t&&-1!==r.indexOf(t.type)){const e=t;null==e[n]&&(e[n]=a)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const r={};for(const[e,i]of t)r[e]=d.ArrayUtils.asArray(i)||[i];return r}setIsExampleFlags(e){var t,r,i,o,n,a,s,l,c,u,y,g,d,T;const f=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:m,cardNode:h}=e,b=this.textParser.extractBodyBits(null==m?void 0:m.body);for(const e of b)switch(e.type){case p.BodyBitType.gap:case p.BodyBitType.mark:f(e);break;case p.BodyBitType.select:{const t=e;let r=!1;for(const e of t.options)r=!!f(e)||r;t.isExample=r;break}case p.BodyBitType.highlight:{const t=e;let r=!1;for(const e of t.texts)r=!!f(e)||r;t.isExample=r;break}}if(h){for(const e of null!==(t=h.flashcards)&&void 0!==t?t:[])f(e);for(const e of null!==(r=h.definitions)&&void 0!==r?r:[])f(e);for(const e of null!==(i=h.pairs)&&void 0!==i?i:[])f(e);for(const e of null!==(o=h.matrix)&&void 0!==o?o:[]){let t=!1;for(const r of null!==(n=e.cells)&&void 0!==n?n:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(a=h.quizzes)&&void 0!==a?a:[]){let t=!1;for(const r of null!==(s=e.responses)&&void 0!==s?s:[])t=!!f(r)||t;for(const r of null!==(l=e.choices)&&void 0!==l?l:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(c=h.responses)&&void 0!==c?c:[])f(e);for(const e of null!==(u=h.choices)&&void 0!==u?u:[])f(e);for(const e of null!==(y=h.statements)&&void 0!==y?y:[])f(e);f(h.statement);for(const e of null!==(g=h.questions)&&void 0!==g?g:[])f(e)}f(e.statement);for(const t of null!==(d=e.responses)&&void 0!==d?d:[])f(t);for(const t of null!==(T=e.choices)&&void 0!==T?T:[])f(t);f(e)}setDefaultBitValues(e){switch(e.bitType){case l.BitType.articleAi:case l.BitType.noteAi:case l.BitType.summaryAi:e.aiGenerated=this.toAstProperty(s.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const r=null!==(t=e.parser)&&void 0!==t?t:{};r.version=B.env.appVersion.full,e.parser=r}}t.Builder=P},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let r="",i=0,o=0;for(const e of this.variants){for(const n of e)r+=`[Card - Side ${i}, Variant ${o}]`,r+=`\n${n.toString(t)}`,o++;i++}return r}}},5837:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const i=r(7112),o=r(6915),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(3778),c=r(6149),u={[i.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplateStripTheme},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.machineTranslated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.searchIndex,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.analyticsTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.categoryTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.topicTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.altLangTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackEngine},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackType},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableFeedback},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffOp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffRef},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffContext},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTime},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reductionTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bubbleTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFRp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelILR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelACTFL},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layer,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layerRole,maxCount:p.Count.infinity}]},[i.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[i.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[i.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},[i.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[i.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[i.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]}]},[i.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[i.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[i.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerExternalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandIn},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandInLocation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplateStripTheme},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBook},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBookBrainKey},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[i.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.dateEnd},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[i.GroupConfigKey.group_quizCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.revealSolutions}]},[i.GroupConfigKey.group_resourceBitTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePlaceholder,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}],maxCount:1}]},[i.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[i.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[i.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[i.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[i.GroupConfigKey.group_resourceIcon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.icon,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[i.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=u},5854:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const i=(0,r(4718).superenum)({_error:"_error",_comment:"_comment",_standard:"_standard",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCodeCell:"app-code-cell",appCodeEditor:"app-code-editor",appCodeIde:"app-code-ide",appCreateBitsFromImage:"app-create-bits-from-image",appFlashcards:"app-flashcards",appFlashcardsLearn:"app-flashcards-learn",appFlashcardsQuiz:"app-flashcards-quiz",appGetScreenshot:"app-get-screenshot",appLink:"app-link",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",articleResponsive:"article-responsive",articleResponsiveAlt:"article-responsive-alt",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgements:"book-acknowledgements",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookClose:"book-close",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookCover:"book-cover",bookDedication:"book-dedication",bookDiff:"book-diff",bookEnd:"book-end",bookEndnotes:"book-endnotes",bookEpigraph:"book-epigraph",bookEpilogue:"book-epilogue",bookForword:"book-foreword",bookFrontispiece:"book-frontispiece",bookImprint:"book-imprint",bookIncitingIncident:"book-inciting-incident",bookIntroduction:"book-introduction",bookLink:"book-link",bookLinkNext:"book-link-next",bookLinkPrev:"book-link-prev",bookListOfContributors:"book-list-of-contributors",bookNotes:"book-notes",bookPostscript:"book-postscript",bookPreface:"book-preface",bookPrologue:"book-prologue",bookReadMore:"book-read-more",bookReference:"book-reference",bookReferenceList:"book-reference-list",bookRequestForABookReview:"book-request-for-a-book-review",bookSummary:"book-summary",bookTeaser:"book-teaser",bookTitle:"book-title",botActionAnnounce:"bot-action-announce",botActionRatingNumber:"bot-action-rating-number",botActionRemind:"bot-action-remind",botActionResponse:"bot-action-response",botActionSave:"bot-action-save",botActionSend:"bot-action-send",botActionTrueFalse:"bot-action-true-false",botInterview:"bot-interview",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",callToAction:"call-to-action",callToActionBookNow:"call-to-action-book-now",callToActionContact:"call-to-action-contact",callToActionCreateAccount:"call-to-action-create-account",callToActionDownload:"call-to-action-download",callToActionGetNow:"call-to-action-get-now",callToActionGetOffer:"call-to-action-get-offer",callToActionJoin:"call-to-action-join",callToActionLearnMore:"call-to-action-learn-more",callToActionMail:"call-to-action-mail",callToActionSeeMore:"call-to-action-see-more",callToActionShopNow:"call-to-action-shop-now",callToActionStartNow:"call-to-action-start-now",callToActionSubscribe:"call-to-action-subscribe",callToActionWatch:"call-to-action-watch",card1:"card-1",chapter:"chapter",chapterSubjectMatter:"chapter-subject-matter",chat:"chat",checklist:"checklist",cloze:"cloze",clozeAndMultipleChoiceText:"cloze-and-multiple-choice-text",clozeInstructionGrouped:"cloze-instruction-grouped",clozeList:"cloze-list",clozeSeveral:"cloze-several",clozeSolutionGrouped:"cloze-solution-grouped",coachAudioTranscript:"coach-audio-transcript",coachCallToActionChecklist:"coach-call-to-action-checklist",coachCallToActionCloze:"coach-call-to-action-cloze",coachCallToActionClozeAndMultipleChoiceText:"coach-call-to-action-cloze-and-multiple-choice-text",coachCallToActionEssay:"coach-call-to-action-essay",coachCallToActionMultipleChoiceText:"coach-call-to-action-multiple-choice-text",coachHomeRules:"coach-home-rules",coachSelfReflectionCloze:"coach-self-reflection-cloze",coachSelfReflectionEssay:"coach-self-reflection-essay",coachSelfReflectionMultipleChoice:"coach-self-reflection-multiple-choice",coachSelfReflectionMultipleChoice1:"coach-self-reflection-multiple-choice-1",coachSelfReflectionMultipleChoiceText:"coach-self-reflection-multiple-choice-text",coachSelfReflectionMultipleResponse:"coach-self-reflection-multiple-response",coachSelfReflectionMultipleResponse1:"coach-self-reflection-multiple-response-1",coachSelfReflectionRating:"coach-self-reflection-rating",coachVideoTranscript:"coach-video-transcript",code:"code",codeRuntime:"code-runtime",collapsible:"collapsible",conclusion:"conclusion",conclusionAlt:"conclusion-alt",consoleLog:"console-log",container:"container",containerAccordionTabs:"container-accordion-tabs",containerBits2:"container-bits-2",containerCards:"container-cards",containerCarousel:"container-carousel",containerCookRecipe:"container-cook-recipe",containerFolder:"container-folder",containerFolderAll:"container-folder-all",containerGallery:"container-gallery",containerGrid:"container-grid",containerGroup:"container-group",containerNewsArticle:"container-news-article",containerNowrap:"container-nowrap",containerNowrapStretch:"container-nowrap-stretch",containerPreview:"container-preview",containerScroller:"container-scroller",containerSlides:"container-slides",containerStack:"container-stack",containerTabs:"container-tabs",containerWrap:"container-wrap",conversationLeft1:"conversation-left-1",conversationLeft1Scream:"conversation-left-1-scream",conversationLeft1Thought:"conversation-left-1-thought",conversationRight1:"conversation-right-1",conversationRight1Scream:"conversation-right-1-scream",conversationRight1Thought:"conversation-right-1-thought",clozeAndMultipleChoiceTextConversationLeft1:"cloze-and-multiple-choice-text-conversation-left-1",clozeAndMultipleChoiceTextConversationLeft1Scream:"cloze-and-multiple-choice-text-conversation-left-1-scream",clozeAndMultipleChoiceTextConversationLeft1Thought:"cloze-and-multiple-choice-text-conversation-left-1-thought",clozeAndMultipleChoiceTextConversationRight1:"cloze-and-multiple-choice-text-conversation-right-1",clozeAndMultipleChoiceTextConversationRight1Scream:"cloze-and-multiple-choice-text-conversation-right-1-scream",clozeAndMultipleChoiceTextConversationRight1Thought:"cloze-and-multiple-choice-text-conversation-right-1-thought",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",cookNoteOnQuantity:"cook-note-on-quantity",cookPersonalRecommendation:"cook-personal-recommendation",cookPlate:"cook-plate",cookPracticeAdvise:"cook-practice-advise",cookPreparation:"cook-preparation",cookRecommendation:"cook-recommendation",cookRemark:"cook-remark",cookSideDish:"cook-side-dish",cookSideDrink:"cook-side-drink",cookStep:"cook-step",cookTimer:"cook-timer",cookVariation:"cook-variation",correction:"correction",danger:"danger",dangerAlt:"danger-alt",dangerCollapsible:"danger-collapsible",definitionList:"definition-list",definitionTerm:"definition-term",deleted:"deleted",details:"details",details1:"details-1",detailsImage:"details-image",diff:"diff",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleAlt:"example-alt",exampleCollapsible:"example-collapsible",exampleList:"example-list",extractorAiChat:"extractor-ai-chat",extractorBlock:"extractor-block",extractorConfiguration:"extractor-configuration",extractorInformation:"extractor-information",extractorPage:"extractor-page",extractorPageCollapsible:"extractor-page-collapsible",extractorPageFooter:"extractor-page-footer",extractorPageFooterCollapsible:"extractor-page-footer-collapsible",extractorPageHeader:"extractor-page-header",extractorPageHeaderCollapsible:"extractor-page-header-collapsible",extractorPageNumber:"extractor-page-number",extractorPageNumberCollapsible:"extractor-page-number-collapsible",extractorPageWithBlocks:"extractor-page-with-blocks",extractorPageWithBlocksCollapsible:"extractor-page-with-blocks-collapsible",extractorRepeatedText:"extractor-repeated-text",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formula:"formula",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",glossaryTerm:"glossary-term",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInFeedbackExpert:"hand-in-feedback-expert",handInFeedbackSelf:"hand-in-feedback-self",handInFile:"hand-in-file",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",helpAlt:"help-alt",highlightText:"highlight-text",hint:"hint",hintAlt:"hint-alt",hintCollapsible:"hint-collapsible",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",imageFigureAlt:"image-figure-alt",imageLandscape:"image-landscape",imageLink:"image-link",imageMood:"image-mood",imageOnDevice:"image-on-device",imagePortrait:"image-portrait",imagePrototype:"image-prototype",imageResponsive:"image-responsive",imageScreenshot:"image-screenshot",imageSeparator:"image-separator",imageSeparatorAlt:"image-separator-alt",imagesLogoGrave:"images-logo-grave",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",indexTerm:"index-term",info:"info",infoAlt:"info-alt",infoCollapsible:"info-collapsible",internalLink:"internal-link",interview:"interview",interviewInstructionGrouped:"interview-instruction-grouped",langAudioScript:"lang-audio-script",langEnablingLanguageSkills:"lang-enabling-language-skills",langEnglishAroundWorld:"lang-english-around-world",langExtraActivity:"lang-extra-activity",langGoodToKnow:"lang-good-to-know",langHomework:"lang-homework",langLearningGoal:"lang-learning-goal",langLearningOutcomes:"lang-learning-outcomes",langLearningStrategy:"lang-learning-strategy",langLevelDown:"lang-level-down",langLevelUp:"lang-level-up",langLifeSkillIcon:"lang-life-skill-icon",langLifeSkills:"lang-life-skills",langLikeALocal:"lang-like-a-local",langMaterial:"lang-material",langTeacherNote:"lang-teacher-note",langTeacherPronunciation:"lang-teacher-pronunciation",langUsefulPhrases:"lang-useful-phrases",langVideoScript:"lang-video-script",langVocabulary:"lang-vocabulary",learningDocumentationFeedback:"learning-documentation-feedback",learningPathBook:"learning-path-book",learningPathBotTraining:"learning-path-bot-training",learningPathClassroomEvent:"learning-path-classroom-event",learningPathClassroomTraining:"learning-path-classroom-training",learningPathClosing:"learning-path-closing",learningPathExternalLink:"learning-path-external-link",learningPathFeedback:"learning-path-feedback",learningPathLearningGoal:"learning-path-learning-goal",learningPathLti:"learning-path-lti",learningPathSign:"learning-path-sign",learningPathStep:"learning-path-step",learningPathVideoCall:"learning-path-video-call",leAssignment:"le-assignment",leClassroomEvent:"le-classroom-event",leCompletion:"le-completion",leExternalLink:"le-external-link",leFinishingTask:"le-finishing-task",leFollowUpTask:"le-follow-up-task",leMultiDayEvent:"le-multi-day-event",legend:"legend",leDocumentDownload:"le-document-download",leLearningObjectives:"le-learning-objectives",leLearningStep:"le-learning-step",leListenAudioEmbed:"le-listen-audio-embed",lePreparationTask:"le-preparation-task",leRead:"le-read",leReadBook:"le-read-book",leTask:"le-task",leTodo:"le-todo",leVideoCall:"le-video-call",leWatchVideoEmbed:"le-watch-video-embed",lifeSkillSticker:"life-skill-sticker",list:"list",listItem:"list-item",mark:"mark",match:"match",matchAll:"match-all",matchAllReverse:"match-all-reverse",matchAudio:"match-audio",matchMatrix:"match-matrix",matchPicture:"match-picture",matchReverse:"match-reverse",matchSolutionGrouped:"match-solution-grouped",message:"message",metalevelExplanation:"metalevel-explanation",metaSearchDefaultTerms:"meta-search-default-terms",metaSearchDefaultTopics:"meta-search-default-topics",milestone:"milestone",module:"module",moduleProduct:"module-product",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",page:"page",pageAcademy:"page-academy",pageArticle:"page-article",pageArticleAlt:"page-article-alt",pageArticleResponsive:"page-article-responsive",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonAlt:"page-buy-button-alt",pageBuyButtonPromotion:"page-buy-button-promotion",pageCategory:"page-category",pageCollapsible:"page-collapsible",pageContainer:"page-container",pageContainerFolder:"page-container-folder",pageContainerGroup:"page-container-group",pageContainerNowrap:"page-container-nowrap",pageContainerNowrapStretch:"page-container-nowrap-stretch",pageContainerWrap:"page-container-wrap",pageCoverImage:"page-cover-image",pageFooter:"page-footer",pageHero:"page-hero",pageOpenBook:"page-open-book",pageOpenBookList:"page-open-book-list",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pagePromotion:"page-promotion",pageSectionFolder:"page-section-folder",pageShopInShop:"page-shop-in-shop",pageSpecial:"page-special",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platformPath:"platform-path",preparationNote:"preparation-note",pronunciationTable:"pronunciation-table",prototypeImages:"prototype-images",qAndA:"q-and-a",qAndACard:"q-and-a-card",question1:"question-1",quote:"quote",rating:"rating",recipe:"recipe",recordAudio:"record-audio",recordVideo:"record-video",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",remarkAlt:"remark-alt",remarkCollapsible:"remark-collapsible",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewCustomerNote:"review-customer-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",separatorAlt:"separator-alt",sequence:"sequence",sideNote:"side-note",sideNoteCollapsible:"side-note-collapsible",smartStandardArticleNonNormative:"smart-standard-article-non-normative",smartStandardArticleNonNormativeCollapsible:"smart-standard-article-non-normative-collapsible",smartStandardArticleNormative:"smart-standard-article-normative",smartStandardArticleNormativeCollapsible:"smart-standard-article-normative-collapsible",smartStandardExampleNonNormative:"smart-standard-example-non-normative",smartStandardExampleNonNormativeCollapsible:"smart-standard-example-non-normative-collapsible",smartStandardExampleNormative:"smart-standard-example-normative",smartStandardExampleNormativeCollapsible:"smart-standard-example-normative-collapsible",smartStandardFormula:"smart-standard-formula",smartStandardFormulaNonNormative:"smart-standard-formula-non-normative",smartStandardFormulaNormative:"smart-standard-formula-normative",smartStandardImageFigureNonNormative:"smart-standard-image-figure-non-normative",smartStandardImageFigureNonNormativeCollapsible:"smart-standard-image-figure-non-normative-collapsible",smartStandardImageFigureNormative:"smart-standard-image-figure-normative",smartStandardImageFigureNormativeCollapsible:"smart-standard-image-figure-normative-collapsible",smartStandardLegend:"smart-standard-legend",smartStandardLegendNonNormative:"smart-standard-legend-non-normative",smartStandardLegendNormative:"smart-standard-legend-normative",smartStandardList:"smart-standard-list",smartStandardListCollapsible:"smart-standard-list-collapsible",smartStandardListItem:"smart-standard-list-item",smartStandardListItemCollapsible:"smart-standard-list-item-collapsible",smartStandardNoteNonNormative:"smart-standard-note-non-normative",smartStandardNoteNonNormativeCollapsible:"smart-standard-note-non-normative-collapsible",smartStandardNoteNormative:"smart-standard-note-normative",smartStandardNoteNormativeCollapsible:"smart-standard-note-normative-collapsible",smartStandardRemarkLegend:"smart-standard-remark-legend",smartStandardRemarkLegendNonNormative:"smart-standard-remark-legend-non-normative",smartStandardRemarkLegendNormative:"smart-standard-remark-legend-normative",smartStandardRemarkFormula:"smart-standard-remark-formula",smartStandardRemarkFormulaNonNormative:"smart-standard-remark-formula-non-normative",smartStandardRemarkFormulaNormative:"smart-standard-remark-formula-normative",smartStandardRemarkNonNormative:"smart-standard-remark-non-normative",smartStandardRemarkNonNormativeCollapsible:"smart-standard-remark-non-normative-collapsible",smartStandardRemarkNormative:"smart-standard-remark-normative",smartStandardRemarkNormativeCollapsible:"smart-standard-remark-normative-collapsible",smartStandardRemarkTableImageNonNormative:"smart-standard-remark-table-image-non-normative",smartStandardRemarkTableImageNonNormativeCollapsible:"smart-standard-remark-table-image-non-normative-collapsible",smartStandardRemarkTableImageNormative:"smart-standard-remark-table-image-normative",smartStandardRemarkTableImageNormativeCollapsible:"smart-standard-remark-table-image-normative-collapsible",smartStandardRemarkTableNonNormative:"smart-standard-remark-table-non-normative",smartStandardRemarkTableNonNormativeCollapsible:"smart-standard-remark-table-non-normative-collapsible",smartStandardRemarkTableNormative:"smart-standard-remark-table-normative",smartStandardRemarkTableNormativeCollapsible:"smart-standard-remark-table-normative-collapsible",smartStandardTableImageNonNormative:"smart-standard-table-image-non-normative",smartStandardTableImageNonNormativeCollapsible:"smart-standard-table-image-non-normative-collapsible",smartStandardTableImageNormative:"smart-standard-table-image-normative",smartStandardTableImageNormativeCollapsible:"smart-standard-table-image-normative-collapsible",smartStandardTableNonNormative:"smart-standard-table-non-normative",smartStandardTableNonNormativeCollapsible:"smart-standard-table-non-normative-collapsible",smartStandardTableNormative:"smart-standard-table-normative",smartStandardTableNormativeCollapsible:"smart-standard-table-normative-collapsible",standardArticleNonNormative:"standard-article-non-normative",standardArticleNormative:"standard-article-normative",standardExampleNonNormative:"standard-example-non-normative",standardExampleNormative:"standard-example-normative",standardImageFigureNonNormative:"standard-image-figure-non-normative",standardImageFigureNormative:"standard-image-figure-normative",standardList:"standard-list",standardListItem:"standard-list-item",standardNoteNonNormative:"standard-note-non-normative",standardNoteNormative:"standard-note-normative",standardRemarkNonNormative:"standard-remark-non-normative",standardRemarkNormative:"standard-remark-normative",standardRemarkTableImageNonNormative:"standard-remark-table-image-non-normative",standardRemarkTableImageNormative:"standard-remark-table-image-normative",standardRemarkTableNonNormative:"standard-remark-table-non-normative",standardRemarkTableNormative:"standard-remark-table-normative",standardTableImageNonNormative:"standard-table-image-non-normative",standardTableImageNormative:"standard-table-image-normative",standardTableNonNormative:"standard-table-non-normative",standardTableNormative:"standard-table-normative",statement:"statement",stdout:"stdout",step:"step",stepImageScreenshot:"step-image-screenshot",stepImageScreenshotWithPointer:"step-image-screenshot-with-pointer",sticker:"sticker",stickyNote:"sticky-note",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",summary:"summary",summaryAi:"summary-ai",survey:"survey",survey1:"survey-1",surveyAnonymous:"survey-anonymous",surveyAnonymous1:"survey-anonymous-1",surveyMatrix:"survey-matrix",surveyMatrixMe:"survey-matrix-me",surveyRating:"survey-rating",surveyRatingDisplay:"survey-rating-display",surveyRatingOnce:"survey-rating-once",table:"table",tableAlt:"table-alt",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",tocResource:"toc-resource",tocContent:"toc-content",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboardEmbed:"vendor-datadog-dashboard-embed",vendorFormbricksEmbed:"vendor-formbricks-embed",vendorFormbricksLink:"vendor-formbricks-link",vendorFormbricksEmbedAnonymous:"vendor-formbricks-embed-anonymous",vendorFormbricksLinkAnonymous:"vendor-formbricks-link-anonymous",vendorHighchartsChart:"vendor-highcharts-chart",vendorIframelyCard:"vendor-iframely-card",vendorIframelyEmbed:"vendor-iframely-embed",vendorIframelyPreview:"vendor-iframely-preview",vendorIframelyPreviewMini:"vendor-iframely-preview-mini",vendorJupyterCellCode:"vendor-jupyter-cell-code",vendorJupyterCellMarkdown:"vendor-jupyter-cell-markdown",vendorJupyterCellRaw:"vendor-jupyter-cell-raw",vendorJupyterIpynb:"vendor-jupyter-ipynb",vendorJupyterOutput:"vendor-jupyter-output",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",video:"video",videoEmbed:"video-embed",videoEmbedLandscape:"video-embed-landscape",videoEmbedPortrait:"video-embed-portrait",videoLandscape:"video-landscape",videoLink:"video-link",videoLinkLandscape:"video-link-landscape",videoLinkPortrait:"video-link-portrait",videoPortrait:"video-portrait",videoTranscript:"video-transcript",warning:"warning",warningAlt:"warning-alt",warningCollapsible:"warning-collapsible",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=i},5980:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=function(e,t,r,o){const{value:n}=r;i.StringUtils.isString(n)&&(o.solution=i.StringUtils.trimmedString(n))};const i=r(9681)},6128:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProcessorUtils=void 0;const i=r(9554);const o=new class{concatenatePlainTextWithAstTexts(e,t,r){var o;if(Array.isArray(e)){if(r=r&&r.trim()){const n=r.split("\n"),a=[];for(let e=0;e<t;e++)a.push({type:i.TextNodeType.hardBreak});for(let e=0;e<n.length;e++){const t=n[e];t&&a.push({text:t,type:i.TextNodeType.text}),e<n.length-1&&a.push({type:i.TextNodeType.hardBreak})}const s=e[e.length-1];s&&s.type===i.TextNodeType.paragraph?s.content=[...null!==(o=s.content)&&void 0!==o?o:[],...a]:e.push({type:i.TextNodeType.paragraph,content:a,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=r?r:""}`}};t.ContentProcessorUtils=o},6132:function(e,t,r){var i,o=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=i(e),a=0;a<r.length;a++)"default"!==r[a]&&o(t,e,r[a]);return n(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const s=r(1464),l=r(8453),p=r(6877),c=a(r(2086)),u={format:l.BodyTextFormat.bitmarkPlusPlus,location:p.TextLocation.body,v2:!1};function y(e){return"string"==typeof e||e instanceof String}t.Breakscape=class{constructor(){this.EMPTY_STRING=""}breakscape(e,t={}){if(null==e)return;const r=Object.assign({},u,t);if(Array.isArray(e))return e.map((e=>this.breakscape(e,r)));if(!y(e))return e;const{regex:i,replacer:o}=function(e,t,r=!1){return t===p.TextLocation.tag?r||e!==l.BodyTextFormat.bitmarkPlusPlus?{regex:c.BREAKSCAPE_PLAIN_TAG_REGEX,replacer:c.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER}:{regex:c.BREAKSCAPE_BITMARK_TAG_REGEX,replacer:c.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER}:e===l.BodyTextFormat.bitmarkPlusPlus?r?{regex:c.BREAKSCAPE_V2_BODY_REGEX,replacer:c.BREAKSCAPE_V2_BODY_REGEX_REPLACER}:{regex:c.BREAKSCAPE_BITMARK_BODY_REGEX,replacer:c.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER}:{regex:c.BREAKSCAPE_PLAIN_BODY_REGEX,replacer:c.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER}}(r.format,r.location,r.v2);let n=e;return n=n.replace(i,o),n}unbreakscape(e,t={}){if(null==e)return;const r=Object.assign({},u,t);if(Array.isArray(e))return e.map((e=>this.unbreakscape(e,r)));if(!y(e))return e;const{regex:i,replacer:o}=function(e,t){const r=e!==l.BodyTextFormat.bitmarkPlusPlus;return t===p.TextLocation.body&&r?{regex:c.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX,replacer:c.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER}:{regex:c.UNBREAKSCAPE_REGEX,replacer:c.UNBREAKSCAPE_REGEX_REPLACER}}(r.format,r.location);let n=e;return n=n.replace(i,o),n}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},u,t),i=e=>e?e.replace(c.BREAKSCAPE_CODE_REGEX,c.BREAKSCAPE_CODE_REGEX_REPLACER):e;if(Array.isArray(e)){const t=r.inPlaceArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];y(r)&&(e[t]=i(r))}e=t}else y(e)&&(e=i(e));return e}version(){return s.buildInfo.version}license(){return s.buildInfo.license}}},6149:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",image:"image",imageResponsive:"image-responsive",imagePortrait:"image-portrait",imageLandscape:"image-landscape",imageEmbed:"image-embed",imageLink:"image-link",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",video:"video",videoEmbed:"video-embed",videoLink:"video-link",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",article:"article",articleEmbed:"article-embed",articleLink:"article-link",document:"document",documentEmbed:"document-embed",documentLink:"document-link",documentDownload:"document-download",appLink:"app-link",websiteLink:"website-link",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"});t.ResourceTag=i},6220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedTextFormat=void 0;const i=(0,r(4718).superenum)({bitmarkMinusMinus:"bitmark--"});t.DeprecatedTextFormat=i},6278:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=(0,r(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=i},6521:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildResources=function(e,t,r){var i,o;const{bitType:n}=e,p=[],c=[],u=l.ResourceTag.fromValue(t),y=a.Config.getBitResourcesConfig(n,u),g=y.resourceAttachmentAllowed,d=y.getCountsMin(),T=y.getCountsMax();if(r)for(const e of r.reverse()){let t=null!==(i=d.get(e.__typeAlias))&&void 0!==i?i:0,r=null!==(o=T.get(e.__typeAlias))&&void 0!==o?o:0;t=Math.max(0,t-1),r===s.Count.infinity?p.unshift(e):r>0?(p.unshift(e),r--):c.unshift(e),d.set(e.__typeAlias,t),T.set(e.__typeAlias,r)}if(!g&&t){const r=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(r)}else 0===p.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such a resource is present`);c.length>0&&(e.parser.excessResources=c);return p},t.resourceContentProcessor=function(e,t,r,o,s){const{type:g,key:d,value:T,chain:f}=o,m=s.resources;if(!m)return;const h=l.ResourceTag.fromValue(d);if(h){const t=a.Config.getTagConfigForTag(r,h),o=e.bitContentProcessor(u.BitContentLevel.Chain,null==t?void 0:t.chain,f),{posterImage:g}=o,d=i(o,["posterImage"]);let b;if(g){const{subConfig:r,subChain:o}=function(e,t,r){var i;let o;e&&(o=null===(i=e[r])||void 0===i?void 0:i.chain);const n=null==t?void 0:t.reduce(((e,t)=>{if(e)return e;const r=t;return"posterImage"===r.key?r.chain:void 0}),void 0);return{subConfig:o,subChain:n}}(null==t?void 0:t.chain,f,"posterImage"),n=e.bitContentProcessor(u.BitContentLevel.Chain,r,o),{posterImage:a}=n,s=i(n,["posterImage"]);b=y.resource(e,Object.assign({type:l.ResourceTag.image,value:g},s)).image}const B=y.resource(e,Object.assign({type:h,value:n.Breakscape.unbreakscape(T,{format:p.TextFormat.bitmarkText,location:c.TextLocation.tag}),posterImage:b},d));B&&(h===l.ResourceTag.backgroundWallpaper||h===l.ResourceTag.imagePlaceholder?s.propertyStyleResources&&(s.propertyStyleResources[h]=B):m.push(B))}};const o=r(5533),n=r(7735),a=r(2028),s=r(3778),l=r(6149),p=r(385),c=r(6877),u=r(3029),y=new o.ResourceBuilder},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,r,i,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=r,this.maxCount=i,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},6772:function(e,t){var r=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n",this.lastWrite=""}get isSync(){return!0}getString(){return this._string}open(){return r(this,void 0,void 0,(function*(){return this.openSync(),Promise.resolve()}))}close(){return r(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}return Promise.resolve()}))}openSync(){this._buffer=[],this._string=""}closeSync(){if(!this._buffer)throw new Error("open() or openSync() never called");this._string=this._buffer.join(""),this._buffer=[]}writeLine(e){return this._buffer?(null!=e?(this._buffer.push(e+this.endOfLineString),this.lastWrite=e+this.endOfLineString):(this._buffer.push(this.endOfLineString),this.lastWrite=this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let r="";for(let i=0,o=e.length;i<o;i++){const n=e[i];this._buffer.push(n),r+=n,t&&i<o-1&&(this._buffer.push(t),r+=t),this._buffer.push(this.endOfLineString),r+=this.endOfLineString}return this.lastWrite=r,this}write(e){return this._buffer?(null==e||(e&&(this.lastWrite=e),this._buffer.push(e)),this):this}writeWhiteSpace(){return this.write(" "),this}getLastWrite(){return this.lastWrite}}},6853:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(5854),c=r(3778),u=r(363),y=r(385),g={[p.BitType._error]:{since:"1.3.0",tags:[]},[p.BitType._comment]:{since:"1.4.12",tags:[]},[p.BitType._standard]:{since:"3.2.0",tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[p.BitType.appFlashcards]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.article]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}]},[p.BitType.articleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.articleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.articleResponsiveAlt]:{since:"2.0.0",baseBitType:p.BitType.articleResponsive},[p.BitType.standardArticleNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardArticleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardArticleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNormative},[p.BitType.smartStandardArticleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNonNormative},[p.BitType.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNormative},[p.BitType.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNonNormative},[p.BitType.statement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.pageArticle]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.callToAction]:{since:"1.15.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.callToActionUrl,minCount:1}]},[p.BitType.callToActionSubscribe]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionContact]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionJoin]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionMail]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionLearnMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionSeeMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionWatch]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionStartNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetOffer]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionBookNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionShopNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionDownload]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionCreateAccount]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.appBitmarkFromJavascript]:{since:"1.4.5",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:y.TextFormat.plainText},[p.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:p.BitType.appBitmarkFromJavascript},[p.BitType.articleEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.articleLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audio]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.bitAlias]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor}]},[p.BitType.diff]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo}]},[p.BitType.book]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[p.BitType.bookEnd]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.bookAcknowledgements]:{since:"1.17.0",baseBitType:p.BitType.article},[p.BitType.bookAddendum]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAfterword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAppendix]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookBibliography]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookConclusion]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyright]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookDedication]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookForword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookImprint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookNotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPostscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPreface]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPrologue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReadMore]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReferenceList]:{since:"3.2.0",baseBitType:p.BitType._standard,cardSet:i.CardSetConfigKey._bookReferenceList},[p.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTeaser]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTitle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCover]:{since:"3.27.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor}]},[p.BitType.bookAlias]:{since:"1.4.3",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:c.Count.infinity}]},[p.BitType.bookDiff]:{since:"3.10.0",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookDiff}]},[p.BitType.bookClose]:{since:"1.18.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.bookReference]:{since:"2.2.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}]},[p.BitType.botActionResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._botActionResponses},[p.BitType.botActionSend]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[p.BitType.browserImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.card1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}]},[p.BitType.question1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.survey1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.chapter]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[p.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.clozeAndMultipleChoiceText},[p.BitType.cloze]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[p.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSeveral]:{since:"3.5.0",baseBitType:p.BitType.cloze},[p.BitType.gapText]:{since:"1.5.15",baseBitType:p.BitType.cloze},[p.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:p.BitType.clozeInstructionGrouped},[p.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeList]:{since:"1.4.13",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._clozeList},[p.BitType.code]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:y.TextFormat.plainText},[p.BitType.formula]:{since:"1.35.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.latex},[p.BitType.smartStandardFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.appCodeCell]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeIde]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.codeRuntime]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.consoleLog]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.output]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.stdout]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.step]:{since:"1.5.1",baseBitType:p.BitType.article},[p.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:p.BitType.image},[p.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[p.BitType.milestone]:{since:"1.20.0",baseBitType:p.BitType.step},[p.BitType.conversationLeft1]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[p.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.cookPreparation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookStep]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookIngredients]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]}],cardSet:i.CardSetConfigKey._ingredients},[p.BitType.recipe]:{since:"1.5.24",baseBitType:p.BitType.cookIngredients},[p.BitType.cookRemark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookVariation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookInsert]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookNoteOnQuantity]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.cookArrangement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPlate]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDish]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookTimer]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.document]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentDownload]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leDocumentDownload]:{since:"3.18.0",baseBitType:p.BitType.documentDownload},[p.BitType.documentEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.essay]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.example]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],rootExampleType:u.ExampleType.string},[p.BitType.exampleAlt]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.smartStandardExampleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNormative},[p.BitType.smartStandardExampleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNonNormative},[p.BitType.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNormative},[p.BitType.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNonNormative},[p.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.aiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAi]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAttachment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.assignment]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.audioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:p.BitType.example},[p.BitType.blogArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bug]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bugAlt]:{since:"1.16.0",baseBitType:p.BitType.bug},[p.BitType.checklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.correction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.danger]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.dangerAlt]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.definitionTerm]:{since:"1.34.0",baseBitType:p.BitType.article},[p.BitType.deleted]:{since:"3.9.0",baseBitType:p.BitType.article},[p.BitType.details1]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.details]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.qAndA]:{since:"3.5.0",baseBitType:p.BitType.article},[p.BitType.editorial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.editorNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.featured]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.glossaryTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.help]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.helpAlt]:{since:"1.16.0",baseBitType:p.BitType.help},[p.BitType.hint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.hintAlt]:{since:"1.16.0",baseBitType:p.BitType.hint},[p.BitType.indexTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.info]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.infoAlt]:{since:"1.16.0",baseBitType:p.BitType.info},[p.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langMaterial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelDown]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelUp]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVideoScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langAudioScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVocabulary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langHomework]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.list]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.standardList]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.smartStandardList]:{since:"1.28.0",baseBitType:p.BitType.standardList},[p.BitType.smartStandardListCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardList},[p.BitType.message]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.note]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.noteAlt]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNonNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.smartStandardNoteNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNormative},[p.BitType.smartStandardNoteNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNonNormative},[p.BitType.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNormative},[p.BitType.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNonNormative},[p.BitType.noteAi]:{since:"1.3.0",baseBitType:p.BitType.note},[p.BitType.notebookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.preparationNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remarkAlt]:{since:"1.16.0",baseBitType:p.BitType.remark},[p.BitType.standardRemarkNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardRemarkNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardRemarkNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNormative},[p.BitType.smartStandardRemarkNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNonNormative},[p.BitType.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNormative},[p.BitType.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNonNormative},[p.BitType.selfAssessment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.separator]:{since:"1.4.15",baseBitType:p.BitType.article},[p.BitType.separatorAlt]:{since:"1.16.0",baseBitType:p.BitType.separator},[p.BitType.sticker]:{since:"1.5.28",baseBitType:p.BitType.article},[p.BitType.sideNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summaryAi]:{since:"1.3.0",baseBitType:p.BitType.summary},[p.BitType.videoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warning]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warningAlt]:{since:"1.16.0",baseBitType:p.BitType.warning},[p.BitType.workbookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.collapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.sideNoteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.infoCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.remarkCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.warningCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.dangerCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.noteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.exampleCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.hintCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.bugCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.platformPath]:{since:"3.14.1",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.path}]},[p.BitType.container]:{since:"1.9.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowedBit,maxCount:c.Count.infinity}]},[p.BitType.containerWrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerGroup]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerFolder]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerCarousel]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCards]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGrid]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerStack]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerSlides]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGallery]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerScroller]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerAccordionTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerFolderAll]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerBits2]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCookRecipe]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerNewsArticle]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerPreview]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.pageContainer]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.pageContainerWrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerFolder]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerGroup]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.metalevelExplanation]:{since:"1.10.0",baseBitType:p.BitType.article},[p.BitType.module]:{since:"1.5.26",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasBookNavigation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[p.BitType.moduleProduct]:{since:"1.9.0",baseBitType:p.BitType.module,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1}]},[p.BitType.exampleList]:{since:"1.4.13",baseBitType:p.BitType.example,cardSet:i.CardSetConfigKey._exampleBitList,rootExampleType:u.ExampleType.string},[p.BitType.extractorPage]:{since:"1.5.17",baseBitType:p.BitType.image},[p.BitType.extractorPageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPage},[p.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:p.BitType.image},[p.BitType.extractorPageWithBlocksCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageWithBlocks},[p.BitType.extractorConfiguration]:{since:"1.7.1",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.plainText},[p.BitType.extractorInformation]:{since:"3.8.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.extractorAiChat]:{since:"3.19.0",baseBitType:p.BitType._standard},[p.BitType.extractorBlock]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumberCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageNumber},[p.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageHeaderCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageHeader},[p.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageFooterCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageFooter},[p.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageOpenBookList]:{since:"2.1.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,maxCount:c.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[p.BitType.assignmentList]:{since:"1.4.13",baseBitType:p.BitType.exampleList},[p.BitType.pageFooter]:{since:"1.4.13",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}],cardSet:i.CardSetConfigKey._exampleBitList},[p.BitType.legend]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.smartStandardLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.definitionList]:{since:"1.34.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTerms]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTopics]:{since:"3.12.0",baseBitType:p.BitType.metaSearchDefaultTerms},[p.BitType.flashcard]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._flashcard},[p.BitType.flashcard1]:{since:"1.3.0",baseBitType:p.BitType.flashcard},[p.BitType.qAndACard]:{since:"3.25.0",baseBitType:p.BitType.flashcard1},[p.BitType.focusImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.highlightText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.image]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.backgroundWallpaper,chain:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.detailsImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.figure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:i.CardSetConfigKey._definitionList},[p.BitType.imageBanner]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageFigure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:i.CardSetConfigKey._definitionList},[p.BitType.imageFigureAlt]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNonNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.smartStandardImageFigureNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNonNormative},[p.BitType.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNonNormative},[p.BitType.imageLandscape]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageMood]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePortrait]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePrototype]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSeparator]:{since:"1.4.15",baseBitType:p.BitType.image},[p.BitType.imageSeparatorAlt]:{since:"1.16.0",baseBitType:p.BitType.imageSeparator},[p.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageStyled]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageZoom]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.pageBanner]:{since:"1.4.3",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}]},[p.BitType.pageHero]:{since:"1.11.0",baseBitType:p.BitType.pageBanner},[p.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:p.BitType.image},[p.BitType.tableImage]:{since:"1.5.15",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[p.BitType.tableImageAlt]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNonNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNonNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.smartStandardTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNormative},[p.BitType.smartStandardTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNonNormative},[p.BitType.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNormative},[p.BitType.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNonNormative},[p.BitType.imageLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.imageOnDevice]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[p.BitType.imageResponsive]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[p.BitType.imagesLogoGrave]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:c.Count.infinity}],resourceAttachmentAllowed:!1},[p.BitType.prototypeImages]:{since:"1.6.1",baseBitType:p.BitType.imagesLogoGrave},[p.BitType.internalLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.interview]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._questions},[p.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.botInterview]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.learningPathBook]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[p.BitType.bookLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLti]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathSign]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathStep]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[p.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[p.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[p.BitType.leLearningObjectives]:{since:"1.25.0",baseBitType:p.BitType.learningPathLearningGoal,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leVideoCall]:{since:"1.25.0",baseBitType:p.BitType.learningPathVideoCall,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leClassroomEvent]:{since:"1.25.0",baseBitType:p.BitType.learningPathClassroomEvent,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leMultiDayEvent]:{since:"3.32.0",baseBitType:p.BitType.leClassroomEvent},[p.BitType.leCompletion]:{since:"1.25.0",baseBitType:p.BitType.learningPathClosing,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leExternalLink]:{since:"1.25.0",baseBitType:p.BitType.learningPathExternalLink,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leReadBook]:{since:"1.25.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leLearningStep]:{since:"1.25.0",baseBitType:p.BitType.learningPathStep,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.lePreparationTask]:{since:"1.26.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leRead]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTodo]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFollowUpTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFinishingTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leAssignment]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leWatchVideoEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leListenAudioEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.listItem]:{since:"1.22.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.listItemIndent}]},[p.BitType.standardListItem]:{since:"1.22.0",baseBitType:p.BitType.listItem},[p.BitType.smartStandardListItem]:{since:"1.28.0",baseBitType:p.BitType.standardListItem},[p.BitType.smartStandardListItemCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardListItem},[p.BitType.mark]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[p.BitType.match]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:i.CardSetConfigKey._matchPairs},[p.BitType.matchAll]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchMatrix]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchMatrix},[p.BitType.matchAudio]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchAudioPairs},[p.BitType.matchPicture]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchImagePairs},[p.BitType.feedback]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._feedback},[p.BitType.learningDocumentationFeedback]:{since:"3.13.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackExpert]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackSelf]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.multipleChoice1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice1},[p.BitType.multipleChoice]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice},[p.BitType.multipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.multipleResponse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse1},[p.BitType.multipleResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse},[p.BitType.page]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[p.BitType.pageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.page},[p.BitType.pageCoverImage]:{since:"1.22.0",baseBitType:p.BitType.page},[p.BitType.pageBuyButton]:{since:"1.4.3",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageBuyButtonAlt]:{since:"1.31.0",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageSubpage]:{since:"1.6.6",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.page}]},[p.BitType.pageShopInShop]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageCategory]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageAcademy]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePromotion]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageSpecial]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePerson]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageProduct]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[p.BitType.pageProductList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:c.Count.infinity}]},[p.BitType.pageProductVideo]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[p.BitType.pageProductVideoList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:c.Count.infinity}]},[p.BitType.pageSectionFolder]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[p.BitType.photo]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.quote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[p.BitType.rating]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:p.BitType.rating},[p.BitType.releaseNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[p.BitType.reviewNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:u.ExampleType.string},[p.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewCustomerNote]:{since:"3.5.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.sampleSolution]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.sequence]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._elements,rootExampleType:u.ExampleType.boolean},[p.BitType.stillImageFilm]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.surveyAnonymous]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.survey]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[p.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:p.BitType.surveyMatrix},[p.BitType.surveyRating]:{since:"1.6.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.scorm]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[p.BitType.pronunciationTable]:{since:"3.1.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._pronunciationTable},[p.BitType.table]:{since:"1.5.19",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeaderWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableColumnMinWidth}],cardSet:i.CardSetConfigKey._table},[p.BitType.tableAlt]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNonNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNonNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.smartStandardTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNormative},[p.BitType.smartStandardTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNonNormative},[p.BitType.smartStandardRemarkTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNonNormative},[p.BitType.smartStandardTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNormative},[p.BitType.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNonNormative},[p.BitType.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNonNormative},[p.BitType.parameters]:{since:"1.18.0",baseBitType:p.BitType.table},[p.BitType.toc]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.tocChapter]:{since:"1.5.5",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[p.BitType.tocInline]:{since:"3.24.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[p.BitType.tocResource]:{since:"3.31.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tocResource,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.tocContent]:{since:"3.31.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tocContent,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.anchor]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRemind]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionSave]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chat]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusion]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusionAlt]:{since:"1.16.0",baseBitType:p.BitType.conclusion},[p.BitType.documentUpload]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.footNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupBorn]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupDied]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordAudio]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordVideo]:{since:"1.5.24",baseBitType:p.BitType._standard},[p.BitType.stickyNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.takePicture]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.handInAudio]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInContact]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInDocument]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInFile]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInAcceptFileType,maxCount:c.Count.infinity}]},[p.BitType.handInLocation]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInPhoto]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInScan]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInSubmit]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInRequirement,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInInstruction},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.handInVideo]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInVoice]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.trueFalse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.true},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false}],rootExampleType:u.ExampleType.boolean},[p.BitType.trueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:i.CardSetConfigKey._statements},[p.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:p.BitType.code,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.vendorDatadogDashboardEmbed]:{since:"3.12.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorDashboardId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbed]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksEmbed},[p.BitType.vendorFormbricksLink]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksLinkAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksLink},[p.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:p.BitType.vendorAmcharts5Chart},[p.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorStripePricingTable]:{since:"1.20.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePricingTableId,minCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePublishableKey,minCount:1}]},[p.BitType.vendorStripePricingTableExternal]:{since:"3.13.0",baseBitType:p.BitType.vendorStripePricingTable},[p.BitType.video]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLandscape]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoPortrait]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.websiteLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},6877:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLocation=void 0;const i=(0,r(4718).superenum)({tag:"tag",body:"body"});t.TextLocation=i},6915:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const i=(0,r(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=i},6936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const i=r(6278),o=r(9561),n=r(2287),a=r(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===i.Environment.node,this.isCI=this.getIsCI(),this.NODE_ENV=this.getNodeEnv(),this.os=this.getOs(),this.osVersion=this.getOsVersion()}init(e,t){this.app=e,this.appVersion=this.parseMMBVersion(t)}get upTimestamp(){return Date.now()-this.bootTimestamp}getEnvironment(){return this.userAgentInfo?this.userAgentInfo.browser:"undefined"!=typeof process&&void 0!==process.versions&&process.versions.node?i.Environment.node:i.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}getIsBrowser(){return!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator||!navigator.userAgent)}getIsCI(){return!("undefined"==typeof process||!process.env||!process.env.CI)}getNodeEnv(){return"undefined"!=typeof process&&process.env?"production":""}parseMMBVersion(e){if(!e)return n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?r=n:1===e?i=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:r,minor:i,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const r=new class{asArray(e){if(null!=e)return Array.isArray(e)?e:[e]}asSingle(e,t){if(null!=e)return Array.isArray(e)?e.length>0?t?e[e.length-1]:e[0]:void 0:e}};t.ArrayUtils=r},6991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=function(e,t,r,o){if(!o.internalComments)return;const{value:n}=r,a=i.StringUtils.isString(n)?i.StringUtils.trimmedString(n):void 0;if(!a)return;o.internalComments.push(a)};const i=r(9681)},7112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const i=r(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_quizCommon:"group_quizCommon",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageEmbed:"group_resourceImageEmbed",group_resourceImageLink:"group_resourceImageLink",group_resourceImageResponsive:"group_resourceImageResponsive",group_resourceImagePortrait:"group_resourceImagePortrait",group_resourceImageLandscape:"group_resourceImageLandscape",group_resourceAudio:"group_resourceAudio",group_resourceAudioEmbed:"group_resourceAudioEmbed",group_resourceAudioLink:"group_resourceAudioLink",group_resourceVideo:"group_resourceVideo",group_resourceVideoEmbed:"group_resourceVideoEmbed",group_resourceVideoLink:"group_resourceVideoLink",group_resourceStillImageFilm:"group_resourceStillImageFilm",group_resourceStillImageFilmEmbed:"group_resourceStillImageFilmEmbed",group_resourceStillImageFilmLink:"group_resourceStillImageFilmLink",group_resourceArticle:"group_resourceArticle",group_resourceArticleEmbed:"group_resourceArticleEmbed",group_resourceArticleLink:"group_resourceArticleLink",group_resourceDocument:"group_resourceDocument",group_resourceDocumentEmbed:"group_resourceDocumentEmbed",group_resourceDocumentLink:"group_resourceDocumentLink",group_resourceDocumentDownload:"group_resourceDocumentDownload",group_resourceAppLink:"group_resourceAppLink",group_resourceWebsiteLink:"group_resourceWebsiteLink"};t.groupConfigKeys=o;const n=(0,i.superenum)(o);t.GroupConfigKey=n},7124:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(5854),l=r(8453),p=r(6220),c=r(6149),u=r(385),y=r(6877),g=r(9681),d=r(4266),T=r(5033),f=r(1083),m=r(4402),h=r(4382),b=r(3904),B=r(9289),v=r(5189),C=r(9647),x=r(3990),P=r(6521),k=r(7667),_=r(9885),K=r(3029),A=!1,w=!0,S=!0,E=!0,L=!0,I=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:a.Config.getBitConfig(s.BitType._error),bitType:s.BitType._error,textFormat:u.TextFormat.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:A,DEBUG_BIT_CONTENT:w,DEBUG_BIT_TAGS:S,DEBUG_BODY:E,DEBUG_FOOTER:L,DEBUG_CHAIN_CONTENT:true,DEBUG_CHAIN_TAGS:true,DEBUG_CARD_SET_CONTENT:true,DEBUG_CARD_SET:true,DEBUG_CARD_TAGS:true,parser:this.parser,parse:this.parse,bitContentProcessor:this.bitContentProcessor.bind(this),splitBitContent:this.splitBitContent.bind(this),addWarning:this.addWarning.bind(this),addError:this.addError.bind(this),debugPrint:this.debugPrint.bind(this),state:{}}}buildBits(e){var t;const r=[];let i=[];for(const o of e){if(!o)continue;const e=o.value;e?r.push(e):i=i.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return I.buildBitmark({bits:r,errors:i.length>0?i:void 0})}buildBit(e,t){var r;const{bitType:o,textFormat:n,resourceType:l,bitLevel:p,isCommented:c}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const u=a.Config.getBitConfig(o);this.context.bitConfig=u,this.context.bitType=o,this.context.textFormat=n,this.context.resourceType=l;const y=a.Config.isOfBitType(o,s.BitType.trueFalse1),g=a.Config.isOfBitType(o,s.BitType.multipleChoice1),T=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=d.BitmarkPegParserValidator.validateBitTags(this.context,t);const m=this.bitContentProcessor(K.BitContentLevel.Bit,u.tags,t),{body:h,footer:b,cardSet:B,title:v,statement:C,statements:x,choices:_,responses:A,propertyStyleResources:w,resources:S,posterImage:E,internalComments:L}=m,R=i(m,["body","footer","cardSet","title","statement","statements","choices","responses","propertyStyleResources","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",R),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",b);const F=(0,k.buildTitles)(this.context,o,v),N=(0,f.buildCards)(this.context,o,n,B,C,x,_,A),O=(0,P.buildResources)(this.context,l,S),V=[...null!=L?L:[],...null!==(r=N.internalComments)&&void 0!==r?r:[]],G=this.buildBitLevelWarnings(),j=this.buildBitLevelErrors();G&&(this.parser.warnings=G),j&&(this.parser.errors=j);return{value:I.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,bitLevel:p,isCommented:c,textFormat:n,resourceType:l},F),{posterImage:E,statement:y?C:void 0,choices:g?_:void 0,responses:T?A:void 0}),R),w),{resources:O}),N),{body:h,footer:b,internalComment:V,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:I.buildBit({bitType:a.Config.getBitType(s.BitType._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,r){const i=n.Breakscape.unbreakscape(e,{format:u.TextFormat.plainText,location:y.TextLocation.tag}),o=a.Config.getBitType(i),g=a.Config.isBitTypeCommented(i);a.Config.isOfBitType(o,s.BitType._error)&&this.addError(`Invalid bit type: '${i}'`);const d=a.Config.getBitConfig(o);t>a.Config.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${a.Config.bitLevelMax}`),t=a.Config.bitLevelMax):t<a.Config.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${a.Config.bitLevelMin}`),t=a.Config.bitLevelMin);let T=u.TextFormat.fromValue(r.textFormat);r.textFormat&&!T&&this.addWarning(`Invalid text format '${r.textFormat}', defaulting to '${l.BodyTextFormat.bitmarkPlusPlus}'`);const f=p.DeprecatedTextFormat.fromValue(r.textFormat);f&&(T=u.TextFormat.bitmarkText,this.addWarning(`${f} text format is deprecated. Bit will be parsed as '${l.BodyTextFormat.bitmarkPlusPlus}'`)),T=null!=T?T:d.textFormatDefault;const m=c.ResourceTag.fromValue(r.resourceType);return r.resourceType&&!m&&this.addWarning(`Invalid resource type '${r.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:null!=T?T:d.textFormatDefault,resourceType:m,isCommented:g}}buildTextAndResourceType(e,t){const r={},i=e=>{if(e){const t=n.Breakscape.unbreakscape(g.StringUtils.string(e.value),{format:u.TextFormat.plainText,location:y.TextLocation.tag});e.type===K.TypeKey.TextFormat?r.textFormat=t:r.resourceType=t}};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:r}=this.context,i=r===u.TextFormat.bitmarkText,o=(e,t="")=>{const{chain:r,parser:i}=e;if(t+=i.text,r)for(const e of r)t=o(e,t);return t};let n=!1;for(const r of e){const{type:e,value:a}=r,s=null!=a?a:"";let l=!1;if(n||(e===K.TypeKey.BodyText&&!i&&s&&s.trim()&&(n=!0),e===K.TypeKey.PlainTextDivider&&(n=!0,l=!0)),l)t.push({type:K.TypeKey.BodyText,value:"\n"});else if(n)if(e===K.TypeKey.BodyText)t.push({type:K.TypeKey.BodyTextPlain,value:a});else{const e=o(r);t.push({type:K.TypeKey.BodyTextPlain,value:e})}else t.push(r)}return t}bitContentProcessor(e,t,r){const i={};if(!r)return i;const{bitType:o,textFormat:a}=this.context;i.title=[],i.solutions=[],i.__solutionsAst=[],i.statements=[],i.choices=[],i.responses=[],i.propertyStyleResources={},i.resources=[],i.trueFalse=[],i.markConfig=[],i.extraProperties={},i.internalComments=[];let s=!1,l=!1;const p=[];let c=n.Breakscape.EMPTY_STRING,u=n.Breakscape.EMPTY_STRING,y=n.Breakscape.EMPTY_STRING,g=n.Breakscape.EMPTY_STRING;const f=e===K.BitContentLevel.Bit,A=e===K.BitContentLevel.Card,w=e===K.BitContentLevel.Chain,S=()=>{if(c){c=d.BitmarkPegParserValidator.checkBodyPart(this.context,e,c);const t=T.BodyContentProcessor.buildBodyText(c,!1);p.push(t)}c=n.Breakscape.EMPTY_STRING};for(const o of r){const{type:r,value:a}=o;switch(r){case K.TypeKey.ItemLead:(0,B.itemLeadChainContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Instruction:case K.TypeKey.Hint:case K.TypeKey.Anchor:case K.TypeKey.SampleSolution:(0,m.defaultTagContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Reference:(0,x.referenceTagContentProcessor)(this.context,e,t,o,i,s),s=!0;break;case K.TypeKey.Title:(0,k.titleTagContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Property:(0,C.propertyContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Gap:w||S(),(0,b.gapChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.Mark:w||S(),(0,v.markChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.True:case K.TypeKey.False:w||S(),(0,_.trueFalseChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.Resource:(0,P.resourceContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.CardSet:i.cardSet=a,l=!0;break;case K.TypeKey.BodyText:case K.TypeKey.CardText:l?u=n.Breakscape.concatenate(u,a):c=n.Breakscape.concatenate(c,a);break;case K.TypeKey.BodyTextPlain:l?g=n.Breakscape.concatenate(g,a):y=n.Breakscape.concatenate(y,a);break;case K.TypeKey.FooterDivider:l&&(u=n.Breakscape.concatenate(u,a)),l=!0}}S();const E=y?T.BodyContentProcessor.buildBodyText(y,!0):void 0;if(E&&p.push(E),i.itemLead){const e=i.itemLead.length;e>0&&(i.item=i.itemLead[0]),e>1&&(i.lead=i.itemLead[1]),e>2&&(i.pageNumber=i.itemLead[2]),e>3&&(i.marginNumber=i.itemLead[e-1])}return f?i.body=T.BodyContentProcessor.process(this.context,e,o,a,t,i,p,!1):A&&(i.cardBody=T.BodyContentProcessor.process(this.context,e,o,a,t,i,p,!0)),i.footer=h.FooterContentProcessor.process(this.context,e,t,i,u,g),0===Object.keys(i.extraProperties).length&&delete i.extraProperties,0===i.title.length&&delete i.title,0===i.solutions.length&&delete i.solutions,0===i.statements.length&&delete i.statements,0===i.choices.length&&delete i.choices,0===i.responses.length&&delete i.responses,0===i.trueFalse.length&&delete i.trueFalse,0===i.markConfig.length&&delete i.markConfig,0===Object.keys(i.propertyStyleResources).length&&delete i.propertyStyleResources,0===i.resources.length&&delete i.resources,0===i.internalComments.length&&delete i.internalComments,i}buildBitLevelWarnings(){let e;return this.nonFatalWarnings.length>0&&(e=this.nonFatalWarnings,this.nonFatalWarnings=[]),e}buildBitLevelErrors(){let e;return this.nonFatalErrors.length>0&&(e=this.nonFatalErrors,this.nonFatalErrors=[]),e}splitBitContent(e,t){const r=[];let i=[];for(const o of e)t.includes(o.type)&&(i.length>0&&r.push(i),i=[]),i.push(o);return i.length>0&&r.push(i),r}addWarning(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},7203:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const i=(0,r(4718).superenum)({ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=i},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){this.source=e,this.start=t}toString(){return String(this.source)}offset(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}}static offsetStart(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start}static offsetEnd(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end}}},7667:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleTagContentProcessor=function(e,t,r,i,o){const{textFormat:l}=e,{value:p}=i,c=o.title;if(!c)return;const u=p,y=a.StringUtils.trimmedString(u.title),g=u.level.length;c[g]={titleAst:s.toAst(null!=y?y:"",{format:l,location:n.TextLocation.tag}),titleString:null!=y?y:""}},t.buildTitles=function(e,t,r){var n,a,s,l,p,c,u,y,g,d;if(r=null!=r?r:[],i.Config.isOfBitType(t,o.BitType.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:null!==(n=null==e?void 0:e.titleAst)&&void 0!==n?n:[],titleString:null!==(a=null==e?void 0:e.titleString)&&void 0!==a?a:"",level:r.length>0?r.length-1:void 0}}return{title:null!==(l=null===(s=r[1])||void 0===s?void 0:s.titleAst)&&void 0!==l?l:void 0,titleString:null!==(c=null===(p=r[1])||void 0===p?void 0:p.titleString)&&void 0!==c?c:void 0,subtitle:null!==(y=null===(u=r[2])||void 0===u?void 0:u.titleAst)&&void 0!==y?y:void 0,subtitleString:null!==(d=null===(g=r[2])||void 0===g?void 0:g.titleString)&&void 0!==d?d:void 0}};const i=r(2028),o=r(5854),n=r(6877),a=r(9681),s=new(r(777).TextParser)},7678:(e,t,r)=>{const{deserialize:i}=r(5005),{serialize:o}=r(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?i(o(e,t)):structuredClone(e):(e,t)=>i(o(e,t)),t.deserialize=i,t.serialize=o},7735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const i=r(385),o=r(6877),n=r(6132),a={format:i.TextFormat.bitmarkText,location:o.TextLocation.body,inPlaceArray:!1,v2:!1},s=new n.Breakscape;const l=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){const r=Object.assign({},a,t);return s.breakscape(e,{format:r.format,location:r.location,inPlaceArray:r.inPlaceArray,v2:r.v2})}unbreakscape(e,t){const r=Object.assign({},a,t);return s.unbreakscape(e,r)}breakscapeCode(e,t){const r=Object.assign({},a,t);return s.breakscapeCode(e,r)}concatenate(e,t){return e+t}};t.Breakscape=l},7797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const i=r(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,i.superenum)(o);t.TagConfigKey=n},7984:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=r(6772),n=r(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const r=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?null!=t?t:void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=r},8199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const i=(0,r(4718).superenum)({_flashcard:"_flashcard",_definitionList:"_definitionList",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_feedback:"_feedback",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_pronunciationTable:"_pronunciationTable",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients",_bookReferenceList:"_bookReferenceList"});t.CardSetConfigKey=i},8216:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=function(e,t,r,a,s){const{textFormat:l}=e,{value:p}=a,c=new n.TextParser,u=o.StringUtils.trimmedString(p);s.itemLead||(s.itemLead=[]);const y=c.toAst(u,{format:l,location:i.TextLocation.tag});s.itemLead.push(y)};const i=r(6877),o=r(9681),n=r(777)},8321:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=p,t.parse=u;const i=r(7735),o="8.33.5";function n(e){return"string"!=typeof e?null:i.Breakscape.unbreakscape(e)}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){function t(e){for(let i=e.length-1;i>=0;i--){const o=e[i];(r=o)&&"text"===r.type&&!r.text?e.splice(i,1):o&&Array.isArray(o.content)&&t(o.content)}var r}return Array.isArray(e)?t(e):e&&Array.isArray(e.content)&&t(e.content),e}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):u(e,{startRule:"bitmarkPlusString"})}function p(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,p.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function c(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function u(e,t){var r,i={},c=(t=void 0!==t?t:{}).grammarSource,u={version:ha,bitmarkPlusPlus:function(){var e,t;if(ca++,e=[],(t=ba())!==i)for(;t!==i;)e.push(t),t=ba();else e=i;e===i&&(e=function(){var e,t;return e=aa,t="",t=Co(),e=t,e}());ca--,e===i&&(t=i,0===ca&&fa(Gt));return e},bitmarkPlus:function(){var e,t;ca++,e=aa,t=za(),t=yn(t),e=t,ca--,t=i,0===ca&&fa(Gt);return e},bitmarkMinusMinus:function(){var e,t;ca++,e=aa,t=rs(),t=Xn(t),e=t,ca--,t=i,0===ca&&fa(Yi);return e},bitmarkPlusString:function(){var e;ca++,e=za(),ca--,0===ca&&fa(br);return e},bitmarkMinusMinusString:rs},y=ha,g="|",d="### ",T="## ",f="# ",m="code",h=":",b="bitmark++",B="bitmark--",v="JavaScript",C="• ",x="•_ ",P="•",k=" ",_="I ",K="i ",A="•A ",w="•a ",S="•+ ",E="•- ",L="\t",I="image",R="#",F="@",N="width",O="height",V="alignment",G="captionAlign",j="left",D="center",M="right",U="=",J="|latex|",$="|imageInline:",W="alignmentVertical",z="size",H="top",q="middle",X="bottom",Y="baseline",Q="sub",Z="super",ee="text-bottom",te="text-top",re="line-height",ie="font-height",oe="explicit",ne="link:",ae="extref:",se="provider:",le="xref:",pe="►",ce="symbol:",ue="footnote:",ye="footnote*:",ge="var:",de="code:",Te="timer",fe="timer:",me="duration:",he="P",be="color:",Be="|►",ve="bold",Ce="italic",xe="light",Pe="highlight",ke="strike",_e="subscript",Ke="superscript",Ae="ins",we="del",Se="underline",Ee="doubleUnderline",Le="circle",Ie="languageEmRed",Re="languageEmOrange",Fe="languageEmYellow",Ne="languageEmGreen",Oe="languageEmBlue",Ve="languageEmPurple",Ge="languageEmPink",je="languageEmBrown",De="languageEmBlack",Me="languageEmWhite",Ue="languageEmGray",Je="languageEm",$e="userUnderline",We="userDoubleUnderline",ze="userStrike",He="userCircle",qe="userHighlight",Xe="notranslate",Ye="aqua",Qe="black",Ze="blue",et="brown",tt="fuchsia",rt="lightgrey",it="gray",ot="darkgray",nt="green",at="lime",st="magenta",lt="maroon",pt="navy",ct="olive",ut="orange",yt="pink",gt="purple",dt="red",Tt="silver",ft="teal",mt="violet",ht="white",bt="yellow",Bt="*",vt="_",Ct="`",xt="!",Pt="[!",kt="]",_t="\n",Kt="\r\n",At="http",wt="s",St="://",Et="mailto:",Lt=/^[ \t]/,It=/^[0-9]/,Rt=/^[:|]/,Ft=/^[\r\u2028-\u2029]/,Nt=/^[^\n\r\u2028\u2029]/,Ot=/^[!#-;=?-[\]-_a-{}-~]/,Vt={type:"any"},Gt=ga("StyledText"),jt=ua("|",!1),Dt=ua("### ",!1),Mt=ua("## ",!1),Ut=ua("# ",!1),Jt=ua("code",!1),$t=ya([" ","\t"],!1,!1),Wt=ua(":",!1),zt=ua("bitmark++",!1),Ht=ua("bitmark--",!1),qt=ua("JavaScript",!1),Xt=ua("• ",!1),Yt=ua("•_ ",!1),Qt=ua("•",!1),Zt=ya([["0","9"]],!1,!1),er=ua(" ",!1),tr=ua("I ",!1),rr=ua("i ",!1),ir=ua("•A ",!1),or=ua("•a ",!1),nr=ua("•+ ",!1),ar=ua("•- ",!1),sr=ua("\t",!1),lr=ua("image",!1),pr=ua("#",!1),cr=ua("@",!1),ur=ya([":","|"],!1,!1),yr=ua("width",!1),gr=ua("height",!1),dr=ua("alignment",!1),Tr=ua("captionAlign",!1),fr=ua("left",!1),mr=ua("center",!1),hr=ua("right",!1),br=ga("StyledString"),Br=ua("=",!1),vr=ua("|latex|",!1),Cr=ua("|imageInline:",!1),xr=ua("alignmentVertical",!1),Pr=ua("size",!1),kr=ua("top",!1),_r=ua("middle",!1),Kr=ua("bottom",!1),Ar=ua("baseline",!1),wr=ua("sub",!1),Sr=ua("super",!1),Er=ua("text-bottom",!1),Lr=ua("text-top",!1),Ir=ua("line-height",!1),Rr=ua("font-height",!1),Fr=ua("explicit",!1),Nr=ua("link:",!1),Or=ua("extref:",!1),Vr=ua("provider:",!1),Gr=ua("xref:",!1),jr=ua("►",!1),Dr=ua("symbol:",!1),Mr=ua("footnote:",!1),Ur=ua("footnote*:",!1),Jr=ua("var:",!1),$r=ua("code:",!1),Wr=ua("timer",!1),zr=ua("timer:",!1),Hr=ua("duration:",!1),qr=ua("P",!1),Xr=ua("color:",!1),Yr=ua("|►",!1),Qr=ua("bold",!1),Zr=ua("italic",!1),ei=ua("light",!1),ti=ua("highlight",!1),ri=ua("strike",!1),ii=ua("subscript",!1),oi=ua("superscript",!1),ni=ua("ins",!1),ai=ua("del",!1),si=ua("underline",!1),li=ua("doubleUnderline",!1),pi=ua("circle",!1),ci=ua("languageEmRed",!1),ui=ua("languageEmOrange",!1),yi=ua("languageEmYellow",!1),gi=ua("languageEmGreen",!1),di=ua("languageEmBlue",!1),Ti=ua("languageEmPurple",!1),fi=ua("languageEmPink",!1),mi=ua("languageEmBrown",!1),hi=ua("languageEmBlack",!1),bi=ua("languageEmWhite",!1),Bi=ua("languageEmGray",!1),vi=ua("languageEm",!1),Ci=ua("userUnderline",!1),xi=ua("userDoubleUnderline",!1),Pi=ua("userStrike",!1),ki=ua("userCircle",!1),_i=ua("userHighlight",!1),Ki=ua("notranslate",!1),Ai=ua("aqua",!1),wi=ua("black",!1),Si=ua("blue",!1),Ei=ua("brown",!1),Li=ua("fuchsia",!1),Ii=ua("lightgrey",!1),Ri=ua("gray",!1),Fi=ua("darkgray",!1),Ni=ua("green",!1),Oi=ua("lime",!1),Vi=ua("magenta",!1),Gi=ua("maroon",!1),ji=ua("navy",!1),Di=ua("olive",!1),Mi=ua("orange",!1),Ui=ua("pink",!1),Ji=ua("purple",!1),$i=ua("red",!1),Wi=ua("silver",!1),zi=ua("teal",!1),Hi=ua("violet",!1),qi=ua("white",!1),Xi=ua("yellow",!1),Yi=ga("MinimalStyledText"),Qi=ga("MinimalStyledString"),Zi=ua("*",!1),eo=ua("_",!1),to=ua("`",!1),ro=ua("!",!1),io=ua("[!",!1),oo=ua("]",!1),no=ga("Line Terminator"),ao=ua("\n",!1),so=ua("\r\n",!1),lo=ya(["\r",["\u2028","\u2029"]],!1,!1),po=(ga("whitespace in line"),ga("space"),ga("language tag separator"),ga("white space, separator"),ya(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),ya(["\n","\r","\u2028","\u2029"],!1,!1),ya(["\n","\r","\u2028","\u2029"],!0,!1)),co=(ya(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),ua("http",!1)),uo=ua("s",!1),yo=ua("://",!1),go=ua("mailto:",!1),To=ya(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),fo=function(){return o},mo=function(e){return s(Object.assign({},e))},ho=function(e){let t=Object.assign({},e);a(t);return s(t)},bo=function(e){return Object.assign({},e)},Bo=function(e){return Object.assign({},e)},vo=function(e){return s(Object.assign({},e))},Co=function(){return[]},xo=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Po=function(e){return e},ko=function(e,t){return Object.assign(Object.assign({},e),{content:t})},_o=function(){return{type:"codeBlock",language:""}},Ko=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},Ao=function(e){return[{type:"text",text:n(e.trim())}]},wo=function(e){return e},So=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Eo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Lo=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Io=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Ro=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Fo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},No=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Oo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Vo=function(){return{type:"bulletList"}},Go=function(){return{type:"noBulletList"}},jo=function(){return{type:"orderedList"}},Do=function(){return{type:"orderedListRoman"}},Mo=function(){return{type:"orderedListRomanLower"}},Uo=function(){return{type:"letteredList"}},Jo=function(){return{type:"letteredListLower"}},$o=function(){return{type:"taskList"}},Wo=function(e,t,r,i){return i},zo=function(e,t,r,i){let o="bulletList";const n=e.match(/•([0-9]+)([Ii]?) /);let a=1;if(n&&(o="orderedList",n.length>1&&(a=Number(n[1])),n.length>2)){let e=n[2];"I"==e&&(o="orderedListRoman"),"i"==e&&(o="orderedListRomanLower")}"•_ "==e&&(o="noBulletList"),"•A "==e&&(o="letteredList"),"•a "==e&&(o="letteredListLower"),"•+ "!=e&&"•- "!=e||(o="taskList");let s=[{type:"paragraph",attrs:{},content:l((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:a},content:i};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}s.push(e)}let p="listItem",c=null;if("taskList"==o){p="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:p,attrs:c,content:s,_tempParsingParent:o,_tempListStart:a}:{type:p,content:s,_tempParsingParent:o,_tempListStart:a}},Ho=function(e){return e},qo=function(e){return e.join("")===Cs},Xo=function(e){return e.length>Cs.length},Yo=function(e){vs.push(Cs),Cs=e.join("")},Qo=function(){return Cs=vs.pop(),!0},Zo=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},en=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},tn=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},rn=function(e){return e},on=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let a=i.captionAlign||"left";delete i.captionAlign;let s=i.alt||null;delete i.alt;let l=i.caption||null;delete i.caption;let p=i.align||"center";delete i.align;let c=void 0===i.zoomDisabled||("boolean"==typeof i.zoomDisabled?i.zoomDisabled:"true"===String(i.zoomDisabled).toLowerCase());return delete i.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:a,src:t,alt:n(s),title:n(l),class:p,zoomDisabled:c},i)}},nn=function(e){return e},an=function(e){return{comment:e}},sn=function(e,t){return{[e]:parseInt(t)}},ln=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}},pn=function(e,t){return{[e]:t}},cn=function(e,t){return{[e]:t}},un=function(e){return{[e]:!0}},yn=function(e){return[{type:"paragraph",content:e,attrs:{}}]},gn=function(e,t){return s(e?[e,...t.flat()]:t.flat())},dn=function(){return{type:"hardBreak"}},Tn=function(e){return{text:n(e),type:"text"}},fn=function(e){return{index:+e,type:"bit"}},mn=function(e){return{attrs:{formula:n(e)},type:"latex"}},hn=function(e,t,r){return{attrs:Object.assign(Object.assign({alt:e,src:(t.pr+t.t).trim()},Object.assign({},...r)),{zoomDisabled:!0}),type:"imageInline"}},bn=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Bn=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},vn=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Cn=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},xn=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Pn=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},kn=function(e){return e},_n=function(e){return e},Kn=function(e){return{comment:e}},An=function(e,t){return{[e]:parseInt(t)}},wn=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}},Sn=function(e,t){return{[e]:t}},En=function(e,t){return{[e]:t}},Ln=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},In=function(e,t,r){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:r.trim()}}},Rn=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}},Fn=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}},Nn=function(e){return{type:"ref",attrs:{reference:e.trim()}}},On=function(e,t){const r=Object.assign({},...t);return{type:"symbol",attrs:Object.assign({src:e.trim()},r)}},Vn=function(e){return{type:"footnote",attrs:{content:l(e.trim())}}},Gn=function(e){return{type:"footnote*",attrs:{content:l(e.trim())}}},jn=function(e){return{type:"var",attrs:{name:e.trim()}}},Dn=function(){return{type:"code",attrs:{language:"plain text"}}},Mn=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},Un=function(){return{type:"timer",attrs:{name:""}}},Jn=function(e){return{type:"timer",attrs:{name:e.trim()}}},$n=function(e){return{type:"duration",attrs:{duration:e}}},Wn=function(e){return{type:"color",attrs:{color:e}}},zn=function(e){return{type:e}},Hn=function(e){return{type:"comment",comment:e}},qn=function(e){return e.trim()},Xn=function(e){return[{type:"paragraph",content:e,attrs:{}}]},Yn=function(e,t){return s(e?[e,...t.flat()]:t.flat())},Qn=function(){return{type:"hardBreak"}},Zn=function(e){return{text:n(e),type:"text"}},ea=function(e){return{index:+e,type:"bit"}},ta=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},ra=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},ia=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},oa=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},na=function(e,t){return{pr:e,t}},aa=0|t.peg$currPos,sa=[{line:1,column:1}],la=aa,pa=t.peg$maxFailExpected||[],ca=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');y=u[t.startRule]}function ua(e,t){return{type:"literal",text:e,ignoreCase:t}}function ya(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function ga(e){return{type:"other",description:e}}function da(t){var r,i=sa[t];if(i)return i;if(t>=sa.length)r=sa.length-1;else for(r=t;!sa[--r];);for(i={line:(i=sa[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return sa[t]=i,i}function Ta(e,t,r){var i=da(e),o=da(t),n={source:c,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&c&&"function"==typeof c.offset&&(n.start=c.offset(n.start),n.end=c.offset(n.end)),n}function fa(e){aa<la||(aa>la&&(la=aa,pa=[]),pa.push(e))}function ma(e,t,r){return new p(p.buildMessage(e,t),e,t,r)}function ha(){var t,r,o;for(t=aa,r=[],e.length>aa?(o=e.charAt(aa),aa++):(o=i,0===ca&&fa(Vt));o!==i;)r.push(o),e.length>aa?(o=e.charAt(aa),aa++):(o=i,0===ca&&fa(Vt));return t=r=fo()}function ba(){var t,r;return t=aa,r=function(){var t,r,o,n,a;if(t=aa,r=Ca(),r!==i){for(o=aa,n=[],a=ms();a!==i;)n.push(a),a=ms();o=e.substring(o,aa),(n=hs())!==i?((a=fs())===i&&(a=null),t=xo(r,o)):(aa=t,t=i)}else aa=t,t=i;return t}(),r!==i&&(r=mo(r)),(t=r)===i&&(t=aa,r=function(){var e,t,r,o;if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=_a(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Vo());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=So(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=Ka(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Go());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Eo(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=Aa(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=jo());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Lo(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=wa(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Do());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Io(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=Sa(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Mo());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Ro(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=Ea(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Uo());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Fo(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i){if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=La(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=Jo());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=No(t,r)):(aa=e,e=i)}else aa=e,e=i;if(e===i)if(e=aa,t=function(){var e,t,r;e=aa,t=aa,ca++,r=Ia(),ca--,r!==i?(aa=t,t=void 0):t=i;t!==i&&(t=$o());return e=t,e}(),t!==i){if(r=[],(o=Fa())!==i)for(;o!==i;)r.push(o),o=Fa();else r=i;r!==i?((o=fs())===i&&(o=null),e=Oo(t,r)):(aa=e,e=i)}else aa=e,e=i}}}}}}return e}(),r!==i&&(r=ho(r)),(t=r)===i&&(t=aa,(r=Ma())!==i&&(r=bo(r)),(t=r)===i&&(t=aa,r=function(){var t,r,o;t=aa,r=Pa(),r!==i?(o=function(){var t,r,o,n;t=aa,r=aa,o=[],n=ka();for(;n!==i;)o.push(n),n=ka();return r=e.substring(r,aa),r=Ao(r),t=r,t}(),t=ko(r,o)):(aa=t,t=i);return t}(),r!==i&&(r=Bo(r)),(t=r)===i&&(t=aa,r=function(){var e,t,r;e=aa,t=aa,ca++,r=Ba(),ca--,r===i?t=void 0:(aa=t,t=i);t!==i&&(r=Va())!==i?e=Zo(r):(aa=e,e=i);e===i&&(e=aa,(t=ja())!==i&&(r=Va())!==i?e=en(r):(aa=e,e=i),e===i&&(e=aa,(t=ja())!==i?e=tn(r=""):(aa=e,e=i)));return e}(),r!==i&&(r=vo(r)),t=r)))),t}function Ba(){var e;return(e=Ca())===i&&(e=Ra())===i&&(e=Ma())===i&&(e=Pa())===i&&(e=ja()),e}function va(){var t;return 124===e.charCodeAt(aa)?(t=g,aa++):(t=i,0===ca&&fa(jt)),t}function Ca(){var t;return e.substr(aa,4)===d?(t=d,aa+=4):(t=i,0===ca&&fa(Dt)),t===i&&(e.substr(aa,3)===T?(t=T,aa+=3):(t=i,0===ca&&fa(Mt)),t===i&&(e.substr(aa,2)===f?(t=f,aa+=2):(t=i,0===ca&&fa(Ut)))),t}function xa(){var t,r;return t=aa,va()!==i?(r=function(){var t;return e.substr(aa,4)===m?(t=m,aa+=4):(t=i,0===ca&&fa(Jt)),t}(),r!==i?t=Po(r):(aa=t,t=i)):(aa=t,t=i),t}function Pa(){var t,r,o,n,a,s,l;if(t=aa,xa()!==i){for(r=aa,o=aa,n=[],a=e.charAt(aa),Lt.test(a)?aa++:(a=i,0===ca&&fa($t));a!==i;)n.push(a),a=e.charAt(aa),Lt.test(a)?aa++:(a=i,0===ca&&fa($t));(a=hs())!==i?o=n=[n,a]:(aa=o,o=i),(r=o!==i?e.substring(r,aa):o)!==i?t=_o():(aa=t,t=i)}else aa=t,t=i;if(t===i)if(t=aa,xa()!==i)if(58===e.charCodeAt(aa)?(r=h,aa++):(r=i,0===ca&&fa(Wt)),r!==i)if(o=function(){var t,r,o;e.substr(aa,9)===b?(t=b,aa+=9):(t=i,0===ca&&fa(zt));if(t===i&&(e.substr(aa,9)===B?(t=B,aa+=9):(t=i,0===ca&&fa(Ht)),t===i&&(e.substr(aa,10)===v?(t=v,aa+=10):(t=i,0===ca&&fa(qt)),t===i))){if(t=aa,r=[],(o=ms())!==i)for(;o!==i;)r.push(o),o=ms();else r=i;(t=r!==i?e.substring(t,aa):r)===i&&(t="")}return t}(),o!==i){for(n=aa,a=aa,s=[],l=e.charAt(aa),Lt.test(l)?aa++:(l=i,0===ca&&fa($t));l!==i;)s.push(l),l=e.charAt(aa),Lt.test(l)?aa++:(l=i,0===ca&&fa($t));(l=hs())!==i?a=s=[s,l]:(aa=a,a=i),(n=a!==i?e.substring(n,aa):a)!==i?t=Ko(o):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;else aa=t,t=i;return t}function ka(){var t,r,o,n,a,s;if(t=aa,r=aa,ca++,o=Ba(),ca--,o===i?r=void 0:(aa=r,r=i),r!==i){if(o=aa,n=aa,a=[],(s=ms())!==i)for(;s!==i;)a.push(s),s=ms();else a=i;a!==i&&(s=hs())!==i?n=a=[a,s]:(aa=n,n=i),(o=n!==i?e.substring(o,aa):n)!==i?t=wo(o):(aa=t,t=i)}else aa=t,t=i;return t===i&&(t=fs()),t}function _a(){var t;return e.substr(aa,2)===C?(t=C,aa+=2):(t=i,0===ca&&fa(Xt)),t}function Ka(){var t;return e.substr(aa,3)===x?(t=x,aa+=3):(t=i,0===ca&&fa(Yt)),t}function Aa(){var t,r,o,n,a;if(t=aa,r=aa,8226===e.charCodeAt(aa)?(o=P,aa++):(o=i,0===ca&&fa(Qt)),o!==i){if(n=[],a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt));else n=i;n!==i?(32===e.charCodeAt(aa)?(a=k,aa++):(a=i,0===ca&&fa(er)),a!==i?r=o=[o,n,a]:(aa=r,r=i)):(aa=r,r=i)}else aa=r,r=i;return t=r!==i?e.substring(t,aa):r}function wa(){var t,r,o,n,a;if(t=aa,r=aa,8226===e.charCodeAt(aa)?(o=P,aa++):(o=i,0===ca&&fa(Qt)),o!==i){if(n=[],a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt));else n=i;n!==i?(e.substr(aa,2)===_?(a=_,aa+=2):(a=i,0===ca&&fa(tr)),a!==i?r=o=[o,n,a]:(aa=r,r=i)):(aa=r,r=i)}else aa=r,r=i;return t=r!==i?e.substring(t,aa):r}function Sa(){var t,r,o,n,a;if(t=aa,r=aa,8226===e.charCodeAt(aa)?(o=P,aa++):(o=i,0===ca&&fa(Qt)),o!==i){if(n=[],a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt));else n=i;n!==i?(e.substr(aa,2)===K?(a=K,aa+=2):(a=i,0===ca&&fa(rr)),a!==i?r=o=[o,n,a]:(aa=r,r=i)):(aa=r,r=i)}else aa=r,r=i;return t=r!==i?e.substring(t,aa):r}function Ea(){var t;return e.substr(aa,3)===A?(t=A,aa+=3):(t=i,0===ca&&fa(ir)),t}function La(){var t;return e.substr(aa,3)===w?(t=w,aa+=3):(t=i,0===ca&&fa(or)),t}function Ia(){var t;return e.substr(aa,3)===S?(t=S,aa+=3):(t=i,0===ca&&fa(nr)),t===i&&(e.substr(aa,3)===E?(t=E,aa+=3):(t=i,0===ca&&fa(ar))),t}function Ra(){var e;return(e=_a())===i&&(e=Ka())===i&&(e=Aa())===i&&(e=wa())===i&&(e=Sa())===i&&(e=Ea())===i&&(e=La())===i&&(e=Ia()),e}function Fa(){var t,r,o,n,a,s,l,p;if(t=aa,Oa()!==i)if((r=Ra())!==i){for(o=aa,n=aa,a=[],s=aa,l=aa,ca++,p=fs(),ca--,p===i?l=void 0:(aa=l,l=i),l!==i?(e.length>aa?(p=e.charAt(aa),aa++):(p=i,0===ca&&fa(Vt)),p!==i?s=l=[l,p]:(aa=s,s=i)):(aa=s,s=i);s!==i;)a.push(s),s=aa,l=aa,ca++,p=fs(),ca--,p===i?l=void 0:(aa=l,l=i),l!==i?(e.length>aa?(p=e.charAt(aa),aa++):(p=i,0===ca&&fa(Vt)),p!==i?s=l=[l,p]:(aa=s,s=i)):(aa=s,s=i);for((s=fs())===i&&(s=null),n=a=[a,s],o=e.substring(o,aa),n=[],a=Na();a!==i;)n.push(a),a=Na();if(a=aa,s=function(){var t,r,o,n;t=aa,ca++,r=aa,o=[],9===e.charCodeAt(aa)?(n=L,aa++):(n=i,0===ca&&fa(sr));if(n!==i)for(;n!==i;)o.push(n),9===e.charCodeAt(aa)?(n=L,aa++):(n=i,0===ca&&fa(sr));else o=i;o!==i?(n=(n=Xo(o))?void 0:i)!==i?r=Yo(o):(aa=r,r=i):(aa=r,r=i);ca--,r!==i?(aa=t,t=void 0):t=i;return t}(),s!==i){for(l=[],p=Fa();p!==i;)l.push(p),p=Fa();p=function(){var e;e=Qo(),e=e?void 0:i;return e}(),p!==i?a=Wo(r,o,n,l):(aa=a,a=i)}else aa=a,a=i;a===i&&(a=null),t=zo(r,o,n,a)}else aa=t,t=i;else aa=t,t=i;return t}function Na(){var t,r,o,n,a,s,l,p,c,u;if(t=aa,r=aa,ca++,o=function(){var t,r,o;t=aa,r=[],o=e.charAt(aa),Lt.test(o)?aa++:(o=i,0===ca&&fa($t));for(;o!==i;)r.push(o),o=e.charAt(aa),Lt.test(o)?aa++:(o=i,0===ca&&fa($t));o=fs(),o!==i?t=r=[r,o]:(aa=t,t=i);return t}(),ca--,o===i?r=void 0:(aa=r,r=i),r!==i)if((o=Oa())!==i)if(n=aa,ca++,a=Ra(),ca--,a===i?n=void 0:(aa=n,n=i),n!==i){if(a=aa,s=aa,l=[],p=aa,c=aa,ca++,u=fs(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(e.length>aa?(u=e.charAt(aa),aa++):(u=i,0===ca&&fa(Vt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=aa,c=aa,ca++,u=fs(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(e.length>aa?(u=e.charAt(aa),aa++):(u=i,0===ca&&fa(Vt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i);else l=i;l!==i&&(p=hs())!==i?s=l=[l,p]:(aa=s,s=i),(a=s!==i?e.substring(a,aa):s)!==i?t=Ho(a):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;else aa=t,t=i;return t}function Oa(){var t,r,o;for(t=aa,r=[],9===e.charCodeAt(aa)?(o=L,aa++):(o=i,0===ca&&fa(sr));o!==i;)r.push(o),9===e.charCodeAt(aa)?(o=L,aa++):(o=i,0===ca&&fa(sr));return(o=(o=qo(r))?void 0:i)!==i?t=r=[r,o]:(aa=t,t=i),t}function Va(){var t,r,o;if(t=aa,r=[],(o=Ga())!==i)for(;o!==i;)r.push(o),o=Ga();else r=i;return t=r!==i?e.substring(t,aa):r}function Ga(){var t,r,o,n,a,s;if(t=aa,r=aa,ca++,o=Ba(),ca--,o===i?r=void 0:(aa=r,r=i),r!==i){if(o=aa,n=aa,a=[],(s=ms())!==i)for(;s!==i;)a.push(s),s=ms();else a=i;a!==i&&(s=hs())!==i?n=a=[a,s]:(aa=n,n=i),(o=n!==i?e.substring(o,aa):n)!==i?t=r=[r,o]:(aa=t,t=i)}else aa=t,t=i;return t===i&&(t=fs()),t}function ja(){var t,r,o,n,a,s;if(t=aa,(r=va())!==i){for(o=aa,n=aa,a=[],s=e.charAt(aa),Lt.test(s)?aa++:(s=i,0===ca&&fa($t));s!==i;)a.push(s),s=e.charAt(aa),Lt.test(s)?aa++:(s=i,0===ca&&fa($t));(s=hs())!==i?n=a=[a,s]:(aa=n,n=i),(o=n!==i?e.substring(o,aa):n)!==i?((n=fs())===i&&(n=null),t=r=[r,o,n]):(aa=t,t=i)}else aa=t,t=i;return t}function Da(){var t,r;return t=aa,va()!==i?(r=function(){var t;return e.substr(aa,5)===I?(t=I,aa+=5):(t=i,0===ca&&fa(lr)),t}(),r!==i?t=rn(r):(aa=t,t=i)):(aa=t,t=i),t}function Ma(){var t,r,o,n,a,s,l,p,c,u;if(t=aa,(r=Da())!==i)if(58===e.charCodeAt(aa)?(o=h,aa++):(o=i,0===ca&&fa(Wt)),o!==i)if(32===e.charCodeAt(aa)?(n=k,aa++):(n=i,0===ca&&fa(er)),n===i&&(n=null),a=function(){var t,r,o,n,a,s,l,p,c;t=aa,r=aa,e.substr(aa,4)===At?(o=At,aa+=4):(o=i,0===ca&&fa(co));if(o!==i)if(115===e.charCodeAt(aa)?(n=wt,aa++):(n=i,0===ca&&fa(uo)),n===i&&(n=null),e.substr(aa,3)===St?(a=St,aa+=3):(a=i,0===ca&&fa(yo)),a!==i){for(s=[],l=aa,p=aa,ca++,c=va(),ca--,c===i?p=void 0:(aa=p,p=i),p!==i&&(c=Bs())!==i?l=p=[p,c]:(aa=l,l=i);l!==i;)s.push(l),l=aa,p=aa,ca++,c=va(),ca--,c===i?p=void 0:(aa=p,p=i),p!==i&&(c=Bs())!==i?l=p=[p,c]:(aa=l,l=i);r=o=[o,n,a,s]}else aa=r,r=i;else aa=r,r=i;t=r!==i?e.substring(t,aa):r;return t}(),a!==i)if(va()!==i){for(s=Ua(),l=aa,p=aa,c=[],u=e.charAt(aa),Lt.test(u)?aa++:(u=i,0===ca&&fa($t));u!==i;)c.push(u),u=e.charAt(aa),Lt.test(u)?aa++:(u=i,0===ca&&fa($t));(u=hs())!==i?p=c=[c,u]:(aa=p,p=i),(l=p!==i?e.substring(l,aa):p)!==i?((p=fs())===i&&(p=null),t=on(r,a,s)):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;else aa=t,t=i;else aa=t,t=i;return t}function Ua(){var e,t,r;for(e=aa,t=[],r=Ja();r!==i;)t.push(r),r=Ja();return e=t=nn(t)}function Ja(){var t,r,o,n,a,s,l,p,c,u;if(t=aa,35===e.charCodeAt(aa)?(r=R,aa++):(r=i,0===ca&&fa(pr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=an(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),(o=$a())!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));if(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(u=e.charAt(aa),It.test(u)?aa++:(u=i,0===ca&&fa(Zt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(u=e.charAt(aa),It.test(u)?aa++:(u=i,0===ca&&fa(Zt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i);else l=i;(s=l!==i?e.substring(s,aa):l)!==i&&(l=va())!==i?t=sn(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),(o=$a())!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));for(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);s=e.substring(s,aa),(l=va())!==i?t=ln(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),(o=Wa())!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s=function(){var t;e.substr(aa,4)===j?(t=j,aa+=4):(t=i,0===ca&&fa(fr));t===i&&(e.substr(aa,6)===D?(t=D,aa+=6):(t=i,0===ca&&fa(mr)),t===i&&(e.substr(aa,5)===M?(t=M,aa+=5):(t=i,0===ca&&fa(hr))));return t}(),s!==i&&(l=va())!==i?t=pn(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i){for(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),o=aa,n=[],a=aa,s=aa,ca++,l=e.charAt(aa),Rt.test(l)?aa++:(l=i,0===ca&&fa(ur)),l===i&&(l=aa,(p=Wa())!==i?(58===e.charCodeAt(aa)?(c=h,aa++):(c=i,0===ca&&fa(Wt)),c!==i?l=p=[p,c]:(aa=l,l=i)):(aa=l,l=i)),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=e.charAt(aa),Rt.test(l)?aa++:(l=i,0===ca&&fa(ur)),l===i&&(l=aa,(p=Wa())!==i?(58===e.charCodeAt(aa)?(c=h,aa++):(c=i,0===ca&&fa(Wt)),c!==i?l=p=[p,c]:(aa=l,l=i)):(aa=l,l=i)),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);if(o=e.substring(o,aa),58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(32===e.charCodeAt(aa)?(a=k,aa++):(a=i,0===ca&&fa(er)),a===i&&(a=null),s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);s=e.substring(s,aa),(l=va())!==i?t=cn(o,s):(aa=t,t=i)}else aa=t,t=i;if(t===i){for(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),o=aa,n=[],a=aa,s=aa,ca++,(l=va())===i&&(l=aa,(p=Wa())!==i?(58===e.charCodeAt(aa)?(c=h,aa++):(c=i,0===ca&&fa(Wt)),c!==i?l=p=[p,c]:(aa=l,l=i)):(aa=l,l=i)),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,(l=va())===i&&(l=aa,(p=Wa())!==i?(58===e.charCodeAt(aa)?(c=h,aa++):(c=i,0===ca&&fa(Wt)),c!==i?l=p=[p,c]:(aa=l,l=i)):(aa=l,l=i)),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=un(o):(aa=t,t=i)}}}}}return t}function $a(){var t;return e.substr(aa,5)===N?(t=N,aa+=5):(t=i,0===ca&&fa(yr)),t===i&&(e.substr(aa,6)===O?(t=O,aa+=6):(t=i,0===ca&&fa(gr))),t}function Wa(){var t;return e.substr(aa,9)===V?(t=V,aa+=9):(t=i,0===ca&&fa(dr)),t===i&&(e.substr(aa,12)===G?(t=G,aa+=12):(t=i,0===ca&&fa(Tr))),t}function za(){var e,t,r,o;for(e=aa,(t=Ha())===i&&(t=null),r=[],(o=Ya())===i&&(o=Ha());o!==i;)r.push(o),(o=Ya())===i&&(o=Ha());return e=gn(t,r)}function Ha(){var t,r,o,n,a,s,l;if(t=aa,(r=fs())!==i&&(r=dn()),(t=r)===i){if(t=aa,r=aa,o=[],n=aa,(a=Qa())===i&&(a=null),s=aa,ca++,l=Ya(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?n=a=[a,s,l]:(aa=n,n=i),n===i&&(n=aa,(a=Qa())!==i?(s=aa,ca++,l=Ya(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=aa,(a=Qa())===i&&(a=null),s=aa,ca++,l=Ya(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?n=a=[a,s,l]:(aa=n,n=i),n===i&&(n=aa,(a=Qa())!==i?(s=aa,ca++,l=Ya(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i));else o=i;(r=o!==i?e.substring(r,aa):o)!==i&&(r=Tn(r)),t=r}return t}function qa(){var t;return 61===e.charCodeAt(aa)?(t=U,aa++):(t=i,0===ca&&fa(Br)),t}function Xa(){var e,t,r;return e=aa,(t=qa())!==i&&(r=qa())!==i?e=t=[t,r]:(aa=e,e=i),e}function Ya(){var t,r,o,n,a,s,l,p;if(t=aa,(r=ys())!==i){if(o=aa,n=[],a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(aa),It.test(a)?aa++:(a=i,0===ca&&fa(Zt));else n=i;(o=n!==i?e.substring(o,aa):n)!==i&&(n=gs())!==i?t=fn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=Xa())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=Xa())!==i?(e.substr(aa,7)===J?(a=J,aa+=7):(a=i,0===ca&&fa(vr)),a!==i?t=mn(o):(aa=t,t=i)):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=Xa())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=Xa())!==i?(e.substr(aa,13)===$?(a=$,aa+=13):(a=i,0===ca&&fa(Cr)),a!==i&&(s=bs())!==i?(124===e.charCodeAt(aa)?(l=g,aa++):(l=i,0===ca&&fa(jt)),l!==i?(p=function(){var e,t,r;e=aa,t=[],r=Za();for(;r!==i;)t.push(r),r=Za();return t=_n(t),e=t,e}(),t=hn(o,s,p)):(aa=t,t=i)):(aa=t,t=i)):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=Xa())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=Xa(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=Xa())!==i?(a=function(){var t,r,o,n;t=aa,124===e.charCodeAt(aa)?(r=g,aa++):(r=i,0===ca&&fa(jt));if(r!==i){if(o=[],(n=es())!==i)for(;n!==i;)o.push(n),n=es();else o=i;o!==i?t=kn(o):(aa=t,t=i)}else aa=t,t=i;return t}(),a!==i?t=bn(o,a):(aa=t,t=i)):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=ls())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=ls(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=ls(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=ls())!==i?t=Bn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=ps())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=ps(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=ps(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=ps())!==i?t=vn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=cs())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=cs(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=cs(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=cs())!==i?t=Cn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,(r=us())!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=us(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=us(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?(e.length>aa?(l=e.charAt(aa),aa++):(l=i,0===ca&&fa(Vt)),l!==i?a=s=[s,l]:(aa=a,a=i)):(aa=a,a=i);o=e.substring(o,aa),(n=us())!==i?t=xn(o):(aa=t,t=i)}else aa=t,t=i;t===i&&(t=aa,(r=bs())!==i&&(r=Pn(r)),t=r)}}}}}}}return t}function Qa(){var t,r,o,n,a;if(t=aa,r=aa,(o=Xa())!==i){if(n=[],(a=qa())!==i)for(;a!==i;)n.push(a),a=qa();else n=i;n!==i?r=o=[o,n]:(aa=r,r=i)}else aa=r,r=i;if((t=r!==i?e.substring(t,aa):r)===i){if(t=aa,r=aa,(o=cs())!==i){if(n=[],(a=as())!==i)for(;a!==i;)n.push(a),a=as();else n=i;n!==i?r=o=[o,n]:(aa=r,r=i)}else aa=r,r=i;if((t=r!==i?e.substring(t,aa):r)===i){if(t=aa,r=aa,(o=us())!==i){if(n=[],(a=ss())!==i)for(;a!==i;)n.push(a),a=ss();else n=i;n!==i?r=o=[o,n]:(aa=r,r=i)}else aa=r,r=i;t=r!==i?e.substring(t,aa):r}}return t}function Za(){var t,r,o,n,a,s,l,p,c,u;if(t=aa,35===e.charCodeAt(aa)?(r=R,aa++):(r=i,0===ca&&fa(pr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Kn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),(o=$a())!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));if(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(u=e.charAt(aa),It.test(u)?aa++:(u=i,0===ca&&fa(Zt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i?(u=e.charAt(aa),It.test(u)?aa++:(u=i,0===ca&&fa(Zt)),u!==i?p=c=[c,u]:(aa=p,p=i)):(aa=p,p=i);else l=i;(s=l!==i?e.substring(s,aa):l)!==i&&(l=va())!==i?t=An(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),(o=$a())!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));for(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);s=e.substring(s,aa),(l=va())!==i?t=wn(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i){if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),e.substr(aa,17)===W?(o=W,aa+=17):(o=i,0===ca&&fa(xr)),o!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s=function(){var t;e.substr(aa,3)===H?(t=H,aa+=3):(t=i,0===ca&&fa(kr));t===i&&(e.substr(aa,6)===q?(t=q,aa+=6):(t=i,0===ca&&fa(_r)),t===i&&(e.substr(aa,6)===X?(t=X,aa+=6):(t=i,0===ca&&fa(Kr)),t===i&&(e.substr(aa,8)===Y?(t=Y,aa+=8):(t=i,0===ca&&fa(Ar)),t===i&&(e.substr(aa,3)===Q?(t=Q,aa+=3):(t=i,0===ca&&fa(wr)),t===i&&(e.substr(aa,5)===Z?(t=Z,aa+=5):(t=i,0===ca&&fa(Sr)),t===i&&(e.substr(aa,11)===ee?(t=ee,aa+=11):(t=i,0===ca&&fa(Er)),t===i&&(e.substr(aa,8)===te?(t=te,aa+=8):(t=i,0===ca&&fa(Lr)))))))));return t}(),s!==i&&(l=va())!==i?t=Sn(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i;if(t===i)if(t=aa,64===e.charCodeAt(aa)?(r=F,aa++):(r=i,0===ca&&fa(cr)),r===i&&(r=null),e.substr(aa,4)===z?(o=z,aa+=4):(o=i,0===ca&&fa(Pr)),o!==i)if(58===e.charCodeAt(aa)?(n=h,aa++):(n=i,0===ca&&fa(Wt)),n!==i){for(a=[],32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s!==i;)a.push(s),32===e.charCodeAt(aa)?(s=k,aa++):(s=i,0===ca&&fa(er));s=function(){var t;e.substr(aa,11)===re?(t=re,aa+=11):(t=i,0===ca&&fa(Ir));t===i&&(e.substr(aa,11)===ie?(t=ie,aa+=11):(t=i,0===ca&&fa(Rr)),t===i&&(e.substr(aa,5)===Z?(t=Z,aa+=5):(t=i,0===ca&&fa(Sr)),t===i&&(e.substr(aa,3)===Q?(t=Q,aa+=3):(t=i,0===ca&&fa(wr)),t===i&&(e.substr(aa,8)===oe?(t=oe,aa+=8):(t=i,0===ca&&fa(Fr))))));return t}(),s!==i&&(l=va())!==i?t=En(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i}}}return t}function es(){var t,r,o,n,a,s,l,p,c,u,y;if(t=aa,e.substr(aa,5)===ne?(r=ne,aa+=5):(r=i,0===ca&&fa(Nr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Ln(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,7)===ae?(r=ae,aa+=7):(r=i,0===ca&&fa(Or)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);if(o=e.substring(o,aa),n=function(){var e,t;e=[],t=ts();for(;t!==i;)e.push(t),t=ts();return e}(),(a=va())!==i)if(e.substr(aa,9)===se?(s=se,aa+=9):(s=i,0===ca&&fa(Vr)),s!==i){for(l=aa,p=[],c=aa,u=aa,ca++,y=va(),ca--,y===i?u=void 0:(aa=u,u=i),u!==i&&(y=ms())!==i?c=u=[u,y]:(aa=c,c=i);c!==i;)p.push(c),c=aa,u=aa,ca++,y=va(),ca--,y===i?u=void 0:(aa=u,u=i),u!==i&&(y=ms())!==i?c=u=[u,y]:(aa=c,c=i);l=e.substring(l,aa),(p=va())!==i?t=In(o,n,l):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,5)===le?(r=le,aa+=5):(r=i,0===ca&&fa(Gr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);if(o=e.substring(o,aa),(n=va())!==i)if(9658===e.charCodeAt(aa)?(a=pe,aa++):(a=i,0===ca&&fa(jr)),a!==i){for(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);s=e.substring(s,aa),(l=va())!==i?t=Rn(o,s):(aa=t,t=i)}else aa=t,t=i;else aa=t,t=i}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,5)===le?(r=le,aa+=5):(r=i,0===ca&&fa(Gr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Fn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,9658===e.charCodeAt(aa)?(r=pe,aa++):(r=i,0===ca&&fa(jr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Nn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,7)===ce?(r=ce,aa+=7):(r=i,0===ca&&fa(Dr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?(a=Ua(),t=On(o,a)):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,9)===ue?(r=ue,aa+=9):(r=i,0===ca&&fa(Mr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Vn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,10)===ye?(r=ye,aa+=10):(r=i,0===ca&&fa(Ur)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Gn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,4)===ge?(r=ge,aa+=4):(r=i,0===ca&&fa(Jr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=jn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i&&(t=aa,e.substr(aa,4)===m?(r=m,aa+=4):(r=i,0===ca&&fa(Jt)),r!==i&&(o=va())!==i?t=Dn():(aa=t,t=i),t===i)){if(t=aa,e.substr(aa,5)===de?(r=de,aa+=5):(r=i,0===ca&&fa($r)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Mn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i&&(t=aa,e.substr(aa,5)===Te?(r=Te,aa+=5):(r=i,0===ca&&fa(Wr)),r!==i&&(o=va())!==i?t=Un():(aa=t,t=i),t===i)){if(t=aa,e.substr(aa,6)===fe?(r=fe,aa+=6):(r=i,0===ca&&fa(zr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Jn(o):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,e.substr(aa,9)===me?(r=me,aa+=9):(r=i,0===ca&&fa(Hr)),r!==i){if(o=aa,n=aa,80===e.charCodeAt(aa)?(a=he,aa++):(a=i,0===ca&&fa(qr)),a!==i){for(s=aa,l=[],p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);p!==i;)l.push(p),p=aa,c=aa,ca++,u=va(),ca--,u===i?c=void 0:(aa=c,c=i),c!==i&&(u=ms())!==i?p=c=[c,u]:(aa=p,p=i);n=a=[a,s=e.substring(s,aa)]}else aa=n,n=i;(o=n!==i?e.substring(o,aa):n)!==i&&(n=va())!==i?t=$n(o):(aa=t,t=i)}else aa=t,t=i;if(t===i&&(t=aa,e.substr(aa,6)===be?(r=be,aa+=6):(r=i,0===ca&&fa(Xr)),r!==i?(o=function(){var t;e.substr(aa,4)===Ye?(t=Ye,aa+=4):(t=i,0===ca&&fa(Ai));t===i&&(e.substr(aa,5)===Qe?(t=Qe,aa+=5):(t=i,0===ca&&fa(wi)),t===i&&(e.substr(aa,4)===Ze?(t=Ze,aa+=4):(t=i,0===ca&&fa(Si)),t===i&&(e.substr(aa,5)===et?(t=et,aa+=5):(t=i,0===ca&&fa(Ei)),t===i&&(e.substr(aa,7)===tt?(t=tt,aa+=7):(t=i,0===ca&&fa(Li)),t===i&&(e.substr(aa,9)===rt?(t=rt,aa+=9):(t=i,0===ca&&fa(Ii)),t===i&&(e.substr(aa,4)===it?(t=it,aa+=4):(t=i,0===ca&&fa(Ri)),t===i&&(e.substr(aa,8)===ot?(t=ot,aa+=8):(t=i,0===ca&&fa(Fi)),t===i&&(e.substr(aa,5)===nt?(t=nt,aa+=5):(t=i,0===ca&&fa(Ni)),t===i&&(e.substr(aa,4)===at?(t=at,aa+=4):(t=i,0===ca&&fa(Oi)),t===i&&(e.substr(aa,7)===st?(t=st,aa+=7):(t=i,0===ca&&fa(Vi)),t===i&&(e.substr(aa,6)===lt?(t=lt,aa+=6):(t=i,0===ca&&fa(Gi)),t===i&&(e.substr(aa,4)===pt?(t=pt,aa+=4):(t=i,0===ca&&fa(ji)),t===i&&(e.substr(aa,5)===ct?(t=ct,aa+=5):(t=i,0===ca&&fa(Di)),t===i&&(e.substr(aa,6)===ut?(t=ut,aa+=6):(t=i,0===ca&&fa(Mi)),t===i&&(e.substr(aa,4)===yt?(t=yt,aa+=4):(t=i,0===ca&&fa(Ui)),t===i&&(e.substr(aa,6)===gt?(t=gt,aa+=6):(t=i,0===ca&&fa(Ji)),t===i&&(e.substr(aa,3)===dt?(t=dt,aa+=3):(t=i,0===ca&&fa($i)),t===i&&(e.substr(aa,6)===Tt?(t=Tt,aa+=6):(t=i,0===ca&&fa(Wi)),t===i&&(e.substr(aa,4)===ft?(t=ft,aa+=4):(t=i,0===ca&&fa(zi)),t===i&&(e.substr(aa,6)===mt?(t=mt,aa+=6):(t=i,0===ca&&fa(Hi)),t===i&&(e.substr(aa,5)===ht?(t=ht,aa+=5):(t=i,0===ca&&fa(qi)),t===i&&(e.substr(aa,6)===bt?(t=bt,aa+=6):(t=i,0===ca&&fa(Xi))))))))))))))))))))))));return t}(),o!==i&&(n=va())!==i?t=Wn(o):(aa=t,t=i)):(aa=t,t=i),t===i&&(t=aa,r=function(){var t;e.substr(aa,4)===ve?(t=ve,aa+=4):(t=i,0===ca&&fa(Qr));t===i&&(e.substr(aa,6)===Ce?(t=Ce,aa+=6):(t=i,0===ca&&fa(Zr)),t===i&&(e.substr(aa,5)===xe?(t=xe,aa+=5):(t=i,0===ca&&fa(ei)),t===i&&(e.substr(aa,9)===Pe?(t=Pe,aa+=9):(t=i,0===ca&&fa(ti)),t===i&&(e.substr(aa,6)===ke?(t=ke,aa+=6):(t=i,0===ca&&fa(ri)),t===i&&(e.substr(aa,9)===_e?(t=_e,aa+=9):(t=i,0===ca&&fa(ii)),t===i&&(e.substr(aa,11)===Ke?(t=Ke,aa+=11):(t=i,0===ca&&fa(oi)),t===i&&(e.substr(aa,3)===Ae?(t=Ae,aa+=3):(t=i,0===ca&&fa(ni)),t===i&&(e.substr(aa,3)===we?(t=we,aa+=3):(t=i,0===ca&&fa(ai)),t===i&&(e.substr(aa,9)===Se?(t=Se,aa+=9):(t=i,0===ca&&fa(si)),t===i&&(e.substr(aa,15)===Ee?(t=Ee,aa+=15):(t=i,0===ca&&fa(li)),t===i&&(e.substr(aa,6)===Le?(t=Le,aa+=6):(t=i,0===ca&&fa(pi)),t===i&&(e.substr(aa,13)===Ie?(t=Ie,aa+=13):(t=i,0===ca&&fa(ci)),t===i&&(e.substr(aa,16)===Re?(t=Re,aa+=16):(t=i,0===ca&&fa(ui)),t===i&&(e.substr(aa,16)===Fe?(t=Fe,aa+=16):(t=i,0===ca&&fa(yi)),t===i&&(e.substr(aa,15)===Ne?(t=Ne,aa+=15):(t=i,0===ca&&fa(gi)),t===i&&(e.substr(aa,14)===Oe?(t=Oe,aa+=14):(t=i,0===ca&&fa(di)),t===i&&(e.substr(aa,16)===Ve?(t=Ve,aa+=16):(t=i,0===ca&&fa(Ti)),t===i&&(e.substr(aa,14)===Ge?(t=Ge,aa+=14):(t=i,0===ca&&fa(fi)),t===i&&(e.substr(aa,15)===je?(t=je,aa+=15):(t=i,0===ca&&fa(mi)),t===i&&(e.substr(aa,15)===De?(t=De,aa+=15):(t=i,0===ca&&fa(hi)),t===i&&(e.substr(aa,15)===Me?(t=Me,aa+=15):(t=i,0===ca&&fa(bi)),t===i&&(e.substr(aa,14)===Ue?(t=Ue,aa+=14):(t=i,0===ca&&fa(Bi)),t===i&&(e.substr(aa,10)===Je?(t=Je,aa+=10):(t=i,0===ca&&fa(vi)),t===i&&(e.substr(aa,13)===$e?(t=$e,aa+=13):(t=i,0===ca&&fa(Ci)),t===i&&(e.substr(aa,19)===We?(t=We,aa+=19):(t=i,0===ca&&fa(xi)),t===i&&(e.substr(aa,10)===ze?(t=ze,aa+=10):(t=i,0===ca&&fa(Pi)),t===i&&(e.substr(aa,10)===He?(t=He,aa+=10):(t=i,0===ca&&fa(ki)),t===i&&(e.substr(aa,13)===qe?(t=qe,aa+=13):(t=i,0===ca&&fa(_i)),t===i&&(e.substr(aa,11)===Xe?(t=Xe,aa+=11):(t=i,0===ca&&fa(Ki)))))))))))))))))))))))))))))));return t}(),r!==i&&(o=va())!==i?t=zn(r):(aa=t,t=i),t===i)))if(t=aa,35===e.charCodeAt(aa)?(r=R,aa++):(r=i,0===ca&&fa(pr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),(n=va())!==i?t=Hn(o):(aa=t,t=i)}else aa=t,t=i}}}}}}}}}}}return t}function ts(){var t,r,o,n,a,s,l;if(t=aa,e.substr(aa,2)===Be?(r=Be,aa+=2):(r=i,0===ca&&fa(Yr)),r!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),t=qn(o)}else aa=t,t=i;return t}function rs(){var e,t,r,o;for(ca++,e=aa,(t=is())===i&&(t=null),r=[],(o=ds())===i&&(o=is());o!==i;)r.push(o),(o=ds())===i&&(o=is());return e=Yn(t,r),ca--,t=i,0===ca&&fa(Qi),e}function is(){var t,r,o,n,a,s,l;if(t=aa,(r=fs())!==i&&(r=Qn()),(t=r)===i){if(t=aa,r=aa,o=[],n=aa,(a=Ts())===i&&(a=null),s=aa,ca++,l=ds(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?n=a=[a,s,l]:(aa=n,n=i),n===i&&(n=aa,(a=Ts())!==i?(s=aa,ca++,l=ds(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=aa,(a=Ts())===i&&(a=null),s=aa,ca++,l=ds(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=ms())!==i?n=a=[a,s,l]:(aa=n,n=i),n===i&&(n=aa,(a=Ts())!==i?(s=aa,ca++,l=ds(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i));else o=i;(r=o!==i?e.substring(r,aa):o)!==i&&(r=Zn(r)),t=r}return t}function os(){var t;return 42===e.charCodeAt(aa)?(t=Bt,aa++):(t=i,0===ca&&fa(Zi)),t}function ns(){var t;return 95===e.charCodeAt(aa)?(t=vt,aa++):(t=i,0===ca&&fa(eo)),t}function as(){var t;return 96===e.charCodeAt(aa)?(t=Ct,aa++):(t=i,0===ca&&fa(to)),t}function ss(){var t;return 33===e.charCodeAt(aa)?(t=xt,aa++):(t=i,0===ca&&fa(ro)),t}function ls(){var e,t,r;return e=aa,(t=os())!==i&&(r=os())!==i?e=t=[t,r]:(aa=e,e=i),e}function ps(){var e,t,r;return e=aa,(t=ns())!==i&&(r=ns())!==i?e=t=[t,r]:(aa=e,e=i),e}function cs(){var e,t,r;return e=aa,(t=as())!==i&&(r=as())!==i?e=t=[t,r]:(aa=e,e=i),e}function us(){var e,t,r;return e=aa,(t=ss())!==i&&(r=ss())!==i?e=t=[t,r]:(aa=e,e=i),e}function ys(){var t;return e.substr(aa,2)===Pt?(t=Pt,aa+=2):(t=i,0===ca&&fa(io)),t}function gs(){var t;return 93===e.charCodeAt(aa)?(t=kt,aa++):(t=i,0===ca&&fa(oo)),t}function ds(){var t,r,o,n,a,s;if(t=aa,ys()!==i){if(r=aa,o=[],n=e.charAt(aa),It.test(n)?aa++:(n=i,0===ca&&fa(Zt)),n!==i)for(;n!==i;)o.push(n),n=e.charAt(aa),It.test(n)?aa++:(n=i,0===ca&&fa(Zt));else o=i;(r=o!==i?e.substring(r,aa):o)!==i&&(o=gs())!==i?t=ea(r):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,ls()!==i){for(r=aa,o=[],n=aa,a=aa,ca++,s=ls(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);n!==i;)o.push(n),n=aa,a=aa,ca++,s=ls(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);r=e.substring(r,aa),(o=ls())!==i?t=ta(r):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,ps()!==i){for(r=aa,o=[],n=aa,a=aa,ca++,s=ps(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);n!==i;)o.push(n),n=aa,a=aa,ca++,s=ps(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);r=e.substring(r,aa),(o=ps())!==i?t=ra(r):(aa=t,t=i)}else aa=t,t=i;if(t===i){if(t=aa,cs()!==i){for(r=aa,o=[],n=aa,a=aa,ca++,s=cs(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);n!==i;)o.push(n),n=aa,a=aa,ca++,s=cs(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);r=e.substring(r,aa),(o=cs())!==i?t=ia(r):(aa=t,t=i)}else aa=t,t=i;if(t===i)if(t=aa,us()!==i){for(r=aa,o=[],n=aa,a=aa,ca++,s=us(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);n!==i;)o.push(n),n=aa,a=aa,ca++,s=us(),ca--,s===i?a=void 0:(aa=a,a=i),a!==i?(e.length>aa?(s=e.charAt(aa),aa++):(s=i,0===ca&&fa(Vt)),s!==i?n=a=[a,s]:(aa=n,n=i)):(aa=n,n=i);r=e.substring(r,aa),(o=us())!==i?t=oa(r):(aa=t,t=i)}else aa=t,t=i}}}return t}function Ts(){var t,r,o,n,a;if(t=aa,r=aa,(o=cs())!==i){if(n=[],(a=as())!==i)for(;a!==i;)n.push(a),a=as();else n=i;n!==i?r=o=[o,n]:(aa=r,r=i)}else aa=r,r=i;if((t=r!==i?e.substring(t,aa):r)===i){if(t=aa,r=aa,(o=us())!==i){if(n=[],(a=ss())!==i)for(;a!==i;)n.push(a),a=ss();else n=i;n!==i?r=o=[o,n]:(aa=r,r=i)}else aa=r,r=i;t=r!==i?e.substring(t,aa):r}return t}function fs(){var t;return ca++,10===e.charCodeAt(aa)?(t=_t,aa++):(t=i,0===ca&&fa(ao)),t===i&&(e.substr(aa,2)===Kt?(t=Kt,aa+=2):(t=i,0===ca&&fa(so)),t===i&&(t=e.charAt(aa),Ft.test(t)?aa++:(t=i,0===ca&&fa(lo)))),ca--,t===i&&(0===ca&&fa(no)),t}function ms(){var t;return t=e.charAt(aa),Nt.test(t)?aa++:(t=i,0===ca&&fa(po)),t}function hs(){var t,r;return(t=fs())===i&&(t=aa,ca++,e.length>aa?(r=e.charAt(aa),aa++):(r=i,0===ca&&fa(Vt)),ca--,r===i?t=void 0:(aa=t,t=i)),t}function bs(){var t,r,o,n,a,s,l;if(t=aa,r=aa,o=aa,e.substr(aa,4)===At?(n=At,aa+=4):(n=i,0===ca&&fa(co)),n!==i?(115===e.charCodeAt(aa)?(a=wt,aa++):(a=i,0===ca&&fa(uo)),a===i&&(a=null),e.substr(aa,3)===St?(s=St,aa+=3):(s=i,0===ca&&fa(yo)),s!==i?o=n=[n,a,s]:(aa=o,o=i)):(aa=o,o=i),o===i&&(e.substr(aa,7)===Et?(o=Et,aa+=7):(o=i,0===ca&&fa(go))),(r=o!==i?e.substring(r,aa):o)!==i){for(o=aa,n=[],a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=Bs())!==i?a=s=[s,l]:(aa=a,a=i);a!==i;)n.push(a),a=aa,s=aa,ca++,l=va(),ca--,l===i?s=void 0:(aa=s,s=i),s!==i&&(l=Bs())!==i?a=s=[s,l]:(aa=a,a=i);o=e.substring(o,aa),t=na(r,o)}else aa=t,t=i;return t}function Bs(){var t;return t=e.charAt(aa),Ot.test(t)?aa++:(t=i,0===ca&&fa(To)),t}var vs=[],Cs="";if(e=e.trimStart(),r=y(),t.peg$library)return{peg$result:r,peg$currPos:aa,peg$FAILED:i,peg$maxFailExpected:pa,peg$maxFailPos:la};if(r!==i&&aa===e.length)return r;throw r!==i&&aa<e.length&&fa({type:"end"}),ma(pa,la<e.length?e.charAt(la):null,la<e.length?Ta(la,la+1):Ta(la,la))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(p,Error),p.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var s=this.location.end,l=c("",n.line.toString().length," "),p=i[o.line-1],u=(o.line===s.line?s.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+p+"\n"+l+" | "+c("",o.column-1," ")+c("",u,"^")}else t+="\n at "+a}return t},p.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},8453:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyTextFormat=void 0;const i=(0,r(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"});t.BodyTextFormat=i},8588:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const i=(0,r(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=i},8848:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=function(e,t,r,u,y){t===c.BitContentLevel.Chain?function(e,t,r,i,n){const{value:a}=i,c=o.Breakscape.unbreakscape(p.StringUtils.trimmedString(a),{format:s.TextFormat.bitmarkText,location:l.TextLocation.tag});n.imageSourceUrl=c}(0,0,0,u,y):function(e,t,r,o,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",o);const{key:l}=o,p=n.Config.getTagConfigForTag(r,a.PropertyTag.fromValue(l)),u=e.bitContentProcessor(c.BitContentLevel.Chain,r,[o]),y=e.bitContentProcessor(c.BitContentLevel.Chain,null==p?void 0:p.chain,o.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",y);const{imageSourceUrl:g}=u,{mockupId:d}=y,T=i(y,["mockupId"]);g||e.addWarning("[@imageSource] is missing the image url",o);d||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",o);const f=Object.assign({url:null!=g?g:"",mockupId:null!=d?d:""},T);s.imageSource=f}(e,0,r,u,y)};const o=r(7735),n=r(2028),a=r(166),s=r(385),l=r(6877),p=r(9681),c=r(3029)},8903:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const i=r(6877),o=r(777),n=r(4078),a=new o.TextParser;const s=new class{fillStringExample(e,t,r,o,n){if(t){Array.isArray(t)||(t=[t]);for(const s of t)if(!s.isExample&&(r?(s.example=s.__defaultExample,s.isExample=!0):s.example=o?a.toAst(o,{format:e,location:i.TextLocation.tag}):void 0,n))break}}fillBooleanExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!i||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=n.BooleanUtils.toBoolean(r),i))break}}};t.BitUtils=s},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const i=r(7797),o=r(9917),n={[i.TagConfigKey.title]:{tag:o.Tag.tag_title},[i.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[i.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[i.TagConfigKey.property]:{tag:o.Tag.tag_property},[i.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[i.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[i.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[i.TagConfigKey.true]:{tag:o.Tag.tag_true},[i.TagConfigKey.false]:{tag:o.Tag.tag_false},[i.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[i.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[i.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[i.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},9289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=function(e,t,r,s,l){t===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,r,s,l):function(e,t,r,n,s){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",n);const p=i.Config.getTagConfigForTag(r,o.Tag.fromValue(n.type)),c=[n,...null!==(l=n.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(a.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",u);s.itemLead=u.itemLead}(e,0,r,s,l)};const i=r(2028),o=r(9917),n=r(8216),a=r(3029)},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,r,i){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i}toString(e){const t=Object.assign({},e);let r="";const i=[];this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),null!=this.repeatCount&&i.push(`repeatCount=${this.repeatCount}`),r+=`[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))r+=`\n${e.toString(t)}`;return r}}},9554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const i=(0,r(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",noBulletList:"noBulletList",bulletList:"bulletList",orderedList:"orderedList",orderedListRoman:"orderedListRoman",orderedListRomanLower:"orderedListRomanLower",letteredList:"letteredList",letteredListLower:"letteredListLower",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",imageInline:"imageInline",codeBlock:"codeBlock",latex:"latex",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=i},9561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const i=(0,r(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=i},9600:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s){super(i.BitTagType.resource,e,t,r,o,n,a,void 0,s),this.type=i.BitTagType.resource}toString(e){const t=Object.assign({},e);let r=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.ResourceTagConfig=n},9647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=function(e,t,r,T,K){const{value:A}=T;let{key:w}=T;const S=t===k.BitContentLevel.Chain,E=o.Config.getTagConfigForTag(r,p.PropertyTag.fromValue(w)),L=E?E.configKey:void 0;if(w===p.PropertyTag.internalComment)return void(0,b.commentTagContentProcessor)(e,t,T,K);if(E){if(L===s.PropertyConfigKey.example)return void(0,m.exampleTagContentProcessor)(e,t,T,K);if(L===s.PropertyConfigKey.ratingLevelStart||L===s.PropertyConfigKey.ratingLevelEnd)return void(0,C.ratingLevelChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.technicalTerm)return void(0,P.technicalTermChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.servings)return void(0,x.servingsChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.person||L===s.PropertyConfigKey.partner)return void(0,v.personChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.imageSource)return void(0,h.imageSourceChainContentProcessor)(e,t,r,T,K);if(L===s.PropertyConfigKey.book)return void(0,f.bookChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.markConfig&&!S)return void(0,B.markConfigChainContentProcessor)(e,t,r,T,K);L===s.PropertyConfigKey.property_title&&S&&(w="propertyTitle")}const I=(e,t,r,o)=>{if(r=(e=>{if(null!=e){if(o)switch(o.format){case l.PropertyFormat.plainText:return i.Breakscape.unbreakscape(d.StringUtils.isString(e)?d.StringUtils.trimmedString(e):void 0,{format:c.TextFormat.plainText,location:u.TextLocation.tag});case l.PropertyFormat.number:return g.NumberUtils.asNumber(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}));case l.PropertyFormat.boolean:return y.BooleanUtils.toBoolean(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}),!0);case l.PropertyFormat.invertedBoolean:return!y.BooleanUtils.toBoolean(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}),!0);case l.PropertyFormat.bitmarkText:return e=d.StringUtils.isString(e)?e:"",_.toAst(e,{format:c.TextFormat.bitmarkText,location:u.TextLocation.tag})}return i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag})}})(r),(null==o?void 0:o.astKey)&&(t=o.astKey),null==o?void 0:o.single)e[t]=r;else if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];e[t]=[...i,r]}else e[t]=[r]};I(E?K:K.extraProperties,w,A,E);w===p.PropertyTag.tag_sampleSolution&&I(K,"__sampleSolutionAst",A,new n.PropertyTagConfig(a.ConfigKey.sampleSolution,p.PropertyTag.tag_sampleSolution,1,1,void 0,void 0,void 0,!0,l.PropertyFormat.bitmarkText,void 0,void 0))};const i=r(7735),o=r(2028),n=r(1519),a=r(5591),s=r(9888),l=r(9727),p=r(166),c=r(385),u=r(6877),y=r(4078),g=r(8025),d=r(9681),T=r(777),f=r(3045),m=r(4091),h=r(8848),b=r(6991),B=r(3063),v=r(21),C=r(3967),x=r(4953),P=r(4475),k=r(3029),_=new T.TextParser},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const r=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}countOccurrences(e,t){return e.split(t).length-1}countOccurrencesAtStart(e,t){let r=0;for(;e.startsWith(t);)r++,e=e.substring(t.length);return r}countOccurrencesAtEnd(e,t){let r=0;for(;e.endsWith(t);)r++,e=e.substring(0,e.length-t.length);return r}splitPlaceholders(e,t){let r=[e];const i=(e,t)=>{const r=[];for(const i of e){const e=i.split(t);for(let i=0,o=e.length;i<o;i++){const n=e[i],a=i===o-1;r.push(n),a||r.push(t)}}return r};for(const e of t)r=i(r,e);return r}firstLine(e,t){const r=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return r;const i=e.split("\n");return i.length>0?i[0].substring(0,t):r}wordWrap(e,t){const r=[];if(t<1||null==e||e.length<=t)return r;const i=e.length,o=i-t;let n,a=0;for(;a<o;){let i;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){i=s-a,n=e.substr(a,i),a=a+i+1,r.push(n);continue}const l=e.lastIndexOf(" ",o);let p=0;l>-1&&l!=a-1?(i=l-a,i>0&&(p=a+i+1)):(i=t,p=a+t),n=e.substr(a,i),a=p,r.push(n.trim())}return a<i&&(n=e.substr(a),r.push(n)),r}};t.StringUtils=r},9727:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const i=(0,r(4718).superenum)({none:"none",plainText:"plainText",bitmarkText:"bitmarkText",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=i},9788:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a){super(i.BitTagType.tag,e,t,r,o,n,void 0,void 0,a),this.type=i.BitTagType.tag}toString(e){const t=Object.assign({},e);let r=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.MarkupTagConfig=n},9885:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=function(e,t,r,p,c,u){t===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,l.BitContentLevel.Chain,p,c):function(e,t,r,s,p,c){var u;const{bitType:y}=e,g=[s,...null!==(u=s.chain)&&void 0!==u?u:[]],d=p.statements,T=p.choices,f=p.responses;if(!(d&&T&&f&&c))return;if(o.Config.isOfBitType(y,n.BitType.trueFalse1))p.statement=function(e,t,r){const{bitType:a}=e;if(!o.Config.isOfBitType(a,n.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",r);const s=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:p}=s,c=i(s,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",c);let u,y;p&&p.length>0&&(y=p[0]);if(y){const{statement:e}=c,t=i(c,["statement"]);u=Object.assign(Object.assign(Object.assign({},y),{statement:y.text}),t)}return u}(e,r,g);else if(o.Config.isOfBitType(y,[n.BitType.trueFalse,n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.feedback])){const t=function(e,t,r){const{bitType:a}=e,s=o.Config.isOfBitType(a,n.BitType.trueFalse),p=o.Config.isOfBitType(a,[n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.feedback]),c=o.Config.isOfBitType(a,[n.BitType.multipleResponse,n.BitType.multipleResponse1]);if(!s&&!p&&!c)return{};const u=[],y=[],g=[],d=e.splitBitContent(r,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",d);for(const r of d){const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,a=i(o,["trueFalse"]);let d;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",a),n&&n.length>0&&(d=n[0]),d)if(s){const{statement:e}=a,t=i(a,["statement"]),r=Object.assign(Object.assign(Object.assign({},d),{statement:d.text}),t);r&&u.push(r)}else if(p){const e=Object.assign(Object.assign(Object.assign({},d),{choice:d.text}),a);e&&y.push(e)}else if(c){const e=Object.assign(Object.assign(Object.assign({},d),{response:d.text}),a);e&&g.push(e)}}const T={};s?T.statements=u:p?T.choices=y:c&&(T.responses=g);return T}(e,r,g);t.statements&&d.push(...t.statements),t.choices&&T.push(...t.choices),t.responses&&f.push(...t.responses)}else if(o.Config.isOfBitType(y,n.BitType.highlightText)){const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",r);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,s=i(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=Object.assign(Object.assign({},e),{isHighlighted:!1});t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.highlight,texts:p},s);return c}(e,r,g);t&&c.push(t)}else{const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",r);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,s=i(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=e;t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.select,options:p},s);return c}(e,r,g);t&&c.push(t)}}(e,0,r,p,c,u)};const o=r(2028),n=r(5854),a=r(4410),s=r(4020),l=r(3029)},9888:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const i=r(4718),o={action:"action",activityType:"activityType",additionalSolutions:"additionalSolutions",ageRange:"ageRange",aiGenerated:"aiGenerated",analyticsTag:"analyticsTag",allowedBit:"allowedBit",allowSubtitles:"allowSubtitles",alt:"alt",altLangTag:"altLangTag",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",blockId:"blockId",book:"book",bookAlias:"bookAlias",bookDiff:"bookDiff",bot:"bot",bubbleTag:"bubbleTag",buttonCaption:"buttonCaption",callToActionUrl:"callToActionUrl",caption:"caption",categoryTag:"categoryTag",chatWithBook:"chatWithBook",chatWithBookBrainKey:"chatWithBookBrainKey",citationStyle:"citationStyle",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",customerExternalId:"customerExternalId",customerId:"customerId",date:"date",dateEnd:"dateEnd",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",diffTo:"diffTo",diffOp:"diffOp",diffRef:"diffRef",diffContext:"diffContext",diffTime:"diffTime",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",feedbackEngine:"feedbackEngine",feedbackType:"feedbackType",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",handInAcceptFileType:"handInAcceptFileType",handInRequirement:"handInRequirement",handInInstruction:"handInInstruction",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageFirst:"imageFirst",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTemplate:"isTemplate",isTemplateStripTheme:"isTemplateStripTheme",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",layer:"layer",layerRole:"layerRole",levelCEFRp:"levelCEFRp",levelCEFR:"levelCEFR",levelILR:"levelILR",levelACTFL:"levelACTFL",license:"license",list:"list",listItemIndent:"listItemIndent",location:"location",machineTranslated:"machineTranslated",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",maxTocChapterLevel:"maxTocChapterLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",path:"path",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",page:"page",processHandIn:"processHandIn",processHandInLocation:"processHandInLocation",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reductionTag:"reductionTag",refAuthor:"refAuthor",refBookTitle:"refBookTitle",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",revealSolutions:"revealSolutions",scormSource:"scormSource",search:"search",searchIndex:"searchIndex",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",slug:"slug",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",stripePricingTableId:"stripePricingTableId",stripePublishableKey:"stripePublishableKey",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableColumnMinWidth:"tableColumnMinWidth",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",tocResource:"tocResource",tocContent:"tocContent",topicTag:"topicTag",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorDashboardId:"vendorDashboardId",vendorSurveyId:"vendorSurveyId",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,i.superenum)(o);t.PropertyConfigKey=n},9916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const i=r(9888),o=r(7203),n=r(9727),a=r(166),s={[i.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.customerId]:{tag:a.PropertyTag.customerId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.customerExternalId]:{tag:a.PropertyTag.customerExternalId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.aiGenerated,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.machineTranslated]:{tag:a.PropertyTag.machineTranslated,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.searchIndex]:{tag:a.PropertyTag.searchIndex,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.analyticsTag]:{tag:a.PropertyTag.analyticsTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.categoryTag]:{tag:a.PropertyTag.categoryTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.topicTag]:{tag:a.PropertyTag.topicTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.altLangTag]:{tag:a.PropertyTag.altLangTag,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.feedbackEngine]:{tag:a.PropertyTag.feedbackEngine,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.disableFeedback]:{tag:a.PropertyTag.disableFeedback,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.diffTo]:{tag:a.PropertyTag.diffTo,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffOp]:{tag:a.PropertyTag.diffOp,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffRef]:{tag:a.PropertyTag.diffRef,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffContext]:{tag:a.PropertyTag.diffContext,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffTime]:{tag:a.PropertyTag.diffTime,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.path]:{tag:a.PropertyTag.path,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInAcceptFileType]:{tag:a.PropertyTag.handInAcceptFileType,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInRequirement]:{tag:a.PropertyTag.handInRequirement,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInInstruction]:{tag:a.PropertyTag.handInInstruction,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.slug]:{tag:a.PropertyTag.slug,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.reductionTag]:{tag:a.PropertyTag.reductionTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bubbleTag]:{tag:a.PropertyTag.bubbleTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelCEFRp]:{tag:a.PropertyTag.levelCEFRp,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelCEFR]:{tag:a.PropertyTag.levelCEFR,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelILR]:{tag:a.PropertyTag.levelILR,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelACTFL]:{tag:a.PropertyTag.levelACTFL,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bookDiff]:{tag:a.PropertyTag.bookDiff,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refAuthor]:{tag:a.PropertyTag.refAuthor,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refBookTitle]:{tag:a.PropertyTag.refBookTitle,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refPublisher]:{tag:a.PropertyTag.refPublisher,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refPublicationYear]:{tag:a.PropertyTag.refPublicationYear,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.citationStyle]:{tag:a.PropertyTag.citationStyle,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.dateEnd]:{tag:a.PropertyTag.dateEnd,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.processHandIn]:{tag:a.PropertyTag.processHandIn,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.processHandInLocation]:{tag:a.PropertyTag.processHandInLocation,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isTemplate]:{tag:a.PropertyTag.isTemplate,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isTemplateStripTheme]:{tag:a.PropertyTag.isTemplateStripTheme,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.chatWithBook]:{tag:a.PropertyTag.chatWithBook,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.chatWithBookBrainKey]:{tag:a.PropertyTag.chatWithBookBrainKey,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorDashboardId]:{tag:a.PropertyTag.vendorDashboardId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorSurveyId]:{tag:a.PropertyTag.vendorSurveyId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_referenceProperty},[i.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.layer]:{tag:a.PropertyTag.layer,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.layerRole]:{tag:a.PropertyTag.layerRole,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxTocChapterLevel]:{tag:a.PropertyTag.maxTocChapterLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.tocResource]:{tag:a.PropertyTag.tocResource,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tocContent]:{tag:a.PropertyTag.tocContent,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[i.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.page]:{tag:a.PropertyTag.page,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productList},[i.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productVideoList},[i.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.additionalSolutions]:{tag:a.PropertyTag.additionalSolutions,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_markConfig},[i.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.callToActionUrl]:{tag:a.PropertyTag.callToActionUrl,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.feedbackType]:{tag:a.PropertyTag.feedbackType,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.bitmarkText},[i.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean,defaultValue:"false"},[i.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.listItemIndent]:{tag:a.PropertyTag.listItemIndent,single:!0,defaultValue:"0",format:n.PropertyFormat.number},[i.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[i.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.allowedBit]:{tag:a.PropertyTag.allowedBit,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableHeaderWhitespaceNoWrap]:{tag:a.PropertyTag.tableHeaderWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableColumnMinWidth]:{tag:a.PropertyTag.tableColumnMinWidth,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.stripePricingTableId]:{tag:a.PropertyTag.stripePricingTableId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.stripePublishableKey]:{tag:a.PropertyTag.stripePublishableKey,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.bitmarkText},[i.PropertyConfigKey.imageFirst]:{tag:a.PropertyTag.imageFirst,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.activityType]:{tag:a.PropertyTag.activityType,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.revealSolutions]:{tag:a.PropertyTag.revealSolutions,single:!0,format:n.PropertyFormat.boolean}};t.PROPERTIES=s},9917:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const i=(0,r(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=i},9984:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const i=(0,r(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=i}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.bitmarkTextParse=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.BodyTextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.Input=e.BitmarkParserGenerator=void 0;const t=r(1412);var o=r(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Input",{enumerable:!0,get:function(){return o.Input}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=r(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=r(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=r(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=r(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var p=r(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return p.JsonGenerator}});var c=r(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return c.JsonStringGenerator}});var u=r(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return u.BitmarkParser}});var y=r(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return y.BitmarkGenerator}});var g=r(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return g.BitmarkStringGenerator}});var d=r(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var T=r(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return T.BitType}});var f=r(8453);Object.defineProperty(e,"BodyTextFormat",{enumerable:!0,get:function(){return f.BodyTextFormat}});var m=r(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return m.ResourceTag}});var h=r(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return h.NodeType}});var b=r(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var B=r(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return B.BitmarkVersion}});var v=r(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return v.CardSetVersion}});var C=r(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var x=r(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return x.InfoFormat}});var P=r(2220);Object.defineProperty(e,"bitmarkTextParse",{enumerable:!0,get:function(){return P.parse}});(0,t.init)()})(),i})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmarkParserGenerator=t():e.bitmarkParserGenerator=t()}(this,(()=>(()=>{"use strict";var e={4:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const i=r(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new i.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,r){let i;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(i=o[n](e,t,r)),i}between(e,t,r,i,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,r,i,o)),n}exit(e,t,r){const i=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof i[o]&&i[o](e,t,r)}leaf(e,t,r){const i=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof i[o]&&i[o](e,t,r),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}}},21:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=function(e,t,r,p,c){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",p);const u=e.bitContentProcessor(l.BitContentLevel.Chain,r,p.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",u);const{propertyTitle:y,resources:g}=u,d=i.Breakscape.unbreakscape(s.StringUtils.trimmedString(p.value),{format:n.TextFormat.bitmarkText,location:a.TextLocation.tag}),T=s.StringUtils.trimmedString(y),f=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||o.ResourceTag.image!==e.type?i.push(e):r=e;i.length>0&&(e.parser.excessResources=i,e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`));return r}(e,g),m={name:d,title:T,avatarImage:f};c.person=m};const i=r(7735),o=r(6149),n=r(385),a=r(6877),s=r(9681),l=r(3029)},98:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=r(6772),n=r(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",alternativeDefinitions:"alternativeDefinitions",alternativeDefinitionsValue:"alternativeDefinitionsValue",altLangTag:"altLangTag",altLangTagValue:"altLangTagValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",anchor:"anchor",answer:"answer",appLink:"appLink",attrs:"attrs",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyValue:"bodyValue",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookValue:"bookValue",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",bubbleTag:"bubbleTag",bubbleTagValue:"bubbleTagValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",callToActionUrl:"callToActionUrl",callToActionUrlValue:"callToActionUrlValue",caption:"caption",captionDefinitionList:"captionDefinitionList",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",categoryTag:"categoryTag",categoryTagValue:"categoryTagValue",cells:"cells",cellsValue:"cellsValue",chatWithBook:"chatWithBook",chatWithBookValue:"chatWithBookValue",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",class:"class",classification:"classification",classificationValue:"classificationValue",codeLineNumbers:"codeLineNumbers",codeLineNumbersValue:"codeLineNumbersValue",codeMinimap:"codeMinimap",codeMinimapValue:"codeMinimapValue",color:"color",colorTag:"colorTag",colorTagValue:"colorTagValue",column:"column",columns:"columns",columnsValue:"columnsValue",comment:"comment",commentedBitType:"commentedBitType",computerLanguage:"computerLanguage",computerLanguageValue:"computerLanguageValue",content:"contentValue",content2Buy:"content2Buy",contentValue:"contentValue",contentValueValue:"contentValueValue",copyright:"copyright",coverColor:"coverColor",coverColorValue:"coverColorValue",coverImage:"coverImage",coverImageValue:"coverImageValue",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",data:"data",dataValue:"dataValue",dataValueValue:"dataValueValue",date:"date",dateEnd:"dateEnd",dateEndValue:"dateEndValue",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",definition:"definition",definitions:"definitions",definitionsValue:"definitionsValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",diffTo:"diffTo",diffToValue:"diffToValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageFirst:"imageFirst",imageFirstValue:"imageFirstValue",imageLandscape:"imageLandscape",imageLink:"imageLink",imagePlaceholder:"imagePlaceholder",imagePlaceholderValue:"imagePlaceholderValue",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",__isDefaultExample:"__isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTemplate:"isTemplate",isTemplateValue:"isTemplateValue",isTemplateStripTheme:"isTemplateStripTheme",isTemplateStripThemeValue:"isTemplateStripThemeValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",jupyterExecutionCount:"jupyterExecutionCount",jupyterExecutionCountValue:"jupyterExecutionCountValue",jupyterId:"jupyterId",jupyterIdValue:"jupyterIdValue",key:"key",keyAudio:"keyAudio",keyImage:"keyImage",kind:"kind",kindValue:"kindValue",label:"label",labelFalse:"labelFalse",labelFalseValue:"labelFalseValue",labelTrue:"labelTrue",labelTrueValue:"labelTrueValue",lang:"lang",language:"language",languageValue:"languageValue",langValue:"langValue",layer:"layer",layerValue:"layerValue",layerRole:"layerRole",layerRoleValue:"layerRoleValue",lead:"lead",level:"level",levelACTFL:"levelACTFL",levelACTFLValue:"levelACTFLValue",levelCEFR:"levelCEFR",levelCEFRp:"levelCEFRp",levelCEFRpValue:"levelCEFRpValue",levelCEFRValue:"levelCEFRValue",levelILR:"levelILR",levelILRValue:"levelILRValue",license:"license",line:"line",list:"list",listItemIndent:"listItemIndent",listItemIndentValue:"listItemIndentValue",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",maxTocChapterLevel:"maxTocChapterLevel",maxTocChapterLevelValue:"maxTocChapterLevelValue",tocResource:"tocResource",tocResourceValue:"tocResourceValue",tocContent:"tocContent",tocContentValue:"tocContentValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",path:"path",pathValue:"pathValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",processHandIn:"processHandIn",processHandInValue:"processHandInValue",processHandInLocation:"processHandInLocation",processHandInLocationValue:"processHandInLocationValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productId:"productId",productIdValue:"productIdValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",pronunciationTable:"pronunciationTable",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reason:"reason",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",refAuthor:"refAuthor",refBookTitle:"refBookTitle",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",revealSolutions:"revealSolutions",root:"root",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeaderWhitespaceNoWrapValue:"tableHeaderWhitespaceNoWrapValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableSearch:"tableSearch",tableSearchValue:"tableSearchValue",tableSort:"tableSort",tableSortValue:"tableSortValue",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tableWhitespaceNoWrapValue:"tableWhitespaceNoWrapValue",tag:"tag",tagValue:"tagValue",target:"target",targetValue:"targetValue",technicalTerm:"technicalTerm",technicalTermValue:"technicalTermValue",term:"term",text:"text",textAlign:"textAlign",textAst:"textAst",textAstValue:"textAstValue",textFormat:"textFormat",textReference:"textReference",textReferenceValue:"textReferenceValue",texts:"texts",textsValue:"textsValue",theme:"theme",themeValue:"themeValue",thumbImage:"thumbImage",thumbImageValue:"thumbImageValue",thumbnails:"thumbnails",thumbnailsValue:"thumbnailsValue",title:"title",toc:"toc",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",trim:"trim",type:"type",__typeAlias:"__typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorDashboardId:"vendorDashboardId",vendorDashboardIdValue:"vendorDashboardIdValue",vendorSurveyId:"vendorSurveyId",vendorSurveyIdValue:"vendorSurveyIdValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",video:"video",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",videoEmbed:"videoEmbed",videoLink:"videoLink",warnings:"warnings",warningsValue:"warningsValue",websiteLink:"websiteLink",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=i},166:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const i=r(4718),o=r(9888),n=(0,i.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const i=r(5051),o=r(9984),n=r(6149),a={[i.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[i.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[i.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[i.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[i.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[i.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[i.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[i.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[i.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[i.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[i.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[i.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[i.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[i.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[i.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[i.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[i.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[i.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[i.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[i.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[i.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[i.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink},[i.ResourceConfigKey.icon]:{tag:n.ResourceTag.icon},[i.ResourceConfigKey.backgroundWallpaper]:{tag:n.ResourceTag.backgroundWallpaper},[i.ResourceConfigKey.imagePlaceholder]:{tag:n.ResourceTag.imagePlaceholder}};t.RESOURCES=a},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const r=new class{fileExtensionFromUrl(e){let t;if(e)try{const r=new URL(e).pathname.split(".");r.length>1&&(t=r[r.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}};t.UrlUtils=r},363:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=i},385:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const i=(0,r(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"});t.TextFormat=i},431:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=r(5126),n=r(7735),a=r(126),s=r(3811),l=r(385),p=r(6877),c=r(2483),u=r(9554),y=r(9681),g=r(4),d={bodyBitCallback:void 0,debugGenerationInline:!1},T="==",f=["*","`","_","!","="],m={[c.TextMarkType.bold]:"**",[c.TextMarkType.light]:"``",[c.TextMarkType.italic]:"__",[c.TextMarkType.highlight]:"!!"},h=[c.TextMarkType.bold,c.TextMarkType.light,c.TextMarkType.italic,c.TextMarkType.highlight],b=[c.TextMarkType.strike,c.TextMarkType.subscript,c.TextMarkType.superscript,c.TextMarkType.ins,c.TextMarkType.del,c.TextMarkType.underline,c.TextMarkType.doubleUnderline,c.TextMarkType.circle,c.TextMarkType.languageEmRed,c.TextMarkType.languageEmOrange,c.TextMarkType.languageEmYellow,c.TextMarkType.languageEmGreen,c.TextMarkType.languageEmBlue,c.TextMarkType.languageEmPurple,c.TextMarkType.languageEmPink,c.TextMarkType.languageEmBrown,c.TextMarkType.languageEmBlack,c.TextMarkType.languageEmWhite,c.TextMarkType.languageEmGray,c.TextMarkType.languageEm,c.TextMarkType.userUnderline,c.TextMarkType.userDoubleUnderline,c.TextMarkType.userStrike,c.TextMarkType.userCircle,c.TextMarkType.userHighlight,c.TextMarkType.notranslate,c.TextMarkType.link,c.TextMarkType.ref,c.TextMarkType.xref,c.TextMarkType.extref,c.TextMarkType.footnote,c.TextMarkType.footnoteStar,c.TextMarkType.symbol,c.TextMarkType.var,c.TextMarkType.code,c.TextMarkType.timer,c.TextMarkType.duration,c.TextMarkType.color,c.TextMarkType.comment],B=new RegExp(/(\n|\r\n)/,"g"),v=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),C=new RegExp(/\]/,"g"),x="enter",P="between",k="exit";class _ extends g.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.generateOptions={},this.textFormat=l.TextFormat.bitmarkText,this.textLocation=p.TextLocation.body,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.text,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1,this.bitmarkVersion=null!==(r=s.BitmarkVersion.fromValue(e))&&void 0!==r?r:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},d),t),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion,s.BitmarkVersion.v2,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this)}generate(e,t,r,o){return i(this,void 0,void 0,(function*(){return this.generateSync(e,t,r,o)}))}generateSync(e,t,r,i){if(this.generateOptions=Object.assign({},i),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const i=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,r),this.walkAndWrite(e),this.options.writeCallback=i,this.options.bodyBitCallback=o;const n=this.havePreText,a=this.preTextIndex;this.resetState(t,r),this.havePreText=n,this.preTextIndex=a,this.walkAndWrite(e)}else this.resetState(t,r),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=null!=e?e:l.TextFormat.bitmarkText,this.textLocation=t,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,a.NodeType.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,r,i){return this.handleBetweenNode(e.value,t,r,i)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,r,i){this.handleBetweenContentValueNode(e,t,r,i)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,r,i){this.handleBetweenNode(e.value,t,r,i)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}handleEnterNode(e,t){switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case u.TextNodeType.paragraph:this.inParagraph=!0,this.writeParagraph(e);break;case u.TextNodeType.hardBreak:this.writeHardBreak(e);break;case u.TextNodeType.text:this.writeMarks(e,x),this.writeText(e),this.writeMarks(e,P),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case u.TextNodeType.heading:this.writeHeading(e),this.inHeading=!0;break;case u.TextNodeType.section:this.writeSection(e);break;case u.TextNodeType.listItem:case u.TextNodeType.taskItem:this.writeBullet(e,t);break;case u.TextNodeType.image:case u.TextNodeType.imageInline:this.writeImage(e);break;case u.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case u.TextNodeType.latex:this.writeLatex(e);break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.inBulletList=!0;break;case u.TextNodeType.gap:case u.TextNodeType.select:case u.TextNodeType.highlight:case u.TextNodeType.mark:return this.writeBodyBit(e,t),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){switch(e.type){case u.TextNodeType.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,k);break;case u.TextNodeType.paragraph:this.writeNL(),this.inParagraph=!1;break;case u.TextNodeType.heading:this.inHeading=!1;case u.TextNodeType.section:case u.TextNodeType.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case u.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}handleIndent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=u.TextNodeType.hardBreak)}handleBetweenContentValueNode(e,t,r,i){if(3===i.length){const e=t.value;this.updatePreTextState(),this.thisNodeIsPreText=!0,this.previousRootParagraphContextType=e.type,this.rootParagraphNodeContentIndex++}}handleExitContentValueNode(e,t){3===t.length&&(this.updatePreTextState(),this.thisNodeIsPreText=!1,this.generateOptions.plainTextDividerAllowed&&this.inPreText&&(this.havePreText=!0,this.preTextIndex=this.preTextIndexTemp),this.inPreText=!1)}updatePreTextState(){!this.inPreText&&this.thisNodeIsPreText&&this.previousRootParagraphContextType===u.TextNodeType.hardBreak?(this.inPreText=!0,this.preTextIndexTemp=this.rootParagraphNodeContentIndex):this.inPreText&&!this.thisNodeIsPreText&&(this.inPreText=!1,this.preTextIndexTemp=-1)}handleEnterNodePreTextCheck(e,t){if(4===t.length){if(this.inPreText&&e.type===u.TextNodeType.hardBreak)return;if(e.type===u.TextNodeType.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===u.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var r;if(t.type===c.TextMarkType.link){const e=null===(r=t.attrs)||void 0===r?void 0:r.href;if(e)return e}return e}),"");if(t)return t}return!1}getIndentationString(){if(this.currentIndent===this.prevIndent)return this.indentationStringCache;let e="";for(let t=1;t<this.currentIndent;t++)e+="\t";return this.indentationStringCache=e,this.prevIndent=this.currentIndent,e}writeBodyBit(e,t){const r=`[!${this.placeholderIndex}]`;if(this.placeholders[r]=e,this.options.bodyBitCallback){const r=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(r)}else this.write(r);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let r=e.text;const i=this.getLinkText(e);if(i&&(r=i),r=i||this.breakscape(r,{format:this.textFormat,location:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();r=r.replace(B,`$1${e}`)}if(this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{format:l.TextFormat.plainText,location:this.textLocation});this.write(t)}else this.write(r);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==r||(this.thisNodeIsPreText=!1)}isSimpleLink(e){var t;if(null==e.text)return!1;if(1!==(null===(t=e.marks)||void 0===t?void 0:t.length))return!1;const r=this.getLinkHref(e);if(r){return r.replace(v,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r;return r=t.replace(v,"$1")===e.text?t:e.text,r=(null!=r?r:"").replace(C,"^]"),r}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===s.BitmarkVersion.v2)return"";if(this.textFormat===l.TextFormat.plainText)return"";const t=this.writerText.slice(-1),r=e.slice(0,1);return t===r&&-1!==f.indexOf(t)||this.textLocation===p.TextLocation.body&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(r)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==u.TextNodeType.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const r=!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(T);const i=1===e.marks.length&&r,o=e.marks.reduce(((e,t)=>e||(-1!==h.indexOf(t.type)?i?m[t.type]:T:-1!==b.indexOf(t.type)?T:e)),void 0),n=this.isSimpleLink(e);if(null!=o&&!n){if(t!=x&&t!=P||this.writeMarkTextWrapper(o),t==P)for(const t of e.marks)-1!==h.indexOf(t.type)?i||(this.writeInlineMarkStartEnd(),this.writeInlineMark(t)):c.TextMarkType.comment===t.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(t)):c.TextMarkType.link===t.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(t)):c.TextMarkType.ref===t.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(t)):c.TextMarkType.xref===t.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(t)):c.TextMarkType.extref===t.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(t)):c.TextMarkType.footnote===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(t)):c.TextMarkType.footnoteStar===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(t)):c.TextMarkType.symbol===t.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(t)):-1!==b.indexOf(t.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(t));if(t==k){let t=!1;for(const r of e.marks)-1!==h.indexOf(r.type)?i||(t=!0):c.TextMarkType.comment!==r.type&&c.TextMarkType.link!==r.type&&c.TextMarkType.ref!==r.type&&c.TextMarkType.xref!==r.type&&c.TextMarkType.footnote!==r.type&&c.TextMarkType.footnoteStar!==r.type&&-1===b.indexOf(r.type)||(t=!0);t&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e){var t,r,i,o,n;if(this.textFormat===l.TextFormat.bitmarkText){if(this.inBulletList)return;const a=null!==(r=null===(t=e.content)||void 0===t?void 0:t.length)&&void 0!==r?r:0;if(0===this.nodeIndex){if(1===a){const t=(null===(i=e.content)||void 0===i?void 0:i[0].type)===u.TextNodeType.text,r=null!==(n=null===(o=e.content)||void 0===o?void 0:o[0].text)&&void 0!==n?n:"";if(!t||""!==r)return}if(a>1)return}this.write("|"),this.writeNL(),this.exitedCodeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,r;let i="";const o=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==r?r:1;for(let e=0;e<+o;e++)i+="#";i+=" ",this.write(i)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var r,i,o,n;let a=this.getIndentationString();const s=this.getParentNode(t,2),l=null==s?void 0:s.value,p=null==l?void 0:l.type,c=null!==(i=null===(r=null==l?void 0:l.attrs)||void 0===r?void 0:r.start)&&void 0!==i?i:1;if(p===u.TextNodeType.bulletList)a+="• ";else if(p===u.TextNodeType.noBulletList)a+="•_ ";else if(p===u.TextNodeType.orderedList)a+=`•${c} `;else if(p===u.TextNodeType.orderedListRoman)a+=`•${c}I `;else if(p===u.TextNodeType.orderedListRomanLower)a+=`•${c}i `;else if(p===u.TextNodeType.letteredList)a+="•A ";else if(p===u.TextNodeType.letteredListLower)a+="•a ";else if(p===u.TextNodeType.taskList){a+=null!==(n=null===(o=e.attrs)||void 0===o?void 0:o.checked)&&void 0!==n&&n?"•+ ":"•- "}a&&this.write(a)}writeImage(e){var t;if(null==e.attrs||!e.attrs.src)return;const r=e.attrs,i=e.type===u.TextNodeType.imageInline,o=this.getMediaAttrs(i?"imageInline":"image",r,{ignoreAttributes:i?new Set(["alt","zoomDisabled","title"]):void 0});let n="";i&&(n=`==${null!==(t=r.alt)&&void 0!==t?t:""}==`),n+=o?`|${o}|`:"",this.write(n)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,r=`==${this.breakscape(t.formula,{format:this.textFormat,location:this.textLocation})}==|latex|`;this.write(r)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[r,i]of Object.entries(e.attrs))("language"===r&&"plain text"!==i||"color"===r||"name"===r||"duration"===r)&&(t=`${t}:${i}`);this.write(t)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){var t;const r=(null===(t=e.attrs)||void 0===t?void 0:t.href)||"",i=`link:${(null!=r?r:"").replace(C,"^]")}`;this.write(i)}writeRefMark(e){var t,r;const i=`►${null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.reference)&&void 0!==r?r:""}`;this.write(i)}writeXRefMark(e){var t,r,i,o;const n=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.xref)&&void 0!==r?r:"",a=null!==(o=null===(i=e.attrs)||void 0===i?void 0:i.reference)&&void 0!==o?o:"";let s=`xref:${n}`;a&&(s+=`|►${a}`),this.write(s)}writeExtRefMark(e){var t,r,i,o,n,a;const s=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.extref)&&void 0!==r?r:"",l=null!==(o=null===(i=e.attrs)||void 0===i?void 0:i.references)&&void 0!==o?o:[],p=null!==(a=null===(n=e.attrs)||void 0===n?void 0:n.provider)&&void 0!==a?a:"";let c=`extref:${s}`;for(const e of l)c+=`|►${null!=e?e:""}`;c+=`|provider:${p}`,this.write(c)}writeFootnoteMark(e){this.write("footnote:")}writeFootnoteStarMark(e){this.write("footnote*:")}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,r=this.getMediaAttrs("symbol",t),i=null!=r?r:"";this.write(i)}writeInlineMarkStartEnd(){this.write("|")}writePlainTextDivider(){this.write("==== text ====")}writeString(e){null!=e&&this.write(`${e}`)}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}getMediaAttrs(e,t,r){var i,o;if(!e)return;const n=null!==(i=Object.assign({},r).ignoreAttributes)&&void 0!==i?i:new Set;let a=`${e}:${null!==(o=null==t?void 0:t.src)&&void 0!==o?o:""}`;const s=Object.entries(t).filter((([e,t])=>"src"!==e));for(let e=0;e<s.length;e++){const[t,r]=s[e];if(!n.has(t))switch(t){case"textAlign":"left"!==r&&(a+=`|captionAlign:${r}`);break;case"alignment":"center"!==r&&r&&(a+=`|alignment:${r}`);break;case"title":r&&(a+=`|caption:${r}`);break;case"class":"center"!==r&&r&&(a+=`|align:${r}`);break;case"comment":r&&(a+=`|#${r}`);break;case"":y.StringUtils.isString(r)?a+=`|:${r}`:a+="|";break;case"zoomDisabled":r||(a+="|zoomDisabled:false");break;default:t&&r&&(a+=`|${t}:${r}`)}}return a}breakscape(e,t){return this.generateOptions.noBreakscaping?e:n.Breakscape.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=_},486:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const i=(0,r(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=i},554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=function(e,t,r,l,p){const{textFormat:c}=e,{value:u}=l,y=p.solutions,g=p.__solutionsAst;if(!y||!g)return;if(a.StringUtils.isString(u)){const e=a.StringUtils.trimmedString(u);y.push(i.Breakscape.unbreakscape(e,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}));const t=s.toAst(e,{format:c,location:n.TextLocation.tag});g.push(t)}};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=new(r(777).TextParser)},777:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const i=r(6877),o=r(9554),n=r(9681),a=r(2220);t.TextParser=class{version(){return(0,a.parse)("",{startRule:"version"})}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){if(Array.isArray(e)){if(0===e.length)return!0;if(Object.prototype.hasOwnProperty.call(e[0],"type"))return!0}return!1}toAst(e,t){var r;if(Array.isArray(e))return e;let o=null!==(r=e)&&void 0!==r?r:"";if(!o)return[];let n="bitmarkPlusPlus";return Object.assign({},t).location===i.TextLocation.tag&&(n="bitmarkPlus"),o=o.trim(),(0,a.parse)(o,{startRule:n})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],r=e;for(const e of r)switch(e.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t.push(e);break;default:{const r=this.extractBodyBits(e.content);for(const e of r)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const r=e;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t(r,e,i);break;default:this.walkBodyBits(i.content,t)}}}}},955:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=i(r(7678));const n=new class{isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}isArray(e){return Array.isArray(e)}isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}getViaPath(e,t){if(!e)return;if(!t)return;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let r=e;for(const e of t){if(null==r)return;r=r[e]}return r}setViaPath(e,t,r,i){if(!e)return!1;if(!t)return!1;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let o=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(null==o[r]){if(!i)return!1;o[r]={}}o=o[r]}return o[t[t.length-1]]=r,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const r=e,i=t.shift();if(null==i)return r;const o=r[i];return o?Array.isArray(o)?o.flatMap((e=>this.flatMapPath(e,t.slice()))):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const r=e,i=Object.assign({},r);for(const e of Object.keys(r))delete r[e];for(const e of t)Object.prototype.hasOwnProperty.call(i,e)&&(r[e]=i[e])}removeUndefinedProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||null==i&&delete r[e]}removeFalseProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||!1===i&&delete r[e]}removeEmptyStringProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||""===i&&delete r[e]}removeEmptyArrayProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||Array.isArray(i)&&0===i.length&&delete r[e]}removeEmptyObjectProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||this.isObject(i)&&0===Object.keys(i).length&&delete r[e]}removeUnwantedProperties(e,t){(t=Object.assign({},t)).ignoreAllUndefined||this.removeUndefinedProperties(e,t.ignoreUndefined),t.ignoreAllFalse||this.removeFalseProperties(e,t.ignoreFalse),t.ignoreAllEmptyString||this.removeEmptyStringProperties(e,t.ignoreEmptyString),t.ignoreAllEmptyArrays||this.removeEmptyArrayProperties(e,t.ignoreEmptyArrays),t.ignoreAllEmptyObjects||this.removeEmptyObjectProperties(e,t.ignoreEmptyObjects)}extractSingleValue(e,t){if(!e)return;const r=e;if(null==r[t])return;let i=r[t];if(Array.isArray(i)){if(0===i.length)return;i=i[i.length-1]}return i}deepMerge(...e){return function e(...t){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(t,i){for(const[n,a]of Object.entries(i)){const i=r(a);void 0!==t[n]&&r(t[n])===i&&["array","object"].includes(i)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=r(e);r(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?i(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},1083:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=function(e,t,r,d,T,f,m,h){var b;const{bitConfig:B}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",d);let v={};const C=function(e,t){var r;const i={cards:[],internalComments:[]};if(!t)return i;const{bitType:o}=e;let a=0,s=0,l=0;for(const p of t.cards){const t={no:a++,sides:[]};i.cards.push(t);for(const a of p.sides){const p={no:s++,variants:[]};t.sides.push(p);for(const c of a.variants){const{parser:a,content:g}=c,d={parser:a,no:l++};p.variants.push(d);const T=n.Config.getTagsConfigForCardSet(o,s,l),f=e.bitContentProcessor(y.BitContentLevel.Card,T,g);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",f),f.cardBody=u.BitmarkPegParserValidator.checkCardBody(e,y.BitContentLevel.Card,o,f.cardBody,t.no,p.no,d.no),f.cardBodyStr=null===(r=f.cardBody)||void 0===r?void 0:r.bodyString,d.data=f,f.internalComments&&i.internalComments.push(...f.internalComments)}l=0}s=0}return i}(e,d);switch(null===(b=B.cardSet)||void 0===b?void 0:b.configKey){case a.CardSetConfigKey._flashcard:case a.CardSetConfigKey._definitionList:v=function(e,t,r){var o;const a=[],l=[];let p,c,u,y="",d=[],T=0,f={};const m=t===s.BitType.flashcard1,h=g(r);for(let g=0;g<r.cards.length;g++){const b=r.cards[g];if(!h||0!==g){p=void 0,c=void 0,d=[],T=0,f={};for(const e of b.sides)for(const t of e.variants){const e=t.data,{cardBody:r,resources:n}=e,a=i(e,["cardBody","resources"]);f=Object.assign(Object.assign({},f),a);const s=n&&n.length>0?n[0]:void 0,l=null==r?void 0:r.body,g=null!==(o=null==r?void 0:r.bodyString)&&void 0!==o?o:"";0===T?(u=t,y=g,p={text:l,icon:s}):1===T?c={text:l,icon:s}:d.push({text:l,icon:s}),T++}if(0!==g&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${y}'`,u);break}if(n.Config.isOfBitType(t,[s.BitType.flashcard])){const e=Object.assign({question:p,answer:c,alternativeAnswers:d},f);e&&a.push(e)}else{const e=Object.assign({term:p,definition:c,alternativeDefinitions:d},f);e&&l.push(e)}}}return{heading:null==h?void 0:h.heading,flashcards:a.length>0?a:void 0,definitions:l.length>0?l:void 0}}(e,t,C);break;case a.CardSetConfigKey._elements:v=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(i=t.cardBodyStr)&&void 0!==i?i:"")}return{elements:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._statements:v=function(e,t,r,o,n){var a;const s=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:r,statement:o}=t,n=i(t,["statements","statement"]);if(Array.isArray(r))for(const e of r){const t=Object.assign({statement:null!==(a=e.statement)&&void 0!==a?a:"",isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example},n);t&&s.push(t)}}o&&s.push(o);Array.isArray(n)&&n.length>0&&s.push(...n);return{statements:s.length>0?s:void 0}}(0,0,C,T,f);break;case a.CardSetConfigKey._feedback:v=function(e,t,r){let o;const n=[],a=g(r);for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(!a||0!==e){o=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:s,choices:l}=r,p=i(r,["cardBody","cardBodyStr","choices"]);if(0===e){const e=[];if(l&&l.length>0)for(const t of l){const{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]),a={choice:n.choice,requireReason:n.isCorrect,__isDefaultExample:r,example:o};e.push(a)}o=Object.assign(Object.assign({},r),{choices:e}),o&&n.push(o)}else if(1===e){const e=Object.assign({text:null!=s?s:"",__textAst:null==a?void 0:a.body},p);o&&(o.reason=e)}}}}}return{heading:null==a?void 0:a.heading,feedbacks:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._quiz:v=function(e,t,r,o,a){const l=[],p=n.Config.isOfBitType(t,s.BitType.multipleChoice),c=n.Config.isOfBitType(t,s.BitType.multipleResponse);if(!p&&!c)return{};let u,y=!1;for(const e of r.cards){y=!1,u=void 0;for(const t of e.sides)for(const e of t.variants){const t=e.data,{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]);if(y=!0===r||y,u=o||u,n.trueFalse&&n.trueFalse.length>0){const e=[];for(const t of n.trueFalse){const{__isDefaultExample:r,example:o}=t,n=i(t,["__isDefaultExample","example"]),a=r||y,s=o||u,l={isCorrect:n.isCorrect,__isDefaultExample:a,example:s};c?l.response=n.text:l.choice=n.text,l&&e.push(l)}c?n.responses=e:n.choices=e}const a=Object.assign(Object.assign({},n),{choices:n.choices,responses:n.responses,__isDefaultExample:y,__defaultExample:u});a&&l.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e={choices:o};e&&l.push(e)}if(c&&Array.isArray(a)&&a.length>0){const e={responses:a};e&&l.push(e)}return{quizzes:l.length>0?l:void 0}}(0,t,C,m,h);break;case a.CardSetConfigKey._questions:v=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=Object.assign({question:null!==(i=t.cardBodyStr)&&void 0!==i?i:""},t);r&&o.push(r)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._matchPairs:v=function(e,t,r){var o;const a=[];let l,c,u,y,d=[],T=[],f={},m=!1;const h=n.Config.isOfBitType(t,s.BitType.matchMatrix),b=g(r,h),B=null!==(o=null==b?void 0:b.isDefaultExampleCardSet)&&void 0!==o&&o;let v=null==b?void 0:b.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(b&&0===e)continue;l=void 0,d=[],T=[],c=void 0,u=void 0,f={},m=!1,y=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:o,cardBodyStr:n,resources:a,__isDefaultExample:s,example:g}=r,h=i(r,["cardBody","cardBodyStr","resources","__isDefaultExample","example"]);if(m=!0===s||m,y=g||y,0===e)if(Array.isArray(a)&&a.length>0){const e=a[0];e.type===p.ResourceTag.audio?c=e:e.type===p.ResourceTag.image&&(u=e)}else l=n;else{const e=null!=n?n:"",t=null==o?void 0:o.body;d.push(e),T.push(t),!B&&!m||y||(y=t),delete h.item,delete h.lead}f=Object.assign(Object.assign({},f),h)}}m&&(v=void 0);const o=m||B,n=y||v,s=Object.assign(Object.assign({key:null!=l?l:"",keyAudio:c,keyImage:u,values:d,__valuesAst:T},f),{__isDefaultExample:o,example:n});s&&a.push(s)}return{heading:null==b?void 0:b.heading,pairs:a.length>0?a:void 0}}(0,t,C);break;case a.CardSetConfigKey._matchMatrix:v=function(e,t,r){var n;let a,s;const l=[];let p,c,u,y,d=[],T=[],f=[],m={},h=!1,b=!1;const B=g(r,!0),v=null!==(n=null==B?void 0:B.isDefaultExampleCardSet)&&void 0!==n&&n;let C=null==B?void 0:B.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(B&&0===e)continue;a=void 0,s=void 0,d=[],T=[],f=[],h=!1,p=void 0,u=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];T=[],f=[],m={},b=!1,c=void 0,y=void 0;for(const t of r.variants){const r=t.data,{cardBody:n,cardBodyStr:l,__isDefaultExample:g,example:d,isCaseSensitive:B}=r,C=i(r,["cardBody","cardBodyStr","__isDefaultExample","example","isCaseSensitive"]);if(b=!0===g||b,c=d||c,Object.assign(m,C),0===e)a=l,s=C,h=!0===g||h,p=d||p,u=null!=B?B:u;else{const e=null!=l?l:o.Breakscape.EMPTY_STRING,t=null==n?void 0:n.body;T.push(e),f.push(t),!v&&!b||c||(c=t),y=null!=B?B:u}}if(e>0){b&&(p=C=void 0),h&&(C=void 0);const e=b||h||v,t=c||p||C,r=Object.assign(Object.assign({values:T,__valuesAst:f},m),{__isDefaultExample:e,example:t,isCaseSensitive:y});r&&d.push(r)}}const n=Object.assign({key:null!=a?a:o.Breakscape.EMPTY_STRING,cells:d},s);n&&l.push(n)}return{heading:null==B?void 0:B.heading,matrix:l.length>0?l:void 0}}(0,0,C);break;case a.CardSetConfigKey._pronunciationTable:v=function(e,t,r){var i;const o=[];let n=[];for(const e of r.cards){n=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBody:o,resources:a}=t,s=r&&r[1].titleAst,l=a&&a.length>0?a.find((e=>e.type===p.ResourceTag.audio)):void 0,c={title:null!=s?s:[],body:null!==(i=null==o?void 0:o.body)&&void 0!==i?i:[],audio:l};n.push(c)}o.push(n)}return{pronunciationTable:{data:o}}}(0,0,C);break;case a.CardSetConfigKey._table:v=function(e,t,r){var i;let o=!1;const n=[],a=[];let s=[];for(let e=0;e<r.cards.length;e++){const t=r.cards[e];o=!1,s=[];for(const r of t.sides)for(const t of r.variants){const r=t.data,{title:a,cardBody:l}=r,p=a&&a[1].titleAst;if(0===e&&null!=p&&(o=!0),o)n.push(null!=p?p:[]);else{const e=null!==(i=null==l?void 0:l.body)&&void 0!==i?i:[];s.push(e)}}o||a.push(s)}return{table:{columns:n,data:a}}}(0,0,C);break;case a.CardSetConfigKey._botActionResponses:v=function(e,t,r){const n=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{__instructionString:r,reaction:a,cardBodyStr:s}=t,l=i(t,["__instructionString","reaction","cardBodyStr"]),p=Object.assign({response:null!=r?r:o.Breakscape.EMPTY_STRING,reaction:null!=a?a:o.Breakscape.EMPTY_STRING,feedback:null!=s?s:o.Breakscape.EMPTY_STRING},l);p&&n.push(p)}return{botResponses:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._ingredients:v=function(e,t,r){const n=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,__instructionString:a,unit:s,unitAbbr:p,decimalPlaces:u,disableCalculation:y,cardBodyStr:g,cardBody:d}=t,T=i(t,["title","__instructionString","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),f=Array.isArray(r)&&r.length>0?r[r.length-1].titleString:void 0;let m=!1,h=c.NumberUtils.asNumber(a);if(d&&d.bodyBits){const e=d.bodyBits.find((e=>e.type===l.BodyBitType.select));e&&(h=e.__instructionString?c.NumberUtils.asNumber(e.__instructionString):h,e.options&&e.options.length>0&&(m=e.options[0].isCorrect))}const b=Object.assign({title:f,checked:m,ingredient:g,quantity:h,unit:null!=s?s:o.Breakscape.EMPTY_STRING,unitAbbr:null!=p?p:o.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:y},T);b&&n.push(b)}return{ingredients:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._clozeList:case a.CardSetConfigKey._exampleBitList:case a.CardSetConfigKey._bookReferenceList:v=function(e,t,r,o){const n=[];for(const e of o.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:r}=t,o=i(t,["cardBody"]),a=Object.assign({body:r},o);a&&n.push(a)}return{cardBits:n.length>0?n:void 0}}(0,0,0,C)}return v.internalComments=C.internalComments.length>0?C.internalComments:void 0,v};const o=r(7735),n=r(2028),a=r(8199),s=r(5854),l=r(4410),p=r(6149),c=r(8025),u=r(4266),y=r(3029);function g(e,t=!1){let r,i,o=!1;const n=[];let a,s=!1;if(0===e.cards.length)return;const l=e.cards[0];for(let e=0;e<l.sides.length;e++){const t=l.sides[e];if(0===t.variants.length)continue;const r=t.variants[0].data,{title:p,__isDefaultExample:c,example:u}=r,y=p&&p[1].titleString;null!=y&&(o=!0),0===e?o&&(i=y,s=!0===c||s,a=u||a):o&&(n.push(null!=y?y:""),s=!0===c||s,a=u||a)}if(o){let e=n;e=t?n:n.length>=1?n[n.length-1]:"",r={forKeys:null!=i?i:"",forValues:e}}return r?{heading:r,isDefaultExampleCardSet:s,exampleCardSet:a}:void 0}},1163:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const i=(0,r(4718).superenum)({v1:1,v2:2});t.CardSetVersion=i},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){if(n)return;(0,o.initEnv)(i.buildInfo.name,i.buildInfo.version),n=!0};const i=r(1464),o=r(6936);r(2028);let n=!1},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,r,i){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=r,this.comboResourceTagTypesMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"3.34.0",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},1519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s,l,p,c,u){super(i.BitTagType.property,e,t,r,o,n,a,s,u),this.type=i.BitTagType.property,this.single=l,this.format=p,this.defaultValue=c}toString(e){const t=Object.assign({},e);let r=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.single&&(r+=`, sgl=${this.single}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`),null!=this.astKey&&(r+=`, ast=${this.astKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.PropertyTagConfig=n},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8},1791:function(e,t,r){var i,o=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=(this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},i(e)}),this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.Input=t.BitmarkParserGenerator=void 0;const s=r(4718),l=r(5126),p=r(3968),c=r(7984),u=r(8588),y=r(5633),g=r(5663),d=r(6936),T=r(3881),f=r(486),m=r(3069),h=r(2028),b=r(431),B=r(777),v=(0,s.superenum)({string:"string",file:"file"});t.Input=v;const C=(0,s.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=C;t.BitmarkParserGenerator=class{constructor(){this.ast=new l.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new y.BitmarkParser,this.textParser=new B.TextParser,this.textGenerator=new b.TextGenerator,this.jsonStringifyPrettify=(e,t,r)=>{const i=!0===t.prettify?2:t.prettify||void 0;return r||!0===t.stringify||void 0!==i?JSON.stringify(e,null,i):e}}version(){return d.env.appVersion.full}info(e){const t=Object.assign({},e),r=new T.InfoBuilder;let i;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,p=a||s;if(t.type===f.InfoType.bit){const e=r.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.getBitType(t.bit)===e.bitType}));i=o?e.map((e=>e.toString({includeChains:!0,includeConfigs:!0}))).join("\n\n--------------\n\n"):e}else{const e=r.getSupportedBits({includeNonDeprecated:l,includeDeprecated:p}).filter((e=>{if(!t.bit)return!0;const r=h.Config.getBitType(t.bit);return e.name===r||void 0}));i=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}convert(e,t){return a(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),n=i.outputFormat,s=n===C.bitmark,l=n===C.json,y=n===C.ast,g=u.BitmarkParserType.peggy;let T=e;if(d.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==v.file||d.env.isNode&&fs.existsSync(T)&&(T=fs.readFileSync(T,{encoding:"utf8"}));let f=this.ast.preprocessAst(T);const m=!!f;m||(f=this.jsonParser.toAst(T));const h=!!(null==f?void 0:f.bits),b=e=>a(this,void 0,void 0,(function*(){yield B(e),yield P(r)})),B=e=>a(this,void 0,void 0,(function*(){r=this.bitmarkParser.toAst(e,{parserType:g})})),x=e=>a(this,void 0,void 0,(function*(){if(g===u.BitmarkParserType.peggy)if(f=this.bitmarkParser.toAst(e,{parserType:g}),i.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield e.generate(f)}else{const e=new c.JsonObjectGenerator(i),t=yield e.generate(f);r=this.jsonStringifyPrettify(t,o)}})),P=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(i);r=yield t.generate(e)}})),k=e=>a(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),_=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}})),K=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(i);r=yield t.generate(e)}})),A=e=>a(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),w=e=>a(this,void 0,void 0,(function*(){yield _(e)}));return!h&&!m?s?yield b(T):y?yield B(T):yield x(T):m?y?yield k(f):l?yield _(f):yield P(f):l?yield w(f):y?yield A(f):yield K(f),r}))}upgrade(e,t){return a(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),n=i.bitmarkParserType;let s=e;if(d.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==v.file||d.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const u=e=>a(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:n});if(i.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield e.generate(t)}else{const e=new p.BitmarkStringGenerator(i);r=yield e.generate(t)}})),y=e=>a(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}}));return!!!(null==l?void 0:l.bits)?yield u(s):yield y(l),r}))}createAst(e,t){let r,i=e;const o=Object.assign({},t);o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let n=this.ast.preprocessAst(i);const a=!!n;a||(n=this.jsonParser.toAst(i));return r=!!!(null==n?void 0:n.bits)&&!a?this.bitmarkParser.toAst(i):n,r}convertText(e,t){return a(this,void 0,void 0,(function*(){var r,i;let o,n;const a=Object.assign({},t),s=Object.assign({},a.fileOptions),l=Object.assign({},a.jsonOptions),p=null!==(r=TextFormat_1.TextFormat.fromValue(a.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,c=null!==(i=a.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let u=e;if(d.env.isBrowser&&a.outputFile)throw new Error("Cannot write to file in browser environment");a.inputFormat&&a.inputFormat!==v.file||d.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const y=this.textParser.preprocessAst(u),g=!!y;if(n=g?yield this.textGenerator.generate(y,p,c):this.textParser.toAst(u,{format:p,location:TextLocation_1.TextLocation.body}),a.outputFile){const e=a.outputFile.toString();let t=n;g||(t=this.jsonStringifyPrettify(n,l,!0));const r=s.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else o=g?n:this.jsonStringifyPrettify(n,l);return o}))}breakscapeText(e,t){var r,i;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(r=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,s=null!==(i=o.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.breakscape(l,{format:a,location:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}unbreakscapeText(e,t){var r,i;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(r=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==r?r:TextFormat_1.TextFormat.bitmarkText,s=null!==(i=o.textLocation)&&void 0!==i?i:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.unbreakscape(l,{format:a,location:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}supportedBitsAsString(e){let t="";for(const r of e)t+=`${r.name} (since: ${r.since}`,r.deprecated&&(t+=`, deprecated: ${r.deprecated}`),t+=")\n";return t}}},2028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const i=r(3619),o=r(9600),n=r(1457),a=r(6915),s=r(5512),l=r(5854),p=r(385),c=r(955),u=r(4445),y=r(6853),g=r(5837),d=r(9916);const T=new class{constructor(){this.bitLevelMin=1,this.bitLevelMax=7,this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const r=this.getBitConfig(e);if(!r)return!1;if(Array.isArray(t)){for(const e of t)if(r.inheritedBitTypesSet.has(e))return!0;return!1}return r.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let r=this.bitCache.get(e);if(!r){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=y.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=c.ObjectUtils.deepMerge(e,t)),{}),{since:g,textFormatDefault:d,quizBit:T,tags:f,cardSet:m,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),_=u.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),K=u.ConfigHydrator.hydrateCardSetConfig(m),A=null===(t=_.info)||void 0===t?void 0:t.comboResourceType,w=Object.assign({},_.tags);for(const[e,t]of Object.entries(k))w[e]||(w[e]=t);r=new i.BitConfig({since:g,bitType:e,inheritedBitTypes:n,textFormatDefault:null!=d?d:p.TextFormat.bitmarkText,tags:w,cardSet:K,quizBit:T,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P,comboResourceType:A}),this.bitCache.set(e,r)}return r}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,r]of Object.entries(e))if(r.tag===t)return r}getTagsConfigForCardSet(e,t,r){const i=this.getBitConfig(e);if(!i)return;const o=i.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[r=Math.min(r,n.length-1)].tags}getBitResourcesConfig(e,t){var r;let i={};const a=new Map,l=this.getBitConfig(e),p={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(p[e]=t);const c=null!==(r=l.comboResourceType)&&void 0!==r?r:l.resourceAttachmentAllowed&&t;if(c){const e=new Map,r=this.getComboResource(c);if(r){const t=Object.values(r).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((r=>{const i=t.find((e=>e.tag===r));i&&e.set(r,i)}));const i=this.getComboResourceTagTypes(c);i&&i.length>0&&a.set(c,i)}if(t)for(const[t,r]of Object.entries(p)){const n=c===r.tag,a=!!e&&e.has(r.tag);if(n){const e=new o.ResourceTagConfig(r.configKey,r.tag,1,1,r.chain,r.jsonKey,r.deprecated);i[t]=e}else if(a){if(e){const o=e.get(r.tag);o&&(i[t]=o)}}else i[t]=r}else i=p}else i=p;return new n.ResourcesConfig(i,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(g.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),u.ConfigHydrator.hydrateTagsConfig(e.tags).tags)})),0===Object.keys(t).length&&(t=void 0),this.comboResourcesCache.set(e,t)),t}getAllResourcesTagsWithZeroCounts(){let e=this.allResourcesCache;if(!e){e={},Object.values(g.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),u.ConfigHydrator.hydrateTagsConfig(t.tags).tags)}));for(const t of Object.values(e)){const e=t;e.maxCount=0,e.minCount=0}this.allResourcesCache=e}return e}};t.Config=T},2086:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKSCAPE_CODE_REGEX_REPLACER=t.BREAKSCAPE_CODE_REGEX=t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER=t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX=t.UNBREAKSCAPE_REGEX_REPLACER=t.UNBREAKSCAPE_REGEX=t.BREAKSCAPE_V2_BODY_REGEX_REPLACER=t.BREAKSCAPE_V2_BODY_REGEX=t.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER=t.BREAKSCAPE_PLAIN_BODY_REGEX=t.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER=t.BREAKSCAPE_BITMARK_BODY_REGEX=t.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER=t.BREAKSCAPE_PLAIN_TAG_REGEX=t.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER=t.BREAKSCAPE_BITMARK_TAG_REGEX=t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE=t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE=t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE=t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE=t.REGEX_HATS=t.REGEX_BIT_START=t.REGEX_END_OF_TAG=t.REGEX_PLAIN_TEXT_DIVIDER=t.REGEX_FOOTER_DIVIDER=t.REGEX_START_OF_TAG=t.REGEX_LIST_BLOCKS=t.REGEX_TITLE_BLOCKS=t.REGEX_BLOCKS=t.REGEX_MARKS=void 0,t.REGEX_MARKS=/([*`_!=])(?=\1)/,t.REGEX_BLOCKS=/^(\|)(code[\s]*|code:|image:|[\s]*$)/,t.REGEX_TITLE_BLOCKS=/^([#]{1,3})([^\S\r\n]+)/,t.REGEX_LIST_BLOCKS=/^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/,t.REGEX_START_OF_TAG=/(\[)([.@#▼►%!?+\-$_=&])/,t.REGEX_FOOTER_DIVIDER=/^(~)(~~~[ \t]*)$/,t.REGEX_PLAIN_TEXT_DIVIDER=/^(\$)(\$\$\$[ \t]*)$/,t.REGEX_END_OF_TAG=/(\^*])/,t.REGEX_BIT_START=/^(\[)(\^*)(\.)/,t.REGEX_HATS=/(\^+)/,t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE=`${t.REGEX_MARKS.source}|${t.REGEX_END_OF_TAG.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE=`${t.REGEX_END_OF_TAG.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE=`${t.REGEX_MARKS.source}|${t.REGEX_BLOCKS.source}|${t.REGEX_TITLE_BLOCKS.source}|${t.REGEX_LIST_BLOCKS.source}|${t.REGEX_START_OF_TAG.source}|${t.REGEX_FOOTER_DIVIDER.source}|${t.REGEX_PLAIN_TEXT_DIVIDER.source}|${t.REGEX_HATS.source}`,t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE=`${t.REGEX_BIT_START.source}`,t.BREAKSCAPE_BITMARK_TAG_REGEX=new RegExp(t.BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE,"gm"),t.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER="$1$3^$2",t.BREAKSCAPE_PLAIN_TAG_REGEX=new RegExp(t.BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE,"gm"),t.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER="$2^$1",t.BREAKSCAPE_BITMARK_BODY_REGEX=new RegExp(t.BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE,"gm"),t.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER="$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14",t.BREAKSCAPE_PLAIN_BODY_REGEX=new RegExp(t.BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE,"gm"),t.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER="$1^$2$3",t.BREAKSCAPE_V2_BODY_REGEX=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),t.BREAKSCAPE_V2_BODY_REGEX_REPLACER="$1$4^$2$3",t.UNBREAKSCAPE_REGEX=new RegExp("\\^([\\^]*)","gm"),t.UNBREAKSCAPE_REGEX_REPLACER="$1",t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),t.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER="$1$2$3",t.BREAKSCAPE_CODE_REGEX=new RegExp("^(\\||•|#)","gm"),t.BREAKSCAPE_CODE_REGEX_REPLACER="$1^"},2220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(8321).parse;t.parse=i},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},2483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const i=(0,r(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEmRed:"languageEmRed",languageEmOrange:"languageEmOrange",languageEmYellow:"languageEmYellow",languageEmGreen:"languageEmGreen",languageEmBlue:"languageEmBlue",languageEmPurple:"languageEmPurple",languageEmPink:"languageEmPink",languageEmBrown:"languageEmBrown",languageEmBlack:"languageEmBlack",languageEmWhite:"languageEmWhite",languageEmGray:"languageEmGray",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",notranslate:"notranslate",link:"link",ref:"ref",xref:"xref",extref:"extref",footnote:"footnote",footnoteStar:"footnote*",symbol:"symbol",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",comment:"comment"});t.TextMarkType=i},2497:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const a=n(r(7678)),s=r(5126),l=r(7735),p=r(2028),c=r(126),u=r(5854),y=r(3811),g=r(4410),d=r(363),T=r(6149),f=r(385),m=r(6877),h=r(9554),b=r(777),B=r(4078),v=r(8025),C=r(4),x=r(431),P={};class k extends C.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new s.Ast,this.textParser=new b.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=l.Breakscape.EMPTY_STRING,this.bodyDefault=l.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.placeholderIndex=0,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(r=y.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:y.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},P),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===y.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new x.TextGenerator(y.BitmarkVersion.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,c.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}exit_bitmarkAst(e,t){this.options.textAsPlainText&&this.convertAllBitmarkTextsToStringsForPlainText(this.json),this.removeTemporaryProperties(this.json)}enter_bitsValue(e,t){var r,i;const o=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(o),this.bitWrapperJson.bit=this.bitJson;const n=p.Config.getBitConfig(o.bitType),a=this.getTextFormat(t),s=!!n.rootExampleType,l=n.rootExampleType===d.ExampleType.boolean;if(s){let e;l?(e=!0,p.Config.isOfBitType(o.bitType,u.BitType.trueFalse1)&&void 0!==(null===(i=null===(r=o.cardNode)||void 0===r?void 0:r.statement)||void 0===i?void 0:i.isCorrect)&&(e=o.cardNode.statement.isCorrect)):e="true";const t=this.toExample(o,{defaultExample:e,isBoolean:l,textFormat:a});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else o.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const r=this.bitJson.isExample,i=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=r,this.bitJson.example=i,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_person(e,t){const r=this.getBitType(t);let i="person";return p.Config.isOfBitType(r,u.BitType.conversationLeft1)&&(i="partner"),this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1,keyOverride:i})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_productId(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==c.NodeType.bitsValue)return!0;return this.getBitType(t)===u.BitType.module?this.addProperty(this.bitJson,"productId",r,{array:!0}):r.length>0&&this.addProperty(this.bitJson,"productId",r[r.length-1],{array:!1}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);return(null==i?void 0:i.key)!==c.NodeType.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(r),!1)}enter_item(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_title(e,t){return this.standardHandler(e,t,[c.NodeType.bitsValue,c.NodeType.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_width(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:i})}enter_height(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:i})}enter_extraProperties(e,t){const r=e.value;if(!this.options.excludeUnknownProperties&&r)for(const[e,t]of Object.entries(r)){let r=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(r=`_${e}`),this.addProperty(this.bitJson,r,t,{array:!0})}}enter_cardBitsValue(e,t){var r,i,o,n,a,s,l,p,c;const y=e.value,g=this.getBitType(t);if(!g)return;let d;if(g===u.BitType.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",y.lang,{array:!1}),this.addProperty(e,"refAuthor",null!==(r=y.refAuthor)&&void 0!==r?r:[],{array:!0}),this.addProperty(e,"refBookTitle",null!==(i=y.refBookTitle)&&void 0!==i?i:[],{array:!1}),this.addProperty(e,"refPublisher",null!==(o=y.refPublisher)&&void 0!==o?o:[],{array:!0}),this.addProperty(e,"refPublicationYear",null!==(n=y.refPublicationYear)&&void 0!==n?n:[],{array:!1}),this.addProperty(e,"citationStyle",null!==(a=y.citationStyle)&&void 0!==a?a:[],{array:!1}),this.bitJson.bookReferences.push(e)}else g===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),d=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),d=this.bitJson.listItems),this.listItem={item:null!==(s=y.item)&&void 0!==s?s:[],lead:null!==(l=y.lead)&&void 0!==l?l:[],hint:null!==(p=y.hint)&&void 0!==p?p:[],instruction:null!==(c=y.instruction)&&void 0!==c?c:[],body:this.bodyDefault},d.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const r=e.value,i=this.getParentNode(t);if(!i)return!1;const o=this.getTextFormat(t),n=o===f.TextFormat.bitmarkText;if(this.bodyJson=r.body,i.key===c.NodeType.bitsValue){this.bitJson.body=this.bodyJson;const e=n&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,m.TextLocation.body,{noBreakscaping:!0});this.bitJson.body=(null!=e?e:"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else i.key===c.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,r){var i;const o=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=null!==(i=this.bitJson.placeholders)&&void 0!==i?i:{},this.bitJson.placeholders[o]=e,o}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=(0,a.default)(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const r of e)if(r.type!==g.BodyBitType.text&&g.BodyBitType.values().includes(r.type)){const e=r;e.attrs={};for(const[t,r]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=r,delete e[t])}else Array.isArray(r.content)&&(t++,this.moveBodyBitPropertiesToAttrs(r.content,t));return e}enter_footer(e,t){return this.standardHandler(e,t,void 0,{array:!0,valueOverride:e.value.footer})}enter_elements(e,t){return this.standardHandler(e,t,void 0,{array:!0})}enter_flashcards(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_statement(e,t){var r,i;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===c.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(r=o.statement)&&void 0!==r?r:"",this.bitJson.isCorrect=null!==(i=o.isCorrect)&&void 0!==i&&i,this.bitJson.example=o.example,this.bitJson.isExample=o.isExample)}enter_statements(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_heading(e,t){return this.standardHandler(e,t,void 0,{array:!1})}enter_pairs(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_resources(e,t){var r,i;const o=e.value,n=this.getBitType(t),a=this.getResourceType(t);if(!o||!n)return!0;let s;const l=p.Config.getBitConfig(n),c=p.Config.getBitResourcesConfig(n,a),y=c.comboResourceTagTypesMap;if(c.comboResourceTagTypesMap.size>0)for(const[e,t]of y.entries()){const n={type:e,__typeAlias:e};for(const e of t){const t=o.find((t=>t.__typeAlias===e));if(t){const e=p.Config.getTagConfigForTag(l.tags,t.__typeAlias),o=null!==(r=null==e?void 0:e.jsonKey)&&void 0!==r?r:t.__typeAlias,a=null!==(i=null==e?void 0:e.tag)&&void 0!==i?i:t.__typeAlias,s=t.__typeAlias===a?t:void 0;if(s)for(const[e,t]of Object.entries(s))"type"!==e&&(n[o]=t)}}s=n}else if(p.Config.isOfBitType(n,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of o)t.type===T.ResourceTag.image&&e.push(t);n===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else o.length>=1&&(s=o[0]);return this.bitJson.resource=s,!1}leaf_level(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_markup(e,t){const r=e.value;return r&&(this.bitWrapperJson.bitmark=r),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const r=e.value,i=this.getBitType(t),n=this.getParentNode(t);if(r&&i){const{version:e,excessResources:i,warnings:a,errors:s}=r,l=o(r,["version","excessResources","warnings","errors"]),p=`${this.bitmarkVersion}`,u=this.textParserVersion;let y;if(Array.isArray(i)&&i.length>0){y=[];for(const e of i)y.push(e)}const g=this.getInternalComments(t);(null==n?void 0:n.key)===c.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:p,textParserVersion:u,internalComments:g},l),{warnings:a,errors:s,excessResources:y}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=p.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag,i=`enter_${t}`;"function"!=typeof this[i]&&("example"!==t&&(this[i]=(e,t)=>{var i;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==c.NodeType.bitsValue)return;const a=null!==(i=r.jsonKey)&&void 0!==i?i:r.tag;this.addProperty(this.bitJson,a,o,{array:!r.single})},this[i]=this[i].bind(this)))}}standardHandler(e,t,r,i){var o,n;if(r){const e=Array.isArray(r)?r:[r],i=this.getParentNode(t);if(!(null==i?void 0:i.key)||!e.includes(null==i?void 0:i.key))return!0}return this.addProperty(this.bitJson,null!==(o=i.keyOverride)&&void 0!==o?o:e.key,null!==(n=i.valueOverride)&&void 0!==n?n:e.value,i),!1}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]);const n=r;o=!i.array&&n.length>=1?n[n.length-1]:n,(i.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:r,example:i,__isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!r)return{isExample:!1,example:null};let s;return s=o?a?B.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,t.textFormat,m.TextLocation.tag):a?B.BooleanUtils.toBoolean(i):this.convertBreakscapedStringToJsonText(i,t.textFormat,m.TextLocation.tag),{isExample:!0,example:s}}getBitType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const r=this.getBitType(e);if(r){const i=p.Config.getBitConfig(r);for(const r of e)if(r.key===c.NodeType.bitsValue){const e=r.value;return null!==(t=f.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:i.textFormatDefault}}return f.TextFormat.bitmarkText}getResourceType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===c.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,r){if(!(t===f.TextFormat.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{format:t,location:r})}concatenatePlainTextWithJsonTexts(e,t,r){var i;if(Array.isArray(e)){if(r=r.trim()){const o=r.split("\n"),n=[];for(let e=0;e<t;e++)n.push({type:h.TextNodeType.hardBreak});for(let e=0;e<o.length;e++){const t=o[e];t&&n.push({text:t,type:h.TextNodeType.text}),e<o.length-1&&n.push({type:h.TextNodeType.hardBreak})}const a=e[e.length-1];a&&a.type===h.TextNodeType.paragraph?a.content=[...null!==(i=a.content)&&void 0!==i?i:[],...n]:e.push({type:h.TextNodeType.paragraph,content:n,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=r?r:""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){var t,r,i,o,n,a;const s=p.Config.getBitType(e.type),l=p.Config.getBitConfig(s);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),p.Config.isOfBitType(s,[u.BitType._error,u.BitType._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let c=!1,y=!1;p.Config.isOfBitType(s,[u.BitType.page])?(null!=e.item&&0!==(null===(t=e.item)||void 0===t?void 0:t.length)||delete e.item,null!=e.lead&&0!==(null===(r=e.lead)||void 0===r?void 0:r.length)||delete e.lead,null!=e.pageNumber&&0!==(null===(i=e.pageNumber)||void 0===i?void 0:i.length)||delete e.pageNumber,null!=e.marginNumber&&0!==(null===(o=e.marginNumber)||void 0===o?void 0:o.length)||delete e.marginNumber,null!=e.hint&&0!==(null===(n=e.hint)||void 0===n?void 0:n.length)||delete e.hint,null!=e.instruction&&0!==(null===(a=e.instruction)||void 0===a?void 0:a.length)||delete e.instruction):(null==e.item&&(e.item=this.textDefault),null==e.lead&&(e.lead=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.pageNumber&&(e.pageNumber=this.textDefault),null==e.marginNumber&&(e.marginNumber=this.textDefault)),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,[u.BitType.article]),p.Config.isOfBitType(s,[u.BitType.example])&&(c=!0,y=!0),p.Config.isOfBitType(s,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.gapText,u.BitType.gapTextInstructionGrouped,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard,u.BitType.definitionList])&&(c=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,[u.BitType.sequence])&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.cloze)&&(c=!0,p.Config.isOfBitType(s,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):p.Config.isOfBitType(s,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),p.Config.isOfBitType(s,[u.BitType.multipleChoice,u.BitType.multipleResponse])&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),p.Config.isOfBitType(s,u.BitType.essay)&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),p.Config.isOfBitType(s,u.BitType.trueFalse1)&&(c=!0,y=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.trueFalse)&&(c=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.interview)&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),s===u.BitType.matchMatrix&&(c=!0),p.Config.isOfBitType(s,u.BitType.match)&&(c=!0,null==e.heading&&(e.heading={})),p.Config.isOfBitType(s,u.BitType.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1)),p.Config.isOfBitType(s,u.BitType.table)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableHeaderWhitespaceNoWrap&&(e.tableHeaderWhitespaceNoWrap=!0),null==e.tableSearch&&(e.tableSearch=!1),null==e.tableSort&&(e.tableSort=!1),null==e.tablePagination&&(e.tablePagination=!1),null==e.tablePaginationLimit&&(e.tablePaginationLimit=0),null==e.tableHeight&&(e.tableHeight=0),null==e.tableWhitespaceNoWrap&&(e.tableWhitespaceNoWrap=!1),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.tableColumnMinWidth&&(e.tableColumnMinWidth=0)),p.Config.isOfBitType(s,u.BitType.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),p.Config.isOfBitType(s,[u.BitType.pageBanner,u.BitType.pageBuyButton,u.BitType.pageBuyButtonAlt,u.BitType.pageBuyButtonPromotion,u.BitType.pageFooter,u.BitType.pageOpenBook,u.BitType.pagePerson,u.BitType.pageProduct,u.BitType.pageProductList,u.BitType.pageProductVideo,u.BitType.pageProductVideoList,u.BitType.pageSectionFolder,u.BitType.pageSubscribe,u.BitType.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,u.BitType.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),p.Config.isOfBitType(s,u.BitType.tocResource)&&null==e.tocResource&&(e.tocResource=[]),p.Config.isOfBitType(s,u.BitType.tocContent)&&null==e.tocContent&&(e.tocContent=[]),p.Config.isOfBitType(s,u.BitType.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1),null==e.processHandIn&&(e.processHandIn=!1),null==e.isPublic&&(e.isPublic=!1),null==e.chatWithBook&&(e.chatWithBook=!1),null==e.chatWithBookBrainKey&&(e.chatWithBookBrainKey="")),s!==u.BitType.articleAi&&s!==u.BitType.noteAi&&s!==u.BitType.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),p.Config.isOfBitType(s,[u.BitType.articleResponsive,u.BitType.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),p.Config.isOfBitType(s,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),p.Config.isOfBitType(s,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(s===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),p.Config.isOfBitType(s,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),p.Config.isOfBitType(s,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,[u.BitType.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),p.Config.isOfBitType(s,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),p.Config.isOfBitType(s,u.BitType.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey="")),p.Config.isOfBitType(s,u.BitType.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),p.Config.isOfBitType(s,u.BitType.handInFile)&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),p.Config.isOfBitType(s,u.BitType.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),p.Config.isOfBitType(s,u.BitType.container)&&null==e.allowedBit&&(e.allowedBit=[]),l.quizBit&&null==e.revealSolutions&&(e.revealSolutions=!1),p.Config.isOfBitType(s,u.BitType.platformPath)&&null==e.path&&(e.path=""),c?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),y?null==e.example&&(e.example=null):delete e.example}return e}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const r=t[e];if(this.isBitmarkText(r)){const i=this.textGenerator.generateSync(r,f.TextFormat.bitmarkText,m.TextLocation.tag,{noBreakscaping:!0});t[e]=(null!=i?i:"").trim()}else"object"==typeof t[e]&&this.convertAllBitmarkTextsToStringsForPlainText(t[e])}}removeTemporaryProperties(e){const t=e;for(const e in t)e.startsWith("__")?delete t[e]:"object"==typeof t[e]&&this.removeTemporaryProperties(t[e])}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.JsonGenerator=k},3029:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const i=r(4718),o=r(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,i.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",BodyTextPlain:"BodyTextPlain",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",PlainTextDivider:"PlainTextDivider",FooterDivider:"FooterDivider"});t.TypeKey=n;const a=(0,i.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},3045:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=function(e,t,r,c,u){t===p.BitContentLevel.Chain||function(e,t,r,c,u){const{bitConfig:y}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",c);const g=e.bitContentProcessor(p.BitContentLevel.Chain,r,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",g);const{reference:d,referenceEnd:T}=g,f=i.Breakscape.unbreakscape(l.StringUtils.trimmedString(c.value),{format:a.TextFormat.bitmarkText,location:s.TextLocation.tag}),m=y.tags[o.PropertyConfigKey.book];if(m&&(m.maxCount===n.Count.infinity||m.maxCount>1))return Array.isArray(u.book)||(u.book=[]),void u.book.push({book:f,reference:null!=d?d:"",referenceEnd:null!=T?T:void 0});u.book=f,u.reference=d,u.referenceEnd=T}(e,0,r,c,u)};const i=r(7735),o=r(9888),n=r(3778),a=r(385),s=r(6877),l=r(9681),p=r(3029)},3063:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=function(e,t,r,u,y){var g;const{key:d}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",u);const T=y.markConfig;if(!T)return;const f=n.Config.getTagConfigForTag(r,a.PropertyTag.fromValue(d)),m=e.bitContentProcessor(c.BitContentLevel.Chain,null==f?void 0:f.chain,u.chain),{mark:h}=m,b=i(m,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const B=o.Breakscape.unbreakscape(null!==(g=p.StringUtils.trimmedString(u.value))&&void 0!==g?g:"unknown",{format:s.TextFormat.bitmarkText,location:l.TextLocation.tag}),v=Object.assign({mark:B,emphasis:"underline"},b);v&&T.push(v)};const o=r(7735),n=r(2028),a=r(166),s=r(385),l=r(6877),p=r(9681),c=r(3029)},3069:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=i},3206:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const i=r(7735),o=r(1163),n=r(385),a=r(6877),s=r(9681),l=r(7461),p=r(3029);r(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,r;const i=e.trim();if(this.debugPrint("RAW BIT",i),!i)return;const o=null!==(r=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==r?r:{line:1,column:1,offset:0},n=this.parse(e,{startRule:"bit",grammarSource:new l.PeggyGrammarLocation("bit",o)});return n.value&&(n.value.markup=i),n}handleTextFormat(e){return{type:p.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:p.TypeKey.ResourceType,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleBitContent(e){let t=this.reduceToArrayOfTypes(e);return t=this.mergeCharToText(t),t}handleBitTag(e){return e}handleTag(e,t){return{type:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:p.TypeKey.Property,key:i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:p.TypeKey.Resource,key:i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let r=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),r=[e]}return r}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,r={cards:[]},i={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:i,parser:o}=e;if(!t||t!==p.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:a,cardVariantIndex:s,value:l}=i;let c=r.cards[n];c||(c={sides:[]},r.cards[n]=c);let u=c.sides[a];u||(u={variants:[]},c.sides[a]=u);u.variants[s]?u.variants[s].value+=l:u.variants[s]={value:l,parser:o}}r.cards=r.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==s.StringUtils.trimmedString(e.value).length))))));for(const t of r.cards){const r={sides:[]};i.cards.push(r);for(const i of t.sides){const t={variants:[]};r.sides.push(t);for(const r of i.variants){let i={line:1,column:1,offset:0};if(r.parser.location){i=r.parser.location.start;const e=r.parser.text,t=e?e.length:0,o=1;i.offset+=t,i.line+=o}let o=this.parse(r.value,{startRule:"cardContent",grammarSource:new l.PeggyGrammarLocation("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:p.TypeKey.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r=!1,i=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===o.CardSetVersion.v1?(r=e===p.CARD_DIVIDER_V1,i=e===p.CARD_SIDE_DIVIDER_V1,n=e===p.CARD_VARIANT_DIVIDER_V1):(r=e===p.CARD_DIVIDER_V2,i=e===p.CARD_SIDE_DIVIDER_V2,n=e===p.CARD_VARIANT_DIVIDER_V2)),r?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):i?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,p.TypeKey.Card)?e:{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,r,i,o,n,a;const s=[];let l,c;for(const u of e)switch(u.type){case p.TypeKey.BodyChar:if(l){const e=`${null!==(t=l.value)&&void 0!==t?t:""}${null!==(r=u.value)&&void 0!==r?r:""}`;l.value=e}else l={type:p.TypeKey.BodyText,value:null!==(i=u.value)&&void 0!==i?i:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case p.TypeKey.CardChar:if(c){const e=`${null!==(o=c.value)&&void 0!==o?o:""}${null!==(n=u.value)&&void 0!==n?n:""}`;c.value=e}else c={type:p.TypeKey.CardText,value:null!==(a=u.value)&&void 0!==a?a:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:l&&(s.push(l),l=void 0),c&&(s.push(c),c=void 0),s.push(u)}return l&&s.push(l),c&&s.push(c),s}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!p.TypeKey.fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce(((e,i,o)=>{if(null==i)return e;const{type:n,value:a}=i;if(Array.isArray(i)){const r=this.reduceToArrayOfTypes(i,t);e.push(...r)}else{if(!this.isType(i,t))return e;if(r&&Array.isArray(a)){const r=this.reduceToArrayOfTypes(a,t);e.push(...r)}else n&&e.push(i)}return e}),[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce(((e,t,r)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e}),[])}debugPrint(e,t){}}},3619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const i=r(3778);t.BitConfig=class{constructor(e){this.tags={};const{since:t,bitType:r,inheritedBitTypes:i,textFormatDefault:o,tags:n,cardSet:a,quizBit:s,deprecated:l,bodyAllowed:p,bodyRequired:c,footerAllowed:u,footerRequired:y,resourceAttachmentAllowed:g,rootExampleType:d,comboResourceType:T}=e;this.since=t,this.bitType=r,this.inheritedBitTypes=i,this.inheritedBitTypesSet=new Set(i),this.textFormatDefault=o,this.tags=n,this.cardSet=a,this.quizBit=s,this.deprecated=l,this.bodyAllowed=p??!0,this.bodyRequired=c,this.footerAllowed=u??!0,this.footerRequired=y,this.resourceAttachmentAllowed=g??!0,this.rootExampleType=d,this.comboResourceType=T}toString(e){const t=Object.assign({},e);let r=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(r+="\n\n[Inheritance]",r+=`\n${this.inheritedBitTypes.join(" => ")}`),r+=`\n\n[Default text format]\n${this.textFormatDefault}`;const o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),r+=`\n\n[Flags]\n${o.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===i.Count.infinity||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}}},3778:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const i=(0,r(4718).superenum)({infinity:"infinity"});t.Count=i},3811:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const i=(0,r(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=i;const o=i.v3;t.DEFAULT_BITMARK_VERSION=o},3881:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const i=r(2028),o=r(5854);t.InfoBuilder=class{getSupportedBits(e){var t,r;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(r=null==e?void 0:e.includeDeprecated)&&void 0!==r&&r,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=i.Config.getBitType(e),r=i.Config.getBitConfig(t),l=r.inheritedBitTypes.length>0?r.inheritedBitTypes:void 0;(n&&!r.deprecated||a&&r.deprecated)&&s.push({name:e,since:r.since,deprecated:r.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const r=i.Config.getBitType(t),n=i.Config.getBitConfig(r);e.push(n)}return e}}},3904:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=function(e,t,r,l,p,c){if(t===s.BitContentLevel.Chain)(0,a.clozeTagContentProcessor)(e,t,r,l,p);else{const t=function(e,t,r,a){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",a);const p=i.Config.getTagConfigForTag(r,n.Tag.fromValue(a.type)),c=[a,...null!==(l=a.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(s.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",u);const y=Object.assign({type:o.BodyBitType.gap},u);return y}(e,0,r,l);t&&c.push(t)}};const i=r(2028),o=r(4410),n=r(9917),a=r(554),s=r(3029)},3967:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=function(e,t,r,a,p){var c;const{textFormat:u}=e,{key:y,value:g}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",a);const d=e.bitContentProcessor(s.BitContentLevel.Chain,r,a.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:T}=d,f={level:null!==(c=n.NumberUtils.asNumber(g))&&void 0!==c?c:0,label:T?l.toAst(T,{format:u,location:o.TextLocation.tag}):void 0};switch(y){case i.PropertyTag.ratingLevelStart:p.ratingLevelStart=f;break;case i.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=f}};const i=r(166),o=r(6877),n=r(8025),a=r(777),s=r(3029),l=new a.TextParser},3968:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=r(6772),n=r(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},3990:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=function(e,t,r,s,l,p){const{value:c}=s,u=a.StringUtils.trimmedString(c);p?l.referenceEnd=i.Breakscape.unbreakscape(u,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}):l.reference=i.Breakscape.unbreakscape(u,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag})};const i=r(7735),o=r(385),n=r(6877),a=r(9681)},4020:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=function(e,t,r,l){const{type:p,value:c}=r,u=l.trueFalse;if(!u)return;const y=i.Breakscape.unbreakscape(a.StringUtils.trimmedString(c),{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});u.push({text:y,isCorrect:p===s.TypeKey.True,__isDefaultExample:!1})};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(3029)},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const r=new class{isBoolean(e){return!0===e||!1===e}isBooleanString(e){return!!this.isBoolean(e)||("true"===e||"false"===e)}toBoolean(e,t){return t?!1!==e&&"false"!==e:!0===e||"true"===e}};t.BooleanUtils=r},4091:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=function(e,t,r,u){const{bitType:y}=e,{value:g}=r,d=g;o.Config.isOfBitType(y,[n.BitType.cloze,n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.multipleChoice,n.BitType.multipleChoice1])?function(e,t,r,u){var y,g;const{bitType:d,textFormat:T}=e;let f;Array.isArray(u.trueFalse)&&u.trueFalse.length>0&&(f=null!==(y=u.trueFalse[u.trueFalse.length-1])&&void 0!==y?y:void 0);f?!0===r?(f.__isDefaultExample=!0,f.example=!!f.isCorrect):l.BooleanUtils.isBooleanString(r)?f.example=l.BooleanUtils.toBoolean(r):(f.__isDefaultExample=!0,f.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(u.__solutionsAst)&&u.__solutionsAst.length>0?u.example=!0===r?null!==(g=u.__solutionsAst[u.__solutionsAst.length-1])&&void 0!==g?g:void 0:r?p.toAst(r,{format:T,location:s.TextLocation.tag}):void 0:o.Config.isOfBitType(d,[n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1])?function(e,t,r,o){if(!0===r)o.__isDefaultExample=!0,o.example=void 0;else{const n=r?i.Breakscape.unbreakscape(r,{format:a.TextFormat.bitmarkText,location:s.TextLocation.tag}):void 0;l.BooleanUtils.isBooleanString(n)?o.example=l.BooleanUtils.toBoolean(n):(o.__isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,r,u):o.Config.isOfBitType(d,[n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoice,n.BitType.multipleChoice1])?(u.__isDefaultExample=!0,u.example=void 0,!0!==r&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):c(e,t,r,u)}(e,r,d,u):o.Config.isOfBitType(y,n.BitType.mark)?function(e,t,r,i){i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,r,d,u):c(e,r,d,u)};const i=r(7735),o=r(2028),n=r(5854),a=r(385),s=r(6877),l=r(4078),p=new(r(777).TextParser);function c(e,t,r,i){const{textFormat:o}=e;!0===r||"true"===r?(i.__isDefaultExample=!0,i.example=void 0):i.example=r?p.toAst(r,{format:o,location:s.TextLocation.tag}):void 0}},4266:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const i=r(2028),o=r(5512),n=r(3778),a=r(166),s=r(6149),l=r(9917),p=r(3029),c=["----","\n==\n","\n---\n"],u=["==\n","--\n"],y=["\n==","\n--"];const g=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:r,bitType:o,resourceType:n}=e,{tags:a,cardSet:s}=r,l=i.Config.getBitResourcesConfig(o,n),c=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,p.BitContentLevel.Bit,o,t,c,s).validated}checkBody(e,t,r,i,o){if(!o)return o;const{bitConfig:n}=e,{bodyAllowed:a}=n;return o.length>0&&!a&&e.addWarning(`Bit '${r}' should not have a body.`),o}checkBodyPart(e,t,r){return r?(this.checkBodyForCommonPotentialMistakes(e,t,r),r):r}checkFooter(e,t,r){if(!r)return r;const{bitConfig:i,bitType:o}=e,{footerAllowed:n}=i;return this.checkBodyForCommonPotentialMistakes(e,t,r),n||e.addWarning(`Bit '${o}' should not have a footer.`),r}checkCardBody(e,t,r,i,o,n,a){if(!i||!i.body)return i;const{bitConfig:s}=e;if(!s.cardSet)return i;const l=this.getVariantConfig(s.cardSet.variants,n,a);if(!l)return i;const{bodyAllowed:p}=l;return i.bodyString.length>0&&!p&&e.addWarning(`Bit '${r}' should not have a card body at card:${o+1}, side:${n+1}, variant:${a+1}.`),i}validateTagChainsRecursive(e,t,r,i,c,u,y){var g;if(!i)return{validated:[]};let d;const T=[...i],f=this.convertTagsToTypeKeyMap(e,t,r,c),m=(e,t,r)=>{f.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};var h,b,B;h=a.PropertyTag.internalComment,b=n.Count.infinity,B=0,f.set(`${p.TypeKey.Property}:${h}`,{maxCount:b,minCount:B,_type:o.BitTagType.property,_tag:l.Tag.tag_property,_seenCount:0}),t===p.BitContentLevel.Bit?(u&&m(p.TypeKey.CardSet,1,0),m(p.TypeKey.TextFormat,1,0),m(p.TypeKey.BodyText,n.Count.infinity,0),m(p.TypeKey.BodyTextPlain,n.Count.infinity,0),m(p.TypeKey.PlainTextDivider,n.Count.infinity,0),m(p.TypeKey.FooterDivider,n.Count.infinity,0)):t===p.BitContentLevel.Card&&m(p.TypeKey.CardText,n.Count.infinity,0);for(let i=0;i<T.length;i++){const o=T[i];if(!o)continue;const{type:n,key:a}=o;let l=p.TypeKey.fromValue(n);if(!l)continue;let c=l;l!==p.TypeKey.Property&&l!==p.TypeKey.Resource||(c=`${l}:${a}`);let m=f.get(c);if(!m&&l===p.TypeKey.Property&&(a===s.ResourceTag.backgroundWallpaper||a===s.ResourceTag.imagePlaceholder)&&(m=f.get(`${p.TypeKey.Resource}:${a}`),m)){l=p.TypeKey.Resource,o.type=p.TypeKey.Resource;const t=`Falling back to '[&${a}]' from '[@${a}]'. Replace '[@${a}]' with '[&${a}]' to avoid this warning.`;e.addWarning(t)}const{validated:h,warning:b}=this.validateSingleTag(e,t,r,o,l,m,u);l===p.TypeKey.Resource&&(y=p.TypeKey.Resource);let B=!0;if(!h)if(t===p.BitContentLevel.Chain&&y!==p.TypeKey.Resource){d=o;const e=T.slice(i+1);e.length>0&&(d.chain=e),T.splice(i),B=!1}else T.splice(i,1,null);if(b&&B&&e.addWarning(null!==(g=b.warning)&&void 0!==g?g:"",b.content,b.previousContent),t===p.BitContentLevel.Chain&&m&&m.chain&&h&&!h.chain){const e=T.slice(i+1);e.length>0&&(h.chain=e),T.splice(i+1)}if(h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,p.BitContentLevel.Chain,r,h.chain,m.chain,void 0,h.type);t&&t.length>0?h.chain=t:h.chain=void 0,o&&T.splice(i+1,0,o)}else if(h.type!==p.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),T.splice(i+1,0,e),h.chain=void 0}}for(const t of f.values()){const{minCount:r,_seenCount:i}=t;if(null!=r&&i<r){const i=`${this.getTagSignature(t)} is required at least ${r} time(s)`;e.addWarning(i)}}return{validated:T.filter((e=>null!=e)),remaining:d}}validateSingleTag(e,t,r,i,o,n,a){const{type:s,key:l}=i,c=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),u=" It will be ignored";let y,g,d="";if(n)switch(n._seenCount++,o){case p.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,t,r,n,i);y=o,g=a;break}case p.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,t,r,n,i);y=o,g=a;break}case p.TypeKey.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,r,n,i,a);y=t,g=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,t,r,n,i);y=o,g=a}}else switch(o){case p.TypeKey.Property:g={extraProperty:!0},t!==p.BitContentLevel.Chain&&(y=i);break;case p.TypeKey.Resource:g={excessResource:!0},y=i;break;default:g={invalid:!0}}if(g){const e=null==n?void 0:n._previous;g.invalid||g.excessResource?d=`${c} is not valid here (incorrectly chained?).${u}`:null!=g.tooMany?(d=`${c} is included more than ${g.tooMany} time(s).`,g.tooMany>0&&(d+=" The earlier ones will be ignored")):g.extraProperty?d=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:g.unexpectedCardSet?d=`${c} is not expected here.${u}`:g.unexpectedCardSideVariant&&(d=`${c} has a card / side / variant that is not expected here.${u}`),g.warning=d,g.content=y,g.previousContent=e}return n&&(n._previous=i),{validated:y,warning:g}}validateStandardTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==n.Count.infinity&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=i,a=n;let s,l=0,c=0;for(const r of a.cards){l=0;for(const i of r.sides){c=0;for(const r of i.variants){const n=r.content;let a;const u=this.getVariantConfig(o.variants,l,c);if(u){a=this.validateTagChainsRecursive(e,p.BitContentLevel.Card,t,n,u.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[c]={parser:r.parser,content:a}:i.variants[c]={parser:r.parser,content:[]},c++}l++}}return{content:i,warning:s}}checkBodyForCommonPotentialMistakes(e,t,r){if(!r)return;const{bitType:i}=e;for(const t of c)r.includes(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of u)r.startsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of y)r.endsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,r,i){const n=new Map;for(const e of Object.values(i)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===o.BitTagType.tag,isProperty:e.type===o.BitTagType.property,isResource:e.type===o.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)n.set(`${p.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)n.set(`${p.TypeKey.Resource}:${e.tag}`,t);else{const r=p.TypeKey.fromValue(e.tag);r&&n.set(r,t)}}return n}getVariantConfig(e,t,r){let i;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],a=o.length-1;if(r>a){if(i=o[a],i.repeatCount!==n.Count.infinity)return}else i=o[r];return i}getTagSignature(e){switch(e._type){case o.BitTagType.tag:return`[${e._tag}]`;case o.BitTagType.property:return`[@${e._tag}]`;case o.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case p.TypeKey.Property:return`[@${t}]`;case p.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=g},4382:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FooterContentProcessor=void 0;const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(777),l=r(4266),p=r(6128),c=new s.TextParser;const u=new class{process(e,t,r,s,u,y){const{textFormat:g}=e;let d;u=u.trimStart(),y=y.trimEnd();const T=!!u.trim(),f=!!y.trim();let m=0;if(T&&f&&(m=a.StringUtils.countOccurrencesAtEnd(u,"\n")+a.StringUtils.countOccurrencesAtStart(y,"\n")),u||y){const r=g===o.TextFormat.bitmarkText;u&&(u=l.BitmarkPegParserValidator.checkFooter(e,t,u));const a=r?c.toAst(u,{format:g,location:n.TextLocation.body}):i.Breakscape.unbreakscape(u,{format:o.TextFormat.plainText,location:n.TextLocation.body}),s=i.Breakscape.unbreakscape(y,{format:o.TextFormat.plainText,location:n.TextLocation.body});d=p.ContentProcessorUtils.concatenatePlainTextWithAstTexts(a,m,s)}return d?{footer:d}:void 0}};t.FooterContentProcessor=u},4402:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=function(e,t,r,p,c){const{type:u,value:y}=p,{textFormat:g}=e,d=new s.TextParser,T=a.StringUtils.trimmedString(y);switch(u){case l.TypeKey.Instruction:c.instruction=d.toAst(T,{format:g,location:n.TextLocation.tag}),c.__instructionString=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Hint:c.hint=d.toAst(T,{format:g,location:n.TextLocation.tag}),c.__hintString=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Anchor:c.anchor=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.Reference:c.reference=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag});break;case l.TypeKey.SampleSolution:c.sampleSolution=i.Breakscape.unbreakscape(T,{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}),c.__sampleSolutionAst=d.toAst(T,{format:g,location:n.TextLocation.tag}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",p)}};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(777),l=r(3029)},4410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const i=(0,r(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=i},4445:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const i=r(5814),o=r(9371),n=r(9788),a=r(1519),s=r(9600),l=r(5591),p=r(7112),c=r(9888),u=r(5051),y=r(7797),g=r(5512),d=r(5554),T=r(5837),f=r(9916),m=r(168),h=r(9248);const b=new class{hydrateTagsConfig(e){var t;const r={tags:{}};for(const i of e){let e;switch(i.type){case g.BitTagType.tag:e=this.hydrateTagConfig(i);break;case g.BitTagType.property:e=this.hydratePropertyTagConfig(i);break;case g.BitTagType.resource:e=this.hydrateResourceTagConfig(i);break;case g.BitTagType.group:e=this.hydrateTagGroupConfig(i)}e&&(r.tags=Object.assign(Object.assign({},r.tags),e.tags),r.info=Object.assign(null!==(t=r.info)&&void 0!==t?t:{},e.info))}return r}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.variants){const t=[];for(const r of e){const e=this.hydrateCardVariantConfig(r);t.push(e)}r.push(t)}return new i.CardSetConfig(e,r)}hydrateTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,a=y.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=h.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:p,deprecated:c}=s;let u;o&&(u=this.hydrateTagsConfig(o).tags);const g=new n.MarkupTagConfig(a,p,null!=r?r:1,null!=i?i:0,u,c);return{tags:{[a]:g}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=c.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=f.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:p,deprecated:u,single:y,format:g,defaultValue:d,jsonKey:T,astKey:m}=s;let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new a.PropertyTagConfig(n,p,null!=r?r:1,null!=i?i:0,h,T,m,y,g,d,u);return{tags:{[n]:b}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=u.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=m.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:p,deprecated:c,jsonKey:y}=a;let g;o&&(g=this.hydrateTagsConfig(o).tags);const d=new s.ResourceTagConfig(n,p,null!=r?r:1,null!=i?i:0,g,y,c);return{tags:{[n]:d}}}hydrateTagGroupConfig(e){var t,r;const{configKey:i}=e,o=p.GroupConfigKey.fromKey(i)||l.ConfigKey._unknown,n=T.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${i}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,c=Object.values(s);if(c.length>0){const i=c[0],o=i;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:i.maxCount,o.minCount=null!==(r=e.minCount)&&void 0!==r?r:i.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,r,i,n)}};t.ConfigHydrator=b},4470:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const i=r(7735),o=r(2028),n=r(431),a=r(9727),s=r(6877),l=r(777),p=r(6989),c=r(4078),u=r(8025),y=r(9681);t.BaseBuilder=class{constructor(){this.textParser=new l.TextParser,this.textGenerator=new n.TextGenerator}toExample(e,t,r){if(null!=t){let e;return e=c.BooleanUtils.isBoolean(r)?c.BooleanUtils.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:null!=r?r:null}}return e?{isExample:!0,example:null!=r?r:null,__defaultExample:null!=r?r:null}:{isExample:!1,example:null,__defaultExample:null!=r?r:null}}toAstProperty(e,t){if(null==t)return;const r=o.Config.getRawPropertiesConfig()[e],i=e=>{if(null!=e){switch(r.format){case a.PropertyFormat.plainText:return null!=u.NumberUtils.asNumber(e)&&(e=`${e}`),y.StringUtils.isString(e)?y.StringUtils.trimmedString(e):void 0;case a.PropertyFormat.number:return u.NumberUtils.asNumber(e);case a.PropertyFormat.boolean:return c.BooleanUtils.toBoolean(e,!0);case a.PropertyFormat.invertedBoolean:return!c.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,r=e.length;t<r;t++)e[t]=i(e[t])}else t=i(t);return p.ArrayUtils.asArray(t)}getEmptyTextAst(e){return this.handleJsonText(e,s.TextLocation.tag," ")}handleJsonText(e,t,r){let o;const{textFormat:n}=e;if(null==r)o=[];else if(this.textParser.isAst(r))o=r;else{if(Array.isArray(r)){const e=[];for(let o=0,a=r.length;o<a;o++){const a=r[o];this.textParser.isAst(a)?e[o]=a:y.StringUtils.isString(a)?(e[o]=this.textParser.toAst(i.Breakscape.breakscape(a,{format:n,location:t}),{format:n,location:t}),e[o].__tag="text"):e[o]=[]}return e}o=y.StringUtils.isString(r)?this.textParser.toAst(i.Breakscape.breakscape(r,{format:n,location:t,v2:!0}),{format:n,location:t}):[]}return o.__tag="text",o}}},4475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=function(e,t,r,l,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const c=e.bitContentProcessor(s.BitContentLevel.Chain,r,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",c);const{lang:u}=c,y={technicalTerm:i.Breakscape.unbreakscape(a.StringUtils.trimmedString(l.value),{format:o.TextFormat.bitmarkText,location:n.TextLocation.tag}),lang:u};p.technicalTerm=y};const i=r(7735),o=r(385),n=r(6877),a=r(9681),s=r(3029)},4564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const i=r(6149),o=r(9681);const n=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,r=!1;switch(e.type){case i.ResourceTag.image:r=!!e.image.src;break;case i.ResourceTag.imageLink:r=!!e.imageLink.url;break;case i.ResourceTag.audio:r=!!e.audio.src;break;case i.ResourceTag.audioEmbed:r=!!e.audioEmbed.src;break;case i.ResourceTag.audioLink:r=!!e.audioLink.url;break;case i.ResourceTag.video:r=!!e.video.src;break;case i.ResourceTag.videoEmbed:r=!!e.videoEmbed.url;break;case i.ResourceTag.videoLink:r=!!e.videoLink.url;break;case i.ResourceTag.stillImageFilm:r=!!e.image.src&&!!e.audio.src;break;case i.ResourceTag.stillImageFilmEmbed:r=!!e.stillImageFilmEmbed.url;break;case i.ResourceTag.stillImageFilmLink:r=!!e.stillImageFilmLink.url;break;case i.ResourceTag.article:r=!!e.article.body;break;case i.ResourceTag.document:r=!!e.document.url;break;case i.ResourceTag.documentEmbed:r=!!e.documentEmbed.url;break;case i.ResourceTag.documentLink:r=!!e.documentLink.url;break;case i.ResourceTag.documentDownload:r=!!e.documentDownload.url;break;case i.ResourceTag.appLink:r=!!e.appLink.url;break;case i.ResourceTag.websiteLink:r=!!e.websiteLink.url;break;default:r=!1}return r||e.type&&(t={type:e.type}),t}isRequired(e,t){if(!e)throw new Error(`${t} is required but is not set`)}isOneOfRequired(e,t){if(Array.isArray(e))for(const t of e)if(t)return;throw new Error(`One of '${t.join(", ")}' is required but none is set`)}isString(e,t){if(!o.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!o.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!o.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!o.StringUtils.isString(e)||""===e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a non-empty string or a boolean`)}isArray(e,t){if(!Array.isArray(e))throw new Error(`${t} is required to be a array`)}isNonEmptyArray(e,t){if(!(Array.isArray(e)&&e.length>0))throw new Error(`${t} is required to be a non-empty array`)}isNumber(e,t){if(!Number.isFinite(e))throw new Error(`${t} is required to be a number`)}isBoolean(e,t){if(!0!==e&&!1!==e)throw new Error(`${t} is required to be a boolean`)}isStringOrNumberOrBooleanOrNullOrUndefined(e,t){if(!o.StringUtils.isString(e)&&!Number.isFinite(e)&&!0!==e&&!1!==e&&null!=e)throw new Error(`${t} is required to be a string or a number or a boolean or null or undefined`)}};t.NodeValidator=n},4718:(e,t,r)=>{function i(e,t){var r;const i=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,p=new Map,c=new Map,u=new Map,y=(null!==(r=null==t?void 0:t.iterationKeys)&&void 0!==r?r:Object.keys(e)).map((e=>`${e}`));for(const[t,r]of Object.entries(e))s.set(t,r),p.set(t.toLowerCase(),r);for(const[e,t]of s){const r="string"==typeof t?t.toLowerCase():t;l.set(t,e),c.set(r,e)}const g=y.map((e=>s.get(e))),d=y.map((e=>[e,s.get(e)]));return(t=>{let r=e;function T(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(c.get(e.toLowerCase())):l.has(e)?e:void 0}Object.isExtensible(e)||(r=n({},e)),o(r,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(r,"fromValue",n({value:T},a)),o(r,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?c.get(e.toLowerCase()):l.get(e)}},a)),o(r,"setMetadata",n({value:function(e,t,r){const i=T(e);null!=i&&u.set(i,t)}},a)),o(r,"getMetadata",n({value:function(e,t){return u.get(e)}},a)),o(r,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<y.length?{value:s.get(`${y[e++]}`),done:!1}:{done:!0}}}},a)),o(r,"values",n({value:()=>g},a)),o(r,"keys",n({value:()=>y},a)),o(r,"entries",n({value:()=>d},a));let f=r;return(null==t?void 0:t.noFreeze)||(f=i(r),i(y),i(g),i(d)),f})(t)}r.r(t),r.d(t,{superenum:()=>o});const o=i;o.fromObject=i,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const r=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),i(r,t)}},4953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=function(e,t,r,n,a){var s;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",n);const l=e.bitContentProcessor(o.BitContentLevel.Chain,r,n.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",l);const{unit:p,unitAbbr:c,decimalPlaces:u,disableCalculation:y,__hintString:g}=l,d={servings:null!==(s=i.NumberUtils.asNumber(n.value))&&void 0!==s?s:1,unit:p,unitAbbr:c,decimalPlaces:null!=u?u:1,disableCalculation:y,hint:g};a.servings=d};const i=r(8025),o=r(3029)},5005:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=r(1731),g="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const r=(t,r)=>(e.set(r,t),t),d=T=>{if(e.has(T))return e.get(T);const[f,m]=t[T];switch(f){case o:case i:return r(m,T);case n:{const e=r([],T);for(const t of m)e.push(d(t));return e}case a:{const e=r({},T);for(const[t,r]of m)e[d(t)]=d(r);return e}case s:return r(new Date(m),T);case l:{const{source:e,flags:t}=m;return r(new RegExp(e,t),T)}case p:{const e=r(new Map,T);for(const[t,r]of m)e.set(d(t),d(r));return e}case c:{const e=r(new Set,T);for(const t of m)e.add(d(t));return e}case u:{const{name:e,message:t}=m;return r(new g[e](t),T)}case y:return r(BigInt(m),T);case"BigInt":return r(Object(BigInt(m)),T);case"ArrayBuffer":return r(new Uint8Array(m).buffer,m);case"DataView":{const{buffer:e}=new Uint8Array(m);return r(new DataView(e),m)}}return r(new g[f](m),T)};return d})(new Map,e)(0)},5033:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyContentProcessor=void 0;const i=r(7735),o=r(4410),n=r(385),a=r(6877),s=r(9681),l=r(777),p=r(4266),c=r(6128),u=new l.TextParser;const y=new class{process(e,t,r,l,y,g,d,T){const f=[];let m,h;const b=d.length>0?this.trimBodyParts(d):void 0,B=T?b:p.BitmarkPegParserValidator.checkBody(e,t,r,l,b);if(l===n.TextFormat.json&&B){m=B.reduce(((e,t)=>{var r;if(t.type===o.BodyBitType.text&&t.data){return e+(null!==(r=t.data.bodyText)&&void 0!==r?r:"")}return e}),"");try{m=JSON.parse(m)}catch(t){m=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",r="",p=0;const y=e=>`[!${e}]`;if(B)for(let n=0;n<B.length;n++){const a=B[n];if(a.type===o.BodyBitType.text){const o=a,n=o.data.bodyText;o.data.isPlain?t=i.Breakscape.concatenate(t,n):e=i.Breakscape.concatenate(e,n),r=i.Breakscape.concatenate(r,n)}else{const t=y(p);e=i.Breakscape.concatenate(e,t),f.push(a),p++}}const g=l===n.TextFormat.bitmarkText?u.toAst(e,{format:l,location:a.TextLocation.body}):i.Breakscape.unbreakscape(e,{format:n.TextFormat.plainText,location:a.TextLocation.body}),d=i.Breakscape.unbreakscape(t,{format:n.TextFormat.plainText,location:a.TextLocation.body}),T=s.StringUtils.countOccurrencesAtEnd(e,"\n")+s.StringUtils.countOccurrencesAtStart(t,"\n");m=c.ContentProcessorUtils.concatenatePlainTextWithAstTexts(g,T,d),h=i.Breakscape.unbreakscape(r,{format:l,location:a.TextLocation.body}).trim();const b=Array.isArray(m)?m:void 0;if(b&&B){p=0;for(let e=0;e<B.length;e++){const t=B[e];if(t.type===o.BodyBitType.text)continue;const r=t;let i;switch(t.type){case o.BodyBitType.gap:case o.BodyBitType.mark:case o.BodyBitType.select:case o.BodyBitType.highlight:i=r}i&&this.replacePlaceholderWithBodyBit(b,i,p),p++}}}return{body:m,bodyBits:f.length>0?f:void 0,bodyString:h}}buildBodyText(e,t){return{type:o.BodyBitType.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,n)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=e[t];if(i(r,e,t))return!0}else{if("bit"===e.type&&e.index===r)return o[n]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}trimBodyParts(e){let t=!1,r=e.reduce(((e,r)=>{const i=r;if(t||i.type!==o.BodyBitType.text)t=!0,e.push(r);else{const r=i.data.bodyText.trimStart();r&&(t=!0,i.data.bodyText=r,e.push(i))}return e}),[]);return t=!1,r=r.reduceRight(((e,r)=>{const i=r;if(t||i.type!==o.BodyBitType.text)t=!0,e.unshift(r);else{const r=i.data.bodyText.trimEnd();r&&(t=!0,i.data.bodyText=r,e.unshift(i))}return e}),[]),r}};t.BodyContentProcessor=y},5051:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const i=r(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"};t.resourceConfigKeys=o;const n=(0,i.superenum)(o);t.ResourceConfigKey=n},5057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=a,t.parse=function e(t,r){r=void 0!==r?r:{};var s,l={},p=r.grammarSource,c={bitmark:nr,bit:function(){var e,t,r,i,o;e=$t,t=[],r=Sr();for(;r!==l;)t.push(r),r=Sr();if((r=lr())!==l){for(i=[],o=Sr();o!==l;)i.push(o),o=Sr();Wt=e,e=Ye(r)}else $t=e,e=l;return e},cardContent:function(){var e,t,r;e=$t,t=[],(r=yr())===l&&(r=Cr());for(;r!==l;)t.push(r),(r=yr())===l&&(r=Cr());return Wt=e,t=xt(t),e=t}},u=nr,y="[.",g="]",d="[",T=":",f="&",m="$$$$",h="====",b="text",B="~~~~",v="footer",C="--",x="++",P="===",k="==",_="[@id",K="#",A="[▼",w="[►",S="[@",E="[%",L="[!",I="[?",R="[+",F="[-",N="[$",O="[_",V="[=",G="[&",j="^]",D="id:",M=".",U="\n",J="\r\n",$=/^[^\]]/,W=/^[^:\]]/,z=/^[^&:\]]/,H=/^[ \t]/,q=/^[^\n\r\u2028\u2029]/,X=/^[\r\u2028-\u2029]/,Y=/^[ \t\n\r\u2028\u2029]/,Q=Qt("[.",!1),Z=Zt(["]"],!0,!1),ee=Qt("]",!1),te=Qt("[",!1),re=Qt(":",!1),ie=Qt("&",!1),oe={type:"any"},ne=Qt("$$$$",!1),ae=Qt("====",!1),se=Qt("text",!1),le=Qt("~~~~",!1),pe=Qt("footer",!1),ce=Qt("--",!1),ue=Qt("++",!1),ye=Qt("===",!1),ge=Qt("==",!1),de=Qt("[@id",!1),Te=Qt("#",!1),fe=Qt("[▼",!1),me=Qt("[►",!1),he=Qt("[@",!1),be=Qt("[%",!1),Be=Qt("[!",!1),ve=Qt("[?",!1),Ce=Qt("[+",!1),xe=Qt("[-",!1),Pe=Qt("[$",!1),ke=Qt("[_",!1),_e=Qt("[=",!1),Ke=Qt("[&",!1),Ae=Qt("^]",!1),we=Qt("id:",!1),Se=Zt([":","]"],!0,!1),Ee=Qt(".",!1),Le=Zt(["&",":","]"],!0,!1),Ie=(er("Empty"),Zt([" ","\t"],!1,!1)),Re=er("Anything"),Fe=er("Character"),Ne=Zt(["\n","\r","\u2028","\u2029"],!0,!1),Oe=er("Line"),Ve=(er("whitespace in line"),er("Blank Line")),Ge=er("Line Terminator"),je=Qt("\n",!1),De=Qt("\r\n",!1),Me=Zt(["\r",["\u2028","\u2029"]],!1,!1),Ue=er("Whitespace, then Line Terminator"),Je=er("whitespace"),$e=Zt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),We=function(e,t){return Vr.buildBits([e,...t])},ze=function(e){return Or.handleRawBit(e)},He=function(e){return e},qe=function(e){return Or.handleRawBit(e)},Xe=function(e){return e},Ye=function(e){return e},Qe=function(e,t){return Vr.buildBit(e,t)},Ze=function(e){return Vr.invalidBit(e)},et=function(e,t,r){return Vr.buildBitHeader(t,e,r)},tt=function(e,t){return Vr.buildTextAndResourceType(e,t)},rt=function(e){return Or.handleTextFormat(e)},it=function(e){return Or.handleResourceType(e)},ot=function(e){return Or.handleBitContent(e)},nt=function(e){return Or.handleTagChain(e)},at=function(e){return e},st=function(e){return Or.handleBitTag(e)},lt=function(e){return{type:i.TypeKey.BodyChar,value:e}},pt=function(e){return Or.handlePlainTextDivider(e)},ct=function(e){return Or.handleFooterDivider(e)},ut=function(e){return Or.handleCardSet(e[1].flat())},yt=function(){Or.handleCardSetStart()},gt=function(){Or.handleCardSetEnd()},dt=function(e){return Or.handleCards(e)},Tt=function(e){return Or.handleCardLineOrDivider(e,2)},ft=function(e){return Or.handleCardLine(e)},mt=function(e){return Or.handleCardSet(e[1].flat())},ht=function(){Or.handleCardSetStart()},bt=function(){Or.handleCardSetEnd()},Bt=function(e){return Or.handleCards(e)},vt=function(e){return Or.handleCardLineOrDivider(e,1)},Ct=function(e){return Or.handleCardLine(e)},xt=function(e){return Or.handleCardContent(e)},Pt=function(e){return{type:i.TypeKey.CardChar,value:e}},kt=function(e){return Or.handlePropertyTag("id",e)},_t=function(e,t){return Or.handleTag(i.TypeKey.Title,{level:e,title:t})},Kt=function(e){return Or.handleTag(i.TypeKey.Anchor,e)},At=function(e){return Or.handleTag(i.TypeKey.Reference,e)},wt=function(e,t){return Or.handlePropertyTag(e,t)},St=function(e){return Or.handleTag(i.TypeKey.ItemLead,e)},Et=function(e){return Or.handleTag(i.TypeKey.Instruction,e)},Lt=function(e){return Or.handleTag(i.TypeKey.Hint,e)},It=function(e){return Or.handleTag(i.TypeKey.True,e)},Rt=function(e){return Or.handleTag(i.TypeKey.False,e)},Ft=function(e){return Or.handleTag(i.TypeKey.SampleSolution,e)},Nt=function(e){return Or.handleTag(i.TypeKey.Gap,e)},Ot=function(e){return Or.handleTag(i.TypeKey.Mark,e)},Vt=function(e,t){return Or.handleResourceTag(e,t)},Gt=function(e){return e},jt=function(e){return e?e.trim():""},Dt=function(e){return e.length},Mt=function(e){return e?e.trim():null},Ut=function(e){return e?e.trim():""},Jt=function(){return!0},$t=0|r.peg$currPos,Wt=$t,zt=[{line:1,column:1}],Ht=$t,qt=r.peg$maxFailExpected||[],Xt=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=c[r.startRule]}function Yt(){return t.substring(Wt,$t)}function Qt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Zt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function er(e){return{type:"other",description:e}}function tr(e){var r,i=zt[e];if(i)return i;if(e>=zt.length)r=zt.length-1;else for(r=e;!zt[--r];);for(i={line:(i=zt[r]).line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return zt[e]=i,i}function rr(e,t,r){var i=tr(e),o=tr(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function ir(e){$t<Ht||($t>Ht&&(Ht=$t,qt=[]),qt.push(e))}function or(e,t,r){return new a(a.buildMessage(e,t),e,t,r)}function nr(){return function(){var e,r,i,o;e=$t,r=[],i=Ir();for(;i!==l;)r.push(i),i=Ir();return i=function(){var e,r,i,o;e=$t,r=$t,i=[],o=sr();for(;o!==l;)i.push(o),o=sr();return r=t.substring(r,$t),Wt=e,r=ze(r),e=r,e}(),o=function(){var e,t;e=[],t=ar();for(;t!==l;)e.push(t),t=ar();return e}(),Wt=e,e=We(i,o),e}()}function ar(){var e,r,i,o;for(e=$t,r=[],i=Sr();i!==l;)r.push(i),i=Sr();return(i=Er())===l&&(i=null),o=function(){var e,r,i,o,n,a;if(e=$t,r=$t,i=$t,o=function(){var e,r,i,o;e=$t,t.substr($t,2)===y?(r=y,$t+=2):(r=l,0===Xt&&ir(Q));if(r!==l){for(i=[],o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z));o!==l;)i.push(o),o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z));93===t.charCodeAt($t)?(o=g,$t++):(o=l,0===Xt&&ir(ee)),o!==l?(Wt=e,e=Xe(r)):($t=e,e=l)}else $t=e,e=l;return e}(),o!==l){for(n=[],a=sr();a!==l;)n.push(a),a=sr();i=o=[o,n]}else $t=i,i=l;r=i!==l?t.substring(r,$t):i;r!==l&&(Wt=e,r=qe(r));return e=r,e}(),o!==l?(Wt=e,e=He(o)):($t=e,e=l),e}function sr(){var e,t,r,i;if(e=$t,(t=Er())!==l?(r=$t,Xt++,i=pr(),Xt--,i===l?r=void 0:($t=r,r=l),r!==l?e=t=[t,r]:($t=e,e=l)):($t=e,e=l),e===l)if(e=[],(t=Ar())!==l)for(;t!==l;)e.push(t),t=Ar();else e=l;return e}function lr(){var e,r,i;return e=$t,(r=pr())!==l?(i=function(){var e,t,r;e=$t,t=[],r=fr(),r===l&&(r=hr())===l&&(r=Br())===l&&(r=yr())===l&&(r=Tr());for(;r!==l;)t.push(r),(r=fr())===l&&(r=hr())===l&&(r=Br())===l&&(r=yr())===l&&(r=Tr());return Wt=e,t=ot(t),e=t,e}(),Wt=e,e=Qe(r,i)):($t=e,e=l),e===l&&(e=$t,r=$t,i=function(){var e,r;Xt++,e=[],t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe));for(;r!==l;)e.push(r),t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe));Xt--,r=l,0===Xt&&ir(Re);return e}(),r=t.substring(r,$t),Wt=e,e=r=Ze(r)),e}function pr(){var e,r,i,o,n,a;return e=$t,91===t.charCodeAt($t)?(r=d,$t++):(r=l,0===Xt&&ir(te)),r!==l?(i=function(){var e,r,i;e=$t,r=[],46===t.charCodeAt($t)?(i=M,$t++):(i=l,0===Xt&&ir(Ee));if(i!==l)for(;i!==l;)r.push(i),46===t.charCodeAt($t)?(i=M,$t++):(i=l,0===Xt&&ir(Ee));else r=l;r!==l&&(Wt=e,r=Dt(r));return e=r,e}(),i!==l?(o=_r(),n=function(){var e,t,r;e=$t,t=cr(),t===l&&(t=ur());t===l&&(t=null);r=cr(),r===l&&(r=ur());r===l&&(r=null);return Wt=e,e=tt(t,r),e}(),93===t.charCodeAt($t)?(a=g,$t++):(a=l,0===Xt&&ir(ee)),a!==l?(Wt=e,e=et(i,o,n)):($t=e,e=l)):($t=e,e=l)):($t=e,e=l),e}function cr(){var e,r,i;return e=$t,58===t.charCodeAt($t)?(r=T,$t++):(r=l,0===Xt&&ir(re)),r!==l?(i=_r(),Wt=e,e=rt(i)):($t=e,e=l),e}function ur(){var e,r,i;return e=$t,38===t.charCodeAt($t)?(r=f,$t++):(r=l,0===Xt&&ir(ie)),r!==l?(i=_r(),Wt=e,e=it(i)):($t=e,e=l),e}function yr(){var e,t,r,i,o;if(e=$t,t=$t,(r=dr())!==l){for(i=[],o=gr();o!==l;)i.push(o),o=gr();t=r=[r,i]}else $t=t,t=l;return t!==l&&(Wt=e,t=nt(t)),e=t}function gr(){var e,t;return e=$t,(t=dr())!==l&&(Wt=e,t=at(t)),e=t}function dr(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,t.substr($t,4)===_?(r=_,$t+=4):(r=l,0===Xt&&ir(de));r!==l&&(i=Kr())!==l?(o=function(){var e;93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Xt&&ir(ee));return e}(),o!==l?(Wt=e,e=kt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,t.substr($t,2)===S?(r=S,$t+=2):(r=l,0===Xt&&ir(he));r!==l&&(i=Pr())!==l&&(o=Kr())!==l&&kr()!==l?(Wt=e,e=wt(i,o)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,91===t.charCodeAt($t)?(r=d,$t++):(r=l,0===Xt&&ir(te));if(r!==l){if(i=[],35===t.charCodeAt($t)?(o=K,$t++):(o=l,0===Xt&&ir(Te)),o!==l)for(;o!==l;)i.push(o),35===t.charCodeAt($t)?(o=K,$t++):(o=l,0===Xt&&ir(Te));else i=l;i!==l?(o=xr(),kr()!==l?(Wt=e,e=_t(i,o)):($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===A?(r=A,$t+=2):(r=l,0===Xt&&ir(fe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Kt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===w?(r=w,$t+=2):(r=l,0===Xt&&ir(me));r!==l?(i=xr(),kr()!==l?(Wt=e,e=At(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===E?(r=E,$t+=2):(r=l,0===Xt&&ir(be));r!==l?(i=xr(),kr()!==l?(Wt=e,e=St(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===L?(r=L,$t+=2):(r=l,0===Xt&&ir(Be));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Et(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===I?(r=I,$t+=2):(r=l,0===Xt&&ir(ve));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Lt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===O?(r=O,$t+=2):(r=l,0===Xt&&ir(ke));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Nt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===V?(r=V,$t+=2):(r=l,0===Xt&&ir(_e));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Ot(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===N?(r=N,$t+=2):(r=l,0===Xt&&ir(Pe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Ft(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===R?(r=R,$t+=2):(r=l,0===Xt&&ir(Ce));r!==l?(i=xr(),kr()!==l?(Wt=e,e=It(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=$t,t.substr($t,2)===F?(r=F,$t+=2):(r=l,0===Xt&&ir(xe));r!==l?(i=xr(),kr()!==l?(Wt=e,e=Rt(i)):($t=e,e=l)):($t=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=$t,t.substr($t,2)===G?(r=G,$t+=2):(r=l,0===Xt&&ir(Ke));r!==l&&(i=Pr())!==l&&(o=Kr())!==l&&kr()!==l?(Wt=e,e=Vt(i,o)):($t=e,e=l);return e}()))))))))))))),r!==l&&(Wt=e,r=st(r)),e=r}function Tr(){var e,r;return e=$t,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),r!==l&&(Wt=e,r=lt(r)),e=r}function fr(){var e;return(e=function(){var e,t,r,i,o;e=$t,t=$t,(r=Er())!==l&&(i=mr())!==l&&(o=Lr())!==l?t=r=[r,i,o]:($t=t,t=l);t!==l&&(Wt=e,t=ct(t));return e=t,e}())===l&&(e=function(){var e,r,i,o,n;e=$t,r=$t,(i=Er())!==l?(o=function(){var e,r,i,o,n,a;t.substr($t,4)===m?(e=m,$t+=4):(e=l,0===Xt&&ir(ne));if(e===l)if(e=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Xt&&ir(ae)),r!==l){if(i=[],(o=Ir())!==l)for(;o!==l;)i.push(o),o=Ir();else i=l;if(i!==l)if(t.substr($t,4)===b?(o=b,$t+=4):(o=l,0===Xt&&ir(se)),o!==l){if(n=[],(a=Ir())!==l)for(;a!==l;)n.push(a),a=Ir();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Xt&&ir(ae)),a!==l?e=r=[r,i,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}(),o!==l&&(n=Lr())!==l?r=i=[i,o,n]:($t=r,r=l)):($t=r,r=l);r!==l&&(Wt=e,r=pt(r));return e=r,e}()),e}function mr(){var e,r,i,o,n,a;if(t.substr($t,4)===B?(e=B,$t+=4):(e=l,0===Xt&&ir(le)),e===l)if(e=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Xt&&ir(ae)),r!==l){if(i=[],(o=Ir())!==l)for(;o!==l;)i.push(o),o=Ir();else i=l;if(i!==l)if(t.substr($t,6)===v?(o=v,$t+=6):(o=l,0===Xt&&ir(pe)),o!==l){if(n=[],(a=Ir())!==l)for(;a!==l;)n.push(a),a=Ir();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Xt&&ir(ae)),a!==l?e=r=[r,i,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}function hr(){var e,r,i,o,n;if(e=$t,r=$t,i=function(){var e,r,i,o,n,a;e=$t,r=Er(),r!==l?(i=$t,Xt++,o=$t,t.substr($t,4)===h?(n=h,$t+=4):(n=l,0===Xt&&ir(ae)),n!==l&&(a=Lr())!==l?o=n=[n,a]:($t=o,o=l),Xt--,o!==l?($t=i,i=void 0):i=l,i!==l?(Wt=e,e=yt()):($t=e,e=l)):($t=e,e=l);return e}(),i!==l){for(o=[],n=br();n!==l;)o.push(n),n=br();n=function(){var e,t,r,i,o;e=$t,t=$t,r=mr(),r===l&&(r=null);i=$t,Xt++,o=Fr(),Xt--,o!==l?($t=i,i=void 0):i=l;i!==l?t=r=[r,i]:($t=t,t=l);t!==l&&(Wt=e,t=gt());return e=t,e}(),n!==l?r=i=[i,o,n]:($t=r,r=l)}else $t=r,r=l;return r!==l&&(Wt=e,r=ut(r)),e=r}function br(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,r=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Xt&&ir(ae));i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l);r===l&&(r=$t,t.substr($t,2)===C?(i=C,$t+=2):(i=l,0===Xt&&ir(ce)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=$t,t.substr($t,2)===x?(i=x,$t+=2):(i=l,0===Xt&&ir(ue)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=$t,r=$t,Xt++,i=$t,o=mr(),o!==l&&(n=Fr())!==l?i=o=[o,n]:($t=i,i=l);Xt--,i===l?r=void 0:($t=r,r=l);if(r!==l){if(i=$t,o=$t,n=wr(),(a=Er())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=Ar())!==l)for(;a!==l;)n.push(a),a=Ar();else n=l;n!==l&&(a=Rr())!==l?o=n=[n,a]:($t=o,o=l)}(i=o!==l?t.substring(i,$t):o)!==l?(Wt=e,e=ft(i)):($t=e,e=l)}else $t=e,e=l;return e}())));r!==l&&(Wt=e,r=Tt(r));return e=r,e}(),r!==l&&(Wt=e,r=dt(r)),e=r}function Br(){var e,r,i,o,n;if(e=$t,r=$t,i=function(){var e,r,i,o,n,a;e=$t,r=Er(),r!==l?(i=$t,Xt++,o=$t,t.substr($t,3)===P?(n=P,$t+=3):(n=l,0===Xt&&ir(ye)),n!==l&&(a=Lr())!==l?o=n=[n,a]:($t=o,o=l),Xt--,o!==l?($t=i,i=void 0):i=l,i!==l?(Wt=e,e=ht()):($t=e,e=l)):($t=e,e=l);return e}(),i!==l){for(o=[],n=vr();n!==l;)o.push(n),n=vr();n=function(){var e,t,r,i,o;e=$t,t=$t,r=mr(),r===l&&(r=null);i=$t,Xt++,o=Fr(),Xt--,o!==l?($t=i,i=void 0):i=l;i!==l?t=r=[r,i]:($t=t,t=l);t!==l&&(Wt=e,t=bt());return e=t,e}(),n!==l?r=i=[i,o,n]:($t=r,r=l)}else $t=r,r=l;return r!==l&&(Wt=e,r=mt(r)),e=r}function vr(){var e,r;return e=$t,r=function(){var e,r,i,o;e=$t,r=$t,t.substr($t,3)===P?(i=P,$t+=3):(i=l,0===Xt&&ir(ye));i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l);r===l&&(r=$t,t.substr($t,2)===k?(i=k,$t+=2):(i=l,0===Xt&&ir(ge)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=$t,t.substr($t,2)===C?(i=C,$t+=2):(i=l,0===Xt&&ir(ce)),i!==l?((o=Lr())===l&&(o=Fr()),o!==l?r=i=[i,o]:($t=r,r=l)):($t=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=$t,r=$t,Xt++,i=$t,o=mr(),o!==l&&(n=Fr())!==l?i=o=[o,n]:($t=i,i=l);Xt--,i===l?r=void 0:($t=r,r=l);if(r!==l){if(i=$t,o=$t,n=wr(),(a=Er())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=Ar())!==l)for(;a!==l;)n.push(a),a=Ar();else n=l;n!==l&&(a=Rr())!==l?o=n=[n,a]:($t=o,o=l)}(i=o!==l?t.substring(i,$t):o)!==l?(Wt=e,e=Ct(i)):($t=e,e=l)}else $t=e,e=l;return e}())));r!==l&&(Wt=e,r=vt(r));return e=r,e}(),r!==l&&(Wt=e,r=Bt(r)),e=r}function Cr(){var e,r;return e=$t,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),r!==l&&(Wt=e,r=Pt(r)),e=r}function xr(){var e,r,i,o;for(e=$t,r=$t,i=[],t.substr($t,2)===j?(o=j,$t+=2):(o=l,0===Xt&&ir(Ae)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z)));o!==l;)i.push(o),t.substr($t,2)===j?(o=j,$t+=2):(o=l,0===Xt&&ir(Ae)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Xt&&ir(Z)));return r=t.substring(r,$t),Wt=e,e=r=Gt(r)}function Pr(){var e,r,i,o,n;if(e=$t,r=$t,Xt++,t.substr($t,3)===D?(i=D,$t+=3):(i=l,0===Xt&&ir(we)),Xt--,i===l?r=void 0:($t=r,r=l),r!==l){for(i=$t,o=[],n=t.charAt($t),W.test(n)?$t++:(n=l,0===Xt&&ir(Se));n!==l;)o.push(n),n=t.charAt($t),W.test(n)?$t++:(n=l,0===Xt&&ir(Se));i=t.substring(i,$t),Wt=e,e=jt(i)}else $t=e,e=l;return e}function kr(){var e,r,i;if(93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Xt&&ir(ee)),e===l){for(e=$t,r=[],i=Ir();i!==l;)r.push(i),i=Ir();(i=Nr())!==l?e=r=[r,i]:($t=e,e=l)}return e}function _r(){var e,r,i,o;for(e=$t,r=$t,i=[],o=t.charAt($t),z.test(o)?$t++:(o=l,0===Xt&&ir(Le));o!==l;)i.push(o),o=t.charAt($t),z.test(o)?$t++:(o=l,0===Xt&&ir(Le));return r=t.substring(r,$t),Wt=e,e=r=Mt(r)}function Kr(){var e,r,i;return e=$t,58===t.charCodeAt($t)?(r=T,$t++):(r=l,0===Xt&&ir(re)),r!==l?(i=xr(),Wt=e,e=Ut(i)):($t=e,e=l),e===l&&(r="",Wt=e=$t,e=r=Jt()),e}function Ar(){var e;return Xt++,e=t.charAt($t),q.test(e)?$t++:(e=l,0===Xt&&ir(Ne)),Xt--,e===l&&(0===Xt&&ir(Fe)),e}function wr(){var e,t;for(Xt++,e=[],t=Ar();t!==l;)e.push(t),t=Ar();return Xt--,t=l,0===Xt&&ir(Oe),e}function Sr(){var e,r,i;for(Xt++,e=$t,r=[],i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));i!==l;)r.push(i),i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));return(i=Er())!==l?e=r=[r,i]:($t=e,e=l),Xt--,e===l&&(r=l,0===Xt&&ir(Ve)),e}function Er(){var e;return Xt++,10===t.charCodeAt($t)?(e=U,$t++):(e=l,0===Xt&&ir(je)),e===l&&(t.substr($t,2)===J?(e=J,$t+=2):(e=l,0===Xt&&ir(De)),e===l&&(e=t.charAt($t),X.test(e)?$t++:(e=l,0===Xt&&ir(Me)))),Xt--,e===l&&(0===Xt&&ir(Ge)),e}function Lr(){var e,r,i;for(Xt++,e=$t,r=[],i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));i!==l;)r.push(i),i=t.charAt($t),H.test(i)?$t++:(i=l,0===Xt&&ir(Ie));return(i=Er())!==l?e=r=[r,i]:($t=e,e=l),Xt--,e===l&&(r=l,0===Xt&&ir(Ue)),e}function Ir(){var e;return Xt++,e=t.charAt($t),Y.test(e)?$t++:(e=l,0===Xt&&ir($e)),Xt--,e===l&&(0===Xt&&ir(Je)),e}function Rr(){var e,r;return(e=Er())===l&&(e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l)),e}function Fr(){var e,r;return(e=Lr())===l&&(e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l)),e}function Nr(){var e,r;return e=$t,Xt++,t.length>$t?(r=t.charAt($t),$t++):(r=l,0===Xt&&ir(oe)),Xt--,r===l?e=void 0:($t=e,e=l),e}const Or=new o.BitmarkPegParserHelper({parse:e,parserText:Yt,parserLocation:Gr}),Vr=new n.BitmarkPegParserProcessor({parse:e,parserText:Yt,parserLocation:Gr});function Gr(){const e=rr(Wt,$t);return e?(delete e.source,e):e}function rr(e,t,r){var i=tr(e),o=tr(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}if(s=u(),r.peg$library)return{peg$result:s,peg$currPos:$t,peg$FAILED:l,peg$maxFailExpected:qt,peg$maxFailPos:Ht};if(s!==l&&$t===t.length)return s;throw s!==l&&$t<t.length&&ir({type:"end"}),or(qt,Ht<t.length?t.charAt(Ht):null,Ht<t.length?rr(Ht,Ht+1):rr(Ht,Ht))};const i=r(3029),o=r(3206),n=r(7124);r(7735);function a(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function s(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var l=this.location.end,p=s("",n.line.toString().length," "),c=i[o.line-1],u=(o.line===l.line?l.column:c.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+p+" |\n"+n.line+" | "+c+"\n"+p+" | "+s("",o.column-1," ")+s("",u,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["bitmark","bit","cardContent"]},5078:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(5057).parse;t.parse=i},5087:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=r(5126),n=r(6772),a=r(7735),s=r(2028),l=r(126),p=r(5854),c=r(3811),u=r(4410),y=r(1163),g=r(9727),d=r(166),T=r(6149),f=r(385),m=r(6877),h=r(4078),b=r(955),B=r(9681),v=r(4),C=r(431),x={debugGenerationInline:!1};class P extends v.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.inTag,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.write=this.write.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(r=c.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:c.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},x),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion===c.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.spacesAroundValues=this.calcSpacesAroundValues(),this.spacesAroundValuesStr=" ".repeat(this.spacesAroundValues),this.textGenerator=new C.TextGenerator(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new n.StringWriter,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){var r;const i=e.value,o=s.Config.getBitConfig(i.bitType),n=s.Config.getBitResourcesConfig(i.bitType,i.resourceType);if(this.bitType=i.bitType,this.textFormat=null!==(r=i.textFormat)&&void 0!==r?r:o.textFormatDefault,this.isBodyBitmarkText=this.textFormat===f.TextFormat.bitmarkText,this.isCardAllowed=this.calculateIsCardAllowed(),this.hasCardSet=this.haveValidCardSet(i),this.hasFooter=this.haveValidFooter(i),this.firstBit||(this.writeNL(),this.writeNL(),this.writeNL()),this.writeOPD(i.bitLevel),i.isCommented&&this.writeString("|"),this.writeTagKey(i.bitType),i.textFormat){this.isWriteTextFormat(i.textFormat,o.textFormatDefault)&&(this.writeColon(),this.writeTagKey(i.textFormat))}let a;if(o.resourceAttachmentAllowed&&i.resources&&i.resources.length>0){const e=n.comboResourceTagTypesMap;if(n.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=i.resources[0].type}return a&&(this.writeAmpersand(),this.writeTagKey(a)),this.writeCL(),!0}exit_bitsValue(e,t){this.firstBit=!1}enter_internalComment(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;for(let e=0;e<r.length;e++){const t=r[e];this.writeNL(),this.writeProperty("internalComment",t,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0})}return!1}enter_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const o=null==i?void 0:i.value;if(o){const e=""!=r,t=o.labelFalse&&""!=o.labelFalse[0];(e||t)&&this.writeNL(),e&&this.writeProperty(d.PropertyTag.labelTrue,r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),t&&this.writeProperty(d.PropertyTag.labelFalse,o.labelFalse,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!1}enter_labelFalse(e,t){return!0}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{url:o,mockupId:n,size:a,format:s,trim:p}=r;return this.writeNL(),this.writeProperty("imageSource",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),o&&(n&&this.writeProperty("mockupId",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("size",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),s&&this.writeProperty("format",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),h.BooleanUtils.isBoolean(p)&&this.writeProperty("trim",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{technicalTerm:o,lang:n}=r;return this.writeNL(),this.writeProperty("technicalTerm",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("lang",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{servings:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:p,hint:c}=r;return this.writeNL(),this.writeProperty("servings",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("unit",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=a&&this.writeProperty("unitAbbr",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=s&&this.writeProperty("decimalPlaces",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=p&&this.writeProperty("disableCalculation",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=c&&(this.writeOPQ(),this.writeTextOrValue(c,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),!1}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{name:o,title:n,avatarImage:a}=r;return this.writeNL(),this.writeProperty("person",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("title",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeResource(T.ResourceTag.image,a.image.src),!1}enter_text(e,t){const r=this.getParentNode(t);return!r||r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_text(e,t){const r=this.getParentNode(t);return!r||r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue&&r.key!==l.NodeType.reason||(B.StringUtils.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}enter_icon(e,t){const r=e.value,i=this.getParentNode(t);return!i||(i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue||(this.writeNL(),this.writeResource(T.ResourceTag.icon,r.image.src)),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_ratingLevelStart(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enter_ratingLevelEnd(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enterRatingLevelStartEndCommon(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const{level:o,label:n}=r,a=e.key===l.NodeType.ratingLevelStart?d.PropertyTag.ratingLevelStart:d.PropertyTag.ratingLevelEnd;return this.writeNL(),this.writeProperty(a,o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("label",n,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.markConfig)return!0;const{mark:o,color:n,emphasis:a}=r;return o&&(this.writeNL(),this.writeProperty("mark",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("color",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("emphasis",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_reasonableNumOfChars(e,t){this.writeNL(),this.writeProperty("reasonableNumOfChars",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_additionalSolutionsValue(e,t){const r=this.getParentNode(t,2);(null==r?void 0:r.key)===l.NodeType.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,{format:g.PropertyFormat.plainText,single:!1}))}enter_item(e,t){var r,i,o;const n=e.value,a=this.getParentNode(t);return!this.isEmptyText(n)&&(!this.isEmptyText(null===(r=null==a?void 0:a.value)||void 0===r?void 0:r.lead)||(!this.isEmptyText(null===(i=null==a?void 0:a.value)||void 0===i?void 0:i.pageNumber)||(!this.isEmptyText(null===(o=null==a?void 0:a.value)||void 0===o?void 0:o.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(n,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))))}enter_lead(e,t){var r,i,o,n;const a=e.value,s=this.getParentNode(t);return!this.isEmptyText(a)&&(!this.isEmptyText(null===(r=null==s?void 0:s.value)||void 0===r?void 0:r.pageNumber)||(!this.isEmptyText(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==s?void 0:s.value)||void 0===o?void 0:o.item)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(a,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)))}enter_pageNumber(e,t){var r,i,o,n,a;const s=e.value,l=this.getParentNode(t);return!this.isEmptyText(s)&&(!this.isEmptyText(null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(o=null===(i=null==l?void 0:l.value)||void 0===i?void 0:i.item)&&void 0!==o?o:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(a=null===(n=null==l?void 0:l.value)||void 0===n?void 0:n.lead)&&void 0!==a?a:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!=s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))}enter_marginNumber(e,t){var r,i,o,n,a,s;const l=e.value,p=this.getParentNode(t);return!this.isEmptyText(l)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(i=null===(r=null==p?void 0:p.value)||void 0===r?void 0:r.item)&&void 0!==i?i:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==p?void 0:p.value)||void 0===o?void 0:o.lead)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(s=null===(a=null==p?void 0:p.value)||void 0===a?void 0:a.pageNumber)&&void 0!==s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(l,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)}enter_body(e,t){var r;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue&&(null==i?void 0:i.key)!==l.NodeType.cardBitsValue)return!0;this.inTag=!1;const o=e.value;if(this.textFormat===f.TextFormat.json){const e=null!==(r=o.body)&&void 0!==r?r:null;if(Array.isArray(e)||b.ObjectUtils.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.body))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(o.body)?o.body:[];this.writeTextOrValue(t,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=B.StringUtils.isString(o.body)?o.body:"";this.writeTextOrValue(`${e}`,f.TextFormat.plainText,m.TextLocation.body)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,r){var i;const o=null!==(i=l.NodeType.fromValue(e.type))&&void 0!==i?i:l.NodeType.bodyBit;return this.ast.walk(e,o,this,void 0),""}enter_gap(e,t){const r=e.value;if(r.solutions&&0===r.solutions.length)this.writeOPU(),this.writeCL();else for(const e of r.solutions)this.writeOPU(),this.writeTextOrValue(e,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL();return!0}enter_mark(e,t){const r=e.value;return this.writeOPE(),this.writeTextOrValue(r.solution,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;return this.textFormat===f.TextFormat.json||i.footer&&i.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",f.TextFormat.plainText,m.TextLocation.body),this.writeNL(),this.writeTextOrValue(i.footer,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;return i&&0===i.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){var r;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const o=e.value,n=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==n?void 0:n.type)===u.BodyBitType.mark&&o&&(this.writeOPE(),this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_mark(e,t){const r=t[0];if((null==r?void 0:r.key)!==l.NodeType.mark)return;const i=e.value;i&&this.writeProperty("mark",i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}enter_optionsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_textsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,y.CardSetVersion.v1)}enter_elements(e,t){}between_elements(e,t,r,i){this.writeCardSetVariantDivider()}between_flashcards(e,t,r,i){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,r,i){var o;this.isCardAllowed&&(r.key===l.NodeType.answer?this.writeCardSetSideDivider():r.key===l.NodeType.alternativeAnswers&&0!==(null===(o=r.value)||void 0===o?void 0:o.length)&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(p.BitType.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.statement,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_choicesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect||r.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.choice,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_responsesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.response,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}between_feedbacks(e,t,r,i){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const r=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.audio,r.audio.src),!1}enter_keyImage(e,t){const r=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.image,r.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,r,i){this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,r,i){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_table(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_data(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,r,i){const o=this.getParentNode(i),n=null==o?void 0:o.key;n!==l.NodeType.table&&n!==l.NodeType.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}between_dataValue(e,t,r,i){const o=this.getParentNode(i,2);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const r=this.getParentNode(t,3);(null==r?void 0:r.key)===l.NodeType.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}enter_dataValueValue(e,t){const r=this.getParentNode(t,3);if(((null==r?void 0:r.key)===l.NodeType.table||(null==r?void 0:r.key)===l.NodeType.pronunciationTable)&&e.value){if((null==r?void 0:r.key)===l.NodeType.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(T.ResourceTag.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,m.TextLocation.body)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)}}between_captionDefinitionList(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const r=this.getParentNode(t);return(null==r?void 0:r.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_definition(e,t){const r=this.getParentNode(t);return(null==r?void 0:r.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}between_definitions(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)!==l.NodeType.cardNode&&(null==o?void 0:o.key)!==l.NodeType.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,r,i){var o;const n=this.getParentNode(i);(null==n?void 0:n.key)===l.NodeType.definitions&&this.isCardAllowed&&(r.key===l.NodeType.definition?this.writeCardSetSideDivider():r.key===l.NodeType.alternativeDefinitions&&(null===(o=r.value)||void 0===o?void 0:o.length)>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const r=e.value;return null!=r.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(r.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),null!=r.ingredient&&(this.writeNL(),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeTextOrValue(`${r.quantity}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),r.disableCalculation&&this.writeProperty("disableCalculation",!0,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),this.writeNL(),this.writeTextOrValue(r.ingredient,this.textFormat,m.TextLocation.body)),!0}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeCardSetCardDivider()}leaf_response(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reaction(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_feedback(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.botResponsesValue)return;const i=e.value;i&&(this.writeNL(),this.writeTextOrValue(i,this.textFormat,m.TextLocation.body))}enter_backgroundWallpaper(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_imagePlaceholder(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)===l.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}else{const t=e.value;t&&t.src&&this.writeProperty("posterImage",t.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!0}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<r.length&&t!==e.length;t++){const i=r[t],o=e[t];this.writeProperty(o,i.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}}return!1}leaf_level(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;if(!s.Config.isOfBitType(this.bitType,[p.BitType.chapter]))return!0;const i=e.value,o=null==r?void 0:r.value;if(i>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+i;e++)this.writeHash();this.writeCL()}return!1}enter_title(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value,o=(null==r?void 0:r.value).level||1;if(o&&i){this.writeNL(),this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_subtitle(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const i=e.value;if(i){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const r=e.value;return r&&(this.writeNL(),this.writeProperty("book",r.book,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))),!1}leaf_book(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(i.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))}enter_hint(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_instruction(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_lang(e,t){e.value&&(this.writeNL(),this.writeProperty("lang",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0}))}enter_refAuthor(e,t){e.value&&(this.writeNL(),this.writeProperty("refAuthor",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refBookTitle(e,t){e.value&&(this.writeNL(),this.writeProperty("refBookTitle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_refPublisher(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublisher",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refPublicationYear(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublicationYear",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_citationStyle(e,t){e.value&&(this.writeNL(),this.writeProperty("citationStyle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_isExample(e,t){var r;if(!e.value)return;const i=this.getParentNode(t),o=null!==(r=null==i?void 0:i.value.example)&&void 0!==r?r:null;null!=o&&""!==o&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString(" true "):!1===o?this.writeString(" false "):Array.isArray(o)?this.writeTextOrValue(o,f.TextFormat.bitmarkText,m.TextLocation.tag):this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_elementsValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_solutionsValue(e,t){const r=this.getParentNode(t,2);(null==r?void 0:r.key)===l.NodeType.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_question(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.questionsValue&&(null==r?void 0:r.key)!==l.NodeType.flashcardsValue||e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_src1x(e,t){this.writeProperty("src1x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_width(e,t){this.writeProperty("width",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_height(e,t){this.writeProperty("height",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_alt(e,t){this.writeProperty("alt",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_zoomDisabled(e,t){s.Config.isOfBitType(this.bitType,[p.BitType.imageSeparator,p.BitType.pageBanner,p.BitType.imagesLogoGrave,p.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0,ignoreFalse:!0}))}enter_caption(e,t){const r=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",r,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}leaf_search(e,t){const r=e.value;r&&(this.writeNL_IfNotChain(t),this.writeProperty("search",r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_duration(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.bitsValue&&this.writeProperty("duration",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_mute(e,t){this.writeProperty("mute",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}generateResourceHandlers(){for(const e of T.ResourceTag.keys()){if(e===T.ResourceTag.keyFromValue(T.ResourceTag.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const r=e.value;if(null==r)return!1;const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.resourcesValue)return!0;const o=T.ResourceTag.fromValue(i.value.__typeAlias),n=null!=o?o:T.ResourceTag.fromValue(i.value.type);if(!n)return!1;const a=r.url||r.src||r.body||"";return this.writeNL(),this.writeResource(n,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag,i=`enter_${t}`;"function"!=typeof this[i]&&("example"!==t&&(this[i]=(e,t)=>{var i,o;if(null==e.value)return;const n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.writeNL_IfNotChain(t),this.writeProperty(r.tag,e.value,{format:null!==(i=r.format)&&void 0!==i?i:g.PropertyFormat.plainText,single:null!==(o=r.single)&&void 0!==o&&o,ignoreFalse:"false"===r.defaultValue,ignoreTrue:"true"===r.defaultValue}))},this[i]=this[i].bind(this)))}}isChain(e){const t=this.getParentNode(e);return(null==t?void 0:t.key)!==l.NodeType.bitsValue&&((null==t?void 0:t.key)!==l.NodeType.cardBitsValue&&((null==t?void 0:t.key)!==l.NodeType.feedbacksValue&&((null==t?void 0:t.key)!==l.NodeType.quizzesValue&&((null==t?void 0:t.key)!==l.NodeType.pairsValue&&((null==t?void 0:t.key)!==l.NodeType.matrixValue&&((null==t?void 0:t.key)!==l.NodeType.definitionsValue&&((null==t?void 0:t.key)!==l.NodeType.questionsValue&&(null==t?void 0:t.key)!==l.NodeType.reason)))))))}haveValidCardSet(e){const t=s.Config.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==f.TextFormat.json&&(!!(t.footer&&t.footer.length>0)&&!!this.isBodyBitmarkText)}calcSpacesAroundValues(){const e=this.options.spacesAroundValues;let t=1;return null!=e&&(t=!0===e?1:!1===e?0:e),t=Math.min(Math.max(t,0),10),t}writeTagKey(e){null!=e&&this.write(a.Breakscape.breakscape(`${e}`,{format:f.TextFormat.plainText,location:m.TextLocation.tag}))}writeTextOrValue(e,t,r,i){const o=r===m.TextLocation.tag,n="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,l=o?this.spacesAroundValuesStr:"",p=t===f.TextFormat.bitmarkText?t:f.TextFormat.plainText,c=e=>o?`${l}${e}${l}`:e,u=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const r=this.partWriter.getString().trim();return this.writer=t,r};if(null==n){if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,r,i);if(o){const t=u(e);t&&this.write(c(t))}else e()}}else{const e=()=>this.write(a.Breakscape.breakscape(n,{format:p,location:r}));if(o){const t=u(e);t&&this.write(c(t))}else e()}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(e){this.write(`[${".".repeat(e)}`)}writeOPU(){this.write("[_")}writeOPE(){this.write("[=")}writeOPB(){this.write("[!")}writeOPQ(){this.write("[?")}writeOPA(){this.write("[@")}writeOPP(){this.write("[+")}writeOPM(){this.write("[-")}writeOPS(){this.write("[\\")}writeOPR(){this.write("[*")}writeOPC(){this.write("[%")}writeOPAMP(){this.write("[&")}writeOPDOLLAR(){this.write("[$")}writeOPHASH(){this.write("[#")}writeOPPRE(){this.write("['")}writeOPPOST(){this.write("[")}writeOP(){this.write("[")}writeCL(){0===this.spacesAroundValues&&this.writer.getLastWrite().endsWith("^")?this.write(" ]"):this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeSpacesAroundValues(){this.write(this.spacesAroundValuesStr)}writePlainTextDivider(){this.writeNL(),this.write("==== text ====")}writeCardSetStart(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1&&this.write("===")}writeCardSetCardDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,r=!1){var i;if(e&&t){const o=t[null!==(i=T.ResourceTag.keyFromValue(t.type))&&void 0!==i?i:""],n=o&&(o.src||o.url||o.body)||"";r?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(n,f.TextFormat.plainText,m.TextLocation.tag),t.type,T.ResourceTag.article,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.tag),T.ResourceTag.article,this.writeCL())}writeProperty(e,t,r){let i;if(void 0!==t){const o=r.format===g.PropertyFormat.bitmarkText;if(o){if(r.ignoreEmpty&&o&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}else if(i=Array.isArray(t)?t:[t],i.length>0){r.single&&(i=i.slice(i.length-1));for(const t of i)if(void 0!==t){if(r.ignoreFalse&&!1===t)continue;if(r.ignoreTrue&&!0===t)continue;if(r.ignoreEmpty&&""===t)continue;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}}}}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!(f.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()}isOfBitType1(){return this.isOfBitType([p.BitType.trueFalse1,p.BitType.multipleChoice1,p.BitType.multipleResponse1])}isOfBitType(e){return s.Config.isOfBitType(this.bitType,e)}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.BitmarkGenerator=P},5126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const i=r(1412),o=r(126),n=r(9681);t.Ast=class{constructor(){(0,i.init)()}walk(e,t,r,i){this.walkRecursive(e,[{index:0,key:t,value:e}],r,i)}getRouteKey(e){return e.reduce(((t,r,i)=>(+r.key!==r.index&&(t+=`${r.key}`,i<e.length-1&&(t+="_")),t)),"")}printTree(e,t=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==o.NodeType.bodyJson),between:(e,t,r,i)=>{console.log("Between: "+this.getRouteKey(i))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){return!(!Object.prototype.hasOwnProperty.call(e,"bits")||!Array.isArray(e.bits))}walkRecursive(e,t,r,i){const{enter:o,between:n,exit:a,leaf:s}=r,l=t[t.length-1].key,p=!this.isValue(e),c=t[t.length-1];if(p){if(o){if(!1===o(c,t,i))return}}else s&&s(c,t,i);if(p){const o=this.isArray(e),a=Object.keys(e);for(let s=0,p=a.length;s<p;s++){const u=a[s],y=s===p-1,g=e,d=g[u];if(null!=d){const e={key:this.getAstKey(u,l,o),index:s,value:d},p=t.slice();if(p.push(e),this.walkRecursive(d,p,r,i),!y){const r=a[s+1],p=g[r],u={key:this.getAstKey(r,l,o),index:s+1,value:p};if(n){if(!1===n(c,e,u,t,i))break}}}}}p&&a&&a(c,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),o.NodeType.fromKey(i)||`unknown(${i})`}isArray(e){return Array.isArray(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}}},5189:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=function(e,t,r,c,u,y){if(t===p.BitContentLevel.Chain)(0,l.markTagContentProcessor)(e,p.BitContentLevel.Chain,c,u);else{const t=function(e,t,r,l){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",l);const u=o.Config.getTagConfigForTag(r,a.Tag.fromValue(l.type)),y=e.bitContentProcessor(p.BitContentLevel.Chain,r,[l]),g=e.bitContentProcessor(p.BitContentLevel.Chain,null==u?void 0:u.chain,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",g);const{solution:d}=y,{mark:T}=g,f=i(g,["mark"]),m=Object.assign({type:n.BodyBitType.mark,solution:null!=d?d:"",mark:null!==(c=s.ArrayUtils.asSingle(T))&&void 0!==c?c:""},f);return m}(e,0,r,c);t&&y.push(t)}};const o=r(2028),n=r(4410),a=r(9917),s=r(6989),l=r(5980),p=r(3029)},5416:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=r(1731),g="",{toString:d}={},{keys:T}=Object,f=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const r=d.call(e).slice(8,-1);switch(r){case"Array":return[n,g];case"Object":return[a,g];case"Date":return[s,g];case"RegExp":return[l,g];case"Map":return[p,g];case"Set":return[c,g];case"DataView":return[n,r]}return r.includes("Array")?[n,r]:r.includes("Error")?[u,r]:[a,r]},m=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:r}={})=>{const u=[];return((e,t,r,u)=>{const g=(e,t)=>{const i=u.push(e)-1;return r.set(t,i),i},d=u=>{if(r.has(u))return r.get(u);let[h,b]=f(u);switch(h){case o:{let t=u;switch(b){case"bigint":h=y,t=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([i],u)}return g([h,t],u)}case n:{if(b){let e=u;return"DataView"===b?e=new Uint8Array(u.buffer):"ArrayBuffer"===b&&(e=new Uint8Array(u)),g([b,[...e]],u)}const e=[],t=g([h,e],u);for(const t of u)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return g([b,u.toString()],u);case"Boolean":case"Number":case"String":return g([b,u.valueOf()],u)}if(t&&"toJSON"in u)return d(u.toJSON());const r=[],i=g([h,r],u);for(const t of T(u))!e&&m(f(u[t]))||r.push([d(t),d(u[t])]);return i}case s:return g([h,u.toISOString()],u);case l:{const{source:e,flags:t}=u;return g([h,{source:e,flags:t}],u)}case p:{const t=[],r=g([h,t],u);for(const[r,i]of u)(e||!m(f(r))&&!m(f(i)))&&t.push([d(r),d(i)]);return r}case c:{const t=[],r=g([h,t],u);for(const r of u)!e&&m(f(r))||t.push(d(r));return r}}const{message:B}=u;return g([h,{name:b,message:B}],u)};return d})(!(t||r),!!t,new Map,u)(e),u}},5512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const i=(0,r(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=i},5533:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=r(7735),n=r(2028),a=r(5854),s=r(6149),l=r(6877),p=r(955),c=r(9681),u=r(201),y=r(4470),g=r(4564);class d extends y.BaseBuilder{resourceFromResourceJson(e,t){if(!t)return;const r=[];Array.isArray(t)||(t=[t]);for(const i of t){let t=s.ResourceTag.fromValue(i.type);if(!t)return;const o=s.ResourceTag.keyFromValue(t);if(!o)return;const n=s.ResourceTag.fromValue(i.__typeAlias);let a;if(t=null!=n?n:t,t===s.ResourceTag.imageResponsive){const t=i,o=this.resourceFromResourceDataJson(e,s.ResourceTag.imagePortrait,t.imagePortrait),n=this.resourceFromResourceDataJson(e,s.ResourceTag.imageLandscape,t.imageLandscape);o&&r.push(o),n&&r.push(n)}else if(t===s.ResourceTag.stillImageFilm){const t=i,o=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t.image),n=this.resourceFromResourceDataJson(e,s.ResourceTag.audio,t.audio);o&&r.push(o),n&&r.push(n)}else{if(a=i[o],!a)return;const n=this.resourceFromResourceDataJson(e,t,a);n&&r.push(n)}}return 0!==r.length?1===r.length?r[0]:r:void 0}resourceFromResourceDataJson(e,t,r){var i,o,n;if(!r)return;if(!(t=s.ResourceTag.fromValue(t)))return;const a=c.StringUtils.isString(r)?r:void 0,p=r.url||r.src||r.body||a,u=r.posterImage?null===(i=this.resourceFromResourceDataJson(e,s.ResourceTag.image,r.posterImage))||void 0===i?void 0:i.image:void 0,y=r.thumbnails?r.thumbnails.map((t=>{var r;return null===(r=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t))||void 0===r?void 0:r.image})):void 0;return this.resource(e,{type:t,value:p,format:r.format,src1x:r.src1x,src2x:r.src2x,src3x:r.src3x,src4x:r.src4x,caption:this.handleJsonText(e,l.TextLocation.tag,r.caption),width:null!==(o=r.width)&&void 0!==o?o:void 0,height:null!==(n=r.height)&&void 0!==n?n:void 0,alt:r.alt,zoomDisabled:r.zoomDisabled,duration:r.duration,mute:r.mute,autoplay:r.autoplay,allowSubtitles:r.allowSubtitles,showSubtitles:r.showSubtitles,posterImage:u,thumbnails:y,siteName:void 0,license:r.license,copyright:r.copyright,showInIndex:r.showInIndex,search:r.search})}resource(e,t){let r;const{type:n,value:a,format:l}=t,p=i(t,["type","value","format"]),c=Object.assign({type:n,value:null!=a?a:o.Breakscape.EMPTY_STRING,format:null!=l?l:o.Breakscape.EMPTY_STRING},p);switch(n){case s.ResourceTag.video:case s.ResourceTag.videoEmbed:case s.ResourceTag.videoLink:case s.ResourceTag.stillImageFilmEmbed:case s.ResourceTag.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const o of r){const r=t[o];if(r){const t=this.resource(e,{type:s.ResourceTag.image,value:r});t&&i.push(t.image)}}c.thumbnails=[...c.thumbnails||[],...i]}}switch(n){case s.ResourceTag.image:case s.ResourceTag.imagePortrait:case s.ResourceTag.imageLandscape:case s.ResourceTag.backgroundWallpaper:case s.ResourceTag.imagePlaceholder:case s.ResourceTag.icon:r=this.imageResource(e,c,n);break;case s.ResourceTag.imageLink:r=this.imageLinkResource(e,c);break;case s.ResourceTag.audio:r=this.audioResource(e,c);break;case s.ResourceTag.audioEmbed:r=this.audioEmbedResource(e,c);break;case s.ResourceTag.audioLink:r=this.audioLinkResource(e,c);break;case s.ResourceTag.video:r=this.videoResource(e,c);break;case s.ResourceTag.videoEmbed:r=this.videoEmbedResource(e,c);break;case s.ResourceTag.videoLink:r=this.videoLinkResource(e,c);break;case s.ResourceTag.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(e,c);break;case s.ResourceTag.stillImageFilmLink:r=this.stillImageFilmLinkResource(e,c);break;case s.ResourceTag.article:r=this.articleResource(e,c);break;case s.ResourceTag.document:r=this.documentResource(e,c);break;case s.ResourceTag.documentEmbed:r=this.documentEmbedResource(e,c);break;case s.ResourceTag.documentLink:r=this.documentLinkResource(e,c);break;case s.ResourceTag.documentDownload:r=this.documentDownloadResource(e,c);break;case s.ResourceTag.appLink:r=this.appLinkResource(e,c);break;case s.ResourceTag.websiteLink:r=this.websiteLinkResource(e,c)}return r}imageResource(e,t,r){var i,o;const{value:c,src1x:y,src2x:d,src3x:T,src4x:f,width:m,height:h,alt:b,zoomDisabled:B,license:v,copyright:C,showInIndex:x,caption:P,search:k}=t,{bitType:_}=e;let K=!1;n.Config.isOfBitType(_,[a.BitType.imageSeparator,a.BitType.pageBanner,a.BitType.imagesLogoGrave,a.BitType.prototypeImages])&&(K=!0);const A={type:s.ResourceTag.image,__typeAlias:null!=r?r:s.ResourceTag.image,image:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(c))&&void 0!==i?i:void 0,provider:null!==(o=u.UrlUtils.domainFromUrl(c))&&void 0!==o?o:void 0,src:null!=c?c:"",src1x:null!=y?y:void 0,src2x:null!=d?d:void 0,src3x:null!=T?T:void 0,src4x:null!=f?f:void 0,width:null!=m?m:null,height:null!=h?h:null,alt:null!=b?b:"",zoomDisabled:null!=B?B:K,license:null!=v?v:"",copyright:null!=C?C:"",showInIndex:null!=x&&x,caption:this.handleJsonText(e,l.TextLocation.tag,P),search:null!=k?k:void 0}};return p.ObjectUtils.removeUnwantedProperties(A.image,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),g.NodeValidator.validateResource(A)}imageLinkResource(e,t){var r,i;const{value:o,src1x:n,src2x:a,src3x:c,src4x:y,width:d,height:T,alt:f,zoomDisabled:m,license:h,copyright:b,showInIndex:B,caption:v,search:C}=t,x={type:s.ResourceTag.imageLink,__typeAlias:s.ResourceTag.imageLink,imageLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",src1x:null!=n?n:void 0,src2x:null!=a?a:void 0,src3x:null!=c?c:void 0,src4x:null!=y?y:void 0,width:null!=d?d:null,height:null!=T?T:null,alt:null!=f?f:"",zoomDisabled:null!=m&&m,license:null!=h?h:"",copyright:null!=b?b:"",showInIndex:null!=B&&B,caption:this.handleJsonText(e,l.TextLocation.tag,v),search:null!=C?C:void 0}};return p.ObjectUtils.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),g.NodeValidator.validateResource(x)}audioResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audio,__typeAlias:s.ResourceTag.audio,audio:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioEmbedResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioEmbed,__typeAlias:s.ResourceTag.audioEmbed,audioEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioLinkResource(e,t){var r,i;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioLink,__typeAlias:s.ResourceTag.audioLink,audioLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioLink,{ignoreEmptyString:["url"]}),g.NodeValidator.validateResource(h)}videoResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.video,__typeAlias:s.ResourceTag.video,video:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,src:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0,posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoEmbedResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoEmbed,__typeAlias:s.ResourceTag.videoEmbed,videoEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoLinkResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoLink,__typeAlias:s.ResourceTag.videoLink,videoLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmEmbedResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmEmbed,__typeAlias:s.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmLinkResource(e,t){var r,i;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmLink,__typeAlias:s.ResourceTag.stillImageFilmLink,stillImageFilmLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}articleResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.article,__typeAlias:s.ResourceTag.article,article:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,body:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"]}),g.NodeValidator.validateResource(T)}documentResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.document,__typeAlias:s.ResourceTag.document,document:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentEmbedResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentEmbed,__typeAlias:s.ResourceTag.documentEmbed,documentEmbed:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentLinkResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentLink,__typeAlias:s.ResourceTag.documentLink,documentLink:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentDownloadResource(e,t){var r,i;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentDownload,__typeAlias:s.ResourceTag.documentDownload,documentDownload:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==r?r:void 0,provider:null!==(i=u.UrlUtils.domainFromUrl(o))&&void 0!==i?i:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}appLinkResource(e,t){const{value:r,license:i,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.appLink,__typeAlias:s.ResourceTag.appLink,appLink:{provider:void 0,url:null!=r?r:"",license:null!=i?i:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}websiteLinkResource(e,t){const{value:r,license:i,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.websiteLink,__typeAlias:s.ResourceTag.websiteLink,websiteLink:{provider:void 0,url:null!=r?r:"",license:null!=i?i:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}}t.ResourceBuilder=d},5554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(3778),c={[i.CardSetConfigKey._definitionList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._flashcard]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._feedback]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!1}],[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!0}]]},[i.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._pronunciationTable]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[i.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[i.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:p.Count.infinity}]]},[i.CardSetConfigKey._bookReferenceList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}],repeatCount:p.Count.infinity}]]}};t.CARDS=c},5591:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const i=r(4718),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=(0,i.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const r of t)for(const t in r)e.add(t)}()},5633:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const i=r(5663),o=r(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new i.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:i.Environment.unknown,os:o.Os.unknown},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce(((e,t)=>(t&&e.push(t),e)),[]),r={keys:new Set,versions:{}};let i="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=t.keys.has("macintosh"),p=n,c=r,u=l;!s||n||a?p?(e.browser=i.Environment.chrome,e.browserVersion=t.versions.chrome):c&&(e.browser=i.Environment.firefox,e.browserVersion=t.versions.firefox):(e.browser=i.Environment.safari,e.browserVersion=t.versions.version);u&&(e.os=o.Os.macos,e.osVersion=t.versions.x);return e};const i=r(6278),o=r(9561)},5663:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const o=r(5809),n=r(2028),a=r(5854),s=r(6220),l=r(6149),p=r(385),c=r(9681),u=new o.Builder;t.JsonParser=class{toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,null==i?void 0:i.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return u.buildBitmark(i)}preprocessJson(e){const t=[];if(c.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const r=e=>{if(this.isBitWrapper(e)){const r=e;t.push(r)}else if(this.isBit(e)){const r=e;t.push(this.bitToBitWrapper(r))}};if(Array.isArray(e))for(const t of e)r(t);else r(e);return t}isBitWrapper(e){if(Object.prototype.hasOwnProperty.call(e,"bit")){const t=e;return this.isBit(t.bit)}return!1}isBit(e){if(Object.prototype.hasOwnProperty.call(e,"type")){const t=e;return n.Config.getBitType(t.type)!==a.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var r,o,l,c,y;const{statement:g,product:d,productVideo:T,reference:f}=e,m=i(e,["statement","product","productVideo","reference"]),h=e.type===a.BitType._comment&&void 0!==e.originalType,b=n.Config.getBitType(h?e.originalType:e.type),B=n.Config.getBitConfig(b),v=s.DeprecatedTextFormat.fromValue(e.format);let C=null!==(r=p.TextFormat.fromValue(e.format))&&void 0!==r?r:B.textFormatDefault;v===s.DeprecatedTextFormat.bitmarkMinusMinus&&(C=p.TextFormat.bitmarkText);return u.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),{bitType:b,bitLevel:Math.max(Math.min(null!==(o=e.bitLevel)&&void 0!==o?o:1,n.Config.bitLevelMax),n.Config.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:h,internalComment:t,productList:d,productVideoList:T}),this.processReference(f)),this.parseExample(e.example)),{person:null!==(l=e.partner)&&void 0!==l?l:e.person,markConfig:e.marks,resources:this.processResources(b,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(g,e.isCorrect,e.statements,e.example),responses:this.processResponses(b,e.responses),botResponses:this.processBotResponse(b,e.responses),cardBits:this.processListItems(null!==(y=null!==(c=e.listItems)&&void 0!==c?c:e.sections)&&void 0!==y?y:e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)}))}processStatements(e,t,r,i){const o=[];if(e){const r=Object.assign({statement:null!=e?e:"",isCorrect:null!=t&&t},this.parseExample(i));r&&o.push(r)}if(Array.isArray(r))for(const e of r)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const r=[];if(Array.isArray(e))for(const i of e){const e=Object.assign({},i);e.body&&(e.body={body:e.body,placeholders:t}),e&&r.push(e)}if(0!==r.length)return r}getResourceType(e){if(e){return l.ResourceTag.fromValue(e.type)}}processResources(e,t,r,i){const o=[];if(t&&o.push(t),n.Config.isOfBitType(e,[a.BitType.prototypeImages])&&Array.isArray(r))for(const e of r)e&&o.push(e);if(n.Config.isOfBitType(e,[a.BitType.imagesLogoGrave])&&Array.isArray(i))for(const e of i)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processReference(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}parseExample(e){if(null==e)return;if(!0===e)return{example:!0};if(!1===e)return{example:!1};const t=c.StringUtils.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}}},5809:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const o=i(r(7678)),n=r(7735),a=r(2028),s=r(9888),l=r(5854),p=r(4410),c=r(6220),u=r(6149),y=r(385),g=r(6877),d=r(6989),T=r(8903),f=r(4078),m=r(8025),h=r(955),b=r(9681),B=r(6936),v=r(4470),C=r(5533),x=r(4564);class P extends v.BaseBuilder{constructor(){super(...arguments),this.resourceBuilder=new C.ResourceBuilder}buildBitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return h.ObjectUtils.removeUnwantedProperties(i),i}buildBit(e){var t,r,i,o,n,T;const f=a.Config.getBitConfig(e.bitType),b=e.bitType,B=c.DeprecatedTextFormat.fromValue(e.textFormat);let v=null!==(t=y.TextFormat.fromValue(e.textFormat))&&void 0!==t?t:f.textFormatDefault;B===c.DeprecatedTextFormat.bitmarkMinusMinus&&(v=y.TextFormat.bitmarkText);const C={bitConfig:f,bitType:b,textFormat:v},P=this.buildCardNode(C,e),k=a.Config.isOfBitType(e.bitType,l.BitType.essay)?this.toAstProperty(s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars):void 0,_=Object.assign({},this.toExample(e.__isDefaultExample,e.example)),K=Object.assign(Object.assign({bitType:b,bitLevel:e.bitLevel,textFormat:v,resourceType:u.ResourceTag.fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(s.PropertyConfigKey.id,e.id),internalComment:this.toAstProperty(s.PropertyConfigKey.internalComment,e.internalComment),customerId:this.toAstProperty(s.PropertyConfigKey.customerId,e.customerId),customerExternalId:this.toAstProperty(s.PropertyConfigKey.customerExternalId,e.customerExternalId),externalId:this.toAstProperty(s.PropertyConfigKey.externalId,e.externalId),spaceId:this.toAstProperty(s.PropertyConfigKey.spaceId,e.spaceId),padletId:this.toAstProperty(s.PropertyConfigKey.padletId,e.padletId),jupyterId:this.toAstProperty(s.PropertyConfigKey.jupyterId,e.jupyterId),jupyterExecutionCount:this.toAstProperty(s.PropertyConfigKey.jupyterExecutionCount,e.jupyterExecutionCount),isPublic:this.toAstProperty(s.PropertyConfigKey.isPublic,e.isPublic),isTemplate:this.toAstProperty(s.PropertyConfigKey.isTemplate,e.isTemplate),isTemplateStripTheme:this.toAstProperty(s.PropertyConfigKey.isTemplateStripTheme,e.isTemplateStripTheme),aiGenerated:this.toAstProperty(s.PropertyConfigKey.aiGenerated,e.aiGenerated),machineTranslated:this.toAstProperty(s.PropertyConfigKey.machineTranslated,e.machineTranslated),searchIndex:this.toAstProperty(s.PropertyConfigKey.searchIndex,e.searchIndex),analyticsTag:this.toAstProperty(s.PropertyConfigKey.analyticsTag,e.analyticsTag),categoryTag:this.toAstProperty(s.PropertyConfigKey.categoryTag,e.categoryTag),topicTag:this.toAstProperty(s.PropertyConfigKey.topicTag,e.topicTag),altLangTag:this.toAstProperty(s.PropertyConfigKey.altLangTag,e.altLangTag),feedbackEngine:this.toAstProperty(s.PropertyConfigKey.feedbackEngine,e.feedbackEngine),feedbackType:this.toAstProperty(s.PropertyConfigKey.feedbackType,e.feedbackType),disableFeedback:this.toAstProperty(s.PropertyConfigKey.disableFeedback,e.disableFeedback),diffTo:this.toAstProperty(s.PropertyConfigKey.diffTo,e.diffTo),diffOp:this.toAstProperty(s.PropertyConfigKey.diffOp,e.diffOp),diffRef:this.toAstProperty(s.PropertyConfigKey.diffRef,e.diffRef),diffContext:this.toAstProperty(s.PropertyConfigKey.diffContext,e.diffContext),diffTime:this.toAstProperty(s.PropertyConfigKey.diffTime,e.diffTime),path:this.toAstProperty(s.PropertyConfigKey.path,e.path),releaseVersion:this.toAstProperty(s.PropertyConfigKey.releaseVersion,e.releaseVersion),releaseKind:this.toAstProperty(s.PropertyConfigKey.releaseKind,e.releaseKind),releaseDate:this.toAstProperty(s.PropertyConfigKey.releaseDate,e.releaseDate),book:this.buildBooks(C,e.book),ageRange:this.toAstProperty(s.PropertyConfigKey.ageRange,e.ageRange),lang:this.toAstProperty(s.PropertyConfigKey.lang,e.lang),language:this.toAstProperty(s.PropertyConfigKey.language,e.language),publisher:this.toAstProperty(s.PropertyConfigKey.publisher,e.publisher),publisherName:this.toAstProperty(s.PropertyConfigKey.publisherName,e.publisherName),theme:this.toAstProperty(s.PropertyConfigKey.theme,e.theme),computerLanguage:this.toAstProperty(s.PropertyConfigKey.computerLanguage,e.computerLanguage),target:this.toAstProperty(s.PropertyConfigKey.target,e.target),slug:this.toAstProperty(s.PropertyConfigKey.slug,e.slug),tag:this.toAstProperty(s.PropertyConfigKey.tag,e.tag),reductionTag:this.toAstProperty(s.PropertyConfigKey.reductionTag,e.reductionTag),bubbleTag:this.toAstProperty(s.PropertyConfigKey.bubbleTag,e.bubbleTag),levelCEFRp:this.toAstProperty(s.PropertyConfigKey.levelCEFRp,e.levelCEFRp),levelCEFR:this.toAstProperty(s.PropertyConfigKey.levelCEFR,e.levelCEFR),levelILR:this.toAstProperty(s.PropertyConfigKey.levelILR,e.levelILR),levelACTFL:this.toAstProperty(s.PropertyConfigKey.levelACTFL,e.levelACTFL),icon:this.toAstProperty(s.PropertyConfigKey.icon,e.icon),iconTag:this.toAstProperty(s.PropertyConfigKey.iconTag,e.iconTag),colorTag:this.toAstProperty(s.PropertyConfigKey.colorTag,e.colorTag),flashcardSet:this.toAstProperty(s.PropertyConfigKey.flashcardSet,e.flashcardSet),subtype:this.toAstProperty(s.PropertyConfigKey.subtype,e.subtype),bookAlias:this.toAstProperty(s.PropertyConfigKey.bookAlias,e.bookAlias),bookDiff:this.toAstProperty(s.PropertyConfigKey.bookDiff,e.bookDiff),coverImage:this.toAstProperty(s.PropertyConfigKey.coverImage,e.coverImage),coverColor:this.toAstProperty(s.PropertyConfigKey.coverColor,e.coverColor),publications:this.toAstProperty(s.PropertyConfigKey.publications,e.publications),author:this.toAstProperty(s.PropertyConfigKey.author,e.author),subject:this.toAstProperty(s.PropertyConfigKey.subject,e.subject),date:this.toAstProperty(s.PropertyConfigKey.date,e.date),dateEnd:this.toAstProperty(s.PropertyConfigKey.dateEnd,e.dateEnd),location:this.toAstProperty(s.PropertyConfigKey.location,e.location),kind:this.toAstProperty(s.PropertyConfigKey.kind,e.kind),hasMarkAsDone:this.toAstProperty(s.PropertyConfigKey.hasMarkAsDone,e.hasMarkAsDone),processHandIn:this.toAstProperty(s.PropertyConfigKey.processHandIn,e.processHandIn),processHandInLocation:this.toAstProperty(s.PropertyConfigKey.processHandInLocation,e.processHandInLocation),chatWithBook:this.toAstProperty(s.PropertyConfigKey.chatWithBook,e.chatWithBook),chatWithBookBrainKey:this.toAstProperty(s.PropertyConfigKey.chatWithBookBrainKey,e.chatWithBookBrainKey),action:this.toAstProperty(s.PropertyConfigKey.action,e.action),showInIndex:this.toAstProperty(s.PropertyConfigKey.showInIndex,e.showInIndex),refAuthor:this.toAstProperty(s.PropertyConfigKey.refAuthor,e.refAuthor),refBookTitle:this.toAstProperty(s.PropertyConfigKey.refBookTitle,e.refBookTitle),refPublisher:this.toAstProperty(s.PropertyConfigKey.refPublisher,e.refPublisher),refPublicationYear:this.toAstProperty(s.PropertyConfigKey.refPublicationYear,e.refPublicationYear),citationStyle:this.toAstProperty(s.PropertyConfigKey.citationStyle,e.citationStyle),blockId:this.toAstProperty(s.PropertyConfigKey.blockId,e.blockId),pageNo:this.toAstProperty(s.PropertyConfigKey.pageNo,e.pageNo),x:this.toAstProperty(s.PropertyConfigKey.x,e.x),y:this.toAstProperty(s.PropertyConfigKey.y,e.y),width:this.toAstProperty(s.PropertyConfigKey.width,e.width),height:this.toAstProperty(s.PropertyConfigKey.height,e.height),index:this.toAstProperty(s.PropertyConfigKey.index,e.index),classification:this.toAstProperty(s.PropertyConfigKey.classification,e.classification),availableClassifications:this.toAstProperty(s.PropertyConfigKey.availableClassifications,e.availableClassifications),allowedBit:this.toAstProperty(s.PropertyConfigKey.allowedBit,e.allowedBit),tableFixedHeader:this.toAstProperty(s.PropertyConfigKey.tableFixedHeader,e.tableFixedHeader),tableHeaderWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableHeaderWhitespaceNoWrap,e.tableHeaderWhitespaceNoWrap),tableSearch:this.toAstProperty(s.PropertyConfigKey.tableSearch,e.tableSearch),tableSort:this.toAstProperty(s.PropertyConfigKey.tableSort,e.tableSort),tablePagination:this.toAstProperty(s.PropertyConfigKey.tablePagination,e.tablePagination),tablePaginationLimit:this.toAstProperty(s.PropertyConfigKey.tablePaginationLimit,e.tablePaginationLimit),tableHeight:this.toAstProperty(s.PropertyConfigKey.tableHeight,e.tableHeight),tableWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableWhitespaceNoWrap,e.tableWhitespaceNoWrap),tableAutoWidth:this.toAstProperty(s.PropertyConfigKey.tableAutoWidth,e.tableAutoWidth),tableResizableColumns:this.toAstProperty(s.PropertyConfigKey.tableResizableColumns,e.tableResizableColumns),tableColumnMinWidth:this.toAstProperty(s.PropertyConfigKey.tableColumnMinWidth,e.tableColumnMinWidth),quizCountItems:this.toAstProperty(s.PropertyConfigKey.quizCountItems,e.quizCountItems),quizStrikethroughSolutions:this.toAstProperty(s.PropertyConfigKey.quizStrikethroughSolutions,e.quizStrikethroughSolutions),codeLineNumbers:this.toAstProperty(s.PropertyConfigKey.codeLineNumbers,e.codeLineNumbers),codeMinimap:this.toAstProperty(s.PropertyConfigKey.codeMinimap,e.codeMinimap),stripePricingTableId:this.toAstProperty(s.PropertyConfigKey.stripePricingTableId,e.stripePricingTableId),stripePublishableKey:this.toAstProperty(s.PropertyConfigKey.stripePublishableKey,e.stripePublishableKey),thumbImage:this.toAstProperty(s.PropertyConfigKey.thumbImage,e.thumbImage),scormSource:this.toAstProperty(s.PropertyConfigKey.scormSource,e.scormSource),posterImage:this.toAstProperty(s.PropertyConfigKey.posterImage,e.posterImage),focusX:this.toAstProperty(s.PropertyConfigKey.focusX,e.focusX),focusY:this.toAstProperty(s.PropertyConfigKey.focusY,e.focusY),pointerLeft:this.toAstProperty(s.PropertyConfigKey.pointerLeft,e.pointerLeft),pointerTop:this.toAstProperty(s.PropertyConfigKey.pointerTop,e.pointerTop),listItemIndent:this.toAstProperty(s.PropertyConfigKey.listItemIndent,e.listItemIndent),backgroundWallpaper:this.toImageResource(C,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(s.PropertyConfigKey.hasBookNavigation,e.hasBookNavigation),duration:this.toAstProperty(s.PropertyConfigKey.duration,e.duration),deeplink:this.toAstProperty(s.PropertyConfigKey.deeplink,e.deeplink),externalLink:this.toAstProperty(s.PropertyConfigKey.externalLink,e.externalLink),externalLinkText:this.toAstProperty(s.PropertyConfigKey.externalLinkText,e.externalLinkText),videoCallLink:this.toAstProperty(s.PropertyConfigKey.videoCallLink,e.videoCallLink),vendorDashboardId:this.toAstProperty(s.PropertyConfigKey.vendorDashboardId,e.vendorDashboardId),vendorSurveyId:this.toAstProperty(s.PropertyConfigKey.vendorSurveyId,e.vendorSurveyId),vendorUrl:this.toAstProperty(s.PropertyConfigKey.vendorUrl,e.vendorUrl),search:this.toAstProperty(s.PropertyConfigKey.search,e.search),list:this.toAstProperty(s.PropertyConfigKey.list,e.list),layer:this.toAstProperty(s.PropertyConfigKey.layer,e.layer),layerRole:this.toAstProperty(s.PropertyConfigKey.layerRole,e.layerRole),textReference:this.toAstProperty(s.PropertyConfigKey.textReference,e.textReference),isTracked:this.toAstProperty(s.PropertyConfigKey.isTracked,e.isTracked),isInfoOnly:this.toAstProperty(s.PropertyConfigKey.isInfoOnly,e.isInfoOnly),imageFirst:this.toAstProperty(s.PropertyConfigKey.imageFirst,e.imageFirst),activityType:this.toAstProperty(s.PropertyConfigKey.activityType,e.activityType),labelTrue:this.toAstProperty(s.PropertyConfigKey.labelTrue,e.labelTrue),labelFalse:this.toAstProperty(s.PropertyConfigKey.labelFalse,e.labelFalse),content2Buy:this.toAstProperty(s.PropertyConfigKey.content2Buy,e.content2Buy),mailingList:this.toAstProperty(s.PropertyConfigKey.mailingList,e.mailingList),buttonCaption:this.toAstProperty(s.PropertyConfigKey.buttonCaption,e.buttonCaption),callToActionUrl:this.toAstProperty(s.PropertyConfigKey.callToActionUrl,e.callToActionUrl),caption:this.handleJsonText(C,g.TextLocation.tag,e.caption),quotedPerson:this.toAstProperty(s.PropertyConfigKey.quotedPerson,e.quotedPerson),reasonableNumOfChars:k,resolved:this.toAstProperty(s.PropertyConfigKey.resolved,e.resolved),resolvedDate:this.toAstProperty(s.PropertyConfigKey.resolvedDate,e.resolvedDate),resolvedBy:this.toAstProperty(s.PropertyConfigKey.resolvedBy,e.resolvedBy),handInAcceptFileType:this.toAstProperty(s.PropertyConfigKey.handInAcceptFileType,e.handInAcceptFileType),handInRequirement:this.toAstProperty(s.PropertyConfigKey.handInRequirement,e.handInRequirement),handInInstruction:this.toAstProperty(s.PropertyConfigKey.handInInstruction,e.handInInstruction),maxCreatedBits:this.toAstProperty(s.PropertyConfigKey.maxCreatedBits,e.maxCreatedBits),maxDisplayLevel:this.toAstProperty(s.PropertyConfigKey.maxDisplayLevel,e.maxDisplayLevel),maxTocChapterLevel:this.toAstProperty(s.PropertyConfigKey.maxTocChapterLevel,e.maxTocChapterLevel),tocResource:this.toAstProperty(s.PropertyConfigKey.tocResource,e.tocResource),tocContent:this.toAstProperty(s.PropertyConfigKey.tocContent,e.tocContent),page:this.toAstProperty(s.PropertyConfigKey.page,e.page),productId:this.toAstProperty(s.PropertyConfigKey.productId,e.productId),product:this.toAstProperty(s.PropertyConfigKey.product,e.product),productList:this.toAstProperty(s.PropertyConfigKey.productList,e.productList),productVideo:this.toAstProperty(s.PropertyConfigKey.productVideo,e.productVideo),productVideoList:this.toAstProperty(s.PropertyConfigKey.productVideoList,e.productVideoList),productFolder:this.toAstProperty(s.PropertyConfigKey.productFolder,e.productFolder),technicalTerm:this.buildTechnicalTerm(C,e.technicalTerm),servings:this.buildServings(C,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(C,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(C,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(s.PropertyConfigKey.ratingLevelSelected,e.ratingLevelSelected),markConfig:this.buildMarkConfigs(C,e.markConfig),imageSource:this.buildImageSource(C,e.imageSource),person:this.buildPerson(C,e.person),bot:this.toAstProperty(s.PropertyConfigKey.bot,e.bot),referenceProperty:this.toAstProperty(s.PropertyConfigKey.property_reference,e.referenceProperty),title:this.handleJsonText(C,g.TextLocation.tag,e.title),subtitle:this.handleJsonText(C,g.TextLocation.tag,e.subtitle),level:m.NumberUtils.asNumber(e.level),toc:this.toAstProperty(s.PropertyConfigKey.toc,e.toc),progress:this.toAstProperty(s.PropertyConfigKey.progress,e.progress),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(s.PropertyConfigKey.revealSolutions,e.revealSolutions),item:this.handleJsonText(C,g.TextLocation.tag,e.item),lead:this.handleJsonText(C,g.TextLocation.tag,e.lead),pageNumber:this.handleJsonText(C,g.TextLocation.tag,e.pageNumber),marginNumber:this.handleJsonText(C,g.TextLocation.tag,e.marginNumber),hint:this.handleJsonText(C,g.TextLocation.tag,e.hint),instruction:this.handleJsonText(C,g.TextLocation.tag,e.instruction),partialAnswer:this.toAstProperty(s.PropertyConfigKey.partialAnswer,e.partialAnswer),sampleSolution:this.toAstProperty(s.PropertyConfigKey.property_sampleSolution,e.sampleSolution),additionalSolutions:this.toAstProperty(s.PropertyConfigKey.additionalSolutions,e.additionalSolutions)},this.toExample(e.__isDefaultExample,e.example)),{imagePlaceholder:this.toImageResource(C,e.imagePlaceholder),resources:d.ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(C,e.resources)),body:this.buildBody(C,e.body),cardNode:P,footer:this.buildFooter(C,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:null!==(r=e.__isDefaultExample)&&void 0!==r&&r});return a.Config.isOfBitType(K.bitType,l.BitType.interview)&&this.pushDownTree(C,void 0,void 0,P,"questions",s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),a.Config.isOfBitType(K.bitType,l.BitType.feedback)&&this.pushDownTree(C,void 0,void 0,P,["feedbacks","reason"],s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),this.pushDownTree(C,[K.body,...(null===(i=null==P?void 0:P.cardBits)||void 0===i?void 0:i.map((e=>e.body)))||[]],[p.BodyBitType.gap],void 0,void 0,s.PropertyConfigKey.isCaseSensitive,null===(o=e.isCaseSensitive)||void 0===o||o),this.pushDownTree(C,void 0,void 0,P,"pairs",s.PropertyConfigKey.isCaseSensitive,null===(n=e.isCaseSensitive)||void 0===n||n),this.pushDownTree(C,void 0,void 0,P,["matrix","cells"],s.PropertyConfigKey.isCaseSensitive,null===(T=e.isCaseSensitive)||void 0===T||T),this.pushExampleDownTree(C,K.body,P,K.__isDefaultExample,_.example),this.setDefaultBitValues(K),this.setIsExampleFlags(K),this.addVersionToParserInfo(K),h.ObjectUtils.removeUnwantedProperties(K,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),x.NodeValidator.validateBit(K)}buildBooks(e,t){if(b.StringUtils.isString(t))return t;if(!Array.isArray(t))return;const r=t.map((t=>this.buildBook(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildBook(e,t){var r,i,o;if(!t)return;const n={book:null!==(r=t.book)&&void 0!==r?r:"",reference:null!==(i=t.reference)&&void 0!==i?i:"",referenceEnd:null!==(o=t.referenceEnd)&&void 0!==o?o:void 0};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),n}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFeedbackChoice(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFeedbackChoice(e,t){var r;if(!t)return;const i=Object.assign({choice:null!==(r=t.choice)&&void 0!==r?r:"",requireReason:!!t.requireReason,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildFeedbackReason(e,t){var r,i;if(!t)return;const o=this.handleJsonText(e,g.TextLocation.tag,"true"),n=Object.assign(Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",reasonableNumOfChars:null!==(i=t.reasonableNumOfChars)&&void 0!==i?i:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,o)),{__textAst:t.__textAst});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),n}buildChoices(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildChoice(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildChoice(e,t){var r;if(!t)return;const i=Object.assign({choice:null!==(r=t.choice)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildResponses(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildResponse(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildResponse(e,t){var r;if(!t)return;const i=Object.assign({response:null!==(r=t.response)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),i}buildBotResponses(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.botResponse(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}botResponse(e,t){var r,i,o;if(!t)return;const n={response:null!==(r=t.response)&&void 0!==r?r:"",reaction:null!==(i=t.reaction)&&void 0!==i?i:"",feedback:null!==(o=t.feedback)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["response","reaction","feedback"],ignoreAllFalse:!0,ignoreEmptyArrays:["item"],ignoreUndefined:["example"]}),n}buildFeedbacks(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFeedback(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFeedback(e,t){if(!t)return;let r,i;if(!t.choices)return;r=this.buildFeedbackChoices(e,t.choices),t.reason&&(i=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),choices:r,reason:i};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildQuiz(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildQuiz(e,t){if(!t)return;const r=Object.assign({},this.toExample(t.__isDefaultExample,t.__defaultExample));let i,o;if(t.choices)i=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!0,i);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!1,o)}const n={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:!!t.__defaultExample,choices:i,responses:o};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),n}buildHeading(e,t){var r,i,o;if(!t)return;if(null==t.forKeys)return;const n={forKeys:null!==(r=t.forKeys)&&void 0!==r?r:"",forValues:null!==(o=null!==(i=t.forValues)&&void 0!==i?i:t.__forValuesDefault)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),n}buildPairs(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildPair(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildPair(e,t){var r;if(!t)return;const i=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,o=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),n=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),a=Object.assign(Object.assign({key:null!==(r=t.key)&&void 0!==r?r:"",keyAudio:o,keyImage:n,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,i)),{values:t.values||[],__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),a}buildMatricies(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildMatrix(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildMatrix(e,t){var r;if(!t)return;let i=!1;for(const e of t.cells||[])t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),i=!!e.isExample||i;const o={key:null!==(r=t.key)&&void 0!==r?r:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:i,cells:(t.cells||[]).map((t=>this.buildMatrixCell(e,t))).filter((e=>null!=e))};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),o}buildMatrixCell(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i=Object.assign(Object.assign({values:t.values||[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),i}buildPronunciationTable(e,t){if(!t)return;return{data:(t.data||[]).map((t=>(t||[]).map((t=>{const r=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,g.TextLocation.tag,t.title),body:this.handleJsonText(e,g.TextLocation.tag,t.body),audio:r}}))))}}buildTable(e,t){if(!t)return;return{columns:(t.columns||[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t))),data:(t.data||[]).map((t=>(t||[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t)))))}}buildQuestions(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildQuestion(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildQuestion(e,t){var r,i,o,n,a;if(!t)return;const s=t.__sampleSolutionAst,l=Object.assign(Object.assign({question:null!==(r=t.question)&&void 0!==r?r:"",partialAnswer:null!==(i=t.partialAnswer)&&void 0!==i?i:"",sampleSolution:null!==(o=t.sampleSolution)&&void 0!==o?o:"",additionalSolutions:null!==(n=t.additionalSolutions)&&void 0!==n?n:void 0,reasonableNumOfChars:null!==(a=t.reasonableNumOfChars)&&void 0!==a?a:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,s)),{__sampleSolutionAst:t.__sampleSolutionAst});return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["question","partialAnswer","sampleSolution"]}),l}buildIngredients(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildIngredient(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildIngredient(e,t){var r,i,o,n,a,s;if(!t)return;const l={title:this.handleJsonText(e,g.TextLocation.tag,t.title),checked:null!==(r=t.checked)&&void 0!==r&&r,ingredient:this.handleJsonText(e,g.TextLocation.tag,t.ingredient),quantity:null!==(i=t.quantity)&&void 0!==i?i:0,unit:null!==(o=t.unit)&&void 0!==o?o:"",unitAbbr:null!==(n=t.unitAbbr)&&void 0!==n?n:"",decimalPlaces:null!==(a=t.decimalPlaces)&&void 0!==a?a:1,disableCalculation:null!==(s=t.disableCalculation)&&void 0!==s&&s,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),l}buildBody(e,t){if(!t)return;let r;const i=[],a=t.placeholders,s=t.bodyString,{textFormat:l}=e,c=()=>{var s;let c,u=t.body;const y={};if(b.StringUtils.isString(t.body)?(c=(null!==(s=t.body)&&void 0!==s?s:"").trim(),u=[]):Array.isArray(t.body)||(u=[]),a)for(const[e,t]of Object.entries(a))y[e]=t;if(c){c=n.Breakscape.breakscape(c,{format:l,location:g.TextLocation.body,v2:!0});let e=0;const t=[];for(const[r,i]of Object.entries(y))if(c){const o=`[!${e}]`;c=c.replace(`${r}`,o),t.push(i),e++}u=this.textParser.toAst(c,{format:l,location:g.TextLocation.body});const r=e=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if("bit"===o.type){const r=o.index;null!=t[r]&&(e[i]=t[r])}else o.content&&r(o.content)}};r(u)}u=(0,o.default)(u),this.textParser.walkBodyBits(u,((t,r,o)=>{let n;switch(o.type){case p.BodyBitType.gap:n=this.buildGap(e,o);break;case p.BodyBitType.mark:n=this.buildMark(e,o);break;case p.BodyBitType.select:n=this.buildSelect(e,o);break;case p.BodyBitType.highlight:n=this.buildHighlight(e,o)}null!=n&&(t[r]=n,i.push(n))})),r=u,r.__tag="text"},u=l===y.TextFormat.bitmarkText;l===y.TextFormat.json?(()=>{if("string"==typeof t.body)try{r=JSON.parse(t.body)}catch(e){r=null}else r=t.body})():u?c():r=t.body;return{body:r,bodyBits:i,bodyString:s}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,g.TextLocation.body,t.footer)}}buildGap(e,t){if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const i=Object.assign(Object.assign({type:p.BodyBitType.gap,solutions:t.solutions||[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__solutionsAst:t.__solutionsAst,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),i}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildMarkConfig(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildMarkConfig(e,t){var r,i,o;if(!t)return;const n={mark:null!==(r=t.mark)&&void 0!==r?r:"unknown",color:null!==(i=t.color)&&void 0!==i?i:"",emphasis:null!==(o=t.emphasis)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllEmptyString:!0}),n}buildMark(e,t){var r,i;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.mark,solution:null!==(r=t.solution)&&void 0!==r?r:"",mark:null!==(i=t.mark)&&void 0!==i?i:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),o}buildSelect(e,t){var r,i;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.select,options:this.buildSelectOptions(e,t.options)||[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(i=t.postfix)&&void 0!==i?i:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),o}buildSelectOptions(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildSelectOption(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildSelectOption(e,t){var r;if(!t)return;const i=Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),i}buildHighlight(e,t){var r,i;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.highlight,texts:this.buildHighlightTexts(e,t.texts)||[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(i=t.postfix)&&void 0!==i?i:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),o}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildHighlightText(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildHighlightText(e,t){var r;if(!t)return;const i=Object.assign({text:null!==(r=t.text)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),i}buildFlashcards(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildFlashcard(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildFlashcard(e,t){if(!t)return;const r=Object.assign({question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(t.alternativeAnswers||[]).map((t=>this.buildTextAndIcon(e,t))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildDefinitionListItem(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildDefinitionListItem(e,t){if(!t)return;const{bitType:r}=e,i=a.Config.isOfBitType(r,[l.BitType.metaSearchDefaultTerms]),o=Object.assign({term:this.buildTextAndIcon(e,t.term,i),definition:this.buildTextAndIcon(e,t.definition,i),alternativeDefinitions:(t.alternativeDefinitions||[]).map((t=>this.buildTextAndIcon(e,t,i))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),o}buildTextAndIcon(e,t,r=!1){const i=this.resourceBuilder.resourceFromResourceJson(e,null==t?void 0:t.icon);let o=this.handleJsonText(e,g.TextLocation.tag,(null==t?void 0:t.text)||t);r&&(o=this.textGenerator.generateSync(o,y.TextFormat.plainText,g.TextLocation.body,{noBreakscaping:!0}).trim());const n={text:o,icon:i};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),n}buildStatements(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildStatement(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildStatement(e,t){var r;if(!t)return;const i=Object.assign({statement:null!==(r=t.statement)&&void 0!==r?r:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),i}buildImageSource(e,t){if(!t)return;const{url:r,mockupId:i,size:o,format:n,trim:a}=t,s={url:null!=r?r:"",mockupId:null!=i?i:"",size:null!=o?o:null,format:null!=n?n:null,trim:f.BooleanUtils.isBoolean(a)?a:null};return h.ObjectUtils.removeUnwantedProperties(s,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),s}buildPerson(e,t){if(!t)return;const{name:r,title:i,avatarImage:o}=t,n={name:null!=r?r:"",title:null!=i?i:void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),n}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:r,lang:i}=t,o={technicalTerm:null!=r?r:"",lang:null!=i?i:""};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:r,unit:i,unitAbbr:o,decimalPlaces:n,disableCalculation:a,hint:s}=t,l={servings:null!=r?r:0,unit:null!=i?i:"",unitAbbr:null!=o?o:"",decimalPlaces:null!=n?n:1,disableCalculation:null!=a&&a,hint:null!=s?s:""};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreEmptyString:["servings","unit"]}),l}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:r,label:i}=t,o={level:null!=r?r:0,label:this.handleJsonText(e,g.TextLocation.tag,i)};return h.ObjectUtils.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const r=t.map((t=>this.buildCardBit(e,t))).filter((e=>null!=e));return r.length>0?r:void 0}buildCardBit(e,t){if(!t)return;const{bitType:r,textFormat:i}=e,o=this.buildBit(Object.assign(Object.assign({},t),{bitType:r,textFormat:i}));return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),x.NodeValidator.validateCardBit(o)}toImageResource(e,t){return d.ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,u.ResourceTag.image,null==t?void 0:t.image))}buildCardNode(e,t){var r;const i={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:t.elements,flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,null!==(r=t.definitions)&&void 0!==r?r:t.legend),statement:this.buildStatement(e,t.statement),statements:this.buildStatements(e,t.statements),choices:this.buildChoices(e,t.choices),responses:this.buildResponses(e,t.responses),feedbacks:this.buildFeedbacks(e,t.feedbacks),quizzes:this.buildQuizzes(e,t.quizzes),pairs:this.buildPairs(e,t.pairs),matrix:this.buildMatricies(e,t.matrix),pronunciationTable:this.buildPronunciationTable(e,t.pronunciationTable),table:this.buildTable(e,t.table),botResponses:this.buildBotResponses(e,t.botResponses),ingredients:this.buildIngredients(e,t.ingredients),cardBits:this.buildCardBits(e,t.cardBits)};return h.ObjectUtils.removeUnwantedProperties(i),Object.keys(i).length>0?i:void 0}bodyBitCopyFromAttrs(e){const t=Object.assign({},e);if(e.attrs)for(const[r,i]of Object.entries(e.attrs))t[r]=i;return t}pushExampleDownTree(e,t,r,i,o){if(i||null!=o){if(r){if(this.pushExampleDownTreeString(e,i,o,r.pairs),this.pushExampleDownTreeBoolean(e,i,o,!1,r.flashcards),this.pushExampleDownTreeBoolean(e,i,o,!1,r.definitions),this.pushExampleDownTreeBoolean(e,i,o,!0,r.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,r.responses,r.statements,r.statement),r.quizzes)for(const t of r.quizzes)this.pushExampleDownTreeBoolean(e,i,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,t.responses);if(r.matrix)for(const t of r.matrix)this.pushExampleDownTreeString(e,i,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,i,o,t)}}pushExampleDownTreeBoolean(e,t,r,i,...o){if((t||null!=r)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];T.BitUtils.fillBooleanExample(o,t,r,i)}}pushExampleDownTreeString(e,t,r,...i){if((t||r)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];T.BitUtils.fillStringExample(e.textFormat,i,t,r,!1)}}pushExampleDownTreeBodyBits(e,t,r,i){if(!t&&!r)return;const o=this.textParser.extractBodyBits(null==i?void 0:i.body);for(const i of o)if(i)switch(i.type){case p.BodyBitType.gap:{const o=i;T.BitUtils.fillStringExample(e.textFormat,[o],t,r,!1);break}case p.BodyBitType.mark:{const e=i;T.BitUtils.fillBooleanExample([e],t,r,!1);break}case p.BodyBitType.select:{const e=i;T.BitUtils.fillBooleanExample(e.options,t,r,!0);break}case p.BodyBitType.highlight:{const e=i;T.BitUtils.fillBooleanExample(e.texts,t,r,!0);break}}}pushDownTree(e,t,r,i,o,n,a){if(void 0!==a){if(i&&o){Array.isArray(o)||(o=[o]);const e=h.ObjectUtils.flatMapPath(i,o);for(const t of e)null==t[n]&&(t[n]=a)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&r){const e=this.textParser.extractBodyBits(t.body);if(r&&e&&e.length>0)for(const t of e)if(t&&-1!==r.indexOf(t.type)){const e=t;null==e[n]&&(e[n]=a)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const r={};for(const[e,i]of t)r[e]=d.ArrayUtils.asArray(i)||[i];return r}setIsExampleFlags(e){const t=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:r,cardNode:i}=e,o=this.textParser.extractBodyBits(null==r?void 0:r.body);for(const e of o)switch(e.type){case p.BodyBitType.gap:case p.BodyBitType.mark:t(e);break;case p.BodyBitType.select:{const r=e;let i=!1;for(const e of r.options)i=!!t(e)||i;r.isExample=i;break}case p.BodyBitType.highlight:{const r=e;let i=!1;for(const e of r.texts)i=!!t(e)||i;r.isExample=i;break}}if(i){for(const e of i.flashcards||[])t(e);for(const e of i.definitions||[])t(e);for(const e of i.pairs||[])t(e);for(const e of i.matrix||[]){let r=!1;for(const i of e.cells||[])r=!!t(i)||r;e.isExample=r}for(const e of i.quizzes||[]){let r=!1;for(const i of e.responses||[])r=!!t(i)||r;for(const i of e.choices||[])r=!!t(i)||r;e.isExample=r}for(const e of i.responses||[])t(e);for(const e of i.choices||[])t(e);for(const e of i.statements||[])t(e);t(i.statement);for(const e of i.questions||[])t(e)}t(e.statement);for(const r of e.responses||[])t(r);for(const r of e.choices||[])t(r);t(e)}setDefaultBitValues(e){switch(e.bitType){case l.BitType.articleAi:case l.BitType.noteAi:case l.BitType.summaryAi:e.aiGenerated=this.toAstProperty(s.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const r=null!==(t=e.parser)&&void 0!==t?t:{};r.version=B.env.appVersion.full,e.parser=r}}t.Builder=P},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let r="",i=0,o=0;for(const e of this.variants){for(const n of e)r+=`[Card - Side ${i}, Variant ${o}]`,r+=`\n${n.toString(t)}`,o++;i++}return r}}},5837:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const i=r(7112),o=r(6915),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(3778),c=r(6149),u={[i.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplateStripTheme},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.machineTranslated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.searchIndex,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.analyticsTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.categoryTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.topicTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.altLangTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackEngine},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackType},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableFeedback},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffOp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffRef},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffContext},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTime},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reductionTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bubbleTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFRp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelILR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelACTFL},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layer,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layerRole,maxCount:p.Count.infinity}]},[i.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[i.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[i.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},[i.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[i.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[i.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]}]},[i.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[i.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[i.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerExternalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandIn},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandInLocation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTemplateStripTheme},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBook},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBookBrainKey},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[i.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.dateEnd},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[i.GroupConfigKey.group_quizCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.revealSolutions}]},[i.GroupConfigKey.group_resourceBitTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePlaceholder,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}],maxCount:1}]},[i.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[i.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[i.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[i.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[i.GroupConfigKey.group_resourceIcon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.icon,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[i.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=u},5854:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const i=(0,r(4718).superenum)({_error:"_error",_comment:"_comment",_standard:"_standard",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCodeCell:"app-code-cell",appCodeEditor:"app-code-editor",appCodeIde:"app-code-ide",appCreateBitsFromImage:"app-create-bits-from-image",appFlashcards:"app-flashcards",appFlashcardsLearn:"app-flashcards-learn",appFlashcardsQuiz:"app-flashcards-quiz",appGetScreenshot:"app-get-screenshot",appLink:"app-link",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",articleResponsive:"article-responsive",articleResponsiveAlt:"article-responsive-alt",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgements:"book-acknowledgements",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookClose:"book-close",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookCover:"book-cover",bookDedication:"book-dedication",bookDiff:"book-diff",bookEnd:"book-end",bookEndnotes:"book-endnotes",bookEpigraph:"book-epigraph",bookEpilogue:"book-epilogue",bookForword:"book-foreword",bookFrontispiece:"book-frontispiece",bookImprint:"book-imprint",bookIncitingIncident:"book-inciting-incident",bookIntroduction:"book-introduction",bookLink:"book-link",bookLinkNext:"book-link-next",bookLinkPrev:"book-link-prev",bookListOfContributors:"book-list-of-contributors",bookNotes:"book-notes",bookPostscript:"book-postscript",bookPreface:"book-preface",bookPrologue:"book-prologue",bookReadMore:"book-read-more",bookReference:"book-reference",bookReferenceList:"book-reference-list",bookRequestForABookReview:"book-request-for-a-book-review",bookSummary:"book-summary",bookTeaser:"book-teaser",bookTitle:"book-title",botActionAnnounce:"bot-action-announce",botActionRatingNumber:"bot-action-rating-number",botActionRemind:"bot-action-remind",botActionResponse:"bot-action-response",botActionSave:"bot-action-save",botActionSend:"bot-action-send",botActionTrueFalse:"bot-action-true-false",botInterview:"bot-interview",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",callToAction:"call-to-action",callToActionBookNow:"call-to-action-book-now",callToActionContact:"call-to-action-contact",callToActionCreateAccount:"call-to-action-create-account",callToActionDownload:"call-to-action-download",callToActionGetNow:"call-to-action-get-now",callToActionGetOffer:"call-to-action-get-offer",callToActionJoin:"call-to-action-join",callToActionLearnMore:"call-to-action-learn-more",callToActionMail:"call-to-action-mail",callToActionSeeMore:"call-to-action-see-more",callToActionShopNow:"call-to-action-shop-now",callToActionStartNow:"call-to-action-start-now",callToActionSubscribe:"call-to-action-subscribe",callToActionWatch:"call-to-action-watch",card1:"card-1",chapter:"chapter",chapterSubjectMatter:"chapter-subject-matter",chat:"chat",checklist:"checklist",cloze:"cloze",clozeAndMultipleChoiceText:"cloze-and-multiple-choice-text",clozeInstructionGrouped:"cloze-instruction-grouped",clozeList:"cloze-list",clozeSeveral:"cloze-several",clozeSolutionGrouped:"cloze-solution-grouped",coachAudioTranscript:"coach-audio-transcript",coachCallToActionChecklist:"coach-call-to-action-checklist",coachCallToActionCloze:"coach-call-to-action-cloze",coachCallToActionClozeAndMultipleChoiceText:"coach-call-to-action-cloze-and-multiple-choice-text",coachCallToActionEssay:"coach-call-to-action-essay",coachCallToActionMultipleChoiceText:"coach-call-to-action-multiple-choice-text",coachHomeRules:"coach-home-rules",coachSelfReflectionCloze:"coach-self-reflection-cloze",coachSelfReflectionEssay:"coach-self-reflection-essay",coachSelfReflectionMultipleChoice:"coach-self-reflection-multiple-choice",coachSelfReflectionMultipleChoice1:"coach-self-reflection-multiple-choice-1",coachSelfReflectionMultipleChoiceText:"coach-self-reflection-multiple-choice-text",coachSelfReflectionMultipleResponse:"coach-self-reflection-multiple-response",coachSelfReflectionMultipleResponse1:"coach-self-reflection-multiple-response-1",coachSelfReflectionRating:"coach-self-reflection-rating",coachVideoTranscript:"coach-video-transcript",code:"code",codeRuntime:"code-runtime",collapsible:"collapsible",conclusion:"conclusion",conclusionAlt:"conclusion-alt",consoleLog:"console-log",container:"container",containerAccordionTabs:"container-accordion-tabs",containerBits2:"container-bits-2",containerCards:"container-cards",containerCarousel:"container-carousel",containerCookRecipe:"container-cook-recipe",containerFolder:"container-folder",containerFolderAll:"container-folder-all",containerGallery:"container-gallery",containerGrid:"container-grid",containerGroup:"container-group",containerNewsArticle:"container-news-article",containerNowrap:"container-nowrap",containerNowrapStretch:"container-nowrap-stretch",containerPreview:"container-preview",containerScroller:"container-scroller",containerSlides:"container-slides",containerStack:"container-stack",containerTabs:"container-tabs",containerWrap:"container-wrap",conversationLeft1:"conversation-left-1",conversationLeft1Scream:"conversation-left-1-scream",conversationLeft1Thought:"conversation-left-1-thought",conversationRight1:"conversation-right-1",conversationRight1Scream:"conversation-right-1-scream",conversationRight1Thought:"conversation-right-1-thought",clozeAndMultipleChoiceTextConversationLeft1:"cloze-and-multiple-choice-text-conversation-left-1",clozeAndMultipleChoiceTextConversationLeft1Scream:"cloze-and-multiple-choice-text-conversation-left-1-scream",clozeAndMultipleChoiceTextConversationLeft1Thought:"cloze-and-multiple-choice-text-conversation-left-1-thought",clozeAndMultipleChoiceTextConversationRight1:"cloze-and-multiple-choice-text-conversation-right-1",clozeAndMultipleChoiceTextConversationRight1Scream:"cloze-and-multiple-choice-text-conversation-right-1-scream",clozeAndMultipleChoiceTextConversationRight1Thought:"cloze-and-multiple-choice-text-conversation-right-1-thought",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",cookNoteOnQuantity:"cook-note-on-quantity",cookPersonalRecommendation:"cook-personal-recommendation",cookPlate:"cook-plate",cookPracticeAdvise:"cook-practice-advise",cookPreparation:"cook-preparation",cookRecommendation:"cook-recommendation",cookRemark:"cook-remark",cookSideDish:"cook-side-dish",cookSideDrink:"cook-side-drink",cookStep:"cook-step",cookTimer:"cook-timer",cookVariation:"cook-variation",correction:"correction",danger:"danger",dangerAlt:"danger-alt",dangerCollapsible:"danger-collapsible",definitionList:"definition-list",definitionTerm:"definition-term",deleted:"deleted",details:"details",details1:"details-1",detailsImage:"details-image",diff:"diff",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleAlt:"example-alt",exampleCollapsible:"example-collapsible",exampleList:"example-list",extractorAiChat:"extractor-ai-chat",extractorBlock:"extractor-block",extractorConfiguration:"extractor-configuration",extractorInformation:"extractor-information",extractorPage:"extractor-page",extractorPageCollapsible:"extractor-page-collapsible",extractorPageFooter:"extractor-page-footer",extractorPageFooterCollapsible:"extractor-page-footer-collapsible",extractorPageHeader:"extractor-page-header",extractorPageHeaderCollapsible:"extractor-page-header-collapsible",extractorPageNumber:"extractor-page-number",extractorPageNumberCollapsible:"extractor-page-number-collapsible",extractorPageWithBlocks:"extractor-page-with-blocks",extractorPageWithBlocksCollapsible:"extractor-page-with-blocks-collapsible",extractorRepeatedText:"extractor-repeated-text",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formula:"formula",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",glossaryTerm:"glossary-term",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInFeedbackExpert:"hand-in-feedback-expert",handInFeedbackSelf:"hand-in-feedback-self",handInFile:"hand-in-file",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",helpAlt:"help-alt",highlightText:"highlight-text",hint:"hint",hintAlt:"hint-alt",hintCollapsible:"hint-collapsible",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",imageFigureAlt:"image-figure-alt",imageLandscape:"image-landscape",imageLink:"image-link",imageMood:"image-mood",imageOnDevice:"image-on-device",imagePortrait:"image-portrait",imagePrototype:"image-prototype",imageResponsive:"image-responsive",imageScreenshot:"image-screenshot",imageSeparator:"image-separator",imageSeparatorAlt:"image-separator-alt",imagesLogoGrave:"images-logo-grave",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",indexTerm:"index-term",info:"info",infoAlt:"info-alt",infoCollapsible:"info-collapsible",internalLink:"internal-link",interview:"interview",interviewInstructionGrouped:"interview-instruction-grouped",langAudioScript:"lang-audio-script",langEnablingLanguageSkills:"lang-enabling-language-skills",langEnglishAroundWorld:"lang-english-around-world",langExtraActivity:"lang-extra-activity",langGoodToKnow:"lang-good-to-know",langHomework:"lang-homework",langLearningGoal:"lang-learning-goal",langLearningOutcomes:"lang-learning-outcomes",langLearningStrategy:"lang-learning-strategy",langLevelDown:"lang-level-down",langLevelUp:"lang-level-up",langLifeSkillIcon:"lang-life-skill-icon",langLifeSkills:"lang-life-skills",langLikeALocal:"lang-like-a-local",langMaterial:"lang-material",langTeacherNote:"lang-teacher-note",langTeacherPronunciation:"lang-teacher-pronunciation",langUsefulPhrases:"lang-useful-phrases",langVideoScript:"lang-video-script",langVocabulary:"lang-vocabulary",learningDocumentationFeedback:"learning-documentation-feedback",learningPathBook:"learning-path-book",learningPathBotTraining:"learning-path-bot-training",learningPathClassroomEvent:"learning-path-classroom-event",learningPathClassroomTraining:"learning-path-classroom-training",learningPathClosing:"learning-path-closing",learningPathExternalLink:"learning-path-external-link",learningPathFeedback:"learning-path-feedback",learningPathLearningGoal:"learning-path-learning-goal",learningPathLti:"learning-path-lti",learningPathSign:"learning-path-sign",learningPathStep:"learning-path-step",learningPathVideoCall:"learning-path-video-call",leAssignment:"le-assignment",leClassroomEvent:"le-classroom-event",leCompletion:"le-completion",leExternalLink:"le-external-link",leFinishingTask:"le-finishing-task",leFollowUpTask:"le-follow-up-task",leMultiDayEvent:"le-multi-day-event",legend:"legend",leDocumentDownload:"le-document-download",leLearningObjectives:"le-learning-objectives",leLearningStep:"le-learning-step",leListenAudioEmbed:"le-listen-audio-embed",lePreparationTask:"le-preparation-task",leRead:"le-read",leReadBook:"le-read-book",leTask:"le-task",leTodo:"le-todo",leVideoCall:"le-video-call",leWatchVideoEmbed:"le-watch-video-embed",lifeSkillSticker:"life-skill-sticker",list:"list",listItem:"list-item",mark:"mark",match:"match",matchAll:"match-all",matchAllReverse:"match-all-reverse",matchAudio:"match-audio",matchMatrix:"match-matrix",matchPicture:"match-picture",matchReverse:"match-reverse",matchSolutionGrouped:"match-solution-grouped",message:"message",metalevelExplanation:"metalevel-explanation",metaSearchDefaultTerms:"meta-search-default-terms",metaSearchDefaultTopics:"meta-search-default-topics",milestone:"milestone",module:"module",moduleProduct:"module-product",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",page:"page",pageAcademy:"page-academy",pageArticle:"page-article",pageArticleAlt:"page-article-alt",pageArticleResponsive:"page-article-responsive",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonAlt:"page-buy-button-alt",pageBuyButtonPromotion:"page-buy-button-promotion",pageCategory:"page-category",pageCollapsible:"page-collapsible",pageContainer:"page-container",pageContainerFolder:"page-container-folder",pageContainerGroup:"page-container-group",pageContainerNowrap:"page-container-nowrap",pageContainerNowrapStretch:"page-container-nowrap-stretch",pageContainerWrap:"page-container-wrap",pageCoverImage:"page-cover-image",pageFooter:"page-footer",pageHero:"page-hero",pageOpenBook:"page-open-book",pageOpenBookList:"page-open-book-list",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pagePromotion:"page-promotion",pageSectionFolder:"page-section-folder",pageShopInShop:"page-shop-in-shop",pageSpecial:"page-special",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platformPath:"platform-path",preparationNote:"preparation-note",pronunciationTable:"pronunciation-table",prototypeImages:"prototype-images",qAndA:"q-and-a",qAndACard:"q-and-a-card",question1:"question-1",quote:"quote",rating:"rating",recipe:"recipe",recordAudio:"record-audio",recordVideo:"record-video",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",remarkAlt:"remark-alt",remarkCollapsible:"remark-collapsible",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewCustomerNote:"review-customer-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",separatorAlt:"separator-alt",sequence:"sequence",sideNote:"side-note",sideNoteCollapsible:"side-note-collapsible",smartStandardArticleNonNormative:"smart-standard-article-non-normative",smartStandardArticleNonNormativeCollapsible:"smart-standard-article-non-normative-collapsible",smartStandardArticleNormative:"smart-standard-article-normative",smartStandardArticleNormativeCollapsible:"smart-standard-article-normative-collapsible",smartStandardExampleNonNormative:"smart-standard-example-non-normative",smartStandardExampleNonNormativeCollapsible:"smart-standard-example-non-normative-collapsible",smartStandardExampleNormative:"smart-standard-example-normative",smartStandardExampleNormativeCollapsible:"smart-standard-example-normative-collapsible",smartStandardFormula:"smart-standard-formula",smartStandardFormulaNonNormative:"smart-standard-formula-non-normative",smartStandardFormulaNormative:"smart-standard-formula-normative",smartStandardImageFigureNonNormative:"smart-standard-image-figure-non-normative",smartStandardImageFigureNonNormativeCollapsible:"smart-standard-image-figure-non-normative-collapsible",smartStandardImageFigureNormative:"smart-standard-image-figure-normative",smartStandardImageFigureNormativeCollapsible:"smart-standard-image-figure-normative-collapsible",smartStandardLegend:"smart-standard-legend",smartStandardLegendNonNormative:"smart-standard-legend-non-normative",smartStandardLegendNormative:"smart-standard-legend-normative",smartStandardList:"smart-standard-list",smartStandardListCollapsible:"smart-standard-list-collapsible",smartStandardListItem:"smart-standard-list-item",smartStandardListItemCollapsible:"smart-standard-list-item-collapsible",smartStandardNoteNonNormative:"smart-standard-note-non-normative",smartStandardNoteNonNormativeCollapsible:"smart-standard-note-non-normative-collapsible",smartStandardNoteNormative:"smart-standard-note-normative",smartStandardNoteNormativeCollapsible:"smart-standard-note-normative-collapsible",smartStandardRemarkLegend:"smart-standard-remark-legend",smartStandardRemarkLegendNonNormative:"smart-standard-remark-legend-non-normative",smartStandardRemarkLegendNormative:"smart-standard-remark-legend-normative",smartStandardRemarkFormula:"smart-standard-remark-formula",smartStandardRemarkFormulaNonNormative:"smart-standard-remark-formula-non-normative",smartStandardRemarkFormulaNormative:"smart-standard-remark-formula-normative",smartStandardRemarkNonNormative:"smart-standard-remark-non-normative",smartStandardRemarkNonNormativeCollapsible:"smart-standard-remark-non-normative-collapsible",smartStandardRemarkNormative:"smart-standard-remark-normative",smartStandardRemarkNormativeCollapsible:"smart-standard-remark-normative-collapsible",smartStandardRemarkTableImageNonNormative:"smart-standard-remark-table-image-non-normative",smartStandardRemarkTableImageNonNormativeCollapsible:"smart-standard-remark-table-image-non-normative-collapsible",smartStandardRemarkTableImageNormative:"smart-standard-remark-table-image-normative",smartStandardRemarkTableImageNormativeCollapsible:"smart-standard-remark-table-image-normative-collapsible",smartStandardRemarkTableNonNormative:"smart-standard-remark-table-non-normative",smartStandardRemarkTableNonNormativeCollapsible:"smart-standard-remark-table-non-normative-collapsible",smartStandardRemarkTableNormative:"smart-standard-remark-table-normative",smartStandardRemarkTableNormativeCollapsible:"smart-standard-remark-table-normative-collapsible",smartStandardTableImageNonNormative:"smart-standard-table-image-non-normative",smartStandardTableImageNonNormativeCollapsible:"smart-standard-table-image-non-normative-collapsible",smartStandardTableImageNormative:"smart-standard-table-image-normative",smartStandardTableImageNormativeCollapsible:"smart-standard-table-image-normative-collapsible",smartStandardTableNonNormative:"smart-standard-table-non-normative",smartStandardTableNonNormativeCollapsible:"smart-standard-table-non-normative-collapsible",smartStandardTableNormative:"smart-standard-table-normative",smartStandardTableNormativeCollapsible:"smart-standard-table-normative-collapsible",standardArticleNonNormative:"standard-article-non-normative",standardArticleNormative:"standard-article-normative",standardExampleNonNormative:"standard-example-non-normative",standardExampleNormative:"standard-example-normative",standardImageFigureNonNormative:"standard-image-figure-non-normative",standardImageFigureNormative:"standard-image-figure-normative",standardList:"standard-list",standardListItem:"standard-list-item",standardNoteNonNormative:"standard-note-non-normative",standardNoteNormative:"standard-note-normative",standardRemarkNonNormative:"standard-remark-non-normative",standardRemarkNormative:"standard-remark-normative",standardRemarkTableImageNonNormative:"standard-remark-table-image-non-normative",standardRemarkTableImageNormative:"standard-remark-table-image-normative",standardRemarkTableNonNormative:"standard-remark-table-non-normative",standardRemarkTableNormative:"standard-remark-table-normative",standardTableImageNonNormative:"standard-table-image-non-normative",standardTableImageNormative:"standard-table-image-normative",standardTableNonNormative:"standard-table-non-normative",standardTableNormative:"standard-table-normative",statement:"statement",stdout:"stdout",step:"step",stepImageScreenshot:"step-image-screenshot",stepImageScreenshotWithPointer:"step-image-screenshot-with-pointer",sticker:"sticker",stickyNote:"sticky-note",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",summary:"summary",summaryAi:"summary-ai",survey:"survey",survey1:"survey-1",surveyAnonymous:"survey-anonymous",surveyAnonymous1:"survey-anonymous-1",surveyMatrix:"survey-matrix",surveyMatrixMe:"survey-matrix-me",surveyRating:"survey-rating",surveyRatingDisplay:"survey-rating-display",surveyRatingOnce:"survey-rating-once",table:"table",tableAlt:"table-alt",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",tocResource:"toc-resource",tocContent:"toc-content",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboardEmbed:"vendor-datadog-dashboard-embed",vendorFormbricksEmbed:"vendor-formbricks-embed",vendorFormbricksLink:"vendor-formbricks-link",vendorFormbricksEmbedAnonymous:"vendor-formbricks-embed-anonymous",vendorFormbricksLinkAnonymous:"vendor-formbricks-link-anonymous",vendorHighchartsChart:"vendor-highcharts-chart",vendorIframelyCard:"vendor-iframely-card",vendorIframelyEmbed:"vendor-iframely-embed",vendorIframelyPreview:"vendor-iframely-preview",vendorIframelyPreviewMini:"vendor-iframely-preview-mini",vendorJupyterCellCode:"vendor-jupyter-cell-code",vendorJupyterCellMarkdown:"vendor-jupyter-cell-markdown",vendorJupyterCellRaw:"vendor-jupyter-cell-raw",vendorJupyterIpynb:"vendor-jupyter-ipynb",vendorJupyterOutput:"vendor-jupyter-output",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",video:"video",videoEmbed:"video-embed",videoEmbedLandscape:"video-embed-landscape",videoEmbedPortrait:"video-embed-portrait",videoLandscape:"video-landscape",videoLink:"video-link",videoLinkLandscape:"video-link-landscape",videoLinkPortrait:"video-link-portrait",videoPortrait:"video-portrait",videoTranscript:"video-transcript",warning:"warning",warningAlt:"warning-alt",warningCollapsible:"warning-collapsible",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=i},5980:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=function(e,t,r,o){const{value:n}=r;i.StringUtils.isString(n)&&(o.solution=i.StringUtils.trimmedString(n))};const i=r(9681)},6128:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProcessorUtils=void 0;const i=r(9554);const o=new class{concatenatePlainTextWithAstTexts(e,t,r){var o;if(Array.isArray(e)){if(r=r&&r.trim()){const n=r.split("\n"),a=[];for(let e=0;e<t;e++)a.push({type:i.TextNodeType.hardBreak});for(let e=0;e<n.length;e++){const t=n[e];t&&a.push({text:t,type:i.TextNodeType.text}),e<n.length-1&&a.push({type:i.TextNodeType.hardBreak})}const s=e[e.length-1];s&&s.type===i.TextNodeType.paragraph?s.content=[...null!==(o=s.content)&&void 0!==o?o:[],...a]:e.push({type:i.TextNodeType.paragraph,content:a,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=r?r:""}`}};t.ContentProcessorUtils=o},6132:function(e,t,r){var i,o=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=i(e),a=0;a<r.length;a++)"default"!==r[a]&&o(t,e,r[a]);return n(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const s=r(1464),l=r(8453),p=r(6877),c=a(r(2086)),u={format:l.BodyTextFormat.bitmarkPlusPlus,location:p.TextLocation.body,v2:!1};function y(e){return"string"==typeof e||e instanceof String}t.Breakscape=class{constructor(){this.EMPTY_STRING=""}breakscape(e,t={}){if(null==e)return;const r=Object.assign({},u,t);if(Array.isArray(e))return e.map((e=>this.breakscape(e,r)));if(!y(e))return e;const{regex:i,replacer:o}=function(e,t,r=!1){return t===p.TextLocation.tag?r||e!==l.BodyTextFormat.bitmarkPlusPlus?{regex:c.BREAKSCAPE_PLAIN_TAG_REGEX,replacer:c.BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER}:{regex:c.BREAKSCAPE_BITMARK_TAG_REGEX,replacer:c.BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER}:e===l.BodyTextFormat.bitmarkPlusPlus?r?{regex:c.BREAKSCAPE_V2_BODY_REGEX,replacer:c.BREAKSCAPE_V2_BODY_REGEX_REPLACER}:{regex:c.BREAKSCAPE_BITMARK_BODY_REGEX,replacer:c.BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER}:{regex:c.BREAKSCAPE_PLAIN_BODY_REGEX,replacer:c.BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER}}(r.format,r.location,r.v2);let n=e;return n=n.replace(i,o),n}unbreakscape(e,t={}){if(null==e)return;const r=Object.assign({},u,t);if(Array.isArray(e))return e.map((e=>this.unbreakscape(e,r)));if(!y(e))return e;const{regex:i,replacer:o}=function(e,t){const r=e!==l.BodyTextFormat.bitmarkPlusPlus;return t===p.TextLocation.body&&r?{regex:c.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX,replacer:c.UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER}:{regex:c.UNBREAKSCAPE_REGEX,replacer:c.UNBREAKSCAPE_REGEX_REPLACER}}(r.format,r.location);let n=e;return n=n.replace(i,o),n}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},u,t),i=e=>e?e.replace(c.BREAKSCAPE_CODE_REGEX,c.BREAKSCAPE_CODE_REGEX_REPLACER):e;if(Array.isArray(e)){const t=r.inPlaceArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];y(r)&&(e[t]=i(r))}e=t}else y(e)&&(e=i(e));return e}version(){return s.buildInfo.version}license(){return s.buildInfo.license}}},6149:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",image:"image",imageResponsive:"image-responsive",imagePortrait:"image-portrait",imageLandscape:"image-landscape",imageEmbed:"image-embed",imageLink:"image-link",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",video:"video",videoEmbed:"video-embed",videoLink:"video-link",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",article:"article",articleEmbed:"article-embed",articleLink:"article-link",document:"document",documentEmbed:"document-embed",documentLink:"document-link",documentDownload:"document-download",appLink:"app-link",websiteLink:"website-link",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"});t.ResourceTag=i},6220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedTextFormat=void 0;const i=(0,r(4718).superenum)({bitmarkMinusMinus:"bitmark--"});t.DeprecatedTextFormat=i},6278:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=(0,r(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=i},6521:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildResources=function(e,t,r){var i,o;const{bitType:n}=e,p=[],c=[],u=l.ResourceTag.fromValue(t),y=a.Config.getBitResourcesConfig(n,u),g=y.resourceAttachmentAllowed,d=y.getCountsMin(),T=y.getCountsMax();if(r)for(const e of r.reverse()){let t=null!==(i=d.get(e.__typeAlias))&&void 0!==i?i:0,r=null!==(o=T.get(e.__typeAlias))&&void 0!==o?o:0;t=Math.max(0,t-1),r===s.Count.infinity?p.unshift(e):r>0?(p.unshift(e),r--):c.unshift(e),d.set(e.__typeAlias,t),T.set(e.__typeAlias,r)}if(!g&&t){const r=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(r)}else 0===p.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such a resource is present`);c.length>0&&(e.parser.excessResources=c);return p},t.resourceContentProcessor=function(e,t,r,o,s){const{type:g,key:d,value:T,chain:f}=o,m=s.resources;if(!m)return;const h=l.ResourceTag.fromValue(d);if(h){const t=a.Config.getTagConfigForTag(r,h),o=e.bitContentProcessor(u.BitContentLevel.Chain,null==t?void 0:t.chain,f),{posterImage:g}=o,d=i(o,["posterImage"]);let b;if(g){const{subConfig:r,subChain:o}=function(e,t,r){var i;let o;e&&(o=null===(i=e[r])||void 0===i?void 0:i.chain);const n=null==t?void 0:t.reduce(((e,t)=>{if(e)return e;const r=t;return"posterImage"===r.key?r.chain:void 0}),void 0);return{subConfig:o,subChain:n}}(null==t?void 0:t.chain,f,"posterImage"),n=e.bitContentProcessor(u.BitContentLevel.Chain,r,o),{posterImage:a}=n,s=i(n,["posterImage"]);b=y.resource(e,Object.assign({type:l.ResourceTag.image,value:g},s)).image}const B=y.resource(e,Object.assign({type:h,value:n.Breakscape.unbreakscape(T,{format:p.TextFormat.bitmarkText,location:c.TextLocation.tag}),posterImage:b},d));B&&(h===l.ResourceTag.backgroundWallpaper||h===l.ResourceTag.imagePlaceholder?s.propertyStyleResources&&(s.propertyStyleResources[h]=B):m.push(B))}};const o=r(5533),n=r(7735),a=r(2028),s=r(3778),l=r(6149),p=r(385),c=r(6877),u=r(3029),y=new o.ResourceBuilder},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,r,i,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=r,this.maxCount=i,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},6772:function(e,t){var r=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n",this.lastWrite=""}get isSync(){return!0}getString(){return this._string}open(){return r(this,void 0,void 0,(function*(){return this.openSync(),Promise.resolve()}))}close(){return r(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}return Promise.resolve()}))}openSync(){this._buffer=[],this._string=""}closeSync(){if(!this._buffer)throw new Error("open() or openSync() never called");this._string=this._buffer.join(""),this._buffer=[]}writeLine(e){return this._buffer?(null!=e?(this._buffer.push(e+this.endOfLineString),this.lastWrite=e+this.endOfLineString):(this._buffer.push(this.endOfLineString),this.lastWrite=this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let r="";for(let i=0,o=e.length;i<o;i++){const n=e[i];this._buffer.push(n),r+=n,t&&i<o-1&&(this._buffer.push(t),r+=t),this._buffer.push(this.endOfLineString),r+=this.endOfLineString}return this.lastWrite=r,this}write(e){return this._buffer?(null==e||(e&&(this.lastWrite=e),this._buffer.push(e)),this):this}writeWhiteSpace(){return this.write(" "),this}getLastWrite(){return this.lastWrite}}},6853:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),p=r(5854),c=r(3778),u=r(363),y=r(385),g={[p.BitType._error]:{since:"1.3.0",tags:[]},[p.BitType._comment]:{since:"1.4.12",tags:[]},[p.BitType._standard]:{since:"3.2.0",tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[p.BitType.appFlashcards]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.article]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}]},[p.BitType.articleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.articleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.articleResponsiveAlt]:{since:"2.0.0",baseBitType:p.BitType.articleResponsive},[p.BitType.standardArticleNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardArticleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardArticleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNormative},[p.BitType.smartStandardArticleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNonNormative},[p.BitType.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNormative},[p.BitType.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNonNormative},[p.BitType.statement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.pageArticle]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.callToAction]:{since:"1.15.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.callToActionUrl,minCount:1}]},[p.BitType.callToActionSubscribe]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionContact]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionJoin]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionMail]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionLearnMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionSeeMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionWatch]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionStartNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetOffer]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionBookNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionShopNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionDownload]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionCreateAccount]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.appBitmarkFromJavascript]:{since:"1.4.5",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:y.TextFormat.plainText},[p.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:p.BitType.appBitmarkFromJavascript},[p.BitType.articleEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.articleLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audio]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.bitAlias]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor}]},[p.BitType.diff]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo}]},[p.BitType.book]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[p.BitType.bookEnd]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.bookAcknowledgements]:{since:"1.17.0",baseBitType:p.BitType.article},[p.BitType.bookAddendum]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAfterword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAppendix]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookBibliography]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookConclusion]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyright]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookDedication]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookForword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookImprint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookNotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPostscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPreface]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPrologue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReadMore]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReferenceList]:{since:"3.2.0",baseBitType:p.BitType._standard,cardSet:i.CardSetConfigKey._bookReferenceList},[p.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTeaser]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTitle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCover]:{since:"3.27.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor}]},[p.BitType.bookAlias]:{since:"1.4.3",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:c.Count.infinity}]},[p.BitType.bookDiff]:{since:"3.10.0",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookDiff}]},[p.BitType.bookClose]:{since:"1.18.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.bookReference]:{since:"2.2.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}]},[p.BitType.botActionResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._botActionResponses},[p.BitType.botActionSend]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[p.BitType.browserImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.card1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}]},[p.BitType.question1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.survey1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.chapter]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[p.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.clozeAndMultipleChoiceText},[p.BitType.cloze]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[p.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSeveral]:{since:"3.5.0",baseBitType:p.BitType.cloze},[p.BitType.gapText]:{since:"1.5.15",baseBitType:p.BitType.cloze},[p.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:p.BitType.clozeInstructionGrouped},[p.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeList]:{since:"1.4.13",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._clozeList},[p.BitType.code]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:y.TextFormat.plainText},[p.BitType.formula]:{since:"1.35.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.latex},[p.BitType.smartStandardFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.appCodeCell]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeIde]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.codeRuntime]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.consoleLog]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.output]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.stdout]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.step]:{since:"1.5.1",baseBitType:p.BitType.article},[p.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:p.BitType.image},[p.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[p.BitType.milestone]:{since:"1.20.0",baseBitType:p.BitType.step},[p.BitType.conversationLeft1]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[p.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.clozeAndMultipleChoiceTextConversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.cookPreparation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookStep]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookIngredients]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]}],cardSet:i.CardSetConfigKey._ingredients},[p.BitType.recipe]:{since:"1.5.24",baseBitType:p.BitType.cookIngredients},[p.BitType.cookRemark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookVariation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookInsert]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookNoteOnQuantity]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.cookArrangement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPlate]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDish]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookTimer]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.document]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentDownload]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leDocumentDownload]:{since:"3.18.0",baseBitType:p.BitType.documentDownload},[p.BitType.documentEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.essay]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.example]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],rootExampleType:u.ExampleType.string},[p.BitType.exampleAlt]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.smartStandardExampleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNormative},[p.BitType.smartStandardExampleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNonNormative},[p.BitType.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNormative},[p.BitType.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNonNormative},[p.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.aiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAi]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAttachment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.assignment]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.audioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:p.BitType.example},[p.BitType.blogArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bug]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bugAlt]:{since:"1.16.0",baseBitType:p.BitType.bug},[p.BitType.checklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.correction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.danger]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.dangerAlt]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.definitionTerm]:{since:"1.34.0",baseBitType:p.BitType.article},[p.BitType.deleted]:{since:"3.9.0",baseBitType:p.BitType.article},[p.BitType.details1]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.details]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.qAndA]:{since:"3.5.0",baseBitType:p.BitType.article},[p.BitType.editorial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.editorNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.featured]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.glossaryTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.help]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.helpAlt]:{since:"1.16.0",baseBitType:p.BitType.help},[p.BitType.hint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.hintAlt]:{since:"1.16.0",baseBitType:p.BitType.hint},[p.BitType.indexTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.info]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.infoAlt]:{since:"1.16.0",baseBitType:p.BitType.info},[p.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langMaterial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelDown]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelUp]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVideoScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langAudioScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVocabulary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langHomework]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.list]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.standardList]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.smartStandardList]:{since:"1.28.0",baseBitType:p.BitType.standardList},[p.BitType.smartStandardListCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardList},[p.BitType.message]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.note]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.noteAlt]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNonNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.smartStandardNoteNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNormative},[p.BitType.smartStandardNoteNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNonNormative},[p.BitType.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNormative},[p.BitType.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNonNormative},[p.BitType.noteAi]:{since:"1.3.0",baseBitType:p.BitType.note},[p.BitType.notebookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.preparationNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remarkAlt]:{since:"1.16.0",baseBitType:p.BitType.remark},[p.BitType.standardRemarkNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardRemarkNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardRemarkNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNormative},[p.BitType.smartStandardRemarkNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNonNormative},[p.BitType.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNormative},[p.BitType.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNonNormative},[p.BitType.selfAssessment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.separator]:{since:"1.4.15",baseBitType:p.BitType.article},[p.BitType.separatorAlt]:{since:"1.16.0",baseBitType:p.BitType.separator},[p.BitType.sticker]:{since:"1.5.28",baseBitType:p.BitType.article},[p.BitType.sideNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summaryAi]:{since:"1.3.0",baseBitType:p.BitType.summary},[p.BitType.videoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warning]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warningAlt]:{since:"1.16.0",baseBitType:p.BitType.warning},[p.BitType.workbookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.collapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.sideNoteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.infoCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.remarkCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.warningCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.dangerCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.noteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.exampleCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.hintCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.bugCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.platformPath]:{since:"3.14.1",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.path}]},[p.BitType.container]:{since:"1.9.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowedBit,maxCount:c.Count.infinity}]},[p.BitType.containerWrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerGroup]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerFolder]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerCarousel]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCards]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGrid]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerStack]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerSlides]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGallery]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerScroller]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerAccordionTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerFolderAll]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerBits2]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCookRecipe]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerNewsArticle]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerPreview]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.pageContainer]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.pageContainerWrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerFolder]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerGroup]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.metalevelExplanation]:{since:"1.10.0",baseBitType:p.BitType.article},[p.BitType.module]:{since:"1.5.26",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasBookNavigation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[p.BitType.moduleProduct]:{since:"1.9.0",baseBitType:p.BitType.module,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1}]},[p.BitType.exampleList]:{since:"1.4.13",baseBitType:p.BitType.example,cardSet:i.CardSetConfigKey._exampleBitList,rootExampleType:u.ExampleType.string},[p.BitType.extractorPage]:{since:"1.5.17",baseBitType:p.BitType.image},[p.BitType.extractorPageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPage},[p.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:p.BitType.image},[p.BitType.extractorPageWithBlocksCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageWithBlocks},[p.BitType.extractorConfiguration]:{since:"1.7.1",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.plainText},[p.BitType.extractorInformation]:{since:"3.8.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.extractorAiChat]:{since:"3.19.0",baseBitType:p.BitType._standard},[p.BitType.extractorBlock]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumberCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageNumber},[p.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageHeaderCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageHeader},[p.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageFooterCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageFooter},[p.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageOpenBookList]:{since:"2.1.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,maxCount:c.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[p.BitType.assignmentList]:{since:"1.4.13",baseBitType:p.BitType.exampleList},[p.BitType.pageFooter]:{since:"1.4.13",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}],cardSet:i.CardSetConfigKey._exampleBitList},[p.BitType.legend]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.smartStandardLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.definitionList]:{since:"1.34.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTerms]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTopics]:{since:"3.12.0",baseBitType:p.BitType.metaSearchDefaultTerms},[p.BitType.flashcard]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._flashcard},[p.BitType.flashcard1]:{since:"1.3.0",baseBitType:p.BitType.flashcard},[p.BitType.qAndACard]:{since:"3.25.0",baseBitType:p.BitType.flashcard1},[p.BitType.focusImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.highlightText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.image]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.backgroundWallpaper,chain:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.detailsImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.figure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:i.CardSetConfigKey._definitionList},[p.BitType.imageBanner]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageFigure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:i.CardSetConfigKey._definitionList},[p.BitType.imageFigureAlt]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNonNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.smartStandardImageFigureNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNonNormative},[p.BitType.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNonNormative},[p.BitType.imageLandscape]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageMood]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePortrait]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePrototype]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSeparator]:{since:"1.4.15",baseBitType:p.BitType.image},[p.BitType.imageSeparatorAlt]:{since:"1.16.0",baseBitType:p.BitType.imageSeparator},[p.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageStyled]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageZoom]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.pageBanner]:{since:"1.4.3",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}]},[p.BitType.pageHero]:{since:"1.11.0",baseBitType:p.BitType.pageBanner},[p.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:p.BitType.image},[p.BitType.tableImage]:{since:"1.5.15",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[p.BitType.tableImageAlt]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNonNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNonNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.smartStandardTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNormative},[p.BitType.smartStandardTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNonNormative},[p.BitType.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNormative},[p.BitType.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNonNormative},[p.BitType.imageLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.imageOnDevice]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[p.BitType.imageResponsive]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[p.BitType.imagesLogoGrave]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:c.Count.infinity}],resourceAttachmentAllowed:!1},[p.BitType.prototypeImages]:{since:"1.6.1",baseBitType:p.BitType.imagesLogoGrave},[p.BitType.internalLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.interview]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._questions},[p.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.botInterview]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.learningPathBook]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[p.BitType.bookLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLti]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathSign]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathStep]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[p.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[p.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[p.BitType.leLearningObjectives]:{since:"1.25.0",baseBitType:p.BitType.learningPathLearningGoal,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leVideoCall]:{since:"1.25.0",baseBitType:p.BitType.learningPathVideoCall,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leClassroomEvent]:{since:"1.25.0",baseBitType:p.BitType.learningPathClassroomEvent,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leMultiDayEvent]:{since:"3.32.0",baseBitType:p.BitType.leClassroomEvent},[p.BitType.leCompletion]:{since:"1.25.0",baseBitType:p.BitType.learningPathClosing,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leExternalLink]:{since:"1.25.0",baseBitType:p.BitType.learningPathExternalLink,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leReadBook]:{since:"1.25.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leLearningStep]:{since:"1.25.0",baseBitType:p.BitType.learningPathStep,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.lePreparationTask]:{since:"1.26.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leRead]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTodo]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFollowUpTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFinishingTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leAssignment]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leWatchVideoEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leListenAudioEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.listItem]:{since:"1.22.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.listItemIndent}]},[p.BitType.standardListItem]:{since:"1.22.0",baseBitType:p.BitType.listItem},[p.BitType.smartStandardListItem]:{since:"1.28.0",baseBitType:p.BitType.standardListItem},[p.BitType.smartStandardListItemCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardListItem},[p.BitType.mark]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[p.BitType.match]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:i.CardSetConfigKey._matchPairs},[p.BitType.matchAll]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchMatrix]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchMatrix},[p.BitType.matchAudio]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchAudioPairs},[p.BitType.matchPicture]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:i.CardSetConfigKey._matchImagePairs},[p.BitType.feedback]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._feedback},[p.BitType.learningDocumentationFeedback]:{since:"3.13.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackExpert]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackSelf]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.multipleChoice1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice1},[p.BitType.multipleChoice]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice},[p.BitType.multipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.multipleResponse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse1},[p.BitType.multipleResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse},[p.BitType.page]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[p.BitType.pageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.page},[p.BitType.pageCoverImage]:{since:"1.22.0",baseBitType:p.BitType.page},[p.BitType.pageBuyButton]:{since:"1.4.3",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageBuyButtonAlt]:{since:"1.31.0",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageSubpage]:{since:"1.6.6",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.page}]},[p.BitType.pageShopInShop]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageCategory]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageAcademy]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePromotion]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageSpecial]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePerson]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageProduct]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[p.BitType.pageProductList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:c.Count.infinity}]},[p.BitType.pageProductVideo]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[p.BitType.pageProductVideoList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:c.Count.infinity}]},[p.BitType.pageSectionFolder]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[p.BitType.photo]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.quote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[p.BitType.rating]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:p.BitType.rating},[p.BitType.releaseNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[p.BitType.reviewNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:u.ExampleType.string},[p.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewCustomerNote]:{since:"3.5.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.sampleSolution]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.sequence]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:i.CardSetConfigKey._elements,rootExampleType:u.ExampleType.boolean},[p.BitType.stillImageFilm]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.surveyAnonymous]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.survey]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[p.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:p.BitType.surveyMatrix},[p.BitType.surveyRating]:{since:"1.6.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.scorm]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[p.BitType.pronunciationTable]:{since:"3.1.0",baseBitType:p.BitType._standard,tags:[],cardSet:i.CardSetConfigKey._pronunciationTable},[p.BitType.table]:{since:"1.5.19",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeaderWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableColumnMinWidth}],cardSet:i.CardSetConfigKey._table},[p.BitType.tableAlt]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNonNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNonNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.smartStandardTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNormative},[p.BitType.smartStandardTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNonNormative},[p.BitType.smartStandardRemarkTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNonNormative},[p.BitType.smartStandardTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNormative},[p.BitType.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNonNormative},[p.BitType.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNonNormative},[p.BitType.parameters]:{since:"1.18.0",baseBitType:p.BitType.table},[p.BitType.toc]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.tocChapter]:{since:"1.5.5",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[p.BitType.tocInline]:{since:"3.24.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[p.BitType.tocResource]:{since:"3.31.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tocResource,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.tocContent]:{since:"3.31.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tocContent,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.anchor]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRemind]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionSave]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chat]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusion]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusionAlt]:{since:"1.16.0",baseBitType:p.BitType.conclusion},[p.BitType.documentUpload]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.footNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupBorn]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupDied]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordAudio]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordVideo]:{since:"1.5.24",baseBitType:p.BitType._standard},[p.BitType.stickyNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.takePicture]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.handInAudio]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInContact]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInDocument]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInFile]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInAcceptFileType,maxCount:c.Count.infinity}]},[p.BitType.handInLocation]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInPhoto]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInScan]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInSubmit]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInRequirement,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInInstruction},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.handInVideo]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInVoice]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.trueFalse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.true},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false}],rootExampleType:u.ExampleType.boolean},[p.BitType.trueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:i.CardSetConfigKey._statements},[p.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:p.BitType.code,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.vendorDatadogDashboardEmbed]:{since:"3.12.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorDashboardId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbed]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksEmbed},[p.BitType.vendorFormbricksLink]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksLinkAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksLink},[p.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:p.BitType.vendorAmcharts5Chart},[p.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorStripePricingTable]:{since:"1.20.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePricingTableId,minCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePublishableKey,minCount:1}]},[p.BitType.vendorStripePricingTableExternal]:{since:"3.13.0",baseBitType:p.BitType.vendorStripePricingTable},[p.BitType.video]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLandscape]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoPortrait]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.websiteLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},6877:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLocation=void 0;const i=(0,r(4718).superenum)({tag:"tag",body:"body"});t.TextLocation=i},6915:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const i=(0,r(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=i},6936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const i=r(6278),o=r(9561),n=r(2287),a=r(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===i.Environment.node,this.isCI=this.getIsCI(),this.NODE_ENV=this.getNodeEnv(),this.os=this.getOs(),this.osVersion=this.getOsVersion()}init(e,t){this.app=e,this.appVersion=this.parseMMBVersion(t)}get upTimestamp(){return Date.now()-this.bootTimestamp}getEnvironment(){return this.userAgentInfo?this.userAgentInfo.browser:"undefined"!=typeof process&&void 0!==process.versions&&process.versions.node?i.Environment.node:i.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}getIsBrowser(){return!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator||!navigator.userAgent)}getIsCI(){return!("undefined"==typeof process||!process.env||!process.env.CI)}getNodeEnv(){return"undefined"!=typeof process&&process.env?"production":""}parseMMBVersion(e){if(!e)return n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?r=n:1===e?i=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:r,minor:i,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const r=new class{asArray(e){if(null!=e)return Array.isArray(e)?e:[e]}asSingle(e,t){if(null!=e)return Array.isArray(e)?e.length>0?t?e[e.length-1]:e[0]:void 0:e}};t.ArrayUtils=r},6991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=function(e,t,r,o){if(!o.internalComments)return;const{value:n}=r,a=i.StringUtils.isString(n)?i.StringUtils.trimmedString(n):void 0;if(!a)return;o.internalComments.push(a)};const i=r(9681)},7112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const i=r(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_quizCommon:"group_quizCommon",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageEmbed:"group_resourceImageEmbed",group_resourceImageLink:"group_resourceImageLink",group_resourceImageResponsive:"group_resourceImageResponsive",group_resourceImagePortrait:"group_resourceImagePortrait",group_resourceImageLandscape:"group_resourceImageLandscape",group_resourceAudio:"group_resourceAudio",group_resourceAudioEmbed:"group_resourceAudioEmbed",group_resourceAudioLink:"group_resourceAudioLink",group_resourceVideo:"group_resourceVideo",group_resourceVideoEmbed:"group_resourceVideoEmbed",group_resourceVideoLink:"group_resourceVideoLink",group_resourceStillImageFilm:"group_resourceStillImageFilm",group_resourceStillImageFilmEmbed:"group_resourceStillImageFilmEmbed",group_resourceStillImageFilmLink:"group_resourceStillImageFilmLink",group_resourceArticle:"group_resourceArticle",group_resourceArticleEmbed:"group_resourceArticleEmbed",group_resourceArticleLink:"group_resourceArticleLink",group_resourceDocument:"group_resourceDocument",group_resourceDocumentEmbed:"group_resourceDocumentEmbed",group_resourceDocumentLink:"group_resourceDocumentLink",group_resourceDocumentDownload:"group_resourceDocumentDownload",group_resourceAppLink:"group_resourceAppLink",group_resourceWebsiteLink:"group_resourceWebsiteLink"};t.groupConfigKeys=o;const n=(0,i.superenum)(o);t.GroupConfigKey=n},7124:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(5854),l=r(8453),p=r(6220),c=r(6149),u=r(385),y=r(6877),g=r(9681),d=r(4266),T=r(5033),f=r(1083),m=r(4402),h=r(4382),b=r(3904),B=r(9289),v=r(5189),C=r(9647),x=r(3990),P=r(6521),k=r(7667),_=r(9885),K=r(3029),A=!1,w=!0,S=!0,E=!0,L=!0,I=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:a.Config.getBitConfig(s.BitType._error),bitType:s.BitType._error,textFormat:u.TextFormat.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:A,DEBUG_BIT_CONTENT:w,DEBUG_BIT_TAGS:S,DEBUG_BODY:E,DEBUG_FOOTER:L,DEBUG_CHAIN_CONTENT:true,DEBUG_CHAIN_TAGS:true,DEBUG_CARD_SET_CONTENT:true,DEBUG_CARD_SET:true,DEBUG_CARD_TAGS:true,parser:this.parser,parse:this.parse,bitContentProcessor:this.bitContentProcessor.bind(this),splitBitContent:this.splitBitContent.bind(this),addWarning:this.addWarning.bind(this),addError:this.addError.bind(this),debugPrint:this.debugPrint.bind(this),state:{}}}buildBits(e){var t;const r=[];let i=[];for(const o of e){if(!o)continue;const e=o.value;e?r.push(e):i=i.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return I.buildBitmark({bits:r,errors:i.length>0?i:void 0})}buildBit(e,t){var r;const{bitType:o,textFormat:n,resourceType:l,bitLevel:p,isCommented:c}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const u=a.Config.getBitConfig(o);this.context.bitConfig=u,this.context.bitType=o,this.context.textFormat=n,this.context.resourceType=l;const y=a.Config.isOfBitType(o,s.BitType.trueFalse1),g=a.Config.isOfBitType(o,s.BitType.multipleChoice1),T=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=d.BitmarkPegParserValidator.validateBitTags(this.context,t);const m=this.bitContentProcessor(K.BitContentLevel.Bit,u.tags,t),{body:h,footer:b,cardSet:B,title:v,statement:C,statements:x,choices:_,responses:A,propertyStyleResources:w,resources:S,posterImage:E,internalComments:L}=m,R=i(m,["body","footer","cardSet","title","statement","statements","choices","responses","propertyStyleResources","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",R),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",b);const F=(0,k.buildTitles)(this.context,o,v),N=(0,f.buildCards)(this.context,o,n,B,C,x,_,A),O=(0,P.buildResources)(this.context,l,S),V=[...null!=L?L:[],...null!==(r=N.internalComments)&&void 0!==r?r:[]],G=this.buildBitLevelWarnings(),j=this.buildBitLevelErrors();G&&(this.parser.warnings=G),j&&(this.parser.errors=j);return{value:I.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,bitLevel:p,isCommented:c,textFormat:n,resourceType:l},F),{posterImage:E,statement:y?C:void 0,choices:g?_:void 0,responses:T?A:void 0}),R),w),{resources:O}),N),{body:h,footer:b,internalComment:V,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:I.buildBit({bitType:a.Config.getBitType(s.BitType._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,r){const i=n.Breakscape.unbreakscape(e,{format:u.TextFormat.plainText,location:y.TextLocation.tag}),o=a.Config.getBitType(i),g=a.Config.isBitTypeCommented(i);a.Config.isOfBitType(o,s.BitType._error)&&this.addError(`Invalid bit type: '${i}'`);const d=a.Config.getBitConfig(o);t>a.Config.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${a.Config.bitLevelMax}`),t=a.Config.bitLevelMax):t<a.Config.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${a.Config.bitLevelMin}`),t=a.Config.bitLevelMin);let T=u.TextFormat.fromValue(r.textFormat);r.textFormat&&!T&&this.addWarning(`Invalid text format '${r.textFormat}', defaulting to '${l.BodyTextFormat.bitmarkPlusPlus}'`);const f=p.DeprecatedTextFormat.fromValue(r.textFormat);f&&(T=u.TextFormat.bitmarkText,this.addWarning(`${f} text format is deprecated. Bit will be parsed as '${l.BodyTextFormat.bitmarkPlusPlus}'`)),T=null!=T?T:d.textFormatDefault;const m=c.ResourceTag.fromValue(r.resourceType);return r.resourceType&&!m&&this.addWarning(`Invalid resource type '${r.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:null!=T?T:d.textFormatDefault,resourceType:m,isCommented:g}}buildTextAndResourceType(e,t){const r={},i=e=>{if(e){const t=n.Breakscape.unbreakscape(g.StringUtils.string(e.value),{format:u.TextFormat.plainText,location:y.TextLocation.tag});e.type===K.TypeKey.TextFormat?r.textFormat=t:r.resourceType=t}};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:r}=this.context,i=r===u.TextFormat.bitmarkText,o=(e,t="")=>{const{chain:r,parser:i}=e;if(t+=i.text,r)for(const e of r)t=o(e,t);return t};let n=!1;for(const r of e){const{type:e,value:a}=r,s=null!=a?a:"";let l=!1;if(n||(e===K.TypeKey.BodyText&&!i&&s&&s.trim()&&(n=!0),e===K.TypeKey.PlainTextDivider&&(n=!0,l=!0)),l)t.push({type:K.TypeKey.BodyText,value:"\n"});else if(n)if(e===K.TypeKey.BodyText)t.push({type:K.TypeKey.BodyTextPlain,value:a});else{const e=o(r);t.push({type:K.TypeKey.BodyTextPlain,value:e})}else t.push(r)}return t}bitContentProcessor(e,t,r){const i={};if(!r)return i;const{bitType:o,textFormat:a}=this.context;i.title=[],i.solutions=[],i.__solutionsAst=[],i.statements=[],i.choices=[],i.responses=[],i.propertyStyleResources={},i.resources=[],i.trueFalse=[],i.markConfig=[],i.extraProperties={},i.internalComments=[];let s=!1,l=!1;const p=[];let c=n.Breakscape.EMPTY_STRING,u=n.Breakscape.EMPTY_STRING,y=n.Breakscape.EMPTY_STRING,g=n.Breakscape.EMPTY_STRING;const f=e===K.BitContentLevel.Bit,A=e===K.BitContentLevel.Card,w=e===K.BitContentLevel.Chain,S=()=>{if(c){c=d.BitmarkPegParserValidator.checkBodyPart(this.context,e,c);const t=T.BodyContentProcessor.buildBodyText(c,!1);p.push(t)}c=n.Breakscape.EMPTY_STRING};for(const o of r){const{type:r,value:a}=o;switch(r){case K.TypeKey.ItemLead:(0,B.itemLeadChainContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Instruction:case K.TypeKey.Hint:case K.TypeKey.Anchor:case K.TypeKey.SampleSolution:(0,m.defaultTagContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Reference:(0,x.referenceTagContentProcessor)(this.context,e,t,o,i,s),s=!0;break;case K.TypeKey.Title:(0,k.titleTagContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Property:(0,C.propertyContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.Gap:w||S(),(0,b.gapChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.Mark:w||S(),(0,v.markChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.True:case K.TypeKey.False:w||S(),(0,_.trueFalseChainContentProcessor)(this.context,e,t,o,i,p);break;case K.TypeKey.Resource:(0,P.resourceContentProcessor)(this.context,e,t,o,i);break;case K.TypeKey.CardSet:i.cardSet=a,l=!0;break;case K.TypeKey.BodyText:case K.TypeKey.CardText:l?u=n.Breakscape.concatenate(u,a):c=n.Breakscape.concatenate(c,a);break;case K.TypeKey.BodyTextPlain:l?g=n.Breakscape.concatenate(g,a):y=n.Breakscape.concatenate(y,a);break;case K.TypeKey.FooterDivider:l&&(u=n.Breakscape.concatenate(u,a)),l=!0}}S();const E=y?T.BodyContentProcessor.buildBodyText(y,!0):void 0;if(E&&p.push(E),i.itemLead){const e=i.itemLead.length;e>0&&(i.item=i.itemLead[0]),e>1&&(i.lead=i.itemLead[1]),e>2&&(i.pageNumber=i.itemLead[2]),e>3&&(i.marginNumber=i.itemLead[e-1])}return f?i.body=T.BodyContentProcessor.process(this.context,e,o,a,t,i,p,!1):A&&(i.cardBody=T.BodyContentProcessor.process(this.context,e,o,a,t,i,p,!0)),i.footer=h.FooterContentProcessor.process(this.context,e,t,i,u,g),0===Object.keys(i.extraProperties).length&&delete i.extraProperties,0===i.title.length&&delete i.title,0===i.solutions.length&&delete i.solutions,0===i.statements.length&&delete i.statements,0===i.choices.length&&delete i.choices,0===i.responses.length&&delete i.responses,0===i.trueFalse.length&&delete i.trueFalse,0===i.markConfig.length&&delete i.markConfig,0===Object.keys(i.propertyStyleResources).length&&delete i.propertyStyleResources,0===i.resources.length&&delete i.resources,0===i.internalComments.length&&delete i.internalComments,i}buildBitLevelWarnings(){let e;return this.nonFatalWarnings.length>0&&(e=this.nonFatalWarnings,this.nonFatalWarnings=[]),e}buildBitLevelErrors(){let e;return this.nonFatalErrors.length>0&&(e=this.nonFatalErrors,this.nonFatalErrors=[]),e}splitBitContent(e,t){const r=[];let i=[];for(const o of e)t.includes(o.type)&&(i.length>0&&r.push(i),i=[]),i.push(o);return i.length>0&&r.push(i),r}addWarning(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},7203:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const i=(0,r(4718).superenum)({ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=i},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){this.source=e,this.start=t}toString(){return String(this.source)}offset(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}}static offsetStart(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start}static offsetEnd(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end}}},7667:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleTagContentProcessor=function(e,t,r,i,o){const{textFormat:l}=e,{value:p}=i,c=o.title;if(!c)return;const u=p,y=a.StringUtils.trimmedString(u.title),g=u.level.length;c[g]={titleAst:s.toAst(null!=y?y:"",{format:l,location:n.TextLocation.tag}),titleString:null!=y?y:""}},t.buildTitles=function(e,t,r){var n,a,s,l,p,c,u,y,g,d;if(r=null!=r?r:[],i.Config.isOfBitType(t,o.BitType.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:null!==(n=null==e?void 0:e.titleAst)&&void 0!==n?n:[],titleString:null!==(a=null==e?void 0:e.titleString)&&void 0!==a?a:"",level:r.length>0?r.length-1:void 0}}return{title:null!==(l=null===(s=r[1])||void 0===s?void 0:s.titleAst)&&void 0!==l?l:void 0,titleString:null!==(c=null===(p=r[1])||void 0===p?void 0:p.titleString)&&void 0!==c?c:void 0,subtitle:null!==(y=null===(u=r[2])||void 0===u?void 0:u.titleAst)&&void 0!==y?y:void 0,subtitleString:null!==(d=null===(g=r[2])||void 0===g?void 0:g.titleString)&&void 0!==d?d:void 0}};const i=r(2028),o=r(5854),n=r(6877),a=r(9681),s=new(r(777).TextParser)},7678:(e,t,r)=>{const{deserialize:i}=r(5005),{serialize:o}=r(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?i(o(e,t)):structuredClone(e):(e,t)=>i(o(e,t)),t.deserialize=i,t.serialize=o},7735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const i=r(385),o=r(6877),n=r(6132),a={format:i.TextFormat.bitmarkText,location:o.TextLocation.body,inPlaceArray:!1,v2:!1},s=new n.Breakscape;const l=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){const r=Object.assign({},a,t);return s.breakscape(e,{format:r.format,location:r.location,inPlaceArray:r.inPlaceArray,v2:r.v2})}unbreakscape(e,t){const r=Object.assign({},a,t);return s.unbreakscape(e,r)}breakscapeCode(e,t){const r=Object.assign({},a,t);return s.breakscapeCode(e,r)}concatenate(e,t){return e+t}};t.Breakscape=l},7797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const i=r(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,i.superenum)(o);t.TagConfigKey=n},7984:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=r(6772),n=r(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const r=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?null!=t?t:void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=r},8199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const i=(0,r(4718).superenum)({_flashcard:"_flashcard",_definitionList:"_definitionList",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_feedback:"_feedback",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_pronunciationTable:"_pronunciationTable",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients",_bookReferenceList:"_bookReferenceList"});t.CardSetConfigKey=i},8216:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=function(e,t,r,a,s){const{textFormat:l}=e,{value:p}=a,c=new n.TextParser,u=o.StringUtils.trimmedString(p);s.itemLead||(s.itemLead=[]);const y=c.toAst(u,{format:l,location:i.TextLocation.tag});s.itemLead.push(y)};const i=r(6877),o=r(9681),n=r(777)},8321:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=p,t.parse=u;const i=r(7735),o="8.34.3";function n(e){return"string"!=typeof e?null:i.Breakscape.unbreakscape(e)}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){function t(e){for(let i=e.length-1;i>=0;i--){const o=e[i];(r=o)&&"text"===r.type&&!r.text?e.splice(i,1):o&&Array.isArray(o.content)&&t(o.content)}var r}return Array.isArray(e)?t(e):e&&Array.isArray(e.content)&&t(e.content),e}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):u(e,{startRule:"bitmarkPlusString"})}function p(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,p.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function c(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function u(e,t){var r,i={},c=(t=void 0!==t?t:{}).grammarSource,u={version:Aa,bitmarkPlusPlus:function(){var e,t;if(Ba++,e=[],(t=wa())!==i)for(;t!==i;)e.push(t),t=wa();else e=i;e===i&&(e=function(){var e,t;return e=fa,t="",t=So(),e=t,e}());Ba--,e===i&&(t=i,0===Ba&&_a(Ut));return e},bitmarkPlus:function(){var e,t;Ba++,e=fa,t=is(),t=Cn(t),e=t,Ba--,t=i,0===Ba&&_a(Ut);return e},bitmarkMinusMinus:function(){var e,t;Ba++,e=fa,t=ys(),t=aa(t),e=t,Ba--,t=i,0===Ba&&_a(no);return e},bitmarkPlusString:function(){var e;Ba++,e=is(),Ba--,0===Ba&&_a(Kr);return e},bitmarkMinusMinusString:ys},y=Aa,g="|",d="### ",T="## ",f="# ",m="code",h=":",b="bitmark++",B="bitmark--",v="JavaScript",C="• ",x="•_ ",P="•",k=" ",_="I ",K="i ",A="•A ",w="•a ",S="•+ ",E="•- ",L="\t",I="image",R="#",F="@",N="width",O="height",V="alignment",G="captionAlign",j="left",D="center",M="right",U="alt",J="caption",$="zoomDisabled",W="true",z="false",H="=",q="|latex|",X="|imageInline:",Y="alignmentVertical",Q="size",Z="top",ee="middle",te="bottom",re="baseline",ie="sub",oe="super",ne="text-bottom",ae="text-top",se="line-height",le="font-height",pe="explicit",ce="link:",ue="extref:",ye="provider:",ge="xref:",de="►",Te="symbol:",fe="footnote:",me="footnote*:",he="var:",be="code:",Be="timer",ve="timer:",Ce="duration:",xe="P",Pe="color:",ke="|►",_e="bold",Ke="italic",Ae="light",we="highlight",Se="strike",Ee="subscript",Le="superscript",Ie="ins",Re="del",Fe="underline",Ne="doubleUnderline",Oe="circle",Ve="languageEmRed",Ge="languageEmOrange",je="languageEmYellow",De="languageEmGreen",Me="languageEmBlue",Ue="languageEmPurple",Je="languageEmPink",$e="languageEmBrown",We="languageEmBlack",ze="languageEmWhite",He="languageEmGray",qe="languageEm",Xe="userUnderline",Ye="userDoubleUnderline",Qe="userStrike",Ze="userCircle",et="userHighlight",tt="notranslate",rt="aqua",it="black",ot="blue",nt="brown",at="fuchsia",st="lightgrey",lt="gray",pt="darkgray",ct="green",ut="lime",yt="magenta",gt="maroon",dt="navy",Tt="olive",ft="orange",mt="pink",ht="purple",bt="red",Bt="silver",vt="teal",Ct="violet",xt="white",Pt="yellow",kt="*",_t="_",Kt="`",At="!",wt="[!",St="]",Et="\n",Lt="\r\n",It="http",Rt="s",Ft="://",Nt="mailto:",Ot=/^[ \t]/,Vt=/^[0-9]/,Gt=/^[\r\u2028-\u2029]/,jt=/^[^\n\r\u2028\u2029]/,Dt=/^[!#-;=?-[\]-_a-{}-~]/,Mt={type:"any"},Ut=xa("StyledText"),Jt=va("|",!1),$t=va("### ",!1),Wt=va("## ",!1),zt=va("# ",!1),Ht=va("code",!1),qt=Ca([" ","\t"],!1,!1),Xt=va(":",!1),Yt=va("bitmark++",!1),Qt=va("bitmark--",!1),Zt=va("JavaScript",!1),er=va("• ",!1),tr=va("•_ ",!1),rr=va("•",!1),ir=Ca([["0","9"]],!1,!1),or=va(" ",!1),nr=va("I ",!1),ar=va("i ",!1),sr=va("•A ",!1),lr=va("•a ",!1),pr=va("•+ ",!1),cr=va("•- ",!1),ur=va("\t",!1),yr=va("image",!1),gr=va("#",!1),dr=va("@",!1),Tr=va("width",!1),fr=va("height",!1),mr=va("alignment",!1),hr=va("captionAlign",!1),br=va("left",!1),Br=va("center",!1),vr=va("right",!1),Cr=va("alt",!1),xr=va("caption",!1),Pr=va("zoomDisabled",!1),kr=va("true",!1),_r=va("false",!1),Kr=xa("StyledString"),Ar=va("=",!1),wr=va("|latex|",!1),Sr=va("|imageInline:",!1),Er=va("alignmentVertical",!1),Lr=va("size",!1),Ir=va("top",!1),Rr=va("middle",!1),Fr=va("bottom",!1),Nr=va("baseline",!1),Or=va("sub",!1),Vr=va("super",!1),Gr=va("text-bottom",!1),jr=va("text-top",!1),Dr=va("line-height",!1),Mr=va("font-height",!1),Ur=va("explicit",!1),Jr=va("link:",!1),$r=va("extref:",!1),Wr=va("provider:",!1),zr=va("xref:",!1),Hr=va("►",!1),qr=va("symbol:",!1),Xr=va("footnote:",!1),Yr=va("footnote*:",!1),Qr=va("var:",!1),Zr=va("code:",!1),ei=va("timer",!1),ti=va("timer:",!1),ri=va("duration:",!1),ii=va("P",!1),oi=va("color:",!1),ni=va("|►",!1),ai=va("bold",!1),si=va("italic",!1),li=va("light",!1),pi=va("highlight",!1),ci=va("strike",!1),ui=va("subscript",!1),yi=va("superscript",!1),gi=va("ins",!1),di=va("del",!1),Ti=va("underline",!1),fi=va("doubleUnderline",!1),mi=va("circle",!1),hi=va("languageEmRed",!1),bi=va("languageEmOrange",!1),Bi=va("languageEmYellow",!1),vi=va("languageEmGreen",!1),Ci=va("languageEmBlue",!1),xi=va("languageEmPurple",!1),Pi=va("languageEmPink",!1),ki=va("languageEmBrown",!1),_i=va("languageEmBlack",!1),Ki=va("languageEmWhite",!1),Ai=va("languageEmGray",!1),wi=va("languageEm",!1),Si=va("userUnderline",!1),Ei=va("userDoubleUnderline",!1),Li=va("userStrike",!1),Ii=va("userCircle",!1),Ri=va("userHighlight",!1),Fi=va("notranslate",!1),Ni=va("aqua",!1),Oi=va("black",!1),Vi=va("blue",!1),Gi=va("brown",!1),ji=va("fuchsia",!1),Di=va("lightgrey",!1),Mi=va("gray",!1),Ui=va("darkgray",!1),Ji=va("green",!1),$i=va("lime",!1),Wi=va("magenta",!1),zi=va("maroon",!1),Hi=va("navy",!1),qi=va("olive",!1),Xi=va("orange",!1),Yi=va("pink",!1),Qi=va("purple",!1),Zi=va("red",!1),eo=va("silver",!1),to=va("teal",!1),ro=va("violet",!1),io=va("white",!1),oo=va("yellow",!1),no=xa("MinimalStyledText"),ao=xa("MinimalStyledString"),so=va("*",!1),lo=va("_",!1),po=va("`",!1),co=va("!",!1),uo=va("[!",!1),yo=va("]",!1),go=xa("Line Terminator"),To=va("\n",!1),fo=va("\r\n",!1),mo=Ca(["\r",["\u2028","\u2029"]],!1,!1),ho=(xa("whitespace in line"),xa("space"),xa("language tag separator"),xa("white space, separator"),Ca(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),Ca(["\n","\r","\u2028","\u2029"],!1,!1),Ca(["\n","\r","\u2028","\u2029"],!0,!1)),bo=(Ca(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),va("http",!1)),Bo=va("s",!1),vo=va("://",!1),Co=va("mailto:",!1),xo=Ca(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),Po=function(){return o},ko=function(e){return s(Object.assign({},e))},_o=function(e){let t=Object.assign({},e);a(t);return s(t)},Ko=function(e){return Object.assign({},e)},Ao=function(e){return Object.assign({},e)},wo=function(e){return s(Object.assign({},e))},So=function(){return[]},Eo=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Lo=function(e){return e},Io=function(e,t){return Object.assign(Object.assign({},e),{content:t})},Ro=function(){return{type:"codeBlock",language:""}},Fo=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},No=function(e){return[{type:"text",text:n(e.trim())}]},Oo=function(e){return e},Vo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Go=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},jo=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Do=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Mo=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},Uo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Jo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},$o=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},Wo=function(){return{type:"bulletList"}},zo=function(){return{type:"noBulletList"}},Ho=function(){return{type:"orderedList"}},qo=function(){return{type:"orderedListRoman"}},Xo=function(){return{type:"orderedListRomanLower"}},Yo=function(){return{type:"letteredList"}},Qo=function(){return{type:"letteredListLower"}},Zo=function(){return{type:"taskList"}},en=function(e,t,r,i){return i},tn=function(e,t,r,i){let o="bulletList";const n=e.match(/•([0-9]+)([Ii]?) /);let a=1;if(n&&(o="orderedList",n.length>1&&(a=Number(n[1])),n.length>2)){let e=n[2];"I"==e&&(o="orderedListRoman"),"i"==e&&(o="orderedListRomanLower")}"•_ "==e&&(o="noBulletList"),"•A "==e&&(o="letteredList"),"•a "==e&&(o="letteredListLower"),"•+ "!=e&&"•- "!=e||(o="taskList");let s=[{type:"paragraph",attrs:{},content:l((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:a},content:i};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}s.push(e)}let p="listItem",c=null;if("taskList"==o){p="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:p,attrs:c,content:s,_tempParsingParent:o,_tempListStart:a}:{type:p,content:s,_tempParsingParent:o,_tempListStart:a}},rn=function(e){return e},on=function(e){return e.join("")===Ls},nn=function(e){return e.length>Ls.length},an=function(e){Es.push(Ls),Ls=e.join("")},sn=function(){return Ls=Es.pop(),!0},ln=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},pn=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},cn=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},un=function(e){return e},yn=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let a=i.captionAlign||"left";delete i.captionAlign;let s=i.alt||null;delete i.alt;let l=i.caption||null;delete i.caption;let p=i.align||"center";delete i.align;let c=void 0===i.zoomDisabled||("boolean"==typeof i.zoomDisabled?i.zoomDisabled:"true"===String(i.zoomDisabled).toLowerCase());return delete i.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:a,src:t,alt:n(s),title:n(l),class:p,zoomDisabled:c},i)}},gn=function(e){return e},dn=function(e){return{comment:e.trim()}},Tn=function(e,t){return{[e]:parseInt(t)}},fn=function(e,t){return{[e]:t.trim()}},mn=function(e,t){return{[e]:t}},hn=function(e,t){return{[e]:t}},bn=function(e){return{[e]:!0}},Bn=function(){},vn=function(e){return{error:"Found unknown property or invalid value: "+e}},Cn=function(e){return[{type:"paragraph",content:e,attrs:{}}]},xn=function(e,t){return s(e?[e,...t.flat()]:t.flat())},Pn=function(){return{type:"hardBreak"}},kn=function(e){return{text:n(e),type:"text"}},_n=function(e){return{index:+e,type:"bit"}},Kn=function(e){return{attrs:{formula:n(e)},type:"latex"}},An=function(e,t,r){return{attrs:Object.assign(Object.assign({alt:e,src:(t.pr+t.t).trim()},Object.assign({},...r)),{zoomDisabled:!0}),type:"imageInline"}},wn=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Sn=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},En=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Ln=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},In=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Rn=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},Fn=function(e){return e},Nn=function(e){return e},On=function(e){return{comment:e}},Vn=function(e,t){return{[e]:parseInt(t)}},Gn=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}},jn=function(e,t){return{[e]:t}},Dn=function(e,t){return{[e]:t}},Mn=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},Un=function(e,t,r){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:r.trim()}}},Jn=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}},$n=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}},Wn=function(e){return{type:"ref",attrs:{reference:e.trim()}}},zn=function(e,t){const r=Object.assign({},...t);return{type:"symbol",attrs:Object.assign({src:e.trim()},r)}},Hn=function(e){return{type:"footnote",attrs:{content:l(e.trim())}}},qn=function(e){return{type:"footnote*",attrs:{content:l(e.trim())}}},Xn=function(e){return{type:"var",attrs:{name:e.trim()}}},Yn=function(){return{type:"code",attrs:{language:"plain text"}}},Qn=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},Zn=function(){return{type:"timer",attrs:{name:""}}},ea=function(e){return{type:"timer",attrs:{name:e.trim()}}},ta=function(e){return{type:"duration",attrs:{duration:e}}},ra=function(e){return{type:"color",attrs:{color:e}}},ia=function(e){return{type:e}},oa=function(e){return{type:"comment",comment:e}},na=function(e){return e.trim()},aa=function(e){return[{type:"paragraph",content:e,attrs:{}}]},sa=function(e,t){return s(e?[e,...t.flat()]:t.flat())},la=function(){return{type:"hardBreak"}},pa=function(e){return{text:n(e),type:"text"}},ca=function(e){return{index:+e,type:"bit"}},ua=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},ya=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},ga=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},da=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Ta=function(e,t){return{pr:e,t}},fa=0|t.peg$currPos,ma=[{line:1,column:1}],ha=fa,ba=t.peg$maxFailExpected||[],Ba=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');y=u[t.startRule]}function va(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ca(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function xa(e){return{type:"other",description:e}}function Pa(t){var r,i=ma[t];if(i)return i;if(t>=ma.length)r=ma.length-1;else for(r=t;!ma[--r];);for(i={line:(i=ma[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return ma[t]=i,i}function ka(e,t,r){var i=Pa(e),o=Pa(t),n={source:c,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&c&&"function"==typeof c.offset&&(n.start=c.offset(n.start),n.end=c.offset(n.end)),n}function _a(e){fa<ha||(fa>ha&&(ha=fa,ba=[]),ba.push(e))}function Ka(e,t,r){return new p(p.buildMessage(e,t),e,t,r)}function Aa(){var t,r,o;for(t=fa,r=[],e.length>fa?(o=e.charAt(fa),fa++):(o=i,0===Ba&&_a(Mt));o!==i;)r.push(o),e.length>fa?(o=e.charAt(fa),fa++):(o=i,0===Ba&&_a(Mt));return t=r=Po()}function wa(){var t,r;return t=fa,r=function(){var t,r,o,n,a;if(t=fa,r=La(),r!==i){for(o=fa,n=[],a=Ks();a!==i;)n.push(a),a=Ks();o=e.substring(o,fa),(n=As())!==i?((a=_s())===i&&(a=null),t=Eo(r,o)):(fa=t,t=i)}else fa=t,t=i;return t}(),r!==i&&(r=ko(r)),(t=r)===i&&(t=fa,r=function(){var e,t,r,o;if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Na(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Wo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Vo(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Oa(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=zo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Go(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Va(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Ho());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=jo(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Ga(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=qo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Do(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=ja(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Xo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Mo(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Da(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Yo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Uo(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i){if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Ma(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Qo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=Jo(t,r)):(fa=e,e=i)}else fa=e,e=i;if(e===i)if(e=fa,t=function(){var e,t,r;e=fa,t=fa,Ba++,r=Ua(),Ba--,r!==i?(fa=t,t=void 0):t=i;t!==i&&(t=Zo());return e=t,e}(),t!==i){if(r=[],(o=$a())!==i)for(;o!==i;)r.push(o),o=$a();else r=i;r!==i?((o=_s())===i&&(o=null),e=$o(t,r)):(fa=e,e=i)}else fa=e,e=i}}}}}}return e}(),r!==i&&(r=_o(r)),(t=r)===i&&(t=fa,(r=Qa())!==i&&(r=Ko(r)),(t=r)===i&&(t=fa,r=function(){var t,r,o;t=fa,r=Ra(),r!==i?(o=function(){var t,r,o,n;t=fa,r=fa,o=[],n=Fa();for(;n!==i;)o.push(n),n=Fa();return r=e.substring(r,fa),r=No(r),t=r,t}(),t=Io(r,o)):(fa=t,t=i);return t}(),r!==i&&(r=Ao(r)),(t=r)===i&&(t=fa,r=function(){var e,t,r;e=fa,t=fa,Ba++,r=Sa(),Ba--,r===i?t=void 0:(fa=t,t=i);t!==i&&(r=Ha())!==i?e=ln(r):(fa=e,e=i);e===i&&(e=fa,(t=Xa())!==i&&(r=Ha())!==i?e=pn(r):(fa=e,e=i),e===i&&(e=fa,(t=Xa())!==i?e=cn(r=""):(fa=e,e=i)));return e}(),r!==i&&(r=wo(r)),t=r)))),t}function Sa(){var e;return(e=La())===i&&(e=Ja())===i&&(e=Qa())===i&&(e=Ra())===i&&(e=Xa()),e}function Ea(){var t;return 124===e.charCodeAt(fa)?(t=g,fa++):(t=i,0===Ba&&_a(Jt)),t}function La(){var t;return e.substr(fa,4)===d?(t=d,fa+=4):(t=i,0===Ba&&_a($t)),t===i&&(e.substr(fa,3)===T?(t=T,fa+=3):(t=i,0===Ba&&_a(Wt)),t===i&&(e.substr(fa,2)===f?(t=f,fa+=2):(t=i,0===Ba&&_a(zt)))),t}function Ia(){var t,r;return t=fa,Ea()!==i?(r=function(){var t;return e.substr(fa,4)===m?(t=m,fa+=4):(t=i,0===Ba&&_a(Ht)),t}(),r!==i?t=Lo(r):(fa=t,t=i)):(fa=t,t=i),t}function Ra(){var t,r,o,n,a,s,l;if(t=fa,Ia()!==i){for(r=fa,o=fa,n=[],a=e.charAt(fa),Ot.test(a)?fa++:(a=i,0===Ba&&_a(qt));a!==i;)n.push(a),a=e.charAt(fa),Ot.test(a)?fa++:(a=i,0===Ba&&_a(qt));(a=As())!==i?o=n=[n,a]:(fa=o,o=i),(r=o!==i?e.substring(r,fa):o)!==i?t=Ro():(fa=t,t=i)}else fa=t,t=i;if(t===i)if(t=fa,Ia()!==i)if(58===e.charCodeAt(fa)?(r=h,fa++):(r=i,0===Ba&&_a(Xt)),r!==i)if(o=function(){var t,r,o;e.substr(fa,9)===b?(t=b,fa+=9):(t=i,0===Ba&&_a(Yt));if(t===i&&(e.substr(fa,9)===B?(t=B,fa+=9):(t=i,0===Ba&&_a(Qt)),t===i&&(e.substr(fa,10)===v?(t=v,fa+=10):(t=i,0===Ba&&_a(Zt)),t===i))){if(t=fa,r=[],(o=Ks())!==i)for(;o!==i;)r.push(o),o=Ks();else r=i;(t=r!==i?e.substring(t,fa):r)===i&&(t="")}return t}(),o!==i){for(n=fa,a=fa,s=[],l=e.charAt(fa),Ot.test(l)?fa++:(l=i,0===Ba&&_a(qt));l!==i;)s.push(l),l=e.charAt(fa),Ot.test(l)?fa++:(l=i,0===Ba&&_a(qt));(l=As())!==i?a=s=[s,l]:(fa=a,a=i),(n=a!==i?e.substring(n,fa):a)!==i?t=Fo(o):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;else fa=t,t=i;return t}function Fa(){var t,r,o,n,a,s;if(t=fa,r=fa,Ba++,o=Sa(),Ba--,o===i?r=void 0:(fa=r,r=i),r!==i){if(o=fa,n=fa,a=[],(s=Ks())!==i)for(;s!==i;)a.push(s),s=Ks();else a=i;a!==i&&(s=As())!==i?n=a=[a,s]:(fa=n,n=i),(o=n!==i?e.substring(o,fa):n)!==i?t=Oo(o):(fa=t,t=i)}else fa=t,t=i;return t===i&&(t=_s()),t}function Na(){var t;return e.substr(fa,2)===C?(t=C,fa+=2):(t=i,0===Ba&&_a(er)),t}function Oa(){var t;return e.substr(fa,3)===x?(t=x,fa+=3):(t=i,0===Ba&&_a(tr)),t}function Va(){var t,r,o,n,a;if(t=fa,r=fa,8226===e.charCodeAt(fa)?(o=P,fa++):(o=i,0===Ba&&_a(rr)),o!==i){if(n=[],a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir));else n=i;n!==i?(32===e.charCodeAt(fa)?(a=k,fa++):(a=i,0===Ba&&_a(or)),a!==i?r=o=[o,n,a]:(fa=r,r=i)):(fa=r,r=i)}else fa=r,r=i;return t=r!==i?e.substring(t,fa):r}function Ga(){var t,r,o,n,a;if(t=fa,r=fa,8226===e.charCodeAt(fa)?(o=P,fa++):(o=i,0===Ba&&_a(rr)),o!==i){if(n=[],a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir));else n=i;n!==i?(e.substr(fa,2)===_?(a=_,fa+=2):(a=i,0===Ba&&_a(nr)),a!==i?r=o=[o,n,a]:(fa=r,r=i)):(fa=r,r=i)}else fa=r,r=i;return t=r!==i?e.substring(t,fa):r}function ja(){var t,r,o,n,a;if(t=fa,r=fa,8226===e.charCodeAt(fa)?(o=P,fa++):(o=i,0===Ba&&_a(rr)),o!==i){if(n=[],a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir));else n=i;n!==i?(e.substr(fa,2)===K?(a=K,fa+=2):(a=i,0===Ba&&_a(ar)),a!==i?r=o=[o,n,a]:(fa=r,r=i)):(fa=r,r=i)}else fa=r,r=i;return t=r!==i?e.substring(t,fa):r}function Da(){var t;return e.substr(fa,3)===A?(t=A,fa+=3):(t=i,0===Ba&&_a(sr)),t}function Ma(){var t;return e.substr(fa,3)===w?(t=w,fa+=3):(t=i,0===Ba&&_a(lr)),t}function Ua(){var t;return e.substr(fa,3)===S?(t=S,fa+=3):(t=i,0===Ba&&_a(pr)),t===i&&(e.substr(fa,3)===E?(t=E,fa+=3):(t=i,0===Ba&&_a(cr))),t}function Ja(){var e;return(e=Na())===i&&(e=Oa())===i&&(e=Va())===i&&(e=Ga())===i&&(e=ja())===i&&(e=Da())===i&&(e=Ma())===i&&(e=Ua()),e}function $a(){var t,r,o,n,a,s,l,p;if(t=fa,za()!==i)if((r=Ja())!==i){for(o=fa,n=fa,a=[],s=fa,l=fa,Ba++,p=_s(),Ba--,p===i?l=void 0:(fa=l,l=i),l!==i?(e.length>fa?(p=e.charAt(fa),fa++):(p=i,0===Ba&&_a(Mt)),p!==i?s=l=[l,p]:(fa=s,s=i)):(fa=s,s=i);s!==i;)a.push(s),s=fa,l=fa,Ba++,p=_s(),Ba--,p===i?l=void 0:(fa=l,l=i),l!==i?(e.length>fa?(p=e.charAt(fa),fa++):(p=i,0===Ba&&_a(Mt)),p!==i?s=l=[l,p]:(fa=s,s=i)):(fa=s,s=i);for((s=_s())===i&&(s=null),n=a=[a,s],o=e.substring(o,fa),n=[],a=Wa();a!==i;)n.push(a),a=Wa();if(a=fa,s=function(){var t,r,o,n;t=fa,Ba++,r=fa,o=[],9===e.charCodeAt(fa)?(n=L,fa++):(n=i,0===Ba&&_a(ur));if(n!==i)for(;n!==i;)o.push(n),9===e.charCodeAt(fa)?(n=L,fa++):(n=i,0===Ba&&_a(ur));else o=i;o!==i?(n=(n=nn(o))?void 0:i)!==i?r=an(o):(fa=r,r=i):(fa=r,r=i);Ba--,r!==i?(fa=t,t=void 0):t=i;return t}(),s!==i){for(l=[],p=$a();p!==i;)l.push(p),p=$a();p=function(){var e;e=sn(),e=e?void 0:i;return e}(),p!==i?a=en(r,o,n,l):(fa=a,a=i)}else fa=a,a=i;a===i&&(a=null),t=tn(r,o,n,a)}else fa=t,t=i;else fa=t,t=i;return t}function Wa(){var t,r,o,n,a,s,l,p,c,u;if(t=fa,r=fa,Ba++,o=function(){var t,r,o;t=fa,r=[],o=e.charAt(fa),Ot.test(o)?fa++:(o=i,0===Ba&&_a(qt));for(;o!==i;)r.push(o),o=e.charAt(fa),Ot.test(o)?fa++:(o=i,0===Ba&&_a(qt));o=_s(),o!==i?t=r=[r,o]:(fa=t,t=i);return t}(),Ba--,o===i?r=void 0:(fa=r,r=i),r!==i)if((o=za())!==i)if(n=fa,Ba++,a=Ja(),Ba--,a===i?n=void 0:(fa=n,n=i),n!==i){if(a=fa,s=fa,l=[],p=fa,c=fa,Ba++,u=_s(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(e.length>fa?(u=e.charAt(fa),fa++):(u=i,0===Ba&&_a(Mt)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=fa,c=fa,Ba++,u=_s(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(e.length>fa?(u=e.charAt(fa),fa++):(u=i,0===Ba&&_a(Mt)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i);else l=i;l!==i&&(p=As())!==i?s=l=[l,p]:(fa=s,s=i),(a=s!==i?e.substring(a,fa):s)!==i?t=rn(a):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;else fa=t,t=i;return t}function za(){var t,r,o;for(t=fa,r=[],9===e.charCodeAt(fa)?(o=L,fa++):(o=i,0===Ba&&_a(ur));o!==i;)r.push(o),9===e.charCodeAt(fa)?(o=L,fa++):(o=i,0===Ba&&_a(ur));return(o=(o=on(r))?void 0:i)!==i?t=r=[r,o]:(fa=t,t=i),t}function Ha(){var t,r,o;if(t=fa,r=[],(o=qa())!==i)for(;o!==i;)r.push(o),o=qa();else r=i;return t=r!==i?e.substring(t,fa):r}function qa(){var t,r,o,n,a,s;if(t=fa,r=fa,Ba++,o=Sa(),Ba--,o===i?r=void 0:(fa=r,r=i),r!==i){if(o=fa,n=fa,a=[],(s=Ks())!==i)for(;s!==i;)a.push(s),s=Ks();else a=i;a!==i&&(s=As())!==i?n=a=[a,s]:(fa=n,n=i),(o=n!==i?e.substring(o,fa):n)!==i?t=r=[r,o]:(fa=t,t=i)}else fa=t,t=i;return t===i&&(t=_s()),t}function Xa(){var t,r,o,n,a,s;if(t=fa,(r=Ea())!==i){for(o=fa,n=fa,a=[],s=e.charAt(fa),Ot.test(s)?fa++:(s=i,0===Ba&&_a(qt));s!==i;)a.push(s),s=e.charAt(fa),Ot.test(s)?fa++:(s=i,0===Ba&&_a(qt));(s=As())!==i?n=a=[a,s]:(fa=n,n=i),(o=n!==i?e.substring(o,fa):n)!==i?((n=_s())===i&&(n=null),t=r=[r,o,n]):(fa=t,t=i)}else fa=t,t=i;return t}function Ya(){var t,r;return t=fa,Ea()!==i?(r=function(){var t;return e.substr(fa,5)===I?(t=I,fa+=5):(t=i,0===Ba&&_a(yr)),t}(),r!==i?t=un(r):(fa=t,t=i)):(fa=t,t=i),t}function Qa(){var t,r,o,n,a,s,l,p,c,u,y,g;if(t=fa,(r=Ya())!==i)if(58===e.charCodeAt(fa)?(o=h,fa++):(o=i,0===Ba&&_a(Xt)),o!==i)if(32===e.charCodeAt(fa)?(n=k,fa++):(n=i,0===Ba&&_a(or)),n===i&&(n=null),a=function(){var t,r,o,n,a,s,l,p,c;t=fa,r=fa,e.substr(fa,4)===It?(o=It,fa+=4):(o=i,0===Ba&&_a(bo));if(o!==i)if(115===e.charCodeAt(fa)?(n=Rt,fa++):(n=i,0===Ba&&_a(Bo)),n===i&&(n=null),e.substr(fa,3)===Ft?(a=Ft,fa+=3):(a=i,0===Ba&&_a(vo)),a!==i){for(s=[],l=fa,p=fa,Ba++,c=Ea(),Ba--,c===i?p=void 0:(fa=p,p=i),p!==i&&(c=Ss())!==i?l=p=[p,c]:(fa=l,l=i);l!==i;)s.push(l),l=fa,p=fa,Ba++,c=Ea(),Ba--,c===i?p=void 0:(fa=p,p=i),p!==i&&(c=Ss())!==i?l=p=[p,c]:(fa=l,l=i);r=o=[o,n,a,s]}else fa=r,r=i;else fa=r,r=i;t=r!==i?e.substring(t,fa):r;return t}(),a!==i){for(s=[],32===e.charCodeAt(fa)?(l=k,fa++):(l=i,0===Ba&&_a(or));l!==i;)s.push(l),32===e.charCodeAt(fa)?(l=k,fa++):(l=i,0===Ba&&_a(or));if((l=Ea())!==i){for(p=Za(),c=fa,u=fa,y=[],g=e.charAt(fa),Ot.test(g)?fa++:(g=i,0===Ba&&_a(qt));g!==i;)y.push(g),g=e.charAt(fa),Ot.test(g)?fa++:(g=i,0===Ba&&_a(qt));(g=As())!==i?u=y=[y,g]:(fa=u,u=i),(c=u!==i?e.substring(c,fa):u)!==i?((u=_s())===i&&(u=null),t=yn(r,a,p)):(fa=t,t=i)}else fa=t,t=i}else fa=t,t=i;else fa=t,t=i;else fa=t,t=i;return t}function Za(){var e,t,r;for(e=fa,t=[],r=es();r!==i;)t.push(r),r=es();return e=t=gn(t)}function es(){var t,r,o,n,a,s,l,p,c,u;if(t=fa,35===e.charCodeAt(fa)?(r=R,fa++):(r=i,0===Ba&&_a(gr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=dn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=ts())!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));if(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(u=e.charAt(fa),Vt.test(u)?fa++:(u=i,0===Ba&&_a(ir)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(u=e.charAt(fa),Vt.test(u)?fa++:(u=i,0===Ba&&_a(ir)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i);else l=i;if((s=l!==i?e.substring(s,fa):l)!==i){for(l=[],32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));p!==i;)l.push(p),32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));(p=Ea())!==i?t=Tn(o,s):(fa=t,t=i)}else fa=t,t=i}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),o=function(){var t;e.substr(fa,3)===U?(t=U,fa+=3):(t=i,0===Ba&&_a(Cr));t===i&&(e.substr(fa,7)===J?(t=J,fa+=7):(t=i,0===Ba&&_a(xr)));return t}(),o!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));for(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);s=e.substring(s,fa),(l=Ea())!==i?t=fn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),o=function(){var t;e.substr(fa,9)===V?(t=V,fa+=9):(t=i,0===Ba&&_a(mr));t===i&&(e.substr(fa,12)===G?(t=G,fa+=12):(t=i,0===Ba&&_a(hr)));return t}(),o!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));if(s=function(){var t;e.substr(fa,4)===j?(t=j,fa+=4):(t=i,0===Ba&&_a(br));t===i&&(e.substr(fa,6)===D?(t=D,fa+=6):(t=i,0===Ba&&_a(Br)),t===i&&(e.substr(fa,5)===M?(t=M,fa+=5):(t=i,0===Ba&&_a(vr))));return t}(),s!==i){for(l=[],32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));p!==i;)l.push(p),32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));(p=Ea())!==i?t=mn(o,s):(fa=t,t=i)}else fa=t,t=i}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=rs())!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));if(s=function(){var t;e.substr(fa,4)===W?(t=W,fa+=4):(t=i,0===Ba&&_a(kr));t===i&&(e.substr(fa,5)===z?(t=z,fa+=5):(t=i,0===Ba&&_a(_r)));return t}(),s!==i){for(l=[],32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));p!==i;)l.push(p),32===e.charCodeAt(fa)?(p=k,fa++):(p=i,0===Ba&&_a(or));(p=Ea())!==i?t=hn(o,s):(fa=t,t=i)}else fa=t,t=i}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=rs())!==i){for(n=[],32===e.charCodeAt(fa)?(a=k,fa++):(a=i,0===Ba&&_a(or));a!==i;)n.push(a),32===e.charCodeAt(fa)?(a=k,fa++):(a=i,0===Ba&&_a(or));(a=Ea())!==i?t=bn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i&&(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=Ea())!==i?t=Bn():(fa=t,t=i),t===i)){for(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=vn(o):(fa=t,t=i)}}}}}}return t}function ts(){var t;return e.substr(fa,5)===N?(t=N,fa+=5):(t=i,0===Ba&&_a(Tr)),t===i&&(e.substr(fa,6)===O?(t=O,fa+=6):(t=i,0===Ba&&_a(fr))),t}function rs(){var t;return e.substr(fa,12)===$?(t=$,fa+=12):(t=i,0===Ba&&_a(Pr)),t}function is(){var e,t,r,o;for(e=fa,(t=os())===i&&(t=null),r=[],(o=ss())===i&&(o=os());o!==i;)r.push(o),(o=ss())===i&&(o=os());return e=xn(t,r)}function os(){var t,r,o,n,a,s,l;if(t=fa,(r=_s())!==i&&(r=Pn()),(t=r)===i){if(t=fa,r=fa,o=[],n=fa,(a=ls())===i&&(a=null),s=fa,Ba++,l=ss(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?n=a=[a,s,l]:(fa=n,n=i),n===i&&(n=fa,(a=ls())!==i?(s=fa,Ba++,l=ss(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=fa,(a=ls())===i&&(a=null),s=fa,Ba++,l=ss(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?n=a=[a,s,l]:(fa=n,n=i),n===i&&(n=fa,(a=ls())!==i?(s=fa,Ba++,l=ss(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i));else o=i;(r=o!==i?e.substring(r,fa):o)!==i&&(r=kn(r)),t=r}return t}function ns(){var t;return 61===e.charCodeAt(fa)?(t=H,fa++):(t=i,0===Ba&&_a(Ar)),t}function as(){var e,t,r;return e=fa,(t=ns())!==i&&(r=ns())!==i?e=t=[t,r]:(fa=e,e=i),e}function ss(){var t,r,o,n,a,s,l,p;if(t=fa,(r=Cs())!==i){if(o=fa,n=[],a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(fa),Vt.test(a)?fa++:(a=i,0===Ba&&_a(ir));else n=i;(o=n!==i?e.substring(o,fa):n)!==i&&(n=xs())!==i?t=_n(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=as())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=as())!==i?(e.substr(fa,7)===q?(a=q,fa+=7):(a=i,0===Ba&&_a(wr)),a!==i?t=Kn(o):(fa=t,t=i)):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=as())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=as())!==i?(e.substr(fa,13)===X?(a=X,fa+=13):(a=i,0===Ba&&_a(Sr)),a!==i&&(s=ws())!==i?(124===e.charCodeAt(fa)?(l=g,fa++):(l=i,0===Ba&&_a(Jt)),l!==i?(p=function(){var e,t,r;e=fa,t=[],r=ps();for(;r!==i;)t.push(r),r=ps();return t=Nn(t),e=t,e}(),t=An(o,s,p)):(fa=t,t=i)):(fa=t,t=i)):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=as())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=as(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=as())!==i?(a=function(){var t,r,o,n;t=fa,124===e.charCodeAt(fa)?(r=g,fa++):(r=i,0===Ba&&_a(Jt));if(r!==i){if(o=[],(n=cs())!==i)for(;n!==i;)o.push(n),n=cs();else o=i;o!==i?t=Fn(o):(fa=t,t=i)}else fa=t,t=i;return t}(),a!==i?t=wn(o,a):(fa=t,t=i)):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=hs())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=hs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=hs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=hs())!==i?t=Sn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=bs())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=bs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=bs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=bs())!==i?t=En(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=Bs())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Bs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Bs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=Bs())!==i?t=Ln(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,(r=vs())!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=vs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=vs(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?(e.length>fa?(l=e.charAt(fa),fa++):(l=i,0===Ba&&_a(Mt)),l!==i?a=s=[s,l]:(fa=a,a=i)):(fa=a,a=i);o=e.substring(o,fa),(n=vs())!==i?t=In(o):(fa=t,t=i)}else fa=t,t=i;t===i&&(t=fa,(r=ws())!==i&&(r=Rn(r)),t=r)}}}}}}}return t}function ls(){var t,r,o,n,a;if(t=fa,r=fa,(o=as())!==i){if(n=[],(a=ns())!==i)for(;a!==i;)n.push(a),a=ns();else n=i;n!==i?r=o=[o,n]:(fa=r,r=i)}else fa=r,r=i;if((t=r!==i?e.substring(t,fa):r)===i){if(t=fa,r=fa,(o=Bs())!==i){if(n=[],(a=fs())!==i)for(;a!==i;)n.push(a),a=fs();else n=i;n!==i?r=o=[o,n]:(fa=r,r=i)}else fa=r,r=i;if((t=r!==i?e.substring(t,fa):r)===i){if(t=fa,r=fa,(o=vs())!==i){if(n=[],(a=ms())!==i)for(;a!==i;)n.push(a),a=ms();else n=i;n!==i?r=o=[o,n]:(fa=r,r=i)}else fa=r,r=i;t=r!==i?e.substring(t,fa):r}}return t}function ps(){var t,r,o,n,a,s,l,p,c,u;if(t=fa,35===e.charCodeAt(fa)?(r=R,fa++):(r=i,0===Ba&&_a(gr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=On(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=ts())!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));if(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(u=e.charAt(fa),Vt.test(u)?fa++:(u=i,0===Ba&&_a(ir)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i),p!==i)for(;p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i?(u=e.charAt(fa),Vt.test(u)?fa++:(u=i,0===Ba&&_a(ir)),u!==i?p=c=[c,u]:(fa=p,p=i)):(fa=p,p=i);else l=i;(s=l!==i?e.substring(s,fa):l)!==i&&(l=Ea())!==i?t=Vn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),(o=ts())!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));for(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);s=e.substring(s,fa),(l=Ea())!==i?t=Gn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;if(t===i){if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),e.substr(fa,17)===Y?(o=Y,fa+=17):(o=i,0===Ba&&_a(Er)),o!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s=function(){var t;e.substr(fa,3)===Z?(t=Z,fa+=3):(t=i,0===Ba&&_a(Ir));t===i&&(e.substr(fa,6)===ee?(t=ee,fa+=6):(t=i,0===Ba&&_a(Rr)),t===i&&(e.substr(fa,6)===te?(t=te,fa+=6):(t=i,0===Ba&&_a(Fr)),t===i&&(e.substr(fa,8)===re?(t=re,fa+=8):(t=i,0===Ba&&_a(Nr)),t===i&&(e.substr(fa,3)===ie?(t=ie,fa+=3):(t=i,0===Ba&&_a(Or)),t===i&&(e.substr(fa,5)===oe?(t=oe,fa+=5):(t=i,0===Ba&&_a(Vr)),t===i&&(e.substr(fa,11)===ne?(t=ne,fa+=11):(t=i,0===Ba&&_a(Gr)),t===i&&(e.substr(fa,8)===ae?(t=ae,fa+=8):(t=i,0===Ba&&_a(jr)))))))));return t}(),s!==i&&(l=Ea())!==i?t=jn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i;if(t===i)if(t=fa,64===e.charCodeAt(fa)?(r=F,fa++):(r=i,0===Ba&&_a(dr)),r===i&&(r=null),e.substr(fa,4)===Q?(o=Q,fa+=4):(o=i,0===Ba&&_a(Lr)),o!==i)if(58===e.charCodeAt(fa)?(n=h,fa++):(n=i,0===Ba&&_a(Xt)),n!==i){for(a=[],32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s!==i;)a.push(s),32===e.charCodeAt(fa)?(s=k,fa++):(s=i,0===Ba&&_a(or));s=function(){var t;e.substr(fa,11)===se?(t=se,fa+=11):(t=i,0===Ba&&_a(Dr));t===i&&(e.substr(fa,11)===le?(t=le,fa+=11):(t=i,0===Ba&&_a(Mr)),t===i&&(e.substr(fa,5)===oe?(t=oe,fa+=5):(t=i,0===Ba&&_a(Vr)),t===i&&(e.substr(fa,3)===ie?(t=ie,fa+=3):(t=i,0===Ba&&_a(Or)),t===i&&(e.substr(fa,8)===pe?(t=pe,fa+=8):(t=i,0===Ba&&_a(Ur))))));return t}(),s!==i&&(l=Ea())!==i?t=Dn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i}}}return t}function cs(){var t,r,o,n,a,s,l,p,c,u,y;if(t=fa,e.substr(fa,5)===ce?(r=ce,fa+=5):(r=i,0===Ba&&_a(Jr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=Mn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,7)===ue?(r=ue,fa+=7):(r=i,0===Ba&&_a($r)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);if(o=e.substring(o,fa),n=function(){var e,t;e=[],t=us();for(;t!==i;)e.push(t),t=us();return e}(),(a=Ea())!==i)if(e.substr(fa,9)===ye?(s=ye,fa+=9):(s=i,0===Ba&&_a(Wr)),s!==i){for(l=fa,p=[],c=fa,u=fa,Ba++,y=Ea(),Ba--,y===i?u=void 0:(fa=u,u=i),u!==i&&(y=Ks())!==i?c=u=[u,y]:(fa=c,c=i);c!==i;)p.push(c),c=fa,u=fa,Ba++,y=Ea(),Ba--,y===i?u=void 0:(fa=u,u=i),u!==i&&(y=Ks())!==i?c=u=[u,y]:(fa=c,c=i);l=e.substring(l,fa),(p=Ea())!==i?t=Un(o,n,l):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,5)===ge?(r=ge,fa+=5):(r=i,0===Ba&&_a(zr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);if(o=e.substring(o,fa),(n=Ea())!==i)if(9658===e.charCodeAt(fa)?(a=de,fa++):(a=i,0===Ba&&_a(Hr)),a!==i){for(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);s=e.substring(s,fa),(l=Ea())!==i?t=Jn(o,s):(fa=t,t=i)}else fa=t,t=i;else fa=t,t=i}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,5)===ge?(r=ge,fa+=5):(r=i,0===Ba&&_a(zr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=$n(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,9658===e.charCodeAt(fa)?(r=de,fa++):(r=i,0===Ba&&_a(Hr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=Wn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,7)===Te?(r=Te,fa+=7):(r=i,0===Ba&&_a(qr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?(a=Za(),t=zn(o,a)):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,9)===fe?(r=fe,fa+=9):(r=i,0===Ba&&_a(Xr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=Hn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,10)===me?(r=me,fa+=10):(r=i,0===Ba&&_a(Yr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=qn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,4)===he?(r=he,fa+=4):(r=i,0===Ba&&_a(Qr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=Xn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i&&(t=fa,e.substr(fa,4)===m?(r=m,fa+=4):(r=i,0===Ba&&_a(Ht)),r!==i&&(o=Ea())!==i?t=Yn():(fa=t,t=i),t===i)){if(t=fa,e.substr(fa,5)===be?(r=be,fa+=5):(r=i,0===Ba&&_a(Zr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=Qn(o):(fa=t,t=i)}else fa=t,t=i;if(t===i&&(t=fa,e.substr(fa,5)===Be?(r=Be,fa+=5):(r=i,0===Ba&&_a(ei)),r!==i&&(o=Ea())!==i?t=Zn():(fa=t,t=i),t===i)){if(t=fa,e.substr(fa,6)===ve?(r=ve,fa+=6):(r=i,0===Ba&&_a(ti)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=ea(o):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,e.substr(fa,9)===Ce?(r=Ce,fa+=9):(r=i,0===Ba&&_a(ri)),r!==i){if(o=fa,n=fa,80===e.charCodeAt(fa)?(a=xe,fa++):(a=i,0===Ba&&_a(ii)),a!==i){for(s=fa,l=[],p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);p!==i;)l.push(p),p=fa,c=fa,Ba++,u=Ea(),Ba--,u===i?c=void 0:(fa=c,c=i),c!==i&&(u=Ks())!==i?p=c=[c,u]:(fa=p,p=i);n=a=[a,s=e.substring(s,fa)]}else fa=n,n=i;(o=n!==i?e.substring(o,fa):n)!==i&&(n=Ea())!==i?t=ta(o):(fa=t,t=i)}else fa=t,t=i;if(t===i&&(t=fa,e.substr(fa,6)===Pe?(r=Pe,fa+=6):(r=i,0===Ba&&_a(oi)),r!==i?(o=function(){var t;e.substr(fa,4)===rt?(t=rt,fa+=4):(t=i,0===Ba&&_a(Ni));t===i&&(e.substr(fa,5)===it?(t=it,fa+=5):(t=i,0===Ba&&_a(Oi)),t===i&&(e.substr(fa,4)===ot?(t=ot,fa+=4):(t=i,0===Ba&&_a(Vi)),t===i&&(e.substr(fa,5)===nt?(t=nt,fa+=5):(t=i,0===Ba&&_a(Gi)),t===i&&(e.substr(fa,7)===at?(t=at,fa+=7):(t=i,0===Ba&&_a(ji)),t===i&&(e.substr(fa,9)===st?(t=st,fa+=9):(t=i,0===Ba&&_a(Di)),t===i&&(e.substr(fa,4)===lt?(t=lt,fa+=4):(t=i,0===Ba&&_a(Mi)),t===i&&(e.substr(fa,8)===pt?(t=pt,fa+=8):(t=i,0===Ba&&_a(Ui)),t===i&&(e.substr(fa,5)===ct?(t=ct,fa+=5):(t=i,0===Ba&&_a(Ji)),t===i&&(e.substr(fa,4)===ut?(t=ut,fa+=4):(t=i,0===Ba&&_a($i)),t===i&&(e.substr(fa,7)===yt?(t=yt,fa+=7):(t=i,0===Ba&&_a(Wi)),t===i&&(e.substr(fa,6)===gt?(t=gt,fa+=6):(t=i,0===Ba&&_a(zi)),t===i&&(e.substr(fa,4)===dt?(t=dt,fa+=4):(t=i,0===Ba&&_a(Hi)),t===i&&(e.substr(fa,5)===Tt?(t=Tt,fa+=5):(t=i,0===Ba&&_a(qi)),t===i&&(e.substr(fa,6)===ft?(t=ft,fa+=6):(t=i,0===Ba&&_a(Xi)),t===i&&(e.substr(fa,4)===mt?(t=mt,fa+=4):(t=i,0===Ba&&_a(Yi)),t===i&&(e.substr(fa,6)===ht?(t=ht,fa+=6):(t=i,0===Ba&&_a(Qi)),t===i&&(e.substr(fa,3)===bt?(t=bt,fa+=3):(t=i,0===Ba&&_a(Zi)),t===i&&(e.substr(fa,6)===Bt?(t=Bt,fa+=6):(t=i,0===Ba&&_a(eo)),t===i&&(e.substr(fa,4)===vt?(t=vt,fa+=4):(t=i,0===Ba&&_a(to)),t===i&&(e.substr(fa,6)===Ct?(t=Ct,fa+=6):(t=i,0===Ba&&_a(ro)),t===i&&(e.substr(fa,5)===xt?(t=xt,fa+=5):(t=i,0===Ba&&_a(io)),t===i&&(e.substr(fa,6)===Pt?(t=Pt,fa+=6):(t=i,0===Ba&&_a(oo))))))))))))))))))))))));return t}(),o!==i&&(n=Ea())!==i?t=ra(o):(fa=t,t=i)):(fa=t,t=i),t===i&&(t=fa,r=function(){var t;e.substr(fa,4)===_e?(t=_e,fa+=4):(t=i,0===Ba&&_a(ai));t===i&&(e.substr(fa,6)===Ke?(t=Ke,fa+=6):(t=i,0===Ba&&_a(si)),t===i&&(e.substr(fa,5)===Ae?(t=Ae,fa+=5):(t=i,0===Ba&&_a(li)),t===i&&(e.substr(fa,9)===we?(t=we,fa+=9):(t=i,0===Ba&&_a(pi)),t===i&&(e.substr(fa,6)===Se?(t=Se,fa+=6):(t=i,0===Ba&&_a(ci)),t===i&&(e.substr(fa,9)===Ee?(t=Ee,fa+=9):(t=i,0===Ba&&_a(ui)),t===i&&(e.substr(fa,11)===Le?(t=Le,fa+=11):(t=i,0===Ba&&_a(yi)),t===i&&(e.substr(fa,3)===Ie?(t=Ie,fa+=3):(t=i,0===Ba&&_a(gi)),t===i&&(e.substr(fa,3)===Re?(t=Re,fa+=3):(t=i,0===Ba&&_a(di)),t===i&&(e.substr(fa,9)===Fe?(t=Fe,fa+=9):(t=i,0===Ba&&_a(Ti)),t===i&&(e.substr(fa,15)===Ne?(t=Ne,fa+=15):(t=i,0===Ba&&_a(fi)),t===i&&(e.substr(fa,6)===Oe?(t=Oe,fa+=6):(t=i,0===Ba&&_a(mi)),t===i&&(e.substr(fa,13)===Ve?(t=Ve,fa+=13):(t=i,0===Ba&&_a(hi)),t===i&&(e.substr(fa,16)===Ge?(t=Ge,fa+=16):(t=i,0===Ba&&_a(bi)),t===i&&(e.substr(fa,16)===je?(t=je,fa+=16):(t=i,0===Ba&&_a(Bi)),t===i&&(e.substr(fa,15)===De?(t=De,fa+=15):(t=i,0===Ba&&_a(vi)),t===i&&(e.substr(fa,14)===Me?(t=Me,fa+=14):(t=i,0===Ba&&_a(Ci)),t===i&&(e.substr(fa,16)===Ue?(t=Ue,fa+=16):(t=i,0===Ba&&_a(xi)),t===i&&(e.substr(fa,14)===Je?(t=Je,fa+=14):(t=i,0===Ba&&_a(Pi)),t===i&&(e.substr(fa,15)===$e?(t=$e,fa+=15):(t=i,0===Ba&&_a(ki)),t===i&&(e.substr(fa,15)===We?(t=We,fa+=15):(t=i,0===Ba&&_a(_i)),t===i&&(e.substr(fa,15)===ze?(t=ze,fa+=15):(t=i,0===Ba&&_a(Ki)),t===i&&(e.substr(fa,14)===He?(t=He,fa+=14):(t=i,0===Ba&&_a(Ai)),t===i&&(e.substr(fa,10)===qe?(t=qe,fa+=10):(t=i,0===Ba&&_a(wi)),t===i&&(e.substr(fa,13)===Xe?(t=Xe,fa+=13):(t=i,0===Ba&&_a(Si)),t===i&&(e.substr(fa,19)===Ye?(t=Ye,fa+=19):(t=i,0===Ba&&_a(Ei)),t===i&&(e.substr(fa,10)===Qe?(t=Qe,fa+=10):(t=i,0===Ba&&_a(Li)),t===i&&(e.substr(fa,10)===Ze?(t=Ze,fa+=10):(t=i,0===Ba&&_a(Ii)),t===i&&(e.substr(fa,13)===et?(t=et,fa+=13):(t=i,0===Ba&&_a(Ri)),t===i&&(e.substr(fa,11)===tt?(t=tt,fa+=11):(t=i,0===Ba&&_a(Fi)))))))))))))))))))))))))))))));return t}(),r!==i&&(o=Ea())!==i?t=ia(r):(fa=t,t=i),t===i)))if(t=fa,35===e.charCodeAt(fa)?(r=R,fa++):(r=i,0===Ba&&_a(gr)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),(n=Ea())!==i?t=oa(o):(fa=t,t=i)}else fa=t,t=i}}}}}}}}}}}return t}function us(){var t,r,o,n,a,s,l;if(t=fa,e.substr(fa,2)===ke?(r=ke,fa+=2):(r=i,0===Ba&&_a(ni)),r!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),t=na(o)}else fa=t,t=i;return t}function ys(){var e,t,r,o;for(Ba++,e=fa,(t=gs())===i&&(t=null),r=[],(o=Ps())===i&&(o=gs());o!==i;)r.push(o),(o=Ps())===i&&(o=gs());return e=sa(t,r),Ba--,t=i,0===Ba&&_a(ao),e}function gs(){var t,r,o,n,a,s,l;if(t=fa,(r=_s())!==i&&(r=la()),(t=r)===i){if(t=fa,r=fa,o=[],n=fa,(a=ks())===i&&(a=null),s=fa,Ba++,l=Ps(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?n=a=[a,s,l]:(fa=n,n=i),n===i&&(n=fa,(a=ks())!==i?(s=fa,Ba++,l=Ps(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=fa,(a=ks())===i&&(a=null),s=fa,Ba++,l=Ps(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ks())!==i?n=a=[a,s,l]:(fa=n,n=i),n===i&&(n=fa,(a=ks())!==i?(s=fa,Ba++,l=Ps(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i));else o=i;(r=o!==i?e.substring(r,fa):o)!==i&&(r=pa(r)),t=r}return t}function ds(){var t;return 42===e.charCodeAt(fa)?(t=kt,fa++):(t=i,0===Ba&&_a(so)),t}function Ts(){var t;return 95===e.charCodeAt(fa)?(t=_t,fa++):(t=i,0===Ba&&_a(lo)),t}function fs(){var t;return 96===e.charCodeAt(fa)?(t=Kt,fa++):(t=i,0===Ba&&_a(po)),t}function ms(){var t;return 33===e.charCodeAt(fa)?(t=At,fa++):(t=i,0===Ba&&_a(co)),t}function hs(){var e,t,r;return e=fa,(t=ds())!==i&&(r=ds())!==i?e=t=[t,r]:(fa=e,e=i),e}function bs(){var e,t,r;return e=fa,(t=Ts())!==i&&(r=Ts())!==i?e=t=[t,r]:(fa=e,e=i),e}function Bs(){var e,t,r;return e=fa,(t=fs())!==i&&(r=fs())!==i?e=t=[t,r]:(fa=e,e=i),e}function vs(){var e,t,r;return e=fa,(t=ms())!==i&&(r=ms())!==i?e=t=[t,r]:(fa=e,e=i),e}function Cs(){var t;return e.substr(fa,2)===wt?(t=wt,fa+=2):(t=i,0===Ba&&_a(uo)),t}function xs(){var t;return 93===e.charCodeAt(fa)?(t=St,fa++):(t=i,0===Ba&&_a(yo)),t}function Ps(){var t,r,o,n,a,s;if(t=fa,Cs()!==i){if(r=fa,o=[],n=e.charAt(fa),Vt.test(n)?fa++:(n=i,0===Ba&&_a(ir)),n!==i)for(;n!==i;)o.push(n),n=e.charAt(fa),Vt.test(n)?fa++:(n=i,0===Ba&&_a(ir));else o=i;(r=o!==i?e.substring(r,fa):o)!==i&&(o=xs())!==i?t=ca(r):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,hs()!==i){for(r=fa,o=[],n=fa,a=fa,Ba++,s=hs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);n!==i;)o.push(n),n=fa,a=fa,Ba++,s=hs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);r=e.substring(r,fa),(o=hs())!==i?t=ua(r):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,bs()!==i){for(r=fa,o=[],n=fa,a=fa,Ba++,s=bs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);n!==i;)o.push(n),n=fa,a=fa,Ba++,s=bs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);r=e.substring(r,fa),(o=bs())!==i?t=ya(r):(fa=t,t=i)}else fa=t,t=i;if(t===i){if(t=fa,Bs()!==i){for(r=fa,o=[],n=fa,a=fa,Ba++,s=Bs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);n!==i;)o.push(n),n=fa,a=fa,Ba++,s=Bs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);r=e.substring(r,fa),(o=Bs())!==i?t=ga(r):(fa=t,t=i)}else fa=t,t=i;if(t===i)if(t=fa,vs()!==i){for(r=fa,o=[],n=fa,a=fa,Ba++,s=vs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);n!==i;)o.push(n),n=fa,a=fa,Ba++,s=vs(),Ba--,s===i?a=void 0:(fa=a,a=i),a!==i?(e.length>fa?(s=e.charAt(fa),fa++):(s=i,0===Ba&&_a(Mt)),s!==i?n=a=[a,s]:(fa=n,n=i)):(fa=n,n=i);r=e.substring(r,fa),(o=vs())!==i?t=da(r):(fa=t,t=i)}else fa=t,t=i}}}return t}function ks(){var t,r,o,n,a;if(t=fa,r=fa,(o=Bs())!==i){if(n=[],(a=fs())!==i)for(;a!==i;)n.push(a),a=fs();else n=i;n!==i?r=o=[o,n]:(fa=r,r=i)}else fa=r,r=i;if((t=r!==i?e.substring(t,fa):r)===i){if(t=fa,r=fa,(o=vs())!==i){if(n=[],(a=ms())!==i)for(;a!==i;)n.push(a),a=ms();else n=i;n!==i?r=o=[o,n]:(fa=r,r=i)}else fa=r,r=i;t=r!==i?e.substring(t,fa):r}return t}function _s(){var t;return Ba++,10===e.charCodeAt(fa)?(t=Et,fa++):(t=i,0===Ba&&_a(To)),t===i&&(e.substr(fa,2)===Lt?(t=Lt,fa+=2):(t=i,0===Ba&&_a(fo)),t===i&&(t=e.charAt(fa),Gt.test(t)?fa++:(t=i,0===Ba&&_a(mo)))),Ba--,t===i&&(0===Ba&&_a(go)),t}function Ks(){var t;return t=e.charAt(fa),jt.test(t)?fa++:(t=i,0===Ba&&_a(ho)),t}function As(){var t,r;return(t=_s())===i&&(t=fa,Ba++,e.length>fa?(r=e.charAt(fa),fa++):(r=i,0===Ba&&_a(Mt)),Ba--,r===i?t=void 0:(fa=t,t=i)),t}function ws(){var t,r,o,n,a,s,l;if(t=fa,r=fa,o=fa,e.substr(fa,4)===It?(n=It,fa+=4):(n=i,0===Ba&&_a(bo)),n!==i?(115===e.charCodeAt(fa)?(a=Rt,fa++):(a=i,0===Ba&&_a(Bo)),a===i&&(a=null),e.substr(fa,3)===Ft?(s=Ft,fa+=3):(s=i,0===Ba&&_a(vo)),s!==i?o=n=[n,a,s]:(fa=o,o=i)):(fa=o,o=i),o===i&&(e.substr(fa,7)===Nt?(o=Nt,fa+=7):(o=i,0===Ba&&_a(Co))),(r=o!==i?e.substring(r,fa):o)!==i){for(o=fa,n=[],a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ss())!==i?a=s=[s,l]:(fa=a,a=i);a!==i;)n.push(a),a=fa,s=fa,Ba++,l=Ea(),Ba--,l===i?s=void 0:(fa=s,s=i),s!==i&&(l=Ss())!==i?a=s=[s,l]:(fa=a,a=i);o=e.substring(o,fa),t=Ta(r,o)}else fa=t,t=i;return t}function Ss(){var t;return t=e.charAt(fa),Dt.test(t)?fa++:(t=i,0===Ba&&_a(xo)),t}var Es=[],Ls="";if(e=e.trimStart(),r=y(),t.peg$library)return{peg$result:r,peg$currPos:fa,peg$FAILED:i,peg$maxFailExpected:ba,peg$maxFailPos:ha};if(r!==i&&fa===e.length)return r;throw r!==i&&fa<e.length&&_a({type:"end"}),Ka(ba,ha<e.length?e.charAt(ha):null,ha<e.length?ka(ha,ha+1):ka(ha,ha))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(p,Error),p.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var s=this.location.end,l=c("",n.line.toString().length," "),p=i[o.line-1],u=(o.line===s.line?s.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+p+"\n"+l+" | "+c("",o.column-1," ")+c("",u,"^")}else t+="\n at "+a}return t},p.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},8453:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyTextFormat=void 0;const i=(0,r(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"});t.BodyTextFormat=i},8588:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const i=(0,r(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=i},8848:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=function(e,t,r,u,y){t===c.BitContentLevel.Chain?function(e,t,r,i,n){const{value:a}=i,c=o.Breakscape.unbreakscape(p.StringUtils.trimmedString(a),{format:s.TextFormat.bitmarkText,location:l.TextLocation.tag});n.imageSourceUrl=c}(0,0,0,u,y):function(e,t,r,o,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",o);const{key:l}=o,p=n.Config.getTagConfigForTag(r,a.PropertyTag.fromValue(l)),u=e.bitContentProcessor(c.BitContentLevel.Chain,r,[o]),y=e.bitContentProcessor(c.BitContentLevel.Chain,null==p?void 0:p.chain,o.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",y);const{imageSourceUrl:g}=u,{mockupId:d}=y,T=i(y,["mockupId"]);g||e.addWarning("[@imageSource] is missing the image url",o);d||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",o);const f=Object.assign({url:null!=g?g:"",mockupId:null!=d?d:""},T);s.imageSource=f}(e,0,r,u,y)};const o=r(7735),n=r(2028),a=r(166),s=r(385),l=r(6877),p=r(9681),c=r(3029)},8903:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const i=r(6877),o=r(777),n=r(4078),a=new o.TextParser;const s=new class{fillStringExample(e,t,r,o,n){if(t){Array.isArray(t)||(t=[t]);for(const s of t)if(!s.isExample&&(r?(s.example=s.__defaultExample,s.isExample=!0):s.example=o?a.toAst(o,{format:e,location:i.TextLocation.tag}):void 0,n))break}}fillBooleanExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!i||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=n.BooleanUtils.toBoolean(r),i))break}}};t.BitUtils=s},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const i=r(7797),o=r(9917),n={[i.TagConfigKey.title]:{tag:o.Tag.tag_title},[i.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[i.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[i.TagConfigKey.property]:{tag:o.Tag.tag_property},[i.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[i.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[i.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[i.TagConfigKey.true]:{tag:o.Tag.tag_true},[i.TagConfigKey.false]:{tag:o.Tag.tag_false},[i.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[i.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[i.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[i.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},9289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=function(e,t,r,s,l){t===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,r,s,l):function(e,t,r,n,s){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",n);const p=i.Config.getTagConfigForTag(r,o.Tag.fromValue(n.type)),c=[n,...null!==(l=n.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(a.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",u);s.itemLead=u.itemLead}(e,0,r,s,l)};const i=r(2028),o=r(9917),n=r(8216),a=r(3029)},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,r,i){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i}toString(e){const t=Object.assign({},e);let r="";const i=[];this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),null!=this.repeatCount&&i.push(`repeatCount=${this.repeatCount}`),r+=`[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))r+=`\n${e.toString(t)}`;return r}}},9554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const i=(0,r(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",noBulletList:"noBulletList",bulletList:"bulletList",orderedList:"orderedList",orderedListRoman:"orderedListRoman",orderedListRomanLower:"orderedListRomanLower",letteredList:"letteredList",letteredListLower:"letteredListLower",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",imageInline:"imageInline",codeBlock:"codeBlock",latex:"latex",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=i},9561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const i=(0,r(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=i},9600:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s){super(i.BitTagType.resource,e,t,r,o,n,a,void 0,s),this.type=i.BitTagType.resource}toString(e){const t=Object.assign({},e);let r=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.ResourceTagConfig=n},9647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=function(e,t,r,T,K){const{value:A}=T;let{key:w}=T;const S=t===k.BitContentLevel.Chain,E=o.Config.getTagConfigForTag(r,p.PropertyTag.fromValue(w)),L=E?E.configKey:void 0;if(w===p.PropertyTag.internalComment)return void(0,b.commentTagContentProcessor)(e,t,T,K);if(E){if(L===s.PropertyConfigKey.example)return void(0,m.exampleTagContentProcessor)(e,t,T,K);if(L===s.PropertyConfigKey.ratingLevelStart||L===s.PropertyConfigKey.ratingLevelEnd)return void(0,C.ratingLevelChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.technicalTerm)return void(0,P.technicalTermChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.servings)return void(0,x.servingsChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.person||L===s.PropertyConfigKey.partner)return void(0,v.personChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.imageSource)return void(0,h.imageSourceChainContentProcessor)(e,t,r,T,K);if(L===s.PropertyConfigKey.book)return void(0,f.bookChainContentProcessor)(e,t,E.chain,T,K);if(L===s.PropertyConfigKey.markConfig&&!S)return void(0,B.markConfigChainContentProcessor)(e,t,r,T,K);L===s.PropertyConfigKey.property_title&&S&&(w="propertyTitle")}const I=(e,t,r,o)=>{if(r=(e=>{if(null!=e){if(o)switch(o.format){case l.PropertyFormat.plainText:return i.Breakscape.unbreakscape(d.StringUtils.isString(e)?d.StringUtils.trimmedString(e):void 0,{format:c.TextFormat.plainText,location:u.TextLocation.tag});case l.PropertyFormat.number:return g.NumberUtils.asNumber(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}));case l.PropertyFormat.boolean:return y.BooleanUtils.toBoolean(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}),!0);case l.PropertyFormat.invertedBoolean:return!y.BooleanUtils.toBoolean(i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag}),!0);case l.PropertyFormat.bitmarkText:return e=d.StringUtils.isString(e)?e:"",_.toAst(e,{format:c.TextFormat.bitmarkText,location:u.TextLocation.tag})}return i.Breakscape.unbreakscape(e,{format:c.TextFormat.plainText,location:u.TextLocation.tag})}})(r),(null==o?void 0:o.astKey)&&(t=o.astKey),null==o?void 0:o.single)e[t]=r;else if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];e[t]=[...i,r]}else e[t]=[r]};I(E?K:K.extraProperties,w,A,E);w===p.PropertyTag.tag_sampleSolution&&I(K,"__sampleSolutionAst",A,new n.PropertyTagConfig(a.ConfigKey.sampleSolution,p.PropertyTag.tag_sampleSolution,1,1,void 0,void 0,void 0,!0,l.PropertyFormat.bitmarkText,void 0,void 0))};const i=r(7735),o=r(2028),n=r(1519),a=r(5591),s=r(9888),l=r(9727),p=r(166),c=r(385),u=r(6877),y=r(4078),g=r(8025),d=r(9681),T=r(777),f=r(3045),m=r(4091),h=r(8848),b=r(6991),B=r(3063),v=r(21),C=r(3967),x=r(4953),P=r(4475),k=r(3029),_=new T.TextParser},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const r=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}countOccurrences(e,t){return e.split(t).length-1}countOccurrencesAtStart(e,t){let r=0;for(;e.startsWith(t);)r++,e=e.substring(t.length);return r}countOccurrencesAtEnd(e,t){let r=0;for(;e.endsWith(t);)r++,e=e.substring(0,e.length-t.length);return r}splitPlaceholders(e,t){let r=[e];const i=(e,t)=>{const r=[];for(const i of e){const e=i.split(t);for(let i=0,o=e.length;i<o;i++){const n=e[i],a=i===o-1;r.push(n),a||r.push(t)}}return r};for(const e of t)r=i(r,e);return r}firstLine(e,t){const r=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return r;const i=e.split("\n");return i.length>0?i[0].substring(0,t):r}wordWrap(e,t){const r=[];if(t<1||null==e||e.length<=t)return r;const i=e.length,o=i-t;let n,a=0;for(;a<o;){let i;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){i=s-a,n=e.substr(a,i),a=a+i+1,r.push(n);continue}const l=e.lastIndexOf(" ",o);let p=0;l>-1&&l!=a-1?(i=l-a,i>0&&(p=a+i+1)):(i=t,p=a+t),n=e.substr(a,i),a=p,r.push(n.trim())}return a<i&&(n=e.substr(a),r.push(n)),r}};t.StringUtils=r},9727:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const i=(0,r(4718).superenum)({none:"none",plainText:"plainText",bitmarkText:"bitmarkText",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=i},9788:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a){super(i.BitTagType.tag,e,t,r,o,n,void 0,void 0,a),this.type=i.BitTagType.tag}toString(e){const t=Object.assign({},e);let r=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}}t.MarkupTagConfig=n},9885:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=function(e,t,r,p,c,u){t===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,l.BitContentLevel.Chain,p,c):function(e,t,r,s,p,c){var u;const{bitType:y}=e,g=[s,...null!==(u=s.chain)&&void 0!==u?u:[]],d=p.statements,T=p.choices,f=p.responses;if(!(d&&T&&f&&c))return;if(o.Config.isOfBitType(y,n.BitType.trueFalse1))p.statement=function(e,t,r){const{bitType:a}=e;if(!o.Config.isOfBitType(a,n.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",r);const s=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:p}=s,c=i(s,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",c);let u,y;p&&p.length>0&&(y=p[0]);if(y){const{statement:e}=c,t=i(c,["statement"]);u=Object.assign(Object.assign(Object.assign({},y),{statement:y.text}),t)}return u}(e,r,g);else if(o.Config.isOfBitType(y,[n.BitType.trueFalse,n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.feedback])){const t=function(e,t,r){const{bitType:a}=e,s=o.Config.isOfBitType(a,n.BitType.trueFalse),p=o.Config.isOfBitType(a,[n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.feedback]),c=o.Config.isOfBitType(a,[n.BitType.multipleResponse,n.BitType.multipleResponse1]);if(!s&&!p&&!c)return{};const u=[],y=[],g=[],d=e.splitBitContent(r,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",d);for(const r of d){const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,a=i(o,["trueFalse"]);let d;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",a),n&&n.length>0&&(d=n[0]),d)if(s){const{statement:e}=a,t=i(a,["statement"]),r=Object.assign(Object.assign(Object.assign({},d),{statement:d.text}),t);r&&u.push(r)}else if(p){const e=Object.assign(Object.assign(Object.assign({},d),{choice:d.text}),a);e&&y.push(e)}else if(c){const e=Object.assign(Object.assign(Object.assign({},d),{response:d.text}),a);e&&g.push(e)}}const T={};s?T.statements=u:p?T.choices=y:c&&(T.responses=g);return T}(e,r,g);t.statements&&d.push(...t.statements),t.choices&&T.push(...t.choices),t.responses&&f.push(...t.responses)}else if(o.Config.isOfBitType(y,n.BitType.highlightText)){const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",r);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,s=i(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=Object.assign(Object.assign({},e),{isHighlighted:!1});t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.highlight,texts:p},s);return c}(e,r,g);t&&c.push(t)}else{const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",r);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,r),{trueFalse:n}=o,s=i(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=e;t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.select,options:p},s);return c}(e,r,g);t&&c.push(t)}}(e,0,r,p,c,u)};const o=r(2028),n=r(5854),a=r(4410),s=r(4020),l=r(3029)},9888:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const i=r(4718),o={action:"action",activityType:"activityType",additionalSolutions:"additionalSolutions",ageRange:"ageRange",aiGenerated:"aiGenerated",analyticsTag:"analyticsTag",allowedBit:"allowedBit",allowSubtitles:"allowSubtitles",alt:"alt",altLangTag:"altLangTag",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",blockId:"blockId",book:"book",bookAlias:"bookAlias",bookDiff:"bookDiff",bot:"bot",bubbleTag:"bubbleTag",buttonCaption:"buttonCaption",callToActionUrl:"callToActionUrl",caption:"caption",categoryTag:"categoryTag",chatWithBook:"chatWithBook",chatWithBookBrainKey:"chatWithBookBrainKey",citationStyle:"citationStyle",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",customerExternalId:"customerExternalId",customerId:"customerId",date:"date",dateEnd:"dateEnd",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",diffTo:"diffTo",diffOp:"diffOp",diffRef:"diffRef",diffContext:"diffContext",diffTime:"diffTime",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",feedbackEngine:"feedbackEngine",feedbackType:"feedbackType",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",handInAcceptFileType:"handInAcceptFileType",handInRequirement:"handInRequirement",handInInstruction:"handInInstruction",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageFirst:"imageFirst",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTemplate:"isTemplate",isTemplateStripTheme:"isTemplateStripTheme",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",layer:"layer",layerRole:"layerRole",levelCEFRp:"levelCEFRp",levelCEFR:"levelCEFR",levelILR:"levelILR",levelACTFL:"levelACTFL",license:"license",list:"list",listItemIndent:"listItemIndent",location:"location",machineTranslated:"machineTranslated",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",maxTocChapterLevel:"maxTocChapterLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",path:"path",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",page:"page",processHandIn:"processHandIn",processHandInLocation:"processHandInLocation",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reductionTag:"reductionTag",refAuthor:"refAuthor",refBookTitle:"refBookTitle",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",revealSolutions:"revealSolutions",scormSource:"scormSource",search:"search",searchIndex:"searchIndex",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",slug:"slug",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",stripePricingTableId:"stripePricingTableId",stripePublishableKey:"stripePublishableKey",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableColumnMinWidth:"tableColumnMinWidth",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",tocResource:"tocResource",tocContent:"tocContent",topicTag:"topicTag",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorDashboardId:"vendorDashboardId",vendorSurveyId:"vendorSurveyId",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,i.superenum)(o);t.PropertyConfigKey=n},9916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const i=r(9888),o=r(7203),n=r(9727),a=r(166),s={[i.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.customerId]:{tag:a.PropertyTag.customerId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.customerExternalId]:{tag:a.PropertyTag.customerExternalId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.aiGenerated,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.machineTranslated]:{tag:a.PropertyTag.machineTranslated,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.searchIndex]:{tag:a.PropertyTag.searchIndex,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.analyticsTag]:{tag:a.PropertyTag.analyticsTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.categoryTag]:{tag:a.PropertyTag.categoryTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.topicTag]:{tag:a.PropertyTag.topicTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.altLangTag]:{tag:a.PropertyTag.altLangTag,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.feedbackEngine]:{tag:a.PropertyTag.feedbackEngine,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.disableFeedback]:{tag:a.PropertyTag.disableFeedback,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.diffTo]:{tag:a.PropertyTag.diffTo,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffOp]:{tag:a.PropertyTag.diffOp,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffRef]:{tag:a.PropertyTag.diffRef,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffContext]:{tag:a.PropertyTag.diffContext,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.diffTime]:{tag:a.PropertyTag.diffTime,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.path]:{tag:a.PropertyTag.path,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInAcceptFileType]:{tag:a.PropertyTag.handInAcceptFileType,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInRequirement]:{tag:a.PropertyTag.handInRequirement,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.handInInstruction]:{tag:a.PropertyTag.handInInstruction,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.slug]:{tag:a.PropertyTag.slug,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.reductionTag]:{tag:a.PropertyTag.reductionTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bubbleTag]:{tag:a.PropertyTag.bubbleTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelCEFRp]:{tag:a.PropertyTag.levelCEFRp,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelCEFR]:{tag:a.PropertyTag.levelCEFR,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelILR]:{tag:a.PropertyTag.levelILR,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.levelACTFL]:{tag:a.PropertyTag.levelACTFL,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bookDiff]:{tag:a.PropertyTag.bookDiff,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refAuthor]:{tag:a.PropertyTag.refAuthor,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refBookTitle]:{tag:a.PropertyTag.refBookTitle,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refPublisher]:{tag:a.PropertyTag.refPublisher,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.refPublicationYear]:{tag:a.PropertyTag.refPublicationYear,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.citationStyle]:{tag:a.PropertyTag.citationStyle,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.dateEnd]:{tag:a.PropertyTag.dateEnd,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.processHandIn]:{tag:a.PropertyTag.processHandIn,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.processHandInLocation]:{tag:a.PropertyTag.processHandInLocation,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isTemplate]:{tag:a.PropertyTag.isTemplate,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isTemplateStripTheme]:{tag:a.PropertyTag.isTemplateStripTheme,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.chatWithBook]:{tag:a.PropertyTag.chatWithBook,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.chatWithBookBrainKey]:{tag:a.PropertyTag.chatWithBookBrainKey,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorDashboardId]:{tag:a.PropertyTag.vendorDashboardId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorSurveyId]:{tag:a.PropertyTag.vendorSurveyId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_referenceProperty},[i.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.layer]:{tag:a.PropertyTag.layer,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.layerRole]:{tag:a.PropertyTag.layerRole,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxTocChapterLevel]:{tag:a.PropertyTag.maxTocChapterLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.tocResource]:{tag:a.PropertyTag.tocResource,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tocContent]:{tag:a.PropertyTag.tocContent,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[i.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.page]:{tag:a.PropertyTag.page,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productList},[i.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productVideoList},[i.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.additionalSolutions]:{tag:a.PropertyTag.additionalSolutions,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_markConfig},[i.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.callToActionUrl]:{tag:a.PropertyTag.callToActionUrl,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.feedbackType]:{tag:a.PropertyTag.feedbackType,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.bitmarkText},[i.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean,defaultValue:"false"},[i.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.listItemIndent]:{tag:a.PropertyTag.listItemIndent,single:!0,defaultValue:"0",format:n.PropertyFormat.number},[i.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[i.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.allowedBit]:{tag:a.PropertyTag.allowedBit,single:!1,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableHeaderWhitespaceNoWrap]:{tag:a.PropertyTag.tableHeaderWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableColumnMinWidth]:{tag:a.PropertyTag.tableColumnMinWidth,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.stripePricingTableId]:{tag:a.PropertyTag.stripePricingTableId,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.stripePublishableKey]:{tag:a.PropertyTag.stripePublishableKey,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.bitmarkText},[i.PropertyConfigKey.imageFirst]:{tag:a.PropertyTag.imageFirst,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.activityType]:{tag:a.PropertyTag.activityType,single:!0,format:n.PropertyFormat.plainText},[i.PropertyConfigKey.revealSolutions]:{tag:a.PropertyTag.revealSolutions,single:!0,format:n.PropertyFormat.boolean}};t.PROPERTIES=s},9917:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const i=(0,r(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=i},9984:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const i=(0,r(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=i}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.bitmarkTextParse=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.BodyTextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.Input=e.BitmarkParserGenerator=void 0;const t=r(1412);var o=r(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Input",{enumerable:!0,get:function(){return o.Input}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=r(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=r(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=r(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=r(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var p=r(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return p.JsonGenerator}});var c=r(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return c.JsonStringGenerator}});var u=r(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return u.BitmarkParser}});var y=r(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return y.BitmarkGenerator}});var g=r(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return g.BitmarkStringGenerator}});var d=r(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var T=r(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return T.BitType}});var f=r(8453);Object.defineProperty(e,"BodyTextFormat",{enumerable:!0,get:function(){return f.BodyTextFormat}});var m=r(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return m.ResourceTag}});var h=r(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return h.NodeType}});var b=r(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var B=r(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return B.BitmarkVersion}});var v=r(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return v.CardSetVersion}});var C=r(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var x=r(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return x.InfoFormat}});var P=r(2220);Object.defineProperty(e,"bitmarkTextParse",{enumerable:!0,get:function(){return P.parse}});(0,t.init)()})(),i})()));
|