{"version":3,"file":"consumer-sweepstakes.js","names":["_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_defineProperty","obj","key","arg","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","String","Number","_toPrimitive","_toPropertyKey","_applyDecoratedDescriptor","decorators","desc","keys","forEach","slice","reverse","reduce","decorator","skipCache","ApplicationAdapter","_class","CommonAdapter","constructor","args","super","this","_descriptor","_descriptor2","config","apiNamespace","apiHost","apiKey","window","location","href","ENV","APP","organizationId","promotionId","organizationPromotionId","findAll","store","type","data","useCachedData","includes","modelName","getPreviewData","findRecord","query","queryRecord","name","pathForType","talker","send","then","response","payload","prototype","service","_exports","default","App","Application","modulePrefix","podModulePrefix","Resolver","loadInitializers","DynamicElementAlt","Component","DynamicElement","_default","extend","tagName","attributeBindings","classNameBindings","didRender","_super","arguments","onLoadCallback","run","setOrientation","element","addEventListener","onerror","set","willDestroyElement","removeEventListener","width","height","alt","cropmode","anchor","offsetWidth","offsetHeight","src","computed","dipsUrl","get","mediaItemId","externalSource","multiplier","queryString","compact","join","MAX_ATTEMPTS","environment","cancel","tryAgainTimer","video","querySelector","onVideoSeek","onVideoTimeUpdate","onVideoEnded","onVideoLoadedData","didInsertElement","attemptVideo","disableSeeking","didReceiveAttrs","_width","_key","attempts","maxAttempts","videoReady","poster","load","incrementProperty","timer","later","bind","FAILED_VIDEO_POLLING_DELAY_SECONDS","supposedCurrentTime","highestTime","delta","currentTime","Math","abs","seeking","EmberYoutube","i18n","shouldShowOrHide","observer","blank","options","dateFrom","yyyy","mm","dd","some","x","isBlank","str","isNaN","parseInt","iso8601","date","Date","getTime","_previousValue","valueUpdated","_usesDDMMYYYY","day","month","year","checkAndSendDate","checked","onValidDate","onReset","setProperties","getUTCDate","getUTCMonth","getUTCFullYear","actions","dayChanged","monthChanged","yearChanged","domain","parent","theme","classNames","isExpanded","isDark","equal","__COLOCATED_TEMPLATE__","_templateFactory","createTemplateFactory","id","block","moduleName","isStrictMode","PageIndicatorComponent","progressPercentage","pageNumber","totalPagesCount","progressStyle","_component","setComponentTemplate","current","$","document","body","on","event","designTemplateTypeId","getAttribute","loadAndShowPage","off","show","html","focusConstrainer","FocusConstrainer","keyListener","KeyListener","async","relevantDesign","designTemplateType","BypassCache","IncludeTokenContent","designTemplate","design","result","legalDesigns","findBy","open","sanitizedHtml","sanitize","renderedContent","htmlSafe","innerHTML","scheduleOnce","configure","getElementById","begin","ESC","hide","end","useAnchor","click","createElement","url","getElementsByTagName","appendChild","handleBodyClicks","ev","isChild","contains","bubble","matches","shouldNotClose","or","one","isDestroyed","trigger","next","colorScheme","showFaces","header","stream","showBorder","hideCover","smallHeader","FB","XFBML","parse","imageFileExtensions","videoFileExtensions","session","enctype","method","currentlyUploading","accept","allowCapture","buildAjaxUploader","imagesOnly","videosOnly","VIDEO_FILE_FORMATS","imagesOrVideoOnly","validFileTypes","isMediaItem","file","action","fileExtension","getFileExtension","apiEndpoint","pluralizedJsonItemType","onchange","files","length","isValidFile","clearModelErrors","prepareFileUpload","FormData","append","ajax","contentType","processData","headers","getOwner","lookup","success","uploadResponse","uploadingAction","mediaItemJSON","JSON","successfulFileUpload","error","errors","failedFileUpload","itemType","propertyName","addModelError","responseJSON","jsonApiDocument","normalize","MediaItem","ImportFile","responseItem","push","addingFile","rerender","reset","fileUploader","responseText","fileName","substring","lastIndexOf","toLowerCase","flatten","split","map","acceptedItem","trim","model","clear","errorMessage","forceDirty","add","SsFormEntryRegistrationComponent","_dec","SsFormNewComponent","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_descriptor8","_descriptor9","_descriptor10","_descriptor11","_descriptor12","isLoggedIn","debounce","recastVote","entryFormPage","formPageSubmission","createFormSubmission","votes","recastingVote","isEmpty","currentVotes","entries","userEntries","setVotesServiceAttributes","Promise","all","loadVotes","loadEntries","entry","currentEntry","vote","voteToDelete","findCurrentVoteAndEntry","changeVote","mediaItem","isUploadingImage","uploadedMediaItemId","isPersistingEntryData","localStorage","setItem","prefix","storedFormFields","assign","videoId","uploadedVideoId","removeItem","mediaTypeId","createVideoBlob","_asyncArrowRuntime","buildTask","generator","closeChangeWriteIn","isBallot","ensureBallotStateLoaded","destroyRecord","e","console","_currentEntry","currentFormPage","currentMatchupEntry","splitSubmission","entryFormSubmissionId","submitFormPageTask","perform","isPresent","submissionFailure","isPageOne","isEditingSubmission","drop","forceRerender","entryTitleFormField","entryTitleFormFieldValue","entryTitleId","place","placeObject","cleanup","URL","revokeObjectURL","blobUrl","persistEntryData","formPageFields","entryForm","formPages","toArray","formFields","showVideoPreview","field","fieldType","allowVideoUpload","allowAllMediaUpload","allowPhotoUpload","nextRegistrationPageToComplete","form","sortBy","find","page","hasFormFields","shouldShowEntryForm","shouldShowEntryPreview","promotionType","urlTextbox","videoUploadedByUrl","formField","fieldId","enums","findWhere","toString","entryCaptionFormField","googlePlaceField","isNominationBallot","promotionSubType","submitButtonText","changeToWriteIn","hasStartedRegistration","thirdPartyAuthProvider","thirdPartyUsesExternalLogin","accessToken","isLastPage","formPagesCount","useCurrentFormPage","capitalizedCategoryName","matchupName","filter","capitalize","isSaving","submitFormPagesTask","isRunning","isTurnstileChecking","freezeFormState","captureFormSubmissionDetails","formSubmissionId","formType","DeveloperError","matchupEntryId","entryId","clearFormRelatedLocalStorage","excludedItems","clearFormPageErrors","fp","clearFormFieldValues","restoreProgress","getItem","syncFormWithStoredValues","restoreFormValues","json","values","isNone","setValuesToDefaultIfBlank","defaultValue","entryLimitReached","formPage","message","voteLimitReached","currentVote","unVote","save","finishedAction","finished","matchup","attribute","waitForInFlightVotes","isLoading","resolve","startedAt","now","setInterval","clearInterval","userVotes","entriesPromise","isLoadingEntries","isLoaded","writeInEntry","filterWriteinNominationsForThisCategoryAndInterval","matchupId","userMatchupEntry","sort","a","b","pop","findVoteWithinMatchupForCurrentInterval","currentVoteForMatchupEntry","pageFields","pageField","validationFailure","invalidError","ff","source","pointer","match","detail","twitterAuthorizationRedirect","scrollToError","el","parentNode","scroller","scrollTo","formSubmission","captureSession","sendFormPageSubmissionSDKEvent","nextPage","hasMismatchErrored","prefillEntryFormValues","entryTitle","entryPhotoId","entryCaption","entryMediaReleaseConsent","getField","prefillField","startsWith","createObjectURL","removeImage","imageField","removeVideo","reason","logout","shouldClearAccessToken","router","transitionTo","iteration","normalizedName","clearStoredValues","setup","firstInput","container","focus","tracked","getOwnPropertyDescriptor","SsFormFieldCaptchaComponent","FormField","scrollToTurnstileWidget","widgetElement","center","duration","setTurnstileRunningState","loadScript","turnstile","render","sitekey","consumer","TURNSTILE_KEY","callback","token","failed","submitFormPage","error-callback","challenge-callback","ensureValueArray","Array","isArray","isAnswerLimitReached","isLimitSelection","answerLimit","removeUncheckedItem","fields","fieldOptionId","selectedFieldOptions","valueChanged","fieldOption","isChecked","valueArray","existing","val","addObject","isBrowserWithBadNativeDateUX","mobileOperatingSystem","getPropertyNumber","computedStyle","parseFloat","getPropertyValue","ReferralShareList","boundRecalculate","recalculateIsTooWide","mutationObserver","MutationObserver","observe","childList","attributes","subtree","disconnect","isTooWide","referralLabel","readOnly","areReferralsEnabled","pCS","getComputedStyle","pBL","pBR","pPL","pPR","parentInnerBoxWidth","scrollWidth","SsFormFieldFacebookLink","PLACES_DEBOUNCE","SsFormFieldGooglePlace","placeName","setPlaceObject","setEntryName","googleIntegrationSetting","isLoadingSuggestions","showPredictions","predictions","timeout","fetchSuggestionsTask","restartable","googleSuggestionPreference","queryPlacesTask","entryNames","searchValue","pageSize","geographicArea","peekAll","firstObject","status","googleMaps","google","maps","places","PlacesServiceStatus","OK","isDestroying","getPlacePredictions","setupMaps","instantiateGoogleMaps","promotionLanguageCode","settings","getValueFor","displayPredictions","selectPrediction","prediction","place_id","structured_formatting","main_text","internal","preventFormSubmitOnEnter","preventDefault","SsFormFieldImageSelectComponent","isMobile","test","navigator","userAgent","accepts","_addMediaItem","newMediaItem","startUpload","addMediaItem","onChange","automateImageUploadForTesting","testMediaItem","createRecord","currentVersionNumber","size","SsFormFieldInstagram","GOOGLE_PLAY_BADGE","APPLE_APP_STORE_BADGE","_dec2","_class2","androidImageSource","organizationPromotion","defaultLanguageId","iosImageSource","delayFormFieldValueChanged","minValue","min","minimumLengthOrValue","maxValue","max","maximumLengthOrValue","SsFormFieldOptin","alexaSkillImageSource","nativeDataList","HTMLDListElement","availableTags","autocomplete","SsFormFieldTikTokLink","SsFormFieldVideoSelectComponent","switchToYoutubeUpload","isFlyoutOpen","toggleAddByVideoUrl","SsFormFieldXLink","SsFormFieldYouTubeLink","SsFormPageEntryRegistrationComponent","SsFormPageComponent","suggestedValues","entryNameField","labelText","bool","addingVideoByUrl","storeFieldValues","isExtraChancesForm","sortedFormFields","aMatches","bMatches","displayOrder","hasRequiredTwitterFollow","fomField","isRequired","filterBy","isNominating","isVoting","continueToPayment","skip","submitFormField","currentSubmittingField","onFormFieldChange","updateStoredFormFields","stringify","isMultipleCheckbox","splitCheckedIntoFormFields","_descriptor13","_descriptor14","_descriptor15","_descriptor16","_descriptor17","_descriptor18","_descriptor19","_descriptor20","_descriptor21","_descriptor22","_descriptor23","_descriptor24","_descriptor25","_descriptor26","transformLoginEmailRedirectPath","languageCode","clearEntryFormSubmission","loadStoredSession","restoreMinimumAgeRestriction","dipsUrlRes","acknowledgeForm","addThirdPartyCancelHandler","clearProgress","hideThirdPartyRequestOnLoad","launchThirdPartyRequestLogin","optionalRegistration","googlePlaceId","googlePlaceName","locationId","extraChances","sumExtraChances","submissionSuccess","focusFirstIn","registrationForm","formTypeClass","isLogoutVisible","usesSecondStreetLogin","isRegistered","isFirstPage","canChangeUpload","emailAddressThatIsAlreadyInUse","emailAddressThatRequiresVerification","showPageIndicator","emailFormField","sessionRelatedSetup","getDipsUrl","restoreState","isFinished","forceDisableForm","createFormFieldsForMultipleCheckboxes","formPageId","isCaptchaPage","matchupClassificationTypeId","referrer","desiredPageNumber","formId","captchaPage","scrollToCaptchaPage","scrollToTopOfForm","extraChancesAdded","submissionErrorMessage","updateFormPage","camelize","failedFormSubmissionId","meta","form_submission_id","sessions","access_token","loginUsingAccessToken","ForbiddenError","InvalidError","Errors","UnauthorizedError","emailAddressAlreadyInUse","emailVerificationRequired","userSession","useExistingSession","fieldValue","label","valueText","fieldOptions","option","text","nextFormPage","reload","beginSubmission","storeEligibilityDate","getEntryEligibilityDate","delayClearFormFieldValues","designSettings","handleKioskMode","handleThanksPageRedirection","isQuiz","ad","closest","additionalOffset","top","targetTop","getBoundingClientRect","bottom","offset","behavior","entryEligibilityDate","currentPageNumber","disqualify","fieldTypeId","username","toSet","replace","escapeRedirectPath","routeUrl","specialEncode","encode","removeUtmQueryParams","sanitizeRedirectPath","minimumAgeRestriction","setErrorOnEmailField","validationSignUpLimitHasBeenReached","emailField","validationAlreadyRegisteredForThisEvent","lastObject","focusFirstErrorField","grecaptcha","emailFieldId","email","currentURL","redirectPath","encodedPath","encodeURIComponent","loginRequest","pending","Boolean","returnTo","timestamp","postMessage","loginRequestPromise","requestLoginEmail","emailSubmittedCallback","verificationRequestToken","sendTo","clearForm","isStarted","alert","willInsertElement","_setAttributes","setEmptySrc","alreadyAttempted","altSrc","title","getProperties","$img","attr","$this","setAttribute","disabled","onDomChange","onDataChange","selection","content","selectedValue","changed","hasErrors","has","init","change","selectedIndex","prompt","objectAt","optionValuePath","enc","disableInteraction","hashtag","isCustomButton","buttonUrl","rawHashtag","referrerUrl","buttonCssClass","twttr","widgets","events","tweetHandler","twitterEvent","customClick","autoPlay","StripeFormComponent","promotionProduct","packages","promotionProducts","selectedPromotionProduct","checkout","createStripeSession","productId","emailAddress","promotionProductId","initializeCheckout","onComplete","destroyInstance","updateTransactionStatus","onPaymentComplete","normalizedTextColor","adjustColor","color","SweepstakesMatchup","previousMatchup","matchups","endDate","bestChoice","currentMatchup","relevantMatchups","startDate","nextMatchup","beforeContest","hasEntryLimitReachedForCurrentRound","matchupSummary","duringContestMatchupOpen","duringContestMatchupClosed","afterContest","nextMatchupStartDate","moment","format","timeZone","getTimeZone","handle","$destination","to","empty","hasDestination","youtubeVideo","internalVideoTimer","timerCount","highestTimerCount","playerVars","autoplay","playsinline","rel","videoPaused","videoPlaying","player","oldTime","newTime","getCurrentTime","seekTo","getDuration","ApplicationController","Controller","updateReferringUrlHeader","currentRouteName","routePath","localFullUrl","adapterFor","addHeaders","guid","referrerUserGuid","rootUrl","application","controller","emailFieldValue","submitted","errorMessages","referrerRoute","emailFieldIsEmpty","not","organizationPromotionName","alias","redirectTo","sanitizedRedirectPath","toggleProperty","loginRequestWork","exception","addObjects","_classPrivateMethodInitSpec","privateSet","privateCollection","_checkPrivateRedeclaration","FIELD_TYPE_IDS_WITHOUT_VALUES","ThanksController","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_setEmailFieldValue","WeakSet","receiver","fn","_classPrivateMethodGet","_setEmailFieldValue2","reenter","canSubmitFormAutomatically","queryParams","refresh","promise","reenteredSuccessfully","pinterestEnabled","socialSettingUtils","isSocialSettingEnabledNew","thanksMessageDisabled","isSocialSettingDisabledNew","thanksMessage","getSocialSettingNew","ignoredFieldTypeIds","flat","thanksMessageSafe","facebookApiKey","showThanksMessage","extraChancesFirstObject","extraChancesForm","combineThanksWithExtraChances","showReferrals","entryEligibilityMetaData","entry_eligibility_date","entry_matchup_id","matchup_id","isNextRound","logoutAction","unloadAll","appVersion","_","hash","version","versionOnly","hideSha","shaOnly","hideVersion","showExtended","versionExtendedRegExp","versionRegExp","shaRegExp","helper","compare","first","operator","second","getProperty","propName","safeString","string","Helper","compute","exists","t","math","pageTitle","pluralize","singularize","initialize","initializerFactory","register","ContainerDebugAdapter","setupContainer","exportApplicationGlobal","theGlobal","global","self","globalName","Ember","classify","reopen","willDestroy","apply","resolvePrimaryColor","arc","designContentHtml","promotionElement","rulePattern","lastConcreteColor","exec","findTemplatePrimaryBackgroundColor","color_element","colorElement","variableName","varMatch","RegExp","findCssVariableValue","getCustomStyles","primaryColor","color_background","colorBackground","color_text","colorText","color_button","colorButton","font_heading","fontHeading","font_paragraph","fontParagraph","styles","font","foregroundColor","isModalFormShell","pathname","showPromotionLoading","deferReadiness","warn","promotionContentsRequestUrl","params","matchEmbedUrl","organizationPromotionUniqueId","isLocalhost","Error","promotionContentsUrl","hasSettled","setTimeout","EmberPromise","crossDomain","contents","strValues","insertFontsToDom","insertCustomFontLinks","font_links","rawDesignContent","isValidJSON","Arc","srcDoc","socialElement","facebook","xDescription","emailSubject","emailDescription","metadata","getCustomContent","designContent","rootElement","stripe_publishable_key","stripe","publishableKey","lazyLoad","advanceReadiness","appId","cookie","xfbml","Canvas","setAutoGrow","htmlEl","style","overflow","removeProperty","ResizeObserver","documentElement","previousHeight","handleBodyHeightChange","currentHeight","bodyScroll","checkAllImagesLoaded","imagesLoaded","images","getElementsByClassName","totalImages","imageLoaded","i","cloneImage","onload","firstChild","mutations","childSelectors","mutation","addedNodes","loadableChildren","loadedElements","loadingWorkaround","trackHeightViaMutationObserver","namespace","setURL","handleURL","thirdParty","adgagement","sdk","handleThirdPartyConnection","info","isThirdPartyEnabledViaAPI","respond","visit","declareAdgagement","classList","Mixin","create","enableButtons","handleFormSubmissionError","DS","pageModel","modelFor","RehydratedSetting","shareUrl","facebookEnabled","isSocialSettingEnabled","twitterEnabled","emailEnabled","twitterText","getSocialSetting","emailBody","pinterestImage","htmlSource","RSVP","customMediaItemId","p","pinterestText","tokenContext","Promotion","Name","Organization","User","ReferralUrl","usingRehydration","querySelectorAll","prefixSettingValue","prefixSettingKey","SocialSharer","DesignTemplateModel","BaseModel","DesignTokenContent","_dec11","_dec12","_dec13","_dec14","belongsTo","_dec15","isEnabled","isDisabled","designToken","tokenCategory","category","DesignToken","DesignModel","hasMany","hostname","domainTypeId","statusTypeId","isPrimary","subdomain","isOldPlatform","EntryOutcomeModel","GameModel","importFileTypeId","originalFileName","KeywordAssignmentModel","KeywordModel","keywordText","loginRequestToken","logicTypeId","matchupLogic","isExtraChances","logicActionTypeId","pointsPerMatch","maximumMatches","matchupPlacingCriteriaId","matchupLogicConditions","startRank","endRank","ownerEntityType","ownerEntityId","dateCreated","dateModified","isInherited","matchupPlacingCriteria","tieBreakLogicTypeId","winnerMethodTypeId","winnerMethodType","tieBreakingLogicValue","MatchupSummary","count","matchupEntry","uniqueId","organizationUserId","birthDay","birthMonth","birthYear","firstName","middleName","gender","lastActivityDate","lastName","userId","userTypeId","addressSummary","isActive","affiliateId","organizationGuid","organizationTypeId","timeZoneId","organizationPromotions","OutcomeModel","formattedCumulativePercent","round","percentagePointsAverage","PollSubmissionEntryResult","pollSubmissionEntryId","question","questionOption","questionOptionResults","makeBooleanProperties","QuestionOptionOutcomeWeightModel","QuestionOptionPickModel","QuestionOptionResultModel","QuestionOptionModel","quizTransition","quizTransitions","questionOptions","adMatchupTypeId","QuestionModel","hasYoutubeVideo","videoUrl","hasVideoMediaItem","hasAudioMediaItem","useFadeInAnimation","displayOrderTransition","quizQuestionResponses","questions","indexOf","isMultiChoiceQuestion","q","isCorrect","markedCorrectOptionIds","correctOptionIds","pickedOptionIds","picked","isAd","questionType","sponsoredPost","sp","isBannerAd","isProgrammaticAd","QuizSubmissionModel","referredEntityTypeId","referredEntityId","organizationPromotionUser","password","expiresInSeconds","organizationUserGuid","organizationPromotionUserId","organizationPromotionUserGuid","isNewPlatformJoyrideComplete","thirdPartyId","thirdPartyUniqueUserId","organizationUsers","organization","Inflector","inflector","uncountable","numberOfWinners","promotion","templateTypeId","userDataEmailAddress","userDataFirstName","userDataLastName","userDataCity","userDataAddress1","userDataAddress2","userDataStateProvince","userDataPostalCode","userDataCountry","userDataGender","userDataPhone","userDataBirthDate","TransitionModel","peekRecord","Router","TalkerRouter","locationType","rootURL","route","path","ApplicationRoute","ConsumerApplicationRoute","EnterRoute","Route","redirect","replaceWith","EnterAccountRoute","HelpRoute","IndexRoute","forms","excludeSecondaryMatchups","formTypeId","excludeFormPages","currentRound","isReentering","formValues","formSubmitted","IneligibleRoute","LoginRoute","LoginTokenRoute","TokenRoute","OldThanksRoute","ReferralsIndexRoute","ReferralRoute","referrer_user_guid","ThanksRoute","mostRecentMatchup","reenterFormResult","rest","extractArray","onlyCodeWordOrEmailPage","userAttributeTypes","userAttributeTypeId","update","reminderEmailOptin","isReminderEmailConfirmed","hasMultipleMatchups","setupController","matchupLogics","referrals","shortenedLink","referralLinks","shortener","socialUrlShortener","referralRoute","referralUrl","_exception","shorten","didTransition","loading","SecondStreetSerializer","EmbeddedRecordsMixin","attrs","embedded","DesignSerializer","ApplicationSerializer","designTokenContents","keyForRelationship","entryFieldValues","mediaItems","normalizeCreateRecordResponse","primaryModelClass","requestType","form_page_submissions","LoginEmailRequestSerializer","login_email_requests","floor","random","orderLineItems","ordersTransactions","promotions","PromotionProductSerializer","promotionProductAttributes","questionOptionPicks","entryAtIndex","Service","Evented","watchSession","changingNominationFromEntry","changingNominationToEntryId","nominatingOnMatchupEntryId","hasEntries","hasNoEntries","entriesCount","previousEntry","mapBy","matchupFromUserEntries","matchupsWithUserSubmissions","uniqBy","force","isAlreadyLoading","filterByOrganizationPromotion","matchupEntries","refreshReminderEmailsUserAttributeTask","finally","ret","selectedMatchup","nominationEntries","writeinNominationsEligibility","clearEntries","hasCurrentNomination","isNominationAndVotingBallot","entriesEligibilityMetaData","lastUserEntry","beginChangingNomination","previousNominationEntry","toEntryId","endChangingNomination","beginNominating","endNominating","isOptimisticNominationForEntry","fromEntry","normalizedEntryId","relevantMatchupEntryForMatchup","autocompleteService","placesService","getBoundsFromRadius","radiusMeters","earthRadius","lat","lng","dLat","PI","dLng","cos","sw","LatLng","ne","LatLngBounds","types","promotionLocationRestriction","AutocompleteSuggestion","request","includedPrimaryTypes","radius","latitude","longitude","bounds","locationRestriction","suggestions","fetchAutocompleteSuggestions","suggestion","description","placePrediction","placeId","mainText","secondary_text","secondaryText","ERROR","i18nextInit","unknownProperty","keyName","blankMatch","interpolationPrefix","interpolationSuffix","i18next","resources","freeze","dev","translation","en","unsafeOptions","interpolation","escapeValue","addResource","addResources","deep","overwrite","optionsChanged","language","InMemoryStorage","inMemoryData","BrowserStorage","LocalStorageService","storage","testing","namespacedKey","promisify","tempString","tempStorage","catch","optional","attemptToLoadSessionWithLoginRequestToken","loginEmailRequest","loadedSession","initialQueryDelay","attemptLoginUsing","requestToken","_error","MomentOverride","MomentService","outputFormat","EmberScreen","isSmallAndUp","breakpoint","isMediumAndUp","isLargeAndUp","isExtraLargeAndUp","isExtraSmallAndDown","isSmallAndDown","isMediumAndDown","isLargeAndDown","userDataMapping","city","address1","address2","stateProvince","postalCode","country","phone","birthdate","__skipLoginAttempts","formIdQueue","lastAction","hasRecentAction","isAdgagement","isHandlingThirdPartyConnection","formIds","ids","concat","uniq","clearSession","rollbackAttributes","unloadRecord","handleNewSession","applicationAdapter","Authorization","handleFailedSession","isValidationError","isUsernameErrorOnly","removeHeader","handleDeletedSession","pushSession","sessionJson","sessionModel","serializerFor","storedToken","loadedSessions","loginEmailRequests","emailLoginRequestToken","querySessions","registerAction","startTime","queryDelay","fiveMinutes","wait","thirdPartyAuthSetting","thirdPartyLoginStrategy","uuid","additionalFields","matchesUUID","matchesThirdParty","done","record","spreadIf","thirdPartyConnection","prop","organizationUserFirstName","isAuthorized","isThirdParty","isLoggedOut","isEmbeddedRegex","domainQuery","organizationPromotionDomain","isEmbedded","regexResult","domains","existingDomainQuery","getLocation","link","search","primaryDomain","findPrimaryDomain","VotesService","gt","orgUserAttribute","nextRefresh","previouslyRefreshedAt","startOf","toDate","logger","log","voteIntervalStartDate","voteIntervalEndDate","isVoteInInterval","isVotingOpen","today","canVoteAgain","v","getVotes","bypassCache","allowPending","extractDatesFromMeta","refreshVotesTask","clearVotes","isVoteWrittenIn","noop","isAny","allowMultipleVotes","newVoteResult","_isDeletingVoteForMatchupEntryId","_isVotingOnMatchupEntryId","deletedVote","removeObject","currentVotesForMatchupEntry","item","isVoteForMatchupEntry","isCurrentlyVotedFor","recordWithMeta","extractDateFromMeta","eligibilityMetadata","voteEligibilityMetaData","underscore","isVoteForMatchup","focusableSelector","focusNextPrevIn","dir","focusableElements","focusIndex","activeElement","wasNotFocusedInModal","isFocusedAtBounds","focusNextIn","focusPreviousIn","lastFocus","keydownListener","keyCode","TAB","stopPropagation","shiftKey","listeners","keycodeListener","ua","tem","M","appName","splice","isNowBetweenAnyDates","arrayPath","beginDatePath","endDatePath","arr","ConfigUtil","_encode","fixColorContrast","base","getBodyOffsetHeight","getComputedBodyStyle","retVal","defaultView","left","runtimeStyle","currentStyle","pixelLeft","convertUnitsToPxForIE8","getBodyScrollHeight","scrollHeight","getDEOffsetHeight","getDEScrollHeight","getAllHeights","getMaxHeight","bodyOffset","documentElementOffset","documentScroll","documentElementScroll","grow","lowestElement","allElements","allElementsLength","maxBottomVal","getLowestElementHeight","BACKSPACE","ENTER","SHIFT","CTRL","ALT","PAUSE_BREAK","CAPS_LOCK","SPACE","PAGE_UP","PAGE_DOWN","END","HOME","LEFT","UP","RIGHT","DOWN","INSERT","DELETE","COMMAND","LEFT_COMMAND","RIGHT_COMMAND","NUMPAD_ASTERISK","NUMPAD_PLUS","NUMPAB_MINUS","NUMPAD_DOT","NUMPAD_SLASH","NUM_LOCK","SCROLL_LOCK","MY_COMPUTER","MY_CALCULATOR","SEMICOLON","EQUALS","COMMA","MINUS","DOT","SLASH","GRAVE","LEFT_BRACKET","BACKSLASH","RIGHT_BRACKET","QUOTE","origin","protocol","port","sortedMatchups","ms","metaFix","EmberObject","_talker","hasOwnProperty","_exportNames","theDefault","define","metaName","rawConfig","exports","decodeURIComponent","err","runningTests","require","assetHost"],"sources":["vendor/ember-cli/app-prefix.js","consumer-sweepstakes/adapters/application.ts","consumer-sweepstakes/app.js","consumer-sweepstakes/components/-dynamic-element-alt.js","consumer-sweepstakes/components/-dynamic-element.js","consumer-sweepstakes/components/dips-image.js","consumer-sweepstakes/components/dips-video.js","consumer-sweepstakes/components/email-verification-required.js","consumer-sweepstakes/components/ember-youtube.js","consumer-sweepstakes/components/form-field-error-and-help.js","consumer-sweepstakes/components/i18n-blank.js","consumer-sweepstakes/components/i18n-not-blank.js","consumer-sweepstakes/components/manual-date-input.js","consumer-sweepstakes/components/mycapture-classified.js","consumer-sweepstakes/components/nested-menu.js","consumer-sweepstakes/components/page-indicator.ts","consumer-sweepstakes/components/page-modal.js","consumer-sweepstakes/components/popup-button.js","consumer-sweepstakes/components/simple-flyout.js","consumer-sweepstakes/components/ss-facebook-like-box.js","consumer-sweepstakes/components/ss-file-upload.js","consumer-sweepstakes/components/ss-form-entry-registration.ts","consumer-sweepstakes/components/ss-form-field-captcha.ts","consumer-sweepstakes/components/ss-form-field-checkboxes.js","consumer-sweepstakes/components/ss-form-field-codeword.js","consumer-sweepstakes/components/ss-form-field-custom-date-input.js","consumer-sweepstakes/components/ss-form-field-display-text.js","consumer-sweepstakes/components/ss-form-field-email-textbox.js","consumer-sweepstakes/components/ss-form-field-extra-chances.js","consumer-sweepstakes/components/ss-form-field-facebook-like-api.js","consumer-sweepstakes/components/ss-form-field-facebook-link.js","consumer-sweepstakes/components/ss-form-field-google-place.js","consumer-sweepstakes/components/ss-form-field-image-select.js","consumer-sweepstakes/components/ss-form-field-instagram.js","consumer-sweepstakes/components/ss-form-field-mobile-app.js","consumer-sweepstakes/components/ss-form-field-number-input.js","consumer-sweepstakes/components/ss-form-field-optin.js","consumer-sweepstakes/components/ss-form-field-radio-buttons.js","consumer-sweepstakes/components/ss-form-field-select-single.js","consumer-sweepstakes/components/ss-form-field-single-checkbox.js","consumer-sweepstakes/components/ss-form-field-smart-speaker-skill.js","consumer-sweepstakes/components/ss-form-field-textarea.js","consumer-sweepstakes/components/ss-form-field-textbox.js","consumer-sweepstakes/components/ss-form-field-tik-tok-link.ts","consumer-sweepstakes/components/ss-form-field-twitter-follow-api.js","consumer-sweepstakes/components/ss-form-field-twitter-tweet-api.js","consumer-sweepstakes/components/ss-form-field-url-textbox.js","consumer-sweepstakes/components/ss-form-field-video-select.js","consumer-sweepstakes/components/ss-form-field-watch-video.js","consumer-sweepstakes/components/ss-form-field-web-link.js","consumer-sweepstakes/components/ss-form-field-xlink.ts","consumer-sweepstakes/components/ss-form-field-you-tube-link.ts","consumer-sweepstakes/components/ss-form-field.js","consumer-sweepstakes/components/ss-form-page-entry-registration.ts","consumer-sweepstakes/components/ss-form-page.ts","consumer-sweepstakes/components/ss-form.ts","consumer-sweepstakes/components/ss-img.js","consumer-sweepstakes/components/ss-radio.js","consumer-sweepstakes/components/ss-select.js","consumer-sweepstakes/components/ss-twitter-tweet.js","consumer-sweepstakes/components/ss-video.js","consumer-sweepstakes/components/stripe-form.ts","consumer-sweepstakes/components/sweepstakes-matchup.js","consumer-sweepstakes/components/twitter-follow.js","consumer-sweepstakes/components/ui/material-spinner.js","consumer-sweepstakes/components/vote-button.js","consumer-sweepstakes/components/wormholed-share-list.js","consumer-sweepstakes/components/youtube-video.js","consumer-sweepstakes/controllers/application.js","consumer-sweepstakes/controllers/index.ts","consumer-sweepstakes/controllers/login/index.js","consumer-sweepstakes/controllers/thanks.js","consumer-sweepstakes/helpers/app-version.js","consumer-sweepstakes/helpers/compare.js","consumer-sweepstakes/helpers/get-property.js","consumer-sweepstakes/helpers/i18n-t.js","consumer-sweepstakes/helpers/math.js","consumer-sweepstakes/helpers/page-title.js","consumer-sweepstakes/helpers/pluralize.js","consumer-sweepstakes/helpers/singularize.js","consumer-sweepstakes/initializers/app-version.js","consumer-sweepstakes/initializers/container-debug-adapter.js","consumer-sweepstakes/initializers/ember-cli-mirage.js","consumer-sweepstakes/initializers/ember-data.js","consumer-sweepstakes/initializers/export-application-global.js","consumer-sweepstakes/initializers/promotion-contents.js","consumer-sweepstakes/instance-initializers/ember-data.js","consumer-sweepstakes/instance-initializers/facebook.js","consumer-sweepstakes/instance-initializers/iframe.js","consumer-sweepstakes/mixins/form-page-route.js","consumer-sweepstakes/mixins/referral-share-list.js","consumer-sweepstakes/mixins/rehydrated-setting.js","consumer-sweepstakes/mixins/social-sharer.js","consumer-sweepstakes/models/design-template.ts","consumer-sweepstakes/models/design-token-content.js","consumer-sweepstakes/models/design-token.js","consumer-sweepstakes/models/design.ts","consumer-sweepstakes/models/domain.js","consumer-sweepstakes/models/entry-outcome.ts","consumer-sweepstakes/models/form-field-group.js","consumer-sweepstakes/models/form-submission-entry.js","consumer-sweepstakes/models/game.js","consumer-sweepstakes/models/import-file.js","consumer-sweepstakes/models/keyword-assignment.ts","consumer-sweepstakes/models/keyword.ts","consumer-sweepstakes/models/login-email-request.js","consumer-sweepstakes/models/login-request-session.js","consumer-sweepstakes/models/matchup-logic-condition.js","consumer-sweepstakes/models/matchup-logic.js","consumer-sweepstakes/models/matchup-place.js","consumer-sweepstakes/models/matchup-placing-criteria.js","consumer-sweepstakes/models/matchup-summary.js","consumer-sweepstakes/models/nomination-entries-summary.js","consumer-sweepstakes/models/nomination.js","consumer-sweepstakes/models/organization-promotion-user.js","consumer-sweepstakes/models/organization-user.js","consumer-sweepstakes/models/organization.js","consumer-sweepstakes/models/outcome.ts","consumer-sweepstakes/models/poll-submission-entry-result.ts","consumer-sweepstakes/models/poll-submission.js","consumer-sweepstakes/models/promotion.ts","consumer-sweepstakes/models/question-option-outcome-weight.ts","consumer-sweepstakes/models/question-option-pick.ts","consumer-sweepstakes/models/question-option-result.ts","consumer-sweepstakes/models/question-option.ts","consumer-sweepstakes/models/question.ts","consumer-sweepstakes/models/quiz-submission.ts","consumer-sweepstakes/models/referral.js","consumer-sweepstakes/models/session.js","consumer-sweepstakes/models/sweepstakes.js","consumer-sweepstakes/models/template-token.js","consumer-sweepstakes/models/third-party-user-connection.js","consumer-sweepstakes/models/transition.ts","consumer-sweepstakes/router.js","consumer-sweepstakes/routes/application.js","consumer-sweepstakes/routes/enter.js","consumer-sweepstakes/routes/enter/account.js","consumer-sweepstakes/routes/enter/index.js","consumer-sweepstakes/routes/help.js","consumer-sweepstakes/routes/index.js","consumer-sweepstakes/routes/ineligible.js","consumer-sweepstakes/routes/login.js","consumer-sweepstakes/routes/login/index.js","consumer-sweepstakes/routes/login/token.js","consumer-sweepstakes/routes/old-thanks.js","consumer-sweepstakes/routes/referrals/index.js","consumer-sweepstakes/routes/referrals/referral.js","consumer-sweepstakes/routes/thanks.js","consumer-sweepstakes/serializers/design-token-content.js","consumer-sweepstakes/serializers/design.js","consumer-sweepstakes/serializers/entry.js","consumer-sweepstakes/serializers/field.js","consumer-sweepstakes/serializers/form-field.js","consumer-sweepstakes/serializers/form-page-submission.js","consumer-sweepstakes/serializers/form.js","consumer-sweepstakes/serializers/login-email-request.js","consumer-sweepstakes/serializers/login-request-session.js","consumer-sweepstakes/serializers/matchup-group.js","consumer-sweepstakes/serializers/order.js","consumer-sweepstakes/serializers/organization-promotion.js","consumer-sweepstakes/serializers/organization.js","consumer-sweepstakes/serializers/poll-submission-entry-result.js","consumer-sweepstakes/serializers/poll-submission.js","consumer-sweepstakes/serializers/promotion-product.ts","consumer-sweepstakes/serializers/quiz-submission.js","consumer-sweepstakes/serializers/session.js","consumer-sweepstakes/serializers/third-party-user-connection.js","consumer-sweepstakes/services/entries.js","consumer-sweepstakes/services/google-maps.js","consumer-sweepstakes/services/i18n.js","consumer-sweepstakes/services/local-storage.ts","consumer-sweepstakes/services/login-request.js","consumer-sweepstakes/services/moment.js","consumer-sweepstakes/services/screen.js","consumer-sweepstakes/services/session.js","consumer-sweepstakes/services/social-url-shortener.js","consumer-sweepstakes/services/votes.js","consumer-sweepstakes/utils/accessibility.js","consumer-sweepstakes/utils/browser-version.js","consumer-sweepstakes/utils/computed.js","consumer-sweepstakes/utils/config.js","consumer-sweepstakes/utils/encode.js","consumer-sweepstakes/utils/fix-color-contrast.js","consumer-sweepstakes/utils/height.js","consumer-sweepstakes/utils/keycodes.js","consumer-sweepstakes/utils/local-full-url.js","consumer-sweepstakes/utils/matchups.ts","consumer-sweepstakes/utils/most-current-matchup.js","consumer-sweepstakes/utils/promises.js","consumer-sweepstakes/utils/root-url.js","consumer-sweepstakes/utils/sanitize-meta.js","consumer-sweepstakes/utils/talker.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","// @ts-ignore\nimport ENV from '../config/environment';\nimport CommonAdapter from 'secondstreet-common/adapters/common-adapter';\nimport config from 'consumer/utils/config';\nimport { inject as service } from '@ember/service';\nimport type DataService from 'consumer/services/data';\nimport type Store from '@ember-data/store';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport { ModelSchema } from 'ember-data';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type ModelRegistry from 'ember-data/types/registries/model';\n\nconst skipCache = ['matchup-entry', 'winner', 'media-item', 'entity-link', 'design', 'design-template', 'theme'];\n\nexport default class ApplicationAdapter extends CommonAdapter {\n  @service declare data: DataService;\n  @service declare session: any;\n\n  namespace = config().apiNamespace;\n  host = config().apiHost;\n  headers = {\n    'X-Api-Key': config().apiKey,\n    'X-Referring-Url': window.location.href,\n    'X-Organization-Id': ENV.APP.config.organizationId,\n    'X-Promotion-Id': ENV.APP.config.promotionId,\n    'X-Organization-Promotion-Id': ENV.APP.config.organizationPromotionId,\n  };\n\n  findAll(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.findAll(store, type, ...args);\n  }\n\n  findRecord(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.findRecord(store, type, ...args);\n  }\n\n  query(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.query(store, type, ...args);\n  }\n\n  queryRecord(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.queryRecord(store, type, ...args);\n  }\n\n  private getPreviewData(modelName: keyof ModelRegistry) {\n    const name = this.pathForType(modelName);\n    return this.data.talker.send(name).then((response: any) => {\n      const result = {\n        [name]: response.data.payload,\n      };\n      return result;\n    });\n  }\n}\n","import Application from '@ember/application';\nimport loadInitializers from 'ember-load-initializers';\nimport Resolver from 'ember-resolver';\n\nimport config from './config/environment';\n\nexport default class App extends Application {\n  modulePrefix = config.modulePrefix;\n  podModulePrefix = config.podModulePrefix;\n  Resolver = Resolver;\n}\n\nloadInitializers(App, config.modulePrefix);\n","import Component from '@glimmer/component';\n\n// This component is not needed anymore. However we can only safely remove it once we have an Embroider release that\n// has the special dependency rule for this addon removed:\n// https://github.com/embroider-build/embroider/blob/4fad67f16f811e7f93199a1ee92dba8254c42978/packages/compat/src/addon-dependency-rules/ember-element-helper.ts\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class DynamicElementAlt extends Component {}\n","import Component from '@glimmer/component';\n\n// This component is not needed anymore. However we can only safely remove it once we have an Embroider release that\n// has the special dependency rule for this addon removed:\n// https://github.com/embroider-build/embroider/blob/4fad67f16f811e7f93199a1ee92dba8254c42978/packages/compat/src/addon-dependency-rules/ember-element-helper.ts\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class DynamicElement extends Component {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { run } from '@ember/runloop';\n/**\n * @param is-retina {Boolean} If true, this will request an image at double size, but display it as a number of CSS pixels as specified in `width` and `height`.\n */\nexport default Component.extend({\n  //region Ember Hooks\n  tagName: 'img',\n  attributeBindings: ['width', 'height', 'src', 'alt', 'cropmode', 'anchor'],\n  classNameBindings: ['orientationClass'],\n\n  didRender() {\n    this._super(...arguments);\n    this.onLoadCallback = () => {\n      // This sets orientationClass which in turn adds the value\n      // as a CSS class to the component's <img> element\n      run(() => {\n        this.setOrientation();\n      });\n    };\n    this.element.addEventListener('load', this.onLoadCallback);\n    this.element.onerror = () => {\n      if (this['alt-src']) {\n        set(this, 'src', this['alt-src']);\n      }\n    };\n  },\n\n  willDestroyElement() {\n    this._super(...arguments);\n    this.element.removeEventListener('load', this.onLoadCallback);\n  },\n  //endregion\n\n  //region Attributes\n  /**\n   * @type {String}\n   */\n  'dips-url': null,\n  'media-item-id': null,\n  'external-source': null,\n  width: null,\n  height: null,\n  alt: null,\n  cropmode: null,\n  anchor: null,\n  'is-retina': false,\n  //endregion\n\n  //region Methods\n  /**\n   * Sets the orientationClass variable which is a bound classname,\n   * resulting in a class of \"square\", \"landscape\", or \"portrait\"\n   * being added to the <img>'s class attribute.\n   */\n  setOrientation() {\n    const width = this.element.offsetWidth;\n    const height = this.element.offsetHeight;\n\n    if (width === height) {\n      set(this, 'orientationClass', 'square');\n    } else if (width > height) {\n      set(this, 'orientationClass', 'landscape');\n    } else {\n      set(this, 'orientationClass', 'portrait');\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  src: computed('dips-url', 'media-item-id', 'width', 'height', 'cropmode', 'anchor', 'is-retina', function () {\n    const dipsUrl = get(this, 'dips-url');\n    const mediaItemId = get(this, 'media-item-id');\n    const externalSource = get(this, 'external-source') || '';\n    const { width, height, cropmode, anchor } = this;\n    const multiplier = get(this, 'is-retina') ? 2 : 1;\n    const queryString = [\n      width ? `width=${width * multiplier}` : null,\n      height ? `height=${height * multiplier}` : null,\n      cropmode ? `cropmode=${cropmode}` : null,\n      anchor ? `anchor=${anchor}` : null,\n    ]\n      .compact()\n      .join('&');\n    if (dipsUrl && mediaItemId) {\n      return `//${dipsUrl}/${mediaItemId}?${queryString}`;\n    }\n    return externalSource;\n  }),\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { cancel, later } from '@ember/runloop';\nimport ENV from 'ember-get-config';\n\nconst FAILED_VIDEO_POLLING_DELAY_SECONDS = 10;\nconst MAX_ATTEMPTS = ENV.environment === 'test' ? 0 : 50;\n\nexport default Component.extend({\n  //region Ember Hooks\n  attributeBindings: ['width', 'height', 'src'],\n\n  willDestroyElement() {\n    this._super(...arguments);\n    cancel(this.tryAgainTimer);\n    const video = this.element.querySelector('video');\n    video.removeEventListener('seeking', this.onVideoSeek);\n    video.removeEventListener('timeupdate', this.onVideoTimeUpdate);\n    video.removeEventListener('ended', this.onVideoEnded);\n    video.removeEventListener('loadeddata', this.onVideoLoadedData);\n  },\n\n  didInsertElement() {\n    this._super(...arguments);\n\n    this.attemptVideo();\n    if (get(this, 'disable-seeking')) {\n      this.disableSeeking();\n    }\n  },\n\n  didReceiveAttrs() {\n    this._super();\n    const video = this.element?.querySelector('video');\n    if (!get(this, 'disable-seeking') && video) {\n      video.removeEventListener('seeking', this.onVideoSeek);\n    }\n  },\n\n  //endregion\n\n  //region Attributes\n  'dips-url': null,\n  'media-item-id': null,\n  'disable-seeking': false,\n  'video-watched'() {},\n\n  width: computed('height', {\n    get() {\n      if (this._width) {\n        return this._width;\n      }\n\n      return this.height ? null : 300;\n    },\n\n    set(_key, value) {\n      return (this._width = value);\n    },\n  }),\n\n  height: null,\n  /**\n   * Pass in string \"autoplay\" in handlebars if you would like the video to auto-play on page load\n   */\n  'auto-play': '',\n  //endregion\n\n  //region Properties\n  /**\n   * How many times has the video failed to load?\n   * @private\n   * @type {Number}\n   */\n  attempts: 0,\n  maxAttempts: MAX_ATTEMPTS,\n  videoReady: false,\n  //endregion\n\n  //region Computed Properties\n  src: computed('dips-url', 'media-item-id', 'width', 'height', function () {\n    const dipsUrl = get(this, 'dips-url');\n    const mediaItemId = get(this, 'media-item-id');\n    const { width, height } = this;\n    const queryString = [width ? `width=${width}` : null, height ? `height=${height}` : null].compact().join('&');\n    if (dipsUrl && mediaItemId) {\n      return `//${dipsUrl}/videos/${mediaItemId}?${queryString}`;\n    }\n    return;\n  }),\n  /**\n   * The image URL representing the initial frame displayed for the video before clicking play\n   * We incorporate \"attempts\" because a video tag's poster image has no .load() message like the video file itself does.\n   * Bumping the \"attempts\" query paraming makes sure we're periodically refreshing the poster image.\n   */\n  poster: computed('dips-url', 'media-item-id', 'width', 'attempts', function () {\n    const { width } = this;\n    const queryString = width ? `width=${width}` : null;\n    return `//${get(this, 'dips-url')}/${get(this, 'media-item-id')}?${queryString}&attempts=${this.attempts}`;\n  }),\n  //endregion\n\n  //region Methods\n  attemptVideo() {\n    if (!this.videoReady && this.attempts < this.maxAttempts) {\n      const video = this.element.querySelector('video');\n      this.onVideoLoadedData = () => {\n        set(this, 'videoReady', true);\n      };\n      // the loadeddata event on a video tag is fired when the data for the current frame is loaded. This is a way for us\n      // to know there have not been any errors and the video is ready to be played.\n      video.addEventListener('loadeddata', this.onVideoLoadedData);\n      video.load();\n      this.incrementProperty('attempts');\n      const timer = later(this, this.attemptVideo.bind(this), FAILED_VIDEO_POLLING_DELAY_SECONDS * 1000);\n      set(this, 'tryAgainTimer', timer);\n    } else {\n      return false;\n    }\n  },\n  disableSeeking() {\n    const video = this.element.querySelector('video');\n    let supposedCurrentTime = 0;\n    let highestTime = 0;\n\n    this.onVideoSeek = () => {\n      const delta = video.currentTime - supposedCurrentTime;\n      if (Math.abs(delta) > 0.01 && video.currentTime > supposedCurrentTime && video.currentTime > highestTime) {\n        video.currentTime = supposedCurrentTime;\n      }\n    };\n\n    this.onVideoEnded = () => (supposedCurrentTime = 0);\n\n    this.onVideoTimeUpdate = () => {\n      if (!video.seeking) {\n        highestTime = video.currentTime > highestTime ? video.currentTime : highestTime;\n        supposedCurrentTime = video.currentTime;\n      }\n    };\n\n    video.addEventListener('timeupdate', this.onVideoTimeUpdate);\n    // prevent user from seeking\n    video.addEventListener('seeking', this.onVideoSeek);\n    // reset state to allow for rewatching\n    video.addEventListener('ended', this.onVideoEnded);\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  tagName: '',\n});\n","import EmberYoutube from 'ember-youtube/components/ember-youtube';\n\nexport default EmberYoutube;\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/form-field-error-and-help';\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { observer, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\n/**\n * Renders a block if the translation key is blank\n * @param {String} key - The translation key to look up\n * @param {String} [options] - An optional hash of options to pass to the translation\n * @type {Ember.Component}\n * @see {@link consumer/components/i18n-not-blank}\n */\nexport default Component.extend({\n  i18n: service(),\n  shouldShowOrHide: observer('key', 'options', function () {\n    set(this, 'isVisible', this.i18n.blank(this.key, this.options));\n  }),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { observer, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\n/**\n * Renders a block if the translation key is *not* blank\n * @param {String} key - The translation key to look up\n * @param {String} [options] - An optional hash of options to pass to the translation\n * @type {Ember.Component}\n * @see {@link consumer/components/i18n-blank}\n */\nexport default Component.extend({\n  i18n: service(),\n  shouldShowOrHide: observer('key', 'options', function () {\n    set(this, 'isVisible', !this.i18n.blank(this.key, this.options));\n  }),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set, setProperties } from '@ember/object';\nimport { isBlank } from '@ember/utils';\n\nconst isInt = str => !Number.isNaN(parseInt(str, 10));\nconst dateFrom = (yyyy, mm, dd) => {\n  if ([yyyy, mm, dd].some(x => isBlank(x) || !isInt(x))) {\n    return null;\n  }\n  const iso8601 = `${yyyy}-${mm}-${dd}`;\n  const date = new Date(iso8601);\n  if (!(date instanceof Date) || Number.isNaN(date.getTime())) {\n    return null;\n  }\n  return iso8601;\n};\n\n/**\n * @arg {String?} value\n * @arg {Boolean} required\n * @arg {Function} onValidDate - Receives the new value as an argument.\n * @arg {Function} onReset - Receives an empty string as an argument.\n * @arg {String?} inputClass - Rendered to each of the three inputs' HTML.\n */\nexport default Component.extend({\n  //region Ember Hooks\n  didReceiveAttrs() {\n    this._super(...arguments);\n    if (this.value !== this._previousValue) {\n      this.valueUpdated();\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  _previousValue: null,\n  // The Date parser takes into account locale-based formatting, so we can try a date\n  // that ONLY works in DD/MM/YYYY format to detect if that's probably the user's norm.\n  _usesDDMMYYYY: !Number.isNaN(new Date('31/12/2000').getTime()),\n  day: '',\n  month: '',\n  year: '',\n  //region\n\n  //region Methods\n  checkAndSendDate() {\n    const checked = dateFrom(this.year, this.month, this.day);\n    if (checked) {\n      return this.onValidDate(checked);\n    }\n    if (!this.day && !this.month && !this.year) {\n      return this.onReset('');\n    }\n  },\n  valueUpdated() {\n    const date = new Date(this.value);\n    setProperties(this, {\n      day: date.getUTCDate() || '',\n      month: date.getUTCMonth() + 1 || '',\n      year: date.getUTCFullYear() || '',\n      _previousValue: this.value,\n    });\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    dayChanged({ target: { value } }) {\n      set(this, 'day', value);\n      this.checkAndSendDate();\n    },\n    monthChanged({ target: { value } }) {\n      set(this, 'month', value);\n      this.checkAndSendDate();\n    },\n    yearChanged({ target: { value } }) {\n      set(this, 'year', value);\n      this.checkAndSendDate();\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Ember Hooks\n  attributeBindings: ['data-test'],\n  //endregion\n\n  //region Attributes\n  /**\n   * @type {String}\n   */\n  domain: null,\n  /**\n   * @type {String}\n   */\n  'pricing-sheet-id': null,\n  /**\n   * @type {Boolean}\n   */\n  'is-enabled': null,\n  /**\n   * @type {String}\n   */\n  'dips-url': null,\n  /**\n   * @type {Number}\n   */\n  'media-item-id': null,\n  /**\n   * @type {String}\n   */\n  'back-url': null,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { equal } from '@ember/object/computed';\n\nexport default Component.extend({\n  //region Attributes\n  /**\n   * The model entity that will serve as the menu's parent\n   * @type {Object}\n   */\n  parent: null,\n  theme: null,\n  classNames: ['nested-menu'],\n  classNameBindings: ['isDark:nested-menu--dark', 'collapsable-parents:nested-menu--collapsable'],\n  'collapsable-parents': true,\n  //endregion\n\n  //region Properties\n  isExpanded: false,\n  //endregion\n\n  //region Computed Properties\n  isDark: equal('theme', 'dark'),\n  //endregion\n});\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"<div class=\\\"w-full p-2 flex flex-col items-center mb-4\\\">\\n  <div class=\\\"text-xs text-gray-500 font-semibold mb-2 text-center\\\">\\n    Page {{this.pageNumber}} of {{this.totalPagesCount}}\\n  </div>\\n  <div class=\\\"h-1 bg-gray-100 rounded w-full max-w-[200px]\\\">\\n    <div class=\\\"h-1 bg-primary rounded\\\" style={{this.progressStyle}}></div>\\n  </div>\\n</div>\", {\"contents\":\"<div class=\\\"w-full p-2 flex flex-col items-center mb-4\\\">\\n  <div class=\\\"text-xs text-gray-500 font-semibold mb-2 text-center\\\">\\n    Page {{this.pageNumber}} of {{this.totalPagesCount}}\\n  </div>\\n  <div class=\\\"h-1 bg-gray-100 rounded w-full max-w-[200px]\\\">\\n    <div class=\\\"h-1 bg-primary rounded\\\" style={{this.progressStyle}}></div>\\n  </div>\\n</div>\",\"moduleName\":\"consumer-sweepstakes/components/page-indicator.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/page-indicator.hbs\"}});\nimport Component from '@glimmer/component';\n\n// ============================================================================\n// COMPONENT SIGNATURE\n// ============================================================================\ninterface PageIndicatorComponentSignature {\n  Element: HTMLDivElement;\n  Args: {\n    pageNumber?: number;\n    totalPagesCount?: number;\n  };\n}\n\nexport default class PageIndicatorComponent extends Component<PageIndicatorComponentSignature> {\n  // ============================================================================\n  // GETTERS\n  // ============================================================================\n\n  get progressPercentage() {\n    const pageNumber = (this.args.pageNumber || 0) > 0 ? this.pageNumber : this.pageNumber + 1;\n    const { totalPagesCount } = this;\n    if (pageNumber && totalPagesCount) {\n      return ((pageNumber - 1) / totalPagesCount) * 100;\n    }\n    return 0;\n  }\n\n  get totalPagesCount() {\n    return this.args.totalPagesCount || 0;\n  }\n\n  get pageNumber() {\n    const pageNumber = this.args.pageNumber || 0;\n    const { totalPagesCount } = this;\n    return pageNumber > 0 ? pageNumber : totalPagesCount;\n  }\n\n  get progressStyle() {\n    return `width: ${this.progressPercentage}%`;\n  }\n}\n","/* eslint-disable ember/no-incorrect-calls-with-inline-anonymous-functions, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, set, setProperties } from '@ember/object';\nimport { scheduleOnce } from '@ember/runloop';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport $ from 'jquery';\n\nimport { FocusConstrainer, KeyListener } from '../utils/accessibility';\nimport { ESC } from '../utils/keycodes';\nimport { htmlSafe } from '@ember/template';\nimport { sanitize } from 'secondstreet-common/utils/replace-tokens';\n\n/**\n * To be mixed into ApplicationViews, and used in tandem with the ModalRoute mixin.\n * @type {Ember.Mixin}\n */\nexport default Component.extend({\n  //region Dependencies\n  store: service(),\n  current: service(),\n  //endregion\n\n  //region Ember Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    $(document.body).on('click.SecondStreet', '*[data-design-template-type-id]', event => {\n      const designTemplateTypeId = parseInt(event.target.getAttribute('data-design-template-type-id'), 10);\n      run(() => this.loadAndShowPage(designTemplateTypeId));\n    });\n  },\n  willDestroyElement() {\n    this._super(...arguments);\n    $(document.body).off('click.SecondStreet');\n  },\n  show: false,\n  //endregion\n\n  //region Properties\n  html: '',\n  /**\n   * @property {FocusConstrainer}\n   */\n  focusConstrainer: computed(() => new FocusConstrainer()),\n  /**\n   * @property {KeyListener}\n   */\n  keyListener: computed(() => new KeyListener()),\n  //endregion\n\n  //region Methods\n  /**\n   * @param {String|Number} designTemplateTypeId\n   * @returns {RSVP.Promise} - Resolves with a string of HTML that is the Design Rendered Content\n   */\n  async loadPage(designTemplateTypeId) {\n    const relevantDesign = await this.store.queryRecord('design', {\n      designTemplateType: designTemplateTypeId,\n      BypassCache: true,\n      IncludeTokenContent: true,\n    });\n    const designTemplate = await relevantDesign.get('designTemplate');\n    return { design: relevantDesign, designTemplate };\n  },\n  /**\n   * @param {String|Number} designTemplateTypeId\n   * @param {Boolean} isNonCloseable\n   */\n  async loadAndShowPage(designTemplateTypeId) {\n    const result = this.current?.data?.legalDesigns?.findBy(\n      'designTemplate.designTemplateTypeId',\n      designTemplateTypeId\n    );\n    if (result?.designTemplate?.get('isCustomUrl')) {\n      window.open(result?.designTemplate?.get('redirectLink'));\n    } else {\n      const sanitizedHtml = sanitize(result?.renderedContent || '');\n      setProperties(this, { html: htmlSafe(sanitizedHtml.body.innerHTML), show: true });\n    }\n    // Double schedule -- once because it's necessary for Ember, and another\n    // because of {{ember-wormhole}}.\n    scheduleOnce('afterRender', () => {\n      scheduleOnce('afterRender', () => {\n        this.focusConstrainer.configure(document.getElementById('ssModalContainer')).begin();\n        this.keyListener\n          .configure({\n            [ESC]: () => this.hide(),\n          })\n          .begin();\n      });\n    });\n  },\n\n  hide() {\n    set(this, 'show', false);\n    this.focusConstrainer.end();\n    this.keyListener.end();\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    hide() {\n      this.hide();\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  useAnchor: false,\n  //endregion\n\n  //region Methods\n  click() {\n    this.set('didClick', true);\n    if (this.useAnchor) {\n      const anchor = document.createElement('a');\n      anchor.href = this.url;\n      anchor.target = '_blank';\n      document.getElementsByTagName('body')[0].appendChild(anchor);\n      anchor.click();\n    } else {\n      window.open(\n        this.url,\n        '_blank',\n        'centerScreen=1,menubar=0,toolbar=0,personalbar=0,status=0,dialog=1,height=620,width=640'\n      );\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\nimport { next } from '@ember/runloop';\nimport $ from 'jquery';\n\nexport default Component.extend({\n  classNames: ['simple-flyout'],\n  //region Attributes\n  'force-open': false,\n  'is-open': false,\n  //endregion\n\n  //region Ember Hooks\n  didRender() {\n    this._super(...arguments);\n    this.handleBodyClicks();\n  },\n  click(ev) {\n    const isChild = this.element.contains(ev.target);\n    const bubble = true;\n    const capture = false;\n    if (ev.target.matches('input[type=file]')) {\n      set(this, 'shouldNotClose', true);\n      return bubble;\n    } else if (this['is-open']) {\n      return isChild ? capture : bubble;\n    }\n    return bubble;\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * Sometimes we don't want the flyout to close. For example, file upload buttons force us to bubble the event which\n   * would cause body clicks to be detected and the flyout would close.\n   * @type {Boolean}\n   */\n  shouldNotClose: false,\n  //endregion\n\n  //region Computed Properties\n  show: or('is-open', 'force-open'),\n  //endregion\n\n  //region Methods\n  handleBodyClicks() {\n    $('body')\n      .off('click.simpleFlyout')\n      .one('click.simpleFlyout', () => {\n        // Bypass the flyout-close, then create a new event handler because this one has already been triggered.\n        if (this.shouldNotClose) {\n          set(this, 'shouldNotClose', false);\n          this.handleBodyClicks();\n        } else if (!this.isDestroyed) {\n          this.open(false);\n        }\n      });\n  },\n  //endregion\n\n  actions: {\n    trigger() {\n      next(() => this.open(!this['is-open'])); // Do this after click()\n    },\n  },\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals FB */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  href: '',\n  colorScheme: 'light',\n  showFaces: 'false',\n  header: 'false',\n  stream: 'false',\n  showBorder: 'false',\n  hideCover: 'true',\n  smallHeader: 'true',\n  //endregion\n\n  didInsertElement() {\n    this._super(...arguments);\n    // This forces like boxes to render after FB has initialized\n    if (window.FB) {\n      FB.XFBML.parse();\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { getOwner } from '@ember/application';\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { equal, or } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport $ from 'jquery';\nimport flatten from 'lodash/flatten';\n\nimport ENV from '../config/environment';\nimport ImportFile from '../models/import-file';\nimport MediaItem from '../models/media-item';\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nconst imageFileExtensions = ['.jpg', '.jpeg', '.gif', '.png'];\n\nconst videoFileExtensions = [\n  '.3gp',\n  '.asf',\n  '.avi',\n  '.divx',\n  '.dv',\n  '.flv',\n  '.mkv',\n  '.mov',\n  '.mp4',\n  '.mpg',\n  '.mpeg',\n  '.mpeg-ps',\n  '.ts',\n  '.mxf',\n  '.ogg',\n  '.ogv',\n  '.wmv',\n];\n/**\n * File upload component.\n * @type {Ember.Component}\n */\nexport default Component.extend({\n  session: service(),\n\n  tagName: 'form',\n  classNames: ['ssFileUploadForm'],\n  attributeBindings: ['action', 'enctype', 'target', 'method'],\n  enctype: 'multipart/form-data',\n  method: 'post',\n  currentlyUploading: false,\n  accept: 'image/*',\n  allowCapture: false,\n  /**\n   * Pass in false if you want to opt out of the ss-file-upload's default button styling\n   */\n  'is-button': true,\n\n  //region Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    this.buildAjaxUploader();\n  },\n  //endregion\n\n  //region Computed Properties\n  imagesOnly: equal('accept', 'image/*'),\n  videosOnly: equal('accept', `${VIDEO_FILE_FORMATS}`),\n  imagesOrVideoOnly: equal('accept', `${VIDEO_FILE_FORMATS},image/*`),\n  validFileTypes: computed('imagesOnly', 'videosOnly', 'imagesOrVideoOnly', 'accept', function () {\n    if (this.imagesOnly) {\n      return imageFileExtensions.join(',');\n    } else if (this.videosOnly) {\n      return videoFileExtensions.join(',');\n    } else if (this.imagesOrVideoOnly) {\n      return [...imageFileExtensions, ...videoFileExtensions].join(',');\n    }\n    return this.accept;\n  }),\n  isMediaItem: or('imagesOnly', 'videosOnly', 'imagesOrVideoOnly'),\n\n  file: null,\n\n  action: computed('file', function () {\n    if (!this.file) {\n      return;\n    }\n    const fileExtension = this.getFileExtension(this.file.name);\n    const apiEndpoint = videoFileExtensions.includes(fileExtension)\n      ? 'media_items?MediaType=3'\n      : imageFileExtensions.includes(fileExtension)\n      ? 'media_items'\n      : 'audience_import_files';\n    return `${ENV.APP.config.apiHost}/${ENV.APP.config.apiNamespace}/${apiEndpoint}`;\n  }),\n  //endregion\n\n  //region Methods\n  buildAjaxUploader() {\n    const pluralizedJsonItemType = this.isMediaItem ? 'media_items' : 'import_files';\n\n    this.element.onchange = event => {\n      const { files } = event.target;\n      if (files.length > 0) {\n        set(this, 'file', files[0]);\n\n        if (this.isValidFile(this.file.name)) {\n          this.clearModelErrors();\n          this.prepareFileUpload();\n          const data = new FormData();\n          data.append('file', this.file);\n          $.ajax({\n            type: 'POST',\n            url: this.action,\n            contentType: false,\n            processData: false,\n            data,\n            headers: getOwner(this).lookup('adapter:application').headers,\n            success: uploadResponse => {\n              this.uploadingAction(this.file);\n              const [mediaItemJSON] = JSON.parse(uploadResponse)[pluralizedJsonItemType];\n              this.successfulFileUpload(mediaItemJSON);\n            },\n            error: errors => {\n              this.failedFileUpload(errors, this);\n            },\n          });\n        } else {\n          const itemType = this.isMediaItem ? 'mediaItem' : 'importFile';\n          const propertyName = get(this, 'propertyName') || `${itemType}Id`;\n          this.addModelError(propertyName, `Invalid file type. Valid file types include: ${this.validFileTypes}`);\n        }\n      }\n    };\n  },\n  prepareFileUpload() {\n    set(this, 'problemUploading', false);\n    set(this, 'currentlyUploading', true);\n  },\n  successfulFileUpload(responseJSON) {\n    const jsonApiDocument = getOwner(this)\n      .lookup('serializer:application')\n      .normalize(this.isMediaItem ? MediaItem : ImportFile, responseJSON);\n    jsonApiDocument.data.type = this.isMediaItem ? 'media-item' : 'import-file';\n    const responseItem = getOwner(this).lookup('service:store').push(jsonApiDocument);\n\n    this.addingFile(responseItem);\n    set(this, 'currentlyUploading', false);\n    /**\n     * We are rerendering here to reset the file input, which is unusually complex to do otherwise...\n     */\n    this.rerender();\n\n    // Reset the form so it can detect if the same file is uploaded twice in a row:\n    this.element.reset();\n\n    return responseItem;\n  },\n  failedFileUpload(errors, fileUploader) {\n    set(this, 'problemUploading', true);\n    set(this, 'currentlyUploading', false);\n\n    const itemType = this.isMediaItem ? 'mediaItem' : 'importFile';\n    const propertyName = get(fileUploader, 'propertyName') || `${itemType}Id`;\n    fileUploader.addModelError(propertyName, get(JSON.parse(errors.responseText).errors, 'firstObject.message'));\n\n    // Reset the form so it can detect if the same file is uploaded twice in a row:\n    this.element.reset();\n  },\n  getFileExtension(fileName) {\n    if (fileName) {\n      return fileName.substring(fileName.lastIndexOf('.')).toLowerCase();\n    }\n    return null;\n  },\n  isValidFile(fileName) {\n    const fileExtension = this.getFileExtension(fileName);\n    const acceptedItems = flatten(\n      this.accept.split(',').map(acceptedItem => {\n        switch (acceptedItem.trim()) {\n          case 'image/*':\n            return imageFileExtensions;\n          case 'video/*':\n            return videoFileExtensions;\n          case 'video/mp4':\n            return ['mp4'];\n          default:\n            return [acceptedItem];\n        }\n      })\n    );\n    return acceptedItems.includes(fileExtension);\n  },\n\n  clearModelErrors() {\n    const { model } = this;\n    if (model && get(model, 'errors.length') > 0) {\n      /**\n       * Manually clearing the errors that were manually added\n       */\n      get(model, 'errors').clear();\n    }\n  },\n  /**\n   * This inserts an error message into the model\n   * @param propertyName\n   * @param errorMessage\n   */\n  addModelError(propertyName, errorMessage) {\n    const { model } = this;\n    this.element.querySelector('input[type=\"file\"]').value = '';\n\n    if (model) {\n      model.forceDirty();\n      get(model, 'errors').add(propertyName, [errorMessage]);\n    }\n  },\n\n  //endregion\n});\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action no-curly-component-invocation no-invalid-interactive simple-unless }}\\n<div\\n  {{did-insert this.setup}}\\n  {{did-update this.updateFormPage this.desiredPageNumber}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-entry-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.hasStartedRegistration}}\\n      <div class=\\\"form-user\\\">\\n        <span\\n          role=\\\"button\\\"\\n          class=\\\"ssStartFormOver cursor-pointer\\\"\\n          {{on \\\"click\\\" (queue this.clearStoredValues (fn this.logout \\\"\\\"))}}\\n        >\\n          {{i18n-t \\\"start_form_over\\\"}}\\n        </span>\\n      </div>\\n    {{/if}}\\n    <form\\n      class=\\\"photo-upload-form {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\"\\n      {{on \\\"submit\\\" (prevent-default (perform this.submitFormPagesTask))}}\\n    >\\n      {{! Show headers only if not a ballot form }}\\n      {{#if @showFormHeaders}}\\n        {{#if this.entryFormSubmissionId}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"register\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t \\\"fill_out_form_with_your_info_to_register\\\"}}\\n          </div>\\n        {{else}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"submit_your_entry\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t\\n              (if @hasCategories \\\"fill_out_form_to_enter_category\\\" \\\"fill_out_form_to_enter_gallery\\\")\\n              categoryName=this.capitalizedCategoryName\\n            }}\\n          </div>\\n        {{/if}}\\n      {{else if this.isBallot}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{#if this.isNominationBallot}}\\n            {{i18n-t \\\"submit_your_nomination\\\"}}\\n          {{else}}\\n            {{i18n-t \\\"submit_your_write-in\\\"}}\\n          {{/if}}\\n        </div>\\n      {{/if}}\\n\\n      {{#if (has-block \\\"message\\\")}}\\n        {{yield to=\\\"message\\\"}}\\n      {{/if}}\\n\\n      <div class=\\\"uploaded-image-wrapper {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\">\\n        {{#if\\n          (and this.isBallot (not (or this.emailAddressThatIsAlreadyInUse this.emailAddressThatRequiresVerification)))\\n        }}\\n          {{#if (and this.googlePlaceField (not this.shouldShowEntryPreview))}}\\n            <SsFormFieldGooglePlace\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{@labelTextOverride}}\\n              @promotionLanguageCode={{this.languageCode}}\\n              @placeName={{this.entryTitleFormField.value}}\\n              @setEntryName={{this.setEntryName}}\\n              @setPlaceObject={{this.setPlaceObject}}\\n              @formField={{this.entryTitleFormField}}\\n              class=\\\"ballot-entrant-name\\\"\\n            />\\n          {{else if this.entryTitleFormField}}\\n            <SsFormFieldTextbox\\n              class=\\\"ballot-entrant-name\\\"\\n              @form-field={{this.entryTitleFormField}}\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{this.labelTextOverride}}\\n              @disabled={{this.shouldShowEntryPreview}}\\n              @show-suggested-values={{false}}\\n              @suggested-values={{this.suggestedValues}}\\n            />\\n          {{/if}}\\n        {{/if}}\\n        {{#if (not (and this.entryFormSubmissionId @splitSubmission))}}\\n          <div class=\\\"uploaded-image\\\">\\n            {{#if this.isUploadingImage}}\\n              <div class=\\\"empty-image-container loading\\\">\\n                <i class=\\\"ssIcon ssIcon-spinner ssIcon-spin\\\"></i>\\n              </div>\\n            {{else}}\\n              {{#if this.uploadedMediaItemId}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_photo\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeImage\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"upload_change_photo\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                <DipsImage\\n                  @dips-url={{@dipsUrl}}\\n                  @media-item-id={{this.uploadedMediaItemId}}\\n                  @width=\\\"600\\\"\\n                  width=\\\"600\\\"\\n                />\\n              {{/if}}\\n              {{#if (and this.uploadedVideoId this.showVideoPreview)}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_video\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeVideo\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"change_video_button_text\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                {{#if this.videoUploadedByUrl}}\\n                  <YoutubeVideo\\n                    @width=\\\"600\\\"\\n                    @height=\\\"315\\\"\\n                    width=\\\"600\\\"\\n                    height=\\\"315\\\"\\n                    @video-id={{this.uploadedVideoId}}\\n                  />\\n                {{else}}\\n                  <DipsVideo\\n                    @dips-url={{@dipsUrl}}\\n                    @media-item-id={{this.uploadedVideoId}}\\n                    @alt-src=\\\"/Images/video-removed-by-user.png\\\"\\n                    @blobUrl={{this.blobUrl}}\\n                    @width=\\\"600\\\"\\n                    width=\\\"600\\\"\\n                  />\\n                {{/if}}\\n              {{/if}}\\n            {{/if}}\\n          </div>\\n        {{/if}}\\n        {{#if (and this.shouldShowEntryPreview this.entryCaptionFormField)}}\\n          {{ss-form-field-textarea form-field=this.entryCaptionFormField disabled=true}}\\n        {{/if}}\\n      </div>\\n      <div class=\\\"form-pages {{if this.isBallot 'ballot-form'}}\\\">\\n        {{#if this.emailAddressThatIsAlreadyInUse}}\\n          <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{this.promotion-name}} />\\n        {{else if this.emailAddressThatRequiresVerification}}\\n          <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n        {{else}}\\n          {{#if this.shouldShowEntryForm}}\\n            <SsFormPageEntryRegistration\\n              @page={{this.entryFormPage}}\\n              @googlePlaceField={{this.googlePlaceField}}\\n              @entryNameField={{this.entryTitleFormField}}\\n              @isSaving={{this.isSaving}}\\n              @isBallotForm={{this.isBallot}}\\n              @suggestedValues={{this.suggestedValues}}\\n              @matchupClassificationType={{@matchupClassificationType}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @uploadedMediaItemId={{this.uploadedMediaItemId}}\\n              @uploadedVideoId={{this.uploadedVideoId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @beginUpload={{this.beginUpload}}\\n              @uploadImage={{this.uploadImage}}\\n              @uploadVideo={{this.uploadVideo}}\\n              @uploadMedia={{this.uploadMedia}}\\n              @uploadVideoByUrl={{this.uploadVideo}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @promotionType={{@promotionType}}\\n              @autoFocus={{@autoFocus}}\\n              @storeFieldValues={{this.isPersistingEntryData}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              @mediaId={{or this.uploadedMediaItemId this.uploadedVideoId}}\\n              @urlTextbox={{this.urlTextbox}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.useCurrentFormPage}}\\n            {{#if this.isBallot}}\\n              <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n                {{i18n-t \\\"register\\\"}}\\n              </div>\\n              <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n                {{i18n-t \\\"write-in_information_text\\\"}}\\n              </div>\\n            {{/if}}\\n\\n            <SsFormPageEntryRegistration\\n              @page={{this.currentFormPage}}\\n              @isSaving={{this.isSaving}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @languageCode={{this.languageCode}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              @promotionType={{this.promotionType}}\\n              @autoFocus={{this.autoFocus}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.isLastPage}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if\\n                    this.isBallot\\n                    'vote-button ssFormVoteButton'\\n                    'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n                  )\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t this.submitButtonText}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{else}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if @changeToWriteIn 'vote-button ssFormVoteButton' 'ssButtonPrimary bg-primary text-primary-text')\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth' 'ssButtonContinue'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t (if @changeToWriteIn (if this.isNominationBallot \\\"change_nomination\\\" \\\"change_vote\\\") \\\"continue\\\")}}\\n              {{#unless @changeToWriteIn}}\\n                <i class=\\\"ssIcon-chevron-right\\\"></i>\\n              {{/unless}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{/if}}\\n          {{#if @changeToWriteIn}}\\n            <button\\n              type=\\\"button\\\"\\n              class=\\\"ssButton ssButtonFlat ssButtonNormalWidth\\\"\\n              {{on \\\"click\\\" this.closeChangeWriteIn}}\\n            >\\n              {{i18n-t \\\"video_upload_cancel\\\"}}\\n            </button>\\n          {{/if}}\\n        {{/if}}\\n        {{#unless this.isBallot}}\\n          <div class=\\\"cancel-entry\\\">\\n            <div role=\\\"button\\\" class=\\\"back-to-gallery back-to-gallery--enter\\\" {{on \\\"click\\\" this.cancel}}>\\n              {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n            </div>\\n          </div>\\n        {{/unless}}\\n      </div>\\n    </form>\\n  {{/if}}\\n</div>\", {\"contents\":\"{{! template-lint-disable no-action no-curly-component-invocation no-invalid-interactive simple-unless }}\\n<div\\n  {{did-insert this.setup}}\\n  {{did-update this.updateFormPage this.desiredPageNumber}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-entry-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.hasStartedRegistration}}\\n      <div class=\\\"form-user\\\">\\n        <span\\n          role=\\\"button\\\"\\n          class=\\\"ssStartFormOver cursor-pointer\\\"\\n          {{on \\\"click\\\" (queue this.clearStoredValues (fn this.logout \\\"\\\"))}}\\n        >\\n          {{i18n-t \\\"start_form_over\\\"}}\\n        </span>\\n      </div>\\n    {{/if}}\\n    <form\\n      class=\\\"photo-upload-form {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\"\\n      {{on \\\"submit\\\" (prevent-default (perform this.submitFormPagesTask))}}\\n    >\\n      {{! Show headers only if not a ballot form }}\\n      {{#if @showFormHeaders}}\\n        {{#if this.entryFormSubmissionId}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"register\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t \\\"fill_out_form_with_your_info_to_register\\\"}}\\n          </div>\\n        {{else}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"submit_your_entry\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t\\n              (if @hasCategories \\\"fill_out_form_to_enter_category\\\" \\\"fill_out_form_to_enter_gallery\\\")\\n              categoryName=this.capitalizedCategoryName\\n            }}\\n          </div>\\n        {{/if}}\\n      {{else if this.isBallot}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{#if this.isNominationBallot}}\\n            {{i18n-t \\\"submit_your_nomination\\\"}}\\n          {{else}}\\n            {{i18n-t \\\"submit_your_write-in\\\"}}\\n          {{/if}}\\n        </div>\\n      {{/if}}\\n\\n      {{#if (has-block \\\"message\\\")}}\\n        {{yield to=\\\"message\\\"}}\\n      {{/if}}\\n\\n      <div class=\\\"uploaded-image-wrapper {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\">\\n        {{#if\\n          (and this.isBallot (not (or this.emailAddressThatIsAlreadyInUse this.emailAddressThatRequiresVerification)))\\n        }}\\n          {{#if (and this.googlePlaceField (not this.shouldShowEntryPreview))}}\\n            <SsFormFieldGooglePlace\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{@labelTextOverride}}\\n              @promotionLanguageCode={{this.languageCode}}\\n              @placeName={{this.entryTitleFormField.value}}\\n              @setEntryName={{this.setEntryName}}\\n              @setPlaceObject={{this.setPlaceObject}}\\n              @formField={{this.entryTitleFormField}}\\n              class=\\\"ballot-entrant-name\\\"\\n            />\\n          {{else if this.entryTitleFormField}}\\n            <SsFormFieldTextbox\\n              class=\\\"ballot-entrant-name\\\"\\n              @form-field={{this.entryTitleFormField}}\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{this.labelTextOverride}}\\n              @disabled={{this.shouldShowEntryPreview}}\\n              @show-suggested-values={{false}}\\n              @suggested-values={{this.suggestedValues}}\\n            />\\n          {{/if}}\\n        {{/if}}\\n        {{#if (not (and this.entryFormSubmissionId @splitSubmission))}}\\n          <div class=\\\"uploaded-image\\\">\\n            {{#if this.isUploadingImage}}\\n              <div class=\\\"empty-image-container loading\\\">\\n                <i class=\\\"ssIcon ssIcon-spinner ssIcon-spin\\\"></i>\\n              </div>\\n            {{else}}\\n              {{#if this.uploadedMediaItemId}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_photo\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeImage\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"upload_change_photo\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                <DipsImage\\n                  @dips-url={{@dipsUrl}}\\n                  @media-item-id={{this.uploadedMediaItemId}}\\n                  @width=\\\"600\\\"\\n                  width=\\\"600\\\"\\n                />\\n              {{/if}}\\n              {{#if (and this.uploadedVideoId this.showVideoPreview)}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_video\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeVideo\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"change_video_button_text\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                {{#if this.videoUploadedByUrl}}\\n                  <YoutubeVideo\\n                    @width=\\\"600\\\"\\n                    @height=\\\"315\\\"\\n                    width=\\\"600\\\"\\n                    height=\\\"315\\\"\\n                    @video-id={{this.uploadedVideoId}}\\n                  />\\n                {{else}}\\n                  <DipsVideo\\n                    @dips-url={{@dipsUrl}}\\n                    @media-item-id={{this.uploadedVideoId}}\\n                    @alt-src=\\\"/Images/video-removed-by-user.png\\\"\\n                    @blobUrl={{this.blobUrl}}\\n                    @width=\\\"600\\\"\\n                    width=\\\"600\\\"\\n                  />\\n                {{/if}}\\n              {{/if}}\\n            {{/if}}\\n          </div>\\n        {{/if}}\\n        {{#if (and this.shouldShowEntryPreview this.entryCaptionFormField)}}\\n          {{ss-form-field-textarea form-field=this.entryCaptionFormField disabled=true}}\\n        {{/if}}\\n      </div>\\n      <div class=\\\"form-pages {{if this.isBallot 'ballot-form'}}\\\">\\n        {{#if this.emailAddressThatIsAlreadyInUse}}\\n          <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{this.promotion-name}} />\\n        {{else if this.emailAddressThatRequiresVerification}}\\n          <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n        {{else}}\\n          {{#if this.shouldShowEntryForm}}\\n            <SsFormPageEntryRegistration\\n              @page={{this.entryFormPage}}\\n              @googlePlaceField={{this.googlePlaceField}}\\n              @entryNameField={{this.entryTitleFormField}}\\n              @isSaving={{this.isSaving}}\\n              @isBallotForm={{this.isBallot}}\\n              @suggestedValues={{this.suggestedValues}}\\n              @matchupClassificationType={{@matchupClassificationType}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @uploadedMediaItemId={{this.uploadedMediaItemId}}\\n              @uploadedVideoId={{this.uploadedVideoId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @beginUpload={{this.beginUpload}}\\n              @uploadImage={{this.uploadImage}}\\n              @uploadVideo={{this.uploadVideo}}\\n              @uploadMedia={{this.uploadMedia}}\\n              @uploadVideoByUrl={{this.uploadVideo}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @promotionType={{@promotionType}}\\n              @autoFocus={{@autoFocus}}\\n              @storeFieldValues={{this.isPersistingEntryData}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              @mediaId={{or this.uploadedMediaItemId this.uploadedVideoId}}\\n              @urlTextbox={{this.urlTextbox}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.useCurrentFormPage}}\\n            {{#if this.isBallot}}\\n              <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n                {{i18n-t \\\"register\\\"}}\\n              </div>\\n              <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n                {{i18n-t \\\"write-in_information_text\\\"}}\\n              </div>\\n            {{/if}}\\n\\n            <SsFormPageEntryRegistration\\n              @page={{this.currentFormPage}}\\n              @isSaving={{this.isSaving}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @languageCode={{this.languageCode}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              @promotionType={{this.promotionType}}\\n              @autoFocus={{this.autoFocus}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.isLastPage}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if\\n                    this.isBallot\\n                    'vote-button ssFormVoteButton'\\n                    'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n                  )\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t this.submitButtonText}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{else}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if @changeToWriteIn 'vote-button ssFormVoteButton' 'ssButtonPrimary bg-primary text-primary-text')\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth' 'ssButtonContinue'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t (if @changeToWriteIn (if this.isNominationBallot \\\"change_nomination\\\" \\\"change_vote\\\") \\\"continue\\\")}}\\n              {{#unless @changeToWriteIn}}\\n                <i class=\\\"ssIcon-chevron-right\\\"></i>\\n              {{/unless}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{/if}}\\n          {{#if @changeToWriteIn}}\\n            <button\\n              type=\\\"button\\\"\\n              class=\\\"ssButton ssButtonFlat ssButtonNormalWidth\\\"\\n              {{on \\\"click\\\" this.closeChangeWriteIn}}\\n            >\\n              {{i18n-t \\\"video_upload_cancel\\\"}}\\n            </button>\\n          {{/if}}\\n        {{/if}}\\n        {{#unless this.isBallot}}\\n          <div class=\\\"cancel-entry\\\">\\n            <div role=\\\"button\\\" class=\\\"back-to-gallery back-to-gallery--enter\\\" {{on \\\"click\\\" this.cancel}}>\\n              {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n            </div>\\n          </div>\\n        {{/unless}}\\n      </div>\\n    </form>\\n  {{/if}}\\n</div>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-entry-registration.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-entry-registration.hbs\"}});\n/* eslint-disable @typescript-eslint/restrict-template-expressions, ember/no-computed-properties-in-native-classes */\nimport { debounce, later, next } from '@ember/runloop';\nimport SsFormNewComponent, { Error } from './ss-form';\nimport { DeveloperError } from 'secondstreet-common/utils/errors';\nimport { service } from '@ember/service';\nimport EnumsService from 'ember-cli-ss-enums/services/enums';\nimport RouterService from '@ember/routing/router-service';\nimport ScrollerService from 'consumer/services/scroller';\nimport Store from '@ember-data/store';\nimport { tracked } from '@glimmer/tracking';\nimport { isBlank, isEmpty, isNone, isPresent } from '@ember/utils';\nimport { capitalize } from '@ember/string';\nimport FormPageSubmissionModel from 'consumer/models/form-page-submission';\nimport clearFormFieldValues from 'consumer/utils/clear-form-field-values';\nimport MatchupEntryModel from 'consumer/models/matchup-entry';\nimport VoteModel from 'consumer/models/vote';\nimport FormPageModel from 'consumer/models/form-page';\nimport MediaItemModel from 'consumer/models/media-item';\nimport { action, computed } from '@ember/object';\nimport FormFieldModel from 'consumer/models/form-field';\nimport { task } from 'ember-concurrency';\n\nexport default class SsFormEntryRegistrationComponent extends SsFormNewComponent {\n  @service declare entries: any;\n  @service declare enums: EnumsService;\n  @service declare router: RouterService;\n  @service declare scroller: ScrollerService;\n  @service declare session: any;\n  @service declare store: Store;\n  @service declare votes: any;\n\n  @tracked blobUrl = '';\n  @tracked uploadedMediaItemId = '';\n  @tracked uploadedVideoId = '';\n\n  @tracked isUploadingImage = false;\n  @tracked placeObject: any = null;\n\n  get isPersistingEntryData() {\n    return this.args.persistEntryData || this.args.isEditingSubmission;\n  }\n\n  get formPageFields() {\n    return this.args.entryForm?.formPages?.toArray()?.[0]?.formFields || [];\n  }\n\n  get showVideoPreview() {\n    return this.formPageFields\n      .toArray()\n      .some(\n        field => field.fieldType === 'VideoSelect' || (field.fieldType === 'ImageSelect' && field.allowVideoUpload)\n      );\n  }\n\n  get allowAllMediaUpload() {\n    return this.formPageFields\n      .toArray()\n      .some(\n        field =>\n          (field.fieldType === 'ImageSelect' && field.allowVideoUpload) ||\n          (field.fieldType === 'VideoSelect' && field.allowPhotoUpload)\n      );\n  }\n\n  get nextRegistrationPageToComplete() {\n    return this.session.isLoggedIn\n      ? undefined\n      : this.form?.formPages\n          .toArray()\n          .sortBy('pageNumber')\n          .find(page => page.hasFormFields);\n  }\n\n  get shouldShowEntryForm() {\n    return this.currentFormPage?.pageNumber && !this.entryFormSubmissionId;\n  }\n\n  get shouldShowEntryPreview() {\n    return this.currentFormPage?.pageNumber && !!this.entryFormSubmissionId && this.args.promotionType === 'Ballot';\n  }\n\n  get urlTextbox() {\n    return this.formPageFields.find(field => field.fieldType == 'UrlTextbox');\n  }\n\n  @computed('urlTextbox.value')\n  get videoUploadedByUrl() {\n    return this.urlTextbox?.value;\n  }\n\n  get entryTitleFormField() {\n    return this.formPageFields.find(\n      formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'PhotoTitle' }).toString()\n    );\n  }\n\n  get entryCaptionFormField() {\n    return this.formPageFields.find(\n      formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'PhotoCaption' }).toString()\n    );\n  }\n\n  get googlePlaceField() {\n    return this.formPageFields.find(formField => formField.fieldType == 'GooglePlace');\n  }\n\n  get isBallot() {\n    return this.args.promotionType == 'Ballot';\n  }\n\n  get isNominationBallot() {\n    return this.args.promotionSubType == 'NominationAndVotingBallot';\n  }\n\n  get submitButtonText() {\n    if (this.isBallot) {\n      if (this.args.changeToWriteIn) {\n        return this.isNominationBallot ? 'change_nomination' : 'change_vote';\n      }\n      return this.isNominationBallot ? 'nominate' : 'vote_button_vote';\n    }\n    return 'submit';\n  }\n\n  get hasStartedRegistration() {\n    if (this.session.thirdPartyAuthProvider && this.session.thirdPartyUsesExternalLogin) {\n      return false;\n    }\n\n    if (!this.currentFormPage) {\n      return false;\n    }\n\n    return this.args.splitSubmission\n      ? this.entryFormSubmissionId\n      : this.currentFormPage?.pageNumber == 1\n      ? false\n      : !isEmpty(this.session.accessToken);\n  }\n\n  get isLastPage() {\n    if (this.args.splitSubmission && !this.entryFormSubmissionId) {\n      return !this.nextRegistrationPageToComplete;\n    }\n    return this.form?.formPagesCount == this.currentFormPage?.pageNumber;\n  }\n\n  get entryFormPage() {\n    return this.args.entryForm?.formPages?.toArray()?.[0];\n  }\n\n  get useCurrentFormPage() {\n    return !(this.session.isLoggedIn || (this.args.splitSubmission && !this.entryFormSubmissionId));\n  }\n\n  get capitalizedCategoryName() {\n    return this.args.matchupName ? this.args.matchupName.split(' ').filter(isPresent).map(capitalize).join(' ') : '';\n  }\n\n  get isSaving() {\n    return (\n      this.submitFormPagesTask.isRunning ||\n      this.submitFormPageTask.isRunning ||\n      this.isTurnstileChecking ||\n      this.isUploadingImage ||\n      this.args.freezeFormState\n    );\n  }\n\n  captureFormSubmissionDetails(formPageSubmission: FormPageSubmissionModel) {\n    super.captureFormSubmissionDetails(formPageSubmission);\n    const { formSubmissionId } = formPageSubmission;\n    if (formSubmissionId) {\n      const { formType } = formPageSubmission.form;\n      switch (formType) {\n        case 'EntrySubmission':\n          this.entryFormSubmissionId = formSubmissionId;\n          this.localStorage.setItem(this.prefix('entryFormSubmissionId'), formSubmissionId);\n          break;\n        case 'Registration':\n          break;\n        default:\n          throw new DeveloperError(`Unexpected Form type ${formType} when capturing FormSubmission`);\n      }\n      this.matchupEntryId = `${formPageSubmission.matchupEntryId}` || this.matchupEntryId || undefined;\n      this.entryId = formPageSubmission.entryId || this.entryId || undefined;\n    }\n  }\n\n  clearFormRelatedLocalStorage(excludedItems: string[] = []) {\n    const { localStorage } = this;\n    super.clearFormRelatedLocalStorage(excludedItems);\n    localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_formValues`);\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_mediaItemId`);\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_videoId`);\n  }\n\n  /////\n\n  clearFormPageErrors() {\n    (this.form?.formPages || []).forEach(fp => {\n      fp.errors.clear();\n    });\n    this.entryFormPage?.errors.clear();\n  }\n\n  async restoreProgress() {\n    if (!this.isPersistingEntryData) {\n      clearFormFieldValues(this.args.entryForm);\n    }\n\n    await super.restoreProgress();\n    const { localStorage } = this;\n    const [mediaItemId, videoId, entryFormSubmissionId] = await Promise.all([\n      localStorage.getItem(this.prefix('mediaItemId')),\n      localStorage.getItem(this.prefix('videoId')),\n      localStorage.getItem(this.prefix('entryFormSubmissionId')),\n    ]);\n    if (this.isDestroyed) {\n      return;\n    }\n    this.entryFormSubmissionId = entryFormSubmissionId || null;\n    this.uploadedVideoId = videoId || this.storedFormFields?.['videoId'] || null;\n    this.uploadedMediaItemId = mediaItemId || this.storedFormFields?.['mediaItemId'] || null;\n\n    const { currentFormPage } = this;\n    if (currentFormPage) {\n      if (!this.videoUploadedByUrl) {\n        this.formPageFields\n          .filter(formField => formField.fieldType == 'ImageSelect')\n          .forEach(x => {\n            x.value = x.allowVideoUpload ? mediaItemId || videoId || null : mediaItemId || null;\n          });\n      }\n      this.formPageFields\n        .filter(formField => formField.fieldType == (this.videoUploadedByUrl ? 'UrlTextbox' : 'VideoSelect'))\n        .forEach(x => (x.value = videoId || null));\n    }\n    if (!this.isPersistingEntryData) {\n      this.syncFormWithStoredValues();\n    }\n  }\n\n  async restoreFormValues() {\n    await super.restoreFormValues();\n    const json = await this.localStorage.getItem(`FORM_${this.args.entryForm?.id}_formValues`);\n    const values = JSON.parse(json);\n    if (values && this.formPageFields) {\n      this.formPageFields.forEach(formField => {\n        const value = values[formField.id];\n        formField.value = isNone(value) ? '' : value;\n      });\n    }\n    if (!this.isPersistingEntryData) {\n      this.syncFormWithStoredValues();\n    }\n    // After we go through local storage, set the values to default if they are currently blank\n    this.setValuesToDefaultIfBlank();\n  }\n\n  syncFormWithStoredValues() {\n    this.formPageFields.forEach(x => {\n      x.value = this.storedFormFields?.[x.id];\n    });\n  }\n\n  setValuesToDefaultIfBlank() {\n    super.setValuesToDefaultIfBlank();\n    const { formPageFields } = this;\n    if (formPageFields) {\n      formPageFields.forEach(formField => {\n        if (isBlank(formField.value)) {\n          formField.value = formField.defaultValue;\n        }\n      });\n    }\n  }\n\n  clearFormFieldValues() {\n    super.clearFormFieldValues();\n    clearFormFieldValues(this.args.entryForm);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"EntryLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  entryLimitReached(error: Error) {\n    const formPage = this.useCurrentFormPage ? this.currentFormPage : this.entryFormPage;\n\n    formPage?.forceDirty();\n    formPage?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"VoteLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  voteLimitReached(error: Error) {\n    const formPage = this.currentFormPage;\n    if (this.session.isLoggedIn) {\n      formPage?.forceDirty();\n      formPage?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n    } else {\n      this.session.on('ActiveSession', this, 'recastVote');\n      next(this, this.recastVote);\n    }\n  }\n\n  async changeVote(\n    currentEntry: MatchupEntryModel,\n    currentVote: VoteModel,\n    formPageSubmission: FormPageSubmissionModel\n  ) {\n    try {\n      if (currentVote) {\n        await this.votes.unVote(currentVote);\n      }\n      if (currentEntry && currentEntry.entry) {\n        const { entry } = currentEntry;\n        await entry.destroyRecord();\n      }\n\n      await formPageSubmission.save();\n      await Promise.all([this.votes.loadVotes(), this.entries.loadEntries()]);\n      const finishedAction = this.args.finished;\n      finishedAction?.(this.args.matchup, this.matchupEntryId, this.entryId);\n    } finally {\n      this.setVotesServiceAttributes('recastingVote', false);\n      this.clearFormPageErrors();\n      this.session.off('ActiveSession', this, 'recastVote');\n    }\n  }\n  /**\n   * Called to recast the attempted vote after they receive with \"VoteLimitReached\" Error.\n   * Only applicable to consumer-entry-showcase\n   * @private\n   */\n  recastVote = async () => {\n    if (!this.session.isLoggedIn) {\n      debounce(this, this.recastVote, 150);\n    }\n    if (!this.entryFormPage) {\n      return;\n    }\n    const formPageSubmission = this.createFormSubmission(this.entryFormPage);\n    if (this.votes.recastingVote) {\n      return;\n    }\n    if (isEmpty(this.votes.currentVotes) || isEmpty(this.entries.userEntries)) {\n      this.setVotesServiceAttributes('loadingVote', true);\n      this.setVotesServiceAttributes('recastingVote', true);\n      await Promise.all([this.votes.loadVotes(), this.entries.loadEntries()]);\n    }\n    if (isEmpty(this.votes.currentVotes) && isEmpty(this.entries.userEntries)) {\n      this.setVotesServiceAttributes('recastingVote', false);\n      debounce(this, this.recastVote, 150);\n      return;\n    }\n    const { entry: currentEntry, vote: voteToDelete } = this.findCurrentVoteAndEntry();\n    if (isBlank(currentEntry) && isBlank(voteToDelete)) {\n      this.session.off('ActiveSession', this, 'recastVote');\n      return;\n    }\n    this.setVotesServiceAttributes('recastingVote', true);\n    this.setVotesServiceAttributes('loadingVote', false);\n\n    await this.changeVote(currentEntry, voteToDelete, formPageSubmission);\n  };\n\n  setVotesServiceAttributes(attribute: string, value: any) {\n    /* if (get(getOwner(this), 'isDestroyed')) {\n      return;\n    } */\n\n    this.votes[attribute] = value;\n  }\n\n  async ensureBallotStateLoaded() {\n    if (!this.session.isLoggedIn) {\n      return;\n    }\n\n    const waitForInFlightVotes = this.votes.isLoading\n      ? new Promise(resolve => {\n          const startedAt = Date.now();\n          const timer = setInterval(() => {\n            if (!this.votes.isLoading || Date.now() - startedAt > 5000) {\n              clearInterval(timer);\n              resolve(undefined);\n            }\n          }, 25);\n        })\n      : isEmpty(this.votes.userVotes)\n      ? this.votes.loadVotes()\n      : Promise.resolve();\n\n    const entriesPromise =\n      this.entries.isLoadingEntries || !this.entries.isLoaded ? this.entries.loadEntries() : Promise.resolve();\n\n    await Promise.all([waitForInFlightVotes, entriesPromise]);\n  }\n\n  /**\n   * Called to locate the matchup's vote and entry, if they exist.\n   * @private\n   * @returns {Entry,Vote}\n   */\n  findCurrentVoteAndEntry() {\n    const { matchup } = this.args;\n    const [writeInEntry] = this.entries.filterWriteinNominationsForThisCategoryAndInterval(matchup);\n    const matchupId = matchup ? `${matchup.id}` : '';\n    const matchupEntries = (this.entries.userEntries || []).filter(\n      (entry: MatchupEntryModel) => `${entry.matchupId}` === matchupId\n    );\n    const userMatchupEntry = [...matchupEntries].sort((a, b) => Number(a.id) - Number(b.id)).pop();\n    const currentEntry = writeInEntry || userMatchupEntry;\n    const { entryFormPage } = this;\n    const vote =\n      this.votes.findVoteWithinMatchupForCurrentInterval(matchup) ||\n      (this.args.currentMatchupEntry && this.votes.currentVoteForMatchupEntry(this.args.currentMatchupEntry));\n    if (\n      isPresent(currentEntry) &&\n      isPresent(vote) &&\n      vote.get('matchupEntry.entry.id') === currentEntry.get('entry.id')\n    ) {\n      const entry = currentEntry.get('entry');\n      const pageFields = entryFormPage?.get('formFields');\n\n      if (pageFields && pageFields.find(pageField => pageField.get('value') === entry.get('name'))) {\n        return { entry: null, vote: null };\n      }\n    }\n    return { entry: currentEntry, vote };\n  }\n\n  /**\n   * Called when a user receives a {@link DS.InvalidError}.\n   * @private\n   * @param {Error} invalidError\n   */\n  validationFailure(invalidError: any) {\n    super.validationFailure(invalidError);\n    const formFields = this.formPageFields;\n    formFields.forEach((ff: FormFieldModel) => ff.field.errors.clear());\n    invalidError.errors.forEach((error: any) => {\n      if (error.source.pointer.match('matchup_id')) {\n        // It's an error on the matchup\n        const formPage = this.currentFormPage;\n        formPage?.errors.add('value', error.detail);\n      }\n      if (error.source.pointer.match(/\\d+/)) {\n        // It's a Field ID\n        const formField = this.formPageFields.find(\n          (formField: FormFieldModel) => formField.fieldId == error.source.pointer.split('/').pop()\n        );\n\n        // Twitter authorization tokens expire after one use, so the API gives us a fresh one.\n        if (error.data && formField?.fieldType === 'TwitterFollowApi') {\n          // Allows the user to try authorizing again\n          formField.value = false;\n\n          formField.field.twitterAuthorizationRedirect = error.data;\n        }\n\n        if (formField) {\n          formField.forceDirty();\n          formField.errors.add('value', error.detail);\n        }\n      }\n    });\n    next(() => this.scrollToError());\n  }\n\n  scrollToError() {\n    const el = document.querySelector('.ssError')?.parentNode as HTMLElement;\n    if (el) {\n      this.scroller.scrollTo(el);\n    }\n  }\n  /**\n   * @private\n   * @param {FormPage} page\n   * @returns {FormPageSubmission}\n   */\n  createFormSubmission(page: FormPageModel) {\n    const formSubmission = super.createFormSubmission(page);\n    if (page.form.formType == 'Registration') {\n      formSubmission.entryFormSubmissionId = this.entryFormSubmissionId;\n    }\n    return formSubmission;\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async submissionSuccess(formPageSubmission: FormPageSubmissionModel) {\n    this.captureSession(formPageSubmission);\n    this.captureFormSubmissionDetails(formPageSubmission);\n    this.sendFormPageSubmissionSDKEvent(formPageSubmission, [\n      ...(this.currentFormPage?.formFields?.toArray() || []),\n      ...this.formPageFields.toArray(),\n    ]);\n    const isSubmittingRegistrationPage = formPageSubmission.form.formType == 'Registration';\n\n    if (isSubmittingRegistrationPage || (this.args.splitSubmission && !this.nextRegistrationPageToComplete)) {\n      await this.nextPage(formPageSubmission);\n    }\n\n    /*  if (isSubmittingRegistrationPage || this.args.splitSubmission) {\n      this.isSaving = false;\n    } */\n    this.hasMismatchErrored = false;\n    return formPageSubmission;\n  }\n  /**\n   * When you are editing your most recently submitted write-in or nomination, we want to prefill the entry form with the\n   * values of the existing write-in or nomination that you will be replacing.\n   */\n  prefillEntryFormValues() {\n    // clear local storage form values because they will override the prefills\n    this.clearFormRelatedLocalStorage();\n\n    const entry = this.args.currentMatchupEntry;\n    const entryTitle = entry && entry.get('mediaTitle') ? entry.get('mediaTitle')?.value || '' : '';\n    const entryPhotoId = entry && entry.get('photoUpload') ? entry.get('photoUpload')?.value || '' : '';\n    const entryCaption = entry && entry.get('mediaCaption') ? entry.get('mediaCaption')?.value || '' : '';\n    const entryMediaReleaseConsent =\n      entry && entry.get('mediaReleaseConsent') ? entry.get('mediaReleaseConsent')?.value || '' : '';\n\n    const getField = (id: number) => this.formPageFields.find(({ field }) => +field.id == id);\n\n    const prefillField = (fieldType: string, value: string | number) => {\n      const field = getField(this.enums.findWhere('ENTRY_FIELD', { name: fieldType }, 'id'));\n      if (field) {\n        field.value = value;\n      }\n    };\n\n    prefillField('Media Title', entryTitle);\n    prefillField('Photo Upload', entryPhotoId);\n    prefillField('Media Caption', entryCaption);\n    prefillField('Media Release Consent', entryMediaReleaseConsent);\n    if (isPresent(entryPhotoId)) {\n      this.localStorage.setItem(this.prefix('mediaItemId'), entryPhotoId);\n    }\n  }\n  //endregion\n\n  //region Methods\n  uploadImage = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n\n    const mediaItemId = mediaItem.id;\n    this.uploadedMediaItemId = mediaItemId;\n\n    if (this.isPersistingEntryData) {\n      this.localStorage.setItem(this.prefix('mediaItemId'), mediaItemId);\n    }\n    if (this.storedFormFields) {\n      Object.assign(this.storedFormFields, { mediaItemId });\n    }\n  };\n\n  uploadVideo = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n    // if uploading by URL, the first argument passed into this method is already just an ID\n    // but for dips uploaded videos, we must extract an ID from the media item\n    const videoId = typeof mediaItem == 'string' ? mediaItem : (mediaItem.id as string);\n\n    this.uploadedVideoId = videoId;\n\n    if (this.isPersistingEntryData) {\n      this.localStorage.setItem(this.prefix('videoId'), videoId);\n    }\n    if (this.storedFormFields) {\n      Object.assign(this.storedFormFields, { videoId });\n    }\n  };\n\n  uploadMedia = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n    this.localStorage.removeItem(this.prefix('videoId'));\n    this.localStorage.removeItem(this.prefix('mediaItemId'));\n\n    if (mediaItem.mediaTypeId === 1) {\n      const mediaItemId = mediaItem.id;\n      this.uploadedMediaItemId = mediaItemId;\n      this.uploadedVideoId = '';\n      this.localStorage.setItem(this.prefix('mediaItemId'), mediaItemId);\n      if (this.storedFormFields) {\n        Object.assign(this.storedFormFields, { mediaItemId });\n      }\n    } else if (mediaItem.mediaTypeId === 3) {\n      const videoId = mediaItem.id;\n      this.uploadedVideoId = videoId;\n      this.uploadedMediaItemId = '';\n      this.localStorage.setItem(this.prefix('videoId'), videoId);\n      if (this.storedFormFields) {\n        Object.assign(this.storedFormFields, { videoId });\n      }\n    }\n  };\n\n  createVideoBlob(file: File) {\n    if (file?.type?.startsWith('video')) {\n      const blobUrl = URL.createObjectURL(file);\n      this.blobUrl = `${blobUrl}#t=0.1`;\n    }\n  }\n  /////\n\n  //actions below\n\n  beginUpload = (file: File) => {\n    this.isUploadingImage = true;\n    this.createVideoBlob(file);\n  };\n\n  removeImage(formPage: FormPageModel) {\n    this.uploadedMediaItemId = '';\n    const imageField = formPage.formFields.find(formField => formField.fieldType === 'ImageSelect');\n    if (imageField) {\n      imageField.value = null;\n    }\n  }\n\n  removeVideo(formPage: FormPageModel) {\n    this.uploadedVideoId = '';\n    const videoFields = formPage.formFields.filter(formField =>\n      ['UrlTextbox', 'VideoSelect'].includes(formField.fieldType)\n    );\n    videoFields.forEach(formField => (formField.value = null));\n  }\n\n  submitFormPagesTask = task({ drop: true }, async () => {\n    const { closeChangeWriteIn } = this.args;\n    if (this.isBallot) {\n      await this.ensureBallotStateLoaded();\n    }\n    const { entry: currentEntry, vote: voteToDelete } = this.findCurrentVoteAndEntry();\n    if (this.isBallot) {\n      try {\n        if (voteToDelete) {\n          await voteToDelete.destroyRecord();\n        }\n      } catch (e) {\n        console.error(e);\n      }\n\n      try {\n        const _currentEntry = currentEntry?.entry;\n        if (_currentEntry) {\n          await _currentEntry.destroyRecord();\n        }\n      } catch (e) {\n        console.error(e);\n      }\n    }\n    if (!this.isDestroyed) {\n      const { currentFormPage } = this;\n      const { entryFormPage } = this;\n      const currentEntry = this.args.currentMatchupEntry?.entry;\n\n      if (this.args.splitSubmission) {\n        // For UGC, entry and registration are submitted individually, based on if you've already submitted entry\n        try {\n          if (!this.entryFormSubmissionId) {\n            if (entryFormPage) {\n              await this.submitFormPageTask.perform(entryFormPage);\n            }\n          } else {\n            if (currentFormPage) {\n              await this.submitFormPageTask.perform(currentFormPage);\n            }\n          }\n        } catch (e: any) {\n          if (isPresent(e)) {\n            // this can be blank\n            this.submissionFailure(e);\n          }\n        }\n      } else {\n        if (currentFormPage?.isPageOne) {\n          try {\n            if (this.args.isEditingSubmission && currentEntry) {\n              await currentEntry.destroyRecord();\n            }\n            if (entryFormPage) {\n              await this.submitFormPageTask.perform(entryFormPage);\n            }\n            if (currentFormPage.id !== entryFormPage?.id) {\n              await this.submitFormPageTask.perform(currentFormPage);\n            }\n\n            if (closeChangeWriteIn) {\n              closeChangeWriteIn();\n            }\n          } catch (e: any) {\n            if (isPresent(e)) {\n              // this can be blank\n              this.submissionFailure(e);\n            }\n          }\n        } else {\n          //We don't need to submit the entry form again\n          if (currentFormPage) {\n            await this.submitFormPageTask.perform(currentFormPage);\n          }\n          if (closeChangeWriteIn) {\n            closeChangeWriteIn();\n          }\n        }\n      }\n    }\n  });\n\n  setEntryName = (name: string, { forceRerender } = { forceRerender: false }) => {\n    if (this.entryTitleFormField) {\n      if (!forceRerender) {\n        this.entryTitleFormField.value = name;\n        return;\n      }\n\n      // Need to always force Ember to re-render the input by resetting its value\n      // This fixes an issue where if you change the Google Place to a different address but with the same name,\n      // Ember does not see a change so it does not re-render the input.\n      const entryTitleFormFieldValue = this.entryTitleFormField?.value;\n      this.entryTitleFormField.value = null;\n      const entryTitleId = this.entryTitleFormField?.id;\n      if (entryTitleId && this.storedFormFields) {\n        this.storedFormFields[entryTitleId] = entryTitleFormFieldValue;\n      }\n      name ? (this.entryTitleFormField.value = name) : (this.entryTitleFormField.value = entryTitleFormFieldValue);\n    }\n  };\n\n  setPlaceObject = (place: any) => {\n    this.placeObject = place;\n  };\n\n  closeChangeWriteIn = () => {\n    this.args.closeChangeWriteIn?.();\n  };\n\n  @action\n  async logout(reason?: string) {\n    this.entryFormSubmissionId = undefined;\n    this.formSubmissionId = undefined;\n    this.uploadedMediaItemId = '';\n    this.uploadedVideoId = '';\n    await super.logout(reason);\n  }\n\n  @action\n  async cancel() {\n    const shouldClearAccessToken = await this.localStorage.getItem('probablyHasNotFinishedRegistration');\n    if (this.args.matchup) {\n      void this.router.transitionTo(\n        'rounds.round.matchup',\n        this.args.matchup.iteration,\n        this.args.matchup.normalizedName\n      );\n    }\n    this.clearStoredValues();\n    this.clearFormRelatedLocalStorage();\n\n    if (shouldClearAccessToken) {\n      await this.logout();\n    }\n\n    if (this.args.matchup) {\n      void this.router.transitionTo(\n        'rounds.round.matchup',\n        this.args.matchup.iteration,\n        this.args.matchup.normalizedName\n      );\n    }\n  }\n\n  ///////\n  @action\n  async setup(el: HTMLElement) {\n    this.storedFormFields = {};\n\n    if (!this.args.persistEntryData) {\n      this.clearFormRelatedLocalStorage(['formValues']);\n    }\n\n    await super.setup(el);\n\n    if (this.args.isEditingSubmission) {\n      this.prefillEntryFormValues();\n    }\n\n    // we need to wait for the fade transition to complete (400ms) and then target the first input field\n\n    later(() => {\n      const firstInput = this.container\n        ?.querySelector('.ssFormPart')\n        ?.querySelector('input, textarea, select') as HTMLElement;\n      if (firstInput) {\n        firstInput?.focus();\n      }\n    }, 500);\n  }\n\n  cleanup = () => {\n    super.cleanup();\n    URL.revokeObjectURL(this.blobUrl);\n  };\n}\n","import { action, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport ENV from 'ember-get-config';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\nimport { later } from '@ember/runloop';\nimport duration from 'secondstreet-common/utils/duration';\nimport FormField from './ss-form-field';\nimport type ScrollerService from 'consumer/services/scroller';\n\n// Testing keys -> https://developers.cloudflare.com/turnstile/reference/testing/#dummy-sitekeys-and-secret-keys\n// Always pass -> 1x00000000000000000000AA\n// Always fail -> 2x00000000000000000000AB\n\nexport default class SsFormFieldCaptchaComponent extends FormField {\n  @service declare scroller: ScrollerService;\n\n  // Args\n  declare formField: any;\n  declare submitFormPage?: () => void;\n  declare setTurnstileRunningState?: (running: boolean) => void;\n\n  @tracked failed = false;\n\n  scrollToTurnstileWidget() {\n    later(() => {\n      const widgetElement = document.querySelector('#turing-target');\n      if (widgetElement) {\n        this.scroller.scrollTo(widgetElement, { center: true });\n      }\n    }, duration(100));\n  }\n\n  @action\n  async setup() {\n    try {\n      this.setTurnstileRunningState?.(true);\n      await loadScript('https://challenges.cloudflare.com/turnstile/v0/api.js');\n\n      window.turnstile?.render('#turing-target', {\n        sitekey: ENV.consumer.TURNSTILE_KEY,\n        theme: 'light',\n        callback: (token: string) => {\n          this.failed = false;\n          set(this.formField, 'value', token);\n          this.setTurnstileRunningState?.(false);\n          this.submitFormPage?.();\n        },\n        'error-callback': () => {\n          this.failed = true;\n          this.setTurnstileRunningState?.(true);\n        },\n        'challenge-callback': () => {\n          this.scrollToTurnstileWidget();\n        },\n      });\n    } catch (e) {\n      console.error(e);\n      this.setTurnstileRunningState?.(true);\n    }\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { get, set, computed } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Methods\n  ensureValueArray() {\n    if (!Array.isArray(get(this, 'formField.value'))) {\n      set(this, 'formField.value', []);\n    }\n  },\n  isAnswerLimitReached: computed('formField.value.[]', function () {\n    return this.formField.isLimitSelection && this.formField.answerLimit <= this.formField.value?.length;\n  }),\n  removeUncheckedItem(fields, fieldOptionId) {\n    const selectedFieldOptions = fields.filter(field => get(field, 'fieldOptionId') !== fieldOptionId);\n    set(this, 'formField.value', isEmpty(selectedFieldOptions) ? null : selectedFieldOptions);\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    valueChanged(fieldOption, event) {\n      this.ensureValueArray();\n\n      const fieldOptionId = get(fieldOption, 'id');\n      const isChecked = get(event, 'target.checked');\n      const valueArray = get(this, 'formField.value');\n      set(fieldOption, 'isChecked', isChecked);\n      const existing = valueArray.find(val => get(val, 'fieldOptionId') === fieldOptionId);\n      return existing\n        ? isChecked\n          ? set(existing, 'value', true)\n          : this.removeUncheckedItem(valueArray, fieldOptionId)\n        : valueArray.addObject({ fieldOptionId, value: true });\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components */\nimport mobileOperatingSystem from 'secondstreet-common/utils/mobile-operating-system';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  isBrowserWithBadNativeDateUX: ['ios', 'android'].includes(mobileOperatingSystem()),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed, get, set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nimport FormField from '../components/ss-form-field';\nimport ReferralShareList from '../mixins/referral-share-list';\n\nconst getPropertyNumber = (computedStyle, name) => Number.parseFloat(computedStyle.getPropertyValue(name));\n\nexport default FormField.extend(ReferralShareList, {\n  //region Attributes\n  /**\n   * URL for sharing the promotion for extra chances\n   * @type {String}\n   */\n  'referral-url': null,\n  //endregion\n\n  //region Ember Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    // Bind the `this` value of the method and save a copy for use by window.removeEventListener\n    this.boundRecalculate = this.recalculateIsTooWide.bind(this);\n\n    this.mutationObserver = new MutationObserver(this.boundRecalculate);\n    this.mutationObserver.observe(this.element, { childList: true, attributes: true, subtree: true });\n    window.addEventListener('resize', this.boundRecalculate);\n  },\n  willDestroyElement() {\n    this._super(...arguments);\n    this.mutationObserver?.disconnect();\n    window.removeEventListener('resize', this.boundRecalculate);\n  },\n  //endregion\n\n  //region Properties\n  mutationObserver: null,\n  isTooWide: false,\n  //endregion\n\n  //region Computed Properties\n  referralLabel: readOnly('formField.labelText'),\n  /**\n   * This specifies whether to ask the user for referrals to get extra chances\n   * @returns {boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  areReferralsEnabled: computed('formField.extraChances', 'referral-url', function () {\n    return get(this, 'formField.extraChances') > 0 && get(this, 'referral-url');\n  }),\n  //endregion\n\n  //region Methods\n  recalculateIsTooWide() {\n    const parent = this.element.parentNode;\n    const pCS = window.getComputedStyle(parent);\n\n    const [pBL, pBR] = [getPropertyNumber(pCS, 'border-left-width'), getPropertyNumber(pCS, 'border-right-width')];\n    const [pPL, pPR] = [getPropertyNumber(pCS, 'padding-left'), getPropertyNumber(pCS, 'padding-right')];\n    const parentInnerBoxWidth = parent.offsetWidth - pBL - pBR - pPL - pPR;\n\n    // We're never setting isTooWide back to false here because if we do, we could get into an infinite loop.\n    if (this.element.scrollWidth > parentInnerBoxWidth) {\n      set(this, 'isTooWide', true);\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldFacebookLink extends FormField {}\n","import { action } from '@ember/object';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport { task, timeout } from 'ember-concurrency';\nimport duration from 'secondstreet-common/utils/duration';\nimport FormField from '../components/ss-form-field';\n\nconst PLACES_DEBOUNCE = duration(1000); // ms\n\nexport default class SsFormFieldGooglePlace extends FormField {\n  @service googleMaps;\n  @service settings;\n  @service store;\n  @service current;\n\n  @tracked predictions = [];\n  @tracked googleSuggestionPreference = false;\n  @tracked isLoadingSuggestions = false;\n  @tracked showPredictions = false;\n\n  @action\n  setupMaps() {\n    if (this.googleMaps.google === undefined || this.googleMaps.google.maps === undefined) {\n      this.googleMaps.instantiateGoogleMaps(this.promotionLanguageCode);\n    }\n  }\n\n  get googleIntegrationSetting() {\n    return this.settings.getValueFor('enable_google_integration');\n  }\n\n  get displayPredictions() {\n    return this.googleSuggestionPreference ? this.showPredictions && isPresent(this.predictions) : this.showPredictions;\n  }\n\n  get isLoading() {\n    return this.fetchSuggestionsTask.isRunning || this.isLoadingSuggestions;\n  }\n\n  @action\n  selectPrediction(prediction) {\n    // We don't want to re-render the input field if the user types in a custom (i.e. not from Google) entry\n    if (prediction.place_id) {\n      this.setEntryName(prediction.structured_formatting.main_text, { forceRerender: true });\n      this.setPlaceObject({ google: prediction });\n    } else if (prediction.name) {\n      this.setEntryName(prediction.name, { forceRerender: true });\n      this.setPlaceObject({ internal: prediction });\n    }\n\n    this.showPredictions = false;\n  }\n\n  @action\n  preventFormSubmitOnEnter(event) {\n    if (event.key == 'Enter') event.preventDefault();\n  }\n\n  handleInputTask = task({ restartable: true }, async event => {\n    const placeName = event.target.value;\n    this.setPlaceObject(null);\n    this.setEntryName(placeName);\n\n    if (placeName.length < 3 || !this.googleIntegrationSetting) {\n      this.isLoadingSuggestions = false;\n      this.showPredictions = false;\n      this.predictions = [];\n\n      return;\n    }\n\n    await timeout(duration(250));\n    await this.fetchSuggestionsTask.perform();\n  });\n\n  fetchSuggestionsTask = task({ restartable: true }, async () => {\n    if (this.googleSuggestionPreference) {\n      this.isLoadingSuggestions = true;\n\n      await this.queryPlacesTask.perform();\n    } else {\n      const entryNames = await this.store.query('entry-name', {\n        searchValue: this.placeName,\n        pageSize: 10,\n      });\n\n      this.showPredictions = true;\n      this.predictions = entryNames.toArray();\n    }\n  });\n\n  togglePredictionsTask = task({ restartable: true }, async (showPredictions = false) => {\n    if (isEmpty(this.placeName) || this.placeName?.length < 3 || !this.googleIntegrationSetting) return;\n\n    await timeout(PLACES_DEBOUNCE);\n\n    this.showPredictions = showPredictions;\n  });\n\n  queryPlacesTask = task({ restartable: true }, async () => {\n    await timeout(PLACES_DEBOUNCE);\n\n    if (!isPresent(this.placeName)) {\n      this.predictions = [];\n      return;\n    }\n\n    this.isLoadingSuggestions = false;\n    this.showPredictions = true;\n\n    const geographicArea = this.store.peekAll('geographic-area')?.firstObject;\n\n    const callback = (predictions, status) => {\n      if (status !== this.googleMaps.google.maps.places.PlacesServiceStatus.OK) {\n        predictions = [];\n      }\n\n      if (this.isDestroying || this.isDestroyed) return;\n\n      run(() => (this.predictions = predictions));\n    };\n\n    if (geographicArea) {\n      this.googleMaps.getPlacePredictions(this.placeName, ['establishment'], geographicArea, callback);\n    } else {\n      this.googleMaps.getPlacePredictions(this.placeName, ['establishment'], callback);\n    }\n  });\n\n  @action\n  async switchToGooglePlacesSuggestions() {\n    this.googleSuggestionPreference = !this.googleSuggestionPreference;\n    await this.fetchSuggestionsTask.perform();\n  }\n}\n","import { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport FormField from '../components/ss-form-field';\nimport ENV from '../config/environment';\n\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nexport default class SsFormFieldImageSelectComponent extends FormField {\n  //region Dependencies\n  @service\n  store;\n  //endregion\n\n  get isMobile() {\n    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  }\n\n  get accepts() {\n    return this.formField.allowAllMediaUpload ? `${VIDEO_FILE_FORMATS},image/*` : 'image/*';\n  }\n\n  //region Properties\n  isTestEnvironment = ENV.environment === 'test';\n  //endregion\n\n  //region Methods\n  /**\n   * Logic for handling a new MediaItem that was just uploaded\n   * @param {MediaItem} newMediaItem\n   */\n  _addMediaItem(newMediaItem) {\n    set(this, 'formField.value', get(newMediaItem, 'id'));\n    this['upload-image'](newMediaItem);\n  }\n  //endregion\n\n  //region Actions\n  @action\n  startUpload(file) {\n    this['begin-upload'](file);\n  }\n\n  @action\n  addMediaItem(newMediaItem) {\n    this._addMediaItem(newMediaItem);\n    this.onChange?.();\n  }\n\n  /**\n   * This is used to acceptance uploading an image.\n   * Needed because we can't set the value of a file input dynamically.\n   */\n  @action\n  automateImageUploadForTesting() {\n    const testMediaItem = this.store.createRecord('media-item', {\n      contentType: 'image/jpeg',\n      currentVersionNumber: 1,\n      dipsUrl: 'https://mediadev.secondstreetapp.com/5019',\n      id: 5019,\n      mediaTypeId: 1,\n      size: 260289,\n    });\n    this._addMediaItem(testMediaItem);\n  }\n}\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldInstagram extends FormField {}\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { action, computed } from '@ember/object';\nimport { delayFormFieldValueChanged } from 'consumer/utils/delay-form-field-value-changed';\nimport FormField from '../components/ss-form-field';\n\nconst GOOGLE_PLAY_BADGE = {\n  1: '/Images/Logos/google_play_badge_1.svg',\n  2: '/Images/Logos/google_play_badge_2.svg',\n  3: '/Images/Logos/google_play_badge_3.svg',\n};\n\nconst APPLE_APP_STORE_BADGE = {\n  1: '/Images/Logos/apple_app_store_1.svg',\n  2: '/Images/Logos/apple_app_store_2.svg',\n  3: '/Images/Logos/apple_app_store_3.svg',\n};\n\nexport default class extends FormField {\n  // Returns the image source for the google play store badge based on the regional code\n  @computed('organizationPromotion.defaultLanguageId')\n  get androidImageSource() {\n    return GOOGLE_PLAY_BADGE[this.organizationPromotion.defaultLanguageId];\n  }\n\n  // Returns the image source for the apple app store badge based on the regional code\n  @computed('organizationPromotion.defaultLanguageId')\n  get iosImageSource() {\n    return APPLE_APP_STORE_BADGE[this.organizationPromotion.defaultLanguageId];\n  }\n\n  @action\n  valueChanged(value) {\n    delayFormFieldValueChanged(this, value, 3000);\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  minValue: computed('formField.minimumLengthOrValue', function () {\n    const min = this.formField?.minimumLengthOrValue;\n    return min ?? undefined;\n  }),\n\n  maxValue: computed('formField.maximumLengthOrValue', function () {\n    const max = this.formField?.maximumLengthOrValue;\n    return max ?? undefined;\n  }),\n});\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldOptin extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { delayFormFieldValueChanged } from 'consumer/utils/delay-form-field-value-changed';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Computed\n  alexaSkillImageSource: '/Images/Logos/alexa_skill_badge.svg',\n  //endregion\n\n  //region Actions\n  actions: {\n    valueChanged(value) {\n      delayFormFieldValueChanged(this, value, 3000);\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  maxValue: computed('formField.maximumLengthOrValue', function () {\n    const max = this.formField?.maximumLengthOrValue;\n    return max ?? undefined;\n  }),\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport $ from 'jquery';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Ember Hooks\n  didRender() {\n    this._super(...arguments);\n    const nativeDataList =\n      !!('list' in document.createElement('input')) &&\n      !!(document.createElement('datalist') && window.HTMLDListElement);\n\n    // For browsers that do not support HTML datalists, we must use jQuery UI's Autocomplete widget in order to render suggested values\n    // For browsers that DO support it however, do not run this widget\n\n    if (this['show-suggested-values'] && !nativeDataList) {\n      const availableTags = $('#suggestions')\n        .find('option')\n        .map(function () {\n          return this.value;\n        })\n        .get();\n      $('.autocomplete-input').autocomplete({ source: availableTags });\n    }\n  },\n  //endregion\n});\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldTikTokLink extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/ss-form-field-url-textbox';\n","import { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\n\nimport FormField from '../components/ss-form-field';\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nexport default class SsFormFieldVideoSelectComponent extends FormField {\n  //region Dependencies\n  @service\n  i18n;\n  //endregion\n\n  //region Properties\n  /**\n   * Whether a Video Upload is currently in-progress\n   * @type {Boolean}\n   */\n  currentlyUploading = false;\n\n  @tracked\n  isFlyoutOpen;\n  //endregion\n\n  get accepts() {\n    return this.formField.allowAllMediaUpload ? `${VIDEO_FILE_FORMATS},image/*` : VIDEO_FILE_FORMATS;\n  }\n  //region Actions\n  @action\n  switchToYoutubeUpload() {\n    if (this.currentlyUploading) {\n      return;\n    }\n    this.isFlyoutOpen = false;\n    set(this, 'formField.value', null);\n    this.toggleAddByVideoUrl(true);\n  }\n\n  @action\n  startUpload(file) {\n    this['begin-upload'](file);\n  }\n\n  @action\n  addMediaItem(newMediaItem) {\n    this.isFlyoutOpen = false;\n    set(this, 'formField.value', get(newMediaItem, 'id'));\n    this['upload-video'](newMediaItem);\n    this.onChange?.();\n  }\n\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldXLink extends FormField {}\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldYouTubeLink extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/ss-form-field';\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action simple-unless }}\\n<div {{did-insert this.setup}} class=\\\"hidden\\\">\\n</div>\\n{{#each this.sortedFormFields as |formField|}}\\n  {{#if (and (eq formField.field.fieldType \\\"ImageSelect\\\") formField.allowVideoUpload)}}\\n    {{#unless (or @mediaId this.addingVideoByUrl)}}\\n      <div>\\n        {{#if @urlTextbox}}\\n          <SsFormFieldVideoSelect\\n            @form-field={{formField}}\\n            @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n            @referrerUrl={{@referrerUrl}}\\n            @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n            @begin-upload={{@beginUpload}}\\n            @upload-video={{@uploadMedia}}\\n            @onChange={{this.onFormFieldChange}}\\n          />\\n        {{else}}\\n          {{component\\n            formField.field.registrationComponent\\n            form-field=formField\\n            hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n            referrerUrl=@referrerUrl\\n            begin-upload=@beginUpload\\n            upload-image=@uploadMedia\\n            submitFormPage=this.submitFormPage\\n            onChange=this.onFormFieldChange\\n          }}\\n        {{/if}}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"ImageSelect\\\")}}\\n    {{#unless @uploadedMediaItemId}}\\n      <div>\\n        {{component\\n          formField.field.registrationComponent\\n          form-field=formField\\n          hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n          referrerUrl=@referrerUrl\\n          begin-upload=@beginUpload\\n          upload-image=@uploadMedia\\n          submitFormPage=this.submitFormPage\\n          onChange=this.onFormFieldChange\\n        }}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"UrlTextbox\\\")}}\\n    {{#if (and (not @uploadedVideoId) this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldUrlTextbox\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video-by-url={{@uploadVideoByUrl}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/if}}\\n  {{else if (eq formField.field.fieldType \\\"VideoSelect\\\")}}\\n    {{#unless (or @uploadedVideoId this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldVideoSelect\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video={{@uploadVideo}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/unless}}\\n  {{else}}\\n    {{#unless (and @isBallotForm (or (eq formField @entryNameField) (eq formField @googlePlaceField)))}}\\n      {{component\\n        formField.field.registrationComponent\\n        form-field=formField\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=@beginUpload\\n        upload-image=@uploadImage\\n        submitFormPage=this.submitFormPage\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/unless}}\\n  {{/if}}\\n{{/each}}\\n\\n{{#if @page.errors.messages}}\\n  {{#each @page.errors.messages as |message|}}\\n    <span class=\\\"ssDanger\\\">\\n      {{message}}\\n    </span>\\n  {{/each}}\\n{{/if}}\", {\"contents\":\"{{! template-lint-disable no-action simple-unless }}\\n<div {{did-insert this.setup}} class=\\\"hidden\\\">\\n</div>\\n{{#each this.sortedFormFields as |formField|}}\\n  {{#if (and (eq formField.field.fieldType \\\"ImageSelect\\\") formField.allowVideoUpload)}}\\n    {{#unless (or @mediaId this.addingVideoByUrl)}}\\n      <div>\\n        {{#if @urlTextbox}}\\n          <SsFormFieldVideoSelect\\n            @form-field={{formField}}\\n            @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n            @referrerUrl={{@referrerUrl}}\\n            @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n            @begin-upload={{@beginUpload}}\\n            @upload-video={{@uploadMedia}}\\n            @onChange={{this.onFormFieldChange}}\\n          />\\n        {{else}}\\n          {{component\\n            formField.field.registrationComponent\\n            form-field=formField\\n            hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n            referrerUrl=@referrerUrl\\n            begin-upload=@beginUpload\\n            upload-image=@uploadMedia\\n            submitFormPage=this.submitFormPage\\n            onChange=this.onFormFieldChange\\n          }}\\n        {{/if}}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"ImageSelect\\\")}}\\n    {{#unless @uploadedMediaItemId}}\\n      <div>\\n        {{component\\n          formField.field.registrationComponent\\n          form-field=formField\\n          hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n          referrerUrl=@referrerUrl\\n          begin-upload=@beginUpload\\n          upload-image=@uploadMedia\\n          submitFormPage=this.submitFormPage\\n          onChange=this.onFormFieldChange\\n        }}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"UrlTextbox\\\")}}\\n    {{#if (and (not @uploadedVideoId) this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldUrlTextbox\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video-by-url={{@uploadVideoByUrl}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/if}}\\n  {{else if (eq formField.field.fieldType \\\"VideoSelect\\\")}}\\n    {{#unless (or @uploadedVideoId this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldVideoSelect\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video={{@uploadVideo}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/unless}}\\n  {{else}}\\n    {{#unless (and @isBallotForm (or (eq formField @entryNameField) (eq formField @googlePlaceField)))}}\\n      {{component\\n        formField.field.registrationComponent\\n        form-field=formField\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=@beginUpload\\n        upload-image=@uploadImage\\n        submitFormPage=this.submitFormPage\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/unless}}\\n  {{/if}}\\n{{/each}}\\n\\n{{#if @page.errors.messages}}\\n  {{#each @page.errors.messages as |message|}}\\n    <span class=\\\"ssDanger\\\">\\n      {{message}}\\n    </span>\\n  {{/each}}\\n{{/if}}\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-page-entry-registration.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-page-entry-registration.hbs\"}});\nimport { action } from '@ember/object';\n\nimport SsFormPageComponent from './ss-form-page';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class SsFormPageEntryRegistrationComponent extends SsFormPageComponent {\n  suggestedValues = this.args.suggestedValues || [];\n\n  @tracked addingVideoByUrl = this.args.addingVideoByUrl || false;\n\n  setup = () => {\n    // If there is a Google Place field, its label should appear the same as the entry name field's label text\n    if (this.args.googlePlaceField && this.args.entryNameField) {\n      this.args.googlePlaceField.labelText = this.args.entryNameField.labelText;\n    }\n  };\n\n  @action\n  toggleAddByVideoUrl(bool: boolean) {\n    this.addingVideoByUrl = bool;\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action }}\\n<form\\n  {{on \\\"submit\\\" (prevent-default (if this.isExtraChancesForm (noop) this.submitFormPage))}}\\n  class=\\\"form {{if @noBottomWhitespace 'no-bottom-whitespace'}}\\\"\\n>\\n  {{#if this.sortedFormFields.length}}\\n    {{#if @registrationPrompt}}\\n      {{#if (current \\\"organizationPromotion.promotion.isBallot\\\")}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{i18n-t \\\"register\\\"}}\\n        </div>\\n        <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n          {{i18n-t \\\"write-in_information_text\\\"}}\\n        </div>\\n      {{else}}\\n        <div class=\\\"registration-prompt\\\">\\n          <hr class=\\\"registration-ruler\\\" />\\n          <span class=\\\"registration-text\\\">\\n            {{this.registrationPrompt}}\\n          </span>\\n          <hr class=\\\"registration-ruler\\\" />\\n        </div>\\n      {{/if}}\\n    {{/if}}\\n    {{#each this.sortedFormFields as |formField|}}\\n      {{component\\n        formField.field.registrationComponent\\n        organizationPromotion=(current \\\"organizationPromotion\\\")\\n        form-field=formField\\n        form-type=this.formType\\n        dips-url=@dipsUrl\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=this.beginUpload\\n        upload-image=this.uploadImage\\n        referral-url=@referralUrl\\n        auto-focus=(and @autoFocus (eq this.sortedFormFields.firstObject formField))\\n        submit-form-field=this.submitFormField\\n        submitFormPage=this.submitFormPage\\n        isSaving=(and @isSaving (eq this.currentSubmittingField formField))\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/each}}\\n  {{/if}}\\n  {{#if @submissionErrorMessage}}\\n    <div class=\\\"submission-error-message\\\">\\n      {{@submissionErrorMessage}}\\n    </div>\\n  {{/if}}\\n  {{#unless this.isExtraChancesForm}}\\n    {{#if @showCancelButton}}\\n      <div\\n        role=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" @cancel}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </div>\\n    {{/if}}\\n    <button\\n      disabled={{this.isSaving}}\\n      class=\\\"ssButton\\n        {{if\\n          (and (or @isNominating @isVoting) this.isLastPage)\\n          'vote-button ssFormVoteButton'\\n          'ssFormButton ssButtonPrimary bg-primary text-primary-text template-color-primary-background-color'\\n        }}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if this.isSaving 'ssButtonDisabled'}}\\n        {{if @engagementStyle 'engagement-button'}}\\n        {{if (and (or @isNominating @isVoting) @isBallot) 'w-full'}}\\n        \\\"\\n      type=\\\"submit\\\"\\n    >\\n      {{#if this.isLastPage}}\\n        {{i18n-t this.submitButtonText}}\\n      {{else}}\\n        {{i18n-t \\\"continue\\\"}}\\n        <i aria-hidden=\\\"true\\\" class=\\\"ssIcon-chevron-right\\\"></i>\\n      {{/if}}\\n    </button>\\n    {{#if @showCancelPaymentButton}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" (queue @clearForm @cancel)}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </button>\\n    {{/if}}\\n    {{#if @optionalRegistration}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        {{on \\\"click\\\" @skip}}\\n        class=\\\"ssButton ssButtonSkip\\n          {{if this.isSaving 'ssButtonDisabled' 'ssButtonSecondary'}}\\n          {{if @engagementStyle 'engagement-button'}}\\\"\\n      >\\n        {{i18n-t \\\"skip\\\"}}\\n      </button>\\n    {{/if}}\\n  {{/unless}}\\n</form>\", {\"contents\":\"{{! template-lint-disable no-action }}\\n<form\\n  {{on \\\"submit\\\" (prevent-default (if this.isExtraChancesForm (noop) this.submitFormPage))}}\\n  class=\\\"form {{if @noBottomWhitespace 'no-bottom-whitespace'}}\\\"\\n>\\n  {{#if this.sortedFormFields.length}}\\n    {{#if @registrationPrompt}}\\n      {{#if (current \\\"organizationPromotion.promotion.isBallot\\\")}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{i18n-t \\\"register\\\"}}\\n        </div>\\n        <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n          {{i18n-t \\\"write-in_information_text\\\"}}\\n        </div>\\n      {{else}}\\n        <div class=\\\"registration-prompt\\\">\\n          <hr class=\\\"registration-ruler\\\" />\\n          <span class=\\\"registration-text\\\">\\n            {{this.registrationPrompt}}\\n          </span>\\n          <hr class=\\\"registration-ruler\\\" />\\n        </div>\\n      {{/if}}\\n    {{/if}}\\n    {{#each this.sortedFormFields as |formField|}}\\n      {{component\\n        formField.field.registrationComponent\\n        organizationPromotion=(current \\\"organizationPromotion\\\")\\n        form-field=formField\\n        form-type=this.formType\\n        dips-url=@dipsUrl\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=this.beginUpload\\n        upload-image=this.uploadImage\\n        referral-url=@referralUrl\\n        auto-focus=(and @autoFocus (eq this.sortedFormFields.firstObject formField))\\n        submit-form-field=this.submitFormField\\n        submitFormPage=this.submitFormPage\\n        isSaving=(and @isSaving (eq this.currentSubmittingField formField))\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/each}}\\n  {{/if}}\\n  {{#if @submissionErrorMessage}}\\n    <div class=\\\"submission-error-message\\\">\\n      {{@submissionErrorMessage}}\\n    </div>\\n  {{/if}}\\n  {{#unless this.isExtraChancesForm}}\\n    {{#if @showCancelButton}}\\n      <div\\n        role=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" @cancel}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </div>\\n    {{/if}}\\n    <button\\n      disabled={{this.isSaving}}\\n      class=\\\"ssButton\\n        {{if\\n          (and (or @isNominating @isVoting) this.isLastPage)\\n          'vote-button ssFormVoteButton'\\n          'ssFormButton ssButtonPrimary bg-primary text-primary-text template-color-primary-background-color'\\n        }}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if this.isSaving 'ssButtonDisabled'}}\\n        {{if @engagementStyle 'engagement-button'}}\\n        {{if (and (or @isNominating @isVoting) @isBallot) 'w-full'}}\\n        \\\"\\n      type=\\\"submit\\\"\\n    >\\n      {{#if this.isLastPage}}\\n        {{i18n-t this.submitButtonText}}\\n      {{else}}\\n        {{i18n-t \\\"continue\\\"}}\\n        <i aria-hidden=\\\"true\\\" class=\\\"ssIcon-chevron-right\\\"></i>\\n      {{/if}}\\n    </button>\\n    {{#if @showCancelPaymentButton}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" (queue @clearForm @cancel)}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </button>\\n    {{/if}}\\n    {{#if @optionalRegistration}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        {{on \\\"click\\\" @skip}}\\n        class=\\\"ssButton ssButtonSkip\\n          {{if this.isSaving 'ssButtonDisabled' 'ssButtonSecondary'}}\\n          {{if @engagementStyle 'engagement-button'}}\\\"\\n      >\\n        {{i18n-t \\\"skip\\\"}}\\n      </button>\\n    {{/if}}\\n  {{/unless}}\\n</form>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-page.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-page.hbs\"}});\n/* eslint-disable  ember/no-get, @typescript-eslint/restrict-template-expressions */\nimport Component from '@glimmer/component';\nimport { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { isBlank } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport CurrentService from 'consumer/services/current';\nimport FormFieldModel from 'consumer/models/form-field';\n\nexport interface SSFormPageSignature {\n  Element: HTMLDivElement;\n  Args: {\n    form: any;\n    page: any;\n    isSaving: boolean;\n    isVoting: boolean;\n    isNominating: boolean;\n    dipsUrl: string;\n    formSubmissionId: string;\n    optionalRegistration: boolean;\n    skip: () => void;\n    referrer: string;\n    referrerUrl: string;\n    languageCode: string;\n    beginUpload: (file: File, formField: any) => void;\n    uploadImage: (file: File, formField: any) => void;\n    showCancelButton: boolean;\n    showCancelPaymentButton: boolean;\n    cancel: () => void;\n    submitFormPage: (page: any, formField?: any, callback?: () => void) => void;\n    registrationPrompt: string;\n    autoFocus: boolean;\n    engagementStyle: string;\n    updateStoredFormFields: (fields: Record<string, any>) => void;\n    referralUrl: string;\n    noBottomWhitespace: boolean;\n    submissionErrorMessage: string;\n    continueToPayment: boolean;\n    clearForm: () => void;\n    storeFieldValues?: boolean;\n    uploadedMediaItemId: string | null;\n    uploadedVideoId: string | null;\n    isBallotForm: boolean;\n    suggestedValues: Array<string> | null;\n    matchupClassificationType: string | null;\n    entryNameField: any;\n    googlePlaceField: any;\n    promotionType: string | null;\n    addingVideoByUrl: boolean;\n    setTurnstileRunningState?: (isTurnstileChecking: boolean) => void;\n  };\n}\n\nexport default class SsFormPageComponent extends Component<SSFormPageSignature> {\n  @service declare current: CurrentService;\n  @service declare localStorage: any;\n  @service declare session: any;\n  @service declare enums: any;\n  @service declare store: any;\n\n  @tracked isTurnstileChecking = false;\n  @tracked currentSubmittingField: any = null;\n\n  storeFieldValues = this.args.storeFieldValues ?? true;\n\n  get formType() {\n    return this.args.form?.formType;\n  }\n\n  get isExtraChancesForm() {\n    return this.formType === 'ExtraChances';\n  }\n\n  get isSaving() {\n    return this.isTurnstileChecking || this.args.isSaving;\n  }\n\n  get isLastPage() {\n    return this.args.form?.formPagesCount === this.args.page?.pageNumber;\n  }\n\n  get sortedFormFields() {\n    const organizationId = get(this, 'current.organizationPromotion.organization.id');\n    const formFields = (get(this, 'args.page.formFields') as Array<any>) || [];\n\n    if (get(this, 'current.organizationPromotion.isSyndicatedFrom')) {\n      return formFields.toArray().sort((a, b) => {\n        const aMatches = a.field.organizationId == organizationId;\n        const bMatches = b.field.organizationId == organizationId;\n\n        if (aMatches && !bMatches) return 1;\n        if (!aMatches && bMatches) return -1;\n\n        return a.displayOrder - b.displayOrder;\n      });\n    }\n\n    return formFields.toArray().sort((a, b) => {\n      return a.displayOrder - b.displayOrder;\n    });\n  }\n\n  get hasRequiredTwitterFollow() {\n    const formFields = get(this, 'args.page.formFields') as Array<any>;\n    if (formFields) {\n      const requiredFormFields = formFields.filter(fomField => fomField.isRequired);\n      return !!requiredFormFields.filterBy('fieldType', 'TwitterFollowApi').length;\n    }\n    return false;\n  }\n\n  get submitButtonText() {\n    return this.args.isNominating\n      ? 'nominate'\n      : this.args.isVoting\n      ? 'vote_button_vote'\n      : this.args.continueToPayment\n      ? 'continue_to_payment'\n      : 'submit';\n  }\n\n  //endregion\n\n  //region Methods\n\n  prefix = (str: string) => {\n    const form = this.args.form || this.args.page.form;\n    return `FORM_${form.id}_${str}`;\n  };\n\n  falsifyUndefinedFormFields = (formField: any) => {\n    const falsifiableFields = ['TwitterFollowApi', 'TwitterTweetApi'];\n    if (falsifiableFields.includes(get(formField, 'field.fieldType')) && isBlank(formField.value)) {\n      set(formField, 'value', false);\n    }\n  };\n\n  @action\n  submitFormPage() {\n    if (!this.isSaving) {\n      this.args.submitFormPage(this.args.page);\n    }\n  }\n\n  @action\n  skip() {\n    if (!this.isSaving) {\n      this.args.skip();\n    }\n  }\n\n  @action\n  submitFormField(formField: any, callback?: () => void) {\n    if (!this.isSaving) {\n      this.currentSubmittingField = formField;\n      this.args.submitFormPage(this.args.page, formField, callback);\n    }\n  }\n\n  @action\n  setTurnstileRunningState(isTurnstileChecking: boolean) {\n    this.isTurnstileChecking = isTurnstileChecking;\n    this.args.setTurnstileRunningState?.(isTurnstileChecking);\n  }\n\n  @action\n  onFormFieldChange() {\n    const obj = {};\n    const storedFormFields = {};\n    const formFields = (this.args.page.formFields?.toArray() as Array<any>) || [];\n    if (formFields.some(field => field.value) && !this.isSaving) {\n      formFields.forEach((formField: FormFieldModel) => {\n        const key = formField.id as never;\n        const value = formField.value as never;\n        if (this.storeFieldValues && formField.fieldType !== 'Checkboxes') {\n          set(obj, key, value);\n        }\n        set(storedFormFields, key, value);\n      });\n      this.args.updateStoredFormFields?.(storedFormFields);\n      this.localStorage.setItem(this.prefix('formValues'), JSON.stringify(obj));\n    }\n    return this.storeFieldValues ? obj : {};\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action }}\\n<div\\n  {{did-insert this.setup}}\\n  {{!-- {{did-update this.updateFormPage this.desiredPageNumber}} --}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.emailAddressThatIsAlreadyInUse}}\\n      <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{@promotionName}} />\\n    {{else if this.emailAddressThatRequiresVerification}}\\n      <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n    {{else}}\\n      {{#if this.isLogoutVisible}}\\n        <div class=\\\"form-user\\\">\\n          <a href=\\\"javascript:;\\\" class=\\\"ssStartFormOver\\\" {{action (queue this.clearStoredValues this.logout)}}>\\n            {{i18n-t \\\"start_form_over\\\"}}\\n          </a>\\n        </div>\\n      {{/if}}\\n      {{#if this.currentFormPage}}\\n        {{#if this.showPageIndicator}}\\n          <PageIndicator\\n            @pageNumber={{this.currentFormPage.pageNumber}}\\n            @totalPagesCount={{this.form.formPagesCount}}\\n          />\\n        {{/if}}\\n        <SsFormPage\\n          @organizationPromotion={{@organizationPromotion}}\\n          @form={{this.form}}\\n          @page={{this.currentFormPage}}\\n          @isSaving={{this.submitFormPageTask.isRunning}}\\n          @isVoting={{@isVoting}}\\n          @isNominating={{@isNominating}}\\n          @isBallot={{@isBallot}}\\n          @dipsUrl={{this.dipsUrl}}\\n          @formSubmissionId={{this.formSubmissionId}}\\n          @optionalRegistration={{@optionalRegistration}}\\n          @skip={{@skip}}\\n          @referrer={{@referrer}}\\n          @referrerUrl={{@referrerUrl}}\\n          @languageCode={{this.languageCode}}\\n          @beginUpload={{optional @beginUpload}}\\n          @uploadImage={{optional @uploadImage}}\\n          @showCancelButton={{@showCancelButton}}\\n          @showCancelPaymentButton={{@showCancelPaymentButton}}\\n          @cancel={{@cancel}}\\n          @submitFormPage={{perform this.submitFormPageTask}}\\n          @registrationPrompt={{@registrationPrompt}}\\n          @autoFocus={{@autoFocus}}\\n          @engagementStyle={{@engagementStyle}}\\n          @persistEntryData={{true}}\\n          @updateStoredFormFields={{this.updateStoredFormFields}}\\n          @referralUrl={{@referralUrl}}\\n          @noBottomWhitespace={{@noBottomWhitespace}}\\n          @submissionErrorMessage={{this.submissionErrorMessage}}\\n          @continueToPayment={{@continueToPayment}}\\n          @clearForm={{this.clearForm}}\\n        />\\n      {{/if}}\\n    {{/if}}\\n  {{/if}}\\n</div>\", {\"contents\":\"{{! template-lint-disable no-action }}\\n<div\\n  {{did-insert this.setup}}\\n  {{!-- {{did-update this.updateFormPage this.desiredPageNumber}} --}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.emailAddressThatIsAlreadyInUse}}\\n      <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{@promotionName}} />\\n    {{else if this.emailAddressThatRequiresVerification}}\\n      <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n    {{else}}\\n      {{#if this.isLogoutVisible}}\\n        <div class=\\\"form-user\\\">\\n          <a href=\\\"javascript:;\\\" class=\\\"ssStartFormOver\\\" {{action (queue this.clearStoredValues this.logout)}}>\\n            {{i18n-t \\\"start_form_over\\\"}}\\n          </a>\\n        </div>\\n      {{/if}}\\n      {{#if this.currentFormPage}}\\n        {{#if this.showPageIndicator}}\\n          <PageIndicator\\n            @pageNumber={{this.currentFormPage.pageNumber}}\\n            @totalPagesCount={{this.form.formPagesCount}}\\n          />\\n        {{/if}}\\n        <SsFormPage\\n          @organizationPromotion={{@organizationPromotion}}\\n          @form={{this.form}}\\n          @page={{this.currentFormPage}}\\n          @isSaving={{this.submitFormPageTask.isRunning}}\\n          @isVoting={{@isVoting}}\\n          @isNominating={{@isNominating}}\\n          @isBallot={{@isBallot}}\\n          @dipsUrl={{this.dipsUrl}}\\n          @formSubmissionId={{this.formSubmissionId}}\\n          @optionalRegistration={{@optionalRegistration}}\\n          @skip={{@skip}}\\n          @referrer={{@referrer}}\\n          @referrerUrl={{@referrerUrl}}\\n          @languageCode={{this.languageCode}}\\n          @beginUpload={{optional @beginUpload}}\\n          @uploadImage={{optional @uploadImage}}\\n          @showCancelButton={{@showCancelButton}}\\n          @showCancelPaymentButton={{@showCancelPaymentButton}}\\n          @cancel={{@cancel}}\\n          @submitFormPage={{perform this.submitFormPageTask}}\\n          @registrationPrompt={{@registrationPrompt}}\\n          @autoFocus={{@autoFocus}}\\n          @engagementStyle={{@engagementStyle}}\\n          @persistEntryData={{true}}\\n          @updateStoredFormFields={{this.updateStoredFormFields}}\\n          @referralUrl={{@referralUrl}}\\n          @noBottomWhitespace={{@noBottomWhitespace}}\\n          @submissionErrorMessage={{this.submissionErrorMessage}}\\n          @continueToPayment={{@continueToPayment}}\\n          @clearForm={{this.clearForm}}\\n        />\\n      {{/if}}\\n    {{/if}}\\n  {{/if}}\\n</div>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form.hbs\"}});\n/* eslint-disable @typescript-eslint/restrict-template-expressions, ember/no-get */\nimport Component from '@glimmer/component';\nimport { get, set, action } from '@ember/object';\nimport { later, scheduleOnce } from '@ember/runloop';\nimport { next, run } from '@ember/runloop';\nimport duration from 'secondstreet-common/utils/duration';\nimport { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport { isBlank, isEmpty, isNone, isPresent } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport clearFormFieldValues from 'consumer/utils/clear-form-field-values';\nimport specialEncode from 'consumer/utils/special-encode';\nimport talker from 'consumer/utils/talker';\nimport flatten from 'lodash/flatten';\nimport { ForbiddenError } from 'secondstreet-common/utils/errors';\nimport Errors from 'secondstreet-common/utils/errors';\nimport { focusFirstIn } from '../utils/accessibility';\nimport EnumsService from 'ember-cli-ss-enums/services/enums';\nimport RouterService from '@ember/routing/router-service';\nimport ScrollerService from 'consumer/services/scroller';\nimport DesignSettingsService from 'consumer/services/design-settings';\nimport Store from '@ember-data/store';\nimport FormFieldModel from 'consumer/models/form-field';\nimport FormPageModel from 'consumer/models/form-page';\nimport MatchupModel from 'consumer/models/matchup';\nimport FormPageSubmissionModel from 'consumer/models/form-page-submission';\nimport FormModel from 'consumer/models/form';\nimport { task } from 'ember-concurrency';\nimport MatchupEntryModel from 'consumer/models/matchup-entry';\nimport { InvalidError } from '@ember-data/adapter/error';\n\nconst isMultipleCheckbox = (formField: FormFieldModel) => formField.fieldType === 'Checkboxes';\n\nconst splitCheckedIntoFormFields = (formField: FormFieldModel) => {\n  const { value } = formField;\n  if (!Array.isArray(value)) {\n    return [];\n  }\n  return value.map(({ fieldOptionId }) => ({ field: formField.field, value: fieldOptionId }));\n};\n\nconst CAPTCHA_FORM_PAGE_ID = -9999;\n\nexport type Error = {\n  message: {\n    errors: Array<{\n      key?: string;\n      detail?: string;\n      data?: any;\n      message?: string;\n    }>;\n    meta?: {\n      form_submission_id?: string;\n      sessions?: {\n        access_token?: string;\n      };\n    };\n  };\n  errors?: Array<{\n    detail: string;\n  }>;\n  source: {\n    pointer: string;\n  };\n  detail: string;\n  data: any;\n};\n\nexport interface SsFormSignature {\n  Element: HTMLDivElement;\n  Args: {\n    form?: FormModel;\n    matchup?: MatchupModel;\n    referrer: string;\n    disqualify: () => void;\n    languageCode: string;\n    finished?: (matchup?: MatchupModel, matchupEntryId?: string, entryId?: string) => void;\n    scrollToTopOfForm: boolean;\n    logout(): Promise<void>;\n    promotionName: string;\n    registrationPrompt: string;\n    optionalRegistration: boolean;\n    skip: () => void;\n    engagementStyle: string;\n    hideThirdPartyRequestOnLoad: boolean;\n    delayClearFormFieldValues: boolean;\n    referrerUrl: string;\n    lastPageSubmitted: string;\n    isQuiz: boolean;\n    continueToPayment: boolean;\n    showCancelPaymentButton: boolean;\n    cancel: () => void;\n    showCancelButton: boolean;\n    isVoting: boolean;\n    isNominating?: boolean;\n    isBallot?: boolean;\n    autoFocus: boolean;\n    promotionType: string;\n    promotionSubType: string;\n    organizationPromotion: string;\n    dipsUrl: string;\n    referralUrl: string;\n    extraChancesAdded: (extraChances: number) => void;\n    noBottomWhitespace: boolean;\n    entryForm?: FormModel;\n    registrationForm?: FormModel;\n    currentMatchupEntry: MatchupEntryModel;\n    googleMapsApiKey: string;\n    beginSubmission: () => void;\n    freezeFormState: boolean;\n    suggestedValues: string[];\n    transformLoginEmailRedirectPath: (str: string) => string;\n    isEditingSubmission: boolean;\n    changeToWriteIn: boolean;\n    closeChangeWriteIn: () => void;\n    labelTextOverride: string;\n    disableWriteinAutocomplete: boolean;\n    matchupClassificationType: string;\n    persistEntryData: boolean;\n    clearEntryFormSubmission: boolean;\n    showFormHeaders: boolean;\n    splitSubmission: boolean;\n    hasCategories: boolean;\n    matchupName: string;\n    storeFieldValues: boolean;\n  };\n}\n\nexport default class SsFormNewComponent extends Component<SsFormSignature> {\n  @service declare enums: EnumsService;\n  @service declare localStorage: any;\n  @service declare loginRequest: any;\n  @service declare router: RouterService;\n  @service declare scroller: ScrollerService;\n  @service declare session: any;\n  @service declare store: Store;\n  @service('design-settings') declare designSettings: DesignSettingsService;\n\n  @tracked currentFormPage?: FormPageModel;\n  @tracked storedFormFields?: Record<string, unknown>;\n  @tracked isStarted = false;\n  @tracked isFinished = false;\n  @tracked forceDisableForm = false;\n  @tracked hasMismatchErrored = false;\n  @tracked desiredPageNumber = '';\n  @tracked formSubmissionId?: number;\n  @tracked entryFormSubmissionId?: number;\n  @tracked failedFormSubmissionId?: string;\n  @tracked matchupEntryId?: string;\n  @tracked entryId?: string;\n  @tracked emailAddressThatIsAlreadyInUse?: string;\n  @tracked emailAddressThatRequiresVerification?: string;\n  @tracked submissionErrorMessage?: string;\n  @tracked placeObject: { google?: any; internal?: any } = {};\n\n  @tracked isTurnstileChecking = false;\n  @tracked dipsUrl?: string = this.args.dipsUrl;\n\n  container?: HTMLElement;\n\n  transformLoginEmailRedirectPath = this.args.transformLoginEmailRedirectPath || (str => str);\n\n  languageCode = this.args.languageCode || 'en-US';\n\n  clearEntryFormSubmission = this.args.clearEntryFormSubmission ?? true;\n\n  get form() {\n    return this.args.form || this.args.registrationForm;\n  }\n\n  get formTypeClass() {\n    return `ssForm${this.form?.formType}`;\n  }\n\n  get isLogoutVisible() {\n    if (!this.session.usesSecondStreetLogin) {\n      return false;\n    }\n    return this.currentFormPage?.pageNumber == 1 ? false : this.session.isRegistered;\n  }\n\n  get isFirstPage() {\n    return this.currentFormPage?.pageNumber == 1;\n  }\n\n  get canChangeUpload() {\n    return (\n      this.args.splitSubmission ||\n      (this.isFirstPage &&\n        isEmpty(this.emailAddressThatIsAlreadyInUse) &&\n        isEmpty(this.emailAddressThatRequiresVerification))\n    );\n  }\n\n  get isLastPage() {\n    return this.form?.formPagesCount === this.currentFormPage?.pageNumber;\n  }\n\n  get showPageIndicator() {\n    return false;\n    // return (this.form?.formPagesCount || 0) > 1;\n  }\n\n  get emailFormField(): FormFieldModel | undefined {\n    if (!this.currentFormPage?.formFields) {\n      return undefined;\n    }\n\n    return this.currentFormPage.formFields\n      ?.toArray()\n      .find(formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'Email' }).toString());\n  }\n\n  get nextRegistrationPageToComplete() {\n    return undefined as FormPageModel | undefined;\n  }\n\n  get formFields() {\n    return this.currentFormPage?.formFields.toArray() || [];\n  }\n\n  @action\n  async setup(el: HTMLElement) {\n    this.container = el;\n    this.acknowledgeForm();\n    this.sessionRelatedSetup();\n    await this.getDipsUrl();\n    await this.restoreState();\n  }\n\n  @action\n  cleanup() {\n    if (!this.isFinished) {\n      void talker.send('event', { type: 'form:abandoned', detail: null });\n    }\n    this.forceDisableForm = false;\n    this.clearFormPageErrors();\n  }\n\n  /* didUpdateAttrs() {\n    this.forceDisableForm = false;\n    this.clearFormPageErrors();\n  } */\n\n  @action\n  clearStoredValues() {\n    this.storedFormFields = {};\n  }\n\n  clearFormPageErrors() {\n    this.form?.formPages?.forEach(fp => {\n      fp.errors?.clear();\n    });\n  }\n\n  restoreState = async () => {\n    await this.session.loadStoredSession();\n    await this.restoreProgress();\n    await this.restoreFormValues();\n    await this.restoreMinimumAgeRestriction();\n  };\n\n  getDipsUrl = async () => {\n    if (!this.args.dipsUrl) {\n      const dipsUrlRes = await this.store.queryRecord('setting', { key: 'dips_url' });\n      this.dipsUrl = dipsUrlRes?.value;\n    }\n  };\n\n  acknowledgeForm = () => {\n    this.session.acknowledgeForm(this.form?.id);\n    if (this.args.entryForm) {\n      this.session.acknowledgeForm(this.args.entryForm.id);\n    }\n  };\n\n  sessionRelatedSetup = () => {\n    if (this.session.thirdPartyAuthProvider) {\n      this.addThirdPartyCancelHandler();\n    } else {\n      this.session.one('thirdPartyAuthProviderDetected', () => this.addThirdPartyCancelHandler());\n    }\n    if (this.form?.formPages.length === 1 && this.form?.formPages?.firstObject?.pageNumber === 1) {\n      this.currentFormPage = this.form.formPages.firstObject;\n    }\n    this.storedFormFields = {};\n    if (!this.args.storeFieldValues) {\n      void this.clearProgress();\n    }\n\n    void talker.send('event', { type: 'form:visible', detail: null });\n  };\n\n  addThirdPartyCancelHandler = () => {\n    if (!this.session.thirdPartyUsesExternalLogin) {\n      return;\n    }\n    if (this.args.hideThirdPartyRequestOnLoad !== true && this.session.isLoggedIn) {\n      this.launchThirdPartyRequestLogin();\n    }\n\n    if (this.args.optionalRegistration) {\n      this.session.on('thirdPartyLoginCanceled', () => this.args.skip?.());\n    }\n  };\n\n  clearProgress = async () => {\n    if (this.clearEntryFormSubmission) {\n      const localStorage = await this.localStorage;\n      localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    }\n  };\n\n  prefix = (str: string) => {\n    return `FORM_${this.form?.id}_${str}`;\n  };\n\n  launchThirdPartyRequestLogin = () => {\n    void talker.send('thirdParty', {\n      event: 'requestThirdPartyLogin',\n    });\n  };\n\n  ///fix below\n  submitFormPageTask = task(\n    { drop: true },\n    async (page: FormPageModel, formField?: FormFieldModel, callback?: () => void) => {\n      let result;\n      const formPageSubmission = this.createFormSubmission(page, formField);\n\n      if (this.placeObject?.google) {\n        formPageSubmission.googlePlaceId = this.placeObject.google.place_id;\n        formPageSubmission.googlePlaceName = this.placeObject.google.structured_formatting.main_text;\n      } else if (this.placeObject?.internal) {\n        formPageSubmission.locationId = this.placeObject.internal.locationId;\n      }\n\n      const extraChances = this.sumExtraChances(page, formField);\n      if (this.currentFormPage) {\n        const { formFields } = this.currentFormPage;\n\n        try {\n          result = await formPageSubmission.save();\n          await this.submissionSuccess(result, extraChances, formFields.toArray());\n          callback?.();\n        } catch (error: any) {\n          this.submissionFailure(error);\n        }\n      }\n      return result;\n    }\n  );\n  /**\n   * @private\n   * @param {formFields} page\n   * @returns {Array}\n   */\n  createFormFieldsForMultipleCheckboxes(formFields: FormFieldModel[]) {\n    return [\n      ...formFields.filter(ff => !isMultipleCheckbox(ff)),\n      ...flatten(formFields.filter(isMultipleCheckbox).map(splitCheckedIntoFormFields)),\n    ];\n  }\n  /**\n   * @private\n   * @param {FormPage} page\n   * @returns {FormPageSubmission}\n   */\n  createFormSubmission(page: FormPageModel, formField?: FormFieldModel) {\n    return this.store.createRecord('formPageSubmission', {\n      form: page.form,\n      formPageId: page.isCaptchaPage ? CAPTCHA_FORM_PAGE_ID : page.id,\n      fields: this.createFormFieldsForMultipleCheckboxes(formField ? [formField] : page.formFields.toArray()),\n      matchup: this.args.matchup,\n      matchupClassificationTypeId: this.args.matchup ? this.args.matchup.get('matchupClassificationTypeId') : undefined,\n      referrer: this.args.referrer,\n      formSubmissionId: page.form.formType === 'EntrySubmission' ? undefined : this.formSubmissionId || undefined,\n    });\n  }\n\n  setTurnstileRunningState = (isTurnstileChecking: boolean) => {\n    this.isTurnstileChecking = isTurnstileChecking;\n  };\n\n  @action\n  async updateFormPage() {\n    if (this.desiredPageNumber == '-9999') {\n      this.setTurnstileRunningState(true);\n      // if user was on Captcha, back-end expects the request differently\n      const formId = await this.localStorage.getItem('formIds');\n      const captchaPage = await this.store.findRecord('formPage', `${CAPTCHA_FORM_PAGE_ID}|${formId.split(',')[0]}`);\n      if (captchaPage && !this.isDestroying) {\n        this.currentFormPage = captchaPage;\n        this.scrollToCaptchaPage();\n      }\n    } else {\n      const formPage = await this.store.queryRecord('form-page', {\n        formId: this.form?.id,\n        pageNumber: this.desiredPageNumber,\n      });\n      if (isPresent(formPage) && !this.isDestroying) {\n        this.currentFormPage = formPage;\n\n        if (!formPage?.isPageOne || this.args.scrollToTopOfForm) {\n          this.scrollToTopOfForm();\n        }\n        if (this.desiredPageNumber != '1') {\n          this.setValuesToDefaultIfBlank();\n        }\n      }\n    }\n  }\n  /**\n   * Returns a count of all the extra chances to be added if the form page submission succeeds.\n   * @param page\n   * @param formField\n   * @returns {number}\n   */\n  sumExtraChances(page: FormPageModel, formField?: FormFieldModel) {\n    const formFields = formField ? [formField] : page.formFields.toArray();\n    return formFields.map(x => x.get('extraChances') || 0).reduce((a, b) => a + b, 0);\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async submissionSuccess(\n    formPageSubmission: FormPageSubmissionModel,\n    extraChances: number,\n    formFields: FormFieldModel[]\n  ) {\n    this.captureSession(formPageSubmission);\n    this.captureFormSubmissionDetails(formPageSubmission);\n    this.sendFormPageSubmissionSDKEvent(formPageSubmission, formFields);\n    await this.nextPage(formPageSubmission);\n\n    if (extraChances && this.args.extraChancesAdded) {\n      this.args.extraChancesAdded(extraChances);\n      this.formSubmissionId = undefined; // clear out the form submission ID after each extra chance submission\n    }\n\n    this.hasMismatchErrored = false;\n    this.submissionErrorMessage = undefined;\n    return formPageSubmission;\n  }\n  /**\n   * @private\n   * @param {Error} error\n   */\n  submissionFailure(error: Error) {\n    if (error?.errors?.firstObject?.detail === 'Captcha is required to complete this form.') {\n      void this.updateFormPage();\n    }\n\n    const method = camelize(error.message?.errors?.[0]?.key || '');\n\n    this.failedFormSubmissionId = error?.message?.meta?.form_submission_id;\n    const accessToken = error.message?.meta?.sessions?.access_token;\n    if (accessToken) {\n      this.session.loginUsingAccessToken(accessToken);\n    }\n    talker.send('event', { type: 'formpage:error', detail: null });\n    if (error instanceof ForbiddenError) {\n      // Check out the Errors region for these methods.\n      this.forceDisableForm = true;\n      // @ts-ignore\n      throw this[method](error);\n      // @ts-ignore\n    } else if (error instanceof InvalidError) {\n      throw this.validationFailure(error);\n    } else {\n      // @ts-ignore\n      if (error instanceof Errors.UnauthorizedError && method === 'emailAddressAlreadyInUse') {\n        void this.emailAddressAlreadyInUse();\n        // @ts-ignore\n      } else if (error instanceof Errors.UnauthorizedError && method === 'emailVerificationRequired') {\n        this.emailVerificationRequired(error?.message?.errors[0]?.data);\n      } else {\n        throw error;\n      }\n    }\n  }\n  /**\n   * When we submit the first {@link FormPageSubmission} a {@link Session} will be generated by the API.\n   * We need to capture that and log the user in with it.\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  captureSession(formPageSubmission: FormPageSubmissionModel) {\n    const session = formPageSubmission.userSession;\n    if (session) {\n      this.session.useExistingSession(session);\n    }\n  }\n  /**\n   * When we submit the first {@link FormPageSubmission} a {@link FormSubmission} ID will be generated by the API.\n   * We need to capture that and return it with each subsequent {@link FormPageSubmission}.\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  captureFormSubmissionDetails(formPageSubmission: FormPageSubmissionModel) {\n    const { formSubmissionId } = formPageSubmission;\n\n    if (formSubmissionId && formPageSubmission.form.formType !== 'EntrySubmission') {\n      this.formSubmissionId = formSubmissionId;\n      this.localStorage.setItem(this.prefix('formSubmissionId'), formSubmissionId);\n    }\n  }\n  /**\n   * @param {FormPageSubmission} formPageSubmission\n   * @private\n   */\n  sendFormPageSubmissionSDKEvent(formPageSubmission: FormPageSubmissionModel, formFields: FormFieldModel[]) {\n    const detail = {\n      fields: formPageSubmission.fields.map(({ fieldId: id, fieldValue: value }) => {\n        const formField = formFields.find(field => +field.id == id);\n\n        return {\n          id,\n          type: formField?.field.fieldType,\n          label: formField?.labelText,\n          name: formField?.field.name,\n          value,\n          valueText: formField?.field.fieldOptions?.length\n            ? formField?.field.fieldOptions.find(option => option.id == value)?.text\n            : value,\n        };\n      }),\n    };\n\n    talker.send('event', { type: 'formpage:submitted', detail });\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async nextPage(formPageSubmission: FormPageSubmissionModel) {\n    const nextFormPage = await formPageSubmission.nextFormPage;\n    if (nextFormPage) {\n      if (nextFormPage.isCaptchaPage && !this.isDestroying) {\n        if (!nextFormPage.form) {\n          nextFormPage.reload();\n        }\n        this.currentFormPage = nextFormPage;\n        this.scrollToCaptchaPage();\n      } else {\n        this.desiredPageNumber = nextFormPage.pageNumber.toString();\n        await this.updateFormPage();\n      }\n      const { pageNumber } = nextFormPage;\n      this.localStorage.setItem(this.prefix('currentPageNumber'), pageNumber);\n      this.localStorage.setItem('probablyHasNotFinishedRegistration', true);\n    } else {\n      run(() => this.args.beginSubmission?.());\n      this.storeEligibilityDate(this.getEntryEligibilityDate(formPageSubmission));\n      this.clearFormRelatedLocalStorage([], this.args.delayClearFormFieldValues);\n      this.isFinished = true;\n      talker.send('event', { type: 'form:submitted', detail: null });\n      this.designSettings.handleKioskMode();\n      this.designSettings.handleThanksPageRedirection();\n      this.args.finished?.(this.args.matchup, this.matchupEntryId, this.entryId);\n    }\n  }\n  scrollToTopOfForm() {\n    const target = document.querySelector(this.args.isQuiz ? '.ssQuiz' : '.ssForm');\n    const ad = target?.closest('.gallery-display')?.querySelector('[data-ballot-category-ad]');\n    let additionalOffset = -24;\n\n    if (target && ad) {\n      const { top: targetTop } = target.getBoundingClientRect();\n      const { height, bottom } = ad.getBoundingClientRect();\n      const offset = Math.min(height, 240);\n\n      if (targetTop - offset < bottom) {\n        additionalOffset -= offset;\n      }\n    }\n\n    if (target) {\n      this.scroller.scrollTo(target, { additionalOffset, behavior: 'smooth' });\n    }\n  }\n\n  scrollToCaptchaPage() {\n    later(() => {\n      const target = document.querySelector('#turing-target');\n      if (target) {\n        this.scroller.scrollTo(target, { center: true });\n      }\n    }, duration(300));\n  }\n\n  /**\n   * Get the next entry eligibility date for the user\n   * @param formPageSubmission\n   * @returns {*}\n   */\n  getEntryEligibilityDate(formPageSubmission: FormPageSubmissionModel) {\n    return formPageSubmission.entryEligibilityDate;\n  }\n\n  /**\n   * @private\n   */\n  clearFormFieldValues() {\n    clearFormFieldValues(this.form);\n  }\n\n  /**\n   * @private\n   */\n  clearFormRelatedLocalStorage(excludedItems: string[] = [], delayClearFormFieldValues = false) {\n    // some applications re-route the user to a new page after submitting the final page of the form (e.g. a thanks page)\n    // if that page has to load data, form field values will be cleared BEFORE the new template is rendered,\n    // which can be confusing on slower connections because it looks like your form inputs were erased\n    // IF YOU DELAY CLEARING THE FORM FIELD VALUES HERE, PLEASE MAKE SURE TO CLEAR THEM ON THE LANDING ROUTE\n    // AFTER ITS MODEL RESOLVES (e.g. in a didTransition hook)\n    if (!delayClearFormFieldValues) {\n      this.clearFormFieldValues();\n    }\n    const removeUnlessExcluded = (str: string) =>\n      excludedItems.includes(str) || this.localStorage.removeItem(this.prefix(str));\n    ['formSubmissionId', 'formValues', 'currentPageNumber', 'mediaItemId', 'videoId'].forEach(removeUnlessExcluded);\n    this.localStorage.removeItem('probablyHasNotFinishedRegistration');\n  }\n\n  /**\n   * @private\n   */\n  async restoreProgress() {\n    const [currentPageNumber, formSubmissionId] = await Promise.all([\n      this.localStorage.getItem(this.prefix('currentPageNumber')),\n      this.localStorage.getItem(this.prefix('formSubmissionId')),\n    ]);\n\n    if (!this.isDestroyed) {\n      this.desiredPageNumber =\n        currentPageNumber ||\n        (this.args.splitSubmission && this.nextRegistrationPageToComplete\n          ? this.nextRegistrationPageToComplete.pageNumber\n          : 1);\n      this.formSubmissionId = formSubmissionId;\n      await this.updateFormPage();\n    }\n  }\n\n  /**\n   * @private\n   */\n  restoreMinimumAgeRestriction() {\n    return this.localStorage.getItem('MinimumAgeRestriction').then((value: string) => {\n      if (value) {\n        return this.args.disqualify();\n      }\n    });\n  }\n\n  /**\n   * @private\n   */\n  async restoreFormValues() {\n    const json = await this.localStorage.getItem(this.prefix('formValues'));\n    const values = JSON.parse(json);\n    if (values && this.formFields) {\n      this.formFields.forEach(formField => {\n        const value = values[formField.id];\n        formField.value = isNone(value) || formField.field.fieldType === 'Captcha' ? '' : value;\n      });\n    }\n    this.setValuesToDefaultIfBlank();\n  }\n\n  setValuesToDefaultIfBlank() {\n    const { formFields } = this;\n\n    if (formFields) {\n      formFields.forEach(formField => {\n        if (!isBlank(formField.value)) return;\n\n        formField.value = formField.fieldTypeId == 23 ? this.session.username : formField.defaultValue;\n      });\n    }\n  }\n\n  /**\n   * @private\n   */\n  storeEligibilityDate(iso8601: string) {\n    const toSet = iso8601\n      ? `${iso8601.replace(/Z$/, '')}Z` // API Bug Workaround: It sometimes sends times with Z, sometimes without\n      : null;\n    return this.localStorage.setItem('entryEligibilityDate', toSet);\n  }\n\n  /**\n   * Certain characters require special handling because iframes/browsers decode them when we don't want them to\n   * @param {string} routeUrl\n   * @returns {string}\n   * @private\n   */\n  escapeRedirectPath(routeUrl: string) {\n    return specialEncode.encode(routeUrl);\n  }\n\n  /**\n   * This returns a url without a query string param beginning with a particular prefix\n   **/\n  removeUtmQueryParams(routeUrl: string) {\n    return routeUrl.replace(/&?utm_[^=]*?=([^&]$|[^&]*)/gi, '');\n  }\n\n  /**\n   * This cleans up query string parameters on a url before submitting it to the API\n   */\n  sanitizeRedirectPath(routeUrl: string) {\n    return this.escapeRedirectPath(this.removeUtmQueryParams(routeUrl));\n  }\n  //endregion\n\n  //region Errors\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"MinimumAgeRestriction\".\n   * @param {ForbiddenError} error\n   * @returns {Promise}\n   */\n  minimumAgeRestriction() {\n    this.localStorage.setItem('MinimumAgeRestriction', 'true');\n    void this.args.logout();\n    this.clearFormRelatedLocalStorage();\n    this.args.disqualify();\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"EntryLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  entryLimitReached(error: Error) {\n    this.setErrorOnEmailField(error);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"ValidationSignUpLimitHasBeenReached\".\n   * @param {ForbiddenError} error\n   */\n  validationSignUpLimitHasBeenReached(error: Error) {\n    this.setErrorOnEmailField(error);\n  }\n\n  setErrorOnEmailField(error: Error) {\n    const emailField = this.emailFormField;\n    const errorMessage = error?.message?.errors?.[0]?.message;\n    if (emailField && isPresent(errorMessage)) {\n      //@ts-ignore\n      this.emailFormField.errors.add('value', errorMessage as string);\n    } else {\n      this.submissionErrorMessage = errorMessage;\n    }\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"ValidationAlreadyRegisteredForThisEvent\".\n   * @param {ForbiddenError} error\n   */\n  validationAlreadyRegisteredForThisEvent(error: Error) {\n    this.emailFormField?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n  }\n  /**\n   * Called when a user receives a {@link DS.InvalidError}.\n   * @private\n   * @param {Error} invalidError\n   */\n\n  validationFailure(invalidError: any) {\n    const { formFields } = this;\n    formFields.forEach((ff: FormFieldModel) => ff.field.errors.clear());\n    invalidError.errors.forEach((error: any) => {\n      if (get(error, 'source.pointer').match(/\\d+/)) {\n        const formField = this.formFields.findBy(\n          // @ts-ignore\n          'field.id',\n          get(error, 'source.pointer').split('/').lastObject\n        );\n        if (error.data && get(formField, 'field.fieldType') === 'TwitterFollowApi') {\n          // @ts-ignore\n          set(formField, 'value', false);\n          // @ts-ignore\n          set(formField, 'field.twitterAuthorizationRedirect', error.data);\n        }\n        if (formField) {\n          formField.forceDirty();\n          formField.errors.add('value', error.detail);\n        }\n      } else {\n        this.clearStoredValues();\n        this.clearFormRelatedLocalStorage([], this.args.delayClearFormFieldValues);\n        void this.logout('There was a problem submitting your entry. Please try again.');\n      }\n    });\n    // @ts-ignore\n    scheduleOnce('afterRender', this, this.focusFirstErrorField);\n    // @ts-ignore\n    if (window.grecaptcha) {\n      // @ts-ignore\n      window.grecaptcha.reset();\n    }\n  }\n\n  focusFirstErrorField = () => {\n    focusFirstIn(this.container?.querySelector('.ssFailedValidation'));\n  };\n\n  /**\n   * Called when a registration form is submitted with an email that is already in use.\n   */\n  async emailAddressAlreadyInUse() {\n    const emailFieldId = this.enums.findWhere('FIELD', { name: 'Email' }).toString();\n    let email = this.emailFormField?.value;\n    if (!email) {\n      try {\n        const json = await this.localStorage.getItem(this.prefix('formValues'));\n        const values = JSON.parse(json || '{}');\n        // try current page field id first, then email field id\n        email = values?.[this.emailFormField?.id as unknown as string] || values?.[emailFieldId];\n      } catch (e) {\n        /* ignore parse errors */\n      }\n    }\n    if (!email) {\n      email = this.session.username;\n    }\n\n    const routeUrl = this.router.currentURL;\n    const redirectPath = this.sanitizeRedirectPath(this.transformLoginEmailRedirectPath(routeUrl));\n    if (this.args.promotionType === 'Ballot') {\n      this.clearFormRelatedLocalStorage();\n    }\n    const entryFormSubmissionId = this.args.promotionType === 'Ballot' ? this.entryFormSubmissionId : undefined;\n    const encodedPath = encodeURIComponent(redirectPath);\n    const { loginRequest } = this;\n\n    // Persist pending modal context so we can reopen after magic login\n    try {\n      const pending = {\n        formType: this.args.entryForm ? 'EntrySubmission' : 'Registration',\n        matchupId: this.args.matchup?.id ?? null,\n        matchupEntryId: this.matchupEntryId ?? this.args.currentMatchupEntry?.id ?? null,\n        isVoting: Boolean(this.args.isVoting),\n        isNominating: Boolean(this.args.isNominating),\n        changeToWriteIn: Boolean(this.args.changeToWriteIn),\n        isEditingSubmission: Boolean(this.args.isEditingSubmission),\n        redirectPath,\n        returnTo: routeUrl,\n        timestamp: Date.now(),\n      };\n      this.localStorage.setItem('pendingPromoModal', JSON.stringify(pending));\n\n      if (window.parent && window.parent !== window && typeof window.parent.postMessage === 'function') {\n        window.parent.postMessage({ type: 'ss-modal', action: 'pending-promo', context: pending }, '*');\n      }\n    } catch (e) {\n      // ignore persistence failures\n    }\n\n    const emailSubmittedCallback = () => run(() => (this.emailAddressThatIsAlreadyInUse = email as string));\n    const loginRequestPromise = loginRequest.requestLoginEmail(encodedPath, email, {\n      entryFormSubmissionId,\n      emailSubmittedCallback,\n    });\n    if (this.args.entryForm) {\n      this.localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    }\n    next(() => (this.emailAddressThatIsAlreadyInUse = email as string));\n    const [session] = await loginRequestPromise;\n    void this.router.transitionTo('login.token', session.accessToken, encodedPath);\n  }\n  /**\n   * Called when the user needs to verify their identity by clicking a link in an email.\n   * Example of this is when we suspect fraud because the user's browser fingerprint\n   * is already associated to multiple entries/votes.\n   * @private\n   * @param {string} verificationRequestToken\n   */\n  emailVerificationRequired(verificationRequestToken: string) {\n    //Get the email from the session if error occurred on form page that does not have email field\n    const email = this.emailFormField?.value || this.session.username;\n    const routeUrl = `${this.router.currentURL}`;\n\n    const redirectPath = this.sanitizeRedirectPath(this.transformLoginEmailRedirectPath(routeUrl));\n\n    this.clearFormRelatedLocalStorage();\n\n    const entryFormSubmissionId = this.failedFormSubmissionId || null;\n\n    this.store\n      .createRecord('loginEmailRequest', {\n        sendTo: email,\n        redirectPath: encodeURIComponent(redirectPath),\n        verificationRequestToken,\n        entryFormSubmissionId,\n      })\n      .save()\n      .then(() => {\n        this.emailAddressThatRequiresVerification = email;\n      });\n    next(() => (this.emailAddressThatIsAlreadyInUse = email));\n  }\n\n  @action\n  clearForm() {\n    this.clearFormRelatedLocalStorage();\n  }\n\n  @action\n  updateStoredFormFields(formFields: FormFieldModel[]) {\n    if (!this.isStarted) {\n      this.isStarted = true;\n      talker.send('event', { type: 'form:started', detail: null });\n    }\n    if (this.storedFormFields) Object.assign(this.storedFormFields, formFields);\n  }\n\n  @action\n  async logout(reason?: string) {\n    this.clearFormPageErrors();\n    if (typeof this.args.logout === 'function') {\n      await this.args.logout();\n    }\n\n    this.clearFormRelatedLocalStorage();\n    this.formSubmissionId = undefined;\n    this.entryFormSubmissionId = undefined;\n    this.emailAddressThatIsAlreadyInUse = undefined;\n    this.emailAddressThatRequiresVerification = undefined;\n    this.submissionErrorMessage = undefined;\n    this.isStarted = false;\n    this.isFinished = false;\n    this.desiredPageNumber = '1';\n    await this.updateFormPage();\n    await this.restoreFormValues();\n\n    if (reason) {\n      window.alert(reason);\n    }\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { getProperties, observer } from '@ember/object';\nimport $ from 'jquery';\n\n/**\n * Creates <img> with the given src. If img fails to load the img.src is changed to the altSrc.\n * Example:\n *    {{ss-img classNames=\"ssClassYouWant\"\n *             src=urlThatMayNotWork\n *             altSrc=knownWorkingImageUrl\n *             title=\"\"}}\n */\nexport default Component.extend({\n  tagName: 'img',\n  alt: '',\n  attributeBindings: ['alt', 'src', 'width', 'height', 'role'],\n\n  //region Ember Hooks\n  willInsertElement() {\n    this._super(...arguments);\n    this._setAttributes();\n  },\n  //endregion\n\n  //region Observers\n  setEmptySrc: observer('src', function () {\n    this._setAttributes();\n  }),\n  //endregion\n\n  //region Methods\n  _setAttributes() {\n    let alreadyAttempted = false;\n    const { src, altSrc, element, title, height } = getProperties(this, 'src', 'altSrc', 'element', 'title', 'height');\n    const $img = $(element);\n    $img.attr('src', src);\n    if (title) {\n      $img.attr('title', title);\n    }\n    if (height) {\n      $img.attr('height', height);\n    }\n    if (altSrc) {\n      //if there is a problem with the img.src it will be replaced with the altSrc\n      $img.on('error', function () {\n        const $this = $(this);\n        // count prevents infinite loop that is created if the altSrc also doesn't exist\n        if (!alreadyAttempted) {\n          $this.attr('src', altSrc);\n          $this.attr('title', 'Image no longer available from source.');\n          alreadyAttempted = true;\n        } else {\n          $this.attr('alt', 'No image available');\n          $this.attr('title', 'Image no longer available from source.');\n        }\n      });\n      if (!src) {\n        this.element.setAttribute('src', altSrc);\n        this.element.setAttribute('title', 'Image no longer available from source.');\n      }\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-on-calls-in-components, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components */\nimport Component from '@ember/component';\nimport { observer } from '@ember/object';\nimport { on } from '@ember/object/evented';\n\n/**\n * ss-radio component\n * @type {Ember.Component}\n */\nexport default Component.extend({\n  //region Ember Hooks\n  classNames: ['ssRadio', 'ssFieldOptionInput'],\n  tagName: 'input',\n  attributeBindings: ['type', 'checked:checked', 'disabled', 'tabindex', 'name', 'autofocus', 'form', 'value'],\n  //endregion\n\n  //region Properties\n  type: 'radio',\n  checked: false,\n  disabled: false,\n  //endregion\n\n  //region Events\n  onDomChange: on('click', function () {\n    this.set('selection', this.value);\n  }),\n  //endregion\n\n  //region Observers\n  onDataChange: on(\n    'init',\n    observer('selection', 'value', function () {\n      this.set('checked', this.selection === this.value);\n    })\n  ),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { deprecate } from '@ember/debug';\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\n\n/**\n * select component that sends a action when the value is changed\n */\nexport default Component.extend({\n  content: null,\n  selectedValue: null,\n  tagName: 'ss-select',\n  'two-way': true,\n  changed() {},\n  classNameBindings: ['hasErrors'],\n\n  //region Computed Properties\n  hasErrors: computed('errors.[]', 'attribute', function () {\n    const { errors } = this;\n    if (!errors) {\n      return false;\n    }\n    return errors.has(this.attribute);\n  }),\n  //endregion\n\n  init() {\n    this._super(...arguments);\n    const { content } = this;\n\n    if (!content) {\n      set(this, 'content', []);\n    }\n  },\n\n  actions: {\n    change() {\n      const selectedEl = this.element.querySelector('select');\n      const selectedIndex = selectedEl.selectedIndex - (this.prompt ? 1 : 0);\n      const { content } = this;\n      let selectedValue = content.objectAt(selectedIndex);\n      if (this.optionValuePath) {\n        selectedValue = get(selectedValue, this.optionValuePath);\n      }\n\n      if (get(this, 'two-way')) {\n        set(this, 'selectedValue', selectedValue);\n        deprecate('Please refrain from using {{ss-select}} without two-way=false in the future', false, {\n          id: 'ss-select-two-way',\n          until: 'Ember 4',\n          for: 'ss-select',\n          since: '0.0.0',\n        });\n      }\n      this.changed(selectedValue);\n\n      // clear away any errors from the select input\n      if (this.errors) {\n        this.errors.clear();\n      }\n    },\n  },\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals twttr */\nimport Component from '@ember/component';\nimport { computed, set } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nconst enc = x => window.encodeURIComponent(x);\n\nexport default Component.extend({\n  //region Properties\n  disableInteraction: false,\n  classNameBindings: [':ssTwitterTweet', 'isCustomButton'],\n  /**\n   * This should be the hashtag without the # sign\n   */\n  hashtag: '',\n  isCustomButton: computed('hashtag', () => {\n    const { userAgent } = navigator;\n    const goodBrowserRegex = /Chrome|Firefox|Safari/;\n    const mobileRegex = /Mobile|Android|iPad|iPod|iPhone/;\n    //the only way to NOT get a custom button is if you are using desktop chrome, safari, or firefox\n    return !(goodBrowserRegex.test(userAgent) && !mobileRegex.test(userAgent));\n  }),\n  /**\n   * This is the URL to twitter's tweet API\n   * @returns {string}\n   */\n  buttonUrl: computed('hashtag', 'referrerUrl', 'isCustomButton', function () {\n    let queryString = '';\n\n    const { isCustomButton } = this;\n    let url = 'https://twitter.com/intent/tweet?';\n\n    const { hashtag } = this;\n    if (hashtag) {\n      const rawHashtag = hashtag.replace('#', '');\n      queryString += isCustomButton ? `&text=${enc(`#${rawHashtag}`)}` : `&button_hashtag=${enc(rawHashtag)}`;\n    } else {\n      if (isCustomButton) {\n        queryString += '&text=%20';\n      } else {\n        url = 'https://twitter.com/share?';\n        queryString += '&text=%20';\n      }\n    }\n\n    const { referrerUrl } = this;\n    if (referrerUrl) {\n      queryString += `&url=${enc(referrerUrl)}`;\n    }\n\n    queryString = queryString.substring(1); // Every piece will have an ampersand, but the first one shouldn't.\n    if (!isEmpty(queryString)) {\n      url += queryString;\n    }\n\n    return url;\n  }),\n  /**\n   * This determines the appropriate css class with which to render the button\n   * @returns {string}\n   */\n  buttonCssClass: computed('hashtag', 'isCustomButton', function () {\n    return this.hashtag ? 'twitter-hashtag-button' : 'twitter-share-button';\n  }),\n  //endregion\n\n  //region Component Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    twttr.widgets.load();\n\n    //listens to twitter tweet events\n    //@see https://dev.twitter.com/docs/tfw/events\n    twttr.events.bind('tweet', this.tweetHandler.bind(this));\n  },\n  //endregion\n\n  //region Methods\n  tweetHandler(twitterEvent) {\n    if (twitterEvent.target && twitterEvent.target.parentNode === this.element) {\n      set(this, 'hasTweeted', true);\n    }\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    customClick() {\n      set(this, 'hasTweeted', true);\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-jquery, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default Component.extend({\n  //region Attributes\n  width: 300,\n  /**\n   * The URL for the video\n   */\n  src: null,\n  /**\n   * Thumbnail image URL to be displayed if the video is broken\n   */\n  altSrc: '/Images/video-removed-by-user.png',\n  /**\n   * The image URL representing the initial frame displayed for the video before clicking play\n   */\n  poster: null,\n  /**\n   * Pass in string \"autoplay\" in handlebars if you would like the video to auto-play on page load\n   */\n  autoPlay: '',\n  /**\n   * Set to true if there is a problem with the video\n   */\n  error: tracked({ value: false }),\n  //endregion\n\n  didInsertElement() {\n    this._super(...arguments);\n    // if there is a problem with the video.src, the poster image will be replaced with the alt-src image\n    this.element.querySelector('video source').onerror = () => {\n      this.error = true;\n    };\n  },\n});\n","/* eslint-disable @typescript-eslint/restrict-template-expressions */\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport type CheckoutService from 'consumer/services/checkout';\nimport PromotionProductModel from 'secondstreet-common/models/promotion-product';\nimport { tracked } from '@glimmer/tracking';\nimport { adjustColor } from 'consumer/utils/fix-color-contrast';\n\ninterface StripeFormSignature {\n  Element: HTMLDivElement;\n  Args: {\n    emailAddress: string;\n    entryId: number | string;\n    onPaymentComplete: () => void;\n    promotionProduct: PromotionProductModel;\n    packages: PromotionProductModel[];\n  };\n}\n\nexport default class StripeFormComponent extends Component<StripeFormSignature> {\n  @service declare checkout: CheckoutService;\n  promotionProducts = [\n    ...(this.args.promotionProduct ? [this.args.promotionProduct] : []),\n    ...(this.args.packages || []),\n  ].sort((a, b) => a.displayOrder - b.displayOrder);\n\n  @tracked selectedPromotionProduct = this.promotionProducts[0];\n\n  showPackages = this.promotionProducts.length > 1 || this.args.packages?.length > 0;\n\n  setup = async () => {\n    if (this.selectedPromotionProduct) {\n      await this.checkout.createStripeSession({\n        productId: `${this.selectedPromotionProduct?.productId}`,\n        emailAddress: this.args.emailAddress,\n        entryId: `${this.args.entryId}`,\n        promotionProductId: `${this.selectedPromotionProduct?.id}`,\n      });\n      await this.checkout.initializeCheckout(this.onComplete);\n    }\n  };\n\n  cleanup = () => {\n    this.checkout.destroyInstance();\n  };\n\n  onComplete = async () => {\n    await this.checkout.updateTransactionStatus();\n\n    this.args.onPaymentComplete();\n  };\n\n  normalizedTextColor(promotionProduct: PromotionProductModel) {\n    return adjustColor('#000000', promotionProduct?.color?.value || '#838FA0');\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{#if this.beforeContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"intro_before_start\\\" date=this.nextMatchupStartDate}} {{this.timeZone}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.duringContestMatchupOpen}}\\n  {{#if this.hasEntryLimitReachedForCurrentRound}}\\n    <div class=\\\"promotion-not-open\\\">\\n      {{if\\n        (gt @matchups.length 1)\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_round\\\")\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_promotion\\\")\\n      }}\\n    </div>\\n  {{else}}\\n    {{yield this.currentMatchup}}\\n  {{/if}}\\n{{/if}}\\n\\n{{#if this.duringContestMatchupClosed}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"sign_up_for_next_round_header\\\" date=this.nextMatchupStartDate}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.afterContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"promo_header_after_over\\\" PromotionTypeName=@promotionName}}\\n  </div>\\n{{/if}}\\n\", {\"contents\":\"{{#if this.beforeContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"intro_before_start\\\" date=this.nextMatchupStartDate}} {{this.timeZone}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.duringContestMatchupOpen}}\\n  {{#if this.hasEntryLimitReachedForCurrentRound}}\\n    <div class=\\\"promotion-not-open\\\">\\n      {{if\\n        (gt @matchups.length 1)\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_round\\\")\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_promotion\\\")\\n      }}\\n    </div>\\n  {{else}}\\n    {{yield this.currentMatchup}}\\n  {{/if}}\\n{{/if}}\\n\\n{{#if this.duringContestMatchupClosed}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"sign_up_for_next_round_header\\\" date=this.nextMatchupStartDate}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.afterContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"promo_header_after_over\\\" PromotionTypeName=@promotionName}}\\n  </div>\\n{{/if}}\\n\",\"moduleName\":\"consumer-sweepstakes/components/sweepstakes-matchup.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/sweepstakes-matchup.hbs\"}});\nimport Component from '@glimmer/component';\nimport moment from 'moment';\nimport getTimeZone from 'consumer/utils/timezone-name';\nimport { firstObject } from 'secondstreet-common/utils/array';\nimport { isEmpty } from '@ember/utils';\n\nexport default class SweepstakesMatchup extends Component {\n  //region Computed Properties\n  get previousMatchup() {\n    const now = new Date();\n\n    return this.args.matchups\n      .map(matchup => {\n        const { endDate } = matchup;\n        return endDate && endDate < now ? matchup : null;\n      })\n      .filter(matchup => !isEmpty(matchup))\n      .reduce((bestChoice, matchup) => {\n        if (!bestChoice) {\n          return matchup;\n        }\n\n        // Best choice is the one whose end date is closest to now, because it ended most recently.\n        return now - bestChoice.endDate < now - matchup.endDate ? bestChoice : matchup;\n      }, null);\n  }\n\n  get currentMatchup() {\n    const now = new Date();\n\n    const relevantMatchups = this.args.matchups.map(matchup => {\n      const { startDate } = matchup;\n      const { endDate } = matchup;\n      return !endDate || (startDate < now && endDate > now) ? matchup : null;\n      // Best choice is whatever, because there should always be eithor 0 or 1 possible current round.\n    });\n\n    return firstObject(relevantMatchups.filter(matchup => !isEmpty(matchup))) || null;\n  }\n\n  get nextMatchup() {\n    const now = new Date();\n\n    return this.args.matchups\n      .map(matchup => {\n        const startDate = matchup.endDate;\n        return startDate > now ? matchup : null;\n      })\n      .filter(matchup => !isEmpty(matchup))\n      .reduce((bestChoice, matchup) => {\n        if (!bestChoice) {\n          return matchup;\n        }\n\n        // Best choice is the one whose start date is closest to now, because it starts the soonest.\n        return now - bestChoice.startDate > now - matchup.startDate ? bestChoice : matchup;\n      }, null);\n  }\n  /**\n   * Is the contest not yet open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get beforeContest() {\n    return !this.previousMatchup && !this.currentMatchup;\n  }\n\n  get hasEntryLimitReachedForCurrentRound() {\n    return this.args.matchupSummary?.entryLimitReached;\n  }\n  /**\n   * Is the contest open, and a matchup is open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get duringContestMatchupOpen() {\n    return !!this.currentMatchup;\n  }\n  /**\n   * Is the contest open, but no matchup is open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get duringContestMatchupClosed() {\n    return this.previousMatchup && !this.currentMatchup && this.nextMatchup;\n  }\n  /**\n   * Is the contest over?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get afterContest() {\n    return !this.currentMatchup && !this.nextMatchup;\n  }\n  /**\n   * Pretty start date for the next round, or false if no next round\n   * @returns {String|Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get nextMatchupStartDate() {\n    return this.nextMatchup ? moment(this.nextMatchup.startDate).format('L [@] h:mm A') : false;\n  }\n  /**\n   * The timezone of the user\n   * @return {String}\n   * @type {Ember.ComputedProperty}\n   */\n  get timeZone() {\n    return getTimeZone();\n  }\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals twttr */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  classNames: ['ssTwitterFollowButton'],\n  /**\n   * The Twitter handle to follow\n   */\n  handle: '',\n  //endregion\n\n  //region Component Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    twttr.widgets.load();\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Attributes\n  classNames: ['material-spinner'],\n  /**\n   * Size in pixels\n   * @type {Number}\n   */\n  size: 15,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\n\n/**\n * Intended to be used in tandem with {@link IndividualEntryView}\n * to wrap up common vote button state logic\n * @class {Ember.Component} VoteButton\n */\nexport default Component.extend({\n  //region Ember Hooks\n  init() {\n    this._super(...arguments);\n\n    set(this, 'vote-state', this['vote-state'] || {});\n  },\n\n  tagName: '',\n  //endregion\n\n  //region Attributes\n  /**\n   * @property {VoteState}\n   */\n  'vote-state': null,\n  /**\n   * @property {Boolean}\n   */\n  'is-loading': false,\n  /**\n   * @property {Boolean}\n   */\n  'flat-change-vote-button': false,\n  /**\n   * @property {Boolean}\n   */\n  'show-icon': true,\n  /**\n   * @property {!MatchupEntry}\n   */\n  'matchup-entry': null,\n  /**\n   * @type {Function}\n   */\n  'begin-adding-write-in': x => x,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\nimport $ from 'jquery';\n\nexport default Component.extend({\n  willInsertElement() {\n    this._super(...arguments);\n    // https://github.com/yapplabs/ember-wormhole/pull/52\n    const $destination = $(`#${this.to}`);\n    if ($destination.length > 0) {\n      $destination.empty();\n      set(this, 'hasDestination', true);\n    }\n  },\n  hasDestination: false,\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\n\nconst ON = 1;\nconst OFF = 0;\n\nexport default Component.extend({\n  //region Attributes\n  'video-id': null,\n  'auto-play': false,\n  /**\n   * Due to a change in YouTube's API, disabling this will only prevent user from being recommended related\n   * videos from other channels. The user will still see related videos from the same channel this video belongs to.\n   */\n  'show-related-videos': true,\n  'disable-seeking': false,\n  'video-ended'() {},\n  //endregion\n\n  //region Properties\n  youtubeVideo: null,\n  internalVideoTimer: null,\n  timerCount: 0,\n  highestTimerCount: 0,\n  //endregion\n\n  //region Computed Properties\n  playerVars: computed('auto-play', 'show-related-videos', 'disable-seeking', function () {\n    return {\n      autoplay: get(this, 'auto-play') ? ON : OFF,\n      playsinline: get(this, 'disable-seeking') ? ON : OFF,\n      rel: get(this, 'show-related-videos') ? ON : OFF,\n    };\n  }),\n  //endregion\n\n  //region Actions\n  actions: {\n    videoPaused() {\n      if (this['disable-seeking'] && this.internalVideoTimer) {\n        clearInterval(this.internalVideoTimer);\n        set(this, 'internalVideoTimer', null);\n      }\n    },\n    videoPlaying() {\n      if (!this['disable-seeking']) {\n        return;\n      }\n\n      const { player } = this.youtubeVideo;\n\n      if (!this.internalVideoTimer) {\n        set(\n          this,\n          'internalVideoTimer',\n          setInterval(() => {\n            const oldTime = this.timerCount;\n            const newTime = player.getCurrentTime();\n            if (newTime - oldTime > 1.5 && newTime > this.highestTimerCount) {\n              player.seekTo(oldTime);\n            } else {\n              set(this, 'timerCount', player.getCurrentTime());\n              if (this.timerCount > this.highestTimerCount) {\n                set(this, 'highestTimerCount', this.timerCount);\n              }\n\n              // 1 second margin of error accounting for browser differences in calculating video details\n              if (Math.abs(player.getDuration() - player.getCurrentTime()) <= 1) {\n                if (this.internalVideoTimer) {\n                  clearInterval(this.internalVideoTimer);\n                  set(this, 'internalVideoTimer', null);\n                }\n                get(this, 'video-ended')();\n              }\n            }\n          }, 500)\n        );\n      }\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-mixins */\nimport Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport ReferralShareList from 'consumer-sweepstakes/mixins/referral-share-list';\nimport localFullUrl from 'consumer-sweepstakes/utils/local-full-url';\nimport talker from 'consumer-sweepstakes/utils/talker';\n\nexport default class ApplicationController extends Controller.extend(ReferralShareList) {\n  @service('router') router;\n  @service('store') store;\n\n  constructor() {\n    super(...arguments);\n\n    this.router.on('routeDidChange', () => {\n      this.updateReferringUrlHeader();\n    });\n  }\n\n  updateReferringUrlHeader() {\n    if (!this.router.currentRouteName) return;\n\n    let routePath = this.router.currentRouteName.replace('.', '/').replace('index', '/');\n\n    if (routePath === '/') {\n      routePath = '';\n    }\n\n    talker\n      .send('fullUrl')\n      .then(\n        message => message.data.url,\n        () => localFullUrl()\n      )\n      .then(url => {\n        this.store.adapterFor('application').addHeaders({\n          'X-Referring-Url': `${url}${routePath}`,\n        });\n      });\n  }\n}\n","/* eslint-disable @typescript-eslint/restrict-template-expressions */\nimport Controller from '@ember/controller';\nimport { tracked } from '@glimmer/tracking';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Controller {\n  @service declare session: any;\n\n  queryParams = ['reenter'];\n\n  @tracked reenter = false;\n\n  get referrerUrl() {\n    const guid = this.session?.referrerUserGuid;\n    const { rootUrl } = this.session;\n    return guid ? `${rootUrl}referrals/${guid}` : rootUrl;\n  }\n}\n","/* eslint-disable ember/no-classic-classes, ember/no-actions-hash */\nimport Controller, { inject as controller } from '@ember/controller';\nimport { computed, get, set } from '@ember/object';\nimport { alias, not } from '@ember/object/computed';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isPresent } from '@ember/utils';\nimport specialEncode from 'consumer/utils/special-encode';\n\nexport default Controller.extend({\n  //region Dependencies\n  application: controller(),\n  loginRequest: service(),\n  router: service(),\n  //endregion\n\n  // region properties\n  emailFieldValue: '',\n  submitted: false,\n  errorMessages: null,\n  // endregion\n\n  // region computed properties\n  redirectPath: computed('model.referrer{Url,Route}', function () {\n    // if the user was not coming from another route\n    // model.referrerUrl will return the current route\n    return this.model.referrerRoute ? this.model.referrerUrl : '/';\n  }),\n  emailFieldIsEmpty: not('emailFieldValue.length'),\n  organizationPromotionName: alias('application.model.organizationPromotion.name'),\n  // endregion\n\n  init() {\n    this._super(...arguments);\n\n    set(this, 'errorMessages', this.errorMessages || []);\n  },\n\n  // region Methods\n  /**\n   * This returns a url without a query string param beginning with a particular prefix\n   **/\n  removeUtmQueryParams(url) {\n    return url.replace(/&?utm_[^=]*?=([^&]$|[^&]*)/gi, '');\n  },\n  // endregion\n\n  // region actions\n  actions: {\n    async loginUser(email, redirectTo) {\n      const sanitizedRedirectPath = specialEncode.encode(this.removeUtmQueryParams(redirectTo));\n      const redirectPath = encodeURIComponent(sanitizedRedirectPath);\n      try {\n        const { loginRequest } = this;\n        const emailSubmittedCallback = () => run(() => this.toggleProperty('submitted'));\n        const loginRequestWork = loginRequest.requestLoginEmail(redirectPath, email, { emailSubmittedCallback });\n        const sessions = await loginRequestWork;\n        if (isPresent(sessions)) {\n          const session = get(sessions, 'firstObject');\n          this.router.transitionTo('login.token', get(session, 'accessToken'), redirectPath);\n        }\n      } catch (exception) {\n        const { errorMessages } = this;\n        errorMessages.clear();\n        run(() => errorMessages.addObjects(exception.errors || [exception.message]));\n      }\n    },\n  },\n  // endregion\n});\n","/* eslint-disable ember/no-mixins, ember/no-computed-properties-in-native-classes */\nimport Controller, { inject as controller } from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { action } from '@ember/object';\nimport { alias, readOnly } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { tracked } from '@glimmer/tracking';\nimport { task, timeout } from 'ember-concurrency';\nimport ReferralShareList from 'consumer-sweepstakes/mixins/referral-share-list';\nimport config from 'consumer-sweepstakes/utils/config';\nimport socialSettingUtils from 'consumer-sweepstakes/utils/social-setting-utils';\nimport { getOwner } from '@ember/application';\nimport duration from 'secondstreet-common/utils/duration';\nimport { firstObject } from 'secondstreet-common/utils/array';\n\nconst FIELD_TYPE_IDS_WITHOUT_VALUES = [\n  8, // DisplayText\n  19, // FacebookLike\n  20, // TwitterFollow\n  39, // InstagramLink\n  40, // FacebookLink\n  42, // XLink\n  43, // TikTokLink\n  44, // YouTubeLink\n];\n\nexport default class ThanksController extends Controller.extend(ReferralShareList) {\n  @service('router') router;\n  @service('session') session;\n  @service('store') store;\n  @controller('application') application;\n\n  @tracked isReenterFormVisible = false;\n  @tracked reenteredSuccessfully = false;\n\n  /**\n   * Share Link\n   * The URL for this OrganizationPromotion, including the referral\n   * Set in ThanksRoute#setupController until DataBoundPromises are a thing\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  shareLink = '';\n\n  @alias('model.extraChancesForm')\n  extraChancesForm;\n\n  @readOnly('application.model.organizationPromotion')\n  organizationPromotion;\n\n  @readOnly('shareLink')\n  shareUrl;\n\n  /**\n   * This overrides the pinterestEnabled in ReferralShareList, because pinterest was previously disabled in sweeps.\n   * @type {bool}\n   */\n  get pinterestEnabled() {\n    return socialSettingUtils.isSocialSettingEnabledNew('ss-rehydrate-pinterest-enabled', false);\n  }\n\n  get thanksMessageDisabled() {\n    return socialSettingUtils.isSocialSettingDisabledNew('ss-rehydrate-thankYouMessage-enabled');\n  }\n\n  get thanksMessage() {\n    return socialSettingUtils.getSocialSettingNew('thanks_sub_messaging', 'ss-rehydrate-thankYouMessage-value');\n  }\n\n  /**\n   * Checks if the reenter form can be submitted automatically\n   * @type {bool}\n   */\n  get canSubmitFormAutomatically() {\n    const ignoredFieldTypeIds = [\n      ...FIELD_TYPE_IDS_WITHOUT_VALUES,\n      23, // EmailTextbox\n    ];\n\n    return (\n      this.model.reenter.form.formPages.length == 1 &&\n      firstObject(this.model.reenter.form.formPages)?.pageNumber == 1 &&\n      this.model.reenter.form.formPages\n        .map(formPage => formPage.formFields.toArray())\n        .flat()\n        .filter(formField => !ignoredFieldTypeIds.includes(formField.fieldTypeId)).length == 0\n    );\n  }\n\n  @computed('thanksMessage')\n  get thanksMessageSafe() {\n    return htmlSafe(this.thanksMessage);\n  }\n\n  get facebookApiKey() {\n    return config().facebookApiKey;\n  }\n\n  @computed('thanksMessage', 'thanksMessageDisabled')\n  get showThanksMessage() {\n    return this.thanksMessage && !this.thanksMessageDisabled;\n  }\n\n  get extraChancesFirstObject() {\n    return firstObject(this.extraChancesForm?.formPages);\n  }\n\n  /**\n   * If all that is rendered in the extra chances component is the thanks, combine the custom thanks message with it\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  @computed('showReferrals', 'showThanksMessage', 'extraChancesFirstObject.formFields.length')\n  get combineThanksWithExtraChances() {\n    return !this.showReferrals && this.showThanksMessage && !this.extraChancesFirstObject?.formFields.length;\n  }\n\n  get reenter() {\n    if (!this.model.reenter.meta.entryEligibilityMetaData || !this.model.reenter.form) return {};\n\n    const [{ entry_eligibility_date, entry_matchup_id, matchup_id }] = this.model.reenter.meta.entryEligibilityMetaData;\n    const date = entry_eligibility_date ? new Date(entry_eligibility_date) : 0;\n\n    return {\n      date,\n      // entry_matchup_id is null when this is the last round\n      isNextRound: entry_matchup_id && entry_matchup_id != matchup_id,\n    };\n  }\n\n  reenterTask = task({ drop: true }, async () => {\n    this.#setEmailFieldValue(this.model.reenter.form, this.session.username);\n\n    if (!this.canSubmitFormAutomatically) {\n      return this.router.transitionTo('index', { queryParams: { reenter: true } });\n    }\n\n    const formPage = firstObject(this.model.reenter.form.formPages);\n    const formPageSubmission = this.store.createRecord('form-page-submission', {\n      form: this.model.reenter.form,\n      formPageId: formPage.id,\n      fields: formPage.formFields,\n      matchup: this.model.matchup,\n    });\n\n    try {\n      await formPageSubmission.save();\n      await getOwner(this).lookup('route:thanks').refresh().promise;\n\n      this.reenteredSuccessfully.perform();\n    } catch (e) {\n      console.error(e);\n    }\n  });\n\n  reenteredSuccessfully = task({ restartable: true }, async () => {\n    await timeout(duration(5000));\n  });\n\n  @action\n  logoutAction() {\n    // Unload all the form fields as they contain the user's input\n    this.store.unloadAll('form-field');\n\n    this.send('logout', true);\n  }\n\n  #setEmailFieldValue(form, email) {\n    form.formPages.forEach(formPage =>\n      formPage.formFields.forEach(formField => {\n        if (formField.fieldTypeId === 23) {\n          formField.value = email;\n        }\n      })\n    );\n  }\n}\n","import { helper } from '@ember/component/helper';\nimport config from '../config/environment';\nimport {\n  shaRegExp,\n  versionRegExp,\n  versionExtendedRegExp,\n} from 'ember-cli-app-version/utils/regexp';\n\nexport function appVersion(_, hash = {}) {\n  const version = config.APP.version;\n  // e.g. 1.0.0-alpha.1+4jds75hf\n\n  // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility\n  let versionOnly = hash.versionOnly || hash.hideSha;\n  let shaOnly = hash.shaOnly || hash.hideVersion;\n\n  let match = null;\n\n  if (versionOnly) {\n    if (hash.showExtended) {\n      match = version.match(versionExtendedRegExp); // 1.0.0-alpha.1\n    }\n    // Fallback to just version\n    if (!match) {\n      match = version.match(versionRegExp); // 1.0.0\n    }\n  }\n\n  if (shaOnly) {\n    match = version.match(shaRegExp); // 4jds75hf\n  }\n\n  return match ? match[0] : version;\n}\n\nexport default helper(appVersion);\n","import { helper } from '@ember/component/helper';\n\nexport function compare([first, operator, second]) {\n  switch (operator) {\n    case '===':\n      return first === second;\n    case '!==':\n      return first !== second;\n    case '>':\n      return first > second;\n    case '>=':\n      return first >= second;\n    case '<':\n      return first < second;\n    case '<=':\n      return first <= second;\n    case '&&':\n      return first && second;\n    case '||':\n      return first || second;\n  }\n}\n\nexport default helper(compare);\n","import { helper } from '@ember/component/helper';\nimport { get } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\n\n/**\n * Echos a property from an object\n * The first argument is the object instance to read\n * The second argument is the name of the property to read on the object\n * The optional third argument is a boolean. If true, renders any HTML in the property unsafely.\n *\n * Examples:\n *      {{get-property this propName safeString}}\n */\nexport function getProperty([obj, propName, safeString]) {\n  const string = obj && propName ? get(obj, propName) : '';\n  return safeString ? new htmlSafe(string) : string;\n}\n\nexport default helper(getProperty);\n","/* eslint-disable ember/no-classic-classes */\nimport Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\n\n/**\n *\n * Examples:\n *   {{i18n-t \"social_boost_per_friend_heading\" count=extraChancesCount safeString=false}}\n *\n * @see http://emberjs.com/api/classes/Ember.Handlebars.html#toc_example-with-bound-options\n */\nexport default Helper.extend({\n  //region Dependencies\n  i18n: service(),\n  //endregion\n\n  compute([value], { safeString, ...options }) {\n    let string = '';\n\n    if (this.i18n.exists(value)) {\n      string = this.i18n.t(value, options);\n    }\n\n    return safeString ? htmlSafe(string) : string;\n  },\n});\n","import { helper } from '@ember/component/helper';\n\n/**\n * Do math! Supports addition, subtraction, division, multiplication, and exponents.\n * If you try to divide by zero, it'll just return zero.\n * @param {Number} first\n * @param {String} operator\n * @param {Number} second\n * @returns {Number}\n */\nexport function math([first, operator, second]) {\n  switch (operator) {\n    case '+':\n      return first + second;\n    case '-':\n      return first - second;\n    case '/':\n      return second === 0 ? 0 : first / second;\n    case '*':\n      return first * second;\n    case '**':\n      return first ** second; //jshint ignore:line\n  }\n}\n\nexport default helper(math);\n","import pageTitle from 'ember-page-title/helpers/page-title';\n\nexport default pageTitle;\n","import pluralize from 'ember-inflector/lib/helpers/pluralize';\nexport default pluralize;\n","import singularize from 'ember-inflector/lib/helpers/singularize';\nexport default singularize;\n","import initializerFactory from 'ember-cli-app-version/initializer-factory';\nimport config from '../config/environment';\n\nlet name, version;\nif (config.APP) {\n  name = config.APP.name;\n  version = config.APP.version;\n}\n\nexport default {\n  name: 'App Version',\n  initialize: initializerFactory(name, version),\n};\n","import ContainerDebugAdapter from 'ember-resolver/resolvers/classic/container-debug-adapter';\n\nexport default {\n  name: 'container-debug-adapter',\n\n  initialize() {\n    let app = arguments[1] || arguments[0];\n\n    app.register('container-debug-adapter:main', ContainerDebugAdapter);\n  }\n};\n","\n        export default {\n          name: 'ember-cli-mirage',\n          initialize() {}\n        };\n      ","import 'ember-data';\n\nimport setupContainer from 'ember-data/setup-container';\n\n/*\n  This code initializes EmberData in an Ember application.\n*/\nexport default {\n  name: 'ember-data',\n  initialize: setupContainer,\n};\n","import Ember from 'ember';\nimport config from '../config/environment';\n\nexport function initialize() {\n  var application = arguments[1] || arguments[0];\n  if (config.exportApplicationGlobal !== false) {\n    var theGlobal;\n    if (typeof window !== 'undefined') {\n        theGlobal = window;\n    } else if (typeof global !== 'undefined') {\n        theGlobal = global\n    } else if (typeof self !== 'undefined') {\n        theGlobal = self;\n    } else {\n       // no reasonable global, just bail\n       return;\n    }\n\n    var value = config.exportApplicationGlobal;\n    var globalName;\n\n    if (typeof value === 'string') {\n      globalName = value;\n    } else {\n      globalName = Ember.String.classify(config.modulePrefix);\n    }\n\n    if (!theGlobal[globalName]) {\n      theGlobal[globalName] = application;\n\n      application.reopen({\n        willDestroy: function() {\n          this._super.apply(this, arguments);\n          delete theGlobal[globalName];\n        }\n      });\n    }\n  }\n}\n\nexport default {\n  name: 'export-application-global',\n\n  initialize: initialize\n};\n","/* eslint-disable ember/no-jquery */\nimport { camelize } from '@ember/string';\nimport $ from 'jquery';\nimport { Promise as EmberPromise } from 'rsvp';\n\nimport ENV from '../config/environment';\nimport isLocalhost from 'secondstreet-common/utils/is-localhost';\nimport talker from '../utils/talker';\nimport { Arc } from '@ss/arc';\nimport isValidJSON from 'secondstreet-common/utils/is-valid-json';\nimport insertFontsToDom from 'secondstreet-common/utils/insert-fonts-to-dom';\n\nfunction getCustomContent(arc) {\n  let str = '';\n  const { socialElement, promotionElement } = arc;\n\n  if (socialElement) {\n    str = `${str}\n          <div id=\"ss-rehydrate-social-enabled\" data-enabled=\"true\" ></div>\n          <div id=\"ss-rehydrate-pinterest-enabled\" ></div>\n        ${\n          socialElement.data.facebook\n            ? `<div id=\"ss-rehydrate-facebook-enabled\" data-enabled=\"true\" ></div>`\n            : `<div id=\"ss-rehydrate-facebook-enabled\" ></div>`\n        }\n\n         ${\n           socialElement.data.x\n             ? `<div id=\"ss-rehydrate-twitter-enabled\" data-enabled=\"true\" ></div>\n                <div id=\"ss-rehydrate-twitter-value\" >${socialElement.data.xDescription || ''}</div>`\n             : `<div id=\"ss-rehydrate-twitter-enabled\" ></div>`\n         }\n\n         ${\n           socialElement.data.email\n             ? `<div id=\"ss-rehydrate-email-enabled\" data-enabled=\"true\" ></div>\n                <div id=\"ss-rehydrate-email-title\" >${socialElement.data.emailSubject || ''}</div>\n                <div id=\"ss-rehydrate-email-value\" >${socialElement.data.emailDescription || ''}</div>   \n             `\n             : `<div id=\"ss-rehydrate-email-enabled\" ></div>`\n         }\n      `;\n  }\n\n  if (promotionElement && promotionElement.data?.metadata) {\n    const { thanksMessage } = promotionElement.data.metadata;\n    if (thanksMessage) {\n      str = `${str}\n        <div id=\"ss-rehydrate-thankYouMessage-value\">${thanksMessage}</div>\n      `;\n    }\n  }\n\n  return str;\n}\n\nfunction findCssVariableValue(html, variableName) {\n  if (!html || typeof html !== 'string') return '';\n  const varMatch = new RegExp(`${variableName}\\\\s*:\\\\s*([^;]+);`).exec(html);\n  const value = varMatch?.[1]?.trim() || '';\n  return value && value !== 'undefined' ? value : '';\n}\n\nfunction findTemplatePrimaryBackgroundColor(html) {\n  if (!html || typeof html !== 'string') return '';\n\n  const rulePattern = /\\.template-color-primary-background-color(?![\\w-])[^{]*\\{[^}]*background-color\\s*:\\s*([^;}]+)/gi;\n  let lastConcreteColor = '';\n  let match;\n\n  while ((match = rulePattern.exec(html))) {\n    const value = match[1].trim();\n    if (value && value !== 'undefined' && !/^var\\(/i.test(value)) {\n      lastConcreteColor = value;\n    }\n  }\n\n  return lastConcreteColor;\n}\n\nfunction resolvePrimaryColor(arc, theme, designContentHtml) {\n  return (\n    arc?.promotionElement?.data?.color ||\n    findTemplatePrimaryBackgroundColor(designContentHtml) ||\n    theme?.color_element ||\n    theme?.colorElement ||\n    findCssVariableValue(designContentHtml, '--mdc-theme-primary')\n  );\n}\n\nfunction getCustomStyles(arc, theme, designContentHtml) {\n  let str = '';\n\n  const { promotionElement } = arc;\n  const primaryColor = resolvePrimaryColor(arc, theme, designContentHtml);\n\n  if (primaryColor || theme) {\n    str = `#ssFrontApp.ssApplicationContainer {\n            ${primaryColor ? `--mdc-theme-primary: ${primaryColor}; --colors-primary: ${primaryColor};` : ''}\n            ${\n              theme\n                ? `--arc-ss-color-primary: ${theme.color_element || theme.colorElement};\n              --arc-ss-color-background: ${theme.color_background || theme.colorBackground};\n              --arc-ss-color-text: ${theme.color_text || theme.colorText};\n              --arc-ss-color-button: ${theme.color_button || theme.colorButton};\n              --arc-ss-font-heading: ${theme.font_heading || theme.fontHeading};\n              --arc-ss-font-paragraph: ${theme.font_paragraph || theme.fontParagraph};`\n                : ''\n            }\n  }\n            `;\n  }\n\n  str = `${str} #ssFrontApp.ssApplicationContainer .template-color-primary-color { color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-color-contrast { color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-fill { fill: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-fill-contrast { fill: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-background-color { background-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-background-color-contrast { background-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-color { border-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-color-contrast { border-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-top-color { border-top-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-top-color-contrast { border-top-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-right-color { border-right-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-right-color-contrast { border-right-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-bottom-color { border-bottom-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-bottom-color-contrast { border-bottom-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-left-color { border-left-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-left-color-contrast { border-left-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-stroke { stroke: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-stroke-contrast { stroke: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-outline-color { outline-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-outline-color-contrast { outline-color: ; }\n          `;\n\n  if (promotionElement) {\n    str = `${str} \n        #ssFrontApp.ssApplicationContainer .template-color-system-text { color: ${\n          promotionElement.styles?.font?.foregroundColor || '#000000'\n        } ; }\n        #ssFrontApp.ssApplicationContainer { --mdc-color-system-text: ${\n          promotionElement.styles?.font?.foregroundColor || '#000000'\n        };  }\n\n        .ssLabelText,.ssFormFieldText,.ssFieldOptionLabel,.ssRequiredLabel,.ssFieldOptionList,.ssCheckboxLabel,.ssStartFormOver,.help-text {color: var(--mdc-color-system-text, black) !important;}\n      `;\n  }\n\n  return str;\n}\n\n/**\n * @param {Object} config\n * @returns {String}\n */\nfunction promotionContentsUrl(config) {\n  const params = (() => {\n    const matchEmbedUrl = window.location.pathname.match(/(\\/embed\\/([A-Za-z0-9-]+)\\/)/i);\n    if (matchEmbedUrl) {\n      return { value: matchEmbedUrl[2], type: 'organizationPromotionUniqueId' };\n    }\n    if (config.organizationPromotionUniqueId) {\n      return { value: config.organizationPromotionUniqueId, type: 'organizationPromotionUniqueId' };\n    }\n    if (isLocalhost()) {\n      return {\n        value: window.location.href.split('/').slice(0, 4).join('/'),\n        type: 'promotionUrl',\n      };\n    }\n    throw new Error('Could not determine which promotion to use.');\n  })();\n\n  return `${config.apiHost || '/'}${config.apiNamespace || ''}/promotion_contents?${params.type}=${params.value}`;\n}\n\n/**\n * WARNING - Destructive! This method will modify the `contents` param and delete its `design_content` and/or `master_page_template_content` property.\n * @param {Object} contents\n * @returns {String}\n */\nfunction designContent(contents) {\n  const html = (() => {\n    if (!!contents['design_content'] && contents['design_content'].length) {\n      return contents['design_content'];\n    }\n\n    return `\n<div id=\"ssFrontApp\" class=\"ssApplicationContainer ssApplicationContainerDefault font-body\">\n  <div class=\"ssAffContentArea ssAffContentAreaMiddle\">\n    <div class=\"ssAppContentArea\">\n      ${contents['master_page_template_content']}\n    </div>\n  </div>\n</div>\n`;\n  })();\n\n  delete contents['design_content'];\n  delete contents['master_page_template_content'];\n\n  return html;\n}\n\nfunction insertCustomFontLinks(strValues = []) {\n  if (!strValues.length) {\n    return;\n  }\n  insertFontsToDom(strValues);\n}\n\nfunction isModalFormShell() {\n  return /\\/promo-form\\/?$/.test(window.location.pathname);\n}\n\nfunction showPromotionLoading(message = 'Your promotion is loading...') {\n  $('#second-street-app-container').html(`\n      <div\n          class=\"loading-container\"\n          style=\"display: flex;justify-content: center;align-items: center;width: 100vw;gap: 16px;padding: 20px;\"\n        >\n          <div\n            class=\"loading-spinner\"\n            style=\"flex-shrink: 0; display: inline-block;width: 50px;height: 50px;border: 3px solid #ccc;border-top-color: #333;border-radius: 50%;animation: spin 1s linear infinite;\"\n          >\n          </div>\n          <div class=\"loading-text\" style=\"font-family: sans-serif; font-size: 24px;font-weight: bold;color: #333;\">\n            ${message}\n          </div>\n        </div>\n    `);\n}\n\nexport function initialize(application) {\n  const { config } = ENV.APP;\n  if (ENV.environment === 'test') {\n    return;\n  }\n\n  application.deferReadiness();\n\n  if (!isModalFormShell()) {\n    try {\n      talker.send('resize', { height: 100 });\n    } catch (e) {\n      console.warn('Could not send talker resize', e);\n    }\n  }\n\n  let promotionContentsRequestUrl;\n  try {\n    promotionContentsRequestUrl = promotionContentsUrl(config);\n  } catch (error) {\n    console.error('Could not GET /promotion_contents', error);\n    showPromotionLoading('Unable to load this promotion.');\n    return;\n  }\n\n  let hasSettled = false;\n  if (!isModalFormShell()) {\n    // Wait until this script finishes executing before replacing the container.\n    // iOS Safari can abort boot if we remove the running script tag first.\n    setTimeout(() => {\n      if (!hasSettled) {\n        showPromotionLoading();\n      }\n    }, 0);\n  }\n\n  return EmberPromise.resolve(\n    $.ajax({\n      url: promotionContentsRequestUrl,\n      crossDomain: !!config.apiHost,\n      timeout: 20000,\n      headers: {\n        'X-Api-Key': config.apiKey,\n      },\n    })\n  ).then(\n    response => {\n      hasSettled = true;\n      const [contents] = response['promotion_contents'];\n\n      insertCustomFontLinks(contents?.font_links);\n\n      const rawDesignContent = contents['design_content'];\n      const json = isValidJSON(rawDesignContent);\n\n      if (isModalFormShell()) {\n        $('#second-street-app-container').html(`\n          <style>${getCustomStyles(json ? new Arc(json) : {}, contents.theme, rawDesignContent)}</style>\n          <div id=\"ssFrontApp\" class=\"ssApplicationContainer ssApplicationContainerDefault font-body\">\n            <div class=\"ssAffContentArea ssAffContentAreaMiddle\">\n              <div class=\"ssAppContentArea\">\n                <div class=\"ssAppContentAreaContent\"></div>\n              </div>\n            </div>\n          </div>\n        `);\n\n        delete contents['design_content'];\n        delete contents['master_page_template_content'];\n      } else {\n        let html = '';\n\n        if (json) {\n          const arc = new Arc(json);\n          html = arc.srcDoc;\n          html = html.replace('{{custom-styles}}', getCustomStyles(arc, contents.theme, rawDesignContent));\n          html = html.replace('{{custom-content}}', getCustomContent(arc));\n        } else {\n          html = designContent(contents);\n        }\n\n        $('#second-street-app-container').html(html);\n        $(ENV.APP.rootElement).empty();\n      }\n\n      // Modify the object imported from `config/environment` so other files can get at the data\n      Object.keys(contents).forEach(key => (config[camelize(key)] = contents[key]));\n      // needed to only load stripe.js when a payment form is present. Also allows for dynamic connected account ids.\n      if (contents.stripe_publishable_key && ENV.stripe) {\n        ENV.stripe.publishableKey = contents.stripe_publishable_key;\n        ENV.stripe.lazyLoad = true;\n      }\n\n      application.advanceReadiness();\n    },\n    error => {\n      hasSettled = true;\n      console.error('Could not GET /promotion_contents', error);\n      showPromotionLoading('Unable to load this promotion.');\n      throw error;\n    }\n  );\n}\n\nexport default {\n  name: 'promotion-contents',\n  initialize,\n};\n","/* exists only for things that historically used \"after\" or \"before\" */\nexport default {\n  name: 'ember-data',\n  initialize() {},\n};\n","/* globals FB */\nimport ENV from '../config/environment';\n\nexport function initialize(/* appInstance */) {\n  try {\n    // Firefox seems to die here without try/catch when FB is undefined\n    if (FB) {\n      FB.init({\n        appId: ENV.APP.config.facebookApiKey,\n        status: true,\n        cookie: true,\n        xfbml: true,\n        version: 'v2.3',\n      });\n\n      if (FB.Canvas) {\n        FB.Canvas.setAutoGrow();\n      }\n    }\n  } catch (e) {\n    // No need to do anything here\n  }\n}\n\nexport default {\n  name: 'facebook',\n  initialize,\n};\n","/* eslint-disable ember/use-ember-get-and-set */ // FIXME\n// We chose grow here instead of the alternatives, because some browsers gave some choices too little height.\n// It's better to sometimes have a little extra height than to sometimes have not enough and be cut off.\nimport { bodyScroll } from '../utils/height';\nimport { loadableChildren, loadingWorkaround } from 'secondstreet-common/utils/loaded-elements';\nimport talker from '../utils/talker';\n\nexport default {\n  name: 'iframe',\n\n  initialize(application) {\n    // Remove overflow: hidden if not in iframe\n    const isInIframe = window.self !== window.parent;\n    if (!isInIframe) {\n      const [htmlEl] = document.getElementsByTagName('html');\n      if (htmlEl.style.overflow === 'hidden') {\n        htmlEl.style.removeProperty('overflow');\n      }\n    }\n\n    /**\n     * ResizeObserver has a lower support than MutationObserver,\n     * hence we use MutationObserver to track resize events.\n     * At the point of writing this MutationObserver is supported\n     * by 98% of the used browsers, while ResizeObserver is supported\n     * by 96%\n     * @see https://caniuse.com/resizeobserver\n     * @see https://caniuse.com/mutationobserver\n     */\n    if (typeof ResizeObserver != 'undefined') {\n      trackHeightViaResizeObserver();\n    } else {\n      trackHeightViaMutationObserver();\n    }\n\n    // Send and receive route changes\n    talker.on('message', message => {\n      const router = application.lookup('router:main');\n      switch (message.namespace) {\n        case 'route':\n          router.get('location').setURL(message.data.url);\n          router.handleURL(message.data.url);\n          break;\n        case 'thirdParty':\n          this.thirdParty(message, application);\n          break;\n        case 'adgagement':\n          this.adgagement(message, application);\n          break;\n        case 'sdk':\n          this.sdk(message, application);\n          break;\n      }\n    });\n  },\n\n  thirdParty(message, application) {\n    const router = application.lookup('service:router');\n    const session = application.lookup('service:session');\n    switch (message.data.event) {\n      case 'auth':\n        session.handleThirdPartyConnection(message.data.info);\n        break;\n      case 'present':\n        session.isThirdPartyEnabledViaAPI(message);\n        break;\n      case 'loginCanceled':\n        session.trigger('thirdPartyLoginCanceled');\n        break;\n      case 'logout':\n        session.logout();\n        router.transitionTo('index');\n        break;\n    }\n  },\n\n  sdk(message, application) {\n    const router = application.lookup('service:router');\n    switch (message.data.method) {\n      case 'logout':\n        return application\n          .lookup('service:session')\n          .logout()\n          .then(\n            () => message.respond({ logout: true }),\n            () => message.respond({ logout: false })\n          );\n      case 'visit':\n        return router.transitionTo(message.data.data.url).then(() => message.respond({ visit: router.currentURL }));\n      default:\n        console.error(`Unsupported SDK Method ${message.data.method} called with data:`, message.data.data);\n        break;\n    }\n  },\n\n  adgagement(message, application) {\n    const session = application.lookup('service:session');\n    switch (message.data.event) {\n      case 'declare':\n        session.declareAdgagement();\n        document.getElementsByTagName('html')[0].classList.add('embedded-adgagement');\n        break;\n    }\n  },\n};\n\nfunction trackHeightViaResizeObserver() {\n  new ResizeObserver(() => {\n    talker.send('resize', { height: document.documentElement.getBoundingClientRect().height });\n  }).observe(document.documentElement);\n}\n\nfunction trackHeightViaMutationObserver() {\n  let previousHeight = 0;\n\n  // Resize on height change.\n  // Note: documentElementScroll accurately tells when the content initially expands, but use bodyScroll to detect\n  // when the content height shrinks in case a background element is set to 100% of the body height.\n  function handleBodyHeightChange() {\n    const currentHeight =\n      previousHeight === 0 || document.documentElement.getBoundingClientRect().height < bodyScroll()\n        ? document.documentElement.getBoundingClientRect().height\n        : bodyScroll();\n    if (previousHeight !== currentHeight) {\n      previousHeight = currentHeight;\n      talker.send('resize', { height: currentHeight });\n    }\n  }\n  new MutationObserver(mutations => {\n    handleBodyHeightChange();\n    const childSelectors = 'img, video, iframe';\n    mutations.forEach(\n      mutation =>\n        mutation.addedNodes &&\n        [...mutation.addedNodes]\n          .filter(\n            el =>\n              //{{{img}}} does not register as new img tag when displayed so the mutation observer was not fired\n              ['IMG', 'IFRAME'].includes(el.tagName) || loadableChildren(el, childSelectors).length\n          )\n          .forEach(el => {\n            handleBodyHeightChange();\n            let loadedElements = [];\n            if (loadableChildren(el, childSelectors).length) {\n              loadedElements = loadableChildren(el, childSelectors);\n            } else {\n              loadedElements = [el];\n            }\n\n            loadingWorkaround(loadedElements, handleBodyHeightChange);\n          })\n    );\n  }).observe(document.documentElement, {\n    childList: true,\n    subtree: true,\n    attributes: true,\n  });\n\n  // Check if all images have fully loaded and then resize the iframe height\n  function checkAllImagesLoaded() {\n    let imagesLoaded = 0;\n    const images = document.getElementsByClassName('logo');\n    const totalImages = images.length;\n    function imageLoaded() {\n      imagesLoaded++;\n      if (imagesLoaded === totalImages) {\n        handleBodyHeightChange();\n      }\n    }\n\n    for (let i = 0; i < images.length; i++) {\n      const cloneImage = document.createElement('img');\n      cloneImage.onload = imageLoaded;\n      cloneImage.src = images[i].firstChild.firstChild.src;\n    }\n  }\n\n  checkAllImagesLoaded();\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports, ember/no-new-mixins */\nimport { get, set } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\nimport { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport DS from 'ember-data';\nimport { ForbiddenError } from 'secondstreet-common/utils/errors';\n\nconst { keys } = Object;\n\nexport default Mixin.create({\n  store: service(),\n\n  /**\n   * Enables enter/continue button if they were disabled because of save event.\n   * This is a manual disabling because using model.isSaving was not feasible because of validation errors\n   */\n  enableButtons() {\n    set(this, 'controller.buttonDisabled', false);\n  },\n  /**\n   * Delegates to various error-handling methods named for the Error's key, or re-throws\n   * @private\n   * @param error\n   */\n  handleFormSubmissionError(error) {\n    let method;\n\n    this.enableButtons();\n\n    if (error instanceof ForbiddenError) {\n      method = camelize(error.key);\n      this[method](error);\n    } else if (error instanceof DS.InvalidError) {\n      this.validationFailure(error);\n    } else {\n      throw error;\n    }\n  },\n  /**\n   * @private\n   * @param error\n   */\n  validationFailure(invalidError) {\n    const pageModel = this.modelFor(\n      'organizations.organization.organization-promotions.organization-promotion.setup.pages.page'\n    );\n    const formFields = get(pageModel, 'formFields');\n    formFields.forEach(formField => {\n      get(formField, 'field.errors').clear();\n    });\n    keys(invalidError.errors).forEach(async function (fieldId) {\n      const error = invalidError.errors[fieldId];\n      const field = await this.store.findRecord('field', fieldId);\n\n      field.forceDirty();\n      get(field, 'errors').add('value', error.message);\n      // Twitter authorization tokens expire after one use, so the API gives us a fresh one.\n      if (error.data && get(field, 'fieldType') === 'TwitterFollowApi') {\n        set(field, 'twitterAuthorizationRedirect', error.data);\n      }\n    }, this);\n  },\n  //endregion\n});\n","/* eslint-disable ember/named-functions-in-promises, ember/no-mixins, ember/no-new-mixins, ember/no-jquery, ember/no-get */ // FIXME\nimport { computed, get } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\nimport { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport $ from 'jquery';\nimport RSVP from 'rsvp';\n\nimport RehydratedSetting from '../mixins/rehydrated-setting';\nimport localFullUrl from '../utils/local-full-url';\nimport socialSettingUtils from '../utils/social-setting-utils';\n\nexport default Mixin.create(RehydratedSetting, {\n  //region Dependencies\n  i18n: service(),\n  session: service(),\n  store: service(),\n  //endregion\n\n  //region Computed Properties\n  shareUrl: localFullUrl(),\n  facebookEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-facebook-enabled'),\n  twitterEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-twitter-enabled'),\n  pinterestEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-pinterest-enabled'),\n  emailEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-email-enabled'),\n  twitterText: socialSettingUtils.getSocialSetting('referral_tweet_body', 'ss-rehydrate-twitter-value'),\n  emailSubject: socialSettingUtils.getSocialSetting('referral_email_link_subject', 'ss-rehydrate-email-title'),\n  emailBody: socialSettingUtils.getSocialSetting('referral_email_link_body', 'ss-rehydrate-email-value'),\n  /**\n   * @type {Promise} - that resolves to a url\n   */\n  get pinterestImage() {\n    const htmlSource = $('#ss-rehydrate-pinterest-srcUrl').html();\n    if (htmlSource) {\n      return RSVP.resolve(htmlSource);\n    }\n\n    const customMediaItemId = this.i18n.t('referral_pinterest_image_media_item_id');\n    const mediaItemId = isEmpty(customMediaItemId)\n      ? this.i18n.t('referral_pinterest_default_image_media_item_id')\n      : customMediaItemId;\n    const promise = this.store.findRecord('mediaItem', mediaItemId);\n    return promise.then(p => (p ? get(p, 'croppedRetinaFacesUrl') : null));\n  },\n  pinterestText: socialSettingUtils.getSocialSetting('referral_pinterest_description', 'ss-rehydrate-pinterest-value'),\n  tokenContext: computed('model.organizationPromotion.{name,organizationName}', 'shareUrl', function () {\n    return {\n      Promotion: {\n        Name: get(this, 'model.organizationPromotion.name'),\n      },\n      Organization: {\n        Name: get(this, 'model.organizationPromotion.organizationName'),\n      },\n      User: {\n        ReferralUrl: this.shareUrl,\n      },\n    };\n  }),\n  //endregion\n});\n","/* eslint-disable ember/no-jquery, ember/no-mixins, ember/no-new-mixins */\nimport { computed } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n  //region Computed Properties\n  /**\n   * @type {Bool}\n   */\n  usingRehydration: computed(() => !!document.querySelectorAll('div[id^=\"ss-rehydrate-\"]').length),\n  //endregion\n\n  //region Methods\n  /**\n   * Concat a setting in front of a string.\n   * @param {String} value\n   * @param {String} prefixSettingKey\n   * @param {Object} [options]\n   * @returns {String}\n   */\n  prefixSettingValue(value, prefixSettingKey, options = null) {\n    const prefix = options ? this.i18n.t(prefixSettingKey, options) : this.i18n.t(prefixSettingKey);\n    return `${prefix} ${value}`;\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-mixins */\nimport SocialSharer from 'consumer/mixins/social-sharer';\n\nexport default SocialSharer;\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignTemplateModel extends BaseModel {\n  @attr('number') declare designTemplateTypeId: number;\n  @attr('string') declare redirectLink: string;\n  @attr('boolean') declare isCustomUrl: boolean;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'design-template': DesignTemplateModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignTokenContent extends BaseModel {\n  @attr('boolean') isPlaceholder;\n  @attr('boolean') isDisabled;\n  @attr('string') value;\n  @attr('string') linkUrl;\n  @attr('string') altText;\n  @attr('string') title;\n  @attr('number') mediaItemId;\n  @attr('number') fieldId;\n  @attr('boolean') isInherited;\n  @attr('number') sourceTypeId;\n  @attr('number') sourceTypeChartId;\n  @attr('string') suggestedChartType;\n  @attr('string') organizationId;\n\n  @belongsTo({ async: false }) design;\n  @belongsTo({ async: false }) designToken;\n\n  get isEnabled() {\n    return !this.isDisabled;\n  }\n\n  get token() {\n    return this.designToken;\n  }\n\n  get tokenCategory() {\n    return this.token.category;\n  }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignToken extends BaseModel {\n  @attr('string') key;\n  @attr('string') name;\n  @attr('string') category;\n  @attr('number') tokenContentTypeId;\n}\n","import { attr, hasMany, belongsTo, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport DesignTemplateModel from './design-template';\n\nexport default class DesignModel extends BaseModel {\n  @attr('string') declare name: string;\n  @attr('string', { defaultValue: '' }) declare renderedContent: string;\n\n  @belongsTo('design-template') declare designTemplate: DesignTemplateModel;\n  @hasMany('design-token-content', { async: false }) declare designTokenContents: SyncHasMany<any>;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    design: DesignModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  hostname: attr('string'),\n  domainTypeId: attr('number'),\n  name: attr('string'),\n  statusTypeId: attr('number'),\n  isPrimary: attr('boolean'),\n  //endregion\n\n  // Computed Properties\n  subdomain: computed('hostname', function () {\n    let subdomain = '';\n    const { hostname } = this;\n    if (hostname.includes('.secondstreetapp.com')) {\n      subdomain = hostname.replace('.secondstreetapp.com', '');\n    }\n    return subdomain;\n  }),\n  isOldPlatform: computed('hostname', function () {\n    return this.hostname.includes('.upickem.net');\n  }),\n  //endregion\n});\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport OutcomeModel from './outcome';\n\nexport default class EntryOutcomeModel extends BaseModel {\n  @attr('number') declare percentagePoints: number;\n  @belongsTo('outcome', { async: false }) declare outcome: OutcomeModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'entry-outcome': EntryOutcomeModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  name: DS.attr('string'),\n  displayOrder: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  form: DS.belongsTo('form', { async: false }),\n  formFields: DS.hasMany('form-field', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  formSubmissionId: DS.attr('number'),\n  referrer: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class GameModel extends BaseModel {\n  //region Properties\n  @attr('number') entriesPerMatchupMax;\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} ImportFile\n */\nexport default BaseModel.extend({\n  //region Properties\n  importFileTypeId: DS.attr('number'),\n  fileName: DS.attr('string'),\n  originalFileName: DS.attr('string'),\n  size: DS.attr('number'),\n  contentType: DS.attr('string'),\n  //endregion\n});\n","import BaseModel from 'secondstreet-common/models/base';\nimport { attr } from '@ember-data/model';\nimport MatchupModel from './matchup';\n\nexport default class KeywordAssignmentModel extends BaseModel {\n  tempMatchup?: MatchupModel;\n\n  @attr('number') declare entityId: number;\n  @attr('number') declare entityTypeId: number;\n  @attr('number') declare keywordId: number;\n  @attr('string') declare keywordText: string;\n  @attr('number') declare statusTypeId: number;\n  @attr('date') declare dateCreated: Date;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'keyword-assignment': KeywordAssignmentModel;\n  }\n}\n","import BaseModel from 'secondstreet-common/models/base';\nimport { attr } from '@ember-data/model';\n\nexport default class KeywordModel extends BaseModel {\n  @attr('number') declare organizationId: number;\n  @attr('string') declare organizationName: string;\n  @attr('number') declare organizationPhoneNumber: number;\n  @attr('string') declare campaignLastUsed: string;\n  @attr('string') declare keywordText: string;\n  @attr('boolean') declare isInherited: boolean;\n  @attr('date') declare dateLastUsed: Date;\n  @attr('boolean') declare isActive: boolean;\n\n  get name() {\n    return this.keywordText;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    keyword: KeywordModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  loginRequestToken: attr('string'),\n  /**\n   * Do NOT send in a full URL. Only the specific path/route that\n   * will be appended to the consumer url by the API.\n   * @example\n   *   '/enter'\n   * @type {string}\n   */\n  redirectPath: attr('string'),\n  sendTo: attr('string'),\n  verificationRequestToken: attr('string'),\n  /**\n   * ID of a recent entry form submission.\n   * If passed in, the API will complete that form submission as the current user once logged in\n   */\n  entryFormSubmissionId: attr('number'),\n  //endregion\n  //region Relationships\n  session: belongsTo('session', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { alias } from '@ember/object/computed';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { belongsTo } = DS;\n\nexport default BaseModel.extend({\n  //region Relationships\n  sessions: belongsTo('session', { async: false }),\n  //endregion\n\n  //region Computed Properties\n  session: alias('sessions'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Ember Hooks\n  enums: service(),\n  //endregion\n\n  //region Properties\n  logicTypeId: DS.attr('number'),\n  value: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  matchupLogic: DS.belongsTo('matchup-logic', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  isExtraChances: computed('logicTypeId', function () {\n    return this.logicTypeId === this.enums.findWhere('LOGIC_TYPE', { name: 'ReferredUserEntry' });\n  }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  logicActionTypeId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  pointsPerMatch: DS.attr(),\n  maximumMatches: DS.attr('number'),\n  matchupPlacingCriteriaId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  matchupLogicConditions: DS.hasMany('matchup-logic-condition', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} MatchupPlace\n */\nexport default BaseModel.extend({\n  //region Properties\n  startRank: attr('number'),\n  endRank: attr('number'),\n  name: attr('string'),\n  ownerEntityType: attr('number'),\n  ownerEntityId: attr('number'),\n  dateCreated: attr('date'),\n  dateModified: attr('date'),\n  isInherited: attr('boolean'),\n  //endregion\n\n  // Relationships\n  matchupPlacingCriteria: belongsTo('matchup-placing-criteria', { async: true }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  name: attr('string'),\n  ownerEntityType: attr('number'),\n  ownerEntityId: attr('number'),\n  tieBreakLogicTypeId: attr('number'),\n  winnerMethodTypeId: attr('number'),\n  winnerMethodType: enums.computed('name', 'winnerMethodTypeId'),\n  tieBreakingLogicValue: attr('string'),\n  isInherited: attr('boolean'),\n  //endregion\n});\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class MatchupSummary extends BaseModel {\n  @attr('boolean') entryLimitReached;\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} NominationEntriesSummary\n */\nexport default BaseModel.extend({\n  count: DS.attr('number'),\n  name: DS.attr('string'),\n  matchup: DS.belongsTo('matchup'),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} Nomination\n */\nexport default BaseModel.extend({\n  //region Relationships\n  matchup: DS.belongsTo('matchup'),\n  matchupEntry: DS.belongsTo('matchupEntry'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  status: DS.attr('number'),\n  uniqueId: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  organizationPromotionId: DS.attr('number'),\n  organizationUserId: DS.attr('number'),\n  //endregion\n\n  //region Computed Properties\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Dependencies\n  enums: service(),\n  //endregion\n\n  //region Properties\n  emailAddress: DS.attr('string'),\n  birthDay: DS.attr('number'),\n  birthMonth: DS.attr('number'),\n  birthYear: DS.attr('number'),\n  firstName: DS.attr('string'),\n  middleName: DS.attr('string'),\n  gender: DS.attr('string'),\n  lastActivityDate: DS.attr('date'),\n  lastName: DS.attr('string'),\n  organizationId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  userId: DS.attr('number'),\n  userTypeId: DS.attr('number'),\n  username: DS.attr('string'),\n  addressSummary: DS.attr('string'), // Calculated on the server side for the winners page\n  //endregion\n\n  //region Computed Properties\n  isActive: computed('statusTypeId', function () {\n    return this.statusTypeId === this.enums.findWhere('STATUS_TYPE', { name: 'Active' }, 'id');\n  }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * Uses EMBEDDING instead of side loading.\n * @see OrganizationSerializer\n */\nexport default BaseModel.extend({\n  //region Ember Hooks\n  enums: service(),\n  //endregion\n\n  //region Properties\n  affiliateId: DS.attr('string'),\n  name: DS.attr('string'),\n  organizationGuid: DS.attr('string'),\n  organizationTypeId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  timeZoneId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  organizationPromotions: DS.hasMany('organization-promotion', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  timeZone: computed('timeZoneId', function () {\n    return this.enums.findWhere('TIME_ZONES', { id: this.timeZoneId }, {});\n  }),\n  //endregion\n});\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport Promotion from './promotion';\nimport QuestionOptionOutcomeWeightModel from './question-option-outcome-weight';\n\nexport default class OutcomeModel extends BaseModel {\n  //region Properties\n  @attr('string') declare name: string;\n  @attr('string') declare description: string;\n  @attr('number') declare outcomeTypeId: number;\n  @attr('number') declare gameId: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare percentagePointsAverage: number;\n\n  //endregion\n\n  //region Relationships\n  @belongsTo('promotion', { async: false }) declare promotion: Promotion;\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @hasMany('question-option-outcome-weight', { async: false })\n  declare questionOptionOutcomeWeights: SyncHasMany<QuestionOptionOutcomeWeightModel>;\n  //endregion\n\n  get formattedCumulativePercent() {\n    return Math.round(this.percentagePointsAverage);\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    outcome: OutcomeModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport QuestionOptionResultModel from './question-option-result';\n\nexport default class PollSubmissionEntryResult extends BaseModel {\n  @attr('number') declare organizationUserId: number;\n  @attr('number') declare pickedQuestionOptionId: number;\n  @attr('number') declare pollSubmissionEntryId: number;\n  @attr('number') declare questionId: number;\n\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'poll-submission-entry-result': PollSubmissionEntryResult;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo, hasMany } = DS;\n\n/**\n * @typedef {DS.Model} PollSubmission\n */\nexport default BaseModel.extend({\n  //region Properties\n  pollSubmissionEntryId: attr('number'),\n  //endregion\n\n  // Relationships\n  question: belongsTo('question', { async: true }),\n  questionOption: belongsTo('question-option', { async: true }),\n  questionOptionResults: hasMany('question-option-result', { async: false }),\n  matchupId: attr('number'),\n  //endregion\n});\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { attr } from '@ember-data/model';\nimport { or } from '@ember/object/computed';\nimport { makeBooleanProperties } from 'ember-cli-ss-enums/enums-decorator';\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport BaseModel from 'secondstreet-common/models/base';\n\n@makeBooleanProperties('PROMOTION_SUB_TYPE')\n@makeBooleanProperties('PROMOTION_TYPE')\nexport default class Promotion extends BaseModel {\n  @attr('string') declare name: string;\n  @attr('number') declare promotionTypeId: number;\n  @attr('number') declare promotionSubTypeId: number;\n  @attr('number') declare promotionTypeCategoryId: number;\n  @attr('number') declare organizationId: number;\n\n  @enums.computed('name', 'promotionTypeId') declare promotionType: string;\n  @enums.computed('name', 'promotionSubTypeId') declare promotionSubType: string;\n\n  @or('isVideoVotingStandard', 'isUGCSweepstakesVideo') declare isVideo: boolean;\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport type OutcomeModel from './outcome';\nimport type QuestionOptionModel from './question-option';\n\nexport default class QuestionOptionOutcomeWeightModel extends BaseModel {\n  @attr('number', { defaultValue: 0 }) declare selectionWeight: number;\n  @attr('string') declare outcomeId: string;\n  @attr('string') declare questionOptionId: string;\n\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n  @belongsTo('outcome', { async: false }) declare outcome: OutcomeModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-outcome-weight': QuestionOptionOutcomeWeightModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport QuestionOptionModel from './question-option';\nimport QuizSubmissionModel from './quiz-submission';\n\nexport default class QuestionOptionPickModel extends BaseModel {\n  //region Relationships\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n  @belongsTo('quiz-submission', { async: false }) declare quizSubmission: QuizSubmissionModel;\n  //endregion\n\n  //region Properties\n  @attr('number') declare organizationUserId: number;\n  //endregion\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-pick': QuestionOptionPickModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport { tracked } from '@glimmer/tracking';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionOptionModel from './question-option';\n\nexport default class QuestionOptionResultModel extends BaseModel {\n  @tracked percentage = 0;\n  @tracked remainder = 0;\n  @tracked isLeader = false;\n\n  @attr('number') declare count: number;\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-result': QuestionOptionResultModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport QuestionModel from './question';\nimport QuestionOptionResultModel from './question-option-result';\nimport { tracked } from '@glimmer/tracking';\nimport TransitionModel from './transition';\n\nexport default class QuestionOptionModel extends BaseModel {\n  @tracked picked = false;\n  @tracked pointsEarned?: number;\n\n  @attr('string') declare name: string;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('boolean') declare isCorrect: boolean;\n  @attr('number') declare promotionId: number;\n  @attr('string') declare nextQuestionId: string;\n  @attr('number') declare mediaItemId: number;\n\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n\n  get quizTransition(): TransitionModel | null {\n    const { quizTransitions } = this.question;\n    return quizTransitions.find(t => t.questionOptions.find(id => id == this.id)) || null;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option': QuestionOptionModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport Promotion from './promotion';\nimport QuestionOptionModel from './question-option';\nimport QuestionOptionResultModel from './question-option-result';\nimport { service } from '@ember/service';\nimport SettingsService from 'consumer/services/settings';\nimport { tracked } from '@glimmer/tracking';\nimport TransitionModel from './transition';\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport Store from '@ember-data/store';\n\nconst adMatchupTypeId = enums.findWhere('MATCHUP_TYPE', { name: 'Ad' });\nexport default class QuestionModel extends BaseModel {\n  @service declare store: Store;\n  @service declare settings: SettingsService;\n  @service('quiz-question-responses') declare quizQuestionResponses: any;\n\n  @tracked hasPicked = false;\n\n  @attr('string') declare name: string;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('number') declare gameId: number;\n  @attr('number') declare mediaItemId: number;\n  @attr('string') declare videoUrl: string;\n  @attr('number') declare questionType: number;\n\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @belongsTo('promotion', { async: false }) declare promotion: Promotion;\n  @hasMany('question-option', { async: false }) declare questionOptions: SyncHasMany<QuestionOptionModel>;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n\n  @hasMany('transition', { async: false }) declare quizTransitions: SyncHasMany<TransitionModel>;\n\n  get hasYoutubeVideo() {\n    return !!this.videoUrl;\n  }\n\n  get hasVideoMediaItem() {\n    return this.mediaItem?.contentType?.startsWith('video');\n  }\n\n  get hasAudioMediaItem() {\n    return this.mediaItem?.contentType?.startsWith('audio');\n  }\n\n  get useFadeInAnimation() {\n    return this.settings.getValueFor('quiz_questions_animation_style') == 2;\n  }\n\n  get displayOrderTransition() {\n    return this.settings.getValueFor('quiz_questions_randomize')\n      ? this.quizQuestionResponses.questions.indexOf(this)\n      : this.displayOrder;\n  }\n\n  get isMultiChoiceQuestion() {\n    return this.questionOptions.filter(q => q.isCorrect).length > 1;\n  }\n\n  get markedCorrectOptionIds() {\n    const correctOptionIds = this.questionOptions\n      .filter(q => q.isCorrect)\n      .map(q => q.id)\n      .sort();\n    const pickedOptionIds = this.questionOptions\n      .filter(q => q.picked)\n      .map(q => q.id)\n      .sort();\n    return JSON.stringify(correctOptionIds) === JSON.stringify(pickedOptionIds);\n  }\n\n  get isAd() {\n    return this.questionType === adMatchupTypeId;\n  }\n\n  get sponsoredPost() {\n    return this.store.peekAll('sponsored-post').find(sp => sp.ownerEntityId == +this.id);\n  }\n\n  get isBannerAd() {\n    return this.sponsoredPost?.isBannerAd;\n  }\n\n  get isProgrammaticAd() {\n    return this.sponsoredPost?.isProgrammaticAd;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    question: QuestionModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany, AsyncBelongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport OutcomeModel from './outcome';\nimport QuestionOptionPickModel from './question-option-pick';\n\nexport default class QuizSubmissionModel extends BaseModel {\n  @hasMany('question-option-pick', { async: false })\n  declare questionOptionPicks: SyncHasMany<QuestionOptionPickModel>;\n\n  @belongsTo('outcome', { async: true })\n  declare outcome: AsyncBelongsTo<OutcomeModel>;\n\n  @attr('number') declare percentCorrect: number;\n  @attr('number') declare picksCorrect: number;\n  @attr('number') declare outcomePoints: number;\n  @attr('number') declare timeTaken: number;\n  @attr('number') declare statusTypeId: number;\n  //For gamification\n  @attr('number') declare points: number;\n  @attr('number') declare longestStreak: number;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'quiz-submission': QuizSubmissionModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n\n  referrer: DS.attr('string'),\n  referredEntityTypeId: DS.attr('number'),\n  referredEntityId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  organizationPromotionUser: DS.belongsTo('organization-promotion-user', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} Session\n */\nexport default BaseModel.extend({\n  //region Properties\n  username: attr('string'),\n  password: attr('string'),\n  accessToken: attr('string'),\n  expiresInSeconds: attr('number'),\n  organizationUserId: attr('number'),\n  organizationUserGuid: attr('string'),\n  organizationPromotionUserId: attr('number'),\n  organizationPromotionUserGuid: attr('string'),\n  isNewPlatformJoyrideComplete: attr('boolean'),\n  thirdPartyId: attr('number'),\n  thirdPartyUniqueUserId: attr('string'),\n  //endregion\n\n  //region Relationships\n  organizationUsers: belongsTo('organization-user', { async: false }),\n  organizationPromotion: belongsTo('organization-promotion', { async: true }),\n  organization: belongsTo('organization', { async: true }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { not } from '@ember/object/computed';\nimport DS from 'ember-data';\nimport Inflector from 'ember-inflector';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\nInflector.inflector.uncountable('sweepstakes');\n\nexport default BaseModel.extend({\n  //region Properties\n  isEnabled: attr('boolean', { defaultValue: false }),\n  startDate: attr('date'),\n  endDate: attr('date'),\n  numberOfWinners: attr('number'),\n  //endregion\n\n  //region Relationships\n  promotion: belongsTo('promotion', { async: true }),\n  matchup: belongsTo('matchup', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  isDisabled: not('isEnabled'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  name: DS.attr('string'),\n  token: DS.attr('string'),\n  templateTypeId: DS.attr('number'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} Session\n */\nexport default BaseModel.extend({\n  //region Properties\n  thirdPartyId: attr('number'),\n  thirdPartyUniqueUserId: attr('string'),\n  userDataEmailAddress: attr('string'),\n  userDataFirstName: attr('string'),\n  userDataLastName: attr('string'),\n  userDataCity: attr('string'),\n  userDataAddress1: attr('string'),\n  userDataAddress2: attr('string'),\n  userDataStateProvince: attr('string'),\n  userDataPostalCode: attr('string'),\n  userDataCountry: attr('string'),\n  userDataGender: attr('number'),\n  userDataPhone: attr('string'),\n  userDataBirthDate: attr('string'),\n  //endregion\n\n  //region Relationships\n  session: belongsTo('session', {\n    async: false,\n  }),\n  //endregion\n});\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport Store from '@ember-data/store';\nimport { service } from '@ember/service';\n\nexport default class TransitionModel extends BaseModel {\n  @service declare store: Store;\n  @attr('string', { defaultValue: '' }) declare description: string;\n  @attr('string') declare icon: string;\n  @attr('boolean') declare forCorrect: boolean;\n\n  @attr() declare questionOptions: string[];\n\n  @belongsTo('question', { async: false }) declare question?: QuestionModel;\n\n  get options() {\n    return (this.questionOptions || []).map(id => this.store.peekRecord('question-option', id));\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    transition: TransitionModel;\n  }\n}\n","import TalkerRouter from 'consumer/router';\nimport config from 'consumer-sweepstakes/config/environment';\n\nimport rootURL from './utils/root-url';\n\nexport default class Router extends TalkerRouter {\n  location = config.locationType;\n  rootURL = rootURL();\n}\n\nRouter.map(function () {\n  this.route('thanks');\n  this.route('ineligible');\n\n  this.route('referrals', function () {\n    this.route('referral', { path: '/:referrer_user_guid' });\n  });\n\n  this.route('enter', { path: '/Enter' }, function () {\n    this.route('account');\n  });\n\n  this.route('old-thanks', { path: '/Thanks' });\n\n  this.route('login', function () {\n    this.route('token', { path: ':token/:destination' });\n  });\n});\n","import ConsumerApplicationRoute from 'consumer/routes/application';\n\nexport default class ApplicationRoute extends ConsumerApplicationRoute {}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterAccountRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\n\nexport default class HelpRoute extends Route {}\n","import { action } from '@ember/object';\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport RSVP from 'rsvp';\nimport { currentMatchup } from 'consumer-sweepstakes/utils/matchups';\nimport { firstObject } from 'secondstreet-common/utils/array';\n\nexport default class IndexRoute extends Route {\n  @service enums;\n  @service localStorage;\n  @service router;\n  @service session;\n  @service store;\n\n  queryParams = {\n    reenter: {},\n  };\n\n  async model(params) {\n    const { matchups, forms } = await RSVP.hash({\n      matchups: this.store.query('matchup', { excludeSecondaryMatchups: true }),\n      forms: this.store.query('form', {\n        formTypeId: this.enums.findWhere('FORM_TYPE', { name: 'Registration' }),\n        excludeFormPages: true,\n      }),\n    });\n\n    const currentRound = currentMatchup(matchups);\n    const matchupSummary = currentRound\n      ? await this.store.findRecord('matchup-summary', currentRound.id, { reload: true })\n      : null;\n\n    return {\n      matchups,\n      registrationForm: firstObject(forms),\n      matchupSummary,\n      isReentering: params.reenter,\n    };\n  }\n\n  async afterModel(model) {\n    const { minimumAgeRestriction, formValues } = await RSVP.hash({\n      minimumAgeRestriction: this.localStorage.getItem('MinimumAgeRestriction'),\n      formValues: this.localStorage.getItem(`FORM_${model.registrationForm.id}_formValues`),\n    });\n\n    if (minimumAgeRestriction) {\n      return this.router.replaceWith('ineligible');\n    }\n\n    if (this.session?.isLoggedIn && this.session?.usesSecondStreetLogin && !(model.isReentering || formValues)) {\n      return this.router.replaceWith('thanks');\n    }\n  }\n\n  @action\n  formSubmitted() {\n    this.router.transitionTo('thanks');\n  }\n}\n","import Route from '@ember/routing/route';\n\nexport default class IneligibleRoute extends Route {}\n","import Route from '@ember/routing/route';\n\nexport default class LoginRoute extends Route {}\n","import LoginRoute from 'consumer/routes/login/index';\n\nexport default LoginRoute;\n","import TokenRoute from 'consumer/routes/login/token';\n\nexport default class LoginTokenRoute extends TokenRoute {}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class OldThanksRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('thanks');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class ReferralsIndexRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import { set } from '@ember/object';\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class ReferralRoute extends Route {\n  @service router;\n  @service session;\n\n  model(params) {\n    const referrerUserGuid = params.referrer_user_guid;\n\n    if (referrerUserGuid) {\n      set(this, 'session.referrerUserGuid', referrerUserGuid);\n    }\n\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { action, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport clearFormFieldValues from 'consumer-sweepstakes/utils/clear-form-field-values';\nimport { mostRecentMatchup } from 'consumer-sweepstakes/utils/matchups';\nimport localFullUrl from 'consumer-sweepstakes/utils/local-full-url';\nimport talker from 'consumer-sweepstakes/utils/talker';\nimport RSVP from 'rsvp';\nimport { get } from '@ember/object';\nimport { extractArray, firstObject } from 'secondstreet-common/utils/array';\nimport { lastObject } from 'secondstreet-common/utils/array';\n\nconst ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS = 77;\n\nexport default class ThanksRoute extends Route {\n  @service('enums') enums;\n  @service('local-storage') localStorage;\n  @service('router') router;\n  @service('session') session;\n  @service('social-url-shortener') socialUrlShortener;\n  @service('store') store;\n  @service current;\n\n  async beforeModel() {\n    if (await this.localStorage.getItem('MinimumAgeRestriction')) {\n      return this.router.replaceWith('ineligible');\n    }\n\n    if (!this.session.isLoggedIn) {\n      this.router.replaceWith('enter');\n    }\n  }\n\n  async model() {\n    const { organizationPromotion } = this.current;\n    const matchups = await this.store.query('matchup', { excludeSecondaryMatchups: true });\n    const matchup = mostRecentMatchup(matchups);\n\n    const { reenterFormResult, ...rest } = await RSVP.hash({\n      matchup,\n      dipsUrl: this.store.queryRecord('setting', { key: 'dips_url' }),\n      extraChancesForm: this.store\n        .query('form', {\n          formTypeId: this.enums.findWhere('FORM_TYPE', { name: 'ExtraChances' }),\n        })\n        .then(form => lastObject(extractArray(form))),\n      reenterFormResult: this.store.query('form', {\n        onlyCodeWordOrEmailPage: true,\n        matchupId: matchup.id,\n      }),\n      userAttributeTypes:\n        this.session.isLoggedIn &&\n        (get(organizationPromotion, 'promotion.isSweepstakesCodeword') ||\n          get(organizationPromotion, 'promotion.isSweepstakesSimple'))\n          ? await this.store.queryRecord('organization-user-attribute', {\n              organizationPromotionId: organizationPromotion.id,\n              organizationUserId: this.session.organizationUserId,\n              userAttributeTypeId: ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS,\n            })\n          : null,\n    });\n\n    this.current.update({\n      reminderEmailOptin: rest.userAttributeTypes,\n      isReminderEmailConfirmed: organizationPromotion.isReminderEmailConfirmed,\n    });\n\n    return {\n      ...rest,\n      reenter: {\n        form: firstObject(reenterFormResult),\n        meta: reenterFormResult.meta,\n      },\n      hasMultipleMatchups: matchups && matchups.length > 1,\n    };\n  }\n\n  async setupController(controller) {\n    super.setupController(...arguments);\n\n    const [matchupLogics, referrals, shortenedLink] = await RSVP.all([\n      this.store.findAll('matchupLogic'),\n      this.store.findAll('referral'),\n      this.referralLinks(),\n    ]);\n\n    setProperties(controller, {\n      referrals,\n      matchupLogics,\n      shortenedLink,\n    });\n  }\n\n  async referralLinks() {\n    const shortener = this.socialUrlShortener;\n    const { organizationPromotion } = this.modelFor('application');\n    // TODO: Move the following into a computed property as soon as DataBoundPromise exists.\n    const referralRoute = `referrals/${this.session.organizationPromotionUserGuid}`;\n\n    let referralUrl = '';\n\n    try {\n      const message = await talker.send('fullUrl', { route: referralRoute });\n      referralUrl = message.data.url;\n    } catch (_exception) {\n      referralUrl = localFullUrl() + referralRoute;\n    }\n\n    return shortener.shorten(\n      { url: referralUrl, pathname: `/${referralRoute}` },\n      organizationPromotion.organization.get('id'),\n      organizationPromotion.uniqueId\n    );\n  }\n\n  @action\n  didTransition() {\n    // clear the previous route's registration form AFTER this route resolves for better UX\n    clearFormFieldValues(this.store.peekAll('form').find(form => form.formType == 'Registration'));\n  }\n\n  @action\n  loading() {\n    return false;\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    designToken: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\nimport ApplicationSerializer from './application';\n\nexport default class DesignSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    designTokenContents: {\n      embedded: 'always',\n    },\n  };\n  keyForRelationship(key) {\n    if (key === 'designTokenContents') {\n      return 'default_design_token_contents';\n    }\n    return super.keyForRelationship(...arguments);\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    entryFieldValues: { embedded: 'always' },\n    organizationUsers: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    fieldOptions: { embedded: 'always' },\n    mediaItems: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  //  normalize: function(type, hash, prop) {\n  //    hash['value'] = hash['default_value'];\n  //    return this._super(type, hash, prop);\n  //  },\n  attrs: {\n    fields: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    if (payload.form_page_submissions && payload.form_page_submissions[0] && payload.meta) {\n      payload.form_page_submissions[0].entry_eligibility_date = payload.meta.entry_eligibility_date;\n    }\n    return this._super(store, primaryModelClass, payload, id, requestType);\n  },\n  attrs: {\n    sessions: { embedded: 'always' },\n    entries: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    formPages: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default class LoginEmailRequestSerializer extends SecondStreetSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    session: { embedded: 'always' },\n  };\n\n  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    if (payload.login_email_requests && payload.login_email_requests[0]) {\n      if (payload.meta) {\n        payload.login_email_requests[0].session = payload.meta.sessions;\n      }\n\n      if (payload.login_email_requests[0].id === 0) {\n        // sometimes the api sends back 0 for an id\n        payload.login_email_requests[0].id = Math.floor(Math.random() * 1000);\n      }\n    }\n\n    return super.normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType);\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport { computed } from '@ember/object';\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: computed(() => ({\n    sessions: { embedded: 'always' },\n  })),\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    mediaItems: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(EmbeddedRecordsMixin, {\n  attrs: {\n    orderLineItems: { embedded: 'always' },\n    ordersTransactions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    promotions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    organizationPromotions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionResults: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionResults: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport ApplicationSerializer from 'consumer/serializers/application';\n\nexport default class PromotionProductSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    promotionProductAttributes: { embedded: 'always' },\n  };\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionPicks: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    organizationUsers: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    session: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/no-get, ember/no-classic-classes */\nimport { computed, get, set, setProperties } from '@ember/object';\nimport { empty, filter, mapBy, not, readOnly, uniqBy } from '@ember/object/computed';\nimport Evented, { on } from '@ember/object/evented';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank, isEmpty, isPresent } from '@ember/utils';\nimport RSVP from 'rsvp';\n\nconst entryAtIndex = i =>\n  computed('userEntries.@each.dateCreated', function () {\n    return this.userEntries.sortBy('id').reverse().objectAt(i);\n  });\n\n/**\n * @typedef {Ember.Service} EntriesService\n * @mixes {Ember.Evented}\n */\nexport default Service.extend(Evented, {\n  //region Dependency Injection\n  session: service(),\n  store: service(),\n  votes: service(),\n  //endregion\n\n  //region Ember Hooks\n  watchSession: on('init', function () {\n    if (get(this.session, 'isLoggedIn')) {\n      this.loadEntries();\n    }\n    this.session.on('NewSession', this, 'loadEntries');\n  }),\n  //endregion\n\n  //region Properties\n  /**\n   * When accessing this outside the service, only use this for computed property dependent keys or read its contents.\n   * Do not push items into it, replace it, etc.\n   * @readonly\n   * @type {MatchupEntry[]}\n   */\n  userEntries: null,\n  /**\n   * This is set by the Entries.loadEntries method.\n   * @type {Boolean}\n   **/\n  isLoaded: false,\n  /**\n   * @type {Boolean}\n   * @private\n   */\n  isLoadingEntries: false,\n  /**\n   * While changing a nomination, holds the previous nomination entry so UI state stays stable\n   * after the old entry is deleted and before entries reload.\n   * @type {?Object}\n   * @private\n   */\n  changingNominationFromEntry: null,\n  /**\n   * @type {?String}\n   * @private\n   */\n  changingNominationToEntryId: null,\n  /**\n   * @type {?String}\n   * @private\n   */\n  nominatingOnMatchupEntryId: null,\n  //endregion\n\n  //region Computed Properties\n  /**\n   * Whether the user has any entries at all\n   * @returns {Boolean}\n   */\n  hasEntries: not('hasNoEntries'),\n  hasNoEntries: empty('userEntries'),\n  entriesCount: readOnly('userEntries.length'),\n  currentEntry: entryAtIndex(0),\n  previousEntry: entryAtIndex(1),\n  matchups: mapBy('userEntries', 'matchup'),\n  matchupFromUserEntries: filter('matchups', isPresent),\n  matchupsWithUserSubmissions: uniqBy('matchupFromUserEntries', 'id'),\n  //endregion\n\n  init() {\n    this._super(...arguments);\n\n    set(this, 'userEntries', this.userEntries || []);\n  },\n\n  //region Methods\n  /**\n   * Loads the current user's MatchupEntries for the OrganizationPromotion.\n   * If a network request to load entries is already pending, it will _not_ fire another.\n   *\n   * @fires EntriesService#entriesLoaded\n   * @returns {RSVP.Promise}\n   */\n  loadEntries(force = false) {\n    const { userEntries } = this;\n\n    if (get(this, 'session.accessToken')) {\n      const organizationUserId = get(this, 'session.session.organizationUserId');\n      const isAlreadyLoading = this.isLoadingEntries;\n      set(this, 'isLoadingEntries', true);\n      if (!force && isAlreadyLoading) {\n        return new RSVP.Promise(resolve => this.on('entriesLoaded', () => resolve(userEntries)));\n      }\n      return this.store\n        .query('matchup-entry', { organizationUserId, filterByOrganizationPromotion: true })\n        .then(matchupEntries => {\n          userEntries.clear();\n          userEntries.addObjects(matchupEntries.toArray());\n          this.votes?.refreshReminderEmailsUserAttributeTask?.perform();\n          if (isPresent(userEntries)) {\n            this.session.trigger('ActiveSession');\n          }\n          set(this, 'isLoaded', true);\n          const entryEligibilityMetaData = get(matchupEntries, 'meta.entryEligibilityMetaData') || [];\n          set(this, 'entryEligibilityMetaData', entryEligibilityMetaData);\n          this.trigger('entriesLoaded');\n          return matchupEntries;\n        })\n        .finally(ret => {\n          set(this, 'isLoadingEntries', false);\n          return ret;\n        });\n    }\n    return RSVP.resolve(userEntries);\n  },\n  filterWriteinNominationsForThisCategoryAndInterval(selectedMatchup, nominationEntries = []) {\n    const entryEligibilityMetaData = this.entryEligibilityMetaData || [];\n    const matchupId = get(selectedMatchup, 'id');\n    const writeinNominationsEligibility = entryEligibilityMetaData.findBy('matchup_id', parseInt(matchupId)); //this needs to be an int\n    if (isBlank(writeinNominationsEligibility)) {\n      return [];\n    }\n    const startDate = new Date(get(writeinNominationsEligibility, 'entry_interval_start_date'));\n    const endDate = new Date(get(writeinNominationsEligibility, 'entry_interval_end_date'));\n    return this.userEntries.filter(e => {\n      const dateCreated = new Date(get(e, 'entries.dateCreated'));\n      return (\n        writeinNominationsEligibility &&\n        `${get(e, 'matchup.id')}` === get(selectedMatchup, 'id') &&\n        dateCreated < endDate &&\n        dateCreated > startDate &&\n        (!get(e, 'entries.masterEntryId') || get(e, 'entry.entryFieldValues')) &&\n        isEmpty(nominationEntries.findBy('entries.id', `${get(e, 'entries.masterEntryId')}`))\n      );\n    });\n  },\n  clearEntries() {\n    run(() => this.userEntries.clear());\n  },\n  hasCurrentNomination(isNominationAndVotingBallot, matchupId) {\n    const entriesEligibilityMetaData = this.entryEligibilityMetaData;\n    if (isNominationAndVotingBallot && get(this, 'session.isLoggedIn') && isPresent(entriesEligibilityMetaData)) {\n      const entryEligibilityMetaData = entriesEligibilityMetaData.findBy('matchup_id', parseInt(matchupId));\n      const userEntries = this.userEntries\n        .filterBy('matchup.id', matchupId)\n        .sortBy('entries.dateCreated', 'dateCreated');\n      const lastUserEntry = get(userEntries, 'lastObject.entry');\n      if (\n        entryEligibilityMetaData &&\n        lastUserEntry &&\n        get(lastUserEntry, 'dateCreated') > new Date(get(entryEligibilityMetaData, 'entry_interval_start_date')) &&\n        get(lastUserEntry, 'dateCreated') < new Date(get(entryEligibilityMetaData, 'entry_interval_end_date'))\n      ) {\n        return lastUserEntry;\n      }\n    }\n  },\n\n  beginChangingNomination(previousNominationEntry, toEntryId) {\n    setProperties(this, {\n      changingNominationFromEntry: previousNominationEntry,\n      changingNominationToEntryId: toEntryId,\n    });\n  },\n\n  endChangingNomination() {\n    setProperties(this, {\n      changingNominationFromEntry: null,\n      changingNominationToEntryId: null,\n    });\n  },\n\n  beginNominating(matchupEntryId) {\n    set(this, 'nominatingOnMatchupEntryId', matchupEntryId);\n  },\n\n  endNominating() {\n    set(this, 'nominatingOnMatchupEntryId', null);\n  },\n\n  isOptimisticNominationForEntry(entryId) {\n    const fromEntry = this.changingNominationFromEntry;\n    if (!fromEntry) return false;\n\n    const normalizedEntryId = parseInt(entryId, 10);\n    return (\n      parseInt(get(fromEntry, 'id'), 10) === normalizedEntryId ||\n      parseInt(get(fromEntry, 'masterEntryId'), 10) === normalizedEntryId\n    );\n  },\n\n  relevantMatchupEntryForMatchup(matchupId) {\n    return this.userEntries.find(matchupEntry => get(matchupEntry, 'matchup.id') === matchupId);\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-classic-classes */\nimport Service, { service } from '@ember/service';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\n\nexport default Service.extend({\n  settings: service(),\n  autocompleteService: null,\n  placesService: null,\n\n  // For easier testing\n  get google() {\n    return window.google;\n  },\n\n  instantiateGoogleMaps(languageCode) {\n    // Load Google maps API\n    // non-prod KEY comes from the nathan.dauber@secondstreet.com Google account\n    const GOOGLE_MAPS_API_KEY = this.settings.getValueFor('google_maps_api_key');\n    const url = `https://maps.googleapis.com/maps/api/js?key=${GOOGLE_MAPS_API_KEY}&libraries=places&language=${languageCode}&v=weekly`;\n\n    return loadScript(url);\n  },\n\n  getBoundsFromRadius(center, radiusMeters) {\n    const earthRadius = 6378137; // meters, WGS84 Earth radius\n    const { lat } = center;\n    const { lng } = center;\n\n    //degrees of latitude you need to move north or south from the center to reach the edge of the circle.\n    //1 degree of latitude is roughly the same distance anywhere on Earth (~111.32 km or ~69 miles)\n    //radiusMeters / earthRadius = angular distance in radians.\n    //Multiply by (180 / Math.PI) to convert radians → degrees.\n    const dLat = (radiusMeters / earthRadius) * (180 / Math.PI);\n\n    //degrees of longitude you need to move east or west from the center to reach the edge of the circle.\n    //Longitude lines converge at the poles.\n    //At the equator, 1 degree of longitude is the widest (~111.32 km).Near the poles, 1 degree of longitude gets very small.\n    //how far 1° of longitude goes depends on latitude.\n    //Math.cos(lat) accounts for how longitude spacing shrinks as you go north/south.\n    const dLng = (radiusMeters / (earthRadius * Math.cos((Math.PI * lat) / 180))) * (180 / Math.PI);\n\n    // the minimum latitude and longitude.Southwest Bottom-left corner in a given radial area.\n    const sw = new this.google.maps.LatLng(lat - dLat, lng - dLng);\n\n    //the maximum latitude and longitude. Top-right corner in a given radial area.\n    const ne = new this.google.maps.LatLng(lat + dLat, lng + dLng);\n\n    return new this.google.maps.LatLngBounds(sw, ne);\n  },\n\n  async getPlacePredictions(input, types, promotionLocationRestriction, callback) {\n    const { AutocompleteSuggestion, PlacesServiceStatus } = this.google.maps.places;\n    try {\n      const request = { input };\n\n      if (types && types.length > 0) {\n        request.includedPrimaryTypes = types;\n      }\n\n      if (promotionLocationRestriction?.radius) {\n        const center = { lat: promotionLocationRestriction.latitude, lng: promotionLocationRestriction.longitude };\n        const radiusMeters = promotionLocationRestriction?.radius * 1609.344;\n        const bounds = this.getBoundsFromRadius(center, radiusMeters);\n        request.locationRestriction = bounds;\n      }\n\n      const { suggestions } = await AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n\n      // Convert suggestions to match old format for callback\n      const predictions = suggestions.map(suggestion => ({\n        description: suggestion.placePrediction?.text?.text,\n        place_id: suggestion.placePrediction?.placeId,\n        structured_formatting: {\n          main_text: suggestion.placePrediction?.mainText?.text,\n          secondary_text: suggestion.placePrediction?.secondaryText?.text || '',\n        },\n        types: suggestion.placePrediction?.types,\n      }));\n      callback(predictions, PlacesServiceStatus.OK);\n    } catch (error) {\n      console.error('Error fetching autocomplete suggestions:', error);\n      callback(null, PlacesServiceStatus.ERROR);\n    }\n  },\n});\n","/* eslint-disable ember/no-observers, ember/no-classic-classes */\nimport { computed, observer } from '@ember/object';\nimport Service from '@ember/service';\nimport { isBlank } from '@ember/utils';\nimport i18n from 'i18next';\n\n/**\n * Internationalization Manager wraps i18next for Second Street's purposes.\n * @class\n */\nexport default Service.extend({\n  //region Ember Hooks\n  init() {\n    this._super();\n    this.i18nextInit();\n  },\n\n  unknownProperty(keyName) {\n    const blankMatch = keyName.match(/is_(.*)_blank/);\n\n    if (blankMatch) {\n      return this.blank(blankMatch[1]);\n    }\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * Options for i18next#init\n   * @private\n   */\n  options: computed(() => ({\n    lng: 'en',\n    interpolationPrefix: '{{',\n    interpolationSuffix: '}}',\n  })),\n  /**\n   * Holds a reference to the actual i18next library.\n   */\n  i18next: i18n,\n  /**\n   * Holds the translation resources to pass into i18next. To be overridden.\n   */\n  resources: Object.freeze({\n    dev: {\n      translation: {\n        key: 'value',\n      },\n    },\n    en: {\n      translation: {\n        key: 'value',\n      },\n    },\n  }),\n  //endregion\n\n  //region Methods\n  /**\n   * Translate\n   * This mirrors the API for i18next#t\n   * @see http://i18next.com/pages/doc_features.html\n   * @param key - The translation key to look up\n   * @param options - An object containing options, variables, etc.\n   * @returns {string} - Returns the translated string\n   */\n  t(key, options) {\n    // Handblebars already escapes HTML for us.\n    const unsafeOptions = Object.assign({ interpolation: { escapeValue: false } }, options);\n    return this.i18next.t(key, unsafeOptions);\n  },\n  /**\n   * Key Existence Check\n   * This mirrors the API for i18next#exists\n   * @see http://i18next.com/pages/doc_features.html\n   * @param key - The translation key to look up\n   * @param [options] - An object containing options, variables, etc.\n   * @returns {string} - Returns the translated string\n   */\n  exists(key, options) {\n    return this.i18next.exists(key, options);\n  },\n\n  /**\n   * Adds one key/value. Useful in test when you need to add a translation\n   * This mirrors the API for i18next#addResource\n   * @see https://www.i18next.com/overview/api#addresource\n   * @param lng - The translation language\n   * @param namespace - The namespace of the translation\n   * @param key - The translation key\n   * @param value - The value of the translation key\n   * @param [options] - An object containing options, variables, etc.\n   */\n  addResource(lng, namespace, key, value, options) {\n    return this.i18next.addResource(lng, namespace, key, value, options);\n  },\n\n  /**\n   * Adds multiple resource. Useful in test when you need to add a translation\n   * This mirrors the API for i18next#addResources\n   * @see https://www.i18next.com/overview/api#addresources\n   * @param lng - The translation language\n   * @param namespace - The namespace of the translation\n   * @param resources - An object with key/value pairs\n   * @param deep - If true, resources will be merged recursively, default: false\n   * @param overwrite - If true, existing keys will be overwritten, default: false\n   */\n  addResources(lng, namespace, resources, deep, overwrite) {\n    return this.i18next.addResources(lng, namespace, resources, deep, overwrite);\n  },\n\n  /**\n   * Key Blank check\n   * We don't necessarily know if the key is blank if it has variables unless you pass in options\n   * @param key - The translation key to look up\n   * @param [options] - An object containing options, variables, etc.\n   * @returns {Boolean}\n   */\n  blank(key, options) {\n    return this.exists(key) ? isBlank(this.t(key, options)) : false;\n  },\n  /**\n   * @private\n   */\n  i18nextInit() {\n    this.i18next.init({\n      ...this.options,\n      resources: this.resources,\n    });\n  },\n  //endregion\n\n  //region Observers\n  /**\n   * Any time things change that have to be passed into i18next#init, call it again.\n   */\n  optionsChanged: observer('options', 'resources', function () {\n    this.i18nextInit();\n  }),\n  //endregion\n\n  //region Computed Properties\n  /**\n   * Detect Current Language\n   * This returns the result from i18next#lng\n   * @see http://i18next.com/pages/doc_init.html\n   * @type {Ember.ComputedProperty}\n   * @returns {string} - Returns the translated string\n   */\n  get lng() {\n    return this.i18next.language;\n  },\n  //endregion\n});\n","import Service from '@ember/service';\nimport Ember from 'ember';\n\nimport talker from '../utils/talker';\n\ntype LocalStorageActionPayload =\n  | { action: 'getItem'; key: string }\n  | { action: 'setItem'; key: string; value: string }\n  | { action: 'removeItem'; key: string }\n  | { action: 'clear' };\n\ntype Talker = {\n  get(prop: 'handshaken'): boolean | undefined;\n  send(channel: 'localStorage', payload: LocalStorageActionPayload): PromiseLike<{ data?: { value?: string | null } }>;\n};\n\ntype StorageLike = {\n  getItem(key: string): Promise<string | null | undefined>;\n  setItem(key: string, value: string): Promise<void>;\n  removeItem(key: string): Promise<void>;\n  clear(): Promise<void>;\n};\n\nclass InMemoryStorage implements StorageLike {\n  inMemoryData: Record<string, string> = {};\n\n  getItem(key: string): Promise<string | null> {\n    const value = this.inMemoryData[key];\n    return Promise.resolve(value === undefined ? null : value);\n  }\n\n  setItem(key: string, value: string): Promise<void> {\n    this.inMemoryData[key] = value;\n    return Promise.resolve();\n  }\n\n  removeItem(key: string): Promise<void> {\n    delete this.inMemoryData[key];\n    return Promise.resolve();\n  }\n\n  clear(): Promise<void> {\n    this.inMemoryData = {};\n    return Promise.resolve();\n  }\n}\n\nclass BrowserStorage implements StorageLike {\n  getItem(key: string): Promise<string | null> {\n    return Promise.resolve(window.localStorage.getItem(key));\n  }\n\n  setItem(key: string, value: string): Promise<void> {\n    window.localStorage.setItem(key, value);\n    return Promise.resolve();\n  }\n\n  removeItem(key: string): Promise<void> {\n    window.localStorage.removeItem(key);\n    return Promise.resolve();\n  }\n\n  clear(): Promise<void> {\n    window.localStorage.clear();\n    return Promise.resolve();\n  }\n}\n\n/**\n * A Class that gets or sets local storage values\n * @type {Ember.Service}\n */\nexport default class LocalStorageService extends Service {\n  namespace = '';\n  tempStorage: Record<string, string | undefined> = {};\n  storage: StorageLike;\n\n  /**\n   * This is used to store things in memory, to simulate localStorage when unavailable,\n   * e.g. third-party cookie blocking makes it unavailable\n   */\n  constructor(...args: any[]) {\n    super(...args);\n    this.storage = Ember.testing ? new InMemoryStorage() : new BrowserStorage();\n  }\n\n  /**\n   * The namespace for local storage\n   */\n  /**\n   * @private\n   * @param key\n   */\n  namespacedKey(key: string): string {\n    return `${this.namespace}_${key}`;\n  }\n\n  /**\n   * Get an item from local storage\n   * @param {String} key - The key you used when the data was set\n   * @returns {Promise} - Resolves with a String of the data that was stored\n   */\n  getItem(key: string): Promise<string | null | undefined> {\n    let promisify: string | null | undefined | PromiseLike<string | null | undefined>;\n    const tempString = this.tempStorage[key];\n    if (tempString) {\n      promisify = tempString;\n    } else if ((talker as Talker).get('handshaken')) {\n      promisify = (talker as Talker)\n        .send('localStorage', {\n          action: 'getItem',\n          key: this.namespacedKey(key),\n        })\n        .then(\n          (message: { data?: { value?: string | null } }) => message.data?.value,\n          () => {\n            try {\n              return this.storage.getItem(this.namespacedKey(key));\n            } catch (e) {\n              return null;\n            }\n          }\n        );\n    } else {\n      promisify = this.storage.getItem(this.namespacedKey(key)).catch(() => null);\n    }\n\n    return Promise.resolve(promisify);\n  }\n\n  /**\n   * Set an item in local storage\n   * @param {String} key - The key which you'll want to later use to retrieve the data\n   * @param {String} value - The data to be stored\n   * @returns {String} - Returns the data that was stored\n   */\n  setItem(key: string, value: string | null): string {\n    const namespacedKey = this.namespacedKey(key);\n    if (value === null) {\n      value = 'null';\n    } // Simulate localStorage's string coercion for temp storage.\n    this.tempStorage[key] = value;\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'setItem', key: namespacedKey, value });\n    }\n    try {\n      void this.storage.setItem(namespacedKey, value);\n    } catch (e) {\n      console.error(e);\n    }\n    return value;\n  }\n\n  /**\n   * Remove an item from local storage\n   * @param {String} key - The key you used when the data was set\n   */\n  removeItem(key: string): void {\n    const namespacedKey = this.namespacedKey(key);\n    if (this.tempStorage[key] !== undefined) {\n      this.tempStorage[key] = undefined;\n    }\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'removeItem', key: namespacedKey });\n    }\n    try {\n      void this.storage.removeItem(this.namespacedKey(key));\n    } catch (e) {\n      console.error(e);\n    }\n  }\n\n  /**\n   * Remove all items from local storage\n   */\n  clear(): void {\n    this.tempStorage = {};\n\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'clear' });\n    }\n\n    try {\n      void this.storage.clear();\n    } catch (e) {\n      console.error(e);\n    }\n  }\n}\n","/* eslint-disable ember/no-classic-classes, ember/no-get */\nimport { get, getProperties } from '@ember/object';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank, isPresent } from '@ember/utils';\nimport duration from 'secondstreet-common/utils/duration';\n\nexport default Service.extend({\n  //region Dependencies\n  localStorage: service(),\n  session: service(),\n  store: service(),\n  //endregion\n\n  //region Methods\n  /**\n   * Generates a login email request, and listens for the login request token to be authenticated\n   * @public\n   * @returns {Promise<[Session]>}\n   * @param redirectPath - encoded location of where the person is in the application\n   * @param email - who is trying to log in\n   * @param optional? - optional entry form submission id & login email request callback\n   */\n  async requestLoginEmail(redirectPath, email, optional = {}) {\n    const { entryFormSubmissionId = null, emailSubmittedCallback = () => {} } = optional;\n    const { localStorage, session, store } = getProperties(this, 'localStorage', 'session', 'store');\n    const sessions = await this.attemptToLoadSessionWithLoginRequestToken();\n    if (isPresent(sessions)) {\n      return sessions;\n    }\n    const loginEmailRequest = await run(() =>\n      store.createRecord('loginEmailRequest', { redirectPath, entryFormSubmissionId, sendTo: email }).save()\n    );\n    emailSubmittedCallback();\n    const loadedSession = get(loginEmailRequest, 'session');\n    if (isPresent(loadedSession)) {\n      return [loadedSession];\n    }\n    const loginRequestToken = get(loginEmailRequest, 'loginRequestToken');\n    localStorage.setItem('loginRequestToken', loginRequestToken);\n    const initialQueryDelay = duration(5000);\n    return session.attemptLoginUsing(loginRequestToken, undefined, initialQueryDelay);\n  },\n  /**\n   * Tries to log in the user using the loginRequestToken within localStorage.\n   * @private\n   * @returns {Promise<[Session]>}\n   */\n  async attemptToLoadSessionWithLoginRequestToken() {\n    const { localStorage, session } = getProperties(this, 'localStorage', 'session');\n    try {\n      const requestToken = await localStorage.getItem('loginRequestToken');\n      return isBlank(requestToken) ? [] : await session.loadStoredSession('', requestToken);\n    } catch (_error) {\n      return [];\n    }\n  },\n  //endregion\n});\n","import MomentService from 'ember-moment/services/moment';\nimport config from '../config/environment';\n\nexport default class MomentOverride extends MomentService {\n  defaultFormat = (config.moment && config.moment.outputFormat) || null;\n}\n","import EmberScreen, { breakpoint } from 'ember-screen';\n\nexport default EmberScreen.extend({\n  isSmallAndUp: breakpoint('(min-width: 34em)'),\n  isMediumAndUp: breakpoint('(min-width: 48em)'),\n  isLargeAndUp: breakpoint('(min-width: 62em)'),\n  isExtraLargeAndUp: breakpoint('(min-width: 75em)'),\n\n  isExtraSmallAndDown: breakpoint('(max-width: 33.9999em)'),\n  isSmallAndDown: breakpoint('(max-width: 47.9999em)'),\n  isMediumAndDown: breakpoint('(max-width: 61.9999em)'),\n  isLargeAndDown: breakpoint('(max-width: 74.9999em)'),\n});\n","/* eslint-disable ember/no-get, ember/use-ember-data-rfc-395-imports, ember/no-classic-classes */\nimport { computed, get, set } from '@ember/object';\nimport { alias, not, readOnly } from '@ember/object/computed';\nimport Evented from '@ember/object/evented';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport DS from 'ember-data';\nimport RSVP from 'rsvp';\nimport { spreadIf } from 'secondstreet-common/utils/functional';\n\nimport ENV from '../config/environment';\nimport localFullUrl from '../utils/local-full-url';\nimport { wait } from '../utils/promises';\nimport talker from '../utils/talker';\n\nconst { keys } = Object;\nconst NO_LOGIN_STRATEGY_ID = 0;\n\nconst userDataMapping = {\n  email: 'userDataEmailAddress',\n  firstName: 'userDataFirstName',\n  lastName: 'userDataLastName',\n  city: 'userDataCity',\n  address1: 'userDataAddress1',\n  address2: 'userDataAddress2',\n  stateProvince: 'userDataStateProvince',\n  postalCode: 'userDataPostalCode',\n  country: 'userDataCountry',\n  gender: 'userDataGender',\n  phone: 'userDataPhone',\n  birthdate: 'userDataBirthDate',\n};\n\n/**\n * Session Manager handles authentication with the Second Street Promotions API\n * @class\n * @fires thirdPartyAuthProviderDetected\n * @fires thirdPartyLoginCanceled\n */\nexport default Service.extend(Evented, {\n  //region Dependencies\n  store: service(),\n  localStorage: service(),\n  //endregion\n\n  // A helper for skipping the login attempt recursion in tests.\n  __skipLoginAttempts: ENV.environment == 'test',\n\n  //region Ember Hooks\n  async init() {\n    this._super(...arguments);\n\n    set(this, 'formIdQueue', this.formIdQueue || []);\n    set(this, 'applicationAdapter', this.store.adapterFor('application'));\n\n    let rootUrl = localFullUrl();\n\n    try {\n      const message = await talker.send('fullUrl', { route: '' });\n      rootUrl = message.data.url;\n    } catch (e) {\n      console.error(e);\n    }\n\n    run(() => !this.isDestroyed && set(this, 'rootUrl', rootUrl));\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * The Session model itself\n   * @private\n   */\n  session: null,\n  referrerUserGuid: null,\n  lastAction: null,\n  hasRecentAction: false,\n  isAdgagement: false,\n  thirdPartyUsesExternalLogin: true,\n  /**\n   * Null if no third party is present, or the ID of the third party if one is present.\n   * @type {?Number}\n   */\n  thirdPartyAuthProvider: null,\n  /**\n   * The third party auth request could come down from the top a few times in a row,\n   * so we need something to track whether we're currently busy trying to fulfill the first one.\n   * @private\n   */\n  isHandlingThirdPartyConnection: false,\n  /**\n   * @property {String[]} - A queue of form ids to be stored in local storage.\n   */\n  formIdQueue: null,\n  //endregion\n\n  //region Methods\n  /**\n   * Call this method any time we know about a Form that the user might be filling out.\n   * Stores form ids in local storage, which will then be used to clear out local storage when the user logs out.\n   * The Session Service will appropriately clear sensitive Form data for all acknowledged forms.\n   * @param formId\n   */\n  async acknowledgeForm(formId) {\n    const { localStorage } = this;\n    const { formIdQueue } = this;\n\n    set(this, 'formIdQueue', formIdQueue || []);\n    formIdQueue.addObject(formId);\n    const formIds = await localStorage.getItem('formIds');\n    if (isEmpty(formIdQueue)) {\n      return;\n    }\n    if (formIds) {\n      run(() => {\n        const ids = [formIdQueue].concat(formIds.split(',')).uniq().compact().join(',');\n        localStorage.setItem('formIds', ids);\n        formIdQueue.clear();\n      });\n    } else {\n      run(() => localStorage.setItem('formIds', formIdQueue.join(',')));\n    }\n  },\n  /**\n   * @private\n   */\n  clearSession() {\n    if (this.session) {\n      this.session.rollbackAttributes();\n      this.store.unloadRecord(this.session);\n      set(this, 'session', null);\n    }\n  },\n  /**\n   * @private\n   * @param {Session} session\n   * @returns {String} - Returns the new session's access token\n   */\n  handleNewSession(session) {\n    if (get(session, 'accessToken') === get(this, 'session.accessToken')) {\n      return get(this, 'session.accessToken');\n    }\n\n    const accessToken = get(session, 'accessToken');\n    this.applicationAdapter.addHeaders({ Authorization: accessToken });\n    run(() => set(this, 'session', session));\n    this.localStorage.setItem('accessToken', accessToken);\n    this.trigger('NewSession');\n    return accessToken;\n  },\n  /**\n   * @private\n   * @param error\n   */\n  handleFailedSession(error) {\n    const errors = keys(error.errors);\n    const isValidationError = error instanceof DS.InvalidError;\n    const isUsernameErrorOnly = errors.length === 1 && errors[0] === 'username';\n    if (isValidationError && isUsernameErrorOnly) {\n      // Swallow errors. TODO: Anything else useful here?\n      return false;\n    }\n    throw error; // TODO: Handle more errors?\n  },\n\n  /**\n   * @private\n   */\n  async handleDeletedSession() {\n    this.clearSession();\n    this.applicationAdapter.removeHeader('Authorization');\n    set(this, 'session', null);\n    set(this, 'hasRecentAction', false);\n    const { localStorage } = this;\n    const storedFormIds = await localStorage.getItem('formIds');\n\n    (storedFormIds || '')\n      .split(',')\n      .uniq()\n      .forEach(formId => {\n        [\n          `FORM_${formId}_currentPageNumber`,\n          `FORM_${formId}_formValues`,\n          `FORM_${formId}_formSubmissionId`,\n          `FORM_${formId}_entryFormSubmissionId`,\n          `FORM_${formId}_mediaItemId`,\n          `FORM_${formId}_videoId`,\n        ].forEach(x => localStorage.removeItem(x));\n      });\n    ['accessToken', 'entryEligibilityDate', 'probablyHasNotFinishedRegistration', 'formIds', 'paymentDetails'].forEach(\n      x => localStorage.removeItem(x)\n    );\n    this.trigger('Logout');\n  },\n\n  /**\n   * Login\n   * @param {String} username\n   * @param {String} [password]\n   * @returns {Ember.RSVP.Promise} - Returns a promise that will either:\n   *                 - resolve with an access Token\n   *                 - reject with the reason the API rejected the login\n   */\n  async login(username, password) {\n    this.clearSession();\n    const session = this.store.createRecord('session', { username, password });\n    try {\n      const result = await session.save();\n      return this.handleNewSession(result);\n    } catch (error) {\n      return this.handleFailedSession(error);\n    }\n  },\n  /**\n   * useExistingSession\n   * @param {Session} session\n   * @returns {String|null} - Returns the session's access token\n   */\n  useExistingSession(session) {\n    return session ? this.handleNewSession(session) : null;\n  },\n  /**\n   * Logout\n   * @returns {Ember.RSVP.Promise}\n   */\n  async logout() {\n    return this.handleDeletedSession();\n  },\n  /**\n   * This turns the session JSON object into a model, calls other session handlers, and makes it available.\n   * @private\n   * @param sessionJson\n   * @returns {Session}\n   */\n  pushSession(sessionJson) {\n    const { store } = this;\n    const sessionModel = store.push(store.serializerFor('session').normalize(store.modelFor('session'), sessionJson));\n    this.handleNewSession(sessionModel);\n    return sessionModel;\n  },\n\n  /**\n   * This turns the session JSON object into a model, calls other session handlers, and makes it available.\n   * @private\n   * @returns {[Session]}\n   * @param store\n   * @param storedToken\n   * @param loginRequestToken\n   */\n  async querySessions(storedToken, loginRequestToken) {\n    const sessions = [];\n\n    if (isPresent(storedToken)) {\n      this.applicationAdapter.addHeaders({ Authorization: storedToken });\n      const loadedSessions = await this.store.query('session', {});\n      sessions.addObjects(loadedSessions.filterBy('organizationUsers'));\n    }\n\n    if (isEmpty(sessions) && isPresent(loginRequestToken)) {\n      try {\n        const loginEmailRequests = await this.store.queryRecord('login-request-session', { loginRequestToken });\n        sessions.addObject(get(loginEmailRequests, 'sessions'));\n        this.localStorage.removeItem('loginRequestToken');\n      } catch (e) {\n        console.error(e);\n      }\n    }\n\n    return sessions;\n  },\n  /**\n   * Load Stored Session or authenticate using passed in accessToken\n   * @param {String?} accessToken - If passed in use this accessToken instead of checking local storage.\n   * @param {String?} emailLoginRequestToken - If passed in use this loginRequestToken instead of checking local storage.\n   * @returns {Ember.RSVP.Promise} - Resolves if there was a valid stored session, rejects if there was not.\n   */\n  async loadStoredSession(accessToken = null, emailLoginRequestToken = null) {\n    const { localStorage } = this;\n    const storedToken = isPresent(accessToken) ? accessToken : await localStorage.getItem('accessToken');\n    const loginRequestToken = emailLoginRequestToken || (await localStorage.getItem('loginRequestToken'));\n    if (get(this, 'session.accessToken') === storedToken && get(this, 'session.organizationUsers')) {\n      return this.store.peekAll('session');\n    }\n\n    try {\n      const sessions = await this.querySessions(storedToken, loginRequestToken);\n      const session = get(sessions, 'lastObject');\n\n      if (session) {\n        if (get(session, 'organizationUsers')) {\n          this.registerAction('return');\n        }\n        this.handleNewSession(session);\n      }\n\n      return sessions;\n    } catch (error) {\n      localStorage.removeItem('accessToken');\n      this.applicationAdapter.removeHeader('Authorization');\n      throw error;\n    }\n  },\n  /**\n   * Login using accessToken\n   * @param {String} accessToken - token that will be used for a login attempt\n   * @returns {Ember.RSVP.Promise} - Resolves if there was a valid stored session, rejects if there was not.\n   */\n  loginUsingAccessToken(accessToken) {\n    return this.loadStoredSession(accessToken);\n  },\n  /**\n   * Login using accessToken :warning: this is recursive\n   * @public\n   * @param {String} loginRequestToken - token that will be used for a login attempt\n   * @param {Date} startTime - time at which the querying started\n   * @param {Number} queryDelay - milliseconds to delay processing the query against the login request\n   * @returns {Ember.RSVP.Promise} for attempting to login\n   */\n  async attemptLoginUsing(loginRequestToken = '', startTime = new Date(), queryDelay = 2000) {\n    if (this.__skipLoginAttempts) return;\n\n    const fiveMinutes = ENV.environment == 'test' ? 500 : 5 * 60 * 1000;\n\n    if (this.isLoggedIn) {\n      return RSVP.resolve([this.session]);\n    }\n    if (new Date() - startTime >= fiveMinutes) {\n      throw new Error('Logging in with login request token ran out of time :(');\n    }\n    if (isEmpty(loginRequestToken)) {\n      throw new Error('missing login request token');\n    }\n\n    let sessions = [];\n\n    try {\n      await wait(ENV.environment === 'test' ? 1 : queryDelay);\n      sessions = await this.loadStoredSession(null, loginRequestToken);\n    } catch (e) {\n      console.error(e);\n    }\n\n    return isPresent(sessions) ? sessions : this.attemptLoginUsing(loginRequestToken, startTime);\n  },\n  registerAction(action) {\n    set(this, 'lastAction', action);\n    set(this, 'hasRecentAction', true);\n  },\n  async isThirdPartyEnabledViaAPI(message) {\n    const thirdPartyAuthSetting =\n      this.store.peekAll('setting').findBy('key', 'third_party_id') ||\n      (await this.store.queryRecord('setting', { key: 'third_party_id' }));\n    if (get(thirdPartyAuthSetting, 'value')) {\n      set(this, 'thirdPartyAuthProvider', message.data.info);\n\n      if (this.thirdPartyAuthProvider.thirdPartyLoginStrategy === NO_LOGIN_STRATEGY_ID) {\n        set(this, 'thirdPartyUsesExternalLogin', false);\n      }\n\n      this.trigger(this, 'thirdPartyAuthProviderDetected');\n    }\n  },\n  declareAdgagement() {\n    set(this, 'isAdgagement', true);\n  },\n  async handleThirdPartyConnection({ uuid, thirdPartyId, ...additionalFields }) {\n    if (this.isHandlingThirdPartyConnection) {\n      return;\n    }\n\n    const matchesUUID = `${get(this, 'session.thirdPartyUniqueUserId')}` === uuid;\n    const matchesThirdParty = get(this, 'session.thirdPartyId') === thirdPartyId;\n    if (matchesUUID && matchesThirdParty) {\n      return;\n    }\n\n    const done = x => {\n      set(this, 'isHandlingThirdPartyConnection', false);\n      return x;\n    };\n    set(this, 'isHandlingThirdPartyConnection', true);\n    const record = this.store.createRecord('thirdPartyUserConnection', {\n      thirdPartyId,\n      thirdPartyUniqueUserId: uuid,\n      ...spreadIf(!uuid && Object.keys(additionalFields).length, {\n        userDataEmailAddress: additionalFields.email,\n        userDataFirstName: additionalFields.firstName,\n        userDataLastName: additionalFields.lastName,\n        userDataCity: additionalFields.city,\n        userDataAddress1: additionalFields.address1,\n        userDataAddress2: additionalFields.address2,\n        userDataStateProvince: additionalFields.stateProvince,\n        userDataPostalCode: additionalFields.postalCode,\n        userDataCountry: additionalFields.country,\n        userDataGender: additionalFields.gender,\n        userDataPhone: additionalFields.phone,\n        userDataBirthDate: additionalFields.birthdate,\n      }),\n    });\n    try {\n      const thirdPartyConnection = await record.save();\n      if (additionalFields) {\n        Object.keys(additionalFields).forEach(prop => {\n          if (additionalFields[prop] && !thirdPartyConnection[userDataMapping[prop]]) {\n            window.console.error(\n              `The \"${prop}\" property sent to Upland Second Street via ClientSideLoginData was invalid. We skipped this property for this user.`\n            );\n          }\n        });\n      }\n      this.registerAction('return');\n      this.handleNewSession(get(thirdPartyConnection, 'session'));\n    } catch (error) {\n      // If we failed this request, it's probably because we don't have\n      // the partner's third party credentials. If that's the case,\n      // we should just pretend like it's not even available.\n      set(this, 'thirdPartyAuthProvider', null);\n      throw error;\n    } finally {\n      done();\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  /**\n   * The user's username (read-only)\n   * @type {Ember.ComputedProperty}\n   */\n  username: readOnly('session.username'),\n  referrerUrl: computed('rootUrl', 'session.organizationPromotionUserGuid', function () {\n    const guid = get(this, 'session.organizationPromotionUserGuid');\n    const { rootUrl } = this;\n    return guid ? `${rootUrl}referrals/${guid}` : rootUrl;\n  }),\n  /**\n   * Access Token\n   * @returns {String} - The Access Token for the Second Street Promotions API\n   * @type {Ember.ComputedProperty}\n   */\n  accessToken: alias('session.accessToken'),\n  /**\n   * Current Organization Promotion User's Id\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationPromotionUserId: computed('session.organizationPromotionUserId', function () {\n    return `${get(this, 'session.organizationPromotionUserId')}`;\n  }),\n  /**\n   * Current User's First Name\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationUserFirstName: computed('session.organizationUsers.firstName', function () {\n    return get(this, 'session.organizationUsers.firstName');\n  }),\n  /**\n   * The user's organization user id (read-only)\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationUserId: computed('session.organizationUserId', function () {\n    return `${get(this, 'session.organizationUserId')}`;\n  }).readOnly(),\n  /**\n   * Current Organization User's Guid\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationPromotionUserGuid: alias('session.organizationPromotionUserGuid'),\n  /**\n   * Is Registered\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isRegistered: computed('session', 'session.{isNew,isLoaded,isValid}', function () {\n    const { session } = this;\n    return !!session && get(session, 'isValid') && get(session, 'isLoaded') && !get(session, 'isNew');\n  }),\n  /**\n   * Is Logged In\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isLoggedIn: computed('session.organizationUsers', function () {\n    return this.isRegistered && get(this, 'session.organizationUsers');\n  }),\n  /**\n   * Reads the status type of the session's organization user to determine if the session is authorized (read-only)\n   * @type {Ember.ComputedProperty}\n   */\n  isAuthorized: readOnly('session.organizationUsers.isActive'),\n  isThirdParty: computed('isLoggedIn', 'session.{thirdPartyId,thirdPartyUniqueUserId}', function () {\n    if (this.isLoggedOut) {\n      return false;\n    }\n    return !!this.session.thirdPartyId;\n  }),\n  /**\n   * Is Logged Out\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isLoggedOut: not('isLoggedIn'),\n  usesSecondStreetLogin: computed('thirdPartyAuthProvider', 'thirdPartyUsesExternalLogin', function () {\n    return !this.thirdPartyAuthProvider || !this.thirdPartyUsesExternalLogin;\n  }),\n  //endregion\n});\n","/* eslint-disable ember/no-classic-classes */\nimport { get, set } from '@ember/object';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank } from '@ember/utils';\nconst isEmbeddedRegex = /facebook.+\\.secondstreetapp\\.com\\/(\\d+)(\\/.*)?/i;\n\nconst getLocation = (href = '') => {\n  //Create a link for the url to have the browser tokenize the url for us.\n  const link = document.createElement('a');\n  link.href = href.startsWith('http') ? href : `http://${href}`;\n  return `${link.pathname}${link.search}`;\n};\n/*\n * A Class that gets a social service shorten URL containing OpenGraph tags for a relevant consumer site.\n * @type {Ember.Service}\n */\nexport default Service.extend({\n  store: service('store'),\n\n  //region Properties\n  /**\n   * @private\n   * @property {Promise<DS.AdapterPopulatedRecordArray>?}\n   */\n  domainQuery: null,\n  //endregion\n\n  //region Methods\n  organizationPromotionDomain(url) {\n    const isEmbedded = isEmbeddedRegex.test(url);\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec\n    const [, regexResult] = isEmbeddedRegex.exec(url) || []; // Anything after the first element is the parenthesized substring matches, if any\n\n    return isEmbedded ? `/fb-${regexResult}` : '';\n  },\n\n  async findPrimaryDomain(organizationId) {\n    let domains = this.store.peekAll('domain').filterBy('domainTypeId', 1);\n\n    if (isBlank(domains)) {\n      const existingDomainQuery = this.domainQuery;\n\n      if (existingDomainQuery) {\n        domains = await existingDomainQuery;\n      } else {\n        const domainQuery = this.store.query('domain', { organizationId });\n        set(this, 'domainQuery', domainQuery);\n\n        domains = await domainQuery;\n\n        set(this, 'domainQuery', null);\n      }\n    }\n\n    return get(domains.findBy('isPrimary'), 'hostname');\n  },\n\n  async shorten({ url, pathname }, organizationId, organizationPromotionId) {\n    const path = pathname || getLocation(url);\n    let primaryDomain = await this.findPrimaryDomain(organizationId);\n\n    if (primaryDomain?.indexOf('.secondstreetapp.com') < 0) {\n      primaryDomain = 'consumers.secondstreetapp.com';\n    }\n\n    const facebook = this.organizationPromotionDomain(url);\n\n    return `${primaryDomain}/og${facebook}/${organizationPromotionId}${path}`;\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { computed, get, set, setProperties } from '@ember/object';\nimport { gt, readOnly, sort } from '@ember/object/computed';\nimport Service, { inject as service } from '@ember/service';\nimport { underscore } from '@ember/string';\nimport { isPresent } from '@ember/utils';\nimport { task, timeout } from 'ember-concurrency';\nimport ENV from 'ember-get-config';\nimport moment from 'moment';\nimport RSVP from 'rsvp';\nimport duration from 'secondstreet-common/utils/duration';\n\nconst ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS = 77;\nexport default class VotesService extends Service {\n  @service entries;\n  @service logger;\n  @service session;\n  @service store;\n  @service current;\n\n  constructor() {\n    super(...arguments);\n\n    if (this.session.isLoggedIn) this.loadVotes();\n    this.session.on('NewSession', this, 'loadVotes');\n  }\n\n  /**\n   * Only use this for computed property dependent keys. Do not access it directly outside the service.\n   * @private\n   * @property {Vote[]}\n   */\n  userVotes = [];\n\n  /**\n   * Used internally to track whether we are in the middle of a vote submission.\n   * Exposed as the read-only `isDeletingVoteForMatchupEntryId` property.\n   * @private\n   * @property {?String}\n   */\n  _isDeletingVoteForMatchupEntryId = null;\n\n  /**\n   * Used internally to track whether we are in the middle of a vote submission.\n   * Exposed as the read-only `isVotingOnMatchupEntryId` property.\n   * @private\n   * @property {?String}\n   */\n  _isVotingOnMatchupEntryId = null;\n\n  /**\n   * The order votes are sorted to get the most current.\n   * @private\n   */\n  voteSortingDesc = ['id:desc'];\n\n  /**\n   * The date when the voting period begins.\n   * @private\n   * @property {?Date}\n   */\n  voteIntervalStartDate = null;\n\n  /**\n   * The date when the voting period ends.\n   * @private\n   * @property {?Date}\n   */\n  voteIntervalEndDate = null;\n\n  /**\n   * @property {Boolean}\n   */\n  isLoading = false;\n\n  /**\n   * This is set by the `ss-form-entry-registration` when it needs load vote data for a matchup\n   * @type {Boolean}\n   */\n  loadingVote = false;\n\n  /**\n   * This is set by the `ss-form-entry-registration` when it needs delete vote data for a matchup in order to cast a new vote\n   * @type {Boolean}\n   */\n  recastingVote = false;\n\n  /**\n   * Returns votes for the current user made within the current voting interval,\n   * or if there is no current voting interval, within the interval in which the user most recently voted in that matchup.\n   * Note: This does *not* update with the clock, so it may get out of date since it's time-based.\n   * @property {Vote[]}\n   * @readonly\n   * @public\n   **/\n  @computed('userVotes.[]', 'voteIntervalStartDate', 'voteIntervalEndDate', 'session.isLoggedIn')\n  get currentVotes() {\n    const { userVotes } = this;\n    if (this.voteIntervalStartDate && this.voteIntervalEndDate) {\n      return userVotes.filter(vote =>\n        this.isVoteInInterval(vote, this.voteIntervalStartDate, this.voteIntervalEndDate)\n      );\n    }\n    return userVotes.sortBy('createDate').uniqBy('matchupEntry.matchup.id');\n  }\n\n  /**\n   * Returns currentVotes in order of the newest to the oldest\n   * @property {Vote[]}\n   * @readonly\n   * @public\n   */\n  @sort('currentVotes', 'voteSortingDesc') sortedCurrentVotes;\n\n  /**\n   * Whether the user has ever voted in the entire contest, regardless of intervals.\n   * @property {Boolean}\n   * @readonly\n   * @public\n   */\n  @gt('userVotes.length', 0) hasEverVoted;\n\n  /**\n   * If currently deleting a vote, returns its matchupEntry ID. Otherwise, null.\n   * @property {?String}\n   * @readonly\n   * @public\n   */\n  @readOnly('_isDeletingVoteForMatchupEntryId') isDeletingVoteForMatchupEntryId;\n\n  /**\n   * If currently creating a vote, returns its matchupEntry ID. Otherwise, null.\n   * @property {?String}\n   * @readonly\n   * @public\n   */\n  @readOnly('_isVotingOnMatchupEntryId') isVotingOnMatchupEntryId;\n\n  /**\n   * The most recent vote the user has created.\n   * @property {Vote}\n   * @readonly\n   * @public\n   */\n  @readOnly('sortedCurrentVotes.firstObject') currentVote;\n\n  /**\n   * If the current date is within the voting date range\n   * @property {Boolean}\n   * @readonly\n   * @public\n   */\n  @computed('voteIntervalStartDate', 'voteIntervalEndDate')\n  get isVotingOpen() {\n    const today = new Date();\n    return this.voteIntervalStartDate <= today && today < this.voteIntervalEndDate;\n  }\n\n  /**\n   * Can the user vote again for a given {@link Matchup}?\n   * Note: There can only ever be one vote per matchup per interval.\n   * @public\n   * @param {Matchup} matchup\n   * @returns {Boolean}\n   */\n  canVoteAgain(matchup) {\n    const existingVote = this.currentVotes.find(v => `${v.matchupId}` === get(matchup, 'id'));\n    return !existingVote;\n  }\n\n  getVotes(bypassCache = false) {\n    return this.store.query('vote', { allowPending: true, BypassCache: bypassCache });\n  }\n\n  async loadVotes(bypassCache = false) {\n    const { organizationPromotion } = this.current.data;\n    if (!this.session.isLoggedIn) return;\n\n    set(this, 'isLoading', true);\n\n    try {\n      const { userVotes } = this;\n      userVotes.clear();\n      if (get(organizationPromotion, 'promotion.isBallot')) {\n        this.refreshReminderEmailsUserAttributeTask.perform();\n      }\n      const votes = await this.getVotes(bypassCache);\n      userVotes.addObjects(votes.toArray());\n      this.session.trigger('ActiveSession');\n      this.extractDatesFromMeta(votes);\n    } catch (e) {\n      // This is most likely a UGC promotion type\n      // That doesn't use voting resulting\n      // in a 501 from the server\n      console.warn(e);\n    } finally {\n      set(this, 'isLoading', false);\n      this.previouslyRefreshedAt = new Date();\n      this.refreshVotesTask.perform();\n    }\n  }\n\n  refreshReminderEmailsUserAttributeTask = task({ drop: true }, async () => {\n    let orgUserAttribute;\n    orgUserAttribute = this.store\n      .peekAll('organization-user-attribute')\n      .filterBy('organizationuserId', this.session.organizationUserId);\n\n    if (!orgUserAttribute?.firstObject) {\n      orgUserAttribute = await this.store.query('organization-user-attribute', {\n        organizationPromotionId: this.current.organizationPromotion.id,\n        organizationUserId: this.session.organizationUserId,\n        userAttributeTypeId: ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS,\n      });\n    }\n    this.current.update({\n      reminderEmailOptin: orgUserAttribute.firstObject ? orgUserAttribute.firstObject : null,\n    });\n  });\n\n  refreshVotesTask = task({ drop: true }, async () => {\n    while (ENV.environment != 'test') {\n      await timeout(duration(60 * 1000));\n\n      const nextRefresh = moment(this.previouslyRefreshedAt).add(1, 'hour').startOf('hour').toDate();\n\n      this.logger.log('Should refresh votes?', nextRefresh, new Date());\n\n      if (nextRefresh < new Date()) {\n        await this.loadVotes();\n      }\n    }\n  });\n\n  /**\n   * @private\n   */\n  clearVotes() {\n    this.userVotes.clear();\n  }\n\n  /**\n   * Note: If we want to make this public, we'll have to re-think how we handle `isDeletingVoteForMatchupEntryId`\n   * @private\n   * @param {Vote} vote\n   * @returns {Promise}\n   */\n  unVote(vote, isBallot) {\n    const noop = () => {};\n\n    // Ballot write-in entries are deleted, so no need to delete vote directly\n    if (isBallot && this.isVoteWrittenIn(vote)) {\n      return vote;\n    }\n\n    return vote.destroyRecord().catch(noop);\n  }\n\n  /**\n   * @public\n   */\n  isVoteWrittenIn(vote) {\n    const entries = this.entries.userEntries.findBy('matchupId', get(vote, 'matchupId').toString());\n    return entries && isPresent(vote) && [entries].flat().isAny('id', get(vote, 'matchupEntry.id'));\n  }\n\n  /**\n   * Note that there should only ever be one vote per matchup per interval. When submitting a vote,\n   * any existing votes that match the current interval and the submitted matchupEntry's  matchup will be deleted.\n   * @public\n   * @param {MatchupEntry} matchupEntry - The MatchupEntry you'd like to vote for in the current interval\n   * @returns {Promise} - Resolves with the created Vote\n   */\n  async submitVote(matchupEntry, { allowMultipleVotes = false, isBallot = false, count = 1 } = {}) {\n    let newVoteResult;\n    const matchupEntryId = matchupEntry.id;\n    const voteToDelete = this.findVoteWithinMatchupForCurrentInterval(matchupEntry.matchup);\n    if (!allowMultipleVotes && voteToDelete && get(voteToDelete, 'matchupEntry.id') === matchupEntryId && !isBallot) {\n      this.session.registerAction('vote'); // still register an action to get the login info to display\n      return voteToDelete; // if voting for the vote that we just found, just return it\n    }\n    const promise =\n      !allowMultipleVotes && voteToDelete && !(get(voteToDelete, 'matchupEntry.id') === matchupEntryId && isBallot)\n        ? this.unVote(voteToDelete, isBallot)\n        : RSVP.resolve();\n\n    setProperties(this, {\n      _isDeletingVoteForMatchupEntryId:\n        !allowMultipleVotes && voteToDelete && !(get(voteToDelete, 'matchupEntry.id') === matchupEntryId && isBallot)\n          ? get(voteToDelete, 'matchupEntry.id')\n          : null,\n      _isVotingOnMatchupEntryId: matchupEntryId,\n      isSaving: true,\n    });\n\n    const [deletedVote] = await RSVP.all([promise, timeout(1250)]);\n    const { userVotes } = this;\n    userVotes.removeObject(deletedVote);\n\n    try {\n      const vote = this.store.createRecord('vote', { matchupId: get(matchupEntry, 'matchup.id') });\n      set(vote, 'matchupEntry', matchupEntry);\n      if (count > 1) {\n        set(vote, 'voteWeight', count);\n      }\n      this.session.registerAction('vote');\n\n      newVoteResult = await vote.save();\n\n      this.userVotes.addObjects(userVotes);\n      this.userVotes.addObject(vote);\n\n      if (!this.voteIntervalStartDate && !this.voteIntervalEndDate) {\n        // in odd scenarios where somehow there are no vote interval dates set, rerun the logic to extract dates from meta\n        const votes = await this.getVotes();\n        this.extractDatesFromMeta(votes);\n      }\n    } finally {\n      set(this, '_isVotingOnMatchupEntryId', null);\n      set(this, '_isDeletingVoteForMatchupEntryId', null);\n      set(this, 'isSaving', false);\n    }\n\n    return newVoteResult;\n  }\n\n  currentVotesForMatchupEntry(matchupEntry) {\n    const startDate = this.voteIntervalStartDate;\n    const endDate = this.voteIntervalEndDate;\n\n    return this.currentVotes.filter(item => {\n      let ret = this.isVoteForMatchupEntry(item, matchupEntry);\n      if (startDate && endDate) {\n        ret = ret && this.isVoteInInterval(item, startDate, endDate);\n      }\n      return ret;\n    });\n  }\n\n  currentVoteForMatchupEntry(matchupEntry) {\n    const votes = this.currentVotesForMatchupEntry(matchupEntry);\n    return votes.length > 0 ? votes[0] : null;\n  }\n\n  isCurrentlyVotedFor(matchupEntry) {\n    const votes = this.currentVotesForMatchupEntry(matchupEntry);\n    return votes.length > 0;\n  }\n\n  findVoteWithinMatchupForCurrentInterval(matchup) {\n    return this.currentVotes.find(\n      vote => `${vote.matchupId}` === get(matchup, 'id') && vote.dateCreated > this.voteIntervalStartDate\n    );\n  }\n\n  /**\n   * Shortcut method to extract the vote eligibility date and vote interval dates from the meta Object\n   * @private\n   * @param {Object} meta\n   */\n  extractDatesFromMeta(recordWithMeta) {\n    const { meta } = recordWithMeta;\n\n    set(this, 'voteIntervalStartDate', this.extractDateFromMeta(meta, 'voteIntervalStartDate'));\n    set(this, 'voteIntervalEndDate', this.extractDateFromMeta(meta, 'voteIntervalEndDate'));\n  }\n\n  /**\n   * Get a specified date from the meta object.\n   * Since Entry Showcase promotions' Matchups will always have matching dates, we can just pick one.\n   * @private\n   * @param {Object} meta\n   * @param {string} property\n   */\n  extractDateFromMeta(meta, property) {\n    try {\n      const eligibilityMetadata = meta.voteEligibilityMetaData;\n\n      if (eligibilityMetadata) {\n        return new Date(eligibilityMetadata[0][underscore(property)]);\n      }\n    } catch (e) {\n      console.error('Problem with meta property: ', property);\n    }\n\n    return null;\n  }\n\n  /**\n   * Returns true if the any vote for any category was made within a given interval.\n   * @private\n   * @param {Vote} vote\n   * @param {Date} startDate\n   * @param {Date} endDate\n   */\n  isVoteInInterval(vote, startDate, endDate) {\n    const { dateCreated } = vote;\n    return startDate <= dateCreated && dateCreated <= endDate;\n  }\n\n  /**\n   * Returns true if the vote was made for a given matchupEntryId.\n   * @private\n   * @param {Vote} vote\n   * @param {MatchupEntry} matchupEntry\n   * @returns {Boolean}\n   */\n  isVoteForMatchupEntry(vote, matchupEntry) {\n    return matchupEntry.id === get(vote, 'matchupEntry.id');\n  }\n\n  /**\n   * Returns true if the vote was made for a given matchupEntryId.\n   * @private\n   * @param {Vote} vote\n   * @param {Matchup} matchup\n   * @returns {Boolean}\n   */\n  isVoteForMatchup(vote, matchup) {\n    return get(vote, 'matchupEntry.matchup.id') === get(matchup, 'id');\n  }\n}\n","import { TAB } from './keycodes';\n\nconst focusableSelector = [\n  'button:not(:disabled)',\n  'a[href]',\n  'area[href]',\n  'input:not(:disabled)',\n  'select:not(:disabled)',\n  'textarea:not(:disabled)',\n  'iframe',\n  'object',\n  'embed',\n  '[contenteditable]',\n  '[tabindex]:not([tabindex=\"-1\"])',\n  '[role=\"button\"]',\n].join(', ');\n\nexport const focusFirstIn = el => {\n  if (!el) {\n    return;\n  }\n  (el.querySelector(focusableSelector) || el).focus();\n};\n\n// dir: 1 (next) | -1 (previous)\nconst focusNextPrevIn = dir => el => {\n  const focusableElements = [...el.querySelectorAll(focusableSelector)];\n  const focusIndex = focusableElements.indexOf(document.activeElement);\n  const wasNotFocusedInModal = focusIndex < 0;\n  const isFocusedAtBounds = dir > 0 ? focusIndex === focusableElements.length - 1 : focusIndex === 0;\n\n  if (wasNotFocusedInModal) {\n    return focusFirstIn(el);\n  }\n\n  // This \"wraps\" at the beginning/end.\n  if (isFocusedAtBounds) {\n    if (dir > 0) {\n      return focusFirstIn(el);\n    }\n    if (dir < 0) {\n      return (focusableElements[focusableElements.length - 1] || el).focus();\n    }\n  }\n\n  return focusableElements[focusIndex + dir].focus();\n};\nexport const focusNextIn = focusNextPrevIn(1);\nexport const focusPreviousIn = focusNextPrevIn(-1);\n\n/**\n * @class FocusConstrainer\n * @property {HTMLElement?} lastFocus\n */\nexport class FocusConstrainer {\n  /**\n   * @param {HTMLElement} element\n   * @returns {FocusConstrainer}\n   */\n  constructor(element) {\n    this.element = element;\n    this.lastFocus = null;\n    this.keydownListener = this.keydownListener.bind(this);\n    return this;\n  }\n\n  /**\n   * When the modal is inserted, it listens for attempted TAB keydowns. This\n   * function only fires when the user tries to TAB to an element. When the\n   * user tries to TAB to an element, this listener focuses the next focusable\n   * element inside the modal, and at the end, we \"wrap\" their focus back to the\n   * first focusable element in the modal.\n   *\n   * This ensures that users cannot \"lose\" their focus behind the modal by\n   * focusing on something that's covered up. It also ensures that if we're in\n   * an iframe, the user can't \"jump\" out of the iframe using TAB.\n   *\n   * @param {KeydownEvent}\n   * @private\n   */\n  keydownListener(event) {\n    if (event.keyCode === TAB) {\n      event.preventDefault();\n      event.stopPropagation();\n      event.shiftKey ? focusPreviousIn(this.element) : focusNextIn(this.element);\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * @param {HTMLElement} element\n   * @returns {FocusConstrainer}\n   * @public\n   */\n  configure(element) {\n    this.element = element;\n    return this;\n  }\n\n  /**\n   * @public\n   * @returns {FocusConstrainer}\n   */\n  begin() {\n    this.lastFocus = document.activeElement || null;\n    // For the reasons documented at `keydownListener`, move focus to the modal\n    focusFirstIn(this.element);\n    document.addEventListener('keydown', this.keydownListener);\n    return this;\n  }\n\n  /**\n   * @public\n   * @returns {FocusConstrainer}\n   */\n  end() {\n    document.removeEventListener('keydown', this.keydownListener);\n    this.lastFocus && this.lastFocus.focus();\n    return this;\n  }\n}\n\n/**\n * @class KeyListener\n */\nexport class KeyListener {\n  /**\n   * @param {Object<string, (KeyboardEvent) => null>} [config]\n   * @returns {KeyListener}\n   */\n  constructor(config = {}) {\n    this.listeners = config;\n    this.keycodeListener = this.keycodeListener.bind(this);\n    return this;\n  }\n\n  /**\n   * @private\n   * @param {KeyboardEvent} [event]\n   */\n  keycodeListener(event) {\n    if (this.listeners[event.keyCode]) {\n      this.listeners[event.keyCode](event);\n    }\n  }\n\n  /**\n   * @param {Object<string, (KeyboardEvent) => null>} [config]\n   * @returns {KeyListener}\n   * @public\n   */\n  configure(config = {}) {\n    this.listeners = config;\n    return this;\n  }\n\n  /**\n   * @returns {KeyListener}\n   * @public\n   */\n  begin() {\n    document.addEventListener('keydown', this.keycodeListener);\n    return this;\n  }\n\n  /**\n   * @returns {KeyListener}\n   * @public\n   */\n  end() {\n    document.removeEventListener('keydown', this.keycodeListener);\n    return this;\n  }\n}\n","/**\n * Crappy logic for a crappy problem of browser detection.\n * Taken straight from: http://stackoverflow.com/questions/5916900/detect-version-of-browser\n * @returns {String}\n */\nexport default function browserVersion() {\n  const ua = navigator.userAgent;\n  let tem = null;\n\n  let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n  if (/trident/i.test(M[1])) {\n    tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n    return `IE ${tem[1] || ''}`;\n  }\n  if (M[1] === 'Chrome') {\n    tem = ua.match(/\\bOPR\\/(\\d+)/);\n    if (tem !== null) {\n      return `Opera ${tem[1]}`;\n    }\n  }\n  M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n  if ((tem = ua.match(/version\\/(\\d+)/i)) !== null) {\n    M.splice(1, 1, tem[1]);\n  }\n  return M.join(' ');\n}\n","import { computed, get } from '@ember/object';\n\n/**\n * For a given array, determine whether the current date falls between the supplied start and end date values.\n *\n * @param arrayPath {String} - The array holding the objects or values you want to search\n * @param beginDatePath {String} - The property containing the start date\n * @param endDatePath {String} - The property containing the end date\n */\nexport const isNowBetweenAnyDates = (arrayPath, beginDatePath, endDatePath) =>\n  computed(`${arrayPath}.@each.{${beginDatePath},${endDatePath}}`, function () {\n    const arr = get(this, arrayPath) || [];\n    const now = new Date();\n    return arr.some(item => now >= get(item, beginDatePath) && now <= get(item, endDatePath));\n  });\n\nexport default {\n  isNowBetweenAnyDates,\n};\n","import ConfigUtil from 'consumer/utils/config';\n\nexport default ConfigUtil;\n","export * from 'consumer/utils/encode';\n","import fixColorContrast from 'consumer/utils/fix-color-contrast';\n\nexport default fixColorContrast;\n","/*!\n * Based on David J Bradshaw's iFrame Resizer\n * https://github.com/davidjbradshaw/iframe-resizer/\n * Copyright © 2013-14 David J. Bradshaw. Licensed under the MIT license.\n */\nconst base = 10;\n// document.documentElement.offsetHeight is not reliable, so\n// we have to jump through hoops to get a better value.\nfunction getBodyOffsetHeight() {\n  function getComputedBodyStyle(prop) {\n    function convertUnitsToPxForIE8(value) {\n      const PIXEL = /^\\d+(px)?$/i;\n\n      if (PIXEL.test(value)) {\n        return parseInt(value, base);\n      }\n\n      const style = el.style.left;\n      const runtimeStyle = el.runtimeStyle.left;\n\n      el.runtimeStyle.left = el.currentStyle.left;\n      el.style.left = value || 0;\n      value = el.style.pixelLeft;\n      el.style.left = style;\n      el.runtimeStyle.left = runtimeStyle;\n\n      return value;\n    }\n\n    const el = document.body;\n    let retVal = 0;\n\n    if ('defaultView' in document && 'getComputedStyle' in document.defaultView) {\n      retVal = document.defaultView.getComputedStyle(el, null);\n      retVal = retVal !== null ? retVal[prop] : 0;\n    } else {\n      //IE8\n      retVal = convertUnitsToPxForIE8(el.currentStyle[prop]);\n    }\n\n    return parseInt(retVal, base);\n  }\n\n  return document.body.offsetHeight + getComputedBodyStyle('marginTop') + getComputedBodyStyle('marginBottom');\n}\n\nfunction getBodyScrollHeight() {\n  return document.body.scrollHeight;\n}\n\nfunction getDEOffsetHeight() {\n  return document.documentElement.offsetHeight;\n}\n\nfunction getDEScrollHeight() {\n  return document.documentElement.scrollHeight;\n}\n\n//From https://github.com/guardian/iframe-messenger\nfunction getLowestElementHeight() {\n  const allElements = document.querySelectorAll('body *');\n  const allElementsLength = allElements.length;\n  let maxBottomVal = 0;\n\n  for (let i = 0; i < allElementsLength; i++) {\n    if (allElements[i].getBoundingClientRect().bottom > maxBottomVal) {\n      maxBottomVal = allElements[i].getBoundingClientRect().bottom;\n    }\n  }\n\n  return maxBottomVal;\n}\n\nfunction getAllHeights() {\n  return [getBodyOffsetHeight(), getBodyScrollHeight(), getDEOffsetHeight(), getDEScrollHeight()];\n}\n\nfunction getMaxHeight() {\n  return Math.max.apply(null, getAllHeights());\n}\n\nfunction getMinHeight() {\n  return Math.min.apply(null, getAllHeights());\n}\n\nfunction getBestHeight() {\n  return Math.max(getBodyOffsetHeight(), getLowestElementHeight());\n}\n\nexport const offset = getBodyOffsetHeight; //Backward compatability\nexport const bodyOffset = getBodyOffsetHeight;\nexport const bodyScroll = getBodyScrollHeight;\nexport const documentElementOffset = getDEOffsetHeight;\nexport const documentScroll = getDEScrollHeight; //Backward compatability\nexport const documentElementScroll = getDEScrollHeight;\nexport const max = getMaxHeight;\nexport const min = getMinHeight;\nexport const grow = getMaxHeight;\nexport const lowestElement = getBestHeight;\n","export const BACKSPACE = 8;\nexport const TAB = 9;\nexport const ENTER = 13;\nexport const SHIFT = 16;\nexport const CTRL = 17;\nexport const ALT = 18;\nexport const PAUSE_BREAK = 19;\nexport const CAPS_LOCK = 20;\nexport const ESC = 27;\nexport const SPACE = 32;\nexport const PAGE_UP = 33;\nexport const PAGE_DOWN = 34;\nexport const END = 35;\nexport const HOME = 36;\nexport const LEFT = 37;\nexport const UP = 38;\nexport const RIGHT = 39;\nexport const DOWN = 40;\nexport const INSERT = 45;\nexport const DELETE = 46;\nexport const COMMAND = 91;\nexport const LEFT_COMMAND = 91;\nexport const RIGHT_COMMAND = 93;\nexport const NUMPAD_ASTERISK = 106;\nexport const NUMPAD_PLUS = 107;\nexport const NUMPAB_MINUS = 109;\nexport const NUMPAD_DOT = 110;\nexport const NUMPAD_SLASH = 111;\nexport const NUM_LOCK = 144;\nexport const SCROLL_LOCK = 145;\nexport const MY_COMPUTER = 182;\nexport const MY_CALCULATOR = 183;\nexport const SEMICOLON = 186; // ;\nexport const EQUALS = 187; // =\nexport const COMMA = 188; // ,\nexport const MINUS = 189; // -\nexport const DOT = 190; // .\nexport const SLASH = 191; // /\nexport const GRAVE = 192; // `\nexport const LEFT_BRACKET = 219; // [\nexport const BACKSLASH = 220; // \\\nexport const RIGHT_BRACKET = 221; // ]\nexport const QUOTE = 222; // '\n","import rootUrl from '../utils/root-url';\n\n/**\n * Returns the local window url excluding any additional routing or parameters.\n * @returns {String}\n */\nexport default function localFullUrl() {\n  if (window.location.origin) {\n    return window.location.origin + rootUrl();\n  }\n\n  const origin = `${window.location.protocol}//${window.location.hostname}${\n    window.location.port ? `:${window.location.port}` : ''\n  }`;\n\n  return origin + rootUrl();\n}\n","import { firstObject } from 'secondstreet-common/utils/array';\nimport { isEmpty } from '@ember/utils';\nimport { lastObject } from 'secondstreet-common/utils/array';\n\n// TODO: Use the model type once converted to TypeScript\ntype MatchupModel = {\n  id: string;\n  startDate: Date;\n  endDate?: Date;\n};\n\nexport function currentMatchup(matchups: MatchupModel[]) {\n  const now = new Date();\n\n  const relevantMatchups = matchups.map(matchup => {\n    const { startDate, endDate } = matchup;\n\n    // Best choice is whatever, because there should always be either 0 or 1 possible current round.\n    return !endDate || (startDate < now && endDate > now) ? matchup : null;\n  });\n\n  return firstObject(relevantMatchups.filter(matchup => !isEmpty(matchup))) || null;\n}\n\nexport function mostRecentMatchup(matchups: MatchupModel[]) {\n  const now = new Date();\n\n  return lastObject(\n    matchups.filter(matchup => matchup.startDate < now).sort((a, b) => a.startDate.getTime() - b.startDate.getTime())\n  );\n}\n","import { get } from '@ember/object';\n\n/**\n * Determines the correct matchup to show the user based on the current state of the contest.\n * Prefer the current matchup. If we're between rounds, prefer the soonest to begin. If we're after the contest, simply show the last.\n * @param matchups {Matchup[]}\n * @returns {Matchup}\n */\nexport default function mostCurrentMatchup(matchups) {\n  const today = new Date();\n  const sortedMatchups = matchups.sortBy('startDate');\n  const currentMatchup = sortedMatchups.find(\n    matchup => today >= get(matchup, 'startDate') && today <= get(matchup, 'endDate')\n  );\n  if (currentMatchup) {\n    return currentMatchup;\n  }\n  const nextMatchup = sortedMatchups.find(matchup => today < get(matchup, 'startDate'));\n  if (nextMatchup) {\n    return nextMatchup;\n  }\n  return get(sortedMatchups.reverse(), 'lastObject');\n}\n","import { Promise as EmberPromise } from 'rsvp';\n\nexport const wait = function (ms) {\n  return new EmberPromise(resolve => window.setTimeout(resolve, ms));\n};\n\nexport default { wait };\n","import config from '../config/environment';\nimport isLocalhost from 'secondstreet-common/utils/is-localhost';\n\n// Warning: When making changes to this function, make sure you test\n// in the facebook in-app browser on a mobile phone.\nexport default function rootUrl() {\n  let match = window.location.pathname.match(/(\\/embed\\/([A-Za-z0-9-]+)\\/)/i);\n  if (match) {\n    return match[1];\n  }\n\n  match = window.location.href.match(/facebook.+\\.secondstreetapp\\.com(\\/\\d+\\/)/);\n  if (match) {\n    return match[1];\n  }\n\n  if (isLocalhost()) {\n    return `/${window.location.href.split('/').slice(3, 4).join('/')}/`;\n  }\n\n  if (config.APP.config.organizationPromotionUniqueId) {\n    return '/';\n  }\n\n  throw new Error('Could not determine which promotion to use.');\n}\n","//NOTE: This is duplicate code found also in ss-consumer-entry-showcase\n\nimport EmberObject from '@ember/object';\n\nexport default function (meta) {\n  let metaFix;\n  if (meta) {\n    // Work around bug in Ember Data Beta 9 that leads to objects with no prototype coming back from metadataFor\n    // https://github.com/emberjs/data/commit/f376db36f33fcd67793931f4d8cf2926956a8183\n    metaFix = {};\n    for (const key in meta) {\n      metaFix[key] = meta[key];\n    } // jshint ignore:line\n    // DS.Store.metadataFor ONLY returns simple js objects, we need a Ember.Object\n    return EmberObject.create(metaFix);\n  }\n  return null;\n}\n","import theDefault from 'consumer/utils/talker';\nexport * from 'consumer/utils/talker';\nexport default theDefault;\n","define('consumer-sweepstakes/config/environment', [], function() {\n  var prefix = 'consumer-sweepstakes';\ntry {\n  var metaName = prefix + '/config/environment';\n  var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n  var config = JSON.parse(decodeURIComponent(rawConfig));\n\n  var exports = { 'default': config };\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n  return exports;\n}\ncatch(err) {\n  throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","\n          if (!runningTests) {\n            require(\"consumer-sweepstakes/app\")[\"default\"].create({\"config\":{\"apiKey\":65032887,\"apiHost\":\"\",\"assetHost\":\"\",\"apiNamespace\":\"api\"},\"rootElement\":\".ssAppContentAreaContent\",\"name\":\"consumer-sweepstakes\",\"version\":\"0.0.0+6b57a207\"});\n          }\n        \n"],"mappings":"AAAA;;ACAA,SAAAA,EAAAC,EAAAC,EAAAC,EAAAC,GAAAD,GAAAE,OAAAC,eAAAL,EAAAC,EAAA,CAAAK,WAAAJ,EAAAI,WAAAC,aAAAL,EAAAK,aAAAC,SAAAN,EAAAM,SAAAC,MAAAP,EAAAQ,YAAAR,EAAAQ,YAA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