(1) Upon delivery to the probation officer of a juvenile who has been taken into temporary custody under section 29-401, 43-248, or 43-250, the probation officer shall immediately investigate the situation of the juvenile and the nature and circumstances of the events surrounding his or her being taken into custody. Such investigation may be by informal means when appropriate.
(2) The probation officer's decision to release the juvenile from custody or place the juvenile in detention or an alternative to detention shall be based upon the results of the standardized juvenile detention screening instrument described in section 43-260.01.
(3) No juvenile who has been taken into temporary custody under subdivision (1)(c) of section 43-250 or subsection (6) of section 43-286.01 or pursuant to an alleged violation of an order for conditional release shall be detained in any detention facility or be subject to an alternative to detention infringing upon the juvenile's liberty interest for longer than twenty-four hours, excluding nonjudicial days, after having been taken into custody unless such juvenile has appeared personally before a court of competent jurisdiction for a hearing to determine if continued detention, services, or supervision is necessary. The juvenile shall be represented by counsel at the hearing. Whether such counsel shall be provided at the cost of the county shall be determined as provided in subsection (1) of section 43-272. If continued secure detention is ordered, such detention shall be in a juvenile detention facility, except that a juvenile charged with a felony as an adult in county or district court may be held in an adult jail as set forth in subdivision (1)(c)(v) of section 43-250. A juvenile placed in an alternative to detention, but not in detention, may waive this hearing through counsel.
(4) When the probation officer deems it to be in the best interests of the juvenile, the probation officer shall immediately release such juvenile to the custody of his or her parent. If the juvenile has both a custodial and a noncustodial parent and the probation officer deems that release of the juvenile to the custodial parent is not in the best interests of the juvenile, the probation officer shall, if it is deemed to be in the best interests of the juvenile, attempt to contact the noncustodial parent, if any, of the juvenile and to release the juvenile to such noncustodial parent. If such release is not possible or not deemed to be in the best interests of the juvenile, the probation officer may release the juvenile to the custody of a legal guardian, a responsible relative, or another responsible person.
(5) The court may admit such juvenile to bail by bond in such amount and on such conditions and security as the court, in its sole discretion, shall determine, or the court may proceed as provided in section 43-254. In no case shall the court or probation officer release such juvenile if it appears that:
(a) Before July 1, 2019, further detention or placement of such juvenile is a matter of immediate and urgent necessity for the protection of such juvenile or the person or property of another or if it appears that such juvenile is likely to flee the jurisdiction of the court; and
(b) On or after July 1, 2019, the physical safety of persons in the community would be seriously threatened or that detention is necessary to secure the presence of the juvenile at the next hearing, as evidenced by a demonstrable record of willful failure to appear at a scheduled court hearing within the last twelve months.