{"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","$","document","body","on","event","designTemplateTypeId","getAttribute","loadAndShowPage","off","show","html","focusConstrainer","FocusConstrainer","keyListener","KeyListener","async","relevantDesign","designTemplateType","BypassCache","IncludeTokenContent","designTemplate","design","result","loadPage","open","redirectLink","tokenContents","toArray","replaceDocWithToken","replacePageTokens","renderedContent","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","__COLOCATED_TEMPLATE__","_templateFactory","createTemplateFactory","id","block","moduleName","isStrictMode","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","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","formFields","showVideoPreview","field","fieldType","allowVideoUpload","allowAllMediaUpload","allowPhotoUpload","nextRegistrationPageToComplete","form","sortBy","find","page","hasFormFields","shouldShowEntryForm","pageNumber","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","filterWriteinNominationsForThisCategoryAndInterval","findVoteWithinMatchupForCurrentInterval","pageFields","pageField","validationFailure","invalidError","ff","source","pointer","match","detail","pop","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","_component","setComponentTemplate","SsFormFieldCaptchaComponent","FormField","setTurnstileRunningState","loadScript","turnstile","render","sitekey","consumer","TURNSTILE_KEY","callback","token","failed","submitFormPage","error-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","duration","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","settings","getValueFor","promotionLanguageCode","displayPredictions","isLoading","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","SsFormFieldOptin","alexaSkillImageSource","nativeDataList","HTMLDListElement","availableTags","autocomplete","SsFormFieldTikTokLink","SsFormFieldVideoSelectComponent","switchToYoutubeUpload","isFlyoutOpen","toggleAddByVideoUrl","SsFormFieldXLink","SsFormFieldYouTubeLink","SsFormPageEntryRegistrationComponent","SsFormPageComponent","suggestedValues","entryNameField","labelText","bool","addingVideoByUrl","storeFieldValues","isExtraChancesForm","sortedFormFields","sort","a","b","aMatches","bMatches","displayOrder","hasRequiredTwitterFollow","fomField","isRequired","filterBy","isVoting","continueToPayment","skip","submitFormField","currentSubmittingField","onFormFieldChange","updateStoredFormFields","stringify","isMultipleCheckbox","splitCheckedIntoFormFields","_descriptor13","_descriptor14","_descriptor15","_descriptor16","_descriptor17","_descriptor18","_descriptor19","_descriptor20","_descriptor21","_descriptor22","_descriptor23","_descriptor24","_descriptor25","transformLoginEmailRedirectPath","languageCode","clearEntryFormSubmission","loadStoredSession","restoreMinimumAgeRestriction","acknowledgeForm","addThirdPartyCancelHandler","clearProgress","hideThirdPartyRequestOnLoad","launchThirdPartyRequestLogin","optionalRegistration","googlePlaceId","googlePlaceName","locationId","extraChances","sumExtraChances","submissionSuccess","focusFirstIn","registrationForm","formTypeClass","isLogoutVisible","usesSecondStreetLogin","isRegistered","isFirstPage","canChangeUpload","emailAddressThatIsAlreadyInUse","emailAddressThatRequiresVerification","emailFormField","sessionRelatedSetup","restoreState","isFinished","forceDisableForm","createFormFieldsForMultipleCheckboxes","formPageId","isCaptchaPage","matchupClassificationTypeId","referrer","desiredPageNumber","formId","captchaPage","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","min","entryEligibilityDate","currentPageNumber","disqualify","fieldTypeId","username","toSet","replace","escapeRedirectPath","routeUrl","specialEncode","encode","removeUtmQueryParams","sanitizeRedirectPath","minimumAgeRestriction","setErrorOnEmailField","validationSignUpLimitHasBeenReached","emailField","validationAlreadyRegisteredForThisEvent","findBy","lastObject","focusFirstErrorField","grecaptcha","email","currentURL","redirectPath","encodedPath","encodeURIComponent","loginRequest","loginRequestPromise","requestLoginEmail","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","checkout","createStripeSession","isVote","emailAddress","initializeCheckout","onComplete","destroyInstance","updateTransactionStatus","onPaymentComplete","SweepstakesMatchup","previousMatchup","now","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","clearInterval","videoPlaying","player","setInterval","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","emailSubmittedCallback","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","htmlSafe","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","factory","inject","after","promotionContentsUrl","params","matchEmbedUrl","pathname","organizationPromotionUniqueId","isLocalhost","Error","deferReadiness","EmberPromise","resolve","crossDomain","contents","isValidJSON","arc","Arc","srcDoc","promotionElement","color","color_element","color_background","color_text","color_button","font_heading","font_paragraph","styles","font","foregroundColor","getCustomStyles","socialElement","facebook","xDescription","emailSubject","emailDescription","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","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","QuizSubmissionOutcomeModel","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","current","mostRecentMatchup","reenterFormResult","rest","extractArray","onlyCodeWordOrEmailPage","matchupId","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","isLoaded","isLoadingEntries","hasEntries","hasNoEntries","entriesCount","previousEntry","mapBy","matchupFromUserEntries","matchupsWithUserSubmissions","uniqBy","force","isAlreadyLoading","filterByOrganizationPromotion","matchupEntries","refreshReminderEmailsUserAttributeTask","finally","ret","selectedMatchup","nominationEntries","writeinNominationsEligibility","clearEntries","hasCurrentNomination","isNominationAndVotingBallot","entriesEligibilityMetaData","lastUserEntry","relevantMatchupEntryForMatchup","autocompleteService","placesService","getBoundsFromRadius","center","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","EmberObject","namespacedKey","promisify","tempString","tempStorage","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","exec","domains","existingDomainQuery","getLocation","link","search","primaryDomain","findPrimaryDomain","VotesService","gt","orgUserAttribute","nextRefresh","previouslyRefreshedAt","startOf","toDate","logger","log","userVotes","voteIntervalStartDate","voteIntervalEndDate","isVoteInInterval","isVotingOpen","today","canVoteAgain","v","getVotes","bypassCache","allowPending","extractDatesFromMeta","warn","refreshVotesTask","clearVotes","isVoteWrittenIn","catch","noop","isAny","newVoteResult","_isDeletingVoteForMatchupEntryId","_isVotingOnMatchupEntryId","deletedVote","removeObject","currentVotesForMatchupEntry","item","isVoteForMatchupEntry","currentVoteForMatchupEntry","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","max","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","setTimeout","metaFix","_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-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/local-storage-service.js","consumer-sweepstakes/initializers/promotion-contents.js","consumer-sweepstakes/initializers/session-service.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/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-outcome.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.js","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","/* 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 { replacePageTokens } 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  //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 = await this.loadPage(designTemplateTypeId);\n    if (result?.designTemplate?.get('isCustomUrl')) {\n      window.open(result?.designTemplate?.redirectLink);\n    } else {\n      const tokenContents = (result.design.get('designTokenContents') || []).toArray();\n      const replaceDocWithToken = replacePageTokens(result.design?.renderedContent, tokenContents);\n      setProperties(this, { html: replaceDocWithToken, 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              <div class=\\\"ssFormPart\\\">\\n                <FormFieldErrorAndHelp @formField={{this.formPageFields.firstObject}} />\\n              </div>\\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'\\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\\n                    @changeToWriteIn\\n                    'vote-button'\\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' '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              <div class=\\\"ssFormPart\\\">\\n                <FormFieldErrorAndHelp @formField={{this.formPageFields.firstObject}} />\\n              </div>\\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'\\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\\n                    @changeToWriteIn\\n                    'vote-button'\\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' '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    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  /**\n   * Called to locate the matchup's vote and entry, if they exist.\n   * @private\n   * @returns {Entry,Vote}\n   */\n  findCurrentVoteAndEntry() {\n    const [currentEntry] = this.entries.filterWriteinNominationsForThisCategoryAndInterval(this.args.matchup);\n    const { entryFormPage } = this;\n    const vote = this.votes.findVoteWithinMatchupForCurrentInterval(this.args.matchup);\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    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    await super.setup(el);\n\n    this.storedFormFields = {};\n\n    if (!this.args.persistEntryData) {\n      this.clearFormRelatedLocalStorage(['formValues']);\n    }\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 { tracked } from '@glimmer/tracking';\nimport ENV from 'ember-get-config';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\nimport FormField from './ss-form-field';\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  // Args\n  declare formField: any;\n  declare submitFormPage?: () => void;\n  declare setTurnstileRunningState?: (running: boolean) => void;\n\n  @tracked failed = false;\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      });\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(\n        this.settings.getValueFor('google_maps_api_key'),\n        this.promotionLanguageCode\n      );\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 FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\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 FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\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 (and @isVoting this.isLastPage) 'vote-button' 'ssFormButton'}}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if\\n          this.isSaving\\n          'ssButtonDisabled'\\n          'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n        }}\\n        {{if @engagementStyle 'engagement-button'}}\\\"\\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 (and @isVoting this.isLastPage) 'vote-button' 'ssFormButton'}}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if\\n          this.isSaving\\n          'ssButtonDisabled'\\n          'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n        }}\\n        {{if @engagementStyle 'engagement-button'}}\\\"\\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    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) => 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.isVoting ? 'vote_button_vote' : this.args.continueToPayment ? 'continue_to_payment' : '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) {\n    if (!this.isSaving) {\n      this.currentSubmittingField = formField;\n      this.args.submitFormPage(this.args.page, formField);\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      <SsFormPage\\n        @organizationPromotion={{@organizationPromotion}}\\n        @form={{this.form}}\\n        @page={{this.currentFormPage}}\\n        @isSaving={{this.submitFormPageTask.isRunning}}\\n        @isVoting={{@isVoting}}\\n        @dipsUrl={{@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</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      <SsFormPage\\n        @organizationPromotion={{@organizationPromotion}}\\n        @form={{this.form}}\\n        @page={{this.currentFormPage}}\\n        @isSaving={{this.submitFormPageTask.isRunning}}\\n        @isVoting={{@isVoting}}\\n        @dipsUrl={{@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</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 { scheduleOnce } from '@ember/runloop';\nimport { next, run } from '@ember/runloop';\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    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\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 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.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  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({ drop: true }, async (page: FormPageModel, formField?: FormFieldModel) => {\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      } catch (error: any) {\n        this.submissionFailure(error);\n      }\n    }\n    return result;\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\n        if (this.args.scrollToTopOfForm) {\n          this.scrollToTopOfForm();\n        }\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      }\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        if (this.args.scrollToTopOfForm) {\n          this.scrollToTopOfForm();\n        }\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' : 'ss-form');\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 });\n    }\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 email = this.emailFormField?.value;\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    const loginRequestPromise = loginRequest.requestLoginEmail(encodedPath, email, { entryFormSubmissionId });\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    await this.args.logout();\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","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport type CheckoutService from 'consumer/services/checkout';\n\ninterface StripeFormSignature {\n  Element: HTMLDivElement;\n  Args: {\n    isVote: boolean;\n    emailAddress: string;\n    entryId: number | string;\n    onPaymentComplete: () => void;\n  };\n}\n\nexport default class StripeFormComponent extends Component<StripeFormSignature> {\n  @service declare checkout: CheckoutService;\n\n  setup = async () => {\n    await this.checkout.createStripeSession(this.args.isVote ? '3' : '2', this.args.emailAddress, this.args.entryId);\n    await this.checkout.initializeCheckout(this.onComplete);\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","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","export function initialize(application) {\n  ['route', 'controller'].forEach(factory => application.inject(factory, 'localStorage', 'service:local-storage'));\n}\n\nexport default {\n  name: 'local-storage-service',\n  after: ['promotion-contents', 'session-service'],\n  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';\n\nfunction getCustomContent(arc) {\n  let str = '';\n  const { socialElement } = 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  return str;\n}\n\nfunction getCustomStyles(arc, theme) {\n  let str = '';\n\n  const { promotionElement } = arc;\n\n  if (theme && promotionElement) {\n    str = `#ssFrontApp.ssApplicationContainer {\n            --mdc-theme-primary: ${promotionElement.data?.color || theme.color_element};\n              --arc-ss-color-primary: ${theme.color_element};\n              --arc-ss-color-background: ${theme.color_background};\n              --arc-ss-color-text: ${theme.color_text};\n              --arc-ss-color-button: ${theme.color_button};\n              --arc-ss-font-heading: ${theme.font_heading};\n              --arc-ss-font-paragraph: ${theme.font_paragraph};\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\nexport function initialize(application) {\n  const { config } = ENV.APP;\n  if (ENV.environment === 'test') {\n    return;\n  }\n\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            Your promotion is loading...\n          </div>\n        </div>\n    `);\n  talker.send('resize', { height: 100 });\n  application.deferReadiness();\n\n  return EmberPromise.resolve(\n    $.ajax({\n      url: promotionContentsUrl(config),\n      crossDomain: !!config.apiHost,\n      headers: {\n        'X-Api-Key': config.apiKey,\n      },\n    })\n  ).then(\n    response => {\n      const [contents] = response['promotion_contents'];\n\n      let html = '';\n      const json = isValidJSON(contents['design_content']);\n      if (json) {\n        const arc = new Arc(json);\n        html = arc.srcDoc;\n        html = html.replace('{{custom-styles}}', getCustomStyles(arc, contents.theme));\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      // 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      console.error('Could not GET /promotion_contents', error);\n      throw error;\n    }\n  );\n}\n\nexport default {\n  name: 'promotion-contents',\n  initialize,\n};\n","export function initialize(application) {\n  ['route', 'controller'].forEach(factory => application.inject(factory, 'session', 'service:session'));\n}\n\nexport default {\n  name: 'session-service',\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","/* 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  //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\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 } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport OutcomeModel from './outcome';\n\nexport default class QuizSubmissionOutcomeModel extends BaseModel {\n  @attr('number') declare percentage: number;\n  @belongsTo('outcome', { async: false }) declare outcome: OutcomeModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'quiz-submission-outcome': QuizSubmissionOutcomeModel;\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}\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 } 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  //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  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 from '@ember/service';\nimport ENV from '../config/environment';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\n\nexport default Service.extend({\n  autocompleteService: null,\n  placesService: null,\n\n  // For easier testing\n  get google() {\n    return window.google;\n  },\n\n  instantiateGoogleMaps(key, 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 = key\n      ? key\n      : ENV.environment === 'production'\n      ? 'AIzaSyDKhrjoNH_6keyhHDHwC_rh6AenHCmSn2Y'\n      : 'AIzaSyAA4Tq4480qmW0Og5MLvlEuNFIfJ4BtcBo';\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","/* eslint-disable ember/no-get, ember/no-classic-classes */\nimport EmberObject, { get, set } from '@ember/object';\nimport Service from '@ember/service';\nimport { Promise as EmberPromise } from 'rsvp';\n\nimport talker from '../utils/talker';\n\n/**\n * A Class that gets or sets local storage values\n * @type {Ember.Service}\n */\nexport default Service.extend({\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  init() {\n    this._super();\n    set(this, 'tempStorage', EmberObject.create({}));\n  },\n  /**\n   * The namespace for local storage\n   */\n  namespace: '',\n  /**\n   * @private\n   * @param key\n   */\n  namespacedKey(key) {\n    return `${this.namespace}_${key}`;\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) {\n    let promisify;\n    const tempString = get(this.tempStorage, key);\n    if (tempString) {\n      promisify = tempString;\n    } else if (get(talker, 'handshaken')) {\n      promisify = talker\n        .send('localStorage', {\n          action: 'getItem',\n          key: this.namespacedKey(key),\n        })\n        .then(\n          message => message.data.value,\n          () => {\n            try {\n              return window.localStorage.getItem(this.namespacedKey(key));\n            } catch (e) {\n              return null;\n            }\n          }\n        );\n    } else {\n      let string = null;\n      try {\n        string = window.localStorage.getItem(this.namespacedKey(key));\n      } catch (e) {\n        string = null;\n      }\n      promisify = string;\n    }\n\n    return EmberPromise.resolve(promisify);\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, value) {\n    const namespacedKey = this.namespacedKey(key);\n    if (value === null) {\n      value = 'null';\n    } // Simulate localStorage's string coercion for temp storage.\n    set(this.tempStorage, key, value);\n    if (get(talker, 'handshaken')) {\n      talker.send('localStorage', { action: 'setItem', key: namespacedKey, value });\n    }\n    try {\n      window.localStorage.setItem(namespacedKey, value);\n    } catch (e) {\n      console.error(e);\n    }\n    return value;\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) {\n    const namespacedKey = this.namespacedKey(key);\n    if (get(this.tempStorage, key) !== undefined) {\n      set(this.tempStorage, key, undefined);\n    }\n    if (get(talker, 'handshaken')) {\n      talker.send('localStorage', { action: 'removeItem', key: namespacedKey });\n    }\n    try {\n      window.localStorage.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() {\n    set(this, 'tempStorage', EmberObject.create({}));\n\n    if (get(talker, 'handshaken')) {\n      talker.send('localStorage', { action: 'clear' });\n    }\n\n    try {\n      window.localStorage.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\n    run(() => this.store.findAll('form', { reload: true }));\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, isBallot) {\n    let newVoteResult;\n    const matchupEntryId = matchupEntry.id;\n    const voteToDelete = this.findVoteWithinMatchupForCurrentInterval(matchupEntry.matchup);\n    if (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      voteToDelete && !(get(voteToDelete, 'matchupEntry.id') === matchupEntryId && isBallot)\n        ? this.unVote(voteToDelete, isBallot)\n        : RSVP.resolve();\n\n    setProperties(this, {\n      _isDeletingVoteForMatchupEntryId:\n        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      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+39f1b593\"});\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,YAAAC,KAAAR,QAAA,aAAAS,EAAAC,EAAAC,EAAAL,GAAA,OAAAK,EAA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