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,KACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,MAIf,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,GAE5B,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,EAEP,OAAOP,EAAIE,GAEZD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,IAEpBC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK,O","sources":["webpack://pixlee-me/./app/javascript/controllers/ sync _controller\\.js$","webpack://pixlee-me/./app/javascript/analytics.js","webpack://pixlee-me/./app/javascript/controllers/account_controller.js","webpack://pixlee-me/./app/javascript/controllers/analytics_controller.js","webpack://pixlee-me/./app/javascript/controllers/campaign_chat_message_controller.js","webpack://pixlee-me/./app/javascript/controllers/campaign_link_controller.js","webpack://pixlee-me/./app/javascript/controllers/campaign_pending_controller.js","webpack://pixlee-me/./app/javascript/controllers/goal_controller.js","webpack://pixlee-me/./app/javascript/controllers/local_time_controller.js","webpack://pixlee-me/./app/javascript/controllers/profile_controller.js","webpack://pixlee-me/./app/javascript/controllers/reactivation_controller.js","webpack://pixlee-me/./app/javascript/controllers/registration/additional_information_controller.js","webpack://pixlee-me/./app/javascript/controllers/registration/index_controller.js","webpack://pixlee-me/./app/javascript/controllers/registration/interests_controller.js","webpack://pixlee-me/./app/javascript/controllers/registration/register_controller.js","webpack://pixlee-me/./app/javascript/controllers/helpers/stimulus_helpers.js","webpack://pixlee-me/./app/javascript/controllers/settings_controller.js","webpack://pixlee-me/./app/javascript/controllers/shipping_address_controller.js","webpack://pixlee-me/./app/javascript/controllers/signup_controller.js","webpack://pixlee-me/./app/javascript/controllers/social_instagram_controller.js","webpack://pixlee-me/./app/javascript/controllers/top_actions_controller.js","webpack://pixlee-me/./app/javascript/controllers/uploader_controller.js","webpack://pixlee-me/./app/javascript/controllers/index.js","webpack://pixlee-me/./app/javascript/react/components/NavBar.tsx","webpack://pixlee-me/./app/javascript/react/utils/analytics.js","webpack://pixlee-me/./app/javascript/react/components/campaigns/AccountAvatar.tsx","webpack://pixlee-me/./app/javascript/react/utils/numbers.js","webpack://pixlee-me/./app/javascript/react/components/campaigns/CampaignsList.tsx","webpack://pixlee-me/./app/javascript/apis/campaign_messages.ts","webpack://pixlee-me/./app/javascript/apis/campaign_influencers.ts","webpack://pixlee-me/./app/javascript/react/apis/campaign_influencers.ts","webpack://pixlee-me/./app/javascript/react/types/utils.ts","webpack://pixlee-me/./app/javascript/react/components/campaigns/CampaignBrief.tsx","webpack://pixlee-me/./app/javascript/react/apis/campaign_messages.ts","webpack://pixlee-me/./app/javascript/react/contexts/authenticityToken.js","webpack://pixlee-me/./app/javascript/react/components/Loader.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_messages/MessagesList.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_messages/SendActionBar.tsx","webpack://pixlee-me/./app/javascript/react/utils/isMobile.js","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_messages/CampaignMessages.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_links/CampaignLinkItem.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_links/CampaignLinks.tsx","webpack://pixlee-me/./app/javascript/apis/campaign_influencer_products.ts","webpack://pixlee-me/./app/javascript/react/apis/campaign_influencer_products.ts","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/SelectedProductsList.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/CampaignInfluencerShippingAddress.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/CampaignProductsStatus.tsx","webpack://pixlee-me/./app/javascript/apis/campaign_products.ts","webpack://pixlee-me/./app/javascript/react/apis/campaign_products.ts","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/ProductDetails.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/SelectCampaignProducts.tsx","webpack://pixlee-me/./app/javascript/react/apis/account.ts","webpack://pixlee-me/./app/javascript/apis/account.ts","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/CampaignInfluencerShippingAddressForm.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/CampaignProducts.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/campaign_products/CampaignProductsRecap.tsx","webpack://pixlee-me/./app/javascript/react/components/campaigns/CampaignDetails.tsx","webpack://pixlee-me/./app/javascript/react/utils/withWrappers.js","webpack://pixlee-me/./app/javascript/packs/application.js","webpack://pixlee-me/./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["var map = {\n\t\"./account_controller.js\": 6420,\n\t\"./analytics_controller.js\": 2167,\n\t\"./campaign_chat_message_controller.js\": 7311,\n\t\"./campaign_link_controller.js\": 3926,\n\t\"./campaign_pending_controller.js\": 4042,\n\t\"./goal_controller.js\": 6250,\n\t\"./local_time_controller.js\": 6034,\n\t\"./profile_controller.js\": 2024,\n\t\"./reactivation_controller.js\": 8166,\n\t\"./registration/additional_information_controller.js\": 906,\n\t\"./registration/index_controller.js\": 8620,\n\t\"./registration/interests_controller.js\": 4194,\n\t\"./registration/register_controller.js\": 6553,\n\t\"./settings_controller.js\": 6290,\n\t\"./shipping_address_controller.js\": 1941,\n\t\"./signup_controller.js\": 6949,\n\t\"./social_instagram_controller.js\": 7179,\n\t\"./top_actions_controller.js\": 1304,\n\t\"./uploader_controller.js\": 2087,\n\t\"controllers/account_controller.js\": 6420,\n\t\"controllers/analytics_controller.js\": 2167,\n\t\"controllers/campaign_chat_message_controller.js\": 7311,\n\t\"controllers/campaign_link_controller.js\": 3926,\n\t\"controllers/campaign_pending_controller.js\": 4042,\n\t\"controllers/goal_controller.js\": 6250,\n\t\"controllers/local_time_controller.js\": 6034,\n\t\"controllers/profile_controller.js\": 2024,\n\t\"controllers/reactivation_controller.js\": 8166,\n\t\"controllers/registration/additional_information_controller.js\": 906,\n\t\"controllers/registration/index_controller.js\": 8620,\n\t\"controllers/registration/interests_controller.js\": 4194,\n\t\"controllers/registration/register_controller.js\": 6553,\n\t\"controllers/settings_controller.js\": 6290,\n\t\"controllers/shipping_address_controller.js\": 1941,\n\t\"controllers/signup_controller.js\": 6949,\n\t\"controllers/social_instagram_controller.js\": 7179,\n\t\"controllers/top_actions_controller.js\": 1304,\n\t\"controllers/uploader_controller.js\": 2087\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7074;","/**\n * analytics.js\n *\n * Functions for segement/keen analytics. Segement is initalized with the snippet in\n * app/views/layouts/_segment.html.erb when in production.\n */\n\n// Builds properties to send to keen.\n// by default it includes the creator_profile if it is available via gon.\n// Appends any additional properties passed in\nconst buildProperties = (additionalProperties = {}) => ({\n ...window?.gon?.creator_profile && { creator_profile: { ...window.gon.creator_profile } },\n ...additionalProperties,\n});\n\n// Track method for segment\n// https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#track\nexport const segmentTrack = (eventName, properties) => {\n if (!window.analytics) {\n return;\n }\n const props = buildProperties(properties);\n window.analytics.track(eventName, props);\n};\n\n// Page method for segment\n// https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#page\nexport const segmentPage = (pageCategory, pageName, properties) => {\n if (!window.analytics) {\n return;\n }\n const props = buildProperties(properties);\n window.analytics.page(pageCategory, pageName, props);\n};\n\n// Function to track all page views to keen.\n// Listens to when turbolinks loads a page and sends loaded page info to keen\nexport const segementTrackAllPageViews = () => {\n document.addEventListener('turbolinks:load', () => {\n segmentPage();\n });\n};\n","import { Controller } from 'stimulus';\n\n/**\n * Properties used for setting the contents of the dialog. These properties must match\n * one of the AccountController.targets that begins with \"dialog\".\n * @typedef DialogContents\n * @type {{cancelButton: string, title: string, confirmButton: string, content: string}}\n */\n\n/**\n * The contents of the dialog that pops up when a user initiates an action to deactivate their account.\n * @type {DialogContents}\n */\nconst deactivateDialogContents = {\n title: 'Deactivate Account?',\n content: 'Deactivating your account disables campaign offers and messaging.',\n confirmButton: 'YES, DEACTIVATE',\n cancelButton: 'NO, KEEP',\n};\n\n/**\n * The contents of the dialog that pops up when a user initiates an action to delete their account.\n * @type {DialogContents}\n */\nconst deleteAccountDialogContents = {\n title: 'Delete Account?',\n content: 'Deleting your account permanently removes all of your settings and historical data.',\n confirmButton: 'YES, DELETE',\n cancelButton: 'NO, KEEP',\n};\n\n/**\n * The contents of the dialog that pops up when a user initiates an action to delete their avatar.\n * @type {DialogContents}\n */\nconst deleteAvatarDialogContents = {\n title: 'Delete profile photo?',\n content: 'Deleting your profile photo deletes it from your account permanently.',\n confirmButton: 'YES, DELETE',\n cancelButton: 'NO, KEEP',\n};\n\nclass AccountController extends Controller {\n static targets = [\n 'avatar',\n 'photoForm',\n 'deactivationLink',\n 'deactivatedDialog',\n 'deletionLink',\n 'deletedDialog',\n 'dialogTitle',\n 'dialogContent',\n 'dialogConfirmButton',\n 'dialogCancelButton',\n 'dialogWrapper',\n ];\n\n /**\n * Applies the given contents to the dialog popup.\n * @param {DialogContents} contents\n */\n #applyDialogContents = (contents = {}) => Object\n .entries(contents)\n .forEach(([key, value]) => {\n const keyWithUppercaseFirstLetter = key.charAt(0).toUpperCase() + key.slice(1);\n this[`dialog${keyWithUppercaseFirstLetter}Target`].innerText = value;\n });\n\n #isDeactivateDialog = () => this.dialogTitleTarget.innerText === deactivateDialogContents.title;\n\n #isDeleteAvatarDialog = () => this.dialogTitleTarget.innerText === deleteAvatarDialogContents.title;\n\n #deactivateAccountDialog = () => this.#applyDialogContents(deactivateDialogContents);\n\n #deleteAvatarDialog = () => this.#applyDialogContents(deleteAvatarDialogContents);\n\n #isDeleteAccountDialog = () => this.dialogTitleTarget.innerText === deleteAccountDialogContents.title;\n\n #deleteAccountDialog = () => this.#applyDialogContents(deleteAccountDialogContents);\n\n /**\n * This is for closing the dialogs that are used as warning prompts\n */\n #closeDialog = () => {\n setTimeout(() => {\n this.dialogWrapperTarget.classList.add('hidden');\n }, 101);\n this.dialogWrapperTarget.classList.add('no_opacity');\n };\n\n #openDialog = () => {\n this.dialogWrapperTarget.classList.remove('hidden');\n this.dialogWrapperTarget.classList.remove('no_opacity');\n };\n\n connect = () => {\n this.#deactivateAccountDialog();\n this.avatarTarget.addEventListener('change', this.onAvatarChange);\n };\n\n disconnect = () => this.avatarTarget.removeEventListener('change', this.onAvatarChange);\n\n onDeletePhotoClick = () => {\n this.#deleteAvatarDialog();\n this.#openDialog();\n };\n\n onDeactivateClick = (e) => {\n e.preventDefault();\n this.#deactivateAccountDialog();\n this.#openDialog();\n };\n\n onDeleteAccountClick = () => {\n this.#deleteAccountDialog();\n this.#openDialog();\n };\n\n onCameraIconClick = () => this.avatarTarget.click();\n\n onEditIconClick = () => this.avatarTarget.click();\n\n onAvatarChange = () => {\n if (this.avatarTarget.value) {\n this.photoFormTarget.submit();\n }\n };\n\n onDialogCancel = () => {\n this.#closeDialog();\n };\n\n onDialogOpen = () => {\n this.#openDialog();\n };\n\n onDialogConfirm = () => {\n if (this.#isDeactivateDialog()) {\n this.deactivationLinkTarget.click();\n } else if (this.#isDeleteAvatarDialog()) {\n this.photoFormTarget.submit();\n }\n if (this.#isDeleteAccountDialog()) {\n this.deletionLinkTarget.click();\n }\n };\n\n /**\n * This is for the dialog that shows after the account has been deactivated\n */\n onDeactivatedDialogCloseClick = () => {\n this.deactivatedDialogTarget.classList.add('hidden');\n window.Toastr.warning('Your account is deactivated.');\n };\n}\n\nexport default AccountController;\n","// Central location for all segment analytic calls\nimport { Controller } from 'stimulus';\nimport { segmentTrack } from '../analytics';\n\n// Stimulus controller designated for analytic events to be bounds to templates\nexport default class extends Controller {\n // app/views/in/welcome/brand_landing_page.html.erb\n accessWithFacebook = () => {\n segmentTrack('Access With Facebook');\n };\n\n accessWithTiktok = () => {\n segmentTrack('Access With Tiktok');\n };\n\n // app/views/in/account/index.html.erb\n accountMenuClick = (event) => {\n const props = {\n menu_item: {\n name: event.currentTarget.text,\n },\n };\n segmentTrack('Account Menu Click', props);\n };\n\n // app/views/in/account/profile.html.erb\n // app/views/in/account/additional_information.html.erb\n accountEdit = (event) => {\n const props = {\n option: {\n name: event.currentTarget.dataset.name,\n },\n };\n segmentTrack('Account Edit', props);\n };\n\n // app/views/in/registration/social.html.erb\n // app/views/in/account/social.html.erb\n connectSocialAccountClick = (event) => {\n const props = {\n page: {\n category: event.currentTarget.dataset.analyticsCategory,\n },\n social_account: {\n source: event.currentTarget.dataset.source,\n },\n };\n segmentTrack('Connect Social Account Click', props);\n };\n\n // app/views/in/registration/social.html.erb\n // app/views/in/account/social.html.erb\n disconnectSocialAccountClick = (event) => {\n const props = {\n page: {\n category: event.currentTarget.dataset.analyticsCategory,\n },\n social_account: {\n source: event.currentTarget.dataset.source,\n },\n };\n segmentTrack('Disconnect Social Account Click', props);\n };\n\n // app/views/in/settings/index.html.erb\n accountNotificationToggle = (event) => {\n const props = {\n toggle: {\n value: event.currentTarget.checked,\n },\n };\n segmentTrack('Account Notification Toggle', props);\n };\n\n // app/views/in/account/index.html.erb\n deactivateAccount = () => {\n segmentTrack('Deactivate Account');\n };\n\n // app/views/in/shared/_dialog.html.erb\n acceptDialogLightbox = (event) => {\n const { analyticsName } = event.currentTarget.dataset;\n if (!analyticsName) {\n return;\n }\n const props = {\n dialog: {\n name: analyticsName,\n },\n };\n segmentTrack('Accept Dialog Lightbox', props);\n };\n\n // app/views/in/shared/_dialog.html.erb\n declineDialogLightbox = (event) => {\n const { analyticsName } = event.currentTarget.dataset;\n if (!analyticsName) {\n return;\n }\n const props = {\n dialog: {\n name: analyticsName,\n },\n };\n segmentTrack('Decline Dialog Lightbox', props);\n };\n\n // app/views/in/account/index.html.erb\n accountDeleteClick = () => {\n segmentTrack('Account Delete Click');\n };\n\n // app/views/in/account/additional_information.html.erb\n // app/views/in/registration/register.html.erb\n // app/views/in/registration/index.html.erb\n // app/views/in/registration/interests.html.erb\n registrationSubmit = (event) => {\n const props = {\n page: {\n name: event.currentTarget.dataset.analyticsPage,\n },\n };\n segmentTrack('Registration Submit', props);\n };\n\n // app/views/in/shared/_nav_bar.html.erb\n navbarBackClick = (event) => {\n const { analyticsCategory } = event.currentTarget.dataset;\n if (!analyticsCategory) {\n return;\n }\n const props = {\n page: {\n category: analyticsCategory,\n current_path: window.location.pathname,\n back_path: event.currentTarget.pathname,\n },\n };\n segmentTrack('Navbar Back Click', props);\n };\n}\n\n// Analytic events that are imported into other javascript controllers go below here\n// eg) if an event needs some prior logical evaluation before triggering\n\n// app/javascript/controllers/registration/interests_controller.js\nexport const analyticsCategoriesError = () => {\n segmentTrack('Categories Error');\n};\n","/*\n * Helper and formatting functions for the campaign chat messages\n */\nimport { Controller } from 'stimulus';\nimport linkifyStr from 'linkify-string';\n\n// Controller to localize time in views\nexport default class CampaignChatMessageController extends Controller {\n static targets = ['body'];\n\n connect = () => {\n this.linkifyChatBody();\n };\n\n // add the corresponding href in the message body for linking urls\n linkifyChatBody = () => {\n if (this.hasBodyTarget) { // It doesn't exist for attachment messages\n this.bodyTarget.innerHTML = linkifyStr(this.bodyTarget.innerHTML, {\n className: 'linkified',\n target: (href, type) => type === 'url' && '_blank',\n });\n }\n };\n}\n","import { Controller } from 'stimulus';\n\nclass CampaignLinkController extends Controller {\n static targets = ['linkInput'];\n\n #linkText = () => this.linkInputTarget.value;\n\n copyLink = () => {\n Toastr.success('Link copied to clipboard.');\n window.navigator?.clipboard?.writeText(this.#linkText());\n };\n}\n\nexport default CampaignLinkController;\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['accept'];\n\n onClickTermsCheckbox = (event) => {\n this.acceptTarget.disabled = !event.currentTarget.checked;\n };\n}\n","import { Controller } from 'stimulus';\n\nclass GoalController extends Controller {\n static targets = ['submitButton', 'tosCheckbox', 'goal'];\n\n /**\n * @returns {boolean} true if any of the goals are checked.\n */\n #goalChecked = () => Array.from(this.goalTargets).some((goalRadioBtn) => goalRadioBtn.checked);\n\n #updateRegisterDisabled = () => { this.submitButtonTarget.disabled = !this.#goalChecked(); };\n\n /**\n * This is called whenever a radio button is clicked on the goal page.\n */\n onGoalChanged = () => this.#updateRegisterDisabled();\n\n connect = () => this.#updateRegisterDisabled();\n}\n\nexport default GoalController;\n","/*\n * Localizes time for the user from timestamps stored in the database\n */\nimport { Controller } from 'stimulus';\nimport moment from 'moment';\n\n// Controller to localize time in views\nexport default class extends Controller {\n connect = () => {\n const format = this.data.get('format');\n if (format === 'campaign') {\n this.formatUtcCampaign();\n } else {\n this.formatUtcMessage();\n }\n };\n\n // Format time/date in the chat screen\n formatUtcMessage = () => {\n const timeStamp = this.data.get('utc');\n const localTimeStamp = moment.utc(new Date(timeStamp.replace(/-/g, '/'))).local().calendar();\n this.element.textContent = localTimeStamp;\n };\n\n // Format time/date in the campaign lists screen\n formatUtcCampaign = () => {\n const timeStamp = this.data.get('utc');\n if (!timeStamp) {\n return;\n }\n const today = moment().endOf('day').local();\n const yesterday = moment().subtract(1, 'day').endOf('day').local();\n const twoDaysAgo = moment().subtract(2, 'day').endOf('day').local();\n const localTimeStamp = moment.utc(new Date(timeStamp.replace(/-/g, '/'))).local();\n if (localTimeStamp <= today && localTimeStamp >= yesterday) {\n this.element.textContent = 'Today';\n } else if (localTimeStamp < yesterday && localTimeStamp >= twoDaysAgo) {\n this.element.textContent = 'Yesterday';\n } else {\n this.element.textContent = localTimeStamp.format('D MMM YY');\n }\n };\n}\n","/*\n * Handles signup validation when signing up as a new influencer (Page 1).\n */\nimport { Controller } from 'stimulus';\n\nclass ProfileController extends Controller {\n static targets = ['submit', 'requiredField', 'redirectUrl', 'email'];\n\n // validate inputs on page load\n connect = () => this.validateInputs();\n\n // Validate the inputs on the current page\n validateInputs = () => {\n const invalid = Array\n .from(this.requiredFieldTargets)\n .some((requiredField) => !requiredField.value);\n this.submitTarget.disabled = invalid;\n };\n\n // Validate email\n validateEmail = () => {\n this.submitTarget.disabled = !this.emailTarget.value || !this.emailTarget.validity.valid;\n };\n}\n\nexport default ProfileController;\n","import { Controller } from 'stimulus';\n\n/**\n* Properties used for setting the contents of the dialog. These properties must match\n* one of the AccountController.targets that begins with \"dialog\".\n* @typedef DialogContents\n* @type {{cancelButton: string, title: string, confirmButton: string, content: string}}\n*/\n\n/**\n * The contents of the dialog that pops up when a user initiates an action to delete their account.\n * @type {DialogContents}\n */\nconst deleteAccountDialogContents = {\n title: 'Delete Account?',\n content: 'Deleting your account permanently removes all of your settings and historical data.',\n confirmButton: 'YES, DELETE',\n cancelButton: 'NO, KEEP',\n};\n\nclass ReactivationController extends Controller {\n static targets = [\n 'deletionLink',\n 'deletedDialog',\n 'dialogTitle',\n 'dialogContent',\n 'dialogConfirmButton',\n 'dialogCancelButton',\n 'dialogWrapper',\n ];\n\n /**\n * Applies the given contents to the dialog popup.\n * @param {DialogContents} contents\n */\n #applyDialogContents = (contents = {}) => Object\n .entries(contents)\n .forEach(([key, value]) => {\n const keyWithUppercaseFirstLetter = key.charAt(0).toUpperCase() + key.slice(1);\n this[`dialog${keyWithUppercaseFirstLetter}Target`].innerText = value;\n });\n\n #isDeleteAccountDialog = () => this.dialogTitleTarget.innerText === deleteAccountDialogContents.title;\n\n #deleteAccountDialog = () => this.#applyDialogContents(deleteAccountDialogContents);\n\n /**\n * This is for closing the dialogs that are used as warning prompts\n */\n connect = () => {\n this.dialogWrapperTarget.addEventListener('transitionend', () => {\n this.dialogWrapperTarget.classList.add('hidden');\n });\n };\n\n #closeDialog = () => {\n this.dialogWrapperTarget.classList.add('no_opacity');\n };\n\n #openDialog = () => {\n this.dialogWrapperTarget.classList.remove('hidden');\n this.dialogWrapperTarget.classList.remove('no_opacity');\n };\n\n onDeleteAccountClick = (e) => {\n e.preventDefault();\n this.#deleteAccountDialog();\n this.#openDialog();\n };\n\n onDialogCancel = () => {\n this.#closeDialog();\n };\n\n onDialogOpen = () => {\n this.#openDialog();\n };\n\n onDialogConfirm = () => {\n if (this.#isDeleteAccountDialog()) {\n this.deletionLinkTarget.click();\n }\n };\n\n onDeletedAccountDialogCloseClick = () => {\n this.deletedDialogTarget.classList.add('hidden');\n window.Toastr.warning('Your account is deleted.');\n };\n}\n\nexport default ReactivationController;\n","/*\n * Handles signup validation when signing up as a new influencer (Page 2).\n */\nimport { Controller } from 'stimulus';\nimport csc from 'country-state-city';\nimport { find } from 'lodash';\nimport parsePhoneNumber, { getExampleNumber } from 'libphonenumber-js';\nimport examples from 'libphonenumber-js/examples.mobile.json';\n\nexport default class AdditionalInformationController extends Controller {\n static targets = ['country', 'state', 'city', 'telephone', 'phoneErrorMessage'];\n\n connect = () => {\n // Keep track of country/state/city objects for easier lookups\n // Find country id from reverse lookup of country name\n const selectedCountry = this.countryTarget.options[this.countryTarget.selectedIndex].value;\n this.selectedCountryObj = find(this.getCountries(), ['name', selectedCountry]) || {};\n // Find state id from reverse lookup of country name\n const selectedState = this.stateTarget.options[this.stateTarget.selectedIndex].value;\n this.selectedStateObj = find(this.getStates(this.selectedCountryObj.id), ['name', selectedState]) || {};\n // Find city id from reverse lookup of country name\n const selectedCity = this.cityTarget.options[this.cityTarget.selectedIndex].value;\n this.selectedCityObj = find(this.getCities(this.selectedStateObj.id), ['name', selectedCity]) || {};\n\n // On initalize, pre-populate fields from database if any information has been previously saved\n this.initCountryDropdown();\n };\n\n /* *************************************************************\n * UTILITY METHODS *\n ************************************************************* */\n\n // Function to get all the countries from country-stake-city library\n getCountries = () => csc.getAllCountries();\n\n // Function to get all the countries from country-stake-city library via countryId\n getStates = (countryId) => csc.getStatesOfCountry(countryId);\n\n // Function to get all the cities from country-stake-city library via stateId\n getCities = (stateId) => csc.getCitiesOfState(stateId);\n\n // \"Reset\" options in dropdown to be replaced by corresponding selected state/city/country\n removeOptions = (target) => {\n const selector = this[`${target}Target`];\n // Remove all options except default \"Please Select...\" or \"-\" option which is always first\n while (selector.options.length > 1) {\n selector.remove(1);\n }\n };\n\n /* *************************************************************\n * COUNTRY METHODS *\n ************************************************************* */\n\n // Init dountry dropdown\n initCountryDropdown = () => {\n // Remove all options before re-populating dropdown\n this.removeOptions('country');\n // Add each country to the dropdown\n this.getCountries().forEach((country) => {\n const option = new Option(country.name, country.name);\n this.countryTarget.add(option);\n });\n // Set the selected option to previously selected value if there is one\n const { selectedCountryObj: { name }, countryTarget: { value } } = this;\n this.countryTarget.value = name || value;\n // If country has been selected, enable dropdown options for state\n this.stateTarget.disabled = !name;\n if (name) {\n const placeHolderPhone = getExampleNumber(this.selectedCountryObj.sortname, examples) || getExampleNumber('US', examples); // for non-supported countries in the library, default would be US\n this.telephoneTarget.placeholder = `Ex. ${placeHolderPhone.formatInternational()}`;\n this.onTelephoneInput();\n }\n // Init state dropdown for the corresponding selected country\n this.initStateDropdown();\n };\n\n // Handle selecting a country from dropdown\n onSelectCountry = (option) => {\n this.selectedCountryObj = find(this.getCountries(), ['name', option.target.value]) || {};\n // clear state and city since we are changing countrys\n this.selectedStateObj = {};\n this.selectedCityObj = {};\n // Now that a country was selected, init new country -> state -> city dropdowns\n this.initCountryDropdown();\n };\n\n /* *************************************************************\n * STATE METHODS *\n ************************************************************* */\n\n // Init state dropdown\n initStateDropdown = () => {\n // Remove all options before re-populating dropdown\n this.removeOptions('state');\n // Add each state to the options dropdown\n this.getStates(this.selectedCountryObj.id).forEach((state) => {\n const option = new Option(state.name, state.name);\n this.stateTarget.add(option);\n });\n // Set the selected option to previously selected value if there is one\n const { selectedStateObj: { name }, stateTarget: { value } } = this;\n this.stateTarget.value = name || value;\n // If state has been selected, enable dropdown options for city\n this.cityTarget.disabled = !name;\n // Init city dropdown for the corresponding selected state\n this.initCityDropdown();\n };\n\n // Handle selecting a state from dropdown\n onSelectState = (option) => {\n this.selectedStateObj = find(this.getStates(this.selectedCountryObj.id), ['name', option.target.value]) || {};\n // clear city since we are changing state\n this.selectedCityObj = {};\n // Now that a country was selected, init new state -> city dropdowns\n this.initStateDropdown();\n };\n\n /* *************************************************************\n * CITY METHODS *\n ************************************************************* */\n\n // Init City dropdown\n initCityDropdown = () => {\n // remove all options before re-populating dropdown\n this.removeOptions('city');\n\n const cities = this.getCities(this.selectedStateObj.id);\n const noCitiesFound = cities.length === 0;\n\n // Add each city to the options dropdown for country\n cities.forEach((city) => {\n this.cityTarget.add(new Option(city.name, city.name));\n });\n\n // Set the selected option to previously selected value if there is one\n const { selectedCityObj: { name }, cityTarget: { value } } = this;\n this.cityTarget.value = name || value;\n\n // disable dropdown if no cities was found\n this.cityTarget.disabled = noCitiesFound;\n };\n\n // Handle selecting a city from dropdown\n onSelectCity = (option) => {\n this.selectedCityObj = find(this.getCities(this.selectedStateObj.id), ['name', option.target.value]) || {};\n };\n /* *************************************************************\n * TELEPHONE METHODS *\n ************************************************************* */\n\n onTelephoneInput = () => {\n const telephoneValue = this.telephoneTarget.value;\n const countryCode = this.selectedCountryObj?.sortname || 'US'; // if a country is not selected yet\n let phoneNumber = parsePhoneNumber(telephoneValue, countryCode);\n\n if (!phoneNumber && telephoneValue) { // If a country is not supported by library. e.g. Antarctica\n phoneNumber = parsePhoneNumber(telephoneValue, 'US');\n }\n\n if (phoneNumber?.isValid() || !telephoneValue) { // phoneNumber could be undefined if there is no phone entered\n this.telephoneTarget.classList.remove('error');\n this.phoneErrorMessageTarget.innerText = '';\n } else {\n this.telephoneTarget.classList.add('error');\n const placeHolderExample = this.telephoneTarget.placeholder;\n this.phoneErrorMessageTarget.innerText = `Please enter a valid phone (${placeHolderExample})`;\n }\n };\n}\n","/*\n * Handles signup validation when signing up as a new influencer (Page 1).\n */\nimport Dropzone from 'dropzone';\nimport { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['submit', 'currentAvatar', 'requiredField', 'picBox', 'imagePreview', 'redirectUrl', 'email', 'deleteAvatar'];\n\n connect = () => {\n Dropzone.autoDiscover = false;\n this.createDropZone();\n // validate inputs on page load\n this.validateInputs();\n // this.validateEmail();\n };\n\n createDropZone = () => {\n const {\n redirectUrlTarget, picBoxTarget, imagePreviewTarget, currentAvatarTarget: { dataset: currentAvatar }, deleteAvatarTarget,\n } = this;\n const dropzoneOptions = {\n autoProcessQueue: false,\n uploadMultiple: false,\n parallelUploads: 1,\n maxFiles: 1,\n previewsContainer: '.image_preview',\n paramName: 'creator_profile[avatar]',\n addRemoveLinks: true,\n acceptedFiles: 'image/*',\n resizeHeight: 200,\n resizeWidth: 200,\n dictRemoveFile: 'Delete Photo',\n\n // if not specified, it will override 'Delete Photo' with 'Cancel Upload'\n dictCancelUpload: 'Delete Photo',\n init() {\n // Save reference to avatar file that is uploaded via dropzone\n let avatarFile;\n // Prepopulate avatar with avatar from server if it exists\n if (currentAvatar.currentAvatar) {\n const avatarUrl = currentAvatar.currentAvatar;\n avatarFile = { name: 'serverAvatar', size: 1 };\n const callback = null; // Optional callback when it's done\n const crossOrigin = null; // Added to the `img` tag for crossOrigin handling\n const resizeThumbnail = false; // Tells Dropzone whether it should resize the image first\n this.displayExistingFile(avatarFile, avatarUrl, callback, crossOrigin, resizeThumbnail);\n\n picBoxTarget.style.display = 'none';\n imagePreviewTarget.style.display = 'flex';\n }\n\n this.on('addedfile', (file) => {\n // Trick to remove the server loaded avatar if there is one\n if (avatarFile) {\n this.removeFile(avatarFile);\n }\n\n deleteAvatarTarget.value = '';\n avatarFile = file;\n\n picBoxTarget.style.display = 'none';\n imagePreviewTarget.style.display = 'flex';\n });\n\n this.on('removedfile', () => {\n deleteAvatarTarget.value = 'true';\n\n picBoxTarget.style.display = 'flex';\n imagePreviewTarget.style.display = 'none';\n });\n\n // First change the button to actually tell Dropzone to process the queue.\n this.element.querySelector('input[type=submit]').addEventListener('click', (ev) => {\n // Process files before sending the form if there are any files\n if (this.files.length > 0) {\n ev.preventDefault();\n ev.stopPropagation();\n this.processQueue();\n }\n });\n\n // Redirect to next page after the profile photo is uploaded (rails controller is unable to redirect via ajax)\n this.on('complete', () => {\n window.location.replace(redirectUrlTarget.value);\n });\n\n // If files are unable to be uploaded, notify the user\n this.on('errormultiple', () => {\n Toastr.error('Unable to process profile picture, please try again.');\n });\n },\n\n };\n this.dropzoneForm = new Dropzone(this.element, dropzoneOptions);\n };\n\n // Validate the inputs on the current page\n validateInputs = () => {\n let valid = true;\n this.requiredFieldTargets.forEach((requiredField) => {\n valid = valid && Boolean(requiredField.value);\n });\n this.submitTarget.disabled = !valid;\n };\n\n // Validate email\n validateEmail = () => {\n this.submitTarget.disabled = !this.emailTarget.value || !this.emailTarget.validity.valid;\n };\n}\n","import { Controller } from 'stimulus';\nimport { analyticsCategoriesError } from '../analytics_controller';\n\nexport class InterestsController extends Controller {\n static targets = ['submit', 'checkbox'];\n\n static INTEREST_LIMIT = 5;\n\n #showErrorToast = () => Toastr.error(`You can select up to ${InterestsController.INTEREST_LIMIT} interests.`);\n\n #checkedCount = () => Array.from(this.checkboxTargets).reduce((count, el) => count + el.checked, 0);\n\n onInterestSelected = (e) => {\n const checkedCount = this.#checkedCount();\n\n if (checkedCount > InterestsController.INTEREST_LIMIT) {\n e.currentTarget.checked = false; // revert the chekced\n // Track error to segment/keen\n analyticsCategoriesError();\n // Show toast\n this.#showErrorToast();\n }\n };\n}\n\nexport default InterestsController;\n","import { Controller } from 'stimulus';\n\nclass RegisterController extends Controller {\n static targets = [\n 'submitButton',\n 'tosCheckbox',\n 'receivesNotificationsCheckbox',\n ];\n\n #tosChecked = () => this.tosCheckboxTarget.checked;\n\n #receiveNotificationsChecked = () => this.receivesNotificationsCheckboxTarget.checked;\n\n #formValid = () => this.#tosChecked() && this.#receiveNotificationsChecked();\n\n #updateRegisterDisabled = () => {\n this.submitButtonTarget.disabled = !this.#formValid();\n };\n\n connect = () => this.#updateRegisterDisabled();\n\n /**\n * This is called whenever the Agree to ToS checkbox is clicked on the goal page.\n */\n onTosChanged = () => this.#updateRegisterDisabled();\n\n /**\n * This is called whenever the user clicks the checkbox to agree to receive notifications.\n */\n onReceivesNotificationsChanged = () => this.#updateRegisterDisabled();\n}\n\nexport default RegisterController;\n","// Get meta data for sending forms via AJAX\nexport const getMetaValue = (name) => {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`);\n return element.getAttribute('content');\n};\n\nexport default getMetaValue;\n","/*\n * Handles changing the settings of a connected_user via aJAX\n */\nimport { Controller } from 'stimulus';\nimport { getMetaValue } from 'controllers/helpers/stimulus_helpers';\n\nexport default class SettingsController extends Controller {\n static targets = ['pixleeMeNotifications', 'option'];\n\n // perform AJAX call on settings toggle\n async toggle(event) {\n const isOk = await this.#updateNotifications();\n if (isOk) {\n Toastr.success('Updates have been saved.');\n } else {\n Toastr.error('An error has occurred, please try again.');\n // Toggle it back to the previous value since it didn't work\n event.target.checked = !event.target.checked;\n }\n\n if (event.target.checked) {\n this.optionTarget.classList.add('blue_border');\n } else {\n this.optionTarget.classList.remove('blue_border');\n }\n }\n\n #updateNotifications = async () => {\n const formData = new FormData();\n formData.append('creator_profile[receives_notifications]', this.pixleeMeNotificationsTarget.checked);\n const csrfToken = getMetaValue('csrf-token');\n const url = this.data.get('update-url');\n try {\n const response = await fetch(url, {\n body: formData,\n method: 'PATCH',\n dataType: 'script',\n credentials: 'include',\n headers: {\n 'X-CSRF-Token': csrfToken,\n },\n });\n return response.ok;\n } catch {\n // A network error has occurred. This is not the same as HTTP errors such as 404.\n return false;\n }\n };\n}\n","/*\n * Handles validation on shipping address fields.\n */\nimport { Controller } from 'stimulus';\n\nclass ShippingAddressController extends Controller {\n static targets = ['submit'];\n\n validateForm = (e) => {\n const informEl = e.target.closest('inform-el');\n // prevent rails.ujs from sending the data if the form is invalid\n if (informEl.invalid) {\n e.preventDefault();\n }\n };\n}\n\nexport default ShippingAddressController;\n","/*\n * Handles signup validation when signing up as a new influencer.\n * Extends from stimulus-validation (https://github.com/jwald1/stimulus-validation) for validation helpers.\n */\nimport { ValidationController } from 'stimulus-validation';\n\nexport default class extends ValidationController {\n static targets = ['email', 'emailCheckbox', 'tosCheckbox', 'submitButton'];\n\n static validators = { boxChecked: { attributes: ['emailCheckbox'] } };\n\n static rules = {\n email: {\n presence: {\n allowEmpty: false,\n },\n email: true,\n },\n };\n\n // After validation, add/remove appropriate errors\n afterValidate = ({ el, attr }) => {\n this.validateForm();\n el.classList.remove('error');\n el.nextElementSibling.style.visibility = 'hidden';\n if (this.errors.get(attr)) {\n el.classList.add('error');\n el.nextElementSibling.style.visibility = 'visible';\n }\n };\n\n // Remove errors from form\n removeError = (el) => {\n el.currentTarget.classList.remove('error');\n el.currentTarget.nextElementSibling.style.visibility = 'hidden';\n if (this.emailCheckboxTarget.checked && this.tosCheckboxTarget.checked) {\n this.submitButtonTarget.disabled = false;\n }\n };\n\n // Enable/Disable submit button\n validateForm = () => {\n if (this.emailCheckboxTarget.checked && this.tosCheckboxTarget.checked && !this.errors.hasAny()) {\n this.submitButtonTarget.disabled = false;\n } else {\n this.submitButtonTarget.disabled = true;\n }\n };\n}\n","import { Controller } from 'stimulus';\n\nexport class SocialInstagramController extends Controller {\n static targets = ['submit', 'accountCheckbox'];\n\n /**\n * This method is triggered whenever an input event is fired\n * from one of the accountCheckboxes that is found in\n * one of the _social_instagram_account.html.erb partials.\n * @param {InputEvent} event\n */\n onSelectAccount = ({ target }) => {\n this.accountCheckboxTargets.forEach((checkboxTarget) => {\n // Make sure whatever checkboxes there are other than\n // the one that was checked is set to false so that it\n // can act as a toggle.\n if (!Object.is(checkboxTarget, target)) {\n checkboxTarget.checked = false;\n }\n });\n this.submitTarget.disabled = !target?.checked ?? true;\n };\n}\n\nexport default SocialInstagramController;\n","/*\n * Handles hiding/showing the drop down menu in the top actions view\n */\nimport { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['dropdownCheckbox'];\n\n // Hide dropdown when an option in the dropdown is clicked\n hideDropdown = () => {\n this.dropdownCheckboxTarget.checked = false;\n };\n}\n","/*\n * Handles initializing dropzone (https://www.dropzonejs.com/) for file uploading\n */\nimport Dropzone from 'dropzone';\nimport { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['input'];\n\n connect = () => {\n Dropzone.autoDiscover = false;\n this.createDropZone();\n };\n\n createDropZone = () => {\n const dropzoneOptions = {\n autoProcessQueue: false,\n uploadMultiple: true,\n parallelUploads: 10,\n maxFiles: 10,\n previewsContainer: '.dropzone-previews',\n clickable: ['#file-upload-button'],\n paramName: 'campaign_message[attachments]',\n addRemoveLinks: true,\n init() {\n const myDropzone = this;\n // First change the button to actually tell Dropzone to process the queue.\n this.element.querySelector('button[type=submit]').addEventListener('click', (e) => {\n // Process files before sending the form if there are any files\n if (myDropzone.files.length > 0) {\n e.preventDefault();\n e.stopPropagation();\n myDropzone.processQueue();\n }\n });\n // If successful refresh the page to show new chat messages\n this.on('successmultiple', () => {\n Turbolinks.visit(window.location, { action: 'replace' });\n });\n // If files are unable to be uploaded, notify the user\n this.on('errormultiple', () => {\n Toastr.error('Unable to process attachments, please try again.');\n });\n },\n\n };\n this.dropzoneForm = new Dropzone(this.element, dropzoneOptions);\n };\n}\n","// Load all the controllers within this directory and all subdirectories.\n// Controller files must be named *_controller.js.\n\nimport { Application } from 'stimulus';\nimport { definitionsFromContext } from 'stimulus/webpack-helpers';\n\nconst application = Application.start();\nconst context = require.context('controllers', true, /_controller\\.js$/);\napplication.load(definitionsFromContext(context));\n\nif (process.env.NODE_ENV === 'production') {\n // memorize default handler\n const defaultErrorHandler = application.handleError.bind(application);\n\n // configure Sentry to log errors and prepend the default handler\n const sentryErrorHandler = (error, message, detail = {}) => {\n defaultErrorHandler(error, message, detail);\n window.Sentry.captureException(error, { message, ...detail });\n };\n\n // overwrite the default handler with our new composed handler\n application.handleError = sentryErrorHandler;\n}\n","import React from 'react';\nimport { BloxAnchor, BloxText } from '@pixleeturnto/wr4pt';\nimport styled from 'styled-components';\nimport { trackMenuNavigate } from 'react/utils/analytics';\n\nexport const NavBar = ({ title, backLink }: { title?: string, backLink: string; }) => {\n const [isMenuOpen, setIsMenuOpen] = React.useState(false);\n const firstLinkRef = React.useRef(null);\n const lastLinkRef = React.useRef(null);\n const buttonRef = React.useRef(null);\n\n React.useEffect(() => {\n if (isMenuOpen) {\n firstLinkRef.current?.focus();\n } else {\n buttonRef.current?.focus();\n }\n }, [isMenuOpen]);\n\n // When backLink is provided:\n // - the back button is shown\n // - the menu button is hidden\n // - the title is centered\n // When backLink is not provided:\n // - the back button is hidden\n // - the menu button is shown\n // - the title is left aligned\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsMenuOpen(false);\n }\n\n const target = e.target as HTMLElement;\n if (e.key === 'Tab') {\n // Focus trap: when tabbing away from the last link, focus the first link and vice versa\n if (target === firstLinkRef.current && e.shiftKey) {\n e.preventDefault();\n lastLinkRef.current?.focus();\n } else if (target === lastLinkRef.current && !e.shiftKey) {\n e.preventDefault();\n firstLinkRef.current?.focus();\n }\n }\n };\n\n const handleMenuClick = (e: React.MouseEvent) => {\n trackMenuNavigate((e.target as HTMLUListElement).textContent);\n };\n\n return (\n \n {backLink ? (\n <>\n \n \n \n {title}\n {/* Empty div for centering the title with space-between */}\n
\n \n ) : (\n {title}\n )}\n\n {!backLink && (\n <>\n \n {isMenuOpen && \n
  • Account
  • \n
  • Campaigns
  • \n
  • Pixlee TOS
  • \n
  • Support
  • \n
  • Sign Out
  • \n
    }\n \n )}\n
    \n );\n\n};\n\nconst PADDING_RIGHT = 20;\n\nconst Container = styled.div`\n background: white;\n padding: 19px ${PADDING_RIGHT}px 19px 29px;\n display: flex;\n gap: 20px;\n justify-content: space-between;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 1;\n`;\n\nconst TitleText = styled(BloxText)`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst YourCampaignsText = styled(TitleText)`\n font-size: 18px;\n color: black;\n`;\n\nconst CogIcon = styled.i.attrs({\n className: 'fal fa-cog',\n})`\n font-size: 19px;\n`;\n\nconst BackArrowIcon = styled.i.attrs({\n className: 'fal fa-arrow-left',\n})`\n font-size: 24px;\n`;\n\nconst BackLink = styled(BloxAnchor)`\n color: black !important;\n`;\n\nconst Button = styled.button`\n background: none;\n width: auto;\n height: auto;\n color: black;\n`;\n\n\nconst DropDown = styled.ul`\n display: flex;\n background: white;\n border-radius: 3px;\n box-shadow: 0px 0px 5px #0000001a;\n flex-direction: column;\n position: absolute;\n right: ${PADDING_RIGHT}px;\n top: 60px;\n z-index: 1;\n\n li {\n &:first-child a {\n border-radius: 3px 3px 0px 0px;\n }\n\n &:last-child a {\n border-radius: 0px 0px 3px 3px;\n }\n }\n\n a {\n color: var(--blox-slate4);\n display: block;\n font-family: var(--blox-font-family);\n font-size: 14px;\n padding: 13px 25px 10px 15px;\n text-align: left;\n\n &:hover {\n background: var(--blox-blue);\n color: white;\n }\n }\n`;\n","import { segmentTrack } from 'analytics';\n\n\nexport const trackCampaignClick = (campaignInfluencerId, campaignId) => {\n const props = {\n campaign_influencer: {\n id: campaignInfluencerId,\n },\n campaign: {\n id: campaignId,\n },\n };\n segmentTrack('Campaign Click', props);\n};\n\nexport const trackCampaignAccept = (campaignInfluencerId, campaignId) => {\n const props = {\n campaign_influencer: {\n id: campaignInfluencerId,\n },\n campaign: {\n id: campaignId,\n },\n };\n segmentTrack('Campaign Accept', props);\n};\n\nexport const trackCampaignDecline = (campaignInfluencerId, campaignId) => {\n const props = {\n campaign_influencer: {\n id: campaignInfluencerId,\n },\n campaign: {\n id: campaignId,\n },\n };\n segmentTrack('Campaign Decline', props);\n};\n\nexport const trackMenuNavigate = (menuItemName) => {\n const props = {\n menu_item: {\n name: menuItemName,\n },\n };\n segmentTrack('Menu Navigate', props);\n};\n\n\nexport const trackCampaignMessageSent = (campaignInfluencerId, campaignId) => {\n const props = {\n campaign_influencer: {\n id: campaignInfluencerId,\n },\n campaign: {\n id: campaignId,\n },\n };\n segmentTrack('Campaign Message Sent', props);\n};\n\nexport const trackCampaignMessageFileClick = (campaignInfluencerId, campaignId) => {\n const props = {\n campaign_influencer: {\n id: campaignInfluencerId,\n },\n campaign: {\n id: campaignId,\n },\n };\n segmentTrack('Campaign Message File Click', props);\n};\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { formatCompact } from 'react/utils/numbers';\n\nexport interface AccountAvatarProps {\n logo: string;\n unread_messages_count?: number;\n}\n\nexport const AccountAvatar = ({ logo, unread_messages_count }: AccountAvatarProps) => {\n const [showAvatar, setShowAvatar] = useState(!!logo);\n const handleImgError = () => setShowAvatar(false);\n return (\n \n \n {showAvatar && (\n \n )}\n {!!unread_messages_count && (\n \n {formatCompact(unread_messages_count)}\n \n )}\n \n );\n};\n\nconst UserIcon = styled.i.attrs({\n className: 'fas fa-user-circle',\n})`\n color: var(--blox-slate1b);\n font-size: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n `;\nconst AvatarContainer = styled.div`\n border-radius: 50%;\n width: 54px;\n height: 54px;\n background: var(--blox-slate1);\n position: relative;\n`;\n\nconst AvatarImg = styled.img`\n width: 100%;\n height: 100%;\n object-fit: cover;\n position: relative;\n border-radius: 50%;\n`;\n\nconst CampaignBadge = styled.div`\n background: white;\n\n position: absolute;\n border-radius: 50%;\n background: var(--blox-orange);\n border: 3px solid white;\n right: 13%;\n top: 13%;\n transform: translate(50%, -50%);\n\n min-width: 28px;\n height: 28px;\n line-height: 21px;\n text-align: center;\n\n font-family: var(--blox-font-family);\n font-size: 12px;\n font-weight: 700;\n color: white;\n`;\n","\n/** Formats a number in the format 1000 => 1K */\nexport const formatCompact = (number) => {\n try {\n return (new Intl.NumberFormat(navigator.language, { notation: 'compact' })).format(number);\n } catch {\n return number.toString();\n }\n};\n\n\nexport const formatWithCurrencySymbol = (number, currency = 'USD') => {\n if (!number) {\n return '';\n }\n try {\n return (new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(number));\n } catch {\n return number;\n }\n};\n","import React from 'react';\nimport { Flex, BloxText } from '@pixleeturnto/wr4pt';\nimport styled from 'styled-components';\nimport moment from 'moment';\nimport { trackCampaignClick } from 'react/utils/analytics';\nimport { AccountAvatar } from './AccountAvatar';\nimport type { AccountRecord, CampaignInfluencerRecord, CampaignRecord } from '@pixleeturnto/wr4pt/models';\nimport { AccountMethods, CampaignInfluencerMethods, CampaignMethods } from '@pixleeturnto/wr4pt/models';\n\n// Result of\n// @campaign_influencers.as_json(include: {campaign: {include: :account}}, methods: [:unread_messages_count] ) }\nexport interface CampaignListInfluencer extends CampaignInfluencerRecord {\n campaign: CampaignRecord & {\n account: AccountRecord;\n };\n unread_messages_count: number;\n}\n\nconst formatCampaignDate = (dateMoment: moment.Moment) => {\n const sinceNow = moment.duration(moment().diff(dateMoment));\n\n if (sinceNow.asDays() < 2) {\n return sinceNow.humanize();\n }\n\n return dateMoment.format('ll');\n};\n\n/**\n * Shows the list of campaign\n */\nexport const CampaignsList = ({ campaignInfluencers }: { campaignInfluencers: CampaignListInfluencer[]; }) => {\n const handleCampaignClick = (campaignInfluencerModel: CampaignListInfluencer) => {\n trackCampaignClick(campaignInfluencerModel.id, campaignInfluencerModel.campaign?.id);\n };\n\n return (\n \n {campaignInfluencers?.length ? campaignInfluencers.map((c) => {\n return (\n handleCampaignClick(c)}>\n \n {c.campaign.account?.business_name}\n \n \n \n\n \n {CampaignMethods.getName(c.campaign)}\n \n {CampaignMethods.getStartMoment(c.campaign)?.format('l')} - {CampaignMethods.getEndMoment(c.campaign)?.format('l')}\n \n\n {CampaignInfluencerMethods.isPending(c) && (\n \n Awaiting response\n \n )}\n {CampaignInfluencerMethods.isDeclined(c) && (\n \n Declined\n \n )}\n \n\n \n \n {formatCampaignDate(CampaignInfluencerMethods.getLastMessagedAtMoment(c))}\n \n \n \n \n );\n }) : You have not been invited to any campaigns yet.}\n \n );\n};\n\n\nconst CampaignInfluencerItem = styled.a`\n width: 100%;\n border-radius: 10px;\n max-width: var(--page_max_width);\n margin: 0 auto;\n`;\n\nconst CampaignBrand = styled.div`\n background: var(--blox-slate1);\n color: black;\n padding: 6px 12px;\n border-radius: 10px 10px 0 0;\n`;\n\nconst CampaignContainer = styled.div`\n padding: 20px;\n background: white;\n border-radius: 0 0 10px 10px;\n display: grid;\n grid-template-columns: min-content minmax(0px, 100%) min-content;\n gap: 15px;\n`;\n\nconst MiddlePart = styled.div`\n &.declined {\n opacity: 0.3;\n }\n`;\n\nconst DateContainer = styled.div`\n text-align: end;\n margin-top: 5px;\n`;\n\nconst CampaignName = styled.div`\n color: black;\n font-family: var(--blox-font-family);\n font-weight: var(--blox-font-weight-700);\n font-size: var(--blox-font-size-lg);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n ${MiddlePart}.declined & {\n text-decoration: line-through;\n color: var(--blox-slate4);\n }\n`;\n","import { pttFetch } from '@pixleeturnto/wr4pt';\nimport type { CampaignMessageRecord } from '@pixleeturnto/wr4pt/dist/models';\n\nconst MESSAGES_PAGE_SIZE = 10;\n\n/**\n * result of the rails view below (views/campaign_messages/index.rabl):\n * array of attributes :id, :subject, :body, :created_at, :created_by_user_id, :read\n * node(:attachments) do |campaign_message|\n * campaign_message.attachments.map do |attachment|\n * {\n * id: attachment.id,\n * filename: attachment.filename.to_s,\n * url: rails_blob_url(attachment, only_path: true, disposition: 'attachment'),\n * byte_size: attachment.byte_size,\n * human_size: number_to_human_size(attachment.byte_size)\n * }\n * end\n * end\n */\nexport type SingleMessage = Pick & {\n attachments: Array<{\n id: number;\n filename: string;\n url: string;\n byte_size: number;\n human_size: string;\n }>;\n};\n\nexport interface FetchCampaignMessagesResult {\n messages: SingleMessage[];\n offset: number;\n total_count: number;\n}\n\nexport const fetchCampaignMessages = ({ campaignInfluencerId, pageParam = 0 }: { campaignInfluencerId: number, pageParam: number; }) => pttFetch(\n `/campaign_messages?campaign_influencer_id=${campaignInfluencerId}&limit=${MESSAGES_PAGE_SIZE}&offset=${pageParam}`,\n);\n\nexport interface SendCampaignMessagesParams {\n campaignInfluencerId: number;\n message: string;\n files?: File[];\n authenticityToken: string;\n}\n\nexport const sendCampaignMessages = async ({\n campaignInfluencerId,\n message = '',\n files = [],\n authenticityToken, // the authenticity token is given by rails\n}: SendCampaignMessagesParams) => {\n const formData = new FormData();\n\n formData.append('authenticity_token', authenticityToken);\n formData.append('campaign_influencer_id', campaignInfluencerId?.toString() ?? '');\n formData.append('campaign_message[body]', message);\n files.forEach((file) => {\n formData.append('campaign_message[attachments][]', file);\n });\n\n const { data } = await pttFetch('/campaign_messages', {\n method: 'POST',\n body: formData,\n });\n\n return data;\n};\n","import { pttFetch } from '@pixleeturnto/wr4pt';\nimport { ProductAsJson } from 'react/types/product';\nimport {\n AccountRecord,\n CampaignAttachmentRecord,\n CampaignGoalRecord,\n CampaignInfluencerLinkRecord,\n CampaignInfluencerRecord,\n CampaignRecord,\n CampaignProductRecord,\n} from '@pixleeturnto/wr4pt/dist/models';\n\nexport interface RespondToCampaignParams {\n campaignInfluencerId: number;\n accept: boolean;\n authenticityToken: string;\n}\n\n// the authenticity token is given by rails\nexport const respondToCampaign = async ({ campaignInfluencerId, accept, authenticityToken }: RespondToCampaignParams) => (\n pttFetch(`/campaign_influencers/${campaignInfluencerId}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ status: accept ? 'accepted' : 'declined', authenticity_token: authenticityToken }),\n })\n);\n\n// Result of\n// @campaign_influencer.as_json(include: [\n// campaign: {\n// include: [: account, : campaign_goals, : products,\n// { campaign_attachments: { methods: [: file_url] } }]\n// },\n// campaign_influencer_links: {\n// include: { campaign_product: { include: [: product] } }, methods: : link\n// }\n// ])\nexport interface FetchCampaignInfluencerResult extends CampaignInfluencerRecord {\n campaign: CampaignRecord & {\n campaign_attachments: Array;\n campaign_goals: CampaignGoalRecord[];\n account: AccountRecord;\n products: ProductAsJson[];\n };\n campaign_influencer_links: Array;\n hasChosenProducts: boolean;\n}\n\nexport const fetchCampaignInfluencer = async (campaignInfluencerId: number) => (pttFetch(`/campaign_influencers/${campaignInfluencerId}`, {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n },\n}));\n","import { useMutation, useQuery, useQueryClient } from 'react-query';\nimport { trackCampaignAccept, trackCampaignDecline } from 'react/utils/analytics';\nimport type { FetchCampaignInfluencerResult, RespondToCampaignParams } from 'apis';\nimport { respondToCampaign, fetchCampaignInfluencer } from 'apis';\n\nexport const getCampaignInfluencersQueryKey = (campaignInfluencerId: number) => ['campaignInfluencers', campaignInfluencerId];\n/**\n * Hook for responding (accepting or declining) a campaign\n */\nexport const useRespondToCampaign = ({ campaignInfluencerId, campaignId }: { campaignInfluencerId: number, campaignId: number; }) => {\n const queryClient = useQueryClient();\n\n return useMutation>(({\n accept,\n authenticityToken // the authenticity token is given by rails\n }) => respondToCampaign({ campaignInfluencerId, accept, authenticityToken }), {\n onMutate: ({ accept }) => {\n if (accept) {\n trackCampaignAccept(campaignInfluencerId, campaignId);\n } else {\n trackCampaignDecline(campaignInfluencerId, campaignId);\n }\n },\n onSuccess: (_result, { accept }) => {\n // Update the cache\n queryClient.setQueryData(getCampaignInfluencersQueryKey(campaignInfluencerId), (currentData) => {\n if (!currentData) {\n // This is a react-query type issue that was fixed in v4: currentData is `TData | undefined` while the expected return value is `TData`.\n // If currentData is undefined, we can't invent some data to return.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return currentData!;\n }\n return {\n ...currentData,\n status: accept ? 'accepted' : 'declined'\n };\n });\n }\n });\n};\n\n\n/**\n * Hook for fetching a single campaign influencer\n */\nexport const useCampaignInfluencer = ({ campaignInfluencerId }: { campaignInfluencerId: number; }, options: {\n initialData?: FetchCampaignInfluencerResult;\n}) => {\n return useQuery(getCampaignInfluencersQueryKey(campaignInfluencerId), async () => {\n const { data } = await fetchCampaignInfluencer(campaignInfluencerId);\n\n return data;\n }, options);\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isObjKey>(key: string | number | symbol, obj: T): key is keyof T {\n return key in obj;\n}\n","import React, { useState } from 'react';\nimport type { LayoutProps } from '@pixleeturnto/wr4pt';\nimport { BloxAnchor, BloxText, Box, Flex, Grid, useStatus, BloxButton, BloxAlert, ProductImage } from '@pixleeturnto/wr4pt';\nimport styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { AccountAvatar } from './AccountAvatar';\nimport { useRespondToCampaign } from 'react/apis/campaign_influencers';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\nimport { AccountMethods, CampaignGoalMethods, CampaignInfluencerMethods, CampaignMethods, ProductMethods } from '@pixleeturnto/wr4pt/dist/models';\nimport { isObjKey } from 'react/types/utils';\n\n\nconst INCENTIVE_METHODS = {\n product: 'Product',\n payment: 'Payment',\n product_and_payment: 'Product & Payment',\n no_incentive: 'No Incentive'\n} as const;\n\n\nexport interface CampaignBriefProps {\n campaignInfluencer: FetchCampaignInfluencerResult;\n railsAuthenticityToken: string;\n}\n\n/**\n * \"Brief\" section of the campaign that shows a summary of the campaign.\n */\nexport const CampaignBrief = ({ campaignInfluencer, railsAuthenticityToken }: CampaignBriefProps) => {\n const { campaign: { hashtags, reward_type, reward_notes, review_email_interval_days, description, campaign_goals, campaign_attachments, handles, phrases, and_hashtags } } = campaignInfluencer;\n const visible_campaign_attachments = campaign_attachments.filter(attachment => attachment.visible);\n const campaignName = CampaignMethods.getName(campaignInfluencer.campaign);\n const starts_at = CampaignMethods.getStartMoment(campaignInfluencer.campaign)?.format('MMM D, YYYY');\n const ends_at = CampaignMethods.getEndMoment(campaignInfluencer.campaign)?.format('MMM D, YYYY');\n\n const { showSuccess, showError } = useStatus();\n const [showMessage, setShowMessage] = useState(false);\n const { mutate: sendResponseToCampaign, isLoading } = useRespondToCampaign({ campaignInfluencerId: campaignInfluencer.id, campaignId: campaignInfluencer.campaign?.id });\n\n const respondAcceptCampaign = () => {\n const variables = { accept: true, authenticityToken: railsAuthenticityToken };\n const options = {\n onSuccess: () => showSuccess('Campaign accepted!'),\n onError: () => showError('Request failed!')\n };\n\n sendResponseToCampaign(variables, options);\n };\n\n const respondDeclineCampaign = () => {\n setShowMessage(false);\n const variables = { accept: false, authenticityToken: railsAuthenticityToken };\n const options = {\n onSuccess: () => {\n showSuccess('Campaign declined!');\n },\n onError: () => showError('Request failed!')\n };\n sendResponseToCampaign(variables, options);\n };\n\n const getCampaignStatus = () => {\n if (CampaignInfluencerMethods.isDeclined(campaignInfluencer)) {\n return Declined campaign request;\n }\n\n if (CampaignInfluencerMethods.isPending(campaignInfluencer)) {\n return Awaiting response;\n }\n\n return Campaign accepted;\n };\n\n return (\n \n \n \n \n \n \n \n {CampaignInfluencerMethods.isDeclined(campaignInfluencer) ?\n {campaignName} :\n {campaignName}}\n \n {CampaignInfluencerMethods.isDeclined(campaignInfluencer) ?\n (Timeline: \n {starts_at} - {ends_at}\n ) :\n (Timeline: \n {starts_at} - {ends_at}\n )}\n \n {getCampaignStatus()}\n \n \n\n {CampaignInfluencerMethods.isPending(campaignInfluencer) && (<>\n \n Accept\n setShowMessage(true)} className='secondary grey' $m={0}>Decline\n \n setShowMessage(false)}\n />\n )}\n \n\n {!!description &&\n \n \n {description}\n \n \n }\n\n {!!campaignInfluencer.campaign.products.length &&\n \n {campaignInfluencer.campaign.has_product_for_post && CampaignInfluencerMethods.isAccepted(campaignInfluencer) &&\n !campaignInfluencer.hasChosenProducts && Select products}\n {campaignInfluencer.campaign.products.map(p => p && )}\n \n }\n\n \n In order for you to complete this campaign, you must create the following content:\n {!!campaign_goals?.length && campaign_goals.map((goal, index) => ())}\n\n {!!review_email_interval_days &&\n \n Product Reviews\n \n \n Product reviews will be required for this campaign\n \n \n \n }\n\n \n \n \n \n \n\n {!!reward_type &&\n \n {isObjKey(reward_type, INCENTIVE_METHODS) ? INCENTIVE_METHODS[reward_type] : ''}\n {!!reward_notes && \n Notes: \n {reward_notes}\n }\n \n }\n\n {!!visible_campaign_attachments.length &&\n \n {visible_campaign_attachments.map(({ name, file_url }) => ({name}))}\n \n }\n \n );\n};\n\ninterface CampaignParametersProps {\n type: 'and_hashtags' | 'hashtag' | 'mention' | 'keyword';\n parameters?: string[];\n}\n\n/**\n * Campaign Parameters Wrapper\n */\nconst CampaignParameters = ({ type, parameters = [] }: CampaignParametersProps) => {\n if (!parameters.length) {\n return null;\n }\n\n return (\n <>\n \n {type === 'and_hashtags' ? 'All content must include one of these hashtag(s):' : `Content can also include any of these ${type}(s):`}\n \n \n {parameters.map((param, i) => \n {param}\n )}\n \n \n );\n};\n\n\ninterface WrapperProps extends LayoutProps {\n label: string;\n children?: React.ReactNode;\n $lmb?: LayoutProps['$mb'];\n}\n/**\n * Wrapper for the campaign brief section.\n */\nconst Wrapper = ({ label, children = null, $lmb = undefined, ...rest }: WrapperProps) => {\n return (\n \n {label}\n {children}\n \n );\n};\n\nconst getSourceDisplayName = (source: string | null) => {\n if (source === 'tiktok') {\n return 'TikTok';\n } else if (source === 'instagram') {\n return 'Instagram';\n }\n};\n\ninterface GoalWrapperProps {\n goal: {\n goals: Record | null;\n notes: string | null;\n source: string | null;\n };\n}\n\n/**\n * Renders a goal for the campaign brief section.\n */\nconst GoalWrapper = ({ goal }: GoalWrapperProps) => {\n const { source, goals, notes } = goal;\n\n return (\n \n {getSourceDisplayName(source)}\n \n {Object.keys(goals ?? {}).map((key) => )}\n \n {!!notes &&\n \n Notes from the brand\n {notes}\n \n }\n \n );\n};\n\n\ninterface GoalListProps {\n goalName: string;\n source: string | null;\n goalValue: unknown;\n}\n\n/**\n * Draw a list of goals for a goal source.\n */\nconst GoalList = ({ goalName, source, goalValue }: GoalListProps) => {\n const goalDisplayName = getGoalDisplayName(goalName, source);\n\n const lookup = {\n 'stories': 'story',\n 'carousel posts': 'carousel post',\n 'reels': 'reel',\n 'photos': 'photo',\n 'TikToks': 'TikTok',\n } as const;\n\n const makeSingular = (str: string, num: number) => {\n return Number(num) === 1 && isObjKey(str, lookup) ? lookup[str] : str;\n };\n\n const parsedGoalValue = CampaignGoalMethods.parseGoal(goalName, goalValue);\n const isCarousel = parsedGoalValue && typeof parsedGoalValue === 'object';\n\n\n return (\n \n {isCarousel ? parsedGoalValue.post : parsedGoalValue} \n {source === 'instagram' ? 'Instagram' : ''} \n {isCarousel ? \n {makeSingular('carousel posts', parsedGoalValue.post ?? 0)} with \n {parsedGoalValue.content} content\n :\n {makeSingular(goalDisplayName, parsedGoalValue ?? 0)}}\n \n );\n};\n\n/**\n * Draw a list of goals for a goal source.\n */\nconst ProductItem = ({ product }: { product: { product_photo: string | null, name: string | null, buy_now_link_url: string | null; }; }) => {\n const [isCopied, setIsCopied] = useState(false);\n const { showError } = useStatus();\n\n const onCopyClick = async () => {\n try {\n await navigator.clipboard.writeText(ProductMethods.getBuyNowLinkUrl(product) ?? '');\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 3000);\n } catch (err) {\n showError('The copy failed, please ensure you have the right permissions.');\n }\n };\n\n return (\n \n \n \n {ProductMethods.getName(product)}\n {!!ProductMethods.getBuyNowLinkUrl(product) &&\n \n {ProductMethods.getBuyNowLinkUrl(product)}\n {isCopied ? Copied! : }\n \n }\n \n \n );\n};\n\n\nfunction getGoalDisplayName(goalName: string, source: string | null) {\n if (source === 'tiktok') {\n return 'TikToks';\n }\n if (goalName === 'videos') {\n return 'reels';\n }\n return goalName;\n}\n\nconst StyledBox = styled(Box)`\n background-color: var(--page-background);\n`;\n\nconst WhiteWrapper = styled(Box)`\n background-color: white;\n`;\n\nconst CampaignHeader = styled(Flex).attrs({\n $fd: 'column',\n $p: '20px 30px',\n})`\n background-color: white;\n`;\n\nconst GoalsList = styled.ul`\n list-style: none;\n margin-left: 10px;\n`;\n\nconst GoalListItem = styled.li`\n display: flex;\n align-items: center;\n margin-bottom: 5px;\n\n &::before {\n content: '';\n background: var(--blox-slate5);\n width: 4px;\n height: 4px;\n border-radius: 50%;\n display: inline-block;\n margin-right: 10px;\n }\n`;\n\nconst CampaignNameContainer = styled.div`\n padding-top: 4px;\n overflow: hidden;\n`;\n\nconst WrappedText = styled(BloxText)`\n overflow-wrap: break-word;\n white-space: break-spaces;\n color: black;\n`;\n\nconst BloxDeclinedText = styled(WrappedText)`\n color: var(--blox-slate4--active);\n text-decoration: line-through;\n opacity: 0.3;\n`;\n\nconst BloxGoalContainer = styled(Box)`\n color: var(--blox-slate5);\n margin: 11px 0;\n`;\n\nconst CampaignButtonGroup = styled(Flex).attrs({\n $justify: 'center',\n $pt: 16,\n $f: 1,\n $align: 'center',\n $w: '100%'\n})`\n background-color: white;\n\n button {\n margin: auto;\n width: 100%;\n }\n`;\n\nconst Parameter = styled.div`\n border: 1px solid var(--blox-slate1c);\n border-radius: 3px;\n overflow: hidden;\n padding: 5px 10px;\n`;\n\nconst EllipseText = styled(BloxText)`\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst ProductUrl = styled(BloxAnchor)`\n display: inline-block;\n font-size: var(--blox-font-size-sm) !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-right: 7px;\n max-width: 75%;\n`;\n\nconst LinkIcon = styled.i.attrs({\n className: 'fa-regular fa-link-simple',\n})`\n font-size: 18px !important;\n color: var(--blox-slate5);\n transform: rotate(130deg);\n`;\n\nconst ProductContainer = styled(Grid).attrs({\n $columns: '65px 1fr',\n $mt: 10,\n $p: 5,\n})`\n border: 0.5px solid var(--blox-slate1c);\n border-radius: 5px;\n`;\n\nconst ProductInfo = styled(Flex).attrs({\n $fd: 'column',\n $h: '100%',\n $justify: 'center'\n\n})`\n justify-self: unset;\n overflow: hidden;\n`;\n\nconst SelectProductLink = styled(Link).attrs<{ $disabled?: boolean; }>(props => ({\n className: `blox${props.$disabled ? ' disabled' : ''}`,\n role: 'button',\n 'aria-disabled': !!props.$disabled,\n})) <{ $disabled?: boolean; }>`\n width: 100% !important;\n ${props => props.$disabled ? 'pointer-events: none;' : ''}\n`;\n","import React from 'react';\nimport { useInfiniteQuery, useIsMutating, useMutation, useQueryClient } from 'react-query';\nimport { useEvent } from '@pixleeturnto/wr4pt';\nimport type {\n SendCampaignMessagesParams,\n SingleMessage\n} from 'apis';\nimport {\n fetchCampaignMessages,\n sendCampaignMessages,\n} from 'apis';\nimport moment from 'moment';\n\nconst REFETCH_INTERVAL_SEC = 10;\n\nconst getCampaignMessagesQueryKey = (campaignInfluencerId: number) => ['messages', campaignInfluencerId];\nconst getSendMutationKey = (campaignInfluencerId: number) => ['sendMessage', campaignInfluencerId];\n\nexport type TransformedSingleMessage = SingleMessage & {\n $$uiPending: boolean;\n};\n/**\n * Fetches the messages for a campaign (paginated)\n */\nexport const useCampaignMessages = ({ campaignInfluencerId }: { campaignInfluencerId: number; }) => {\n const queryKey = getCampaignMessagesQueryKey(campaignInfluencerId);\n\n const query = useInfiniteQuery(queryKey, async ({ pageParam = 0 }) => {\n const response = await fetchCampaignMessages({ campaignInfluencerId, pageParam });\n\n return {\n ...response.data,\n messages: response.data.messages?.map(m => {\n const result: TransformedSingleMessage = {\n ...m,\n $$uiPending: false, // Adding this flag to the message so we can show a \"sending\" indicator\n };\n return result;\n }) ?? [],\n };\n }, {\n getNextPageParam: (lastPage) => {\n // This is used by react-query to fetch the next page\n // What is returned by this function is the parameter (pageParam above) to fetch the next page\n // If there are no more pages, null is returned, and react-query will stop fetching (and update the `hasMorePages` flag)\n // https://tanstack.com/query/v4/docs/guides/infinite-queries\n const newOffset = lastPage.offset + lastPage.messages.length;\n return newOffset < lastPage.total_count ? newOffset : null;\n }\n });\n\n const { refetch, isError } = query;\n\n const isSending = useIsMutating(getSendMutationKey(campaignInfluencerId));\n\n const handleRefetch = useEvent(() => {\n if (!isSending && !isError) {\n // We don't do this while we're sending a message as it would erase \n // the mock message we inserted in onMutate below\n refetch({ refetchPage: (_page, index) => index === 0 });\n }\n });\n\n // Refetching the first page every 10 seconds to look for new messages,\n // so that new messages \"appear\" to the user, without having to reload the page\n React.useEffect(() => {\n const interval = setInterval(() => {\n handleRefetch();\n }, REFETCH_INTERVAL_SEC * 1000);\n return () => clearInterval(interval);\n }, [handleRefetch]);\n\n return query;\n};\n\n\ntype SendCampaignMessagesError = { data?: string[]; } | undefined;\n\n/**\n * Hook for sending a message\n */\nexport const useSendCampaignMessages = ({ campaignInfluencerId, onError }: { campaignInfluencerId: number, onError?: (error: SendCampaignMessagesError) => void; }) => {\n const queryClient = useQueryClient();\n return useMutation>(({\n message = '',\n files = [],\n authenticityToken, // the authenticity token is given by rails\n }) => sendCampaignMessages({ campaignInfluencerId, message, files, authenticityToken }), {\n mutationKey: getSendMutationKey(campaignInfluencerId), // We are using a mutation key just so that we can call isMutating() above\n onMutate: async ({ message, files }) => { // This is called when the backend call is initiated \n\n // Updating the local cache so that the new message shows up immediately\n const queryKey = getCampaignMessagesQueryKey(campaignInfluencerId);\n\n // Cancel any outgoing refetches (so they don't overwrite our optimistic update)\n await queryClient.cancelQueries(queryKey);\n\n const mockMessageId = -1 * Math.random(); // Negative number to avoid collisions with real ids\n\n queryClient.setQueryData['data']>(queryKey, (currentData) => {\n const [firstPage, ...allPagesButFirst] = currentData?.pages ?? [];\n\n return {\n ...currentData,\n pageParams: currentData?.pageParams ?? [],\n pages: [{\n ...firstPage,\n messages: [{\n id: mockMessageId,\n $$uiPending: true, // add a \"loading\" flag so that we can show it differently in the ui\n body: message,\n created_at: moment().toISOString(),\n created_by_user_id: null,\n read: false,\n subject: '',\n attachments: (files ?? []).map((file, index) => ({\n id: index,\n filename: file.name,\n url: '',\n byte_size: file.size,\n human_size: ''\n }))\n },\n ...(firstPage?.messages ?? []),\n ],\n total_count: (firstPage?.total_count || 0) + 1,\n offset: (firstPage?.offset || 0),\n },\n ...allPagesButFirst\n ]\n };\n });\n\n // This will be passed to onSettled below\n return mockMessageId;\n },\n onError: (error, _variables, mockMessageId) => {\n // In case of error, just remove the mock message\n const queryKey = getCampaignMessagesQueryKey(campaignInfluencerId);\n\n // We replace the message with id mockMessageId with the new message\n queryClient.setQueryData['data']>(queryKey, (currentData) => {\n return {\n ...currentData,\n pageParams: currentData?.pageParams ?? [],\n pages: (currentData?.pages ?? []).map(page => ({\n ...page,\n messages: page.messages?.filter(m => m.id !== mockMessageId) ?? []\n }))\n };\n });\n\n if (onError) {\n onError(error);\n }\n },\n onSuccess: (response, _variables, mockMessageId) => {\n // The backend returns the new message in the response, \n // so we replace the mock message with the real one\n const queryKey = getCampaignMessagesQueryKey(campaignInfluencerId);\n\n // We replace the message with id mockMessageId with the new message\n queryClient.setQueryData['data']>(queryKey, (currentData) => {\n const newMessage: TransformedSingleMessage = {\n ...response,\n $$uiPending: false,\n };\n\n return {\n ...currentData,\n pageParams: currentData?.pageParams ?? [],\n pages: (currentData?.pages ?? []).map(page => ({\n ...page,\n messages: response ? page.messages?.map(m => m.id === mockMessageId ? newMessage : m) ?? [] : page.messages\n }))\n };\n });\n },\n });\n};\n","import React from 'react';\n\nconst RailsAuthenticityTokenContext = React.createContext('');\n\nexport const RailsAuthenticityContextProvider = ({ children, token }) => (\n \n {children}\n \n);\n\nexport const useRailsAuthenticityToken = () => React.useContext(RailsAuthenticityTokenContext);\n","import { Layout } from '@pixleeturnto/wr4pt';\nimport styled from 'styled-components';\n\nexport const Loader = styled.div`\n font-size: 12px;\n text-align: center;\n ${Layout}\n`;\n","import { useEvent, BloxAnchor, BloxText } from '@pixleeturnto/wr4pt';\nimport { CampaignMessageMethods } from '@pixleeturnto/wr4pt/dist/models';\nimport moment from 'moment';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Loader } from '../../Loader';\nimport type { TransformedSingleMessage } from 'react/apis/campaign_messages';\n\nexport interface MessagesListProps {\n allData?: TransformedSingleMessage[];\n pagesCount?: number;\n hasNextPage?: boolean;\n isFetchingNextPage: boolean;\n fetchNextPage: () => void;\n isLoading: boolean;\n onFileClick: () => void;\n}\n\n/**\n * The actual list of messages + the send message form\n */\nexport const MessagesList = ({ allData, pagesCount, hasNextPage, isFetchingNextPage, fetchNextPage, isLoading, onFileClick }: MessagesListProps) => {\n const scrollRef = React.useRef(null);\n const scrollData = React.useRef<{ top: number, height: number; }>();\n\n\n const firstMessageId = allData?.[0]?.id;\n const lastMessageId = allData?.[allData.length - 1]?.id;\n\n\n // When loading the screen or when a new message is received, scroll to the bottom.\n // We need useLayoutEffect because we need it done asap so that the user doesn't notice.\n React.useLayoutEffect(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n }\n }, [lastMessageId]); // When lastMessageId changes, we added some items to the bottom\n\n\n // When scrolling up and new messages are loaded (page count has changed), we restore scroll position so\n // that the user stays at the same place\n React.useLayoutEffect(() => {\n if (scrollData?.current && scrollRef.current) {\n // Some items were added to the top: restore scroll position\n scrollRef.current.scrollTop = scrollRef.current.scrollHeight - scrollData.current.height;\n }\n }, [pagesCount]);\n\n // When we start fetching the next page, we save the scroll position so that we can restore it when the\n // new page is added at the top\n React.useEffect(() => {\n if (isFetchingNextPage && scrollRef.current) {\n // Saving current scroll position + fetching new data\n scrollData.current = {\n top: scrollRef.current.scrollTop,\n height: scrollRef.current.scrollHeight,\n };\n }\n }, [isFetchingNextPage]);\n\n // When we reach the top, if there are more pages, fetch the next page\n const handleIntersection = useEvent(() => {\n if (hasNextPage) {\n fetchNextPage();\n }\n });\n\n // If we have more pages, \n // we set up the scroll observer to be able to fetch the next page when reaching the top\n React.useEffect(() => {\n if (scrollRef.current && hasNextPage) {\n // Tracking when the first item comes into viewport\n const firstMessageContainer = scrollRef.current.querySelector(`[data-message-id=\"${firstMessageId}\"]`);\n if (!firstMessageContainer) {\n return;\n }\n\n const observer = new IntersectionObserver((entries) => {\n if (entries.some(e => e.isIntersecting)) {\n handleIntersection();\n }\n }, {\n root: scrollRef.current,\n });\n\n observer.observe(firstMessageContainer);\n\n return () => {\n observer.unobserve(firstMessageContainer);\n };\n }\n }, [firstMessageId, hasNextPage, handleIntersection]);\n\n return (\n \n\n {(isFetchingNextPage || isLoading) && Loading ...}\n {\n allData?.map((m) => (\n \n {moment.utc(m.created_at).local().calendar()}\n\n \n {m.body}\n {m.attachments?.map(a => (\n \n {a.filename}\n\n {a.human_size ?\n <>\n  ({a.human_size})\n : ''}\n\n \n ))}\n \n\n )\n )}\n \n );\n};\n\n\nconst Message = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n text-align: left;\n\n &.from-me {\n text-align: right;\n align-items: flex-end;\n }\n\n &.loading {\n opacity: 0.5;\n }\n`;\n\nconst MessageContent = styled.div`\n max-width: 75%;\n overflow: hidden;\n color: var(--blox-slate7);\n background: var(--blox-slate1);\n padding: 10px 20px;\n border-radius: 25px;\n font-size: 14px;\n font-family: var(--blox-font-family);\n margin-bottom: 10px;\n width: fit-content;\n white-space: pre-line;\n\n ${Message}.from-me & {\n background: var(--blox-purple--active);\n color: white;\n }\n`;\n\nconst Attachment = styled.div`\n display: flex;\n align-items: baseline;\n white-space: nowrap;\n gap: 5px;\n font-size: 12px;\n font-weight: 400;\n`;\n\nconst FileLink = styled(BloxAnchor)`\n color: inherit !important;\n font-weight: 700 !important;\n font-size: inherit !important;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst InfiniteScrollContainer = styled.div`\n padding: 10px;\n overflow-y: auto;\n flex: 1;\n`;\n","import { PTTForm, BloxText, BloxTextArea } from '@pixleeturnto/wr4pt';\nimport type { HTMLInformEl } from 'informel';\nimport React from 'react';\nimport { isMobileDevice } from 'react/utils/isMobile';\nimport styled from 'styled-components';\n\ninterface SendActionBarProps {\n onSend: (param: { message: string; files: File[]; }) => void;\n}\n\ninterface FormValues {\n message: string;\n}\n\n/**\n * The message textbox + file picker for attachment + send button\n */\nexport const SendActionBar = ({ onSend }: SendActionBarProps) => {\n const fileInputRef = React.useRef(null);\n const textareaRef = React.useRef(null);\n const formRef = React.useRef(null);\n\n // This used to \"grow\" the textarea when there are multiple lines\n const [textAreaRowsCount, setTextAreaRowsCount] = React.useState(1);\n const [files, setFiles] = React.useState([]);\n\n\n const handleInput = ({ detail: { values } }: CustomEvent<{\n values: FormValues;\n changedField: string;\n }>) => {\n setTextAreaRowsCount(getMessageTextAreaRowCount(values.message));\n };\n\n const handleFileSelect = (e: React.ChangeEvent) => {\n const files = Array.from(e.target.files ?? []) as File[];\n setFiles(currentFiles => [...currentFiles, ...files]);\n };\n\n const handleSubmit = ({ detail: { values } }: CustomEvent<{ values: FormValues; }>) => {\n onSend({\n message: values.message.trim(),\n files: files\n });\n // Clear the list of files shown after sending (the rest of the form is automatically cleared)\n setFiles([]);\n setTextAreaRowsCount(1);\n\n // After sending, keep focus on the text area, in case the user wants to send another message\n textareaRef.current?.focus();\n };\n\n const handleFileRemove = (fileIndex: number) => {\n setFiles(files.filter((_, i) => i !== fileIndex));\n };\n\n const handleValidation = ({ values }: { values: FormValues; }) => {\n const { message } = values;\n // Block sending when there is no message nor file\n if (message.length === 0 && files.length === 0) {\n return {\n message: 'Please enter a message or attach a file',\n };\n }\n\n return {};\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n // On desktop the enter key sends the message, enter+shift inserts a new line\n // On mobile, the enter key inserts a new line\n if (e.key === 'Enter') {\n const send = !isMobileDevice() && !e.shiftKey;\n\n if (send) {\n e.preventDefault();\n formRef.current?.requestSubmit();\n }\n }\n };\n\n return (\n \n \n {files.map((file, index) => (\n \n {file.name}\n \n \n\n ))}\n \n \n \n \n fileInputRef.current?.click()}>\n \n \n \n \n \n \n \n );\n};\n\n/**\n * Returns the number of rows the textarea should have based on content:\n * - 1 row per line (separated by \\n or `\\r\\n`)\n * - also split lines greater than 70 characters since the textarea will wrap them\n */\nconst getMessageTextAreaRowCount = (message: string) => {\n const lines = message.split(/\\r\\n|\\r|\\n/);\n\n // The textarea also auto-wraps long lines: \n // we're counting lines with more than 70 characters as 2 lines\n const linesWithAutoWrap = lines.reduce((count, line) => {\n const lineLength = line.length || 1;\n return count + Math.ceil(lineLength / 70);\n }, 0);\n\n return Math.min(4, linesWithAutoWrap);\n};\n\n\nconst ActionBar = styled.div`\n background: var(--blox-slate1);\n border-radius: 0 0 5px 5px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n gap: 5px;\n\n textarea {\n width: initial;\n border: none;\n color: initial;\n font-family: var(--blox-font-family);\n font-size: var(--blox-font-size);\n font-weight: 300;\n background: transparent;\n flex: 1;\n }\n`;\n\nconst ActionButton = styled.button`\n width: 39px;\n height: 39px;\n padding: 0;\n margin: 0;\n font-size: 14px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n\nconst SubmitButton = styled(ActionButton).attrs({\n type: 'submit',\n 'aria-label': 'Send',\n})`\n width: 39px;\n height: 39px;\n background: var(--blox-purple--active);\n padding: 0;\n margin: 0;\n color: white;\n font-size: 14px;\n`;\n\nconst FileButton = styled(ActionButton).attrs({\n type: 'button',\n 'aria-label': 'Attach file',\n})`\n background: white;\n color: black;\n`;\n\nconst FileContainer = styled.div`\n background: var(--blox-slate1);\n padding: 5px;\n border-bottom: 1px solid var(--blox-slate1a);\n display: flex;\n justify-content: space-between;\n\n button {\n width: auto;\n height: auto;\n background: none;\n padding: 0;\n margin: 0;\n }\n`;\n\nconst Attachments = styled.div`\n max-height: 200px;\n overflow-y: auto;\n`;\n","// Checks the user agent to detect mobile browsers:\n// Checking for \"Mobi\" as recommended here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#mobile_tablet_or_desktop\nexport const isMobileDevice = () => !!navigator.userAgent.match(/Mobi/i);\n","import { useStatus, BloxButton } from '@pixleeturnto/wr4pt';\nimport React from 'react';\nimport { useRespondToCampaign } from 'react/apis/campaign_influencers';\nimport { useCampaignMessages, useSendCampaignMessages } from 'react/apis/campaign_messages';\nimport { useRailsAuthenticityToken } from 'react/contexts/authenticityToken';\nimport { trackCampaignMessageFileClick, trackCampaignMessageSent } from 'react/utils/analytics';\nimport styled from 'styled-components';\nimport { MessagesList } from './MessagesList';\nimport { SendActionBar } from './SendActionBar';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\nimport { CampaignInfluencerMethods } from '@pixleeturnto/wr4pt/dist/models';\n\n/** \n * Campaign Messages section in the campaign details page\n */\nexport const CampaignMessages = ({ campaignInfluencer }: { campaignInfluencer: FetchCampaignInfluencerResult; }) => {\n const authenticityToken = useRailsAuthenticityToken();\n\n const campaignInfluencerId = campaignInfluencer.id;\n\n // Fetching messages\n const {\n data,\n isLoading,\n hasNextPage,\n isFetchingNextPage,\n fetchNextPage,\n error\n } = useCampaignMessages({ campaignInfluencerId });\n\n // Hook for sending messages\n const { mutate: send } = useSendCampaignMessages({\n campaignInfluencerId,\n onError: (error) => showStatus({\n content: error?.data?.join(', ') || 'Something went wrong, please try again later.',\n variant: 'error',\n displayTime: 5000,\n }),\n });\n\n const { mutate: respondToCampaign, isLoading: isResponding } = useRespondToCampaign({ campaignInfluencerId, campaignId: campaignInfluencer.campaign?.id });\n\n const { showStatus } = useStatus();\n\n // useCampaignMessages relies on useInfiniteQuery, which returns data broken down by pages\n // https://tanstack.com/query/v4/docs/guides/infinite-queries\n const allData = data?.pages.flatMap(page => page.messages).reverse();\n\n const handleSend = ({ message, files }: { message: string, files: File[]; }) => {\n // This triggers the backend call\n send({ message, files, authenticityToken });\n\n trackCampaignMessageSent(campaignInfluencer.id, campaignInfluencer.campaign?.id);\n };\n\n const handleFileClick = () => {\n trackCampaignMessageFileClick(campaignInfluencer.id, campaignInfluencer.campaign?.id);\n };\n\n const handleAccept = () => {\n respondToCampaign({ accept: true, authenticityToken });\n };\n\n\n return (\n <>\n {error && An error has occured while fetching the messages}\n \n \n {CampaignInfluencerMethods.isPending(campaignInfluencer) && \n Accept campaign invitation?\n Accept\n }\n {CampaignInfluencerMethods.isPending(campaignInfluencer) || CampaignInfluencerMethods.isAccepted(campaignInfluencer) ?\n : null\n }\n \n \n );\n};\n\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n padding: 5px;\n margin-bottom: 10px;\n`;\n\nconst Error = styled.div.attrs({\n role: 'alert',\n})`\n color: var(--blox-red);\n font-size: 12px;\n text-align: center;\n z-index: 1;\n position: relative;\n`;\n\nconst AcceptPrompt = styled.div`\n background: var(--blox-slate0a);\n padding: 6px 18px;\n border-radius: 5px;\n font-size: 12px;\n color: var(--blox-slate3);\n margin: 8px 0;\n font-weight: 400;\n font-family: var(--blox-font-family);\n display: flex;\n justify-content: space-between;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { BloxAnchor, BloxText, useStatus, ProductImage } from '@pixleeturnto/wr4pt';\nimport type { FetchCampaignInfluencerResult } from 'apis';\nimport { CampaignInfluencerLinkMethods, ProductMethods } from '@pixleeturnto/wr4pt/dist/models';\n\nexport const CampaignLinkItem = ({ campaignLink }: { campaignLink: FetchCampaignInfluencerResult['campaign_influencer_links'][number]; }) => {\n const { showError } = useStatus();\n const [isCopied, setIsCopied] = useState(false);\n\n const onCopyClick = async () => {\n try {\n await navigator.clipboard.writeText(campaignLink.link ?? '');\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 3000);\n } catch (err) {\n showError('The copy failed, please ensure you have the right permissions.');\n }\n };\n\n const getLinkItemHeader = () => {\n const product = campaignLink.campaign_product?.product;\n\n if (campaignLink.link_type === 'destination') {\n return Brand tracking link:;\n } else if (product) {\n return (\n \n \n \n {ProductMethods.getName(product)}\n {CampaignInfluencerLinkMethods.getLinkUrl(campaignLink)}\n \n {product?.sku} - \n {ProductMethods.getFormattedPrice(product)}\n \n \n \n );\n }\n };\n\n return (\n <>\n \n {getLinkItemHeader()}\n \n {campaignLink.link}\n \n {isCopied ? Copied! :\n <>\n \n Copy\n \n }\n \n \n\n \n \n \n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n padding: 20px;\n`;\n\nconst ProductContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n margin-bottom: 17px;\n`;\n\n// length of photo is 58px + 17px margin\nconst ProductInfo = styled.div`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n margin-left: 17px;\n`;\n\nconst ProductUrl = styled(BloxAnchor)`\n font-size: var(--blox-font-size-sm) !important;\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst ProductTitle = styled(BloxText)`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst ProductSkuAndPricing = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst CampaignLinkDivider = styled.div`\n width: 100%;\n height: 1px;\n background-color: var(--blox-slate1); \n`;\n\nconst CampaignLinkContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n border: 2px solid var(--blox-slate1);\n border-radius: 3px;\n padding: 8px 10px 8px 14px;\n height: 38px;\n font-size: 14px;\n font-family: var(--blox-font-family);\n color: var(--blox-slate5);\n`;\n\nconst CopyLinkButton = styled.button`\n background-color: white;\n height: auto;\n width: auto;\n color: var(--blox-blue);\n text-transform: none;\n padding: 0;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Text, Flex } from '@pixleeturnto/wr4pt';\n\nimport { CampaignLinkItem } from './CampaignLinkItem';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\n\n/** \n * Campaign Links section in the campaign details page\n */\nexport const CampaignLinks = ({ campaignLinks }: { campaignLinks: FetchCampaignInfluencerResult['campaign_influencer_links']; }) => {\n\n return (\n \n {campaignLinks.map(link => )}\n {campaignLinks.length === 0 && There are no links associated with this campagin.}\n \n );\n};\n\nconst NoLinksText = styled(Text)`\n font-size: 16px;\n font-weight: 700;\n color: var(--blox-slate5);\n width: 100%;\n text-align: center;\n padding-top: 20px;\n`;\n","import { pttFetch } from '@pixleeturnto/wr4pt';\nimport type { ShippingAddress } from './account';\n\nexport interface SaveCreateProductsParams {\n campaignInfluencerId: number;\n products: {\n product_id: number;\n product_variant_id?: string;\n }[];\n shippingAddress: ShippingAddress;\n authenticityToken: string;\n}\n\nexport type SaveCreateProductsResult = void;\n\nexport const saveCreatorProducts = async ({\n campaignInfluencerId,\n products,\n authenticityToken,\n shippingAddress,\n}: SaveCreateProductsParams) => {\n const { data } = await pttFetch(`/campaign_influencer_products/select_products?campaign_influencer_id=${campaignInfluencerId}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': authenticityToken,\n },\n body: JSON.stringify({ products, shipping_address: shippingAddress }),\n });\n\n return data;\n};\n\nexport interface CampaignInfluencerProduct {\n product_id: number;\n product_name: string;\n product_photo?: string;\n variant_id?: string;\n variant_options?: Record;\n variant_price?: number;\n variant_image_src?: string;\n variant_title?: string;\n}\n\nexport interface FetchCampaignInfluencerProductsResult {\n selected_products: CampaignInfluencerProduct[];\n brand_order_submitted: boolean;\n shipping_address?: ShippingAddress;\n}\n\nexport interface FetchCampaignInfluencerProductsParams {\n campaignInfluencerId: number;\n}\n\nexport const fetchCampaignInfluencerProducts = async ({ campaignInfluencerId }: FetchCampaignInfluencerProductsParams) => pttFetch(`/campaign_influencer_products?campaign_influencer_id=${campaignInfluencerId}`);\n","import type {\n SaveCreateProductsParams,\n FetchCampaignInfluencerProductsResult,\n FetchCampaignInfluencerProductsParams,\n} from 'apis/campaign_influencer_products';\nimport { saveCreatorProducts, fetchCampaignInfluencerProducts } from 'apis/campaign_influencer_products';\nimport { useMutation, useQuery } from 'react-query';\n\nexport const getSelectedProductsKey = (campaignInfluencerId: number) => ['campaignInfluencerProducts', campaignInfluencerId];\n\n/**\n * Hook to save the chosen products for an influencer\n */\nexport const useSaveCreatorProducts = () => {\n return useMutation(({\n campaignInfluencerId,\n products,\n shippingAddress,\n authenticityToken,\n }: SaveCreateProductsParams) => saveCreatorProducts({ campaignInfluencerId, products, authenticityToken, shippingAddress }));\n};\n\n/**\n * Hook to get the chosen products for an influencer\n */\nexport const useSelectedProducts = ({ campaignInfluencerId }: FetchCampaignInfluencerProductsParams) => {\n return useQuery(getSelectedProductsKey(campaignInfluencerId), async (): Promise => {\n const { data } = await fetchCampaignInfluencerProducts({ campaignInfluencerId });\n\n return data;\n });\n};\n","import { BloxText, ProductImage, BloxButton } from '@pixleeturnto/wr4pt';\nimport type { CampaignInfluencerProduct } from 'apis/campaign_influencer_products';\nimport React from 'react';\nimport styled from 'styled-components';\n\n/**\n * The list of selected products. This is shown both when confirming the products selection (CampaignProductsRecap) \n * and after the products have been submitted (CampaignProductsStatus)\n */\nexport const SelectedProductsList = ({ selectedProducts, showEdit = false, onEdit }: { selectedProducts: CampaignInfluencerProduct[]; showEdit?: boolean; onEdit?: () => void; }) => {\n return (\n <>\n You have selected the following products...\n {showEdit &&\n \n \n Go back and edit your product selections\n \n }\n\n {selectedProducts.map((p) => (\n \n \n {p.product_name}\n {Object.values(p.variant_options ?? {}).join('/')}\n \n ))}\n \n\n );\n};\n\n\nconst ProductContainer = styled.div`\n display: grid;\n grid-template-areas:\n \"img name\"\n \"img variant\";\n grid-template-rows: auto 1fr;\n grid-template-columns: auto 1fr;\n grid-column-gap: 15px;\n grid-row-gap: 5px;\n border: 1px solid var(--blox-slate1c);\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 20px;\n`;\n\nconst ProductImageStyled = styled(ProductImage)`\n grid-area: img;\n width: 70px;\n`;\n\nconst ProductName = styled(BloxText)`\n grid-area: name;\n color: var(--blox-slate5);\n font-size: var(--blox-font-size-md);\n`;\n\nconst ProductVariants = styled(BloxText)`\n grid-area: variant;\n color: var(--blox-slate3);\n font-size: var(--blox-font-size-md);\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { BloxText } from '@pixleeturnto/wr4pt';\nimport type { ShippingAddress } from 'apis/account';\n\nexport const CampaignInfluencerShippingAddress = ({ shippingAddress }: { shippingAddress: ShippingAddress }) => {\n return <>\n \n Your order will be shipped to: {shippingAddress.first_name} {shippingAddress.last_name}\n \n \n {shippingAddress.address_line_1}\n {shippingAddress.address_line_2}\n {shippingAddress.city}, {shippingAddress.state} {shippingAddress.zip}\n {shippingAddress.country}\n \n ;\n};\n\nconst AddressContainer = styled.div`\n padding: 20px;\n border: 1px solid black;\n display: flex;\n flex-direction: column;\n gap: 5px;\n`;\n\nconst AddressLine = styled(BloxText)`\n color: var(--blox-slate5);\n font-size: var(--blox-font-size-md);\n text-transform: uppercase;\n`;\n","import React from 'react';\nimport { BloxText, Box } from '@pixleeturnto/wr4pt';\nimport { SelectedProductsList } from './SelectedProductsList';\nimport type { ShippingAddress } from 'apis/account';\nimport styled from 'styled-components';\nimport { CampaignInfluencerShippingAddress } from './CampaignInfluencerShippingAddress';\n\nimport type { CampaignInfluencerProduct } from 'apis/campaign_influencer_products';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\n\nexport interface CampaignProductsStatusProps {\n selectedProducts: CampaignInfluencerProduct[];\n orderSubmitted: boolean;\n campaignInfluencer: FetchCampaignInfluencerResult;\n shippingAddress: ShippingAddress;\n onEditProducts: () => void;\n}\n\n\n/**\n * After products have been selected, this screen displays a recap of the selected products & order status\n */\nexport const CampaignProductsStatus = ({ selectedProducts, orderSubmitted, campaignInfluencer, shippingAddress, onEditProducts }: CampaignProductsStatusProps) => {\n const brandName = campaignInfluencer.campaign.account?.business_name;\n const shop = campaignInfluencer.campaign.shop_type;\n\n return \n \n \n Products submitted, thanks!\n {!orderSubmitted && Please allow {brandName} to review and submit your order.}\n\n \n Order submitted\n {orderSubmitted &&\n Great news! {brandName} has placed your order through {shop}. Check your inbox for a tracking email.\n }\n \n \n \n \n \n ;\n};\n\nconst StepsGrid = styled.div`\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 10px;\n align-items: center;\n color: var(--blox-green);\n`;\n\nconst StepInfoText = styled(BloxText)`\n color: var(--blox-slate3);\n font-size: var(--blox-font-size-sm);\n grid-column: 2;\n`;\n\nconst StepIcon = styled.i.attrs<{ $active: boolean; }>(props => ({\n className: `fa-regular ${props.$active ? 'fa-circle-check' : 'fa-circle'}`,\n})) <{ $active: boolean; }>`\n color: ${({ $active }) => $active ? 'var(--blox-green)' : 'var(--blox-slate1b)'};\n`;\n","import { pttFetch } from '@pixleeturnto/wr4pt';\nimport { ProductAsJson } from 'react/types/product';\n\nexport interface FetchCampaignProductsResult {\n products: ProductAsJson[];\n}\n\nexport const fetchCampaignProducts = async (campaignId: number) => pttFetch(`/campaign_products?campaign_id=${campaignId}`, {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n },\n});\n","import { fetchCampaignProducts } from 'apis/campaign_products';\nimport { useQuery } from 'react-query';\n\n/**\n * Hook for fetching a single campaign influencer\n */\nexport const useCampaignProducts = ({ campaignId, enabled }: { campaignId: number, enabled?: boolean; }) => {\n return useQuery({\n queryKey: ['campaignProducts', campaignId],\n queryFn: async () => {\n const { data } = await fetchCampaignProducts(campaignId);\n\n return data.products;\n },\n enabled\n });\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport type { BloxSelectOption } from '@pixleeturnto/wr4pt';\nimport { BloxInput, BloxLabel, BloxSelect, BloxText, Flex, Box, ProductImage } from '@pixleeturnto/wr4pt';\nimport type { ProductAsJson } from 'react/types/product';\nimport { ProductMethods } from '@pixleeturnto/wr4pt/models';\n\n\nexport interface ProductProps {\n product: ProductAsJson;\n selected: boolean;\n selectedVariantId?: string;\n onSelectedToggle?: (productId: number, variantId: string | null, selected: boolean) => void;\n disabled?: boolean;\n}\n\n/**\n * One product in the list of products to select. It allows to select a variant.\n */\nexport const ProductDetails = ({ product, selected, selectedVariantId, onSelectedToggle, disabled }: ProductProps) => {\n const allAvailableOptions: Record = ProductMethods.getAvailableOptions(product);\n const preSelectedOptions = selectedVariantId ? ProductMethods.getVariantOptions(product.variants_json?.[selectedVariantId]) ?? {} : {};\n\n const [selectedOptions, setSelectedOptions] = React.useState>(preSelectedOptions);\n const [productOptions, setProductOptions] = React.useState>(\n Object.entries(allAvailableOptions).reduce((result, [optionName, optionValue]) => ({\n ...result,\n [optionName]: optionValue.map(value => ({ label: value, value }))\n }), {})\n );\n\n // Resetting selected options when product is unselected\n const [previousSelected, setPreviousSelected] = React.useState(selected);\n if (previousSelected !== selected) {\n setPreviousSelected(selected);\n if (!selected) {\n setSelectedOptions({});\n }\n }\n\n const handleSelection = (e: CustomEvent, availableOptionName: string) => {\n // Not all options combination correspond to an actual variant.\n // For example, given 2 options: Color: [Red, Blue] and Size: [S, M], and 2 variants: [Red/S, Blue/M], we see that Red/M and Blue/S are not possible.\n // So the logic is as follows:\n // 1. User selects one of the options\n // 2. We update the other dropdowns to disable the options not compatible with the current selection\n // 3. When all options have a value (all dropdown filled), all options become enabled again.\n // Otherwise, in the example above, after selecting Red/S, the user could never select Blue/M again.\n\n\n // The value of the option we just selected\n const selectedOptionValue = e.detail.value;\n\n // The option we just selected, in th format { name: value }\n const optionToSelect = { [availableOptionName]: selectedOptionValue };\n\n // The new selection, with the option we just selected\n let newOptions = { ...selectedOptions, [availableOptionName]: selectedOptionValue };\n\n // Did we pick something for all options yet or are some blox-select still empty?\n let allOptionsAreSelected = Object.keys(allAvailableOptions).every(optionName => !!newOptions[optionName]);\n\n // If all blox-select are filled, we need to \"fix\" the selection to make sure we're selecting a valid variant.\n // The blox-selects with incompatible values will be reseted\n if (allOptionsAreSelected) {\n newOptions = fixSelection(selectedOptions, optionToSelect);\n // After the fix above, are all options still selected or did some blox-select get resetted?\n allOptionsAreSelected = Object.keys(allAvailableOptions).every(optionName => !!newOptions[optionName]);\n }\n\n // Now we will compute the blox-select options and disable the options that need to be disabled\n const productOptions: Record = Object.entries(allAvailableOptions).reduce((result, [optionName, optionValue]) => ({\n ...result,\n [optionName]: optionValue.map(val => {\n // When all options are selected, we enable all options to not \"block\" the user\n // Disabled options are only shown as a hint when selecting an option that hasn't been selected yet\n const optionDisabled = !allOptionsAreSelected && !ProductMethods.isOptionCombinationPossible(product, { ...newOptions, [optionName]: val });\n\n return { // This is what get passed to blox-select\n label: `${val}${optionDisabled ? ' (not available)' : ''}`,\n value: val,\n disabled: optionDisabled\n };\n })\n }), {});\n\n // Update the state\n setSelectedOptions(newOptions);\n setProductOptions(productOptions);\n\n // Also inform the parent that we've interacted with a product so that it gets checked\n // We don't necesarily have a variant yet if some options are still not selected\n onSelectedToggle?.(product.id, allOptionsAreSelected ? ProductMethods.getVariantId(product, newOptions) ?? null : null, true);\n };\n\n /**\n * Given an option that was just selected (optionToSelect), this will \n * remove the incompatible values from `selectedOptions` and return the result\n * @param {*} selectedOptions - The currently selected options that need to be \"fixed\"\n * @param {*} optionToSelect - The option that was just selected\n */\n const fixSelection = (selectedOptions: object, optionToSelect: Record) => {\n // We start with the option we just selected\n const result = { ...optionToSelect };\n\n // Then for each option in the current selection, we check if it's compatible. We only add it to the result\n // if compatible.\n\n Object.entries(selectedOptions).forEach(([optionName, optionValue]) => {\n if (optionName in result) { // In case optionToSelect is a new value for an existing option.\n return;\n }\n\n // If the option is compatible, we add it to the result\n if (ProductMethods.isOptionCombinationPossible(product, { ...result, [optionName]: optionValue })) {\n result[optionName] = optionValue;\n }\n });\n\n return result;\n };\n\n const handleSelectedChange = () => {\n onSelectedToggle?.(product.id, null, !selected);\n };\n\n const currentPhotoUrl = ProductMethods.getVariantPhotoUrl(product, selectedOptions);\n\n return (\n \n {/* Rendering the variant photo OR the main product photo if not found */}\n \n \n e.stopPropagation()} $d=\"block\" className=\"font-md-label\" htmlFor={`product-${product.id}`}>{ProductMethods.getName(product)}\n {ProductMethods.getVariantFormattedPrice(product, selectedOptions)}\n\n e.stopPropagation()}>\n {Object.keys(productOptions).map(optionName => {\n const selectOptions = productOptions[optionName];\n const selectedValue = selectedOptions[optionName];\n return handleSelection(e, optionName)}\n />;\n })}\n \n \n \n \n );\n};\n\nconst Container = styled.div<{ selected: boolean; }>`\n border-radius: 5px;\n border: 1px solid ${props => props.selected ? 'var(--blox-blue)' : 'var(--blox-slate1c)'};\n background: var(--blox-slate0a);\n padding: 10px;\n margin-top: 20px;\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);\n`;\n\nconst SelectionCheckbox = styled(BloxInput).attrs({ type: 'checkbox' })`\n width: 30px !important;\n height: 30px !important;\n border-radius: 50% !important;\n border: 2px solid var(--blox-slate1b) !important;\n position: absolute;\n top: 10px;\n left: 10px;\n\n &:checked {\n border: 2px solid var(--blox-blue) !important;\n }\n`;\n","import { Box, BloxText, Text, BloxButton } from '@pixleeturnto/wr4pt';\nimport React from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useCampaignProducts } from 'react/apis/campaign_products';\nimport { Loader } from 'react/components/Loader';\nimport styled from 'styled-components';\nimport { ProductDetails } from './ProductDetails';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\n\n/**\n * This screen allows creators to pick their products and variants\n */\nexport const SelectCampaignProducts = ({ campaignInfluencer }: { campaignInfluencer: FetchCampaignInfluencerResult; }) => {\n const { data: products, isLoading, isError } = useCampaignProducts({ campaignId: campaignInfluencer.campaign?.id });\n\n // map: productId => variantId\n const [selectedProducts, setSelectedProducts] = React.useState>(getProductsFromSessionStorage(campaignInfluencer.id) ?? {});\n\n const navigate = useNavigate();\n\n if (isError) {\n return Something went wrong, please try again later.;\n }\n\n const handleConfirm = () => {\n setProductsInSessionStorage(campaignInfluencer.id, selectedProducts);\n navigate('./recap');\n };\n\n const handleSelectedChange = (productId: number, variantId: string | null, selected: boolean) => {\n if (selected) {\n setSelectedProducts(selectedProducts => ({\n ...selectedProducts,\n [productId]: variantId\n }));\n } else {\n setSelectedProducts(selectedProducts => {\n const newSelectedProducts = { ...selectedProducts };\n delete newSelectedProducts[productId];\n return newSelectedProducts;\n });\n }\n };\n\n const maxProducts = campaignInfluencer.campaign?.max_products;\n const notes = campaignInfluencer.campaign?.products_notes;\n\n const selectedProductsCount = Object.keys(selectedProducts).length;\n const capacityReached = !!maxProducts && selectedProductsCount >= maxProducts;\n const tooManyProducts = !!maxProducts && selectedProductsCount > maxProducts;\n\n const saveButtonDisabled = selectedProductsCount === 0 ||\n tooManyProducts ||\n // If some selected products don't have a variant yet (= not all options have been selected)\n Object.keys(selectedProducts).some(productId => !selectedProducts[productId]);\n\n return (\n <>\n {selectedProductsCount > 0 && {selectedProductsCount}{maxProducts ? ` of ${maxProducts}` : ''} selected}\n\n \n\n Select your free products!\n Select the free products you would like to use in your post.{maxProducts ? ` You can select up to ${maxProducts} products.` : ''}\n {!!notes && (\n \n Notes:\n {notes}\n \n )}\n {isLoading ? Loading... : products?.map(p => {\n const selected = p.id in selectedProducts;\n const selectedVariantId = selectedProducts[p.id];\n return ;\n })}\n {!isLoading && (\n Confirm your products\n )}\n \n \n );\n};\n\nconst getSessionStorageKey = (campaignInfluencerId: number) => `campaign_products_${campaignInfluencerId}`;\nexport const setProductsInSessionStorage = (campaignInfluencerId: number, products: Record) => {\n sessionStorage.setItem(getSessionStorageKey(campaignInfluencerId), JSON.stringify({ selectedProducts: products }));\n};\n\nexport const getProductsFromSessionStorage = (campaignInfluencerId: number): Record => {\n const data = sessionStorage.getItem(getSessionStorageKey(campaignInfluencerId));\n try {\n const parsedData = data ? JSON.parse(data) : {};\n return parsedData.selectedProducts ?? {};\n } catch {\n return {};\n }\n};\n\nconst NotesContainer = styled.div`\n border: 1px solid var(--blox-slate1c);\n border-radius: 5px;\n padding: 20px;\n margin-top: 25px;\n white-space: break-spaces;\n overflow-wrap: break-word;\n`;\n\n\nconst TopBanner = styled(BloxText)`\n background-color: var(--blox-slate6);\n text-align: center;\n padding: 10px;\n font-size: var(--blox-font-size-md);\n color: white;\n position: absolute;\n width: 100%;\n z-index: 1;\n`;\n","import { getShippingAddress, createOrUpdateShippingAddress } from 'apis/account';\nimport type { ShippingAddress } from 'apis/account';\nimport { useQuery, useMutation } from 'react-query';\n\n\nexport const useShippingAddress = ({ enabled }: { enabled?: boolean; }) => {\n return useQuery({\n queryKey: ['shippingAddress'],\n queryFn: async () => {\n const { data } = await getShippingAddress();\n return data;\n },\n enabled\n });\n};\n\nexport const useCreateOrUpdateShippingAddress = () => {\n return useMutation(({ shippingAddress, authenticityToken }: { shippingAddress: ShippingAddress; authenticityToken: string }) => createOrUpdateShippingAddress({ shippingAddress, authenticityToken }));\n};","import { pttFetch } from '@pixleeturnto/wr4pt';\nimport { serialize as toFormData } from 'object-to-formdata';\n\nexport interface ShippingAddress {\n id: number;\n first_name: string | null;\n last_name: string;\n address_line_1: string | null;\n address_line_2: string | null;\n city: string;\n state: string | null;\n zip: string | null;\n country: string;\n phone_number: string | null;\n}\n\nexport interface CreateOrUpdateShippingAddressResult {\n shipping_address: ShippingAddress | null;\n}\n\nexport const getShippingAddress = () => pttFetch('/account/shipping_address', {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n },\n});\n\nexport const createOrUpdateShippingAddress = ({ shippingAddress, authenticityToken }: { shippingAddress: ShippingAddress, authenticityToken: string }) => pttFetch('/account/shipping_address', {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'X-CSRF-Token': authenticityToken,\n },\n // the controller method is also being used on the account settings screen, it expects form data format\n body: toFormData({ shipping_address: shippingAddress, redirect: false }),\n});\n","import React from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Box, BloxButton, BloxLabel, BloxInput, BloxText, Flex, PTTForm, PTTFormField, useStatus } from '@pixleeturnto/wr4pt';\nimport { useCreateOrUpdateShippingAddress } from 'react/apis/account';\nimport type { ShippingAddress } from 'apis/account';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\n\nexport const CampaignInfluencerShippingAddressForm = ({ campaignInfluencer, authenticityToken }: { campaignInfluencer: FetchCampaignInfluencerResult; authenticityToken: string; }) => {\n // shipping address comes from products recap, since the address was already fetched\n // or if the user does not have a default shipping address the inputs will be blank\n const { state } = useLocation();\n const { shippingAddress } = state || {};\n const navigate = useNavigate();\n\n // if the creator doesn't have a default shipping address, we create one here\n const { mutate: saveDefaultShippingAddress, isLoading } = useCreateOrUpdateShippingAddress();\n const { showError, showSuccess } = useStatus();\n\n const onSubmitAddress = ({ detail: { values } }: CustomEvent<{ values: ShippingAddress; }>) => {\n if (!shippingAddress) {\n saveDefaultShippingAddress({ shippingAddress: values, authenticityToken }, {\n onSuccess: (_result, params) => {\n setShippingAddressInSessionStorage(campaignInfluencer.id, params.shippingAddress);\n showSuccess('Default shipping address saved!');\n navigate('..');\n },\n onError: () => {\n showError('Error saving default shipping address, please try again later.');\n }\n });\n } else {\n setShippingAddressInSessionStorage(campaignInfluencer.id, values);\n navigate('..');\n }\n };\n\n return \n Edit your address\n \n \n First Name\n \n \n \n \n\n \n Last Name\n \n \n \n \n\n \n Phone number\n \n \n \n \n\n \n Address\n \n \n \n \n \n \n \n\n \n City\n \n \n \n \n\n \n \n State/Province\n \n \n \n \n \n Zip/Postal Code\n \n \n \n \n \n\n \n Country\n \n \n \n \n\n Use this address\n \n ;\n};\n\nconst getSessionStorageKey = (campaignInfluencerId: number) => `campaign_influencer_${campaignInfluencerId}_shipping_address`;\nexport const getShippingAddressFromSessionStorage = (campaignInfluencerId: number): ShippingAddress | null => {\n const data = sessionStorage.getItem(getSessionStorageKey(campaignInfluencerId));\n try {\n const parsedData = data ? JSON.parse(data) : {};\n return parsedData.shippingAddress;\n } catch {\n return null;\n }\n};\nexport const setShippingAddressInSessionStorage = (campaignInfluencerId: number, shippingAddress: ShippingAddress) => {\n sessionStorage.setItem(getSessionStorageKey(campaignInfluencerId), JSON.stringify({ shippingAddress }));\n};\n\nconst BloxInputWithNoTopBorder = styled(BloxInput)`\n border-top-width: 0 !important;\n\n ${PTTFormField}[error] + ${PTTFormField} > & {\n border-top-width: 1px !important;\n }\n`;\n","import React, { useState } from 'react';\nimport { BloxText } from '@pixleeturnto/wr4pt';\nimport { Loader } from 'react/components/Loader';\nimport { useSelectedProducts } from 'react/apis/campaign_influencer_products';\nimport { CampaignProductsStatus } from './CampaignProductsStatus';\nimport { SelectCampaignProducts, setProductsInSessionStorage } from './SelectCampaignProducts';\nimport { setShippingAddressInSessionStorage } from './CampaignInfluencerShippingAddressForm';\n\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\n\n/**\n * Campaign products base screen. Allows to select products if not already selected.\n * If products are already selected, display a recap of the selected products.\n */\nexport const CampaignProducts = ({ campaignInfluencer }: { campaignInfluencer: FetchCampaignInfluencerResult; }) => {\n const [isEditingProducts, setIsEditingProducts] = useState(false);\n // First check if products are already selected\n const {\n data,\n isLoading,\n isError\n } = useSelectedProducts({ campaignInfluencerId: campaignInfluencer.id });\n\n if (isLoading) {\n return Loading...;\n }\n\n if (isError) {\n return Something went wrong, please try again later.;\n }\n\n const onEditProducts = () => {\n if (!data?.selected_products?.length || !data?.shipping_address) {\n return;\n }\n setIsEditingProducts(true);\n\n // Write the current selected products and shipping address to session storage\n setProductsInSessionStorage(campaignInfluencer.id, data.selected_products.reduce((collection, product) => ({ ...collection, [product.product_id]: product.variant_id }), {}));\n setShippingAddressInSessionStorage(campaignInfluencer.id, data.shipping_address);\n };\n\n return Number(data?.selected_products?.length) > 0 && data?.shipping_address && !isEditingProducts ? (\n \n ) : (\n \n );\n};\n","import { Box, BloxText, BloxButton, useStatus } from '@pixleeturnto/wr4pt';\nimport React from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { useCampaignProducts } from 'react/apis/campaign_products';\nimport { Loader } from 'react/components/Loader';\nimport styled from 'styled-components';\nimport { getSelectedProductsKey, useSaveCreatorProducts } from 'react/apis/campaign_influencer_products';\nimport { useShippingAddress } from 'react/apis/account';\nimport { useQueryClient } from 'react-query';\nimport type { CampaignInfluencerProduct, FetchCampaignInfluencerProductsResult } from 'apis/campaign_influencer_products';\nimport { SelectedProductsList } from './SelectedProductsList';\nimport { getProductsFromSessionStorage, setProductsInSessionStorage } from './SelectCampaignProducts';\nimport { getCampaignInfluencersQueryKey } from 'react/apis/campaign_influencers';\nimport { CampaignInfluencerShippingAddress } from './CampaignInfluencerShippingAddress';\nimport { getShippingAddressFromSessionStorage } from './CampaignInfluencerShippingAddressForm';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\nimport { ProductMethods } from '@pixleeturnto/wr4pt/models';\n\n/**\n * Right after the creator has selected products, this screen displays a confirmation step before submitting. It shows the selected products & shipping address & a submit button.\n */\nexport const CampaignProductsRecap = ({ campaignInfluencer, railsAuthenticityToken }: { campaignInfluencer: FetchCampaignInfluencerResult; railsAuthenticityToken: string; }) => {\n // A map: selectedProductsId => selectedVariantId. This is sent to us by the previous screen (SelectCampaignProducts).\n const selectedProductsIds = getProductsFromSessionStorage(campaignInfluencer.id);\n\n const navigate = useNavigate();\n\n // Fetch the campaign products to get all the details (name, photo, variants, etc.)\n const {\n data: products,\n isLoading: isLoadingProducts,\n isError: isProductsError\n } = useCampaignProducts({ campaignId: campaignInfluencer.campaign?.id, enabled: !!selectedProductsIds });\n\n // Fetch the shipping address to display it to the creator\n const {\n data: shippingAddress,\n isError: isShippingAddressError,\n isLoading: isLoadingShippingAddress,\n } = useShippingAddress({ enabled: !!selectedProductsIds });\n const savedShippingAddress = getShippingAddressFromSessionStorage(campaignInfluencer.id) || shippingAddress;\n\n const {\n mutate: saveCreatorProducts,\n isLoading: isSaving,\n } = useSaveCreatorProducts();\n\n const { showError } = useStatus();\n const queryClient = useQueryClient();\n\n const getSelectedCampaignInfluencerProducts = (productId: string | number, variantId?: string) => {\n const product = products?.find(product => product.id === Number(productId));\n const variant = product && variantId ? ProductMethods.getVariant(product, variantId) : null;\n\n\n return {\n product_id: Number(productId),\n product_name: product ? ProductMethods.getName(product) ?? '' : '',\n product_photo: product ? ProductMethods.getPhotoUrl(product) : '',\n variant_id: variantId,\n variant_options: variant?.variant_options,\n variant_price: variant?.variant_price,\n variant_image_src: variant?.variant_image_src,\n variant_title: variant?.variant_title,\n };\n };\n\n const selectedProducts: CampaignInfluencerProduct[] = Object.entries(selectedProductsIds).map(([productId, variantId]) => getSelectedCampaignInfluencerProducts(productId, variantId));\n\n const handleSubmit = () => {\n if (!savedShippingAddress) {\n return;\n }\n\n saveCreatorProducts({\n authenticityToken: railsAuthenticityToken,\n campaignInfluencerId: campaignInfluencer.id,\n shippingAddress: savedShippingAddress,\n products: selectedProducts.map(p => ({\n product_id: Number(p.product_id),\n product_variant_id: p.variant_id\n }))\n }, {\n onSuccess: (_result, params) => {\n setProductsInSessionStorage(campaignInfluencer.id, {});\n\n // Update the selected products in cache, so that when we redirect, they are immediatelly displayed\n queryClient.setQueryData(getSelectedProductsKey(campaignInfluencer.id), () => ({\n brand_order_submitted: false,\n selected_products: params.products.map(({ product_id, product_variant_id }) => getSelectedCampaignInfluencerProducts(product_id, product_variant_id)),\n shipping_address: params.shippingAddress,\n }));\n\n // Also refetch the influencer data so that we hide the \"select products\" button on the campaign brief page\n queryClient.invalidateQueries(getCampaignInfluencersQueryKey(campaignInfluencer.id));\n\n // Redirect to the main product page. Since we have updated the cache, the selected products will be displayed immediately\n navigate('..');\n },\n onError: () => {\n showError('Error saving products, please try again later.');\n }\n });\n };\n\n if (isLoadingProducts || isLoadingShippingAddress) {\n return Loading...;\n }\n\n if (isProductsError || isShippingAddressError) {\n return Something went wrong, please try again later.;\n }\n\n return \n {savedShippingAddress ? (\n <>\n \n Edit address\n \n ) : (\n Add address\n )}\n \n {\n !!savedShippingAddress && (\n Submit\n )\n }\n ;\n};\n\nexport const CampaignProductsRecapHeader = () => (\n
    \n \n \n \n Back\n
    \n);\n\nconst Header = styled.div`\n border-bottom: 1px solid var(--blox-slate1);\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 19px 20px 19px 29px;;\n position: fixed;\n width: 100%;\n height: var(--header-offset);\n background: white;\n`;\n\n\nconst BackLink = styled(Link)`\n color: var(--blox-slate5);\n font-size: 22px;\n\n &:hover {\n color: var(--blox-slate6);\n }\n`;\n\nconst AddAddressLink = styled(Link).attrs({\n className: 'blox',\n role: 'button'\n})`\n width: 100% !important; // has width: auto that we need to override\n`;\n\nconst EditAddressLink = styled(Link).attrs({\n className: 'blox secondary grey',\n role: 'button'\n})`\n width: 100% !important; // has width: auto that we need to override\n margin-top: 20px;\n`;\n","import React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { NavBar } from 'react/components/NavBar';\nimport {\n Route,\n Navigate,\n NavLink,\n createRoutesFromElements,\n createBrowserRouter,\n RouterProvider,\n Outlet,\n useMatches,\n redirect,\n} from 'react-router-dom';\nimport { BloxText, Flex, SrOnly } from '@pixleeturnto/wr4pt';\nimport { CampaignBrief } from './CampaignBrief';\nimport { CampaignMessages } from './campaign_messages/CampaignMessages';\nimport { CampaignLinks } from './campaign_links/CampaignLinks';\nimport { RailsAuthenticityContextProvider } from 'react/contexts/authenticityToken';\nimport { useCampaignInfluencer } from 'react/apis/campaign_influencers';\nimport { CampaignProducts } from './campaign_products/CampaignProducts';\nimport { CampaignProductsRecap, CampaignProductsRecapHeader } from './campaign_products/CampaignProductsRecap';\nimport { CampaignInfluencerShippingAddressForm } from './campaign_products/CampaignInfluencerShippingAddressForm';\nimport { getProductsFromSessionStorage } from './campaign_products/SelectCampaignProducts';\nimport type { FetchCampaignInfluencerResult } from 'apis/campaign_influencers';\nimport { CampaignInfluencerMethods, CampaignMethods } from '@pixleeturnto/wr4pt/dist/models';\nimport { isObjKey } from 'react/types/utils';\n\nexport interface CampaignDetailsProps {\n campaignInfluencer: FetchCampaignInfluencerResult;\n baseUrl: string;\n backLink: string;\n railsAuthenticityToken: string;\n}\n\nexport const CampaignDetails = ({ campaignInfluencer: initialCampaignInfluencer, baseUrl, backLink, railsAuthenticityToken }: CampaignDetailsProps) => {\n const { data: campaignInfluencer } = useCampaignInfluencer({ campaignInfluencerId: initialCampaignInfluencer.id }, { initialData: initialCampaignInfluencer });\n const isLinksTabDisabled = !campaignInfluencer || !CampaignMethods.isLinkTracking(campaignInfluencer.campaign) || !CampaignInfluencerMethods.isAccepted(campaignInfluencer);\n const isProductsDisabled = !campaignInfluencer || !CampaignInfluencerMethods.isAccepted(campaignInfluencer);\n\n const routes = createRoutesFromElements(\n }\n >\n }>\n }\n />\n \n \n You are now visiting the campaign brief page\n \n {!!campaignInfluencer && }\n } />\n \n \n You are now visiting the campaign messages page\n \n {!!campaignInfluencer && }\n } />\n {!isLinksTabDisabled &&\n \n \n You are now visiting the campaign links page\n \n {!!campaignInfluencer && }\n } />\n }\n {!isProductsDisabled &&\n \n \n \n You are now visiting the campaign products page\n \n {!!campaignInfluencer && }\n }\n />\n }}\n >\n \n \n You are now visiting the campaign products recap page\n \n {!!campaignInfluencer && }\n }\n loader={() => {\n // No products to recap, go back to the product selection page\n const productsInSessionStorage = getProductsFromSessionStorage(campaignInfluencer.id);\n if (Object.keys(productsInSessionStorage).length === 0) {\n return redirect('..');\n }\n\n return null;\n }}\n />\n \n \n You are now visiting the product shipping address page\n \n {!!campaignInfluencer && }\n }\n />\n \n \n }\n \n \n );\n\n const router = createBrowserRouter(routes, { basename: baseUrl });\n\n return (\n \n );\n};\n\ninterface BaseLayoutProps {\n railsAuthenticityToken: string;\n campaignInfluencerModel?: FetchCampaignInfluencerResult;\n backLink: string;\n isLinksTabDisabled: boolean;\n isProductsDisabled: boolean;\n}\n\n/**\n * Look for a property in an unknown object (type safe)\n */\nfunction getPropFromUnknown(obj: unknown, prop: string) {\n return obj && typeof obj === 'object' && isObjKey(prop, obj) && obj[prop] ? obj[prop] : undefined;\n}\n\nconst BaseLayout = ({ railsAuthenticityToken, campaignInfluencerModel, backLink, isLinksTabDisabled, isProductsDisabled }: BaseLayoutProps) => {\n const matches = useMatches();\n\n // Check if any child defines a custom header\n const customHeader = matches.reduce((customHeader, match) => getPropFromUnknown(match.handle, 'customHeader') ?? customHeader as ReactNode | undefined, undefined);\n\n const campaignName = campaignInfluencerModel ? CampaignMethods.getName(campaignInfluencerModel.campaign) ?? '' : '';\n return (\n \n {customHeader ?? }\n\n \n \n \n \n \n \n \n Brief\n \n {campaignInfluencerModel?.campaign?.has_product_for_post && (\n \n \n Products\n \n )}\n {campaignInfluencerModel && CampaignMethods.isLinkTracking(campaignInfluencerModel.campaign) &&\n \n \n Links\n \n }\n \n \n Messages\n \n \n \n \n );\n};\n\nconst ErrorElement = () => {\n return An unexpected error occurred.;\n};\n\n\nconst Container = styled.div`\n background: var(--page-background);\n max-width: initial;\n padding: var(--header-offset) 0 var(--nav-footer-width);\n display: flex;\n flex-direction: column;\n min-height: 100%;\n`;\n\nconst NavFooter = styled(Flex).attrs({\n $justify: 'space-around',\n $align: 'center',\n $h: 90,\n $w: '100%',\n $mw: 'var(--page_max_width)',\n})`\n position: fixed;\n bottom: 0;\n background-color: white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);\n`;\n\nconst StyledNavLink = styled(NavLink)`\n color: var(--blox-slate5);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 5px;\n font-family: var(--blox-font-family);\n font-size: 12px;\n line-height: var(--blox-line-height);\n width: var(--nav-footer-width);\n height: 70px;\n\n &.active {\n color: var(--blox-purple);\n font-weight: 700;\n }\n\n &.disabled {\n pointer-events: none !important;\n color: var(--blox-slate1a);\n }\n`;\n\nconst NavIcon = styled.i`\n font-size: 26px;\n`;\n\nconst Content = styled.div`\n background: white;\n border-radius: 10px;\n flex: 1;\n max-width: var(--page_max_width);\n width: 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n`;\n","import { StatusContextProvider } from '@pixleeturnto/wr4pt';\nimport React from 'react';\nimport { QueryClient, QueryClientProvider } from 'react-query';\n\nconst queryClient = new QueryClient();\n\n/**\n * Component wrapper that adds the react-query client component + blox status. Used when mounting a react component\n * inside a rails view.\n * @param {import('react').Component} Component\n */\nexport const withWrappers = (Component) => {\n const wrapped = (props) => {\n return \n \n \n \n ;\n };\n wrapped.displayName = Component.displayName || Component.name || 'Component';\n\n return wrapped;\n};\n","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\n// require(\"@rails/ujs\").start()\n// require(\"turbolinks\").start()\n// require(\"@rails/activestorage\").start()\n// require(\"channels\")\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport '@pixleeturnto/blox';\nimport 'stylesheets/application.scss';\nimport 'stylesheets/main.scss';\nimport 'stylesheets/page.scss';\nimport 'stylesheets/register_profile.scss';\nimport 'stylesheets/register_social.scss';\nimport 'stylesheets/register_interests.scss';\nimport 'stylesheets/goal.scss';\nimport 'stylesheets/welcome.scss';\nimport 'stylesheets/settings.scss';\nimport 'stylesheets/campaign_influencers.scss';\nimport 'stylesheets/account.scss';\nimport 'stylesheets/support.scss';\nimport 'stylesheets/review.scss';\n\nimport 'toastr/build/toastr.css';\n\n// Stimulus Controllers\nimport 'controllers';\n\n// Global toastr\nimport Toastr from 'toastr';\n\n// Error Tracking\nimport * as Sentry from '@sentry/browser';\nimport { Integrations } from '@sentry/tracing';\n\n// React\nimport ReactOnRails from 'react-on-rails';\nimport { NavBar } from 'react/components/NavBar';\nimport { CampaignsList } from 'react/components/campaigns/CampaignsList';\nimport { CampaignDetails } from 'react/components/campaigns/CampaignDetails';\nimport { withWrappers } from 'react/utils/withWrappers';\n// For wr4pt/PTTForm\nimport 'informel';\n\n// Analytics\nimport { segementTrackAllPageViews } from '../analytics';\n\n// This is how react_on_rails can see the HelloWorld in the browser.\nReactOnRails.register({\n CampaignsList: withWrappers(CampaignsList),\n CampaignDetails: withWrappers(CampaignDetails),\n NavBar: withWrappers(NavBar),\n});\n\nconst setupSentry = () => {\n // Sentry JS Config\n Sentry.init({\n dsn: process.env.PIXLEE_ME_FRONTEND_SENTRY_URL,\n integrations: [new Integrations.BrowserTracing()],\n tracesSampleRate: 1.0,\n });\n window.Sentry = Sentry;\n};\n\n// Track all page views to keen\nif (process.env.NODE_ENV === 'production') {\n segementTrackAllPageViews();\n setupSentry();\n}\n\n// Allow global usage of toasters in JS\nglobal.Toastr = Toastr;\nToastr.options = {\n closeButton: true,\n debug: false,\n newestOnTop: false,\n progressBar: false,\n positionClass: 'toast-top-center',\n preventDuplicates: true,\n onclick: null,\n showDuration: '300',\n hideDuration: '1000',\n timeOut: '3000',\n extendedTimeOut: '1000',\n showEasing: 'swing',\n hideEasing: 'linear',\n showMethod: 'fadeIn',\n hideMethod: 'fadeOut',\n onShown: () => {\n const toastDiv = document.getElementById('toast-container').getElementsByTagName('div');\n toastDiv[0].style.opacity = '1';\n },\n};\n\n// Start turbo links\nconst Turbolinks = require('turbolinks');\n\nTurbolinks.start();\n\n// Import ActiveStorage\nconst ActiveStorage = require('@rails/activestorage');\n\nActiveStorage.start();\n\n// Start rails UJS\n// https://guides.rubyonrails.org/working_with_javascript_in_rails.html#rails-ujs-event-handlers\nconst RailsUjs = require('@rails/ujs');\n\nRailsUjs.start();\n","var map = {\n\t\"./af\": 2786,\n\t\"./af.js\": 2786,\n\t\"./ar\": 867,\n\t\"./ar-dz\": 4130,\n\t\"./ar-dz.js\": 4130,\n\t\"./ar-kw\": 6135,\n\t\"./ar-kw.js\": 6135,\n\t\"./ar-ly\": 6440,\n\t\"./ar-ly.js\": 6440,\n\t\"./ar-ma\": 7702,\n\t\"./ar-ma.js\": 7702,\n\t\"./ar-sa\": 6040,\n\t\"./ar-sa.js\": 6040,\n\t\"./ar-tn\": 7100,\n\t\"./ar-tn.js\": 7100,\n\t\"./ar.js\": 867,\n\t\"./az\": 1083,\n\t\"./az.js\": 1083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 8338,\n\t\"./bg.js\": 8338,\n\t\"./bm\": 7438,\n\t\"./bm.js\": 7438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 6225,\n\t\"./bn-bd.js\": 6225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 1560,\n\t\"./bo.js\": 1560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 622,\n\t\"./bs.js\": 622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 877,\n\t\"./cv.js\": 877,\n\t\"./cy\": 7373,\n\t\"./cy.js\": 7373,\n\t\"./da\": 4780,\n\t\"./da.js\": 4780,\n\t\"./de\": 9740,\n\t\"./de-at\": 217,\n\t\"./de-at.js\": 217,\n\t\"./de-ch\": 894,\n\t\"./de-ch.js\": 894,\n\t\"./de.js\": 9740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 837,\n\t\"./el.js\": 837,\n\t\"./en-au\": 8348,\n\t\"./en-au.js\": 8348,\n\t\"./en-ca\": 7925,\n\t\"./en-ca.js\": 7925,\n\t\"./en-gb\": 2243,\n\t\"./en-gb.js\": 2243,\n\t\"./en-ie\": 6436,\n\t\"./en-ie.js\": 6436,\n\t\"./en-il\": 7207,\n\t\"./en-il.js\": 7207,\n\t\"./en-in\": 4175,\n\t\"./en-in.js\": 4175,\n\t\"./en-nz\": 6319,\n\t\"./en-nz.js\": 6319,\n\t\"./en-sg\": 1662,\n\t\"./en-sg.js\": 1662,\n\t\"./eo\": 2915,\n\t\"./eo.js\": 2915,\n\t\"./es\": 5655,\n\t\"./es-do\": 5251,\n\t\"./es-do.js\": 5251,\n\t\"./es-mx\": 6112,\n\t\"./es-mx.js\": 6112,\n\t\"./es-us\": 1146,\n\t\"./es-us.js\": 1146,\n\t\"./es.js\": 5655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 7763,\n\t\"./eu.js\": 7763,\n\t\"./fa\": 6959,\n\t\"./fa.js\": 6959,\n\t\"./fi\": 1897,\n\t\"./fi.js\": 1897,\n\t\"./fil\": 2549,\n\t\"./fil.js\": 2549,\n\t\"./fo\": 4694,\n\t\"./fo.js\": 4694,\n\t\"./fr\": 4470,\n\t\"./fr-ca\": 3049,\n\t\"./fr-ca.js\": 3049,\n\t\"./fr-ch\": 2330,\n\t\"./fr-ch.js\": 2330,\n\t\"./fr.js\": 4470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 9295,\n\t\"./ga.js\": 9295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 8794,\n\t\"./gl.js\": 8794,\n\t\"./gom-deva\": 7884,\n\t\"./gom-deva.js\": 7884,\n\t\"./gom-latn\": 3168,\n\t\"./gom-latn.js\": 3168,\n\t\"./gu\": 5349,\n\t\"./gu.js\": 5349,\n\t\"./he\": 4206,\n\t\"./he.js\": 4206,\n\t\"./hi\": 94,\n\t\"./hi.js\": 94,\n\t\"./hr\": 316,\n\t\"./hr.js\": 316,\n\t\"./hu\": 2138,\n\t\"./hu.js\": 2138,\n\t\"./hy-am\": 1423,\n\t\"./hy-am.js\": 1423,\n\t\"./id\": 9218,\n\t\"./id.js\": 9218,\n\t\"./is\": 135,\n\t\"./is.js\": 135,\n\t\"./it\": 626,\n\t\"./it-ch\": 150,\n\t\"./it-ch.js\": 150,\n\t\"./it.js\": 626,\n\t\"./ja\": 9183,\n\t\"./ja.js\": 9183,\n\t\"./jv\": 4286,\n\t\"./jv.js\": 4286,\n\t\"./ka\": 2105,\n\t\"./ka.js\": 2105,\n\t\"./kk\": 7772,\n\t\"./kk.js\": 7772,\n\t\"./km\": 8758,\n\t\"./km.js\": 8758,\n\t\"./kn\": 9282,\n\t\"./kn.js\": 9282,\n\t\"./ko\": 3730,\n\t\"./ko.js\": 3730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 3291,\n\t\"./ky.js\": 3291,\n\t\"./lb\": 6841,\n\t\"./lb.js\": 6841,\n\t\"./lo\": 5466,\n\t\"./lo.js\": 5466,\n\t\"./lt\": 7010,\n\t\"./lt.js\": 7010,\n\t\"./lv\": 7595,\n\t\"./lv.js\": 7595,\n\t\"./me\": 9861,\n\t\"./me.js\": 9861,\n\t\"./mi\": 5493,\n\t\"./mi.js\": 5493,\n\t\"./mk\": 5966,\n\t\"./mk.js\": 5966,\n\t\"./ml\": 7341,\n\t\"./ml.js\": 7341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 370,\n\t\"./mr.js\": 370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 1237,\n\t\"./ms-my.js\": 1237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 2126,\n\t\"./mt.js\": 2126,\n\t\"./my\": 6165,\n\t\"./my.js\": 6165,\n\t\"./nb\": 4924,\n\t\"./nb.js\": 4924,\n\t\"./ne\": 6744,\n\t\"./ne.js\": 6744,\n\t\"./nl\": 3901,\n\t\"./nl-be\": 9814,\n\t\"./nl-be.js\": 9814,\n\t\"./nl.js\": 3901,\n\t\"./nn\": 3877,\n\t\"./nn.js\": 3877,\n\t\"./oc-lnc\": 2135,\n\t\"./oc-lnc.js\": 2135,\n\t\"./pa-in\": 5858,\n\t\"./pa-in.js\": 5858,\n\t\"./pl\": 4495,\n\t\"./pl.js\": 4495,\n\t\"./pt\": 9520,\n\t\"./pt-br\": 7971,\n\t\"./pt-br.js\": 7971,\n\t\"./pt.js\": 9520,\n\t\"./ro\": 6459,\n\t\"./ro.js\": 6459,\n\t\"./ru\": 1793,\n\t\"./ru.js\": 1793,\n\t\"./sd\": 950,\n\t\"./sd.js\": 950,\n\t\"./se\": 490,\n\t\"./se.js\": 490,\n\t\"./si\": 124,\n\t\"./si.js\": 124,\n\t\"./sk\": 4249,\n\t\"./sk.js\": 4249,\n\t\"./sl\": 4985,\n\t\"./sl.js\": 4985,\n\t\"./sq\": 1104,\n\t\"./sq.js\": 1104,\n\t\"./sr\": 9131,\n\t\"./sr-cyrl\": 9915,\n\t\"./sr-cyrl.js\": 9915,\n\t\"./sr.js\": 9131,\n\t\"./ss\": 5893,\n\t\"./ss.js\": 5893,\n\t\"./sv\": 8760,\n\t\"./sv.js\": 8760,\n\t\"./sw\": 1172,\n\t\"./sw.js\": 1172,\n\t\"./ta\": 7333,\n\t\"./ta.js\": 7333,\n\t\"./te\": 3110,\n\t\"./te.js\": 3110,\n\t\"./tet\": 2095,\n\t\"./tet.js\": 2095,\n\t\"./tg\": 7321,\n\t\"./tg.js\": 7321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 9005,\n\t\"./tk.js\": 9005,\n\t\"./tl-ph\": 5768,\n\t\"./tl-ph.js\": 5768,\n\t\"./tlh\": 9444,\n\t\"./tlh.js\": 9444,\n\t\"./tr\": 2397,\n\t\"./tr.js\": 2397,\n\t\"./tzl\": 8254,\n\t\"./tzl.js\": 8254,\n\t\"./tzm\": 1106,\n\t\"./tzm-latn\": 699,\n\t\"./tzm-latn.js\": 699,\n\t\"./tzm.js\": 1106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 7691,\n\t\"./uk.js\": 7691,\n\t\"./ur\": 3795,\n\t\"./ur.js\": 3795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 588,\n\t\"./uz-latn.js\": 588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 5666,\n\t\"./vi.js\": 5666,\n\t\"./x-pseudo\": 4378,\n\t\"./x-pseudo.js\": 4378,\n\t\"./yo\": 5805,\n\t\"./yo.js\": 5805,\n\t\"./zh-cn\": 3839,\n\t\"./zh-cn.js\": 3839,\n\t\"./zh-hk\": 5726,\n\t\"./zh-hk.js\": 5726,\n\t\"./zh-mo\": 9807,\n\t\"./zh-mo.js\": 9807,\n\t\"./zh-tw\": 4152,\n\t\"./zh-tw.js\": 4152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 6700;"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","buildProperties","additionalProperties","window","gon","creator_profile","segmentTrack","eventName","properties","analytics","props","track","segementTrackAllPageViews","document","addEventListener","pageCategory","pageName","page","segmentPage","deactivateDialogContents","title","content","confirmButton","cancelButton","deleteAccountDialogContents","deleteAvatarDialogContents","AccountController","contents","entries","forEach","key","value","keyWithUppercaseFirstLetter","charAt","toUpperCase","slice","innerText","dialogTitleTarget","setTimeout","dialogWrapperTarget","classList","add","remove","avatarTarget","onAvatarChange","removeEventListener","preventDefault","click","photoFormTarget","submit","deactivationLinkTarget","deletionLinkTarget","deactivatedDialogTarget","Toastr","warning","Controller","event","menu_item","name","currentTarget","text","option","dataset","category","analyticsCategory","social_account","source","toggle","checked","analyticsName","dialog","analyticsPage","current_path","location","pathname","back_path","analyticsCategoriesError","CampaignChatMessageController","linkifyChatBody","hasBodyTarget","bodyTarget","innerHTML","linkifyStr","className","target","href","type","CampaignLinkController","linkInputTarget","success","navigator","clipboard","writeText","acceptTarget","disabled","GoalController","Array","from","goalTargets","some","goalRadioBtn","submitButtonTarget","data","get","formatUtcCampaign","formatUtcMessage","timeStamp","localTimeStamp","moment","Date","replace","local","calendar","element","textContent","today","endOf","yesterday","subtract","twoDaysAgo","format","ProfileController","validateInputs","invalid","requiredFieldTargets","requiredField","submitTarget","emailTarget","validity","valid","ReactivationController","deletedDialogTarget","AdditionalInformationController","selectedCountry","countryTarget","options","selectedIndex","selectedCountryObj","find","getCountries","selectedState","stateTarget","selectedStateObj","getStates","selectedCity","cityTarget","selectedCityObj","getCities","initCountryDropdown","csc","countryId","stateId","selector","length","removeOptions","country","Option","placeHolderPhone","getExampleNumber","sortname","examples","telephoneTarget","placeholder","formatInternational","onTelephoneInput","initStateDropdown","state","initCityDropdown","cities","noCitiesFound","city","telephoneValue","countryCode","phoneNumber","parsePhoneNumber","isValid","phoneErrorMessageTarget","placeHolderExample","Dropzone","createDropZone","redirectUrlTarget","picBoxTarget","imagePreviewTarget","currentAvatar","currentAvatarTarget","deleteAvatarTarget","dropzoneOptions","autoProcessQueue","uploadMultiple","parallelUploads","maxFiles","previewsContainer","paramName","addRemoveLinks","acceptedFiles","resizeHeight","resizeWidth","dictRemoveFile","dictCancelUpload","init","avatarFile","avatarUrl","size","this","displayExistingFile","style","display","on","file","removeFile","querySelector","ev","files","stopPropagation","processQueue","error","dropzoneForm","Boolean","InterestsController","INTEREST_LIMIT","checkboxTargets","reduce","count","el","RegisterController","tosCheckboxTarget","receivesNotificationsCheckboxTarget","getMetaValue","head","getAttribute","SettingsController","formData","FormData","append","pixleeMeNotificationsTarget","csrfToken","url","fetch","body","method","dataType","credentials","headers","response","ok","optionTarget","ShippingAddressController","closest","attr","validateForm","nextElementSibling","visibility","errors","emailCheckboxTarget","hasAny","ValidationController","boxChecked","attributes","email","presence","allowEmpty","SocialInstagramController","accountCheckboxTargets","checkboxTarget","is","dropdownCheckboxTarget","clickable","myDropzone","Turbolinks","visit","action","application","Application","context","require","load","definitionsFromContext","defaultErrorHandler","handleError","bind","message","detail","Sentry","captureException","NavBar","backLink","React","isMenuOpen","setIsMenuOpen","firstLinkRef","lastLinkRef","buttonRef","$fs_lg","$bold","ref","onClick","val","role","onKeyDown","menuItemName","trackMenuNavigate","rel","Container","styled","TitleText","YourCampaignsText","CogIcon","BackArrowIcon","BackLink","Button","DropDown","AccountAvatar","logo","unread_messages_count","useState","showAvatar","setShowAvatar","src","alt","onError","number","Intl","NumberFormat","language","notation","toString","formatCompact","UserIcon","AvatarContainer","AvatarImg","CampaignBadge","CampaignInfluencerItem","CampaignBrand","CampaignContainer","MiddlePart","DateContainer","CampaignName","fetchCampaignMessages","campaignInfluencerId","pageParam","pttFetch","sendCampaignMessages","authenticityToken","respondToCampaign","accept","JSON","status","authenticity_token","fetchCampaignInfluencer","Accept","getCampaignInfluencersQueryKey","useRespondToCampaign","campaignId","queryClient","useQueryClient","useMutation","onMutate","campaign_influencer","campaign","trackCampaignAccept","trackCampaignDecline","onSuccess","currentData","isObjKey","INCENTIVE_METHODS","product","payment","product_and_payment","no_incentive","CampaignBrief","campaignInfluencer","railsAuthenticityToken","hashtags","reward_type","reward_notes","review_email_interval_days","description","campaign_goals","campaign_attachments","handles","phrases","and_hashtags","visible_campaign_attachments","attachment","campaignName","CampaignMethods","starts_at","ends_at","useStatus","showSuccess","showError","showMessage","setShowMessage","sendResponseToCampaign","isLoading","$f","$w","$h","$mr","$align","AccountMethods","CampaignInfluencerMethods","$cname","$fs_sm","$my","as","$ml","$m","header","show","actionPrimary","actionSecondary","onActionPrimary","onActionSecondary","$mt","$lmb","label","$mb","to","p","$italic","goal","index","parameters","$fs_md","file_url","CampaignParameters","$gap","$fw","i","Wrapper","children","undefined","rest","$p","GoalWrapper","goals","notes","getSourceDisplayName","goalName","goalValue","GoalList","goalDisplayName","getGoalDisplayName","lookup","makeSingular","str","Number","parsedGoalValue","CampaignGoalMethods","isCarousel","ProductItem","isCopied","setIsCopied","onCopyClick","ProductMethods","$columns","photoUrl","productName","$alignItems","$pl","StyledBox","WhiteWrapper","CampaignHeader","$fd","GoalsList","GoalListItem","CampaignNameContainer","WrappedText","BloxDeclinedText","BloxGoalContainer","CampaignButtonGroup","$justify","$pt","Parameter","EllipseText","ProductUrl","LinkIcon","ProductContainer","ProductInfo","SelectProductLink","$disabled","getCampaignMessagesQueryKey","getSendMutationKey","RailsAuthenticityTokenContext","RailsAuthenticityContextProvider","token","Provider","Loader","MessagesList","allData","pagesCount","hasNextPage","isFetchingNextPage","fetchNextPage","onFileClick","scrollRef","scrollData","firstMessageId","lastMessageId","top","height","scrollHeight","handleIntersection","useEvent","firstMessageContainer","observer","IntersectionObserver","root","current","m","CampaignMessageMethods","$c","a","Message","MessageContent","Attachment","FileLink","InfiniteScrollContainer","SendActionBar","onSend","fileInputRef","textareaRef","formRef","textAreaRowsCount","setTextAreaRowsCount","setFiles","onInformInput","values","getMessageTextAreaRowCount","onInformSubmit","validationHandler","resetOnSubmit","fileIndex","rows","userAgent","match","multiple","hidden","onChange","currentFiles","linesWithAutoWrap","lineLength","line","Math","ActionBar","ActionButton","SubmitButton","FileButton","FileContainer","Attachments","CampaignMessages","queryKey","query","useInfiniteQuery","messages","$$uiPending","getNextPageParam","newOffset","lastPage","refetch","isError","isSending","useIsMutating","handleRefetch","refetchPage","interval","setInterval","REFETCH_INTERVAL_SEC","clearInterval","useCampaignMessages","mutationKey","mockMessageId","firstPage","allPagesButFirst","pageParams","pages","created_at","created_by_user_id","read","subject","attachments","filename","byte_size","human_size","total_count","offset","newMessage","useSendCampaignMessages","showStatus","variant","displayTime","send","isResponding","trackCampaignMessageFileClick","trackCampaignMessageSent","AcceptPrompt","CampaignLinkItem","campaignLink","CampaignInfluencerLinkMethods","$pr","ProductTitle","ProductSkuAndPricing","CampaignLinkDivider","CampaignLinkContainer","CopyLinkButton","CampaignLinks","campaignLinks","link","NoLinksText","saveCreatorProducts","products","shippingAddress","shipping_address","fetchCampaignInfluencerProducts","getSelectedProductsKey","useSaveCreatorProducts","SelectedProductsList","selectedProducts","showEdit","onEdit","product_id","fallbackPhotoUrl","ProductImageStyled","ProductName","ProductVariants","CampaignInfluencerShippingAddress","AddressContainer","AddressLine","CampaignProductsStatus","orderSubmitted","onEditProducts","brandName","shop","$active","StepsGrid","StepInfoText","StepIcon","fetchCampaignProducts","useCampaignProducts","enabled","useQuery","queryFn","ProductDetails","selected","selectedVariantId","onSelectedToggle","allAvailableOptions","preSelectedOptions","selectedOptions","setSelectedOptions","optionName","optionValue","productOptions","setProductOptions","previousSelected","setPreviousSelected","fixSelection","result","handleSelectedChange","currentPhotoUrl","$d","htmlFor","selectOptions","selectedValue","onSelection","selectedOptionValue","optionToSelect","newOptions","allOptionsAreSelected","optionDisabled","handleSelection","SelectionCheckbox","SelectCampaignProducts","getProductsFromSessionStorage","setSelectedProducts","navigate","useNavigate","$textAlign","productId","newSelectedProducts","maxProducts","selectedProductsCount","capacityReached","saveButtonDisabled","setProductsInSessionStorage","getSessionStorageKey","sessionStorage","NotesContainer","TopBanner","useShippingAddress","useCreateOrUpdateShippingAddress","toFormData","redirect","createOrUpdateShippingAddress","CampaignInfluencerShippingAddressForm","useLocation","saveDefaultShippingAddress","initialValues","setShippingAddressInSessionStorage","params","autoFocus","required","BloxInputWithNoTopBorder","CampaignProducts","isEditingProducts","setIsEditingProducts","CampaignProductsRecap","selectedProductsIds","isLoadingProducts","isProductsError","isShippingAddressError","isLoadingShippingAddress","savedShippingAddress","getShippingAddressFromSessionStorage","isSaving","getSelectedCampaignInfluencerProducts","product_name","product_photo","variant_id","variant_options","variant_price","variant_image_src","variant_title","variantId","product_variant_id","brand_order_submitted","selected_products","CampaignProductsRecapHeader","relative","Header","AddAddressLink","EditAddressLink","BaseLayout","campaignInfluencerModel","isLinksTabDisabled","isProductsDisabled","customHeader","useMatches","obj","prop","ErrorElement","$alignSelf","NavFooter","$mw","StyledNavLink","NavIcon","Content","QueryClient","withWrappers","Component","wrapped","QueryClientProvider","client","StatusContextProvider","displayName","ReactOnRails","CampaignsList","campaignInfluencers","handleCampaignClick","trackCampaignClick","$py","dateMoment","sinceNow","c","$ws","$px","CampaignDetails","initialCampaignInfluencer","baseUrl","initialData","routes","createRoutesFromElements","errorElement","path","campaign_influencer_links","handle","loader","productsInSessionStorage","router","createBrowserRouter","basename","dsn","process","integrations","Integrations","tracesSampleRate","global","closeButton","debug","newestOnTop","progressBar","positionClass","preventDuplicates","onclick","showDuration","hideDuration","timeOut","extendedTimeOut","showEasing","hideEasing","showMethod","hideMethod","onShown","getElementById","getElementsByTagName","opacity","start"],"sourceRoot":""}