@wral/report-it 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,66 +1,66 @@
1
- import { W as Fe, b as Be, a as Ce, c as Oe, d as De, e as Me } from "./wral-code-input-BZTBgLk3.js";
2
- const x = "news", v = "News tip or story idea", _ = "News tips and story ideas routed to the news desk queue; assignment editors are emailed. Breaking reports flag urgent. The 5 On Your Side and Investigates options hand off to those forms.", I = "2026-09-25.1", L = 0, $ = !0, W = "news_type", A = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, S = [{ id: "news_type", type: "choice", prompt: "What kind of news?", options: [{ id: "breaking", label: "Breaking or happening now", flags: ["urgent"], next: "news_detail" }, { id: "idea", label: "Story idea", next: "news_detail" }, { id: "fiveoys", label: "5 On Your Side or consumer complaint", form: "consumer", path: ["consumer_kind:fiveoys"] }, { id: "investigates", label: "Something for WRAL Investigates", form: "investigates" }] }, { id: "news_detail", type: "collect", prompt: "Tell us what happened.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "What happened? Include when and where.", required: !0, maxLength: 5e3 }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "media", kind: "media", label: "Do you have video, photos or files to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:news", confirmation: { title: "Your tip is on its way to the newsroom.", body: "It goes to the news desk queue and the assignment editors are emailed.", urgentNote: "Breaking reports are pinned to the top of the queue." } }], R = {
3
- formId: x,
4
- title: v,
5
- description: _,
6
- flowVersion: I,
7
- order: L,
8
- enabled: $,
9
- start: W,
10
- budget: A,
11
- nodes: S
12
- }, T = "weather", q = "Weather photo or report", Y = "Weather reports routed to the weather desk queue; meteorologists are emailed.", F = "2026-09-25.1", B = 1, C = !0, O = "weather_detail", D = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime"] }, M = [{ id: "weather_detail", type: "collect", prompt: "Tell us about the weather.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "What did you see?", required: !0, maxLength: 1e3 }, { key: "location", kind: "location", label: "Location of your weather report", required: !0 }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "media", kind: "media", label: "Do you have video or photos to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:weather", confirmation: { title: "Sent to the WRAL weather team.", body: "Your report goes to the weather desk queue and the meteorologists are emailed." } }], N = {
13
- formId: T,
14
- title: q,
15
- description: Y,
16
- flowVersion: F,
1
+ import { W as Oe, b as Be, a as Ce, c as De, d as je, e as Me } from "./wral-code-input-BH_1EP8b.js";
2
+ const v = "news", _ = "News tip or story idea", I = "News tips and story ideas routed to the news desk queue; assignment editors are emailed. Breaking reports flag urgent. The 5 On Your Side and Investigates options hand off to those forms.", L = "2026-09-25.1", $ = 0, W = !0, A = "news_type", S = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, R = [{ id: "news_type", type: "choice", prompt: "What kind of news?", options: [{ id: "breaking", label: "Breaking or happening now", flags: ["urgent"], next: "news_detail" }, { id: "idea", label: "Story idea", next: "news_detail" }, { id: "fiveoys", label: "5 On Your Side or consumer complaint", form: "consumer", path: ["consumer_kind:fiveoys"] }, { id: "investigates", label: "Something for WRAL Investigates", form: "investigates" }] }, { id: "news_detail", type: "collect", prompt: "Tell us what happened.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "What happened? Include when and where.", required: !0, maxLength: 5e3 }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "media", kind: "media", label: "Do you have video, photos or files to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:news", confirmation: { title: "Your tip is on its way to the newsroom.", body: "It goes to the news desk queue and the assignment editors are emailed.", urgentNote: "Breaking reports are pinned to the top of the queue." } }], T = {
3
+ formId: v,
4
+ title: _,
5
+ description: I,
6
+ flowVersion: L,
7
+ order: $,
8
+ enabled: W,
9
+ start: A,
10
+ budget: S,
11
+ nodes: R
12
+ }, q = "weather", Y = "Weather photo or report", F = "Weather reports routed to the weather desk queue; meteorologists are emailed.", O = "2026-09-25.1", B = 1, C = !0, D = "weather_detail", j = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime"] }, M = [{ id: "weather_detail", type: "collect", prompt: "Tell us about the weather.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "What did you see?", required: !0, maxLength: 1e3 }, { key: "location", kind: "location", label: "Location of your weather report", required: !0 }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "media", kind: "media", label: "Do you have video or photos to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:weather", confirmation: { title: "Sent to the WRAL weather team.", body: "Your report goes to the weather desk queue and the meteorologists are emailed." } }], N = {
13
+ formId: q,
14
+ title: Y,
15
+ description: F,
16
+ flowVersion: O,
17
17
  order: B,
18
18
  enabled: C,
19
- start: O,
20
- budget: D,
19
+ start: D,
20
+ budget: j,
21
21
  nodes: M
22
- }, V = "tech", j = "Technical issue", P = "Technical issues with structured platform, symptom and time fields. On-air problems go to broadcast engineering; digital problems go to tech support by email until Jira Service Management exists.", E = "2026-09-25.1", U = 2, H = !0, z = "tech_platform", Z = { maxFiles: 3, maxFileBytes: 26214400, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp"] }, J = [{ id: "tech_platform", type: "choice", prompt: "Where are you seeing the problem?", options: [{ id: "web", label: "wral.com", next: "tech_symptom" }, { id: "app", label: "iOS or Android app", next: "tech_symptom" }, { id: "ott", label: "Roku, Apple TV, Fire TV or Samsung TV Plus", next: "tech_symptom" }, { id: "onair", label: "On-air broadcast", next: "tech_symptom_onair" }] }, { id: "tech_symptom", type: "choice", prompt: "What is happening?", options: [{ id: "noaudio", label: "No audio", next: "tech_detail" }, { id: "blackscreen", label: "Black screen", next: "tech_detail" }, { id: "crash", label: "Crash or will not open", next: "tech_detail" }, { id: "buffering", label: "Buffering or freezing", next: "tech_detail" }, { id: "wrongcontent", label: "Wrong content playing", next: "tech_detail" }, { id: "other", label: "Something else", next: "tech_detail" }] }, { id: "tech_detail", type: "collect", prompt: "A few details help us reproduce it.", next: "verify", fields: [{ key: "observedAt", kind: "datetime", label: "When did you notice it?" }, { key: "description", kind: "textarea", label: "Describe the problem", placeholder: "What were you watching or doing when it happened?", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Screenshot" }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "jsm:tech-support", confirmation: { title: "Sent to tech support.", body: "Tech support is emailed your platform, symptom and details." } }, { id: "tech_symptom_onair", type: "choice", prompt: "What is happening?", options: [{ id: "noaudio", label: "No audio", next: "tech_detail_onair" }, { id: "blackscreen", label: "Black screen", next: "tech_detail_onair" }, { id: "wrongcontent", label: "Wrong content playing", next: "tech_detail_onair" }, { id: "other", label: "Something else", next: "tech_detail_onair" }] }, { id: "tech_detail_onair", type: "collect", prompt: "A few details help us reproduce it.", next: "verify_onair", fields: [{ key: "observedAt", kind: "datetime", label: "When did you notice it?" }, { key: "description", kind: "textarea", label: "Describe the problem", placeholder: "What were you watching or doing when it happened?", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Screenshot" }] }, { id: "verify_onair", type: "gate", next: "submit_onair" }, { id: "submit_onair", type: "terminal", route: "studio+email:tech-onair", confirmation: { title: "Sent to WRAL broadcast engineering.", body: "Broadcast engineering is emailed your symptom and details." } }], K = {
22
+ }, V = "tech", E = "Technical issue", P = "Technical issues with structured platform, symptom and time fields. On-air problems go to broadcast engineering; digital problems go to tech support by email until Jira Service Management exists.", U = "2026-09-25.1", H = 2, z = !0, Z = "tech_platform", J = { maxFiles: 3, maxFileBytes: 26214400, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp"] }, K = [{ id: "tech_platform", type: "choice", prompt: "Where are you seeing the problem?", options: [{ id: "web", label: "wral.com", next: "tech_symptom" }, { id: "app", label: "iOS or Android app", next: "tech_symptom" }, { id: "ott", label: "Roku, Apple TV, Fire TV or Samsung TV Plus", next: "tech_symptom" }, { id: "onair", label: "On-air broadcast", next: "tech_symptom_onair" }] }, { id: "tech_symptom", type: "choice", prompt: "What is happening?", options: [{ id: "noaudio", label: "No audio", next: "tech_detail" }, { id: "blackscreen", label: "Black screen", next: "tech_detail" }, { id: "crash", label: "Crash or will not open", next: "tech_detail" }, { id: "buffering", label: "Buffering or freezing", next: "tech_detail" }, { id: "wrongcontent", label: "Wrong content playing", next: "tech_detail" }, { id: "other", label: "Something else", next: "tech_detail" }] }, { id: "tech_detail", type: "collect", prompt: "A few details help us reproduce it.", next: "verify", fields: [{ key: "observedAt", kind: "datetime", label: "When did you notice it?" }, { key: "description", kind: "textarea", label: "Describe the problem", placeholder: "What were you watching or doing when it happened?", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Screenshot" }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "jsm:tech-support", confirmation: { title: "Sent to tech support.", body: "Tech support is emailed your platform, symptom and details." } }, { id: "tech_symptom_onair", type: "choice", prompt: "What is happening?", options: [{ id: "noaudio", label: "No audio", next: "tech_detail_onair" }, { id: "blackscreen", label: "Black screen", next: "tech_detail_onair" }, { id: "wrongcontent", label: "Wrong content playing", next: "tech_detail_onair" }, { id: "other", label: "Something else", next: "tech_detail_onair" }] }, { id: "tech_detail_onair", type: "collect", prompt: "A few details help us reproduce it.", next: "verify_onair", fields: [{ key: "observedAt", kind: "datetime", label: "When did you notice it?" }, { key: "description", kind: "textarea", label: "Describe the problem", placeholder: "What were you watching or doing when it happened?", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Screenshot" }] }, { id: "verify_onair", type: "gate", next: "submit_onair" }, { id: "submit_onair", type: "terminal", route: "studio+email:tech-onair", confirmation: { title: "Sent to WRAL broadcast engineering.", body: "Broadcast engineering is emailed your symptom and details." } }], G = {
23
23
  formId: V,
24
- title: j,
24
+ title: E,
25
25
  description: P,
26
- flowVersion: E,
27
- order: U,
28
- enabled: H,
29
- start: z,
30
- budget: Z,
31
- nodes: J
32
- }, G = "consumer", Q = "5 On Your Side or WRAL Investigates", X = "The 5 On Your Side hub. Consumer complaints go to the 5 On Your Side queue and the consumer team is emailed; the Investigates option hands off to the investigates form.", ee = "2026-09-25.1", te = 3, ie = !0, oe = "consumer_kind", ne = { maxFiles: 5, maxFileBytes: 26214400, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, ae = [{ id: "consumer_kind", type: "choice", prompt: "What would you like to send?", options: [{ id: "fiveoys", label: "5 On Your Side or consumer complaint", next: "consumer_detail" }, { id: "investigates", label: "Something for WRAL Investigates", form: "investigates" }] }, { id: "consumer_detail", type: "collect", prompt: "Tell us about your complaint.", help: "This goes to the 5 On Your Side consumer team.", next: "consumer_company_q", fields: [{ key: "subject", kind: "text", label: "Subject of your complaint", role: "subject", required: !0, maxLength: 200 }, { key: "description", kind: "textarea", label: "Describe your complaint. Be specific and include when this happened.", required: !0, maxLength: 5e3 }] }, { id: "consumer_company_q", type: "choice", prompt: "Is your complaint about a company?", options: [{ id: "companyyes", label: "Yes", next: "consumer_company" }, { id: "companyno", label: "No", next: "consumer_resolution" }] }, { id: "consumer_company", type: "collect", prompt: "Tell us about the company.", next: "consumer_resolution", fields: [{ key: "company", kind: "text", label: "What is the company name?", required: !0 }, { key: "inbusiness", kind: "select", label: "Is the company still in business?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }, { id: "notsure", label: "Not sure" }] }, { key: "companysite", kind: "url", label: "Link to the company's website or social media pages" }] }, { id: "consumer_resolution", type: "collect", prompt: "What has happened since?", next: "consumer_contact", fields: [{ key: "tried", kind: "textarea", label: "What have you done to try to resolve the issue?", maxLength: 5e3 }, { key: "legal", kind: "select", label: "Have you pursued legal action, retained or consulted with an attorney?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "agency", kind: "select", label: "Have you filed a complaint with another agency or with the Better Business Bureau?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "fair", kind: "textarea", label: "What result do you think is fair?", maxLength: 5e3 }, { key: "media", kind: "media", label: "Do you have video, photos or files to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "consumer_contact", type: "collect", prompt: "How can the team reach you?", next: "verify", fields: [{ key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:consumer", confirmation: { title: "Sent to 5 On Your Side.", body: "Your complaint goes to the 5 On Your Side consumer team. They read every complaint and follow up on the ones they pursue." } }], se = {
33
- formId: G,
34
- title: Q,
35
- description: X,
36
- flowVersion: ee,
37
- order: te,
38
- enabled: ie,
39
- start: oe,
40
- budget: ne,
41
- nodes: ae
42
- }, re = "investigates", le = "Something for WRAL Investigates", de = "Tips for WRAL Investigates, routed to the Investigates queue and emailed to the team. Unlisted: reached from the news and 5 On Your Side forms, or ?flow=investigates.", me = "2026-09-25.1", ce = 4, ue = !0, pe = !1, he = "investigates_detail", ye = { maxFiles: 10, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"] }, ge = [{ id: "investigates_detail", type: "collect", prompt: "What should we look into?", help: "This goes to the WRAL Investigates team.", next: "investigates_material", fields: [{ key: "subject", kind: "text", label: "Subject of your investigation", role: "subject", required: !0, maxLength: 200 }, { key: "description", kind: "textarea", label: "Describe what we should look into. Be specific and include when this happened.", required: !0, maxLength: 5e3 }, { key: "legal", kind: "select", label: "Have you pursued legal action, retained or consulted with an attorney?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "fair", kind: "textarea", label: "What result do you think is fair?", maxLength: 5e3 }] }, { id: "investigates_material", type: "collect", prompt: "Anything to share with us?", next: "investigates_contact", fields: [{ key: "media", kind: "media", label: "Documents, video or photos to upload, such as incident reports or legal paperwork" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "investigates_contact", type: "collect", prompt: "How can the team reach you?", next: "verify", fields: [{ key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:investigates", confirmation: { title: "Sent to WRAL Investigates.", body: "Your tip goes to the WRAL Investigates team. They read every submission and follow up on the ones they pursue." } }], be = {
43
- formId: re,
44
- title: le,
45
- description: de,
46
- flowVersion: me,
47
- order: ce,
48
- enabled: ue,
49
- listed: pe,
50
- start: he,
51
- budget: ye,
52
- nodes: ge
53
- }, fe = "community", we = "Community event, photo or video", ke = "Community events, photos and video for the Studio community review queue (no email). Whether the event is upcoming or past is recorded in the path. Featured media is credited by name.", xe = "2026-09-25.1", ve = 5, _e = !0, Ie = "community_type", Le = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, $e = [{ id: "community_type", type: "choice", prompt: "What would you like to share?", options: [{ id: "upcoming", label: "Something that's coming up", next: "community_upcoming" }, { id: "past", label: "Something that already happened", next: "community_past" }] }, { id: "community_upcoming", type: "collect", prompt: "Tell us about it.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "Tell us about it. Please include a description, day, time and location.", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Choose files: upload any photos, video or a press release to preview your event" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }] }, { id: "community_past", type: "collect", prompt: "Tell us about it.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "Tell us about it. Please include a description, day, time and location.", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Choose files: upload any photos, video or a press release from your event" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio:community", confirmation: { title: "Shared with our editors.", body: "Community submissions go to the review queue. If we feature yours, we credit you by name." } }], We = {
54
- formId: fe,
55
- title: we,
56
- description: ke,
57
- flowVersion: xe,
58
- order: ve,
59
- enabled: _e,
60
- start: Ie,
61
- budget: Le,
62
- nodes: $e
63
- }, Ae = {
26
+ flowVersion: U,
27
+ order: H,
28
+ enabled: z,
29
+ start: Z,
30
+ budget: J,
31
+ nodes: K
32
+ }, Q = "consumer", X = "5 On Your Side or WRAL Investigates", ee = "The 5 On Your Side hub. Consumer complaints go to the 5 On Your Side queue and the consumer team is emailed; the Investigates option hands off to the investigates form.", te = "2026-09-25.1", ie = 3, oe = !0, ne = "consumer_kind", ae = { maxFiles: 5, maxFileBytes: 26214400, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, se = [{ id: "consumer_kind", type: "choice", prompt: "What would you like to send?", options: [{ id: "fiveoys", label: "5 On Your Side or consumer complaint", next: "consumer_detail" }, { id: "investigates", label: "Something for WRAL Investigates", form: "investigates" }] }, { id: "consumer_detail", type: "collect", prompt: "Tell us about your complaint.", help: "This goes to the 5 On Your Side consumer team.", next: "consumer_company_q", fields: [{ key: "subject", kind: "text", label: "Subject of your complaint", role: "subject", required: !0, maxLength: 200 }, { key: "description", kind: "textarea", label: "Describe your complaint. Be specific and include when this happened.", required: !0, maxLength: 5e3 }] }, { id: "consumer_company_q", type: "choice", prompt: "Is your complaint about a company?", options: [{ id: "companyyes", label: "Yes", next: "consumer_company" }, { id: "companyno", label: "No", next: "consumer_resolution" }] }, { id: "consumer_company", type: "collect", prompt: "Tell us about the company.", next: "consumer_resolution", fields: [{ key: "company", kind: "text", label: "What is the company name?", required: !0 }, { key: "inbusiness", kind: "select", label: "Is the company still in business?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }, { id: "notsure", label: "Not sure" }] }, { key: "companysite", kind: "url", label: "Link to the company's website or social media pages" }] }, { id: "consumer_resolution", type: "collect", prompt: "What has happened since?", next: "consumer_contact", fields: [{ key: "tried", kind: "textarea", label: "What have you done to try to resolve the issue?", maxLength: 5e3 }, { key: "legal", kind: "select", label: "Have you pursued legal action, retained or consulted with an attorney?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "agency", kind: "select", label: "Have you filed a complaint with another agency or with the Better Business Bureau?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "fair", kind: "textarea", label: "What result do you think is fair?", maxLength: 5e3 }, { key: "media", kind: "media", label: "Do you have video, photos or files to upload?" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "consumer_contact", type: "collect", prompt: "How can the team reach you?", next: "verify", fields: [{ key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:consumer", confirmation: { title: "Sent to 5 On Your Side.", body: "Your complaint goes to the 5 On Your Side consumer team. They read every complaint and follow up on the ones they pursue." } }], re = {
33
+ formId: Q,
34
+ title: X,
35
+ description: ee,
36
+ flowVersion: te,
37
+ order: ie,
38
+ enabled: oe,
39
+ start: ne,
40
+ budget: ae,
41
+ nodes: se
42
+ }, le = "investigates", de = "Something for WRAL Investigates", me = "Tips for WRAL Investigates, routed to the Investigates queue and emailed to the team. Unlisted: reached from the news and 5 On Your Side forms, or ?flow=investigates.", ce = "2026-09-25.1", ue = 4, pe = !0, he = !1, ye = "investigates_detail", ge = { maxFiles: 10, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"] }, be = [{ id: "investigates_detail", type: "collect", prompt: "What should we look into?", help: "This goes to the WRAL Investigates team.", next: "investigates_material", fields: [{ key: "subject", kind: "text", label: "Subject of your investigation", role: "subject", required: !0, maxLength: 200 }, { key: "description", kind: "textarea", label: "Describe what we should look into. Be specific and include when this happened.", required: !0, maxLength: 5e3 }, { key: "legal", kind: "select", label: "Have you pursued legal action, retained or consulted with an attorney?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }, { key: "fair", kind: "textarea", label: "What result do you think is fair?", maxLength: 5e3 }] }, { id: "investigates_material", type: "collect", prompt: "Anything to share with us?", next: "investigates_contact", fields: [{ key: "media", kind: "media", label: "Documents, video or photos to upload, such as incident reports or legal paperwork" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }] }, { id: "investigates_contact", type: "collect", prompt: "How can the team reach you?", next: "verify", fields: [{ key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }, { key: "address", kind: "text", label: "Address", autocomplete: "street-address", maxLength: 500 }, { key: "zip", kind: "text", label: "Zip code", inputMode: "numeric", autocomplete: "postal-code", pattern: "^\\d{5}(-\\d{4})?$", maxLength: 10 }, { key: "willing", kind: "select", label: "Are you willing to talk with a reporter?", options: [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }] }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio+email:investigates", confirmation: { title: "Sent to WRAL Investigates.", body: "Your tip goes to the WRAL Investigates team. They read every submission and follow up on the ones they pursue." } }], fe = {
43
+ formId: le,
44
+ title: de,
45
+ description: me,
46
+ flowVersion: ce,
47
+ order: ue,
48
+ enabled: pe,
49
+ listed: he,
50
+ start: ye,
51
+ budget: ge,
52
+ nodes: be
53
+ }, we = "community", ke = "Community event, photo or video", xe = "Community events, photos and video for the Studio community review queue (no email). Whether the event is upcoming or past is recorded in the path. Featured media is credited by name.", ve = "2026-09-25.1", _e = 5, Ie = !0, Le = "community_type", $e = { maxFiles: 5, maxFileBytes: 524288e3, allowedTypes: ["image/jpeg", "image/png", "image/heic", "image/webp", "video/mp4", "video/quicktime", "application/pdf"] }, We = [{ id: "community_type", type: "choice", prompt: "What would you like to share?", options: [{ id: "upcoming", label: "Something that's coming up", next: "community_upcoming" }, { id: "past", label: "Something that already happened", next: "community_past" }] }, { id: "community_upcoming", type: "collect", prompt: "Tell us about it.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "Tell us about it. Please include a description, day, time and location.", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Choose files: upload any photos, video or a press release to preview your event" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }] }, { id: "community_past", type: "collect", prompt: "Tell us about it.", next: "verify", fields: [{ key: "description", kind: "textarea", label: "Tell us about it. Please include a description, day, time and location.", required: !0, maxLength: 5e3 }, { key: "media", kind: "media", label: "Choose files: upload any photos, video or a press release from your event" }, { key: "rights", kind: "consent", label: "Rights confirmation", requiredIf: "media", text: "I have obtained the attached materials in a lawful manner and have the necessary rights to submit them here. I give WRAL permission to use, copy, modify, and distribute the attached materials as WRAL sees fit, and to use my name in connection with the materials." }, { key: "name", kind: "text", label: "Your name", autocomplete: "name", maxLength: 200 }, { key: "phone", kind: "text", label: "Your phone number", inputMode: "tel", autocomplete: "tel", maxLength: 40 }] }, { id: "verify", type: "gate", next: "submit" }, { id: "submit", type: "terminal", route: "studio:community", confirmation: { title: "Shared with our editors.", body: "Community submissions go to the review queue. If we feature yours, we credit you by name." } }], Ae = {
54
+ formId: we,
55
+ title: ke,
56
+ description: xe,
57
+ flowVersion: ve,
58
+ order: _e,
59
+ enabled: Ie,
60
+ start: Le,
61
+ budget: $e,
62
+ nodes: We
63
+ }, Se = {
64
64
  formId: "demo-redirect",
65
65
  title: "Demo: a redirect path",
66
66
  description: "Demonstrates the redirect dead-end card.",
@@ -105,121 +105,128 @@ const x = "news", v = "News tip or story idea", _ = "News tips and story ideas r
105
105
  confirmation: { title: "Thanks!", body: "This demo submission went nowhere." }
106
106
  }
107
107
  ]
108
- }, w = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
109
- function Se(u, l = []) {
110
- const n = new Map((u?.nodes || []).map((s) => [s.id, s])), h = [...l];
111
- let i = n.get(u?.start);
112
- for (let s = 0; i && s < 50; s++) {
113
- if (i.type === "terminal") return i;
114
- if (i.type === "choice") {
115
- const a = String(h.shift() || "").split(":")[1];
116
- i = n.get((i.options || []).find((y) => y.id === a)?.next);
108
+ }, k = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
109
+ function Re(u, m = []) {
110
+ const a = new Map((u?.nodes || []).map((r) => [r.id, r])), h = [...m];
111
+ let o = a.get(u?.start);
112
+ for (let r = 0; o && r < 50; r++) {
113
+ if (o.type === "terminal") return o;
114
+ if (o.type === "choice") {
115
+ const n = String(h.shift() || "").split(":")[1];
116
+ o = a.get((o.options || []).find((y) => y.id === n)?.next);
117
117
  continue;
118
118
  }
119
- i = n.get(i.next);
119
+ o = a.get(o.next);
120
120
  }
121
121
  return null;
122
122
  }
123
- function Re() {
123
+ function Te() {
124
124
  const u = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, "");
125
- let l = "";
126
- for (let n = 0; n < 5; n++)
127
- l += w[Math.floor(Math.random() * w.length)];
128
- return `RI-${u}-${l}`;
125
+ let m = "";
126
+ for (let a = 0; a < 5; a++)
127
+ m += k[Math.floor(Math.random() * k.length)];
128
+ return `RI-${u}-${m}`;
129
129
  }
130
- function Te({ latency: u = 250, anonymous: l = null } = {}) {
131
- const n = [R, N, K, se, be, We, Ae], h = /* @__PURE__ */ new Map();
132
- let i = 0, s = !1, a = { email: null, verified: !1 }, y = null;
133
- const d = (e = u) => new Promise((o) => setTimeout(o, e)), b = (e) => {
130
+ function qe({ latency: u = 250, anonymous: m = null } = {}) {
131
+ const a = [T, N, G, re, fe, Ae, Se], h = /* @__PURE__ */ new Map();
132
+ let o = 0, r = !1, n = { email: null, verified: !1 }, y = null, f = !1;
133
+ const l = (e = u) => new Promise((t) => setTimeout(t, e)), g = (e) => {
134
134
  try {
135
135
  return new URLSearchParams(globalThis.location?.search || "").get(e) === "1";
136
136
  } catch {
137
137
  return !1;
138
138
  }
139
- }, k = () => b("demofail"), f = l === null ? b("anon") : !!l;
139
+ }, x = () => g("demofail"), w = m === null ? g("anon") : !!m;
140
140
  return {
141
141
  demo: !0,
142
142
  // ── api surface ─────────────────────────────────────────────
143
- listForms: async () => (await d(), n),
144
- createUploads: async ({ formId: e, files: o }) => {
145
- await d();
146
- const r = n.find((t) => t.formId === e)?.budget || {};
147
- if (o.length > (r.maxFiles ?? 5)) {
148
- const t = new Error("demo: too many files");
149
- throw t.status = 400, t.body = [{ message: `This form accepts at most ${r.maxFiles} files` }], t;
143
+ listForms: async () => (await l(), a),
144
+ createUploads: async ({ formId: e, files: t }) => {
145
+ await l();
146
+ const d = a.find((i) => i.formId === e)?.budget || {};
147
+ if (t.length > (d.maxFiles ?? 5)) {
148
+ const i = new Error("demo: too many files");
149
+ throw i.status = 400, i.body = [{ message: `This form accepts at most ${d.maxFiles} files` }], i;
150
150
  }
151
- return o.map(() => {
152
- const t = crypto.randomUUID();
151
+ return t.map(() => {
152
+ const i = crypto.randomUUID();
153
153
  return {
154
- assetId: t,
155
- url: `demo:${t}`,
154
+ assetId: i,
155
+ url: `demo:${i}`,
156
156
  method: "PUT",
157
157
  expires: new Date(Date.now() + 6e5).toISOString(),
158
- assetUrl: `https://report-it.assets.wral.com/${t}`
158
+ assetUrl: `https://report-it.assets.wral.com/${i}`
159
159
  };
160
160
  });
161
161
  },
162
- uploadFile: ({ file: e, onProgress: o = () => {
162
+ uploadFile: ({ file: e, onProgress: t = () => {
163
163
  } }) => {
164
- i += 1;
165
- const m = i;
166
- let r = !1;
164
+ o += 1;
165
+ const s = o;
166
+ let d = !1;
167
167
  return { promise: (async () => {
168
168
  const c = e.size || 1;
169
- for (let g = 1; g <= 4; g++) {
170
- if (await d(300), r) {
169
+ for (let b = 1; b <= 4; b++) {
170
+ if (await l(300), d) {
171
171
  const p = new Error("aborted");
172
172
  throw p.status = 0, p.body = { aborted: !0 }, p;
173
173
  }
174
- if (k() && m === 2 && !s && g === 2) {
175
- s = !0;
174
+ if (x() && s === 2 && !r && b === 2) {
175
+ r = !0;
176
176
  const p = new Error("demo: simulated upload failure");
177
177
  throw p.status = 0, p;
178
178
  }
179
- o({ loaded: c * g / 4, total: c });
179
+ t({ loaded: c * b / 4, total: c });
180
180
  }
181
181
  return { status: 200 };
182
182
  })(), abort: () => {
183
- r = !0;
183
+ d = !0;
184
184
  } };
185
185
  },
186
- putRequest: async (e, o) => {
187
- if (await d(), !a.verified && y?.requestId !== e) {
186
+ putRequest: async (e, t) => {
187
+ if (await l(), !n.verified && y?.requestId !== e) {
188
188
  const c = new Error("demo: not signed in");
189
189
  throw c.status = 401, c;
190
190
  }
191
191
  if (h.has(e))
192
192
  return h.get(e);
193
- const m = n.find((c) => c.formId === o.formId), r = Se(m, o.path), t = {
193
+ const s = a.find((c) => c.formId === t.formId), d = Re(s, t.path), i = {
194
194
  requestId: e,
195
- reference: Re(),
196
- confirmation: r?.confirmation || { title: "Report received.", body: "" },
197
- routing: { destination: r?.route || "email:general", state: "delivered" }
195
+ reference: Te(),
196
+ confirmation: d?.confirmation || { title: "Report received.", body: "" },
197
+ routing: { destination: d?.route || "email:general", state: "delivered" }
198
198
  };
199
- return h.set(e, t), t;
199
+ return h.set(e, i), i;
200
200
  },
201
201
  // ── auth surface ────────────────────────────────────────────
202
- isAuthenticated: async () => a.verified,
203
- signedInEmail: () => a.verified ? a.email : null,
204
- sendCode: async (e) => (await d(), a = { email: e, verified: !1 }, { challengeRequired: !0 }),
202
+ isAuthenticated: async () => n.verified,
203
+ signedInEmail: () => n.verified ? n.email : null,
204
+ sendCode: async (e) => (await l(), n = { email: e, verified: !1 }, { challengeRequired: !0, newAccount: !g("demoexisting") }),
205
205
  verifyCode: async (e) => {
206
- if (await d(), !/^\d{6}$/.test(e))
206
+ if (await l(), !/^\d{6}$/.test(e))
207
207
  throw new Error("Please enter the 6-digit code.");
208
- return a.verified = !0, { success: !0 };
208
+ return n.verified = !0, { success: !0 };
209
209
  },
210
210
  signOut: () => {
211
- a = { email: null, verified: !1 };
211
+ n = { email: null, verified: !1 };
212
+ },
213
+ saveUserFacts: async (e) => {
214
+ if (await l(), !n.verified)
215
+ throw Object.assign(new Error("demo: not signed in"), { status: 401 });
216
+ if (g("demofactsfail") && !f)
217
+ throw f = !0, Object.assign(new Error("demo: simulated user-facts failure"), { status: 0 });
218
+ n.facts = Object.fromEntries(e.map(({ factName: t, value: s }) => [t, s]));
212
219
  },
213
220
  // ── anonymous surface (DEV-1270) ────────────────────────────
214
221
  // The component reads this the way it reads a real server's
215
222
  // GET /v1/forms block: dark unless advertised.
216
- anonymousCapability: () => ({ enabled: f, humanCheck: null }),
217
- createAnonSession: async ({ formId: e, requestId: o }) => {
218
- if (await d(), !f) {
219
- const m = new Error("demo: anonymous submission is not available");
220
- throw m.status = 404, m;
223
+ anonymousCapability: () => ({ enabled: w, humanCheck: null }),
224
+ createAnonSession: async ({ formId: e, requestId: t }) => {
225
+ if (await l(), !w) {
226
+ const s = new Error("demo: anonymous submission is not available");
227
+ throw s.status = 404, s;
221
228
  }
222
- return y = { formId: e, requestId: o }, { expiresIn: 900 };
229
+ return y = { formId: e, requestId: t }, { expiresIn: 900 };
223
230
  },
224
231
  endAnonSession: () => {
225
232
  y = null;
@@ -227,11 +234,11 @@ function Te({ latency: u = 250, anonymous: l = null } = {}) {
227
234
  };
228
235
  }
229
236
  export {
230
- Fe as WralCodeInput,
237
+ Oe as WralCodeInput,
231
238
  Be as WralReportIt,
232
239
  Ce as WralReportMedia,
233
- Oe as createAuthAdapter,
234
- De as createClient,
235
- Te as createDemoClient,
240
+ De as createAuthAdapter,
241
+ je as createClient,
242
+ qe as createDemoClient,
236
243
  Me as createRealClient
237
244
  };