PageSourceSearch

https://www.onesimplewish.org/

html onesimplewish.org collected 2026-10-03 19:25:56 UTC 121,216 bytes, 2,253 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en-US">
3
4<head>
5    <meta charset="UTF-8">
6        <meta name="viewport" content="width=device-width, initial-scale=1">
7    <link rel="shortcut icon" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/favicon.ico"
8    type="image/x-icon" />
9    <meta name="csrf-param" content="_csrf">
10<meta name="csrf-token" content="LQqmYVzAdwgdBA4dkfL_nKu6kDW7j2ki13n6SDjGJf59ft87Mag9Q0lUTGf6l5TL2tXPf-62OEuvNIAKSvEcmA==">
11    <title>One Simple Wish</title>
12
13    <!-- Site Fonts -->
14    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
15    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
16    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
17    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
18    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-ExtraBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
19    <link rel="preload" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/fonts/Montserrat-Black.woff2" as="font" type="font/woff2" crossorigin="anonymous">
20    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/_fonts.css" rel="stylesheet" type="text/css" />
21    <link href="/vendor/codefire/cfusermgmt/web/css/oldCss/bootstrap.css" rel="stylesheet">
22<link href="/css/site.css?v=103" rel="stylesheet">
23<link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/flatpickr.min.css" rel="stylesheet">
24<link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/lightbox.min.css" rel="stylesheet"> 
25    <link rel="preload" as="image" href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/login_loader.gif">
26    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/font_awesome_v6_all.min.css" rel="stylesheet" type="text/css" />
27    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/oldCss/owl.carousel.css" rel="stylesheet" type="text/css" />
28    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/oldCss/owl.theme.css" rel="stylesheet" type="text/css" />
29    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/v5_bootstrap.min.css" rel="stylesheet" type="text/css">
30    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/app.css?version=1031" rel="stylesheet" type="text/css" />
31    <link href="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/css/app_responsive.css?version=103" rel="stylesheet" type="text/css" />
32        
32<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/js/jquery.min.js"></script>
32
33        <meta property="og:url" content="https://www.onesimplewish.org">
34<meta property="og:title" content="Grant a wish. Change a life."><!-- share title -->
35<meta property="og:description" content="One Simple Wish empowers you to brighten the lives of individuals impacted by foster care & crisis by sharing their wishes for you to grant. 100s of new wishes posted daily."><!-- share description -->
36<meta property="og:image" content="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/OneSimpleWish.png">
37<meta property="og:image:secure_url" content="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/OneSimpleWish.png">
38<meta property="og:image:type" content="image/png">
39<meta property="og:image:width" content="300">
40<meta property="og:image:height" content="158">
41<meta property="og:type" content="article">
42<meta property="fb:app_id" content="1464750547126278">
43
44<!-- Twitter share-->
45<meta name="twitter:card" content="summary">
46<meta name="twitter:site" content="@OneSimpleWish">
47<meta name="twitter:creator" content="@OneSimpleWish">
48<meta name="twitter:title" content="Grant a wish. Change a life.">
49<meta name="twitter:description" content="One Simple Wish empowers you to brighten the lives of individuals impacted by foster care & crisis by sharing their wishes for you to grant. 100s of new wishes posted daily.">
50<meta name="twitter:image" content="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/OneSimpleWish.png">    
50<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/feather.min.js"></script>
50
51    
51<script> feather.replace(); </script>
51
52    <!-- Google tag for Ads (gtag.js) -->
vendor: 69 bytes, lines 52-53
52 
53    <script async src="https://www.googletagmanager.com/gtag/js?id=
53AW-1018283452
vendor: 16 bytes, lines 53-54
53"></script>
54    
54<script>window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments);} gtag("consent", "default", { ad_storage: "denied",ad_user_data: "denied", ad_personalization: "denied",analytics_storage: "denied",functionality_storage: "denied", personalization_storage: "denied", security_storage: "granted",wait_for_update: 2000, }); gtag("set", "ads_data_redaction", true); gtag("set", "url_passthrough", true); </script>
54
55    <!-- Google Tag Manager -->
56    
56<script>
vendor: 373 bytes, line 56
56(function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js'}); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', '
56GTM-58LNXN5
vendor: 3 bytes, line 56
56');
56</script>
56
57    <!-- End Google Tag Manager -->
58    <!-- Start cookieyes banner -->
59    
59<script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/f0f0f2f5a6ab2755d2c37263/script.js"></script>
59
60    <!-- End cookieyes banner -->
61     <!-- Facebook Pixel Code -->
62    
62<script>
63        var SITE_URL = 'https://www.onesimplewish.org/';
64        document.addEventListener('DOMContentLoaded', function () {
65            $(window).load(function () {
66                $(".home_loader").fadeOut("slow");
67            });
68            $('form.newsletter-form, form#embedded_signup').on('submit', function (evt) {
69                evt.preventDefault();
70                if (typeof fbq === 'function') {
71                    fbq('track', 'Lead');
72                }
73                $(this).unbind('submit').submit();
74            });
75            $('form#registeration').on('submit', function (evnt) {
76                evt.preventDefault();
77                fbq('track', 'CompleteRegistration');
78                $(this).unbind('submit').submit();
79            });
80            
81        });
82    </script>
82
83    <noscript> <img height="1" width="1" src="https://www.facebook.com/tr?id=450881385914611&ev=PageView  &noscript=1" /></noscript>
84    <!-- End Facebook Pixel Code -->
85</head>
86<script> var cartWishCount = '0';</script>
86
87<!-- End Google Tag Manager (noscript) -->
88
89<!-- innerpage headder START other------------->
90<div id="calloutbanner" class="osw-calloutbanner">
91    <div class="container text-center"><p><a href="https://www.onesimplewish.org/giving/halloween">Spooky season is here! <u>Grant a Halloween wish today</u>.</a></p>
92</div>
93</div>
94
95<div id="mobile_view" class="header-sec ">
96    <header>
97        <div class="container">
98            <nav class="navbar" role="navigation">
99                <div class="nav-left">
100                    <div class="navbar-logo">
101                        <div class="home_social visible-xs">
102                            <button type="button" class="navbar-toggle" id="button_click" aria-label="navigation-menu">
103                            </button>
104                        </div>
105
106                        <a class="logo" href="/">
107                            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/logo.png" class="img-responsive" alt="logo"/>
108                        </a>
109                    </div>
110                                                            <div class="menu_main" id="menu">
111                        <button class="close visible-xs" type="button" data-toggle="collapse" data-target="#menu">
112                        </button>
113                        <ul class="nav">
114                            <li class="dropdown">
115                                <a class="dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false"> Give Help</a>
116                                <ul class="dropdown-menu">
117                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/children/help-child">View All</a></li>
118                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/site/donate">Donate</a></li>
119                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/wish/wish-grant">Browse Wishes</a></li>
120                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/site/wish-fund">Start a Wish Fund</a></li>
121                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/givingpage">Create a Fundraiser</a></li>
122                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/corporate-and-foundation-opportunities">Corporate Opportunities</a></li>
123                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/giftcards">Gift Cards</a></li>
124                                    <li><a class="dropdown-item" href="https://www.onesimplewish.org/major-gifts">Major Gifts</a></li>
125                                </ul>
126                            </li>
127
128                            <li><a href="/site/submit-a-wish" class="" >Get Help</a></li>
129                            <li>
130                                <a href="https://www.onesimplewish.org/site/about" class="" >About </a>
131                            </li>
132
133                            <li class="btn-li">
134                                <a href="https://www.onesimplewish.org/wish/wish-grant" class=" btn-primary" > Browse Wishes
135                                </a>
136                            </li>
137
138                            <li class="btn-li">
139                                <a href="https://www.onesimplewish.org/site/donate" class=" btn-success" > Donate
140                                </a>
141                            </li>
142
143                        </ul>
144                    
145                    </div>
146                </div>
147                <ul class="signin">
148                        <li><a href="https://www.onesimplewish.org/cart/cart" class="
149                                 cart-icon" title="cart">
150                            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/cart.svg" alt="cart" />
151                            <span>
152                                    0                                </span>
153                            </a>
154                        </li>
155                        
156                                                                        <li class="dropdown" id="LoginMenu">
157                            <!-- <a id="show_popup_login_desktop" class="dropdown-toggle" href="javascript:void(0);" data-bs-toggle="dropdown" ara-expanded="false">Sign In</a> -->
158                             <a class="dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false">Sign In</a>                            <div class="dropdown-menu">
159                                <div class="login-box">
160                                    <form id="umalogin" action="/usermgmt/user/login" method="post" enctype="multipart/form-data" validateOnSubmit>
161<input type="hidden" name="_csrf" value="LQqmYVzAdwgdBA4dkfL_nKu6kDW7j2ki13n6SDjGJf59ft87Mag9Q0lUTGf6l5TL2tXPf-62OEuvNIAKSvEcmA==">                                    <div class="row">
162                                        <div class="col-9">
163                                            <div class="form-group field-loginform-username">
164
165<input type="text" id="loginform-username" class="form-control" name="LoginForm[username]" placeholder="Email Address">
166
167<div class="help-block"></div>
168</div>                                        </div>
169                                        <div class="clearfix"></div>
170                                    </div>
171                                    <div class="password row">
172                                        <div class="col-9">
173                                            <div class="form-group field-loginform-password">
174
175<input type="password" id="loginform-password" class="form-control" name="LoginForm[password]" placeholder="Password">
176
177<div class="help-block"></div>
178</div>                                        </div>
179                                        <div class="col-3 ps-0">
180                                        <div class="form-group text-center">
181                                        <button type="submit" class="call_login" name="login-button" value="Login">Login</button>                                        <div class="login_loader" style="display:none;"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/login_loader.gif" alt="login_loader" /></div>
182
183
184                                                                            </div>
185                                        </div>
186                                        <div class="clearfix"></div>
187                                    </div>
188                                    <div class="row">
189                                        <div class="col-sm-12">
190                                                <a class="forgot-password" href="https://www.onesimplewish.org/usermgmt/user/request-password-reset">Forgot Password</a>                                            </div>
191                                    </div>
192                                    <div class="row">
193                                        <div class="col-12">
194                                          
195                                            <a href="/user/register/wg" class="register-here">Don't have an account? Register here!</a>
196                                        </div>
197                                    </div>
198                                    <input type="hidden" id="userWishesField" name="userWishes" value="">                                    <input type="hidden" id="userPnrefField" name="userPnref" value="">                                </div>
199                                </form>                                <input type="hidden" name="url" id="popup_url" value="https://www.onesimplewish.org/usermgmt/user/login">
200                            </div>
201                        </li>
202                                                               </ul>
203            </nav>
204        </div>
205    </header>
206</div>
207
208<script>
209$(document).ready(function () {
210    $(".dropdown-menu").click(function (event){ event.stopPropagation();});
211    var header = $("#mobile_view");
212    var scrollThreshold = 55; 
213    $(window).on("scroll", function () {
214    var scrollThreshold = 135;
215    var header = $("header");
216    var body = $("body");
217    var headerHeight = header.outerHeight();
218    if ($(this).scrollTop() > scrollThreshold) {
219        if (!header.hasClass("fixed-header")) {
220            body.css("padding-top", (headerHeight + 20) + "px");
221            header.addClass("fixed-header").css({ opacity: 0 }).animate({ opacity: 1 }, 700);
222        }
223    } else {
224        body.css("padding-top", "0");
225        header.removeClass("fixed-header").css("opacity", "");
226    }
227});
228});
229</script>
229<div class="success_message">
230               
231</div>
232<div class="home_loader"></div>
233<div class="main-content">
234   
235    <!-- hero-section -->
236  <div class="hero-sec home-hero-sec">
237    <div class="container">
238      <div class="ps-md-2">
239        <h1>Grant <br>a Wish. <span>  CHANGE A LIFE.  </span></h1>
240        <a class="btn-primary" href="https://www.onesimplewish.org/wish/wish-grant"> GRANT A WISH </a>
241      </div>
242    </div>
243  </div> 
244
245
246<!-- our-story-section -->
247  <div class="our-story home-our-story">
248    <div class="container">
249      <div class="our-story-inner">
250        <img class="heartIcons" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/Hearts.png" alt="Hearts" />
251        <p>Join us in spreading <strong> love, hope, and joy </strong>by granting wishes to kids and young adults impacted by foster care and crisis.</p>
252        <a href="https://www.onesimplewish.org/site/about" class="btn-secondary">OUR STORY</a>
253      </div>
254    </div>
255  </div>
256
257<!-- wish-card-section -->
258    <div class="wish_grid">
259    <div class="container">
260      <h2>Featured Wishes</h2>
261        <div class="row row-x">
262                  <div class="col-lg-4 col-sm-6">
263            <div class="card">
264              <div class="checkbox-div">
265                <input type="checkbox" id="wish_219758" value="219758" 
266                  class="wish_checkboxes wish_checkbox" value="219758" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
267                   title="Add to Cart">
268              </div>
269              <p class="gray-text waiting_days"><span class='counter-day'>2 Days Waiting </span><span class='admin_tags'></span></p>
270              <a href="https://www.onesimplewish.org/wish/view-wish?id=219758" class="custom-tooltip" data-tooltip="Five Fisher & Paykel vent circuits for Lilly whose insurance covers very little and needs a safe backup supply on hand">
271                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Five Fisher & Paykel vent circuits for Lilly whose insurance covers very little and needs a safe backup supply on hand"> Five Fisher & Paykel vent circuits for Lilly whose insurance covers very little and needs a safe backup supply on hand</p>
272                <p class="wish-price"> $210</p>
273              </a>
274              <a href="https://www.onesimplewish.org/wish/view-wish?id=219758" class="btn-primary-outline"> View this wish</a>
275            </div>
276          </div>
277                  <div class="col-lg-4 col-sm-6">
278            <div class="card">
279              <div class="checkbox-div">
280                <input type="checkbox" id="wish_216180" value="216180" 
281                  class="wish_checkboxes wish_checkbox" value="216180" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
282                   title="Add to Cart">
283              </div>
284              <p class="gray-text waiting_days"><span class='counter-day'>50 Days Waiting </span><span class="time_bg"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/clock.svg" width="25" title="Time Sensitive" alt="clock-icon"><span class="text-danger"> NEEDED BY 10/30</span></span><span class='admin_tags'></span></p>
285              <a href="https://www.onesimplewish.org/wish/view-wish?id=216180" class="custom-tooltip" data-tooltip="Tickets for a train ride with Santa for Kelsey who is thriving with her grandparents">
286                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Tickets for a train ride with Santa for Kelsey who is thriving with her grandparents"> Tickets for a train ride with Santa for Kelsey who is thriving with her grandparents</p>
287                <p class="wish-price"> $208</p>
288              </a>
289              <a href="https://www.onesimplewish.org/wish/view-wish?id=216180" class="btn-primary-outline"> View this wish</a>
290            </div>
291          </div>
292                  <div class="col-lg-4 col-sm-6">
293            <div class="card">
294              <div class="checkbox-div">
295                <input type="checkbox" id="wish_218575" value="218575" 
296                  class="wish_checkboxes wish_checkbox" value="218575" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
297                   title="Add to Cart">
298              </div>
299              <p class="gray-text waiting_days"><span class='counter-day'>17 Days Waiting </span><span class='admin_tags'></span></p>
300              <a href="https://www.onesimplewish.org/wish/view-wish?id=218575" class="custom-tooltip" data-tooltip="A bed tent for Braxton who tends to wander at night">
301                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="A bed tent for Braxton who tends to wander at night"> A bed tent for Braxton who tends to wander at night</p>
302                <p class="wish-price"> $92</p>
303              </a>
304              <a href="https://www.onesimplewish.org/wish/view-wish?id=218575" class="btn-primary-outline"> View this wish</a>
305            </div>
306          </div>
307                  <div class="col-lg-4 col-sm-6">
308            <div class="card">
309              <div class="checkbox-div">
310                <input type="checkbox" id="wish_219201" value="219201" 
311                  class="wish_checkboxes wish_checkbox" value="219201" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
312                   title="Add to Cart">
313              </div>
314              <p class="gray-text waiting_days"><span class='counter-day'>9 Days Waiting </span><span class='admin_tags'></span></p>
315              <a href="https://www.onesimplewish.org/wish/view-wish?id=219201" class="custom-tooltip" data-tooltip="An iPad for Dashawn who is autistic and uses videos to self-regulate and find calm on a difficult day">
316                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="An iPad for Dashawn who is autistic and uses videos to self-regulate and find calm on a difficult day"> An iPad for Dashawn who is autistic and uses videos to self-regulate and find calm on a difficult day</p>
317                <p class="wish-price"> $237</p>
318              </a>
319              <a href="https://www.onesimplewish.org/wish/view-wish?id=219201" class="btn-primary-outline"> View this wish</a>
320            </div>
321          </div>
322                  <div class="col-lg-4 col-sm-6">
323            <div class="card">
324              <div class="checkbox-div">
325                <input type="checkbox" id="wish_218367" value="218367" 
326                  class="wish_checkboxes wish_checkbox" value="218367" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
327                   title="Add to Cart">
328              </div>
329              <p class="gray-text waiting_days"><span class='counter-day'>17 Days Waiting </span><span class='admin_tags'></span></p>
330              <a href="https://www.onesimplewish.org/wish/view-wish?id=218367" class="custom-tooltip" data-tooltip="Groceries for Mads who is healing while living on her own">
331                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Groceries for Mads who is healing while living on her own"> Groceries for Mads who is healing while living on her own</p>
332                <p class="wish-price"> $108</p>
333              </a>
334              <a href="https://www.onesimplewish.org/wish/view-wish?id=218367" class="btn-primary-outline"> View this wish</a>
335            </div>
336          </div>
337                  <div class="col-lg-4 col-sm-6">
338            <div class="card">
339              <div class="checkbox-div">
340                <input type="checkbox" id="wish_217374" value="217374" 
341                  class="wish_checkboxes wish_checkbox" value="217374" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
342                   title="Add to Cart">
343              </div>
344              <p class="gray-text waiting_days"><span class='counter-day'>31 Days Waiting </span><span class='admin_tags'></span></p>
345              <a href="https://www.onesimplewish.org/wish/view-wish?id=217374" class="custom-tooltip" data-tooltip="A new tablet for Kinsley to communicate with her foster sister">
346                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="A new tablet for Kinsley to communicate with her foster sister"> A new tablet for Kinsley to communicate with her foster sister</p>
347                <p class="wish-price"> $84</p>
348              </a>
349              <a href="https://www.onesimplewish.org/wish/view-wish?id=217374" class="btn-primary-outline"> View this wish</a>
350            </div>
351          </div>
352              </div>
353      <div class="row pb-sm-2 pt-4 mt-5 justify-content-center">
354        <div class="col-md-4 text-center">
355          <a href="https://www.onesimplewish.org/wish/wish-grant" class="btn-secondary w-250"> Browse All Wishes</a>
356        </div>
357      </div>
358    </div>
359  </div>
360  
361<!-- wish-card-section -->
362    <div class="wish_grid pt-0">
363    <div class="container">
364      <h2>Donate Towards a Wish</h2>
365        <div class="row row-x">
366                  <div class="col-lg-4 col-sm-6">
367            <div class="card">
368              <div class="checkbox-div">
369                <input type="checkbox" id="wish_217452" data-remaining="500" data-towards="1" value="217452" 
370                  class="wish_checkboxes wish_checkbox" value="217452" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
371                   title="Add to Cart">
372              </div>
373              <p class="gray-text waiting_days"><span class='counter-day'>32 Days Waiting </span><span class='admin_tags'></span></p>
374              <a href="https://www.onesimplewish.org/wish/view-wish?id=217452" class="custom-tooltip" data-tooltip="A new television for Aria and her family to enjoy in their new apartment">
375                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="A new television for Aria and her family to enjoy in their new apartment"> A new television for Aria and her family to enjoy in their new apartment</p>
376                <p class="wish-price"> $500</p>
377                                  <div class="wish-progress-wrap">
378                      <div class="wish-progress-meta">
379                          <span><span class="raised">$0</span> Raised</span>
380                          <span class="contributors">
381                              <svg class="contributors-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
382                              <circle cx="9" cy="7" r="4"/><path d="M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/><path d="M21 21v-2a4 4 0 0 0-3-3.87"/>
383                              </svg> 0 Supporter                          </span>
384                      </div>
385                      <div class="wish-progress-bar-track"><div class="wish-progress-bar-fill"style="width: 0%;"></div></div>
386                  </div>
387                              </a>
388              <a href="https://www.onesimplewish.org/wish/view-wish?id=217452" class="btn-primary-outline"> View this wish</a>
389            </div>
390          </div>
391                  <div class="col-lg-4 col-sm-6">
392            <div class="card">
393              <div class="checkbox-div">
394                <input type="checkbox" id="wish_216322" data-remaining="366" data-towards="1" value="216322" 
395                  class="wish_checkboxes wish_checkbox" value="216322" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
396                   title="Add to Cart">
397              </div>
398              <p class="gray-text waiting_days"><span class='counter-day'>47 Days Waiting </span><span class='admin_tags'></span></p>
399              <a href="https://www.onesimplewish.org/wish/view-wish?id=216322" class="custom-tooltip" data-tooltip="A monthly storage unit payment for Shaman who is homeless and keeping all of his belongings in a unit">
400                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="A monthly storage unit payment for Shaman who is homeless and keeping all of his belongings in a unit"> A monthly storage unit payment for Shaman who is homeless and keeping all of his belongings in a unit</p>
401                <p class="wish-price"> $433</p>
402                                  <div class="wish-progress-wrap">
403                      <div class="wish-progress-meta">
404                          <span><span class="raised">$67</span> Raised</span>
405                          <span class="contributors">
406                              <svg class="contributors-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
407                              <circle cx="9" cy="7" r="4"/><path d="M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/><path d="M21 21v-2a4 4 0 0 0-3-3.87"/>
408                              </svg> 2 Supporters                          </span>
409                      </div>
410                      <div class="wish-progress-bar-track"><div class="wish-progress-bar-fill"style="width: 15%;"></div></div>
411                  </div>
412                              </a>
413              <a href="https://www.onesimplewish.org/wish/view-wish?id=216322" class="btn-primary-outline"> View this wish</a>
414            </div>
415          </div>
416                  <div class="col-lg-4 col-sm-6">
417            <div class="card">
418              <div class="checkbox-div">
419                <input type="checkbox" id="wish_217542" data-remaining="475" data-towards="1" value="217542" 
420                  class="wish_checkboxes wish_checkbox" value="217542" onclick="updatewishids(this,'https://www.onesimplewish.org/cart/cart/add-wishes')"
421                   title="Add to Cart">
422              </div>
423              <p class="gray-text waiting_days"><span class='counter-day'>31 Days Waiting </span><span class='admin_tags'></span></p>
424              <a href="https://www.onesimplewish.org/wish/view-wish?id=217542" class="custom-tooltip" data-tooltip="An iPad for Deija to help with school and producing music">
425                <p class="wish-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="An iPad for Deija to help with school and producing music"> An iPad for Deija to help with school and producing music</p>
426                <p class="wish-price"> $475</p>
427                                  <div class="wish-progress-wrap">
428                      <div class="wish-progress-meta">
429                          <span><span class="raised">$0</span> Raised</span>
430                          <span class="contributors">
431                              <svg class="contributors-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
432                              <circle cx="9" cy="7" r="4"/><path d="M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/><path d="M21 21v-2a4 4 0 0 0-3-3.87"/>
433                              </svg> 0 Supporter                          </span>
434                      </div>
435                      <div class="wish-progress-bar-track"><div class="wish-progress-bar-fill"style="width: 0%;"></div></div>
436                  </div>
437                              </a>
438              <a href="https://www.onesimplewish.org/wish/view-wish?id=217542" class="btn-primary-outline"> View this wish</a>
439            </div>
440          </div>
441              </div>
442      <div class="row pb-sm-2 pt-4 mt-5 justify-content-center">
443        <div class="col-md-5 text-center">
444          <a href="https://www.onesimplewish.org/wish/wish-grant?towards_wish=1" class="btn-secondary w-250"> View All Wishes I can donate towards</a>
445        </div>
446      </div>
447    </div>
448  </div>
449  
450
451<!-- our-impact-sec -->
452  <div class="our-impact">
453    <div class="container">
454      <div class="blue-bg">
455        <h2>Our Impact Since 2008</h2>
456        <div class="row">
457          <div class="col-md-3 col-6">
458            <div class="info">
459            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/gift.svg" class="gift-img" alt="gift" />
460              <h3>350,000+</h3>
461              <p>Wishes Granted </p>
462            </div>
463          </div>
464          <div class="col-md-3 col-6">
465            <div class="info">
466            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/community-partners.svg" class="community-partners-img" alt="community-partners" />
467              <h3>4,600+</h3>
468              <p>Community Partners</p>
469            </div>
470          </div>
471          <div class="col-md-3 col-6">
472            <div class="info">
473            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/money-raised.svg" class="wish-img" alt="money-raised" />
474              <h3>$30M+</h3>
475              <p>Raised </p>
476            </div>
477          </div>
478          <div class="col-md-3 col-6">
479            <div class="info">
480            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/wish-granters.svg" class="wish-img" alt="wish-granters"/>
481              <h3>26,000+ </h3>
482              <p>Wish Granters</p>
483            </div>
484          </div>
485        </div>
486        <div class="row justify-content-center">
487          <a href="https://www.onesimplewish.org/site/about#our-impact" class="btn-primary-outline"> SEE OUR IMPACT</a>
488        </div>
489      </div>
490    </div>
491  </div>
492
493<!-- wishes-by-category-sec -->
494    <div class="wishes-by-category" id="wishes-by-category">
495      <div class="container">
496          <h2>Find Wishes By Category</h2>
497          <div class="row">
498                                <div class="col-lg-4 col-sm-6">
499                      <div class="category-card">
500                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/pig-bank.svg?v=103" class="cate-img" alt="under_100" />
501                            <a href="javascript:void(0)" onclick="searchCategory('under_100')" class="btn-primary-outline">
502                                UNDER $100                            </a>
503                      </div>
504                  </div>
505                                <div class="col-lg-4 col-sm-6">
506                      <div class="category-card">
507                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/lonest-waiting.svg?v=103" class="cate-img" alt="longest-waiting-wishes" />
508                            <a href="javascript:void(0)" onclick="searchCategory('longest-waiting-wishes')" class="btn-primary-outline">
509                                LONGEST WAITING                            </a>
510                      </div>
511                  </div>
512                                <div class="col-lg-4 col-sm-6">
513                      <div class="category-card">
514                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/time-sensitive.svg?v=103" class="cate-img" alt="time_sensitive" />
515                            <a href="javascript:void(0)" onclick="searchCategory('time_sensitive')" class="btn-primary-outline">
516                                TIME SENSITIVE                            </a>
517                      </div>
518                  </div>
519                                <div class="col-lg-4 col-sm-6">
520                      <div class="category-card">
521                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/birthday-cake.svg?v=103" class="cate-img" alt="birthday" />
522                            <a href="javascript:void(0)" onclick="searchCategory('birthday')" class="btn-primary-outline">
523                                BIRTHDAY                            </a>
524                      </div>
525                  </div>
526                                <div class="col-lg-4 col-sm-6">
527                      <div class="category-card">
528                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/education-bag.svg?v=103" class="cate-img" alt="education-and-employment" />
529                            <a href="javascript:void(0)" onclick="searchCategory('education-and-employment')" class="btn-primary-outline">
530                                EDUCATION & EMPLOYMENT                            </a>
531                      </div>
532                  </div>
533                                <div class="col-lg-4 col-sm-6">
534                      <div class="category-card">
535                          <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/checkmark.svg?v=103" class="cate-img" alt="essentialss" />
536                            <a href="javascript:void(0)" onclick="searchCategory('essentialss')" class="btn-primary-outline">
537                                ESSENTIALS                            </a>
538                      </div>
539                  </div>
540                        </div>
541          <!-- Grant WIsh esy Steps -->
542          <h2 class="mt-5 mb-2">How to Grant a Wish in 3 Easy Steps</h2>
543          <p class="text-center">Make a donation that directly supports foster children in your community.</p>
544           <div class="row row-x py-50 justify-content-center">
545            <div class="col-md-4 col-sm-6">
546                <div class="step-card">
547                    <strong>1.</strong>
548                    <h4>Browse Wishes</h4>
549                    <p>Explore real wishes from children in foster care across the country.</p>
550                </div>
551            </div>
552            <div class="col-md-4 col-sm-6">
553                <div class="step-card">
554                    <strong>2.</strong>
555                    <h4>Choose a Wish</h4>
556                    <p>Pick a wish that speaks to your heart – from a new backpack to a birthday cake. </p>
557                </div>
558            </div>
559            <div class="col-md-4 col-sm-6">
560                <div class="step-card">
561                    <strong>3.</strong>
562                    <h4>Grant the Wish</h4>
563                    <p>Donate to make it happen. We take care of the rest, and you’ll see your impact. </p>
564                </div>
565            </div>
566          </div>
567          <div class="row justify-content-center pt-3">
568          <a href="https://www.onesimplewish.org/wish/wish-grant" class="btn-secondary w-250">
568 BROWSE ALL WISHES</a>
569        </div>
570      </div>
571    </div>
572<script>
573function searchCategory(slug) {
574  localStorage.setItem('wishslugcategory', slug);
575    switch (slug) {
576        case 'under_100':
577            search_price_range();
578            break;
579        case 'longest-waiting-wishes':
580            search_longetest_wish();
581            break;
582        case 'time_sensitive':
583            time_sensitive_wish();
584            break;
585        case 'birthday':
586            search_birthday_wish();
587            break;
588        case 'education-and-employment':
589            search_education_employment();
590            break;
591        case 'essentialss':
592            search_essentials();
593            break;
594        case 'arts_music':
595            search_arts_music();
596            break;
597        case 'health_wellness':
598            search_health_wellness();
599            break;
600        case 'experiences':
601            search_experiences();
602            break;
603        case 'just_for_fun':
604            search_just_for_fun();
605            break;
606        case 'home_living':
607            search_home_living();
608            break;
609        case 'clothing_shoes':
610            search_clothing_shoes();
611            break;
612        default:
613            console.log("Unknown category: " + slug);
614    }
615}
616</script>
616
617
618<!-- Love-Hope-Joy-Delivered -->
619  <div class="our-impact love-joy-sec">
620    <div class="container">
621      <div class="blue-bg">
622        <h2>Love. Hope. Joy. Delivered</h2>
623        <p>One Simple Wish is spreading positivity on the road with our mobile unit. Our Love. Hope. Joy. Delivered program is bringing smiles, kindness, and connection nationwide.</p>
624        <div class="row justify-content-center">
625          <a href="https://www.onesimplewish.org/site/love-hope-joy-delivered" class="btn-primary-outline"> LEARN MORE</a>
626        </div>
627      </div>
628    </div>
629  </div>
630
631    <!-- our-story-section -->
632  <div class="our-story donation-story">
633    <div class="container">
634      <div class="donation">
635        <h4>Donate to Our Mission</h4>
636        <p class="d-none d-sm-block">A donation to One Simple Wish spreads <br> love, hope, and joy to children and young adults impacted <br> by foster care and crisis.</p>
637        <p class="d-block d-sm-none">A donation to One Simple Wish spreads love, hope, and joy to children and young adults impacted<br> by foster care and crisis.</p>
638        <a href="https://www.onesimplewish.org/site/donate" class="btn-success">Donate</a>
639      </div>
640    </div>
641  </div>
642
643  <div class="logoSlider-sec">
644    <!-- As we seen sec -->
645<div class="bottom_panel">
646    <div class="container">
647        <h3>Media & Appearances</h3>
648        <ul class="d-none d-sm-flex">
649        <li>
650           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/cbs_news_logo.png" class="img-responsive" alt="CBS News Logo" />
651        </li>
652        <li>
653           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/cnn_logo.png" class="img-responsive" alt="CNN Logo" />
654        </li>
655        <li>
656           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/csm_logo.png" class="img-responsive" alt="CSM Logo" />
657        </li>
658        <li>
659            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/forbes_logo.png" class="img-responsive" alt="Forbes Logo" />
660        </li>
661        <li class="ms-5">
662            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/good-Housekeeping-logo.png" class="img-responsive" alt="Good Housekeeping Logo" />
663        </li>
664        <li>
665            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/tedx-logo.png" class="img-responsive" alt="TEDx Logo" />
666        </li>
667        <li>
668            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/ion_logo.png" class="img-responsive" alt="ION Logo" />
669        <li>
670           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/martha_stewart_living_logo.png" class="img-responsive" alt="Martha Stewart Living Logo" />
671        </li>
672        <li>
673            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/motherjoneslogo.png" class="img-responsive" alt="Mother Jones Logo" />
674        </li>
675        <li>
676           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nasdaq_Logo.png" class="img-responsive" alt="Nasdaq Logo" />
677        </li>
678        <li>
679           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nnwlh_logo.png" class="img-responsive" alt="NNWLH Logo" />
680        </li>
681        <li>
682            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/newsweek-assets.png" class="img-responsive" alt="Newsweek Logo" />
683        </li>
684        <li>
685            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nightline_logo.png" class="img-responsive" alt="Nightline Logo" />
686        </li>
687        <li>
688            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/the-daily-show-logo.png" class="img-responsive" alt="The Daily Show Logo" />
689        </li>
690        <li>
691            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/womans-world-logo.png" class="img-responsive" alt="Woman's World Logo" />
692        </li>
693        <li>
694           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/wp_logo.png" class="img-responsive" alt="Washington Post Logo" />
695        </li>
696        <li>
697           <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/yahoo_news_logo.png" class="img-responsive" alt="Yahoo News Logo" />
698        </li>
699
700
701        </ul>
702        <div class="mobile-slider d-sm-none">
703            <div class="owl-carousel" id="logoSlider">
704            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/cbs_news_logo.png" class="img-responsive" alt="CBS News Logo" />
705            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/cnn_logo.png"
706                class="img-responsive" alt="CNN Logo" />
707            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/csm_logo.png"
708                class="img-responsive" alt="CSM Logo" />
709            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/forbes_logo.png"
710                class="img-responsive" alt="Forbes Logo" />
711            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/good-Housekeeping-logo.png"
712                class="img-responsive" alt="Good Housekeeping Logo" />
713            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/tedx-logo.png"
714                class="img-responsive" alt="TEDx Logo" />
715            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/ion_logo.png"
716                class="img-responsive" alt="ION Logo" />
717            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/martha_stewart_living_logo.png"
718                class="img-responsive" alt="Martha Stewart Living Logo" />
719            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/motherjoneslogo.png"
720                class="img-responsive" alt="Mother Jones Logo" />
721            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nasdaq_Logo.png"
722                class="img-responsive" alt="Nasdaq Logo" />
723            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nnwlh_logo.png"
724                class="img-responsive" alt="NNWLH Logo" />
725            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/newsweek-assets.png"
726                class="img-responsive" alt="Newsweek Logo" />
727            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/nightline_logo.png"
728                class="img-responsive" alt="Nightline Logo" />
729            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/the-daily-show-logo.png"
730                class="img-responsive" alt="The Daily Show Logo" />
731            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/womans-world-logo.png"
732                class="img-responsive" alt="Woman's World Logo" />
733            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/wp_logo.png"
734                class="img-responsive" alt="Washington Post Logo" />
735            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/yahoo_news_logo.png"
736                class="img-responsive" alt="Yahoo News Logo" />
737            </div>
738        </div>
739    </div>
740</div>  </div>
741
742<div id="signupModal" class="modal" tabindex="-1">
743  <div class="modal-dialog">
744    <div class="modal-content">
745      <div class="modal-header">
746        <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
747          <span aria-hidden="true">&times;</span>
748        </button>
749      </div>
750      <div class="modal-body">
751      </div>
752      <div class="modal-footer">
753        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
754      </div>
755    </div>
756  </div>
757</div>
758<script src="https://www.onesimplewish.org/js/donation.js?version=9"></script>
vendor: 1 bytes, line 758
758
759<script>
760var redirect_url = 'https://www.onesimplewish.org/wish/wish-grant';
761const prefix = window.location.pathname + 'wish/wish-grant';
762function resetfilter(){
763    window.localStorage.setItem(`${prefix}_wish_category`, '');
764    window.localStorage.setItem(`${prefix}_wish_tags`, '');
765    window.localStorage.setItem(`${prefix}_admin_tags`, '');
766    window.localStorage.setItem(`${prefix}_wish_gender`, '');
767    window.localStorage.setItem(`${prefix}_state`, '');
768    window.localStorage.setItem(`${prefix}_price_min`, '');
769    window.localStorage.setItem(`${prefix}_price_max`, '');
770    window.localStorage.setItem(`${prefix}_age_min`, '');
771    window.localStorage.setItem(`${prefix}_age_max`, '');
772    window.localStorage.setItem(`${prefix}_adoption_available`, '');
773    window.localStorage.setItem(`${prefix}_granted_wishes`, '');
774    window.localStorage.setItem(`${prefix}_community_partner`, '');
775    window.localStorage.setItem(`${prefix}_page`, '');
776    window.localStorage.setItem(`${prefix}_keyword_search`, '');
777    window.localStorage.setItem(`${prefix}_sort_by`, '');
778    window.localStorage.setItem(`${prefix}_sorts`, '');
779    window.localStorage.setItem(`${prefix}_price_range`, '');
780    window.localStorage.setItem(`${prefix}_age_range`, '');
781}
782function search_price_range(){
783    resetfilter();
784    window.localStorage.setItem(`${prefix}_price_min`, '1');
785    window.localStorage.setItem(`${prefix}_price_max`, '99');
786    window.localStorage.setItem(`${prefix}_price_range`, '0-24,25-49,50-99');
787    window.localStorage.setItem('activeCategory','under_100');
788    priceurl="https://www.onesimplewish.org/wish/wish-grant?wishes=under_100";
789    window.location.href = priceurl;      
790}
791function search_longetest_wish(){
792    resetfilter();
793    window.localStorage.setItem(`${prefix}_sort_by`, 'longest_waiting');
794    window.localStorage.setItem('activeCategory','longest-waiting-wishes');
795    longesturl="https://www.onesimplewish.org/wish/wish-grant?wishes=longest-waiting-wishes";
796    window.location.href = longesturl;      
797}
798function search_birthday_wish(){
799    resetfilter();
800    window.localStorage.setItem(`${prefix}_wish_tags`, '1');
801    window.localStorage.setItem('activeCategory','birthday');
802    birthdayurl="https://www.onesimplewish.org/wish/wish-grant?wishes=birthday";
803    window.location.href = birthdayurl;      
804}
805function search_education_employment(){
806    resetfilter();
807    window.localStorage.setItem(`${prefix}_wish_category`,'2');
808    window.localStorage.setItem('activeCategory','education-and-employment');
809    educationurl="https://www.onesimplewish.org/wish/wish-grant?wishes=education-and-employment";
810    window.location.href = educationurl;      
811}
812function time_sensitive_wish(){
813    resetfilter();
814    window.localStorage.setItem(`${prefix}_wish_tags`, '3');
815    window.localStorage.setItem('activeCategory','time_sensitive');
816    tsurl="https://www.onesimplewish.org/wish/wish-grant?wishes=time_sensitive";
817    window.location.href = tsurl;        
818}
819function search_essentials(){
820    resetfilter();
821    window.localStorage.setItem(`${prefix}_wish_category`,'6');
822    window.localStorage.setItem('activeCategory','essentialss');
823    essentials="https://www.onesimplewish.org/wish/wish-grant?wishes=essentialss";
824    window.location.href = essentials;      
825}
826function search_arts_music(){
827    resetfilter();
828    window.localStorage.setItem(`${prefix}_wish_category`,'1');
829    window.localStorage.setItem('activeCategory','arts_music');
830    artsmusic="https://www.onesimplewish.org/wish/wish-grant?wishes=arts_music";
831    window.location.href = artsmusic;      
832}
833
834function search_health_wellness(){
835    resetfilter();
836    window.localStorage.setItem(`${prefix}_wish_category`,'3');
837    window.localStorage.setItem('activeCategory','health_wellness');
838    healthwellness="https://www.onesimplewish.org/wish/wish-grant?wishes=health_wellness";
839    window.location.href = healthwellness;      
840}
841
842function search_experiences(){
843    resetfilter();
844    window.localStorage.setItem(`${prefix}_wish_category`,'4');
845    window.localStorage.setItem('activeCategory','experiences');
846    experiences="https://www.onesimplewish.org/wish/wish-grant?wishes=experiences";
847    window.location.href = experiences;      
848}
849
850function search_just_for_fun(){
851    resetfilter();
852    window.localStorage.setItem(`${prefix}_wish_category`,'5');
853    window.localStorage.setItem('activeCategory','just_for_fun');
854    fun="https://www.onesimplewish.org/wish/wish-grant?wishes=just_for_fun";
855    window.location.href = fun;      
856}
857function search_home_living(){
858    resetfilter();
859    window.localStorage.setItem(`${prefix}_wish_category`,'7');
860    window.localStorage.setItem('activeCategory','home_living');
861    homeLiving="https://www.onesimplewish.org/wish/wish-grant?wishes=home_living";
862    window.location.href = homeLiving;      
863}
864function search_clothing_shoes(){
865    resetfilter();
866    window.localStorage.setItem(`${prefix}_wish_category`,'8');
867    window.localStorage.setItem('activeCategory','clothing_shoes');
868    clothingShoes="https://www.onesimplewish.org/wish/wish-grant?wishes=clothing_shoes";
869    window.location.href = clothingShoes;      
870}
871</script>
871
872
873<!-- FOR AI SHOPPER -->
874   <!-- Floating Bea Button with Chat Bubble -->
875    <div class="floating-bea-container">
876        <div class="chat-bubble" id="chatBubble">
877            Hi! I'm Bea. Let me help you find wishes to grant!
878        </div>    
879        <button  class="floating-bea" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
880            <div class="pulse-ring"></div>
881            <div class="bea-icon"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/ai-icon-blue.svg" alt="bea AI" class="img-responsive" /></div>
882        </button>                
883    </div>
884    <div class="wishAssistantModal modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
885        <div class="modal-dialog">
886            <div class="modal-content h-100">
887            <div class="modal-header">
888                <div class="modal-header-left">
889                    <div class="bea-avatar"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/ai-icon-blue.svg" alt="bea AI" class="img-responsive" />
890                    </div>
891                    <div class="bea-name-section">
892                        <div class="bea-name">Bea <span>(Beta)</span></div>
893                        <div class="bea-subtitle">The Wish Assistant</div>
894                    </div>
895                </div>
896               <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
897                <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/close-red.svg" class="img-responsive" alt="close icon" />
898               </button>
899            </div>
900             <!-- Control Notice -->
901            <div class="control-notice">
902                <button class="btn btn-back" id="backBtn"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/large-arrow-left.svg" /> <span>Back</span> </button>
903                <p class="control-notice-text">
904                    You're always in control. Nothing is finalized until checkout.
905                    <button class="learn-more-btn" onclick="toggleLearnMore()">
906                        <span>Learn More</span>
907                        <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/right-angle.svg" alt="right angle icon"/>
908                    </button>
909                </p>
910                <div class="learn-more-content" id="learnMoreContent">
911                    <ul>
912                        <li>Bea understands your preferences and matches you with meaningful wishes.</li>
913                        <li>Your data is private and secure</li>
914                        <li>No charges occur until you complete checkout</li>
915                        <li>You can adjust or cancel at any time before finalizing</li>
916                    </ul>
917                </div>
918            </div>
919
920           <div class="modal-body" id="modalBody">
921                
922                <!-- Screen 1: Welcome -->
923                <div class="screen active h-100" id="welcomeScreen">
924                    <div class="welcome-content h-100">
925                        <div class="welcome-icon">
926                            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/ai-icon-blue.svg" class="img-responsive" alt="al icon" />
927                        </div>
928                        <h2 class="welcome-title mb-2">Hi, I'm Bea!</h2>
929                        <p class="welcome-text mb-3">
930                            I'd love to help you find some wishes to grant.<br>
931                            Together, we'll discover meaningful ways to make a difference.
932                        </p>
933                        <button class="btn-primary primaryBtnOrg" onclick="goToPromptScreen()">Let's Get Started</button>
934                    </div>
935                </div>
936                <!-- Screen 2: Prompt Input -->
937                <div class="screen" id="promptScreen">                    
938                   <h3 class="prompt-section-title">What kind of wishes are you looking for?</h3>                    
939                    <div class="input-wrapper">
940                        <div class="position-relative">
941                        <textarea class="prompt-input" id="userPrompt" placeholder="Bea understands your preferences for [Categories of wish], [Location] and age of recipients"></textarea>
942                        <button class="voice-icon-btn" id="startStopBtn" title="Voice input"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/mic.svg" class="micIcon" alt="mic icon"/></button>
943                        </div>
944                       <div style="display: flex; align-items: center;">
945                            <div class="text-danger" id="error"></div>
946                            <div class="text-end ms-auto" id="charCount">0/500</div>
947                        </div>
948                    </div>
949                    <div class="prompt-header">
950                        <span class="prompt-header-icon"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/bulb.svg" class="img-responsive" alt="bulb icon"/></span>
951                        <h3 class="prompt-section-title">Try these examples (click to use)</h3>
952                    </div>
953                    <div class="sample-prompts">
954                        <div class="prompt-chips">
955                            <button class="chip" onclick="selectPrompt(this)">I have $250 to donate toward the highest priority wishes</button><button class="chip" onclick="selectPrompt(this)">I would like to find a wish under $300 that marks a graduation, promotion, or achievement</button><button class="chip" onclick="selectPrompt(this)">I want to donate $2,000 for any wishes from kids ages 5-10</button><button class="chip" onclick="selectPrompt(this)">I want to grant the wish that has been waiting the longest</button>                        </div>
956                    </div>
957                    <div class="action-buttons"><button class="btn-primary primaryBtnOrg" onclick="parseWishRequest()" id="submitBtn">Find Wishes</button></div>
958                </div>
959
960                <!-- Screen 3: Loading -->
961                <div class="screen h-100" id="loadingScreen" style="display:none">
962                    <div class="loading h-100">
963                        <div class="loading-spinner"></div>
964                        <div class="loading-text">Finding perfect wishes for you...</div>
965                    </div>
966                    <form id="aiWishFilterForm">
967                        <input type="hidden" id="mainDonation" name="main_donation" value="2500">
968                        <input type="hidden" id="minPrice" name="min_price" value="">
969                        <input type="hidden" id="maxPrice" name="max_price" value="">
970                        <input type="hidden" id="minAge" name="min_age" value="">
971                        <input type="hidden" id="maxAge" name="max_age" value="">
972                        <input type="hidden" id="categories" name="categories">
973                        <input type="hidden" id="states" name="states">
974                        <input type="hidden" id="city" name="city" value="">
975                        <input type="hidden" id="zipcode" name="zipcode" value="">
976                        <input type="hidden" id="tags" name="tags">
977                        <input type="hidden" id="longestWaiting" name="longestWaiting" value="0">
978                        <input type="hidden" id="sortBy" name="sortBy" value="0">
979                        <input type="hidden" id="wishCount" name="wishCount" value="">
980                        <input type="hidden" id="lgbtq" name="lgbtq" value="">
981                        <input type="hidden" id="gender" name="gender" value="">
982                        <input type="hidden" id="keywords" name="keywords" value="">
983                        <input type="hidden" id="similarKeywords" name="similar_keywords" value="">
984                    </form>
985                </div>
986                <!-- Screen 4: Results -->
987                <div class="screen" id="resultsScreen">
988                    <div class="results-container">
989                        <!-- Sticky Header -->
990                        <div class="results-header">
991                            <div class="results-count" id="matchCount"><span id="total-wish-cnt"></span> Wishes Matched</div>
992                            
993                            <div class="result-edit">
994                                <div class="results-total" id="totalValue">Wishes Total: <span>$</span><span id="total-wish-amt"></span></div>
995                                <button class="editIcon" data-bs-toggle="tooltip" data-bs-placement="top" title="Want to donate a specific amount?"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/edit-blueicon.svg" /></button>
996                            </div>
997                        </div>
998                        <div class="prompt-edit">
999                            <button class="promptBack btn-back" id="backBtnPrompt" data-bs-toggle="tooltip" data-bs-placement="top" title="Want to edit this prompt?"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/edit-blueicon.svg" /></button>
1000                            <span id="originalPrompt"></span>
1001                        </div>
1002                        <div class="wishes-list-wrapper">
1003                            <div class="wishes-list" id="automated-wish-details">
1004                                <!-- Wishes will be dynamically loaded here -->
1005                            </div>                            
1006                        </div>
1007                        <div class="moreWishesActions">
1008                            <div class="btnLeft">
1009                                <button class="btn-link btn load-less-btn" onclick="loadLess(event)"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/minus-blue.svg" /> Remove Wishes</button>
1010                                <button class="btn-link btn load-more-btn" onclick="loadMore(event)"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/add-blue.svg" /> Add Wishes</button>
1011                            </div>                                
1012                        </div>
1013                        <div class="specificDonationSec">
1014                            <!-- <label class="form-label fw-semibold mt-3">Donation Amount</label> -->
1015                            <div class="input-group mb-3">
1016                                <span class="input-group-text">$</span>
1017                                <input type="text" name="donation_amount" id="donateAmount" class="form-control" value="" onkeypress="return event.charCode >= 48 &amp;&amp; event.charCode <= 57" maxlength="10" placeholder="">
1018                            </div>
1019                        </div>
1020                        <div class="totalDonationsCard">
1021                            <div class="d-flex justify-content-between mb-2">
1022                                <label>Wishes Total</label>
1023                                <strong id="wishesTotal"></strong>
1024                            </div>
1025                            <div class="d-flex justify-content-between mb-2">
1026                                <label>Donate to OSW's mission</label>
1027                                <div class="totalValueEdit">
1028                                    <div class="totalValueLeftSec">
1029                                        <button class="generalEditIcon"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/edit-blueicon.svg" /></button>
1030                                    </div>
1031                                    <strong id="generalFund"></strong>
1032                                </div>
1033                            </div>
1034                            <div class="d-flex mt-2 justify-content-between fw-bold align-items-center totalDonation">
1035                                <label class="fs-6">Total Donation</label>
1036                                <div class="totalValueEdit">
1037                                    <div class="totalValueLeftSec">
1038                                        <span>Want to donate a specific amount?</span>
1039                                        <button class="editIcon"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/1simplewish/img/edit-blueicon.svg" /></button>
1040                                    </div>
1041                                    <strong id="donationTotal" class="fs-6"></strong>
1042                                </div>
1043                            </div>
1044                        </div>
1045                        <!-- Sticky Action Buttons -->
1046                        <div class="action-buttons">
1047                            <button class="btn-primary primaryBtnOrg" id="proceedCheckout">Proceed to Checkout</button>
1048                        </div>
1049                    </div>
1050                </div>
1051              </div>        
1052            </div>
1053        </div>
1054    </div>
1055<script>
1056let recognition;
1057let recording = false;
1058let chatBubbleTimeout;
1059let currentWishIds = [];
1060let finalTranscript = '';
1061let silenceTimer;
1062const AI_DONATION_AMT = "2500";
1063let totals = { wishes: 0, general: 0, total: 0};
1064// Auto-show chat bubble on page load
1065window.addEventListener('load', function() {
1066    const chatBubble = document.getElementById('chatBubble');
1067    // Show bubble after 1 second
1068    setTimeout(() => { chatBubble.classList.add('visible');}, 1000);
1069    // Hide bubble after 5 seconds
1070    chatBubbleTimeout = setTimeout(() => { chatBubble.classList.remove('visible');}, 6000);
1071    // Add class
1072    $('.floating-bea').addClass('active');
1073    // Remove after 1 second (1000ms)
1074    setTimeout(function() { $('.floating-bea').removeClass('active');}, 6000);
1075});
1076$(".specificAmount").click(function(){ $(".specificDonationSec").toggle();});
1077function resetToWelcome() { showScreen('welcomeScreen');}
1078function showScreen(screenId) {
1079    document.querySelectorAll('.screen').forEach(screen => { screen.classList.remove('active');});
1080    document.getElementById(screenId).classList.add('active');
1081    document.getElementById('modalBody').scrollTop = 0;
1082}
1083
1084function toggleLearnMore() {
1085    const content = document.getElementById('learnMoreContent');
1086    const button = document.querySelector('.learn-more-btn');
1087    const spanText = button.querySelector('span');
1088    content.classList.toggle('visible');
1089    if (content.classList.contains('visible')) {
1090        button.classList.add('expanded');
1091        spanText.textContent = 'Learn Less';
1092    } else {
1093        button.classList.remove('expanded');
1094        spanText.textContent = 'Learn More';
1095    }
1096}
1097// Close when clicking outside
1098document.addEventListener('click', function (event) {
1099    const content = document.getElementById('learnMoreContent');
1100    const button = document.querySelector('.learn-more-btn');
1101    const spanText = button.querySelector('span');
1102    // Check if click is outside both content and button
1103    if(content.classList.contains('visible') && !content.contains(event.target) && !button.contains(event.target)) {
1104        content.classList.remove('visible');
1105        button.classList.remove('expanded');
1106        spanText.textContent = 'Learn More';
1107    }
1108});
1109$(document).ready(function () {
1110    let oldDonationValue = 0;
1111    $('.editIcon').on('click', function () {
1112        let currentValue = $('#donationTotal').text().replace(/[^0-9.]/g, '');
1113        oldDonationValue = parseFloat(currentValue) || 0;
1114        $('#donationTotal').replaceWith('<input type="text" step="0.01" min="10" max="100000" id="donationTotalInput" onkeypress="return event.charCode >= 48 && event.charCode <= 57" class="form-control" value="'+ currentValue +'" />');
1115        $('#proceedCheckout').prop('disabled', true);
1116        $('#donationTotalInput').focus().select();
1117    });
1118    // FUNCTION TO SAVE VALUE
1119    function saveDonationValue(input) {
1120        let value = $(input).val().replace(/,/g, '');
1121        value = parseFloat(value) || 0;
1122        if (value < 10) {
1123            showAlert('error', 'Donation amount must be at least $10', '', 'OK');
1124            value = 10;
1125        }
1126        if (value > 100000) {
1127            showAlert('error', 'Donation amount cannot exceed $100,000', '', 'OK');
1128            value = 100000;
1129        }
1130        $('#donateAmount').val(value);
1131        let formatted = '$' + value.toLocaleString(undefined,{ minimumFractionDigits: 0 });
1132        $(input).replaceWith('<strong id="donationTotal" class="fs-6">' + formatted + '</strong>');
1133        $('#proceedCheckout').prop('disabled', false);
1134        //Only call API if value changed
1135        if (value !== oldDonationValue){ 
1136            $('#wishCount').val('');
1137            runWishSearch();
1138        }
1139    }
1140    // ENTER or TAB
1141    $(document).on('keydown', '#donationTotalInput', function (e) {
1142        if (e.key === 'Enter' || e.key === 'Tab') {
1143            e.preventDefault();
1144            saveDonationValue(this);
1145        }
1146    });
1147    // CLICK OUTSIDE
1148    $(document).on('blur', '#donationTotalInput', function () {
1149        saveDonationValue(this);
1150    });
1151    // CLICK EDIT (GENERAL FUND)
1152    let isSavingGeneral = false;
1153    $('.generalEditIcon').on('click', function () {
1154        let currentValue = $('#generalFund').text().replace(/[^0-9]/g, '');
1155        oldGeneralValue = parseFloat(currentValue) || 0;
1156        $('#generalFund').replaceWith('<input type="text" maxlength="5" id="generalFundInput" onkeypress="return event.charCode >= 48 && event.charCode <= 57" class="form-control" value="' + currentValue + '" />');
1157        $('#generalFundInput').focus().select();
1158    });
1159    // SAVE GENERAL FUND VALUE
1160    function saveGeneralValue(input) {
1161        if (isSavingGeneral) return;
1162        isSavingGeneral = true;
1163        if (!$(input).length || !document.body.contains(input)) {
1164            isSavingGeneral = false;
1165            return;
1166        }
1167        let value = $(input).val().replace(/[^0-9]/g, '');
1168        value = value === '' ? 0 : parseInt(value);
1169        if(value > 100000) {
1170            showAlert('error', 'Donation amount cannot exceed $100,000', '', 'OK');
1171            value = 100000;
1172        }
1173        totals.general = value;
1174        let formatted = '$' + value.toLocaleString();
1175        $(input).replaceWith('<strong id="generalFund">' + formatted + '</strong>');
1176        totals.total = totals.wishes + totals.general;
1177        updateTotalsUI();
1178        setTimeout(() => { isSavingGeneral = false;}, 0);
1179    }
1180    // ENTER / TAB
1181    $(document).on('keydown', '#generalFundInput', function (e) {
1182        if (e.key === 'Enter' || e.key === 'Tab') {
1183            e.preventDefault();
1184            saveGeneralValue(this);
1185        }
1186    });
1187    // BLUR
1188    $(document).on('blur', '#generalFundInput', function () {
1189        saveGeneralValue(this);
1190    });
1191    //MANAGE FOR CLOSE ICON CLEAR DATA
1192    var $modal = $('#staticBackdrop');
1193    $modal.on('hidden.bs.modal', function(){ resetModalData($modal);});
1194    function resetModalData($modalEl){
1195        const mic= SITE_URL + "vendor/codefire/cfusermgmt/web/1simplewish/img/mic.svg";
1196        if (!$modalEl.length) return;
1197        $modalEl.find('#userPrompt').val('');
1198        $modalEl.find('.prompt-chips .chip').removeClass('active');
1199        $modalEl.find('#aiWishFilterForm input[type="hidden"]').val('');
1200        $modalEl.find('#donateAmount').val('');
1201        $modalEl.find('#automated-wish-details').html('');
1202        $modalEl.find('#total-wish-amt').text('');
1203        $modalEl.find('#total-wish-cnt').text('');
1204        $modalEl.find('#donationTotal').text('');
1205        $('#error').text('');
1206        $('#startStopBtn').removeClass('listening').html(`<img src="${mic}" class="micIcon">`);
1207        if(recording && recognition){
1208            recording = false;
1209            recognition.stop();
1210        }
1211        // Reset screens: show welcome, hide others
1212        $modalEl.find('.screen').removeClass('active');
1213        $modalEl.find('.screen').first().addClass('active');
1214        $('#resultsScreen').hide();
1215        $('#backBtn').hide();
1216        // Hide loading screen if visible
1217        $modalEl.find('#loadingScreen').hide();
1218    }
1219});
1220
1221function goToPromptScreen() { showScreen('promptScreen');}
1222//For char count
1223const textarea = document.getElementById("userPrompt");
1224const charCount = document.getElementById("charCount");
1225const MAX_LENGTH = 500;
1226function updateCounter() {
1227  const len = textarea.value.length;
1228  charCount.textContent = `${len}/${MAX_LENGTH}`;
1229}
1230function selectPrompt(element, event) {
1231  textarea.value = element.textContent;
1232  if (textarea.value.length > MAX_LENGTH) {
1233    textarea.value = textarea.value.substring(0, MAX_LENGTH);
1234  }
1235  document.querySelectorAll(".chip").forEach(chip => { chip.classList.remove("active");});
1236  element.classList.add("active");
1237  updateCounter();
1238}
1239// live typing counter + limit
1240textarea.addEventListener("input", function () {
1241  if (textarea.value.length > MAX_LENGTH) {
1242    textarea.value = textarea.value.substring(0, MAX_LENGTH);
1243  }
1244  updateCounter();
1245});
1246let isLoadingLess = false;
1247function loadLess(event) {
1248    if (isLoadingLess) {
1249        console.log('Load Less is already in progress. Ignoring duplicate click.');
1250        return;
1251    }
1252    isLoadingLess = true;
1253    const totalItems = $('.wish-item').length;
1254    if (totalItems < 3) {
1255        isLoadingLess = false;
1256        showAlert('warning', 'You need at least a few wishes to continue!', '', 'OK');
1257        return;
1258    }
1259    const itemsToRemove = $('.wish-item').slice(-2);
1260    const promises = [];
1261    const idsToRemove = [];
1262    let totalRemoveAmount = 0;
1263    const button = event ? $(event.target) : $('.load-less-btn');
1264    const img = button.find('img');
1265    button.prop('disabled', true);
1266    img.addClass('fa-spinner fa-spin');
1267    img.attr('src', SITE_URL + 'vendor/codefire/cfusermgmt/web/1simplewish/img/refresh.svg');
1268    itemsToRemove.each(function() {
1269        const row = $(this);
1270        const wid = row.data('wish-id');
1271        const amount = parseFloat(row.data('amount')) || 0;
1272        idsToRemove.push(wid);
1273        totalRemoveAmount += amount;
1274        promises.push($.post(SITE_URL + 'cart/cart/add-wishes', {wid: wid, ischeck: 0, _csrf: yii.getCsrfToken()}));
1275    });
1276    if (promises.length > 0) {
1277        Promise.all(promises)
1278            .then(() => {
1279                isLoadingLess = false;
1280                totals.wishes -= totalRemoveAmount;
1281                // totals.general += totalRemoveAmount;
1282                totals.total -= totalRemoveAmount;
1283                // Remove from DOM
1284                $('.wish-item').filter(function(){ return idsToRemove.includes($(this).data('wish-id'));}).remove();
1285                // Update tracking
1286                currentWishIds = currentWishIds.filter(id => !idsToRemove.includes(id));
1287                updateTotalsUI();
1288            })
1289            .catch(() => {
1290                isLoadingLess = false;
1291                console.error('Error removing wishes from cart');
1292            })
1293            .finally(() => {
1294                isLoadingLess = false;
1295                button.prop('disabled', false);
1296                img.attr('src', SITE_URL + 'vendor/codefire/cfusermgmt/web/1simplewish/img/minus-blue.svg').removeClass('fa-spinner fa-spin');
1297            });
1298    }
1299}
1300function loadMore(event) {
1301    const currentFilters = collectWishFilters();
1302    const remaining = 2500 - (totals.total || 0);
1303    const postData = {
1304        ...currentFilters,
1305        max_amount: remaining,
1306        exclude_ids: currentWishIds,
1307        limit: 2,
1308        _csrf: yii.getCsrfToken()
1309    };
1310    // Optional: Disable button during load
1311    const loadMoreBtn = event ? $(event.target) : $('.load-more-btn');
1312    loadMoreBtn.prop('disabled', true);
1313    const img = loadMoreBtn.find('img');
1314    img.addClass('fa-spinner fa-spin');
1315    img.attr('src', SITE_URL + 'vendor/codefire/cfusermgmt/web/1simplewish/img/refresh.svg');
1316    $.ajax({
1317        url: SITE_URL + 'wish/get-more-wishes',
1318        type: 'POST',
1319        data: postData,
1320        success: function(res) {
1321            if (res.success && res.wishes && res.wishes.length > 0) {
1322                let newHtml = '';
1323                const promises = [];
1324                let totalNewAmount = 0;
1325                res.wishes.forEach(w => {
1326                    const child = w.child || {};
1327                    const childName = child.display_name?.trim() || [child.first_name, child.last_name].filter(Boolean).join(' ') || 'Child';
1328                    const amount = parseFloat(w.estimated_value) || 0;
1329                    newHtml += `
1330                    <div class="wish-item" data-wish-id="${w.id}" data-amount="${amount}">
1331                        <div class="wish-left">
1332                            <div class="wish-title"><a href="${SITE_URL}wish/view-wish?id=${w.id}" target="_blank">${w.wish_name}</a></div>
1333                            <div class="wish-subtitle">For ${childName}</div>
1334                        </div>
1335                        <div class="wish-right">
1336                            <div class="wish-amount">$${amount}</div>
1337                            <div class="wish-actions-inline">
1338                                <button class="wish-action-btn refresh refresh-wish" title="Replace wish">
1339                                    <img src="${SITE_URL}vendor/codefire/cfusermgmt/web/1simplewish/img/refresh.svg" class="img-responsive">
1340                                </button>
1341                                <button class="wish-action-btn remove remove-wish" title="Remove wish">
1342                                    <img src="${SITE_URL}vendor/codefire/cfusermgmt/web/1simplewish/img/close-red.svg" class="img-responsive">
1343                                </button>
1344                            </div>
1345                        </div>
1346                    </div>
1347                    `;
1348                    totalNewAmount += amount;
1349                    currentWishIds.push(w.id); // Track immediately
1350                });
1351                if (newHtml) {
1352                    $('#automated-wish-details').append(newHtml);
1353                    /* UPDATE TOTALS HERE */
1354                    totals.wishes += totalNewAmount;
1355                    totals.total += totalNewAmount; 
1356                    updateTotalsUI();
1357                }
1358            } else {
1359                let msgs = res.message || 'No more wishes available';
1360                showAlert('error', msgs, '', 'OK');
1361            }
1362        },
1363        error: function() {
1364            console.error('Error fetching more wishes');
1365            showAlert('error', 'Something went wrong while loading more wishes.', '', 'OK');
1366        },
1367        complete: function() {
1368            isLoadingLess = false;
1369            loadMoreBtn.prop('disabled', false).find('img').attr('src', SITE_URL + 'vendor/codefire/cfusermgmt/web/1simplewish/img/add-blue.svg').removeClass('fa-spinner fa-spin');
1370        }
1371    });
1372}
1373
1374const screens = document.querySelectorAll('#modalBody .screen');
1375const backBtn = document.getElementById('backBtn');
1376const backBtnPrompt = document.getElementById('backBtnPrompt');
1377function showScreen(screenId) {
1378    screens.forEach(screen => { screen.classList.remove('active');});
1379    const activeScreen = document.getElementById(screenId);
1380    activeScreen.classList.add('active');
1381    updateBackButton();
1382}
1383function goNext(currentId, nextId) {
1384    document.getElementById(currentId).classList.remove('active');
1385    document.getElementById(nextId).classList.add('active');
1386    updateBackButton();
1387}
1388function goBack() {
1389    const activeScreen = document.querySelector('#modalBody .screen.active');
1390    const currentIndex = Array.from(screens).indexOf(activeScreen);
1391    if (currentIndex == 1) {
1392        activeScreen.classList.remove('active');
1393        screens[currentIndex - 1].classList.add('active');
1394    }
1395    if (currentIndex > 1) {
1396        activeScreen.classList.remove('active');
1397        screens[currentIndex - 2].classList.add('active');
1398    }
1399    updateBackButton();
1400}
1401function updateBackButton(){
1402    const activeScreen = document.querySelector('#modalBody .screen.active');
1403    if (!activeScreen) {
1404        console.warn('No active screen found in #modalBody .screen.active');
1405        if (backBtn) backBtn.style.display = 'none';
1406        const resultsScreen = document.getElementById('resultsScreen');
1407        if (resultsScreen) resultsScreen.style.display = 'none';
1408        return;
1409    }
1410    const screenId = activeScreen.id;
1411    const resultsScreen = document.getElementById('resultsScreen');
1412    if (resultsScreen){ "resultsScreen"=== screenId? resultsScreen.style.display="block" : resultsScreen.style.display="none";}
1413    if (backBtn){ "welcomeScreen"===screenId ? backBtn.style.display="none" : backBtn.style.display="inline-block";}
1414}
1415// Back button click
1416backBtn.addEventListener('click', goBack);
1417backBtnPrompt.addEventListener('click', goBack);
1418updateBackButton();
1419
1420async function parseWishRequest() {
1421    const prompt = document.getElementById('userPrompt').value.trim();
1422    const submitBtn = document.getElementById('submitBtn');
1423    const promptScreen = document.getElementById('promptScreen');
1424    const loading = document.getElementById('loadingScreen');
1425    const resultsScreen = document.getElementById('resultsScreen');
1426    const error = document.getElementById('error');
1427    // Reset states
1428    error.style.display = 'none';
1429    if (!prompt) {
1430        error.textContent = 'Please enter your wish criteria';
1431        error.style.display = 'block';
1432        return;
1433    }
1434    const online = await isOnline();
1435    if (!online) {
1436        showAlert('error', "You're offline. Please check your internet connection and try again.", '', 'OK');
1437        return;
1438    }
1439    //Reset values for back search
1440    currentWishIds = [];
1441    $('#donateAmount').val('');
1442    $('#automated-wish-details').html('');
1443    $('#total-wish-amt').text('');
1444    $('#total-wish-cnt').text('');
1445    $('#donationTotal').text('');
1446    // Show loading
1447    promptScreen.classList.remove('active');
1448    loading.classList.add('active');
1449    loading.style.display = 'block';
1450    resultsScreen.style.display = 'none';
1451    submitBtn.disabled = true;
1452    const micImg = SITE_URL + "vendor/codefire/cfusermgmt/web/1simplewish/img/mic.svg";
1453    $('#startStopBtn').removeClass('listening').html(`<img src="${micImg}" class="micIcon">`);
1454    if(recording && recognition){
1455        recording = false;
1456        recognition.stop();
1457    }
1458    try {
1459        // Call your PHP API endpoint
1460        const response = await fetch(SITE_URL+"site/parse-wish-request", {
1461            method: 'POST',
1462            headers: {'Content-Type': 'application/json','X-CSRF-Token': yii.getCsrfToken()},
1463            body: JSON.stringify({ prompt: prompt })
1464        });
1465        const data = await response.json();
1466        if (!response.ok) {
1467            throw new Error(data.error || 'Failed to process request');
1468            loading.style.display = 'none';
1469            loading.classList.remove('active');
1470        }
1471        if (data.success) {
1472            $('#originalPrompt').text(data.originalPrompt);
1473            displayResults(data.data);
1474        } else {
1475            throw new Error('Invalid response from server');
1476            loading.style.display = 'none';
1477            loading.classList.remove('active');
1478        }
1479    } catch (err) {
1480        error.textContent = '❌ Error: ' + err.message;
1481        showAlert('error', err.message, '', 'OK');
1482        error.style.display = 'block';
1483        // loading.style.display = 'none';
1484        // loading.classList.remove('active');
1485    } finally {
1486        submitBtn.disabled = false;
1487        submitBtn.textContent = 'Find Wishes';
1488    }
1489}
1490const CATEGORY_MAP = {"Education & Employment": "2","Arts & Music": "1","Health & Wellness": "3","Experiences": "4","Just for Fun": "5","Essentials": "6","Home & Living":"7","Clothing & Shoes":"8"};
1491const TAG_MAP = {birthdayOnly: "1", holiday: "2", timeSensitive: "3"}; 
1492const STATE_CODE_MAP = {"Alabama": "AL","Alaska": "AK","Arizona": "AZ","Arkansas": "AR","California": "CA","Colorado": "CO","Connecticut": "CT","Delaware": "DE","District Of Columbia": "DC","Florida": "FL","Georgia": "GA","Hawaii": "HI","Idaho": "ID","Illinois": "IL","Indiana": "IN","Iowa": "IA","Kansas": "KS","Kentucky": "KY","Louisiana": "LA","Maine": "ME","Maryland": "MD","Massachusetts": "MA","Michigan": "MI","Minnesota": "MN","Mississippi": "MS","Missouri": "MO","Montana": "MT","Nebraska": "NE","Nevada": "NV","New Hampshire": "NH","New Jersey": "NJ","New Mexico": "NM","New York": "NY","North Carolina": "NC","North Dakota": "ND","Ohio": "OH","Oklahoma": "OK","Oregon": "OR","Pennsylvania": "PA","Rhode Island": "RI","South Carolina": "SC","South Dakota": "SD","Tennessee": "TN","Texas": "TX","Utah": "UT","Vermont": "VT","Virginia": "VA","Washington": "WA","West Virginia": "WV","Wisconsin": "WI","Wyoming": "WY","Marshall Islands": "MH","Puerto Rico": "PR","US Virgin Islands": "VI"};
1493function selectStatesFromArray(statesArray){
1494    const codes = Array.isArray(statesArray) ? statesArray.map(name => STATE_CODE_MAP[name.trim()]).filter(Boolean) : [];
1495    $('#states').val(codes.join(','));
1496}
1497function displayResults(data) {
1498    if (data.donationAmount) {
1499        $('#donateAmount').val(data.donationAmount);
1500    }
1501    $('#minAge').val(data.ageMin ?? '');
1502    $('#maxAge').val(data.ageMax ?? '');
1503    $('#minPrice').val(data.wishValueMin ?? '');
1504    $('#maxPrice').val(data.wishValueMax ?? '');
1505    $('#wishCount').val(data.wishCount ?? '');
1506    $('#lgbtq').val(data.lgbtq ?? '');
1507    $('#gender').val(data.gender ?? '');
1508    $('#keywords').val(data.keywords ?? '');
1509    $('#city').val(data.city ?? '');
1510    $('#zipcode').val(data.zipcode ?? '');
1511    let categoryIds = [];
1512    if (Array.isArray(data.categories)){
1513        let categoryIds = data.categories.map(name => CATEGORY_MAP[name]).filter(Boolean);
1514        $('#categories').val(categoryIds.join(','));
1515    }
1516    if (Array.isArray(data.states)){ selectStatesFromArray(data.states);}
1517    let tagIds = [];
1518    Object.keys(TAG_MAP).forEach(key => { if (data[key] === true){ tagIds.push(TAG_MAP[key]);}});
1519    $('#tags').val(tagIds.join(','));
1520    window.longestWaiting = data.longestWaiting ? 1 : 0;
1521    window.sortBy = data.sortBy ? 1 : 0;
1522    const flatArray = Object.values(data.similarKeywords || {}).flat();
1523    $('#similarKeywords').val(JSON.stringify(flatArray));
1524    runWishSearch();
1525}
1526
1527// CALL API FOR Search Wishes
1528function runWishSearch(useMainDonation = false){
1529    let donationAmount = useMainDonation ? Number($('#mainDonation').val()) : Number($('#donateAmount').val().replace(/[^0-9]/g, ''));
1530    if (!donationAmount) {
1531        donationAmount = Number(AI_DONATION_AMT);
1532    }
1533    let categories = $('#categories').val();
1534    let states = $('#states').val();
1535    let tags = $('#tags').val();
1536    let postData = {
1537        donation_amount: donationAmount,
1538        min_price: $('#minPrice').val(),
1539        max_price: $('#maxPrice').val(),
1540        min_age: $('#minAge').val(),
1541        max_age: $('#maxAge').val(),
1542        categories: categories ? categories.split(',') : [],
1543        states: states ? states.split(',') : [],
1544        tags: tags ? tags.split(',') : [],
1545        wish_count: $('#wishCount').val(),
1546        lgbtq: $('#lgbtq').val(),
1547        gender: $('#gender').val(),
1548        city: $('#city').val(),
1549        zipcode: $('#zipcode').val(),
1550        keywords: $('#keywords').val(),
1551        similar_keywords: $('#similarKeywords').val(),
1552        checkoutSource: 1,
1553        follow_child: 0,
1554        longestWaiting: longestWaiting,
1555        sortBy: sortBy,
1556        _csrf: yii.getCsrfToken()
1557    };
1558    $.ajax({url: SITE_URL+'wish/wish-shopper-search',type: 'POST', data: postData,
1559        success: function (res){
1560            if (res.success){
1561                window.currentWishFilters = collectWishFilters();
1562                renderWishReview(res);
1563            } else { $('#wish-list').html('<p class="text-danger text-center">No wishes found.</p>');}
1564        },
1565        error: function (){
1566            $('#automated-wish-details').html('<p class="text-danger text-center">Something went wrong.</p>');
1567        }
1568    });
1569}
1570function collectWishFilters() {
1571    const categories = $('#categories').val();
1572    const states = $('#states').val();
1573    const tags = $('#tags').val();
1574    return {
1575        donation_amount: Number($('#donateAmount').val().replace(/[^0-9]/g, '')),
1576        min_price: $('#minPrice').val(),
1577        max_price: $('#maxPrice').val(),
1578        min_age: $('#minAge').val(),
1579        max_age: $('#maxAge').val(),
1580        categories: categories ? categories.split(',') : [],
1581        states: states ? states.split(',') : [],
1582        tags: tags ? tags.split(',') : [],
1583        wish_count: $('#wishCount').val(),
1584        lgbtq: $('#lgbtq').val(),
1585        gender: $('#gender').val(),
1586        city: $('#city').val(),
1587        zipcode: $('#zipcode').val(),
1588        keywords: $('#keywords').val(),
1589        similar_keywords: $('#similarKeywords').val(),
1590        longestWaiting: longestWaiting,
1591        sortBy: sortBy,
1592    };
1593}
1594function toNumber(val) {
1595    if (val === null || val === undefined) return 0;
1596    return parseFloat(String(val).replace(/,/g, '')) || 0;
1597}
1598
1599// RENDER WISH REVIEW
1600function renderWishReview(res){
1601    let wishHtml = '';
1602    // Detect if already has wishes on screen
1603    const hasExistingWishes = $('#automated-wish-details .wish-item').length > 0;
1604    if (!hasExistingWishes) {
1605        totals.wishes = totals.general = totals.total = 0;
1606    }
1607    // totals.wishes  = parseFloat(res.used_amount)   || 0;
1608    // totals.general = parseFloat(res.general_fund)  || 0;
1609    // totals.total   = totals.wishes + totals.general;
1610    const loadingScreen = document.getElementById('loadingScreen');
1611    // Show suggestions first
1612    if (res.suggestions && res.suggestions.length > 0) {
1613        wishHtml = '<div class="suggestions text-center mt-2"><h6 class="text-primary">You may also consider the following suggestion(s):</h6><div class="suggestions-list mt-2 pb-2 text-center">';
1614            res.suggestions.forEach(function(sugg, index) {
1615                const paramsJson = JSON.stringify(sugg.params);
1616                wishHtml += `<div><a href="javascript:void(0)" class="suggestion-btn d-block text-decoration-underline" data-params='${paramsJson}'>${sugg.label}</a></div>`;
1617            });
1618        wishHtml += '</div></div>';
1619    }
1620    // Show wishes after suggestions
1621    if (res?.wishes?.length) {
1622        let newWishTotal = 0;
1623        res.wishes.forEach(w => {
1624            const child = w.child || {};
1625            const childName = child.display_name?.trim() || [child.first_name, child.last_name].filter(Boolean).join(' ') || 'Child';
1626            const amount = parseFloat(w.estimated_value) || 0;
1627            newWishTotal += amount;
1628            wishHtml += `
1629            <div class="wish-item" data-wish-id="${w.id}" data-amount="${amount}">
1630                <div class="wish-left">
1631                    <div class="wish-title"><a href="${SITE_URL}wish/view-wish?id=${w.id}" target="_blank"> ${w.wish_name}</a></div>
1632                    <div class="wish-subtitle">For ${childName}</div>
1633                </div>
1634                <div class="wish-right">
1635                    <div class="wish-amount">$${amount}</div>
1636                    <div class="wish-actions-inline">
1637                        <button class="wish-action-btn refresh refresh-wish" title="Replace wish">
1638                            <img src="${SITE_URL}vendor/codefire/cfusermgmt/web/1simplewish/img/refresh.svg" class="img-responsive">
1639                        </button>
1640                        <button class="wish-action-btn remove remove-wish" title="Remove wish">
1641                            <img src="${SITE_URL}vendor/codefire/cfusermgmt/web/1simplewish/img/close-red.svg" class="img-responsive">
1642                        </button>
1643                    </div>
1644                </div>
1645            </div>
1646            `;
1647        });
1648        currentWishIds = res.wishes.map(w => w.id);
1649        // Append totals instead of reset
1650        totals.wishes += newWishTotal;
1651        totals.general += parseFloat(res.general_fund) || 0;
1652        totals.total = totals.wishes + totals.general;
1653    } else if (!res.suggestions?.length) {
1654        wishHtml = '<div class="text-center text-danger py-3">No wishes matched your criteria. Try broadening your search.</div>';
1655    }
1656    //Set condition based:
1657    if (currentWishIds) $('.suggestions').hide();
1658    $('#automated-wish-details')[currentWishIds ? 'append' : 'html'](wishHtml);
1659    //For filter set available default - used
1660    const mainDonation = Number(res.main_donation) || 0;
1661    const usedAmount   = Number(res.used_amount) || 0;
1662    const availableSearch = Math.max(0, mainDonation - usedAmount);
1663    $('#mainDonation').val(availableSearch);
1664
1665    // $('#automated-wish-details').html(wishHtml);
1666    updateTotalsUI();
1667    loadingScreen.style.display = 'none';
1668    loadingScreen.classList.remove('active');
1669    $('#promptScreen').removeClass('active');
1670    $('#resultsScreen').addClass('active');
1671    $('#resultsScreen').show();
1672    // Event listener for suggestions
1673    if (res.suggestions && res.suggestions.length > 0) {
1674        $(document).off('click', '.suggestion-btn').on('click', '.suggestion-btn', applySuggestion);
1675    }
1676}
1677// UPDATE TOTAL UI
1678function updateTotalsUI() {
1679    $('#wishesTotal').text(`$${totals.wishes}`);
1680    $('#generalFund').text(`$${totals.general}`);
1681    $('#donationTotal').text(`$${totals.total.toLocaleString()}`);
1682    $('#donateAmount').val(totals.total);
1683    $('#total-wish-amt').text(totals.wishes.toLocaleString());
1684    $('#total-wish-cnt').text($('.wish-item').length);
1685}
1686//Set Suggestions
1687function applySuggestion(event) {
1688    const btn = $(event.target).closest('.suggestion-btn');
1689    if (!btn.length) return;
1690    btn.prop('disabled', true).text('Searching...');
1691    const paramsStr = btn.attr('data-params');
1692    const params = JSON.parse(paramsStr);
1693    // Update fields
1694    if (params.hasOwnProperty('min_price')) $('#minPrice').val(params.min_price || '');
1695    if (params.hasOwnProperty('max_price')) $('#maxPrice').val(params.max_price || '');
1696    if (params.hasOwnProperty('min_age')) $('#minAge').val(params.min_age || '');
1697    if (params.hasOwnProperty('max_age')) $('#maxAge').val(params.max_age || '');
1698    if (params.hasOwnProperty('city')) $('#city').val(params.city || '');
1699    if (params.hasOwnProperty('tags')) $('#tags').val(params.tags || []);
1700    if (params.hasOwnProperty('categories')) $('#categories').val(params.categories || []);
1701    if (params.hasOwnProperty('keywords')) $('#keywords').val(params.keywords || []);
1702    if (params.hasOwnProperty('similar_keywords')) $('#similarKeywords').val(params.similar_keywords || [])
1703    runWishSearch(true);
1704}
1705// REMOVE WISH
1706$(document).on('click', '.remove-wish', function () {
1707    const row = $(this).closest('.wish-item');
1708    if (row.data('busy')) return;
1709    row.data('busy', true);
1710    const wid = row.data('wish-id');
1711    const amount = parseFloat(row.data('amount'));
1712    $.post(SITE_URL + 'cart/cart/add-wishes', { wid, ischeck: 0 })
1713        .done(() => {
1714            row.remove();
1715            totals.wishes -= amount;
1716            // totals.general += amount;
1717            totals.total -= amount;
1718            updateTotalsUI();
1719        })
1720        .always(() => row.data('busy', false));
1721});
1722// REFRESH / REPLACE WISH
1723$(document).on('click', '.refresh-wish', function () {
1724    const icon = $(this);
1725    const img = icon.find('img'); 
1726    const row = icon.closest('.wish-item');
1727    if (row.data('busy')) return;
1728    row.data('busy', true);
1729    img.addClass('fa-spinner fa-spin');
1730    const currentId = row.attr('data-wish-id');
1731    const currentAmount = parseFloat(row.attr('data-amount')) || 0;
1732    const maxAmount = totals.general + currentAmount;
1733    const excludeIds = $('.wish-item').map((_, el) => $(el).attr('data-wish-id')).get();
1734    $.post(SITE_URL + 'wish/replace-wish', {
1735        current_id: currentId,
1736        max_amount: maxAmount,
1737        exclude_ids: excludeIds,
1738        filters: window.currentWishFilters || {},
1739        _csrf: yii.getCsrfToken()
1740    })
1741    .done(res => {
1742        if (res?.success) {
1743            replaceWishRow(row, res.wish, currentAmount);
1744        }
1745    })
1746    .always(() => {
1747        img.removeClass('fa-spinner fa-spin');
1748        row.data('busy', false);
1749    });
1750});
1751// REPLACE ROW + TOTALS
1752function replaceWishRow(row, newWish, oldAmount) {
1753    const newAmount = parseFloat(newWish.estimated_value) || 0;
1754    const oldAmt = parseFloat(oldAmount) || 0;
1755    const diff = newAmount - oldAmt;
1756    // Update DOM + data
1757    row
1758        .attr('data-wish-id', newWish.id)
1759        .attr('data-amount', newAmount)
1760        .data('wish-id', newWish.id)
1761        .data('amount', newAmount);
1762    row.find('.wish-title a')
1763        .attr('href', `${SITE_URL}/wish/view-wish?id=${newWish.id}`)
1764        .text(newWish.wish_name);
1765    row.find('.wish-subtitle').text('For ' + (newWish.child?.display_name || 'Child'));
1766    row.find('.wish-right .wish-amount').text(`$${newAmount}`);
1767    // Update totals
1768    totals.wishes += diff;
1769    totals.general -= diff;
1770    totals.total = totals.wishes + totals.general;
1771    updateTotalsUI();
1772}
1773$('#proceedCheckout').on('click', function () {
1774    const wishIds = [];
1775    $('.wish-item').each(function () { wishIds.push($(this).data('wish-id')); });
1776     // 🔒 enforce max 100
1777    if (wishIds.length > 100) {
1778        showAlert('error', 'You cannot select more than 100 wishes.', '', 'OK');
1779        return false;
1780    }
1781    const generalFund = parseFloat($('#generalFund').text().replace('$', '')) || 0;
1782    localStorage.setItem('donation_amount', generalFund);
1783    $('#popupLoader').show();
1784    $.post(SITE_URL + 'cart/cart/set-wishes', {
1785        wishes: wishIds
1786    })
1787    .done(() => {
1788        window.location.href = SITE_URL + 'cart/cart';
1789    })
1790    .fail(() => {
1791        $('#popupLoader').hide();
1792        console.log('Unable to proceed. Please try again.');
1793    });
1794});
1795// For sweet alert
1796function showAlert(icon, message, title, buttonText){
1797    Swal.fire({
1798        icon: icon,
1799        title: title,
1800        text: message,
1801        confirmButtonText: buttonText,
1802        confirmButtonColor: "#ff9027"
1803    });
1804}
1805//For speek to text
1806function createRecognition() {
1807    if ('webkitSpeechRecognition' in window || 'SpeechRecognition' in window) {
1808        const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
1809        recognition = new SpeechRecognition();
1810        recognition.continuous = true;
1811        recognition.interimResults = true;
1812        recognition.onresult = function(event) {
1813            let interimTranscript = '';
1814            for (let i = event.resultIndex; i < event.results.length; i++) {
1815                let text = event.results[i][0].transcript;
1816                if (event.results[i].isFinal) { finalTranscript += text + ' ';} else {  interimTranscript += text;}
1817            }
1818            document.getElementById('userPrompt').value = finalTranscript + interimTranscript;
1819            // Clear any pending silence timer since speech is detected (reset it)
1820            if (silenceTimer) { clearTimeout(silenceTimer);}
1821            // Reset the silence timer: if no new speech in 3 seconds, stop recording
1822            silenceTimer = setTimeout(stopDueToSilence, 3000);
1823        };
1824        recognition.onend = function() {
1825            // Clear any pending silence timer
1826            if (silenceTimer) {
1827                clearTimeout(silenceTimer);
1828                silenceTimer = null;
1829            }
1830            if (recording) {
1831                recording = false;
1832                updateMicButton(false);
1833            }
1834        };
1835        recognition.onerror = function(event) {
1836            console.error("Speech recognition error", event.error);
1837            if (silenceTimer) {
1838                clearTimeout(silenceTimer);
1839                silenceTimer = null;
1840            }
1841            recording = false;
1842            updateMicButton(false);
1843        };
1844    } else {
1845        showAlert('error', 'Sorry, your browser does not support Speech Recognition API.', '', 'OK');
1846        return null;
1847    }
1848    return recognition;
1849}
1850// Function to stop recording due to silence
1851function stopDueToSilence() {
1852    if (recording) {
1853        recording = false;
1854        if(recognition) { recognition.stop();}
1855        updateMicButton(false);
1856    }
1857}
1858document.getElementById('startStopBtn').addEventListener('click', function() {
1859    if (!recording) {
1860        if (silenceTimer) {
1861            clearTimeout(silenceTimer);
1862            silenceTimer = null;
1863        }
1864        if (recognition) { recognition.stop();}
1865        // Create a fresh recognition instance
1866        createRecognition();
1867        setTimeout(() => {
1868            if (recognition) {
1869                recognition.start();
1870                recording = true;
1871                updateMicButton(true);
1872                silenceTimer = setTimeout(stopDueToSilence, 3000);
1873            }
1874        }, 100);
1875    } else {
1876        if (silenceTimer) {
1877            clearTimeout(silenceTimer);
1878            silenceTimer = null;
1879        }
1880        if (recognition) { recognition.stop();}
1881        recording = false;
1882        updateMicButton(false);
1883    }
1884});
1885function updateMicButton(isRecording) {
1886    console.log('Call butoons');
1887    const voiceBtn = document.getElementById('startStopBtn');
1888    const micImg = SITE_URL + "vendor/codefire/cfusermgmt/web/1simplewish/img/mic.svg";
1889    if (isRecording) {
1890        voiceBtn.classList.add('listening');
1891        voiceBtn.textContent = '🔴';
1892    } else {
1893        voiceBtn.classList.remove('listening');
1894        voiceBtn.innerHTML = '<img src="' + micImg + '" class="micIcon" alt="mic icon">';
1895    }
1896}
1897async function isOnline() {
1898    try {
1899        const res = await fetch(SITE_URL+'ping', { method: 'GET', cache: 'no-cache', redirect: 'follow'});
1900        return res.status >= 200 && res.status < 400;
1901    } catch {
1902        return false;
1903    }
1904}
1905</script>
1905<!-- End AI SHOPPER -->
1906    <div class="clearfix"></div>
1907    
1908
1909<footer>
1910  <div class="container">
1911    <div class="row">
1912      <div class="col-md-12">
1913        <div class="footer-logo">
1914          <a class="logo" href="/">
1915            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/logo_white.svg" class="img-responsive" alt="logo_white"/>
1916          </a>
1917        </div>
1918      </div>
1919      <div class="col-md-7">
1920        <div class="row">
1921          <div class="col-md-5 col-sm-6">
1922            <ul class="left right">
1923              <li> <a href="https://www.onesimplewish.org/children/help-child">Give Help</a></li>
1924              <li> <a href="https://www.onesimplewish.org/site/donate">Donate</a></li>
1925              <li> <a href="https://www.onesimplewish.org/wish/wish-grant">Browse Wishes</a></li>
1926              <li> <a href="https://www.onesimplewish.org/site/wish-fund">Start a Wish Fund</a></li>
1927              <li> <a href="https://www.onesimplewish.org/givingpage">Create a Fundraiser</a></li>
1928              <li> <a href="https://www.onesimplewish.org/corporate-and-foundation-opportunities">Corporate Opportunities</a></li>
1929              <li> <a href="https://www.onesimplewish.org/giftcards">Gift Cards</a></li>
1930              <li> <a href="https://www.onesimplewish.org/major-gifts">Major Gifts</a></li>
1931            </ul>
1932          </div>
1933          <div class="col-md-5 col-sm-6">
1934            <ul class="left right">
1935              <li> <a href="https://www.onesimplewish.org/site/submit-a-wish">Get Help</a></li>
1936              <li> <a href="https://www.onesimplewish.org/site/about">About</a> </li>
1937              <li> <a href="/33-faqs">FAQs</a></li>
1938              <li> <a href="https://www.onesimplewish.org/site/about#our-financials" >Financials</a> </li>
1939              <li> <a href="/contact/contact-us" >Contact Us</a> </li>
1940              <li> <a href="https://www.onesimplewish.org/site/joymaker">Give Monthly</a> </li>
1941              <li> <a href="https://www.onesimplewish.org/site/love-hope-joy-delivered">Love. Hope. Joy. Delivered</a> </li>
1942              <li> <a href="/34-privacy-policy">Privacy Policy</a></li>
1943              <li> <a href="/32-terms-condition">Terms & Conditions</a></li>
1944            </ul>
1945          </div>
1946        </div>
1947      </div>
1948
1949      <div class="col-md-5 ml-3">
1950        <div class="newsletter">
1951          <strong>Stay Connected</strong>
1952          <p>Sign up for updates from One Simple Wish, including inspiring stories, special campaigns, and exciting news!
1953          </p>
1954          <form class="newsletter-form" name="newsletter" action="/site/newsletter"
1955            method="POST">
1956            <div class="input-group mt-3">
1957              <input type="hidden" name="_csrf" value="">
1958              <input type="text" class="form-control" name="email" placeholder="Email Address" />
1959              <button class="btn-secondary newsletter-btn" type="submit">Go!</button>
1960            </div>
1961          </form>
1962        </div>
1963      </div>
1964
1965      <div class="col-md-7 orderLast">
1966        <div class="row">
1967          <div class="col-md-8">
1968            <ul class="top-icons">
1969              <li>
1970                <a href="https://www.facebook.com/onesimplewish/?fref=ts" target="_blank">
1971                  <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/facebook-icon.svg" class="img-responsive" alt="Follow on Facebook" title="Follow on Facebook"/>
1972                </a>
1973              </li>
1974              <li>
1975                <a href="https://www.instagram.com/onesimplewish/" target="_blank">
1976                  <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/insta-icon.svg" class="img-responsive" alt="Follow on Instagram" title="Follow on Instagram" />
1977                </a>
1978              </li>
1979            </ul>
1980
1981            <div class="bottom-icons">
1982              <p>&copy; 2026 One Simple Wish</p>
1983              <p class="spaninside">All donations are tax deductible | EIN #26-3128590 </p>
1984              <p class="osw_version"> One Simple Wish v2.4.0 | <a href="/contact/report-a-problem" id="report-problem-link" target="_blank">Report a Problem</a></p>
1985            </div>
1986          </div>
1987        </div>
1988      </div>
1989
1990      <div class="col-md-5 ml-3">
1991        <ul class="footer_social">
1992          <li><a href="https://www.charitynavigator.org/ein/263128590" target="_blank">
1993            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/four-star-rating-badge.png" class="img-responsive" alt="Charity Navigator"></a>
1994          </li>
1995          <li><a href="https://greatnonprofits.org/org/one-simple-wish" target="_blank">
1996            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/2026-top-rated-awards.png" class="img-responsive" alt="Charity Navigator"></a>
1997          </li>
1998          <li ><a href="https://app.candid.org/profile/8842369" target="_blank">
1999            <img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/imgs/candid-seal-platinum-2026.png" class="img-responsive " alt="Non Profit"></a>
2000          </li>
2001        </ul>
2002      </div>
2003    </div>
2004  </div>
2005<script>
2006  document.getElementById('report-problem-link').addEventListener('click', function () {
2007      const currentUrl = window.location.href;
2008      localStorage.setItem('secondurl', currentUrl);
2009  });
2010</script>
2010
2011</footer>
2012
2013</div>
2014<div id="modal-login" class="fade modal mdl-box" role="dialog" tabindex="-1">
2015    <div class="modal-dialog modal-lg">
2016        <button type="button" class="close" data-bs-dismiss="modal" style="right: -5px; top: -10px;"></button>
2017        <div class="modal-content">
2018            <div class="modal-body">
2019                <div id="modalContent">
2020                    <div class="login-box">
2021                        <form id="umalogin" action="/usermgmt/user/login" method="post" enctype="multipart/form-data" validateOnSubmit>
2022<input type="hidden" name="_csrf" value="LQqmYVzAdwgdBA4dkfL_nKu6kDW7j2ki13n6SDjGJf59ft87Mag9Q0lUTGf6l5TL2tXPf-62OEuvNIAKSvEcmA==">                        <div class="form-group">
2023                            <div class="col-sm-3">
2024                                <label for="inputEmail3">Email</label>
2025                            </div>
2026                            <div class="col-sm-9">
2027                                <div class="form-group field-loginform-username">
2028
2029<input type="text" id="loginform-username" class="form-control" name="LoginForm[username]" placeholder="Email Address">
2030
2031<p class="help-block help-block-error"></p>
2032</div>                            </div>
2033                            <div class="clearfix"></div>
2034                        </div>
2035                        <div class="password">
2036                            <div class="col-sm-3">
2037                                <label for="inputPassword3">Password</label>
2038                            </div>
2039                            <div class="col-sm-9">
2040                                <div class="form-group field-loginform-password">
2041
2042<input type="password" id="loginform-password" class="form-control" name="LoginForm[password]" placeholder="Password">
2043
2044<p class="help-block help-block-error"></p>
2045</div>                            </div>
2046                            <div class="clearfix"></div>
2047                        </div>
2048                        <div class="form-group text-center">
2049                            <button type="submit" class="call_login" name="login-button"></button>                            <div class="login_loader" style="display:none;"><img src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/login_loader.gif" alt="login_loader" /></div>
2050                            <h2><a href="/user/register/wg">Don't have
2051                                    an account? Register here!</a></h2>
2052                            <div class="form-group col-sm-12 text-center">
2053                                <a class="" href="https://www.onesimplewish.org/usermgmt/user/request-password-reset">Forgot Password</a>                            </div>
2054                                                    </div>
2055                    </div>
2056                    </form>                    <input type="hidden" name="url" id="popup_url" value="https://www.onesimplewish.org
2057                        /usermgmt/user/login" />
2058                </div>
2059            </div>
2060        </div>
2061    </div>
2062</div>
2063<div id="modal-discard" class="fade modal mdl-box discard_data" role="dialog" tabindex="-1">
2064    <div class="modal-dialog modal-lg">
2065        <button type="button" class="close" data-bs-dismiss="modal"></button>
2066        <div class="modal-content">
2067            <div class="modal-body">
2068                <div id="modalContent-discard">
2069                    <div class="login-box">
2070                        <h4>Are you sure you want to cancel this wish? If discarded, you will not be able to recover it.
2071                        </h4>
2072                        <div class="d-flex gap-3 justify-content-center">
2073                        <a class="discard-yes condition btn-secondary" href="#">YES</a>
2074                        <a class="discard-no condition cancelBtn" data-bs-dismiss="modal" href="#">NO</a>
2075                        </div>
2076                    </div>
2077                </div>
2078            </div>
2079        </div>
2080    </div>
2081</div>
2082<div id="modal-keepactive" class="fade modal mdl-box discard_data" role="dialog" tabindex="-1">
2083    <div class="modal-dialog modal-lg">
2084        <div class="modal-content">
2085                <button type="button" class="close" data-bs-dismiss="modal"></button>
2086            <div class="modal-body">
2087                <div id="modalContent-discard">
2088                    <div class="login-box">
2089                        <h4>Are you sure you want to cancel your changes? </h4>
2090                        <div class="d-flex gap-3 justify-content-center">
2091                                 <a class="discard-yes condition btn-secondary" href="#">YES</a>
2092                        <a class="discard-no condition cancelBtn" data-bs-dismiss="modal" href="#">NO</a>
2093                        </div>
2094                    </div>
2095                </div>
2096            </div>
2097        </div>
2098    </div>
2099</div>
2100
2101<div id="modal-discard-child" class="fade modal mdl-box discard_data" role="dialog" tabindex="-1">
2102    <div class="modal-dialog modal-lg">
2103        <div class="modal-content">
2104             <button type="button" class="close" data-bs-dismiss="modal"><img width="30" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/images/close.png" alt="close-icon" /></button>
2105            <div class="modal-body">
2106                <div id="modalContent-discard-child">
2107                    <div class="login-box">
2108                        <h4>Are you sure you want to discard your changes?</h4>
2109                        <a class="discard-yes condition" href="#">YES</a>
2110                        <a class="discard-no condition" data-bs-dismiss="modal" href="#">NO</a>
2111                    </div>
2112                </div>
2113            </div>
2114        </div>
2115    </div>
2116</div>
2117</div>
2118
2119<!--Cart Limit info Modal -->
2120<div class="modal cardLimitReachPopup" id="limitModal">
2121  <div class="modal-dialog">
2122    <div class="modal-content">
2123      <div class="modal-header">
2124        <h5 class="modal-title mb-0">Cart Limit Reached</h5>
2125        <button type="button" class="btn-close py-0" data-bs-dismiss="modal"></button>
2126      </div>
2127      <div class="modal-body">
2128        <!-- <div class="limit-box"> Maximum <strong>100 wishes</strong> per cart</div> -->
2129        <p>For security purposes, you can only add a maximum of 100 wishes per cart. If you'd like to add more than 100 wishes, please complete your current checkout and then start a new cart.</p>
2130        <div class="steps">
2131          <h6 class="fw-bold mb-3 mb-b">📋 Next Steps</h6>
2132          <ol class="ps-0 mb-0">
2133            <li><span>1</span> Complete your current checkout with up to 100 wishes</li>
2134            <li><span>2</span> Start a new cart for additional wishes</li>
2135            <li><span>3</span>  For larger donations or assistance <a href="/cdn-cgi/l/email-protection#96fff8f0f9d6f9f8f3e5fffbe6faf3e1ffe5feb8f9e4f1">Contact OSW</a></li>
2136          </ol>
2137        </div>
2138      </div>
2139      <div class="modal-footer"><button type="button" class="btn-secondary-outline m-0" data-bs-dismiss="modal">CLOSE</button>
2140        <a href="https://www.onesimplewish.org/cart/cart" class="btn-secondary m-0 ms-2">Proceed to Checkout</a>
2141    </div>
2142    </div>
2143  </div>
2144</div>
vendor: 109 bytes, lines 2144-2145
2144
2145<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>
2145<script src="/assets/f5da99be/jquery.js?v=1790661367"></script>
vendor: 1 bytes, line 2145
2145
2146<script src="/assets/3e8cd43e/yii.js?v=1790661367"></script>
vendor: 1 bytes, line 2146
2146
2147<script src="/js/index.js?v=103"></script>
vendor: 1 bytes, line 2147
2147
2148<script src="/vendor/codefire/cfusermgmt/web/js/bootstrap.js"></script>
vendor: 1 bytes, line 2148
2148
2149<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/index.js"></script>
vendor: 1 bytes, line 2149
2149
2150<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/jquery-ui.js"></script>
vendor: 1 bytes, line 2150
2150
2151<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/usermgmt.js?v=103"></script>
vendor: 1 bytes, line 2151
2151
2152<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/on-off-switch.js"></script>
vendor: 1 bytes, line 2152
2152
2153<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/on-off-switch-onload.js"></script>
vendor: 1 bytes, line 2153
2153
2154<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/flatpickr.js"></script>
vendor: 1 bytes, line 2154
2154
2155<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/lightbox.min.js"></script>
vendor: 1 bytes, line 2155
2155
2156<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/sweet_alert2.js"></script>
vendor: 1 bytes, line 2156
2156
2157<script src="/assets/3e8cd43e/yii.activeForm.js?v=1790661367"></script>
vendor: 1 bytes, line 2157
2157
2158<script>jQuery(function ($) {
2159jQuery('#umalogin').yiiActiveForm([], []);
2160});</script>
2160<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/nouislider.js"></script>
vendor: 1 bytes, line 2160
2160
2161<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/wNumb.js"></script>
vendor: 1 bytes, line 2161
2161
2162<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/owl.carousel.js"></script>
vendor: 1 bytes, line 2162
2162
2163<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/osw_common.js?v=103"></script>
vendor: 1 bytes, line 2163
2163
2164<script src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/range_slider.js"></script>
vendor: 1 bytes, line 2164
2164
2165<script type="text/javascript" src="https://www.onesimplewish.org/vendor/codefire/cfusermgmt/web/js/v5_bootstrap.bundle.min.js?v=103"></script>
vendor: 1 bytes, line 2165
2165
2166<script>
2167    jQuery(document).ready(function () {
2168        var priceSlider = document.getElementById('price');
2169        if (priceSlider !== null) {
2170            noUiSlider.create(priceSlider, {
2171                start: ['0', '500'],
2172                connect: true,
2173                range: {
2174                    'min': 0,
2175                    'max': 500,
2176                },
2177                format: wNumb({
2178                    decimals: 3,
2179                    thousand: '.',
2180                    prefix: '$',
2181                })
2182            });
2183            var priceMin = document.getElementById('lower-value'),
2184                priceMax = document.getElementById('upper-value');
2185
2186            priceSlider.noUiSlider.on('update', function (values, handle) {
2187                if (handle) {
2188                    priceMax.value = values[handle];
2189                } else {
2190                    priceMin.value = values[handle];
2191                }
2192            });
2193        }
2194
2195        var ageSlider = document.getElementById('age');
2196        if (ageSlider !== null) {
2197            noUiSlider.create(ageSlider, {
2198                start: [0, 500],
2199            connect: true,
2200                range: {
2201                'min': 0,
2202                    'max': 100,
2203                },
2204            format: wNumb({
2205                decimals: 3,
2206                thousand: '.',
2207
2208            })
2209        });
2210
2211    var ageMin = document.getElementById('min-age'),
2212        ageMax = document.getElementById('max-age');
2213    ageSlider.noUiSlider.on('update', function (values, handle) {
2214        if (handle) {
2215            ageMax.value = values[handle];
2216        } else {
2217            ageMin.value = values[handle];
2218        }
2219    });
2220        }
2221    });
2222
2223
2224</script>
2224
2225
2226<script>
2227$(document).ready(function() {
2228     $("#logoSlider").owlCarousel({
2229        navigation: 1,
2230        pagination: true,
2231        autoPlay: !1,
2232        items: 2,
2233        itemsTablet: [768, 3],
2234        itemsMobile: [576, 2]
2235
2236    })
2237    
2238});
2239$(document).ready(function() {
2240     $("#logoSlider2").owlCarousel({
2241        navigation: 1,
2242        pagination: true,
2243        autoPlay: !1,
2244        items: 2,
2245        itemsTablet: [768, 3],
2246        itemsMobile: [576, 2]
2247
2248    })
2249    
2250});
2251</script>
2251
2252</html>
2253<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a44e55da0d546171',t:'MTc5MTA1NTU1Mw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.